From 5600766b41276686a4ca9c36d5e746160b3d0923 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 20 Apr 2022 21:54:31 +0800 Subject: vim-patch:8.2.4795: 'cursorbind' scrolling depends on whether 'cursorline' is set Problem: 'cursorbind' scrolling depends on whether 'cursorline' is set. Solution: Always call validate_cursor(). (Christian Brabandt, closes vim/vim#10230, closes vim/vim#10014) https://github.com/vim/vim/commit/2c645e8b00641f504072f35e061b7392ed41f491 --- test/functional/options/cursorbind_spec.lua | 78 +++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 test/functional/options/cursorbind_spec.lua (limited to 'test/functional/options/cursorbind_spec.lua') diff --git a/test/functional/options/cursorbind_spec.lua b/test/functional/options/cursorbind_spec.lua new file mode 100644 index 0000000000..3e8545a065 --- /dev/null +++ b/test/functional/options/cursorbind_spec.lua @@ -0,0 +1,78 @@ +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear = helpers.clear +local command = helpers.command +local exec = helpers.exec +local feed = helpers.feed + +before_each(clear) + +describe("'cursorbind'", function() + it("behaves consistently whether 'cursorline' is set or not vim-patch:8.2.4795", function() + local screen = Screen.new(60, 8) + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [2] = {bold = true, reverse = true}, -- StatusLine + [3] = {reverse = true}, -- StatusLineNC, VertSplit + [4] = {background = Screen.colors.Grey90}, -- CursorLine, CursorColumn + }) + screen:attach() + exec([[ + call setline(1, 'aa bb cc dd ee ff gg hh ii jj kk ll mm' .. + \ ' nn oo pp qq rr ss tt uu vv ww xx yy zz') + set nowrap + " The following makes the cursor apparent on the screen dump + set sidescroll=1 cursorcolumn + " add empty lines, required for cursorcolumn + call append(1, ['','','','']) + 20vsp + windo :set cursorbind + ]]) + feed('20l') + screen:expect([[ + a bb cc dd ee ff gg {3:│}aa bb cc dd ee ff gg^ hh ii jj kk ll mm | + {4: }{3:│} {4: } | + {4: }{3:│} {4: } | + {4: }{3:│} {4: } | + {4: }{3:│} {4: } | + {1:~ }{3:│}{1:~ }| + {3:[No Name] [+] }{2:[No Name] [+] }| + | + ]]) + feed('10l') + screen:expect([[ + hh ii jj kk ll mm n{3:│}aa bb cc dd ee ff gg hh ii jj ^kk ll mm | + {4: } {3:│} {4: } | + {4: } {3:│} {4: } | + {4: } {3:│} {4: } | + {4: } {3:│} {4: } | + {1:~ }{3:│}{1:~ }| + {3:[No Name] [+] }{2:[No Name] [+] }| + | + ]]) + command('windo :set cursorline') + feed('0') + feed('20l') + screen:expect([[ + {4:a bb cc dd ee ff gg }{3:│}{4:aa bb cc dd ee ff gg^ hh ii jj kk ll mm }| + {4: }{3:│} {4: } | + {4: }{3:│} {4: } | + {4: }{3:│} {4: } | + {4: }{3:│} {4: } | + {1:~ }{3:│}{1:~ }| + {3:[No Name] [+] }{2:[No Name] [+] }| + | + ]]) + feed('10l') + screen:expect([[ + {4: hh ii jj kk ll mm n}{3:│}{4:aa bb cc dd ee ff gg hh ii jj ^kk ll mm }| + {4: } {3:│} {4: } | + {4: } {3:│} {4: } | + {4: } {3:│} {4: } | + {4: } {3:│} {4: } | + {1:~ }{3:│}{1:~ }| + {3:[No Name] [+] }{2:[No Name] [+] }| + | + ]]) + end) +end) -- cgit From 94f12e8a5947a31a3fca07c8df75ab62fef7b1a3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 21 Apr 2022 06:08:50 +0800 Subject: vim-patch:8.2.4801: fix for cursorbind fix not fully tested Problem: Fix for cursorbind fix not fully tested. Solution: Add another test case. (Christian Brabandt, closes vim/vim#10240) https://github.com/vim/vim/commit/3fd7480cd25f1e939fc2362e0644d497bcc81b71 --- test/functional/options/cursorbind_spec.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/functional/options/cursorbind_spec.lua') diff --git a/test/functional/options/cursorbind_spec.lua b/test/functional/options/cursorbind_spec.lua index 3e8545a065..f762808dd6 100644 --- a/test/functional/options/cursorbind_spec.lua +++ b/test/functional/options/cursorbind_spec.lua @@ -74,5 +74,18 @@ describe("'cursorbind'", function() {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) + command('windo :set nocursorline nocursorcolumn') + feed('0') + feed('40l') + screen:expect([[ + kk ll mm nn oo pp qq{3:│} bb cc dd ee ff gg hh ii jj kk ll mm n^n| + {3:│} | + {3:│} | + {3:│} | + {3:│} | + {1:~ }{3:│}{1:~ }| + {3:[No Name] [+] }{2:[No Name] [+] }| + | + ]]) 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/options/cursorbind_spec.lua | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'test/functional/options/cursorbind_spec.lua') diff --git a/test/functional/options/cursorbind_spec.lua b/test/functional/options/cursorbind_spec.lua index f762808dd6..fcb753451c 100644 --- a/test/functional/options/cursorbind_spec.lua +++ b/test/functional/options/cursorbind_spec.lua @@ -30,23 +30,23 @@ describe("'cursorbind'", function() ]]) feed('20l') screen:expect([[ - a bb cc dd ee ff gg {3:│}aa bb cc dd ee ff gg^ hh ii jj kk ll mm | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {1:~ }{3:│}{1:~ }| + a bb cc dd ee ff gg │aa bb cc dd ee ff gg^ hh ii jj kk ll mm | + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) feed('10l') screen:expect([[ - hh ii jj kk ll mm n{3:│}aa bb cc dd ee ff gg hh ii jj ^kk ll mm | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {1:~ }{3:│}{1:~ }| + hh ii jj kk ll mm n│aa bb cc dd ee ff gg hh ii jj ^kk ll mm | + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -54,23 +54,23 @@ describe("'cursorbind'", function() feed('0') feed('20l') screen:expect([[ - {4:a bb cc dd ee ff gg }{3:│}{4:aa bb cc dd ee ff gg^ hh ii jj kk ll mm }| - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {4: }{3:│} {4: } | - {1:~ }{3:│}{1:~ }| + {4:a bb cc dd ee ff gg }│{4:aa bb cc dd ee ff gg^ hh ii jj kk ll mm }| + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {4: }│ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) feed('10l') screen:expect([[ - {4: hh ii jj kk ll mm n}{3:│}{4:aa bb cc dd ee ff gg hh ii jj ^kk ll mm }| - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {4: } {3:│} {4: } | - {1:~ }{3:│}{1:~ }| + {4: hh ii jj kk ll mm n}│{4:aa bb cc dd ee ff gg hh ii jj ^kk ll mm }| + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {4: } │ {4: } | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) @@ -78,12 +78,12 @@ describe("'cursorbind'", function() feed('0') feed('40l') screen:expect([[ - kk ll mm nn oo pp qq{3:│} bb cc dd ee ff gg hh ii jj kk ll mm n^n| - {3:│} | - {3:│} | - {3:│} | - {3:│} | - {1:~ }{3:│}{1:~ }| + kk ll mm nn oo pp qq│ bb cc dd ee ff gg hh ii jj kk ll mm n^n| + │ | + │ | + │ | + │ | + {1:~ }│{1:~ }| {3:[No Name] [+] }{2:[No Name] [+] }| | ]]) -- 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/options/cursorbind_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/options/cursorbind_spec.lua') diff --git a/test/functional/options/cursorbind_spec.lua b/test/functional/options/cursorbind_spec.lua index fcb753451c..1a03ed099a 100644 --- a/test/functional/options/cursorbind_spec.lua +++ b/test/functional/options/cursorbind_spec.lua @@ -13,7 +13,7 @@ describe("'cursorbind'", function() screen:set_default_attr_ids({ [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText [2] = {bold = true, reverse = true}, -- StatusLine - [3] = {reverse = true}, -- StatusLineNC, VertSplit + [3] = {reverse = true}, -- StatusLineNC [4] = {background = Screen.colors.Grey90}, -- CursorLine, CursorColumn }) screen:attach() -- cgit