Skip to content

Commit 0ae0398

Browse files
committed
Fix open:select action on Vim
Close #91 It seems the following code raise E474: Invalid argument sometime in Vim execute printf("silent! cunmap \<buffer> \<Char-%d>", nr) But the following silent! execute printf("cunmap \<buffer> \<Char-%d>", nr) Thus use former version to fix #91
1 parent f32049d commit 0ae0398

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/fern/internal/window.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,18 @@ endfunction
9090

9191
function! s:cnoremap_all(chars) abort
9292
for nr in range(256)
93-
execute printf("silent! cnoremap \<buffer>\<silent> \<Char-%d> \<Nop>", nr)
93+
silent! execute printf("cnoremap \<buffer>\<silent> \<Char-%d> \<Nop>", nr)
9494
endfor
9595
for char in a:chars
96-
execute printf("silent! cnoremap \<buffer>\<silent> %s %s\<CR>", char, char)
96+
silent! execute printf("cnoremap \<buffer>\<silent> %s %s\<CR>", char, char)
9797
endfor
9898
silent! cunmap <buffer> <Return>
9999
silent! cunmap <buffer> <Esc>
100100
endfunction
101101

102102
function! s:cunmap_all() abort
103103
for nr in range(256)
104-
execute printf("silent! cunmap \<buffer> \<Char-%d>", nr)
104+
silent! execute printf("cunmap \<buffer> \<Char-%d>", nr)
105105
endfor
106106
endfunction
107107

0 commit comments

Comments
 (0)