File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 33" input.vim -
44"
55" Created by skywind on 2021/11/27
6- " Last Modified: 2021/11/30 00:49
6+ " Last Modified: 2021/11/30 01:50
77"
88" ======================================================================
99
@@ -33,7 +33,11 @@ function! s:init_input_box(prompt, opts)
3333 if has_key (a: opts , ' w' )
3434 let hwnd.w = a: opts .w
3535 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
3741 if &columns >= 80
3842 let limit = (limit < 50 )? 50 : limit
3943 endif
@@ -237,6 +241,7 @@ function! quickui#input#create(prompt, opts)
237241 let rl = hwnd.rl
238242 let accept = 0
239243 let result = ' '
244+ silent ! exec ' nohl'
240245 while hwnd.exit == 0
241246 call s: update_input (hwnd)
242247 try
Original file line number Diff line number Diff line change 33" tools.vim -
44"
55" Created by skywind on 2019/12/23
6- " Last Modified: 2021/11/30 01:37
6+ " Last Modified: 2021/11/30 01:42
77"
88" ======================================================================
99
@@ -491,8 +491,10 @@ endfunc
491491" search inputbox
492492" ----------------------------------------------------------------------
493493function ! 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' )
496498 redraw
497499 if text == ' '
498500 echo " quit search"
You can’t perform that action at this time.
0 commit comments