From 209b5ed6ba76fe28c5ec7e1c7b38f77c1fa53250 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 12 Dec 2014 16:05:52 -0300 Subject: test: Fix eol_clear in screen.lua It should only clear to the end of the current scroll region(this is the behavior expected by nvim) --- test/functional/ui/screen.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 8e7d1ed798..7917fff1e7 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -190,7 +190,7 @@ end function Screen:_handle_eol_clear() local row, col = self._cursor.row, self._cursor.col - self:_clear_block(row, 1, col, self._width - col) + self:_clear_block(row, 1, col, self._scroll_region.right - col) end function Screen:_handle_cursor_goto(row, col) -- cgit From 4f5f246a958e66e04a5d62b3bf0d8986afb51c09 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 12 Dec 2014 16:25:11 -0300 Subject: ui: Add update_fg/update_bg methods It is necessary to notify the UI when the default background/foreground colors change in order to render correctly. --- test/functional/ui/screen.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 7917fff1e7..c9c9d5a197 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -278,6 +278,14 @@ function Screen:_handle_visual_bell() self._visual_bell = true end +function Screen:_handle_update_fg(fg) + self._fg = fg +end + +function Screen:_handle_update_bg(bg) + self._bg = bg +end + function Screen:_handle_suspend() self._suspended = true end -- cgit From 213c3c3e53459a77c77166cda85ba619e7eb2eb1 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sat, 13 Dec 2014 12:58:06 -0300 Subject: ui: Fix ui resizing and change some method names --- test/functional/ui/screen.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index c9c9d5a197..a965b3626a 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -115,12 +115,12 @@ function Screen:set_default_attr_ids(attr_ids) end function Screen:attach() - request('attach_ui', self._width, self._height) + request('ui_attach', self._width, self._height) self._suspended = false end function Screen:detach() - request('detach_ui') + request('ui_detach') self._suspended = true end -- cgit From d50d79831e148d08406425a7bd672ccb55e2591b Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sun, 14 Dec 2014 09:17:19 -0300 Subject: test: Remove unnecessary command from highlight_spec --- test/functional/ui/highlight_spec.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'test') diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index 3c55c09f95..9ab86f401f 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -142,7 +142,6 @@ describe('Default highlight groups', function() end) it('end of file markers', function() - nvim('command', 'hi Normal guibg=black') screen:expect([[ ^ | {1:~ }| -- cgit From 0219c87534ff0770b95925529f8e89a2b6c34b14 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sun, 14 Dec 2014 09:20:07 -0300 Subject: input: Ignore invalid "<" key sequences Ignoring invalid key sequences simplifies input handling in UIs. The only downside is having to use "" everytime a "<" is needed on functional tests. --- test/functional/legacy/066_visual_block_tab_spec.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/functional/legacy/066_visual_block_tab_spec.lua b/test/functional/legacy/066_visual_block_tab_spec.lua index cd283e6746..82bb988c67 100644 --- a/test/functional/legacy/066_visual_block_tab_spec.lua +++ b/test/functional/legacy/066_visual_block_tab_spec.lua @@ -23,18 +23,18 @@ describe('visual block shift and tab characters', function() abcdefghijklmnopqrstuvwxyz]]) feed('gg') - feed([[fe4jRugvr1:'<,'>yank A]]) + feed([[fe4jRugvr1:','>yank A]]) execute('/^abcdefgh') - feed('4jI j<<11|D') + feed('4jI j11|D') feed('j7|a ') feed('j7|a ') - feed('j7|a 4k13|4j<') + feed('j7|a 4k13|4j') execute('$-5,$yank A') execute([[$-4,$s/\s\+//g]]) - feed('4kI j<<') + feed('4kI j') feed('j7|a ') feed('j7|a ') - feed('j7|a 4k13|4j3<') + feed('j7|a 4k13|4j3') execute('$-4,$yank A') -- Put @a and clean empty lines -- cgit From 74c247f75baec5778296adf164831c5ffea0fb88 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 8 Jan 2015 11:23:45 -0300 Subject: ui: Add 'rgb' parameter to ui_attach When set to false, nvim will send cterm color numbers with `highlight_set`. --- test/functional/ui/screen.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index a965b3626a..04d89d8331 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -115,7 +115,7 @@ function Screen:set_default_attr_ids(attr_ids) end function Screen:attach() - request('ui_attach', self._width, self._height) + request('ui_attach', self._width, self._height, true) self._suspended = false end -- cgit From d992213678ecd14902ae74ff765e682fb76d5ad9 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 9 Jan 2015 09:51:11 -0300 Subject: ui: Reimplement `:suspend` command for remote UIs. - Remove suspend method from the UI protocol - Handle `:suspend` by disconnecting the last channel that sent a request to nvim. --- test/functional/ui/screen.lua | 7 ------- 1 file changed, 7 deletions(-) (limited to 'test') diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 04d89d8331..5d139b367f 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -99,7 +99,6 @@ function Screen.new(width, height) _mouse_enabled = true, _bell = false, _visual_bell = false, - _suspended = true, _attrs = {}, _cursor = { enabled = true, row = 1, col = 1 @@ -116,12 +115,10 @@ end function Screen:attach() request('ui_attach', self._width, self._height, true) - self._suspended = false end function Screen:detach() request('ui_detach') - self._suspended = true end function Screen:expect(expected, attr_ids) @@ -286,10 +283,6 @@ function Screen:_handle_update_bg(bg) self._bg = bg end -function Screen:_handle_suspend() - self._suspended = true -end - function Screen:_clear_block(top, lines, left, columns) for i = top, top + lines - 1 do self:_clear_row_section(i, left, left + columns - 1) -- cgit