diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-22 22:08:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-22 22:08:09 +0100 |
commit | 9e26f7d31fbb780613fa700fe61de3e0b4ff2ef6 (patch) | |
tree | a00df42661ee8d924b48fe4f5508c10a5612cc1b /src/edit.c | |
parent | 563bbeabcce5580e03648e687bd7ddb9626a03d9 (diff) | |
download | vim-git-9e26f7d31fbb780613fa700fe61de3e0b4ff2ef6.tar.gz |
patch 8.1.0792: bad display if opening cmdline window from Insert completionv8.1.0792
Problem: Popup menu is displayed on top of the cmdline window if it is
opened from Insert completion. (Bjorn Linse)
Solution: Remove the popup menu. Restore the cursor position.
(closes #3838)
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/edit.c b/src/edit.c index 482e644e8..852060bd2 100644 --- a/src/edit.c +++ b/src/edit.c @@ -8537,6 +8537,7 @@ ins_reg(void) ++no_u_sync; if (regname == '=') { + pos_T curpos = curwin->w_cursor; # ifdef HAVE_INPUT_METHOD int im_on = im_get_status(); # endif @@ -8545,8 +8546,12 @@ ins_reg(void) u_sync_once = 2; regname = get_expr_register(); + + // Cursor may be moved back a column. + curwin->w_cursor = curpos; + check_cursor(); # ifdef HAVE_INPUT_METHOD - /* Restore the Input Method. */ + // Restore the Input Method. if (im_on) im_set_active(TRUE); # endif |