We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9717de commit c8676e0Copy full SHA for c8676e0
autoload/fern/mapping/drawer.vim
@@ -26,6 +26,9 @@ function! s:map_zoom(helper) abort
26
if alpha <= 0 || alpha > 10
27
let current = float2nr(ceil(str2float(winwidth(0)) / &columns * 10))
28
let alpha = s:input_alpha(printf('Width ratio [%d -> 1-10]: ', current))
29
+ if alpha is# v:null
30
+ return
31
+ endif
32
endif
33
let alpha = str2float(alpha)
34
let width = &columns * (alpha / 10)
@@ -43,7 +46,10 @@ endfunction
43
46
function! s:input_alpha(prompt) abort
44
47
while v:true
45
48
let result = input(a:prompt)
- if result =~# '^\%(10\|[1-9]\)$'
49
+ if result ==# ''
50
+ redraw | echo ''
51
+ return v:null
52
+ elseif result =~# '^\%(10\|[1-9]\)$'
53
redraw | echo ''
54
return result
55
0 commit comments