| 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 |
| |
| |
| |
| |
| |
| *** 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; |
| |
| |
| |
| |
| *** 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 /// |