comparison src/testdir/test_highlight.vim @ 32588:25f4c1d11344 v9.0.1626

patch 9.0.1626: Visual area not shown when using 'showbreak' Commit: https://github.com/vim/vim/commit/f578ca2c8f36b61ac3301fe8b59a8473c964cdc2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 10 19:40:30 2023 +0100 patch 9.0.1626: Visual area not shown when using 'showbreak' Problem: Visual area not shown when using 'showbreak' and start of line is not visible. (Jaehwang Jung) Solution: Adjust "fromcol" for the space taken by 'showbreak'. (closes #12514)
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Jun 2023 20:45:06 +0200
parents e7ab58f57ea3
children 448aef880252
comparison
equal deleted inserted replaced
32587:2ab810fbff1f 32588:25f4c1d11344
748 let buf = RunVimInTerminal('-S Xtest_colorcolumn_srb', {'rows': 10,'columns': 40}) 748 let buf = RunVimInTerminal('-S Xtest_colorcolumn_srb', {'rows': 10,'columns': 40})
749 call term_sendkeys(buf, ":set co=40 showbreak=+++>\\ cc=40,41,43\<CR>") 749 call term_sendkeys(buf, ":set co=40 showbreak=+++>\\ cc=40,41,43\<CR>")
750 call VerifyScreenDump(buf, 'Test_colorcolumn_3', {}) 750 call VerifyScreenDump(buf, 'Test_colorcolumn_3', {})
751 751
752 " clean up 752 " clean up
753 call StopVimInTerminal(buf)
754 endfunc
755
756 func Test_visual_sbr()
757 CheckScreendump
758
759 " check Visual highlight when 'showbreak' is set
760 let lines =<< trim END
761 set showbreak=>
762 call setline(1, 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.')
763 exe "normal! z1\<CR>"
764 END
765 call writefile(lines, 'Xtest_visual_sbr', 'D')
766 let buf = RunVimInTerminal('-S Xtest_visual_sbr', {'rows': 6,'columns': 60})
767
768 call term_sendkeys(buf, "v$")
769 call VerifyScreenDump(buf, 'Test_visual_sbr_1', {})
770
771 " clean up
772 call term_sendkeys(buf, "\<Esc>")
753 call StopVimInTerminal(buf) 773 call StopVimInTerminal(buf)
754 endfunc 774 endfunc
755 775
756 " This test must come before the Test_cursorline test, as it appears this 776 " This test must come before the Test_cursorline test, as it appears this
757 " defines the Normal highlighting group anyway. 777 " defines the Normal highlighting group anyway.