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