vim9script def ShowAtCursorWithBuffer() var bufnr = bufadd(null_string) bufload(bufnr) setbufline(bufnr, 1, 'Loading...') popup_atcursor(bufnr, {}) enddef def ShowAtCursorWithText() popup_atcursor('Text', {}) enddef def Call() popup_create('foo', { filter: (winid, key) => { if key == "b" ShowAtCursorWithBuffer() popup_close(winid) elseif key == "t" ShowAtCursorWithText() popup_close(winid) endif return 1 } }) enddef map s <ScriptCmd>Call()<CR> map mb <ScriptCmd>ShowAtCursorWithBuffer()<CR> map mt <ScriptCmd>ShowAtCursorWithText()<CR>
sb can't work well.mb works well.st works well.mt works well.sb works correctly as mb
9.2.0677
MS-Windows GUI and TUI
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()