Skip to content

Commit 2336eee

Browse files
author
skywind3000
committed
add new opt fields to control system cursor appearance
1 parent a705b62 commit 2336eee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

autoload/quickui/tools.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,15 @@ function! quickui#tools#clever_inputlist(name, content, opts)
451451
let opts = deepcopy(a:opts)
452452
let opts.index = get(s:previous_cursor, a:name, 0)
453453
let opts.keep_name = a:name
454+
let hide_system_cursor = get(a:opts, 'hide_system_cursor', 0)
454455
" let opts.callback = function('s:remember_cursor_listbox')
456+
if hide_system_cursor != 0
457+
call quickui#utils#hide_system_cursor(1)
458+
endif
455459
let hr = quickui#listbox#inputlist(a:content, opts)
460+
if hide_system_cursor != 0
461+
call quickui#utils#hide_system_cursor(0)
462+
endif
456463
if hr >= 0
457464
let s:previous_cursor[a:name] = hr
458465
endif

0 commit comments

Comments
 (0)