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.1 / 7.1.249 < prev    next >
Encoding:
Internet Message Format  |  2008-02-12  |  2.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.1.249
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.1.249
  11. Problem:    After "U" the cursor can be past end of line.  (Adri Verhoef)
  12. Solution:   Adjust the cursor position in u_undoline().
  13. Files:        src/undo.c
  14.  
  15.  
  16. *** ../vim-7.1.248/src/undo.c    Sat Nov 10 22:50:20 2007
  17. --- src/undo.c    Wed Feb 13 15:17:54 2008
  18. ***************
  19. *** 1814,1826 ****
  20.       if (undo_off)
  21.       return;
  22.   
  23. !     if (curbuf->b_u_line_ptr == NULL ||
  24. !             curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count)
  25.       {
  26.       beep_flush();
  27.       return;
  28.       }
  29. !     /* first save the line for the 'u' command */
  30.       if (u_savecommon(curbuf->b_u_line_lnum - 1,
  31.                   curbuf->b_u_line_lnum + 1, (linenr_T)0) == FAIL)
  32.       return;
  33. --- 1814,1827 ----
  34.       if (undo_off)
  35.       return;
  36.   
  37. !     if (curbuf->b_u_line_ptr == NULL
  38. !             || curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count)
  39.       {
  40.       beep_flush();
  41.       return;
  42.       }
  43. !     /* first save the line for the 'u' command */
  44.       if (u_savecommon(curbuf->b_u_line_lnum - 1,
  45.                   curbuf->b_u_line_lnum + 1, (linenr_T)0) == FAIL)
  46.       return;
  47. ***************
  48. *** 1840,1845 ****
  49. --- 1841,1847 ----
  50.       curbuf->b_u_line_colnr = curwin->w_cursor.col;
  51.       curwin->w_cursor.col = t;
  52.       curwin->w_cursor.lnum = curbuf->b_u_line_lnum;
  53. +     check_cursor_col();
  54.   }
  55.   
  56.   /*
  57. *** ../vim-7.1.248/src/version.c    Wed Feb 13 12:41:30 2008
  58. --- src/version.c    Wed Feb 13 15:20:12 2008
  59. ***************
  60. *** 668,669 ****
  61. --- 668,671 ----
  62.   {   /* Add new patch number below this line */
  63. + /**/
  64. +     249,
  65.   /**/
  66.  
  67. -- 
  68. How To Keep A Healthy Level Of Insanity:
  69. 1. At lunch time, sit in your parked car with sunglasses on and point
  70.    a hair dryer at passing cars. See if they slow down.
  71.  
  72.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  73. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  74. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  75.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  76.