mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-09 10:23:49 -05:00
Undo when LiveEasyAlign is cancelled via CTRL-C
This commit is contained in:
@@ -657,7 +657,11 @@ function! s:interactive(range, modes, n, d, opts, rules, vis, bvis)
|
|||||||
let check = 0
|
let check = 0
|
||||||
let warn = ''
|
let warn = ''
|
||||||
|
|
||||||
|
try
|
||||||
let c = getchar()
|
let c = getchar()
|
||||||
|
catch /^Vim:Interrupt$/
|
||||||
|
let c = 27
|
||||||
|
endtry
|
||||||
let ch = nr2char(c)
|
let ch = nr2char(c)
|
||||||
if c == 3 || c == 27 " CTRL-C / ESC
|
if c == 3 || c == 27 " CTRL-C / ESC
|
||||||
if undo
|
if undo
|
||||||
|
|||||||
Reference in New Issue
Block a user