lkundrak / rpms / vim

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