GNOME Bugzilla – Bug 340263
incorrect undoing of overtyping
Last modified: 2009-12-25 17:05:09 UTC
The undo command behaves incorrectly for text that has been overtyped. Select some text in Bluefish. Type something to replace it. The original selected text is overwritten with the typed text. Now do Undo. Expected behaviour: typed text vanishes, original reappears. Actual behaviour: both pieces of text vanish. This is incorrect, as it is a state the document was never in. Possibly related to Bug #340262.
If you hit undo twice the text comes back, as the undo has saved the "extra" state between the two operations - i.e. the blanking of the word. This is could be considered a state the document was in but I agree this is not what I would have expected.
(In reply to comment #1) > If you hit undo twice the text comes back, as the undo has saved the "extra" > state between the two operations - i.e. the blanking of the word. What is done here consists of 2 actions: delete text and add text. Both actions trigger an event that leads to a saved state in the undo stack. I'm closing this report.
For the user, it's one action. The user's point of view and the programmer's point of view are often different. Please reopen, as this behaviour goes against what other applications do and that users expect.
I agree that if you select text and overtype (not using the overtype key, not using delete or backspace) it shoud be a single action. I'm not sure how to detect it within gtk (it sends two signals, so it will be hard to find out if the user pressed delete or immediately started writing new text). But I think the bug report is valid.
Upping version number. I can confirm that gedit behaves correctly, which is also built on gtk.
unfortunately gedit doesn't use the gtktextview component, but it uses a separate editor component..
Bluefish 2.0.0-rc1 has been released. This is the first release in the 2.x series. Upgrading to the 2.x releases is recommended. Bugs in the old 1.x branch are unlikely to be fixed. If you can reproduce this bug against the 2.x branch please reopen the bug.