andreikop / enki

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

Undoing "Indent with 1 space" moves cursor to the beginning of the line #222

Closed vi closed 10 years ago

vi commented 10 years ago

Almost always I trigger "Intent with 1 space" by mistake, just because of it is bound to Shift+Space by default and interferes with typing CAPITALIZED SPACE-SEPARATED TEXT WITHOUT CAPS LOCK. I quicly undo it and type further, but the cursor appears near the beginning of the line (where the undo operation took effect), doubling the annoyance.

I actually got round and disabled that Shift+Space shortcut in one environment, but is still annoys me in other ones.

I think undoing actions that affect text not at cursor should not move cursor.

andreikop commented 10 years ago

I also type Shift+Space accidentally sometimes. I even thinking about remapping the shrotcut, but don't know which sequence to use. Any ideas?

I don't know how to modify Undo behavior quickly, so leaving as is now. Use Shift+Backspace to undo the changes. It doesn't change cursor position.

vi commented 10 years ago

Maybe leave the shortcut unassigned by default? Or reassign to Ctrl+Tab/Ctrl+Shift+Tab, for example.