home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.425 < prev    next >
Encoding:
Internet Message Format  |  2014-08-29  |  2.4 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.425
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.425
  11. Problem:    When 'showbreak' is used "gj" may move to the wrong position.
  12.         (Nazri Ramliy)
  13. Solution:   Adjust virtcol when 'showbreak' is set. (Christian Brabandt)
  14. Files:        src/normal.c
  15.  
  16.  
  17. *** ../vim-7.4.424/src/normal.c    2014-07-23 12:31:17.207990767 +0200
  18. --- src/normal.c    2014-08-29 14:15:14.158440247 +0200
  19. ***************
  20. *** 4509,4521 ****
  21.   #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
  22.       if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
  23.       {
  24.       /*
  25.        * Check for landing on a character that got split at the end of the
  26.        * last line.  We want to advance a screenline, not end up in the same
  27.        * screenline or move two screenlines.
  28.        */
  29.       validate_virtcol();
  30. !     if (curwin->w_virtcol > curwin->w_curswant
  31.           && (curwin->w_curswant < (colnr_T)width1
  32.               ? (curwin->w_curswant > (colnr_T)width1 / 2)
  33.               : ((curwin->w_curswant - width1) % width2
  34. --- 4509,4527 ----
  35.   #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
  36.       if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
  37.       {
  38. +     colnr_T virtcol;
  39.       /*
  40.        * Check for landing on a character that got split at the end of the
  41.        * last line.  We want to advance a screenline, not end up in the same
  42.        * screenline or move two screenlines.
  43.        */
  44.       validate_virtcol();
  45. !     virtcol = curwin->w_virtcol;
  46. !     if (virtcol > (colnr_T)width1 && *p_sbr != NUL)
  47. !         virtcol -= vim_strsize(p_sbr);
  48. !     if (virtcol > curwin->w_curswant
  49.           && (curwin->w_curswant < (colnr_T)width1
  50.               ? (curwin->w_curswant > (colnr_T)width1 / 2)
  51.               : ((curwin->w_curswant - width1) % width2
  52. *** ../vim-7.4.424/src/version.c    2014-08-29 13:49:48.678436915 +0200
  53. --- src/version.c    2014-08-29 14:17:26.938440537 +0200
  54. ***************
  55. *** 743,744 ****
  56. --- 743,746 ----
  57.   {   /* Add new patch number below this line */
  58. + /**/
  59. +     425,
  60.   /**/
  61.  
  62. -- 
  63. From "know your smileys":
  64.  !-|    I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth
  65.  
  66.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  67. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  68. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  69.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  70.