It looks like it happens on cursorhold event, not 100% sure though.
Indeed, if I change `set updatetime=1000` then I get this every second:
vim9script
def Test()
var prompt: string = ''
const wid: number = popup_create('', {
minwidth: 20,
maxheight: 1,
mapping: false,
filter: (winid: number, key: string): bool => {
if key == "\<esc>"
popup_close(winid, -1)
else
prompt ..= key
popup_settext(winid, prompt)
else
return false
endif
return true
},
callback: (_: number, result: number) => {
if result == 0
echomsg prompt
endif
}
})
enddef
Test()
No comments:
Post a Comment