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.0 / 7.0.225 < prev    next >
Encoding:
Internet Message Format  |  2007-04-25  |  2.2 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 7.0.225
  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.0.225
  11. Problem:    When using setline() in an InsertEnter autocommand and doing "A"
  12.         the cursor ends up on the last byte in the line. (Yukihiro
  13.         Nakadaira)
  14. Solution:   Only adjust the column when using setline() for the cursor line.
  15.         Move it back to the head byte if necessary.
  16. Files:        src/eval.c, src/misc2.c
  17.  
  18.  
  19. *** ../vim-7.0.224/src/eval.c    Tue Mar 27 16:57:54 2007
  20. --- src/eval.c    Thu Apr 26 10:52:09 2007
  21. ***************
  22. *** 14397,14403 ****
  23.           if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
  24.           {
  25.           changed_bytes(lnum, 0);
  26. !         check_cursor_col();
  27.           rettv->vval.v_number = 0;    /* OK */
  28.           }
  29.       }
  30. --- 14411,14418 ----
  31.           if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
  32.           {
  33.           changed_bytes(lnum, 0);
  34. !         if (lnum == curwin->w_cursor.lnum)
  35. !             check_cursor_col();
  36.           rettv->vval.v_number = 0;    /* OK */
  37.           }
  38.       }
  39. *** ../vim-7.0.224/src/misc2.c    Tue Feb 20 03:18:20 2007
  40. --- src/misc2.c    Tue Mar 27 21:59:56 2007
  41. ***************
  42. *** 516,522 ****
  43. --- 516,529 ----
  44.           || virtual_active())
  45.           curwin->w_cursor.col = len;
  46.       else
  47. +     {
  48.           curwin->w_cursor.col = len - 1;
  49. + #ifdef FEAT_MBYTE
  50. +         /* prevent cursor from moving on the trail byte */
  51. +         if (has_mbyte)
  52. +         mb_adjust_cursor();
  53. + #endif
  54. +     }
  55.       }
  56.   
  57.   #ifdef FEAT_VIRTUALEDIT
  58. *** ../vim-7.0.224/src/version.c    Tue Mar 27 16:57:54 2007
  59. --- src/version.c    Thu Apr 26 10:53:33 2007
  60. ***************
  61. *** 668,669 ****
  62. --- 668,671 ----
  63.   {   /* Add new patch number below this line */
  64. + /**/
  65. +     225,
  66.   /**/
  67.  
  68. -- 
  69. hundred-and-one symptoms of being an internet addict:
  70. 14. You start introducing yourself as "Jim at I-I-Net dot net dot au"
  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.