mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.0439: recursive use of getcmdline() still not protected
Problem: Recursive use of getcmdline() still not protected. Solution: Instead of saving the command buffer when making a call which may cause recursiveness, save the buffer when actually being called recursively.
This commit is contained in:
@@ -4666,7 +4666,6 @@ eval_map_expr(
|
||||
char_u *res;
|
||||
char_u *p;
|
||||
char_u *expr;
|
||||
char_u *save_cmd;
|
||||
pos_T save_cursor;
|
||||
int save_msg_col;
|
||||
int save_msg_row;
|
||||
@@ -4678,13 +4677,6 @@ eval_map_expr(
|
||||
return NULL;
|
||||
vim_unescape_csi(expr);
|
||||
|
||||
save_cmd = save_cmdline_alloc();
|
||||
if (save_cmd == NULL)
|
||||
{
|
||||
vim_free(expr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Forbid changing text or using ":normal" to avoid most of the bad side
|
||||
* effects. Also restore the cursor position. */
|
||||
++textlock;
|
||||
@@ -4700,7 +4692,6 @@ eval_map_expr(
|
||||
msg_col = save_msg_col;
|
||||
msg_row = save_msg_row;
|
||||
|
||||
restore_cmdline_alloc(save_cmd);
|
||||
vim_free(expr);
|
||||
|
||||
if (p == NULL)
|
||||
|
Reference in New Issue
Block a user