aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfredizzimo <fsundvik@gmail.com>2025-02-09 22:44:41 +0700
committerGitHub <noreply@github.com>2025-02-09 07:44:41 -0800
commit8c2571991ad748b0ee71529951e1502e553aa8ba (patch)
tree0e34327087ec199eb4b71a7919afd51063fbd682
parentaf0cd9a9075117319808b8c0515cd86628992baf (diff)
downloadrneovim-8c2571991ad748b0ee71529951e1502e553aa8ba.tar.gz
rneovim-8c2571991ad748b0ee71529951e1502e553aa8ba.tar.bz2
rneovim-8c2571991ad748b0ee71529951e1502e553aa8ba.zip
test: reset cmdline abort state only after expect() has finished #32376
Problem: cmdline abort state may be reset when intermediate states are received. Solution: Reset after `self:_wait()`.
-rw-r--r--test/functional/ui/screen.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 9ff29cd706..3333ac6c34 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -661,12 +661,6 @@ screen:redraw_debug() to show all intermediate screen states.]]
end
end
- -- Only test the abort state of a cmdline level once.
- if self.cmdline_hide_level ~= nil then
- self.cmdline[self.cmdline_hide_level] = nil
- self.cmdline_hide_level = nil
- end
-
if expected.hl_groups ~= nil then
for name, id in pairs(expected.hl_groups) do
local expected_hl = attr_state.ids[id]
@@ -698,6 +692,11 @@ screen:redraw_debug() to show all intermediate screen states.]]
end
end
end, expected)
+ -- Only test the abort state of a cmdline level once.
+ if self.cmdline_hide_level ~= nil then
+ self.cmdline[self.cmdline_hide_level] = nil
+ self.cmdline_hide_level = nil
+ end
end
function Screen:expect_unchanged(intermediate, waittime_ms)