Mercurial > vim
changeset 13427:b85526d90aba v8.0.1588
patch 8.0.1588: popup menu hangs after typing CTRL-C
commit https://github.com/vim/vim/commit/52f18a112a073c39187cd93f26115d1e2bfd29ce
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 7 22:09:11 2018 +0100
patch 8.0.1588: popup menu hangs after typing CTRL-C
Problem: Popup menu hangs after typing CTRL-C.
Solution: Make CTRL-C exit the loop. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2697)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 07 Mar 2018 22:15:05 +0100 |
parents | c953267b2849 |
children | b82547f4a465 |
files | src/popupmnu.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -1175,7 +1175,7 @@ pum_show_popupmenu(vimmenu_T *menu) out_flush(); c = vgetc(); - if (c == ESC) + if (c == ESC || c == Ctrl_C) break; else if (c == CAR || c == NL) { @@ -1211,7 +1211,7 @@ pum_show_popupmenu(vimmenu_T *menu) } else if (c == K_LEFTDRAG || c == K_RIGHTDRAG || c == K_MOUSEMOVE) { - /* mouse moved: selec item in the mouse row */ + /* mouse moved: select item in the mouse row */ pum_select_mouse_pos(); } else if (c == K_LEFTMOUSE || c == K_LEFTMOUSE_NM || c == K_RIGHTRELEASE)