Mercurial > vim
comparison src/cmdexpand.c @ 28427:96d53065f309 v8.2.4738
patch 8.2.4738: Esc on commandline executes command instead of abandoning it
Commit: https://github.com/vim/vim/commit/11a57dfd16a47f248fe949344bd5db3f12b9bd32
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 11 19:38:56 2022 +0100
patch 8.2.4738: Esc on commandline executes command instead of abandoning it
Problem: Esc on commandline executes command instead of abandoning it.
Solution: Save and restore KeyTyped when removing the popup menu.
(closes #10154)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 11 Apr 2022 20:45:02 +0200 |
parents | 813660733869 |
children | add09d468c0d |
comparison
equal
deleted
inserted
replaced
28426:b6813029efe9 | 28427:96d53065f309 |
---|---|
376 * items and refresh the screen. | 376 * items and refresh the screen. |
377 */ | 377 */ |
378 void cmdline_pum_remove(void) | 378 void cmdline_pum_remove(void) |
379 { | 379 { |
380 int save_p_lz = p_lz; | 380 int save_p_lz = p_lz; |
381 int save_KeyTyped = KeyTyped; | |
381 | 382 |
382 pum_undisplay(); | 383 pum_undisplay(); |
383 VIM_CLEAR(compl_match_array); | 384 VIM_CLEAR(compl_match_array); |
384 p_lz = FALSE; // avoid the popup menu hanging around | 385 p_lz = FALSE; // avoid the popup menu hanging around |
385 update_screen(0); | 386 update_screen(0); |
386 p_lz = save_p_lz; | 387 p_lz = save_p_lz; |
387 redrawcmd(); | 388 redrawcmd(); |
389 | |
390 // When a function is called (e.g. for 'foldtext') KeyTyped might be reset | |
391 // as a side effect. | |
392 KeyTyped = save_KeyTyped; | |
388 } | 393 } |
389 | 394 |
390 void cmdline_pum_cleanup(cmdline_info_T *cclp) | 395 void cmdline_pum_cleanup(cmdline_info_T *cclp) |
391 { | 396 { |
392 cmdline_pum_remove(); | 397 cmdline_pum_remove(); |