mirror of
https://github.com/neovim/neovim.git
synced 2026-07-12 12:29:44 +00:00
fix(ui): close outdated cmdline pum on redraw (#36815)
This commit is contained in:
@@ -1872,6 +1872,7 @@ executable({expr}) *executable()*
|
|||||||
then the name is also tried without adding an extension.
|
then the name is also tried without adding an extension.
|
||||||
On MS-Windows it only checks if the file exists and is not a
|
On MS-Windows it only checks if the file exists and is not a
|
||||||
directory, not if it's really executable.
|
directory, not if it's really executable.
|
||||||
|
|
||||||
On MS-Windows an executable in the same directory as the Vim
|
On MS-Windows an executable in the same directory as the Vim
|
||||||
executable is always found (it's added to $PATH at |startup|).
|
executable is always found (it's added to $PATH at |startup|).
|
||||||
*NoDefaultCurrentDirectoryInExePath*
|
*NoDefaultCurrentDirectoryInExePath*
|
||||||
|
|||||||
1
runtime/lua/vim/_meta/vimfn.lua
generated
1
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -1647,6 +1647,7 @@ function vim.fn.eventhandler() end
|
|||||||
--- then the name is also tried without adding an extension.
|
--- then the name is also tried without adding an extension.
|
||||||
--- On MS-Windows it only checks if the file exists and is not a
|
--- On MS-Windows it only checks if the file exists and is not a
|
||||||
--- directory, not if it's really executable.
|
--- directory, not if it's really executable.
|
||||||
|
---
|
||||||
--- On MS-Windows an executable in the same directory as the Vim
|
--- On MS-Windows an executable in the same directory as the Vim
|
||||||
--- executable is always found (it's added to $PATH at |startup|).
|
--- executable is always found (it's added to $PATH at |startup|).
|
||||||
--- *NoDefaultCurrentDirectoryInExePath*
|
--- *NoDefaultCurrentDirectoryInExePath*
|
||||||
|
|||||||
@@ -684,6 +684,8 @@ int update_screen(void)
|
|||||||
if (pum_drawn() && must_redraw_pum) {
|
if (pum_drawn() && must_redraw_pum) {
|
||||||
win_check_ns_hl(curwin);
|
win_check_ns_hl(curwin);
|
||||||
pum_redraw();
|
pum_redraw();
|
||||||
|
} else if (State & MODE_CMDLINE) {
|
||||||
|
pum_check_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
win_check_ns_hl(NULL);
|
win_check_ns_hl(NULL);
|
||||||
|
|||||||
@@ -2158,6 +2158,7 @@ M.funcs = {
|
|||||||
then the name is also tried without adding an extension.
|
then the name is also tried without adding an extension.
|
||||||
On MS-Windows it only checks if the file exists and is not a
|
On MS-Windows it only checks if the file exists and is not a
|
||||||
directory, not if it's really executable.
|
directory, not if it's really executable.
|
||||||
|
|
||||||
On MS-Windows an executable in the same directory as the Vim
|
On MS-Windows an executable in the same directory as the Vim
|
||||||
executable is always found (it's added to $PATH at |startup|).
|
executable is always found (it's added to $PATH at |startup|).
|
||||||
*NoDefaultCurrentDirectoryInExePath*
|
*NoDefaultCurrentDirectoryInExePath*
|
||||||
|
|||||||
@@ -579,11 +579,12 @@ describe('cmdline', function()
|
|||||||
|
|
||||||
-- pum is closed when no completion candidates are available
|
-- pum is closed when no completion candidates are available
|
||||||
feed('<F8>')
|
feed('<F8>')
|
||||||
screen:expect([[
|
local s3 = [[
|
||||||
|
|
|
|
||||||
{1:~ }|*8
|
{1:~ }|*8
|
||||||
:TestCmd ax^ |
|
:TestCmd ax^ |
|
||||||
]])
|
]]
|
||||||
|
screen:expect(s3)
|
||||||
|
|
||||||
feed('<BS><F8>')
|
feed('<BS><F8>')
|
||||||
screen:expect(s1)
|
screen:expect(s1)
|
||||||
@@ -598,6 +599,16 @@ describe('cmdline', function()
|
|||||||
{1:~ }|*8
|
{1:~ }|*8
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
|
|
||||||
|
feed(':TestCmd a<F8>')
|
||||||
|
screen:expect(s1)
|
||||||
|
command('redraw')
|
||||||
|
screen:expect_unchanged()
|
||||||
|
feed('x')
|
||||||
|
screen:expect(s2)
|
||||||
|
-- outdated pum is closed by :redraw #36808
|
||||||
|
command('redraw')
|
||||||
|
screen:expect(s3)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- oldtest: Test_long_line_noselect()
|
-- oldtest: Test_long_line_noselect()
|
||||||
|
|||||||
Reference in New Issue
Block a user