tomboy-notes / tomboy-ng

Next generation of Tomboy
MIT License
389 stars 38 forks source link

Undo does not work with [ENTER] #307

Open salamander2 opened 9 months ago

salamander2 commented 9 months ago

If you already know about this bug with undo [CTRL-Z] just ignore it, close it.

  1. Type: I am going to the store
  2. Make these changes: I am going to the bank[ENTER] and the store
  3. The text now looks like this: I am going to the bank
    and the store.
  4. Press [CTRL-Z] repeatedly to undo the changes made in step 2.
  5. The letters typed will be removed, BUT NOT THE [ENTER] / newline
  6. When you undo everything, the text looks like this: I am going to
    the store.

It should be back to one line if the undo was working perfectly. Instead, we're left with two lines.

davidbannon commented 8 months ago

I am sorry Salamander, I must have missed this report. Only just found it now. Yes, I can confirm it too. Just sent Debian version 0.38 and could so easily have fixed this bug. Will try to have it fixed for next release. Davo

davidbannon commented 8 months ago

OK, bit worried about this. Can confirm Salamander's report. Enter is not recorded in the undo stack because it does not generate a suitable keydown event. KMemo grabs them because Enter is not recorded there as a character but as a new block, altering the structure. So, this sounds like special code to process an Enter press -

Quite a bit of extra code happening while user types, must ensure benefit matches that potential slow down. Further research is indicated ....

Davo