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.3 / 7.3.812 < prev    next >
Encoding:
Internet Message Format  |  2013-02-12  |  2.4 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.812
  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.3.812
  11. Problem:    When 'indentexpr' moves the cursor "curswant" not restored.
  12. Solution:   Restore "curswant". (Sung Pae)
  13. Files:        src/misc1.c
  14.  
  15.  
  16. *** ../vim-7.3.811/src/misc1.c    2013-01-17 17:01:56.000000000 +0100
  17. --- src/misc1.c    2013-02-13 16:04:08.000000000 +0100
  18. ***************
  19. *** 8809,8820 ****
  20.   get_expr_indent()
  21.   {
  22.       int        indent;
  23. !     pos_T    pos;
  24.       int        save_State;
  25.       int        use_sandbox = was_set_insecurely((char_u *)"indentexpr",
  26.                                      OPT_LOCAL);
  27.   
  28. !     pos = curwin->w_cursor;
  29.       set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum);
  30.       if (use_sandbox)
  31.       ++sandbox;
  32. --- 8809,8826 ----
  33.   get_expr_indent()
  34.   {
  35.       int        indent;
  36. !     pos_T    save_pos;
  37. !     colnr_T    save_curswant;
  38. !     int        save_set_curswant;
  39.       int        save_State;
  40.       int        use_sandbox = was_set_insecurely((char_u *)"indentexpr",
  41.                                      OPT_LOCAL);
  42.   
  43. !     /* Save and restore cursor position and curswant, in case it was changed
  44. !      * via :normal commands */
  45. !     save_pos = curwin->w_cursor;
  46. !     save_curswant = curwin->w_curswant;
  47. !     save_set_curswant = curwin->w_set_curswant;
  48.       set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum);
  49.       if (use_sandbox)
  50.       ++sandbox;
  51. ***************
  52. *** 8829,8835 ****
  53.        * command. */
  54.       save_State = State;
  55.       State = INSERT;
  56. !     curwin->w_cursor = pos;
  57.       check_cursor();
  58.       State = save_State;
  59.   
  60. --- 8835,8843 ----
  61.        * command. */
  62.       save_State = State;
  63.       State = INSERT;
  64. !     curwin->w_cursor = save_pos;
  65. !     curwin->w_curswant = save_curswant;
  66. !     curwin->w_set_curswant = save_set_curswant;
  67.       check_cursor();
  68.       State = save_State;
  69.   
  70. *** ../vim-7.3.811/src/version.c    2013-02-13 15:53:15.000000000 +0100
  71. --- src/version.c    2013-02-13 16:01:52.000000000 +0100
  72. ***************
  73. *** 727,728 ****
  74. --- 727,730 ----
  75.   {   /* Add new patch number below this line */
  76. + /**/
  77. +     812,
  78.   /**/
  79.  
  80. -- 
  81. Living on Earth includes an annual free trip around the Sun.
  82.  
  83.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  84. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  85. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  86.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  87.