jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.416

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