comparison src/testdir/test_breakindent.vim @ 20423:8c98c74176ac v8.2.0766

patch 8.2.0766: display error when using 'number' and 'breakindent' Commit: https://github.com/vim/vim/commit/e882f7a73c8fa48707de71035eb0a7ccc6ac8548 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 16 14:07:39 2020 +0200 patch 8.2.0766: display error when using 'number' and 'breakindent' Problem: Display error when using 'number' and 'breakindent'. Solution: Adjust extra spaces in the first row. (Ken Takata, closes https://github.com/vim/vim/issues/6089, closes #5986)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 May 2020 14:15:06 +0200
parents 546bdeef35f1
children 08940efa6b4e
comparison
equal deleted inserted replaced
20422:01fc745921c6 20423:8c98c74176ac
694 \ ] 694 \ ]
695 call s:compare_lines(expect, lines) 695 call s:compare_lines(expect, lines)
696 call s:close_windows('set breakindent& briopt& sbr&') 696 call s:close_windows('set breakindent& briopt& sbr&')
697 endfunc 697 endfunc
698 698
699 func Test_breakindent20_cpo_n_nextpage()
700 let s:input = ""
701 call s:test_windows('setl breakindent briopt=min:14 cpo+=n number')
702 call setline(1, repeat('a', 200))
703 norm! 1gg
704 redraw!
705 let lines = s:screen_lines(1, 20)
706 let expect = [
707 \ " 1 aaaaaaaaaaaaaaaa",
708 \ " aaaaaaaaaaaaaaaa",
709 \ " aaaaaaaaaaaaaaaa",
710 \ ]
711 call s:compare_lines(expect, lines)
712 " Scroll down one screen line
713 setl scrolloff=5
714 norm! 5gj
715 redraw!
716 let lines = s:screen_lines(1, 20)
717 let expect = [
718 \ "--1 aaaaaaaaaaaaaaaa",
719 \ " aaaaaaaaaaaaaaaa",
720 \ " aaaaaaaaaaaaaaaa",
721 \ ]
722 call s:compare_lines(expect, lines)
723
724 setl briopt+=shift:2
725 norm! 1gg
726 let lines = s:screen_lines(1, 20)
727 let expect = [
728 \ " 1 aaaaaaaaaaaaaaaa",
729 \ " aaaaaaaaaaaaaa",
730 \ " aaaaaaaaaaaaaa",
731 \ ]
732 call s:compare_lines(expect, lines)
733 " Scroll down one screen line
734 norm! 5gj
735 let lines = s:screen_lines(1, 20)
736 let expect = [
737 \ "--1 aaaaaaaaaaaaaa",
738 \ " aaaaaaaaaaaaaa",
739 \ " aaaaaaaaaaaaaa",
740 \ ]
741 call s:compare_lines(expect, lines)
742
743 call s:close_windows('set breakindent& briopt& cpo& number&')
744 endfunc
745
699 " vim: shiftwidth=2 sts=2 expandtab 746 " vim: shiftwidth=2 sts=2 expandtab