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