Loading ...
Sorry, an error occurred while loading the content.

Patch 7.3.812

Expand Messages
  • Bram Moolenaar
    Patch 7.3.812 Problem: When indentexpr moves the cursor curswant not restored. Solution: Restore curswant . (Sung Pae) Files: src/misc1.c ...
    Message 1 of 1 , Feb 13 7:11 AM
    • 0 Attachment
      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@... -- 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 ///

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.