@@ -797,18 +797,73 @@ func Test_breakindent20_list()
797797 \ ]
798798 let lines = s: screen_lines2 (1 , 9 , 20 )
799799 call s: compare_lines (expect, lines )
800+
801+ " check with TABs
802+ call setline (1 , [" \t 1.\t Congress shall make no law" ,
803+ \ " \t 2.) Congress shall make no law" ,
804+ \ " \t 3.] Congress shall make no law" ])
805+ setl tabstop = 4 list listchars = tab :<->
806+ norm! 1 gg
807+ redraw !
808+ let expect = [
809+ \ " <-->1.<>Congress " ,
810+ \ " shall make " ,
811+ \ " no law " ,
812+ \ " <-->2.) Congress " ,
813+ \ " shall make " ,
814+ \ " no law " ,
815+ \ " <-->3.] Congress " ,
816+ \ " shall make " ,
817+ \ " no law " ,
818+ \ ]
819+ let lines = s: screen_lines2 (1 , 9 , 20 )
820+ call s: compare_lines (expect, lines )
821+
822+ setl tabstop = 2 nolist
823+ redraw !
824+ let expect = [
825+ \ " 1. Congress " ,
826+ \ " shall make no " ,
827+ \ " law " ,
828+ \ " 2.) Congress " ,
829+ \ " shall make no " ,
830+ \ " law " ,
831+ \ " 3.] Congress " ,
832+ \ " shall make no " ,
833+ \ " law " ,
834+ \ ]
835+ let lines = s: screen_lines2 (1 , 9 , 20 )
836+ call s: compare_lines (expect, lines )
837+
838+ setl tabstop & list listchars = space:_
839+ redraw !
840+ let expect = [
841+ \ " ^I1.^ICongress_ " ,
842+ \ " shall_make_no_" ,
843+ \ " law " ,
844+ \ " ^I2.)_Congress_ " ,
845+ \ " shall_make_no_" ,
846+ \ " law " ,
847+ \ " ^I3.]_Congress_ " ,
848+ \ " shall_make_no_" ,
849+ \ " law " ,
850+ \ ]
851+ let lines = s: screen_lines2 (1 , 9 , 20 )
852+ call s: compare_lines (expect, lines )
853+
800854 " check formatlistpat indent with different list levels
801- let &l: flp = ' ^\s*\*\+\s\+'
855+ let &l: flp = ' ^\s*\(\*\|•\)\+\s\+'
856+ setl list &vim listchars &vim
802857 % delete _
803858 call setline (1 , [' * Congress shall make no law' ,
804- \ ' *** Congress shall make no law' ,
859+ \ ' ••• Congress shall make no law' ,
805860 \ ' **** Congress shall make no law' ])
806861 norm! 1 gg
807862 redraw !
808863 let expect = [
809864 \ " * Congress shall " ,
810865 \ " make no law " ,
811- \ " *** Congress shall " ,
866+ \ " ••• Congress shall " ,
812867 \ " make no law " ,
813868 \ " **** Congress shall " ,
814869 \ " make no law " ,
@@ -824,7 +879,7 @@ func Test_breakindent20_list()
824879 let expect = [
825880 \ " * Congress shall " ,
826881 \ " > make no law " ,
827- \ " *** Congress shall " ,
882+ \ " ••• Congress shall " ,
828883 \ " > make no law " ,
829884 \ " **** Congress shall " ,
830885 \ " > make no law " ,
@@ -840,7 +895,7 @@ func Test_breakindent20_list()
840895 let expect = [
841896 \ " * Congress shall " ,
842897 \ " > make no law " ,
843- \ " *** Congress shall " ,
898+ \ " ••• Congress shall " ,
844899 \ " > make no law " ,
845900 \ " **** Congress shall " ,
846901 \ " > make no law " ,
0 commit comments