File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -50,20 +50,25 @@ if has('nvim')
50
50
endfunction
51
51
else
52
52
function ! s: input (prompt , text, completion) abort
53
- keepjumps keepalt botright 0 new
53
+ let original = maparg ( ' <Esc> ' , ' n ' )
54
54
execute printf (' cnoremap <nowait><buffer> <Esc> <C-u>%s<CR>' , s: escape_token )
55
55
try
56
56
let result = a: completion is # v: null
57
57
\ ? input (a: prompt , a: text )
58
58
\ : input (a: prompt , a: text , a: completion )
59
+ redraw | echo " "
59
60
if result == # s: escape_token
60
61
return v: null
61
62
endif
62
63
return result
63
64
catch /^Vim:Interrupt$/
64
65
return v: null
65
66
finally
66
- bwipeout !
67
+ if empty (original)
68
+ cunmap <buffer> <Esc>
69
+ else
70
+ execute printf (' cmap <buffer> %s' , original)
71
+ endif
67
72
endtry
68
73
endfunction
69
74
endif
You can’t perform that action at this time.
0 commit comments