Karsten Hopp afd011
To: vim_dev@googlegroups.com
Karsten Hopp afd011
Subject: Patch 7.3.385
Karsten Hopp afd011
Fcc: outbox
Karsten Hopp afd011
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp afd011
Mime-Version: 1.0
Karsten Hopp afd011
Content-Type: text/plain; charset=UTF-8
Karsten Hopp afd011
Content-Transfer-Encoding: 8bit
Karsten Hopp afd011
------------
Karsten Hopp afd011
Karsten Hopp afd011
Patch 7.3.385
Karsten Hopp afd011
Problem:    When using an expression mapping on the command line the cursor
Karsten Hopp afd011
	    ends up in the wrong place. (Yasuhiro Matsumoto)
Karsten Hopp afd011
Solution:   Save and restore msg_col and msg_row when evaluating the
Karsten Hopp afd011
	    expression.
Karsten Hopp afd011
Files:	    src/getchar.
Karsten Hopp afd011
Karsten Hopp afd011
Karsten Hopp afd011
*** ../vim-7.3.384/src/getchar.c	2011-10-12 22:02:07.000000000 +0200
Karsten Hopp afd011
--- src/getchar.c	2011-12-14 18:37:52.000000000 +0100
Karsten Hopp afd011
***************
Karsten Hopp afd011
*** 4510,4515 ****
Karsten Hopp afd011
--- 4510,4517 ----
Karsten Hopp afd011
      char_u	*expr;
Karsten Hopp afd011
      char_u	*save_cmd;
Karsten Hopp afd011
      pos_T	save_cursor;
Karsten Hopp afd011
+     int		save_msg_col;
Karsten Hopp afd011
+     int		save_msg_row;
Karsten Hopp afd011
  
Karsten Hopp afd011
      /* Remove escaping of CSI, because "str" is in a format to be used as
Karsten Hopp afd011
       * typeahead. */
Karsten Hopp afd011
***************
Karsten Hopp afd011
*** 4533,4544 ****
Karsten Hopp afd011
--- 4535,4550 ----
Karsten Hopp afd011
  #endif
Karsten Hopp afd011
      set_vim_var_char(c);  /* set v:char to the typed character */
Karsten Hopp afd011
      save_cursor = curwin->w_cursor;
Karsten Hopp afd011
+     save_msg_col = msg_col;
Karsten Hopp afd011
+     save_msg_row = msg_row;
Karsten Hopp afd011
      p = eval_to_string(expr, NULL, FALSE);
Karsten Hopp afd011
      --textlock;
Karsten Hopp afd011
  #ifdef FEAT_EX_EXTRA
Karsten Hopp afd011
      --ex_normal_lock;
Karsten Hopp afd011
  #endif
Karsten Hopp afd011
      curwin->w_cursor = save_cursor;
Karsten Hopp afd011
+     msg_col = save_msg_col;
Karsten Hopp afd011
+     msg_row = save_msg_row;
Karsten Hopp afd011
  
Karsten Hopp afd011
      restore_cmdline_alloc(save_cmd);
Karsten Hopp afd011
      vim_free(expr);
Karsten Hopp afd011
*** ../vim-7.3.384/src/version.c	2011-12-23 13:14:58.000000000 +0100
Karsten Hopp afd011
--- src/version.c	2011-12-23 14:53:23.000000000 +0100
Karsten Hopp afd011
***************
Karsten Hopp afd011
*** 716,717 ****
Karsten Hopp afd011
--- 716,719 ----
Karsten Hopp afd011
  {   /* Add new patch number below this line */
Karsten Hopp afd011
+ /**/
Karsten Hopp afd011
+     385,
Karsten Hopp afd011
  /**/
Karsten Hopp afd011
Karsten Hopp afd011
-- 
Karsten Hopp afd011
`When any government, or any church for that matter, undertakes to say to
Karsten Hopp afd011
 its subjects, "This you may not read, this you must not see, this you are
Karsten Hopp afd011
 forbidden to know," the end result is tyranny and oppression no matter how
Karsten Hopp afd011
 holy the motives' -- Robert A Heinlein, "If this goes on --"
Karsten Hopp afd011
Karsten Hopp afd011
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp afd011
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp afd011
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp afd011
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///