Patch 7.4a.013
Problem:    Setting/resetting 'lbr' in the main help file changes alignment
            after a Tab. (Dimitar Dimitrov)
Solution:   Also use the code for conceal mode where n_extra is computed for
            'lbr'.
Files:      src/screen.c, src/testdir/test88.in, src/testdir/test88.ok


*** ../vim-7.4a.012/src/screen.c        2013-07-04 22:23:55.000000000 +0200
--- src/screen.c        2013-07-13 12:23:00.000000000 +0200
***************
*** 2997,3002 ****
--- 2997,3010 ----
      int               vcol_off        = 0;    /* offset for concealed 
characters */
      int               did_wcol        = FALSE;
  # define VCOL_HLC (vcol - vcol_off)
+ # define FIX_FOR_BOGUSCOLS \
+     { \
+       n_extra += vcol_off; \
+       vcol -= vcol_off; \
+       vcol_off = 0; \
+       col -= boguscols; \
+       boguscols = 0; \
+     }
  #else
  # define VCOL_HLC (vcol)
  #endif
***************
*** 4404,4410 ****
--- 4412,4425 ----
                                1), (colnr_T)vcol, NULL) - 1;
                    c_extra = ' ';
                    if (vim_iswhite(c))
+                   {
+ #ifdef FEAT_CONCEAL
+                       if (c == TAB)
+                           /* See "Tab alignment" below. */
+                           FIX_FOR_BOGUSCOLS;
+ #endif
                        c = ' ';
+                   }
                }
  #endif
  
***************
*** 4453,4463 ****
                     * and boguscols accumulated so far in the line. Note that
                     * the tab can be longer than 'tabstop' when there
                     * are concealed characters. */
!                   n_extra += vcol_off;
!                   vcol -= vcol_off;
!                   vcol_off = 0;
!                   col -= boguscols;
!                   boguscols = 0;
  #endif
  #ifdef FEAT_MBYTE
                    mb_utf8 = FALSE;    /* don't draw as UTF-8 */
--- 4468,4474 ----
                     * and boguscols accumulated so far in the line. Note that
                     * the tab can be longer than 'tabstop' when there
                     * are concealed characters. */
!                   FIX_FOR_BOGUSCOLS;
  #endif
  #ifdef FEAT_MBYTE
                    mb_utf8 = FALSE;    /* don't draw as UTF-8 */
*** ../vim-7.4a.012/src/testdir/test88.in       2012-12-05 15:40:05.000000000 
+0100
--- src/testdir/test88.in       2013-07-13 12:17:37.000000000 +0200
***************
*** 68,73 ****
--- 68,76 ----
  GGk
  :normal $
  GGk
+ :set lbr
+ :normal $
+ GGk
  :" Display result.
  :call append('$', 'end:')
  :call append('$', positions)
*** ../vim-7.4a.012/src/testdir/test88.ok       2012-12-05 15:40:05.000000000 
+0100
--- src/testdir/test88.ok       2013-07-13 12:18:55.000000000 +0200
***************
*** 21,23 ****
--- 21,24 ----
  9:17
  9:25
  9:26
+ 9:26
*** ../vim-7.4a.012/src/version.c       2013-07-12 20:16:53.000000000 +0200
--- src/version.c       2013-07-13 12:27:30.000000000 +0200
***************
*** 729,730 ****
--- 729,732 ----
  {   /* Add new patch number below this line */
+ /**/
+     13,
  /**/

-- 
SECOND SOLDIER: It could be carried by an African swallow!
FIRST SOLDIER:  Oh  yes! An African swallow maybe ... but not a European
                swallow. that's my point.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui