From 9530c2d6d82dbae1303e15608c56f4fefad312a9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 26 Mar 2022 08:52:54 +0800 Subject: vim-patch:8.2.4626: Visual area not updated when removing sign in Visual mode (#17864) Problem: Visual area not fully updated when removing sign in Visual mode while scrolling. Solution: Adjust check for topline. (closes vim/vim#10017) https://github.com/vim/vim/commit/abb6fbd14d985b9b36a4e336d6edaf9853888ac1 --- test/functional/legacy/display_spec.lua | 36 ++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'test/functional/legacy/display_spec.lua') diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 3fbbe96947..59ba170e33 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -3,15 +3,15 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear = helpers.clear local poke_eventloop = helpers.poke_eventloop +local exec = helpers.exec local feed = helpers.feed local feed_command = helpers.feed_command describe('display', function() - local screen + before_each(clear) it('scroll when modified at topline', function() - clear() - screen = Screen.new(20, 4) + local screen = Screen.new(20, 4) screen:attach() screen:set_default_attr_ids({ [1] = {bold = true}, @@ -27,5 +27,35 @@ describe('display', function() {1:-- INSERT --} | ]]) end) + + it('scrolling when modified at topline in Visual mode', function() + local screen = Screen.new(60, 8) + screen:attach() + screen:set_default_attr_ids({ + [1] = {bold = true}, -- ModeMsg + [2] = {background = Screen.colors.LightGrey}, -- Visual + [3] = {background = Screen.colors.Grey, foreground = Screen.colors.DarkBlue}, -- SignColumn + }) + + exec([[ + set scrolloff=0 + call setline(1, repeat(['foo'], 10)) + call sign_define('foo', { 'text': '>' }) + call sign_place(1, 'bar', 'foo', bufnr(), { 'lnum': 2 }) + call sign_place(2, 'bar', 'foo', bufnr(), { 'lnum': 1 }) + autocmd CursorMoved * if getcurpos()[1] == 2 | call sign_unplace('bar', { 'id': 1 }) | endif + ]]) + feed('VG7kk') + screen:expect([[ + {3: }^f{2:oo} | + {3: }foo | + {3: }foo | + {3: }foo | + {3: }foo | + {3: }foo | + {3: }foo | + {1:-- VISUAL LINE --} | + ]]) + end) end) -- cgit From 2a2c4e191f5c2cb70bafaa213b5697308dc6f850 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 10 Apr 2022 04:50:49 +0800 Subject: vim-patch:8.2.4718: @@@ in the last line sometimes drawn in the wrong place (#18055) Problem: @@@ in the last line sometimes drawn in the wrong place. Solution: Make sure the column is valid. (closes vim/vim#10130) https://github.com/vim/vim/commit/cee9c844f27bceaba90362a3fa27a04d4d06c0fd --- test/functional/legacy/display_spec.lua | 56 ++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 7 deletions(-) (limited to 'test/functional/legacy/display_spec.lua') diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 59ba170e33..4c7915403c 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -2,23 +2,21 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear = helpers.clear -local poke_eventloop = helpers.poke_eventloop local exec = helpers.exec local feed = helpers.feed -local feed_command = helpers.feed_command +local command = helpers.command describe('display', function() before_each(clear) - it('scroll when modified at topline', function() + it('scroll when modified at topline vim-patch:8.2.1488', function() local screen = Screen.new(20, 4) screen:attach() screen:set_default_attr_ids({ [1] = {bold = true}, }) - feed_command([[call setline(1, repeat('a', 21))]]) - poke_eventloop() + command([[call setline(1, repeat('a', 21))]]) feed('O') screen:expect([[ ^ | @@ -28,7 +26,7 @@ describe('display', function() ]]) end) - it('scrolling when modified at topline in Visual mode', function() + it('scrolling when modified at topline in Visual mode vim-patch:8.2.4626', function() local screen = Screen.new(60, 8) screen:attach() screen:set_default_attr_ids({ @@ -57,5 +55,49 @@ describe('display', function() {1:-- VISUAL LINE --} | ]]) end) -end) + it('@@@ in the last line shows correctly in a narrow window vim-patch:8.2.4718', function() + local screen = Screen.new(60, 10) + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [2] = {bold = true, reverse = true}, -- StatusLine + [3] = {reverse = true}, -- VertSplit, StatusLineNC + }) + screen:attach() + exec([[ + call setline(1, ['aaa', 'b'->repeat(100)]) + set display=truncate + vsplit + 100wincmd < + ]]) + screen:expect([[ + ^a{3:│}aaa | + a{3:│}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + a{3:│}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | + b{3:│}{1:~ }| + b{3:│}{1:~ }| + b{3:│}{1:~ }| + b{3:│}{1:~ }| + {1:@}{3:│}{1:~ }| + {2:< }{3:[No Name] [+] }| + | + ]]) + command('set display=lastline') + screen:expect_unchanged() + command('100wincmd >') + screen:expect([[ + ^aaa {3:│}a| + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb{3:│}a| + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb {3:│}a| + {1:~ }{3:│}b| + {1:~ }{3:│}b| + {1:~ }{3:│}b| + {1:~ }{3:│}b| + {1:~ }{3:│}{1:@}| + {2:[No Name] [+] }{3:<}| + | + ]]) + command('set display=truncate') + screen:expect_unchanged() + end) +end) -- cgit From bbf58e6bbcc107e92d84730a33bd5a32440f5428 Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Sun, 15 May 2022 22:34:44 +0600 Subject: refactor(ui)!: link `VertSplit` to `Normal` by default Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default. --- test/functional/legacy/display_spec.lua | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'test/functional/legacy/display_spec.lua') diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 4c7915403c..ccc709cbf6 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -71,14 +71,14 @@ describe('display', function() 100wincmd < ]]) screen:expect([[ - ^a{3:│}aaa | - a{3:│}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| - a{3:│}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | - b{3:│}{1:~ }| - b{3:│}{1:~ }| - b{3:│}{1:~ }| - b{3:│}{1:~ }| - {1:@}{3:│}{1:~ }| + ^a│aaa | + a│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb| + a│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | + b│{1:~ }| + b│{1:~ }| + b│{1:~ }| + b│{1:~ }| + {1:@}│{1:~ }| {2:< }{3:[No Name] [+] }| | ]]) @@ -86,14 +86,14 @@ describe('display', function() screen:expect_unchanged() command('100wincmd >') screen:expect([[ - ^aaa {3:│}a| - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb{3:│}a| - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb {3:│}a| - {1:~ }{3:│}b| - {1:~ }{3:│}b| - {1:~ }{3:│}b| - {1:~ }{3:│}b| - {1:~ }{3:│}{1:@}| + ^aaa │a| + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│a| + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb │a| + {1:~ }│b| + {1:~ }│b| + {1:~ }│b| + {1:~ }│b| + {1:~ }│{1:@}| {2:[No Name] [+] }{3:<}| | ]]) -- cgit From ff20d40321399fa187bd350f9619cf6418d7eb6e Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 4 Jun 2022 05:56:36 +0200 Subject: docs: fix typos (#18269) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: zeertzjq Co-authored-by: Dan Sully Co-authored-by: saher Co-authored-by: Stephan Seitz Co-authored-by: Benedikt Müller Co-authored-by: Andrey Mishchenko Co-authored-by: Famiu Haque Co-authored-by: Oliver Marriott --- test/functional/legacy/display_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/legacy/display_spec.lua') diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index ccc709cbf6..f0ffaf2c48 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -61,7 +61,7 @@ describe('display', function() screen:set_default_attr_ids({ [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText [2] = {bold = true, reverse = true}, -- StatusLine - [3] = {reverse = true}, -- VertSplit, StatusLineNC + [3] = {reverse = true}, -- StatusLineNC }) screen:attach() exec([[ -- cgit