home *** CD-ROM | disk | FTP | other *** search
- To: vim_dev@googlegroups.com
- Subject: Patch 7.3.812
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- Mime-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- ------------
-
- Patch 7.3.812
- Problem: When 'indentexpr' moves the cursor "curswant" not restored.
- Solution: Restore "curswant". (Sung Pae)
- Files: src/misc1.c
-
-
- *** ../vim-7.3.811/src/misc1.c 2013-01-17 17:01:56.000000000 +0100
- --- src/misc1.c 2013-02-13 16:04:08.000000000 +0100
- ***************
- *** 8809,8820 ****
- get_expr_indent()
- {
- int indent;
- ! pos_T pos;
- int save_State;
- int use_sandbox = was_set_insecurely((char_u *)"indentexpr",
- OPT_LOCAL);
-
- ! pos = curwin->w_cursor;
- set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum);
- if (use_sandbox)
- ++sandbox;
- --- 8809,8826 ----
- get_expr_indent()
- {
- int indent;
- ! pos_T save_pos;
- ! colnr_T save_curswant;
- ! int save_set_curswant;
- int save_State;
- int use_sandbox = was_set_insecurely((char_u *)"indentexpr",
- OPT_LOCAL);
-
- ! /* Save and restore cursor position and curswant, in case it was changed
- ! * via :normal commands */
- ! save_pos = curwin->w_cursor;
- ! save_curswant = curwin->w_curswant;
- ! save_set_curswant = curwin->w_set_curswant;
- set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum);
- if (use_sandbox)
- ++sandbox;
- ***************
- *** 8829,8835 ****
- * command. */
- save_State = State;
- State = INSERT;
- ! curwin->w_cursor = pos;
- check_cursor();
- State = save_State;
-
- --- 8835,8843 ----
- * command. */
- save_State = State;
- State = INSERT;
- ! curwin->w_cursor = save_pos;
- ! curwin->w_curswant = save_curswant;
- ! curwin->w_set_curswant = save_set_curswant;
- check_cursor();
- State = save_State;
-
- *** ../vim-7.3.811/src/version.c 2013-02-13 15:53:15.000000000 +0100
- --- src/version.c 2013-02-13 16:01:52.000000000 +0100
- ***************
- *** 727,728 ****
- --- 727,730 ----
- { /* Add new patch number below this line */
- + /**/
- + 812,
- /**/
-
- --
- Living on Earth includes an annual free trip around the Sun.
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///
-