guns / vim-sexp

Precision Editing for S-expressions
MIT License
612 stars 33 forks source link

Don't break undo with delimiter insertion #21

Closed frangio closed 7 years ago

frangio commented 7 years ago

This patch uses the CTRL-G U special key introduced in version 7.4.849 so that the arrow keys sent after inserting a matching closing delimiter don't break the undo history.

All occurences of \<Left> are replaced by \<C-G>U\<Left>, and likewise for \<Right>.

guns commented 7 years ago

Very nice patch. It appears backwards compatible as well since \<C-G>U is a noop in 7.4.848 and below.

Merged. Thank you!

frangio commented 7 years ago

That's great to hear! I forgot to mention it but I hadn't tested with older versions of Vim.