|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.416
|
|
|
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.416
|
|
|
22c937 |
Problem: Problem with breakindent/showbreak and tabs.
|
|
|
22c937 |
Solution: Handle tabs differently. (Christian Brabandt)
|
|
|
22c937 |
Files: src/testdir/test_breakindent.in, src/testdir/test_breakindent.ok,
|
|
|
22c937 |
src/charset.c
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.415/src/testdir/test_breakindent.in 2014-06-25 14:39:35.114348584 +0200
|
|
|
22c937 |
--- src/testdir/test_breakindent.in 2014-08-24 21:13:12.188584738 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 73,78 ****
|
|
|
22c937 |
--- 73,95 ----
|
|
|
22c937 |
:let width = strlen(text[1:])+indent(2)*4+strlen(&sbr)*3 " text wraps 3 times
|
|
|
22c937 |
:$put =g:test
|
|
|
22c937 |
:$put =printf(\"strdisplaywidth: %d == calculated: %d\", strdisplaywidth(text), width)
|
|
|
22c937 |
+ :"
|
|
|
22c937 |
+ :" Test, that the string " a\tb\tc\td\te" is correctly
|
|
|
22c937 |
+ :" displayed in a 20 column wide window (see bug report
|
|
|
22c937 |
+ :" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ
|
|
|
22c937 |
+ :only
|
|
|
22c937 |
+ :vert 20new
|
|
|
22c937 |
+ :set all& nocp breakindent briopt=min:10
|
|
|
22c937 |
+ :call setline(1, [" a\tb\tc\td\te", " z y x w v"])
|
|
|
22c937 |
+ :/^\s*a
|
|
|
22c937 |
+ fbgjyl:let line1 = @0
|
|
|
22c937 |
+ :?^\s*z
|
|
|
22c937 |
+ fygjyl:let line2 = @0
|
|
|
22c937 |
+ :quit!
|
|
|
22c937 |
+ :$put ='Test 12: breakindent with wrapping Tab'
|
|
|
22c937 |
+ :$put =line1
|
|
|
22c937 |
+ :$put =line2
|
|
|
22c937 |
+ :"
|
|
|
22c937 |
:%w! test.out
|
|
|
22c937 |
:qa!
|
|
|
22c937 |
ENDTEST
|
|
|
22c937 |
*** ../vim-7.4.415/src/testdir/test_breakindent.ok 2014-06-25 14:39:35.114348584 +0200
|
|
|
22c937 |
--- src/testdir/test_breakindent.ok 2014-08-24 21:13:36.228583867 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 53,55 ****
|
|
|
22c937 |
--- 53,58 ----
|
|
|
22c937 |
|
|
|
22c937 |
Test 11: strdisplaywidth when breakindent is on
|
|
|
22c937 |
strdisplaywidth: 46 == calculated: 64
|
|
|
22c937 |
+ Test 12: breakindent with wrapping Tab
|
|
|
22c937 |
+ d
|
|
|
22c937 |
+ w
|
|
|
22c937 |
*** ../vim-7.4.415/src/charset.c 2014-07-16 23:39:50.247084976 +0200
|
|
|
22c937 |
--- src/charset.c 2014-08-24 21:14:46.340581324 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 1195,1204 ****
|
|
|
22c937 |
if (wp->w_p_bri)
|
|
|
22c937 |
added += get_breakindent_win(wp, line);
|
|
|
22c937 |
|
|
|
22c937 |
! if (tab_corr)
|
|
|
22c937 |
! size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts;
|
|
|
22c937 |
! else
|
|
|
22c937 |
! size += added;
|
|
|
22c937 |
if (col != 0)
|
|
|
22c937 |
added = 0;
|
|
|
22c937 |
}
|
|
|
22c937 |
--- 1195,1201 ----
|
|
|
22c937 |
if (wp->w_p_bri)
|
|
|
22c937 |
added += get_breakindent_win(wp, line);
|
|
|
22c937 |
|
|
|
22c937 |
! size += added;
|
|
|
22c937 |
if (col != 0)
|
|
|
22c937 |
added = 0;
|
|
|
22c937 |
}
|
|
|
22c937 |
*** ../vim-7.4.415/src/version.c 2014-08-23 14:18:20.868620959 +0200
|
|
|
22c937 |
--- src/version.c 2014-08-24 18:06:08.860991777 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 743,744 ****
|
|
|
22c937 |
--- 743,746 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 416,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
hundred-and-one symptoms of being an internet addict:
|
|
|
22c937 |
57. You begin to wonder how on earth your service provider is allowed to call
|
|
|
22c937 |
200 hours per month "unlimited."
|
|
|
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 ///
|