File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 3
3
" input.vim -
4
4
"
5
5
" Created by skywind on 2021/11/27
6
- " Last Modified: 2021/11/30 00:49
6
+ " Last Modified: 2021/11/30 01:50
7
7
"
8
8
" ======================================================================
9
9
@@ -33,7 +33,11 @@ function! s:init_input_box(prompt, opts)
33
33
if has_key (a: opts , ' w' )
34
34
let hwnd.w = a: opts .w
35
35
else
36
- let limit = strdisplaywidth (a: prompt )
36
+ let limit = 8
37
+ for text in head
38
+ let width = strdisplaywidth (text)
39
+ let limit = (limit < width)? width : limit
40
+ endfor
37
41
if &columns >= 80
38
42
let limit = (limit < 50 )? 50 : limit
39
43
endif
@@ -237,6 +241,7 @@ function! quickui#input#create(prompt, opts)
237
241
let rl = hwnd.rl
238
242
let accept = 0
239
243
let result = ' '
244
+ silent ! exec ' nohl'
240
245
while hwnd.exit == 0
241
246
call s: update_input (hwnd)
242
247
try
Original file line number Diff line number Diff line change 3
3
" tools.vim -
4
4
"
5
5
" Created by skywind on 2019/12/23
6
- " Last Modified: 2021/11/30 01:37
6
+ " Last Modified: 2021/11/30 01:42
7
7
"
8
8
" ======================================================================
9
9
@@ -491,8 +491,10 @@ endfunc
491
491
" search inputbox
492
492
" ----------------------------------------------------------------------
493
493
function ! quickui#tools#input_search ()
494
- let t = expand (' <cword>' )
495
- let text = quickui#input#open (' Enter text to search:' , t , ' search' )
494
+ let word = expand (' <cword>' )
495
+ let title = [' Enter text to search' ]
496
+ " let title += [repeat('*', 70)]
497
+ let text = quickui#input#open (title , word, ' search' )
496
498
redraw
497
499
if text == ' '
498
500
echo " quit search"
You can’t perform that action at this time.
0 commit comments