|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.370
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.370
|
|
|
22c937 |
Problem: Linebreak test fails when encoding is not utf-8. (Danek Duvall)
|
|
|
22c937 |
Solution: Split the test in a single byte one and a utf-8 one. (Christian
|
|
|
22c937 |
Brabandt)
|
|
|
22c937 |
Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
|
|
|
22c937 |
src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
|
|
|
22c937 |
src/testdir/Make_vms.mms, src/testdir/Makefile,
|
|
|
22c937 |
src/testdir/test_listlbr.in, src/testdir/test_listlbr.ok,
|
|
|
22c937 |
src/testdir/test_listlbr_utf8.in, src/testdir/test_listlbr_utf8.ok
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/Make_amiga.mak 2014-07-02 19:59:35.454375136 +0200
|
|
|
22c937 |
--- src/testdir/Make_amiga.mak 2014-07-16 16:55:15.311578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 39,44 ****
|
|
|
22c937 |
--- 39,45 ----
|
|
|
22c937 |
test_autoformat_join.out \
|
|
|
22c937 |
test_breakindent.out \
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
+ test_listlbr_utf8.out \
|
|
|
22c937 |
test_eval.out \
|
|
|
22c937 |
test_options.out
|
|
|
22c937 |
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 167,171 ****
|
|
|
22c937 |
--- 168,173 ----
|
|
|
22c937 |
test_autoformat_join.out: test_autoformat_join.in
|
|
|
22c937 |
test_breakindent.out: test_breakindent.in
|
|
|
22c937 |
test_listlbr.out: test_listlbr.in
|
|
|
22c937 |
+ test_listlbr_utf8.out: test_listlbr_utf8.in
|
|
|
22c937 |
test_eval.out: test_eval.in
|
|
|
22c937 |
test_options.out: test_options.in
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/Make_dos.mak 2014-07-16 14:20:38.255766903 +0200
|
|
|
22c937 |
--- src/testdir/Make_dos.mak 2014-07-16 16:56:02.423577394 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 38,43 ****
|
|
|
22c937 |
--- 38,44 ----
|
|
|
22c937 |
test_autoformat_join.out \
|
|
|
22c937 |
test_breakindent.out \
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
+ test_listlbr_utf8.out \
|
|
|
22c937 |
test_eval.out \
|
|
|
22c937 |
test_options.out
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/Make_ming.mak 2014-07-02 19:59:35.454375136 +0200
|
|
|
22c937 |
--- src/testdir/Make_ming.mak 2014-07-16 16:55:15.311578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 58,63 ****
|
|
|
22c937 |
--- 58,64 ----
|
|
|
22c937 |
test_autoformat_join.out \
|
|
|
22c937 |
test_breakindent.out \
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
+ test_listlbr_utf8.out \
|
|
|
22c937 |
test_eval.out \
|
|
|
22c937 |
test_options.out
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/Make_os2.mak 2014-07-02 19:59:35.454375136 +0200
|
|
|
22c937 |
--- src/testdir/Make_os2.mak 2014-07-16 16:55:15.311578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 40,45 ****
|
|
|
22c937 |
--- 40,46 ----
|
|
|
22c937 |
test_autoformat_join.out \
|
|
|
22c937 |
test_eval.out \
|
|
|
22c937 |
test_breakindent.out \
|
|
|
22c937 |
+ test_listlbr_utf8.out \
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
test_options.out
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/Make_vms.mms 2014-07-02 19:59:35.454375136 +0200
|
|
|
22c937 |
--- src/testdir/Make_vms.mms 2014-07-16 16:55:15.311578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 99,104 ****
|
|
|
22c937 |
--- 99,105 ----
|
|
|
22c937 |
test_autoformat_join.out \
|
|
|
22c937 |
test_breakindent.out \
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
+ test_listlbr_utf8.out \
|
|
|
22c937 |
test_eval.out \
|
|
|
22c937 |
test_options.out
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/Makefile 2014-07-02 19:59:35.454375136 +0200
|
|
|
22c937 |
--- src/testdir/Makefile 2014-07-16 16:55:15.311578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 36,41 ****
|
|
|
22c937 |
--- 36,42 ----
|
|
|
22c937 |
test_autoformat_join.out \
|
|
|
22c937 |
test_breakindent.out \
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
+ test_listlbr_utf8.out \
|
|
|
22c937 |
test_eval.out \
|
|
|
22c937 |
test_options.out
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/test_listlbr.in 2014-07-02 19:59:35.454375136 +0200
|
|
|
22c937 |
--- src/testdir/test_listlbr.in 2014-07-16 16:55:15.311578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1,10 ****
|
|
|
22c937 |
! Test for linebreak and list option
|
|
|
22c937 |
|
|
|
22c937 |
STARTTEST
|
|
|
22c937 |
:so small.vim
|
|
|
22c937 |
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
|
|
|
22c937 |
:10new|:vsp|:vert resize 20
|
|
|
22c937 |
! :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
|
|
|
22c937 |
:norm! zt
|
|
|
22c937 |
:set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
|
|
|
22c937 |
:fu! ScreenChar(width)
|
|
|
22c937 |
--- 1,10 ----
|
|
|
22c937 |
! Test for linebreak and list option (non-utf8)
|
|
|
22c937 |
|
|
|
22c937 |
STARTTEST
|
|
|
22c937 |
:so small.vim
|
|
|
22c937 |
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
|
|
|
22c937 |
:10new|:vsp|:vert resize 20
|
|
|
22c937 |
! :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
|
|
|
22c937 |
:norm! zt
|
|
|
22c937 |
:set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
|
|
|
22c937 |
:fu! ScreenChar(width)
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 32,53 ****
|
|
|
22c937 |
:redraw!
|
|
|
22c937 |
:let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
:call DoRecordScreen()
|
|
|
22c937 |
! :let g:test ="Test 3: set linebreak + set list + fancy listchars"
|
|
|
22c937 |
! :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
|
|
|
22c937 |
! :redraw!
|
|
|
22c937 |
! :let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
! :call DoRecordScreen()
|
|
|
22c937 |
! :let g:test ="Test 4: set linebreak nolist"
|
|
|
22c937 |
:set nolist linebreak
|
|
|
22c937 |
:redraw!
|
|
|
22c937 |
:let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
:call DoRecordScreen()
|
|
|
22c937 |
! :let g:test ="Test 5: set nolinebreak list"
|
|
|
22c937 |
! :set list nolinebreak
|
|
|
22c937 |
! :redraw!
|
|
|
22c937 |
! :let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
! :call DoRecordScreen()
|
|
|
22c937 |
! :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!"
|
|
|
22c937 |
:set nolist linebreak ts=8
|
|
|
22c937 |
:let line="1\t".repeat('a', winwidth(0)-2)
|
|
|
22c937 |
:$put =line
|
|
|
22c937 |
--- 32,43 ----
|
|
|
22c937 |
:redraw!
|
|
|
22c937 |
:let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
:call DoRecordScreen()
|
|
|
22c937 |
! :let g:test ="Test 3: set linebreak nolist"
|
|
|
22c937 |
:set nolist linebreak
|
|
|
22c937 |
:redraw!
|
|
|
22c937 |
:let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
:call DoRecordScreen()
|
|
|
22c937 |
! :let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!"
|
|
|
22c937 |
:set nolist linebreak ts=8
|
|
|
22c937 |
:let line="1\t".repeat('a', winwidth(0)-2)
|
|
|
22c937 |
:$put =line
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/test_listlbr.ok 2014-07-02 19:59:35.454375136 +0200
|
|
|
22c937 |
--- src/testdir/test_listlbr.ok 2014-07-16 16:55:15.315578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1,38 ****
|
|
|
22c937 |
|
|
|
22c937 |
! abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
|
|
|
22c937 |
|
|
|
22c937 |
Test 1: set linebreak
|
|
|
22c937 |
abcdef
|
|
|
22c937 |
+hijklmn
|
|
|
22c937 |
! +pqrstuvwxyz 1060ABC
|
|
|
22c937 |
+DEFGHIJKLMNOP
|
|
|
22c937 |
|
|
|
22c937 |
Test 2: set linebreak + set list
|
|
|
22c937 |
^Iabcdef hijklmn^I
|
|
|
22c937 |
! +pqrstuvwxyz 1060ABC
|
|
|
22c937 |
+DEFGHIJKLMNOP
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
! Test 3: set linebreak + set list + fancy listchars
|
|
|
22c937 |
! ▕———abcdef
|
|
|
22c937 |
! +hijklmn▕———
|
|
|
22c937 |
! +pqrstuvwxyz␣1060ABC
|
|
|
22c937 |
! +DEFGHIJKLMNOPˑ¶
|
|
|
22c937 |
!
|
|
|
22c937 |
! Test 4: set linebreak nolist
|
|
|
22c937 |
abcdef
|
|
|
22c937 |
+hijklmn
|
|
|
22c937 |
! +pqrstuvwxyz 1060ABC
|
|
|
22c937 |
+DEFGHIJKLMNOP
|
|
|
22c937 |
-
|
|
|
22c937 |
- Test 5: set nolinebreak list
|
|
|
22c937 |
- ▕———abcdef hijklmn▕—
|
|
|
22c937 |
- +pqrstuvwxyz␣1060ABC
|
|
|
22c937 |
- +DEFGHIJKLMNOPˑ¶
|
|
|
22c937 |
- ¶
|
|
|
22c937 |
1 aaaaaaaaaaaaaaaaaa
|
|
|
22c937 |
|
|
|
22c937 |
! Test 6: set linebreak with tab and 1 line as long as screen: should break!
|
|
|
22c937 |
1
|
|
|
22c937 |
+aaaaaaaaaaaaaaaaaa
|
|
|
22c937 |
~
|
|
|
22c937 |
--- 1,26 ----
|
|
|
22c937 |
|
|
|
22c937 |
! abcdef hijklmn pqrstuvwxyz_1060ABCDEFGHIJKLMNOP
|
|
|
22c937 |
|
|
|
22c937 |
Test 1: set linebreak
|
|
|
22c937 |
abcdef
|
|
|
22c937 |
+hijklmn
|
|
|
22c937 |
! +pqrstuvwxyz_1060ABC
|
|
|
22c937 |
+DEFGHIJKLMNOP
|
|
|
22c937 |
|
|
|
22c937 |
Test 2: set linebreak + set list
|
|
|
22c937 |
^Iabcdef hijklmn^I
|
|
|
22c937 |
! +pqrstuvwxyz_1060ABC
|
|
|
22c937 |
+DEFGHIJKLMNOP
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
! Test 3: set linebreak nolist
|
|
|
22c937 |
abcdef
|
|
|
22c937 |
+hijklmn
|
|
|
22c937 |
! +pqrstuvwxyz_1060ABC
|
|
|
22c937 |
+DEFGHIJKLMNOP
|
|
|
22c937 |
1 aaaaaaaaaaaaaaaaaa
|
|
|
22c937 |
|
|
|
22c937 |
! Test 4: set linebreak with tab and 1 line as long as screen: should break!
|
|
|
22c937 |
1
|
|
|
22c937 |
+aaaaaaaaaaaaaaaaaa
|
|
|
22c937 |
~
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.in 2014-07-16 17:01:25.415570829 +0200
|
|
|
22c937 |
--- src/testdir/test_listlbr_utf8.in 2014-07-16 16:55:15.315578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 0 ****
|
|
|
22c937 |
--- 1,41 ----
|
|
|
22c937 |
+ Test for linebreak and list option in utf-8 mode
|
|
|
22c937 |
+
|
|
|
22c937 |
+ STARTTEST
|
|
|
22c937 |
+ :so small.vim
|
|
|
22c937 |
+ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
|
|
|
22c937 |
+ :so mbyte.vim
|
|
|
22c937 |
+ :if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
|
|
|
22c937 |
+ :10new|:vsp|:vert resize 20
|
|
|
22c937 |
+ :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
|
|
|
22c937 |
+ :norm! zt
|
|
|
22c937 |
+ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
|
|
|
22c937 |
+ :fu! ScreenChar(width)
|
|
|
22c937 |
+ : let c=''
|
|
|
22c937 |
+ : for j in range(1,4)
|
|
|
22c937 |
+ : for i in range(1,a:width)
|
|
|
22c937 |
+ : let c.=nr2char(screenchar(j, i))
|
|
|
22c937 |
+ : endfor
|
|
|
22c937 |
+ : let c.="\n"
|
|
|
22c937 |
+ : endfor
|
|
|
22c937 |
+ : return c
|
|
|
22c937 |
+ :endfu
|
|
|
22c937 |
+ :fu! DoRecordScreen()
|
|
|
22c937 |
+ : wincmd l
|
|
|
22c937 |
+ : $put =printf(\"\n%s\", g:test)
|
|
|
22c937 |
+ : $put =g:line
|
|
|
22c937 |
+ : wincmd p
|
|
|
22c937 |
+ :endfu
|
|
|
22c937 |
+ :let g:test ="Test 1: set linebreak + set list + fancy listchars"
|
|
|
22c937 |
+ :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
|
|
|
22c937 |
+ :redraw!
|
|
|
22c937 |
+ :let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
+ :call DoRecordScreen()
|
|
|
22c937 |
+ :let g:test ="Test 2: set nolinebreak list"
|
|
|
22c937 |
+ :set list nolinebreak
|
|
|
22c937 |
+ :redraw!
|
|
|
22c937 |
+ :let line=ScreenChar(winwidth(0))
|
|
|
22c937 |
+ :call DoRecordScreen()
|
|
|
22c937 |
+ :%w! test.out
|
|
|
22c937 |
+ :qa!
|
|
|
22c937 |
+ ENDTEST
|
|
|
22c937 |
+ dummy text
|
|
|
22c937 |
*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.ok 2014-07-16 17:01:25.419570829 +0200
|
|
|
22c937 |
--- src/testdir/test_listlbr_utf8.ok 2014-07-16 16:55:15.315578352 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 0 ****
|
|
|
22c937 |
--- 1,14 ----
|
|
|
22c937 |
+
|
|
|
22c937 |
+ abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
|
|
|
22c937 |
+
|
|
|
22c937 |
+ Test 1: set linebreak + set list + fancy listchars
|
|
|
22c937 |
+ ▕———abcdef
|
|
|
22c937 |
+ +hijklmn▕———
|
|
|
22c937 |
+ +pqrstuvwxyz␣1060ABC
|
|
|
22c937 |
+ +DEFGHIJKLMNOPˑ¶
|
|
|
22c937 |
+
|
|
|
22c937 |
+ Test 2: set nolinebreak list
|
|
|
22c937 |
+ ▕———abcdef hijklmn▕—
|
|
|
22c937 |
+ +pqrstuvwxyz␣1060ABC
|
|
|
22c937 |
+ +DEFGHIJKLMNOPˑ¶
|
|
|
22c937 |
+ ¶
|
|
|
22c937 |
*** ../vim-7.4.369/src/version.c 2014-07-16 16:30:21.647608710 +0200
|
|
|
22c937 |
--- src/version.c 2014-07-16 16:56:38.755576656 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 736,737 ****
|
|
|
22c937 |
--- 736,739 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 370,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
Another bucket of what can only be described as human ordure hits ARTHUR.
|
|
|
22c937 |
ARTHUR: ... Right! (to the KNIGHTS) That settles it!
|
|
|
22c937 |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|