andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

Weird Undo after typing in Replace mode #116

Closed vi closed 11 years ago

vi commented 11 years ago

Ctrl+Z after using replace mode works weird. It considers each character typed in replace mode as two actions (delete existing character, then insert another one).

andreikop commented 11 years ago

I was surprised, but it is Qt bug. I workarounded it. Now text is restored with one Undo action, but cursor is placed after restored character, not on it.

vi commented 11 years ago

The fix is not complete: "Undo" undoes only one typed character unlike in insert mode where it undoes a series of characters.

but it is Qt bug.

It should probably be reported then.

andreikop commented 11 years ago

Yes, as I mentioned, it is workaround only for one case - 1 symbol typed.

It looks like Digia is not going to implement good Undo for replace mode. I also will not do it. Minor feature will require a lot of time and very complicated code.