aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/mouse_spec.lua14
-rw-r--r--test/functional/ui/screen.lua10
2 files changed, 11 insertions, 13 deletions
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua
index 440bae58e0..fedef7da8a 100644
--- a/test/functional/ui/mouse_spec.lua
+++ b/test/functional/ui/mouse_spec.lua
@@ -26,6 +26,8 @@ describe('ui/mouse/input', function()
},
[4] = {reverse = true},
[5] = {bold = true, reverse = true},
+ [6] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
+ [7] = {bold = true, foreground = Screen.colors.SeaGreen4},
})
command("set display-=msgsep")
feed('itesting<cr>mouse<cr>support and selection<esc>')
@@ -620,12 +622,12 @@ describe('ui/mouse/input', function()
meths.set_option('tags', './non-existent-tags-file')
feed('<C-LeftMouse><0,0>')
screen:expect([[
- E433: No tags file |
- E426: tag not found: test|
- ing |
- Press ENTER or type comma|
- nd to continue^ |
- ]],nil,true)
+ {6:E433: No tags file} |
+ {6:E426: tag not found: test}|
+ {6:ing} |
+ {7:Press ENTER or type comma}|
+ {7:nd to continue}^ |
+ ]])
feed('<cr>')
end)
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 68c3d54922..b15e2980de 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -66,7 +66,6 @@
-- [1] = {reverse = true, bold = true},
-- [2] = {reverse = true}
-- })
--- screen:set_default_attr_ignore( {{}, {bold=true, foreground=NonText}} )
--
-- To help write screen tests, see Screen:snapshot_util().
-- To debug screen tests, see Screen:redraw_debug().
@@ -169,7 +168,6 @@ function Screen.new(width, height)
ruler = {},
hl_groups = {},
_default_attr_ids = nil,
- _default_attr_ignore = nil,
_mouse_enabled = true,
_attrs = {},
_hl_info = {[0]={}},
@@ -202,10 +200,6 @@ function Screen:get_default_attr_ids()
return deepcopy(self._default_attr_ids)
end
-function Screen:set_default_attr_ignore(attr_ignore)
- self._default_attr_ignore = attr_ignore
-end
-
function Screen:set_rgb_cterm(val)
self._rgb_cterm = val
end
@@ -361,7 +355,7 @@ function Screen:expect(expected, attr_ids, attr_ignore, ...)
end
local attr_state = {
ids = attr_ids or self._default_attr_ids,
- ignore = attr_ignore or self._default_attr_ignore,
+ ignore = attr_ignore
}
if self._options.ext_linegrid then
attr_state.id_to_index = self:linegrid_check_attrs(attr_state.ids or {})
@@ -1478,6 +1472,8 @@ function Screen:_get_attr_id(attr_state, attrs, hl_id)
return nil
elseif id ~= nil then
return id
+ elseif attr_state.ignore == true then
+ return nil
end
if attr_state.mutable then
id = self:_insert_hl_id(attr_state, hl_id)