summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-04 22:40:56 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-04 22:40:56 +0100
commit75008661821eee6989476908feaf64a9dea03e05 (patch)
tree8305766a531acf1012ff66d3efc618bb9a63b2a1 /src/testdir
parent18b3500b8c517e44c23197e558aa36aed1c6916c (diff)
patch 9.0.0662: concealed characters do not work correctlyv9.0.0662
Problem: Concealed characters do not work correctly. Solution: Subtract boguscols instead of adding them. (closes #11273)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/dumps/Test_conceal_linebreak_1.dump8
-rw-r--r--src/testdir/test_conceal.vim26
2 files changed, 34 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_conceal_linebreak_1.dump b/src/testdir/dumps/Test_conceal_linebreak_1.dump
new file mode 100644
index 0000000000..8c93df07d1
--- /dev/null
+++ b/src/testdir/dumps/Test_conceal_linebreak_1.dump
@@ -0,0 +1,8 @@
+>x+0&#ffffff0@74
+| @74
+|a@63| @10
+|++0#4040ff13&| |b+0#0000000&@66| @5
+|++0#4040ff13&| |c+0#0000000&@5| @66
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/src/testdir/test_conceal.vim b/src/testdir/test_conceal.vim
index c0a46dc6b7..385d42b544 100644
--- a/src/testdir/test_conceal.vim
+++ b/src/testdir/test_conceal.vim
@@ -159,6 +159,32 @@ func Test_conceal_resize_term()
call StopVimInTerminal(buf)
endfunc
+func Test_conceal_linebreak()
+ CheckScreendump
+
+ let code =<< trim [CODE]
+ vim9script
+ &wrap = true
+ &conceallevel = 2
+ &concealcursor = 'nc'
+ &linebreak = true
+ &showbreak = '+ '
+ var line: string = 'a`a`a`a`'
+ .. 'a'->repeat(&columns - 15)
+ .. ' b`b`'
+ .. 'b'->repeat(&columns - 10)
+ .. ' cccccc'
+ ['x'->repeat(&columns), '', line]->setline(1)
+ syntax region CodeSpan matchgroup=Delimiter start=/\z(`\+\)/ end=/\z1/ concealends
+ [CODE]
+ call writefile(code, 'XTest_conceal_linebreak', 'D')
+ let buf = RunVimInTerminal('-S XTest_conceal_linebreak', {'rows': 8})
+ call VerifyScreenDump(buf, 'Test_conceal_linebreak_1', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
" Tests for correct display (cursor column position) with +conceal and
" tabulators. Need to run this test in a separate Vim instance. Otherwise the
" screen is not updated (lazy redraw) and the cursor position is wrong.