Mercurial > vim
comparison src/screen.c @ 27712:9c96612730a0 v8.2.4382
patch 8.2.4382: a custom 'tabline' may cause Esc to work like Enter
Commit: https://github.com/vim/vim/commit/e4835bf34001471a102528659af009bc46361141
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 14 19:17:53 2022 +0000
patch 8.2.4382: a custom 'tabline' may cause Esc to work like Enter
Problem: A custom 'tabline' may cause Esc to work like Enter on the
command line when the popup menu is displayed.
Solution: Save and restore KeyTyped. (closes #9776)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 14 Feb 2022 20:30:02 +0100 |
parents | fb4c30606b4a |
children | ba47c7d07ce6 |
comparison
equal
deleted
inserted
replaced
27711:6fdafb9cb90e | 27712:9c96612730a0 |
---|---|
1233 stl_hlrec_T *hltab; | 1233 stl_hlrec_T *hltab; |
1234 stl_hlrec_T *tabtab; | 1234 stl_hlrec_T *tabtab; |
1235 int use_sandbox = FALSE; | 1235 int use_sandbox = FALSE; |
1236 win_T *ewp; | 1236 win_T *ewp; |
1237 int p_crb_save; | 1237 int p_crb_save; |
1238 int save_KeyTyped = KeyTyped; | |
1238 | 1239 |
1239 // There is a tiny chance that this gets called recursively: When | 1240 // There is a tiny chance that this gets called recursively: When |
1240 // redrawing a status line triggers redrawing the ruler or tabline. | 1241 // redrawing a status line triggers redrawing the ruler or tabline. |
1241 // Avoid trouble by not allowing recursion. | 1242 // Avoid trouble by not allowing recursion. |
1242 if (entered) | 1243 if (entered) |
1392 TabPageIdxs[col++] = fillchar; | 1393 TabPageIdxs[col++] = fillchar; |
1393 } | 1394 } |
1394 | 1395 |
1395 theend: | 1396 theend: |
1396 entered = FALSE; | 1397 entered = FALSE; |
1398 | |
1399 // A user function may reset KeyTyped, restore it. | |
1400 KeyTyped = save_KeyTyped; | |
1397 } | 1401 } |
1398 | 1402 |
1399 #endif // FEAT_STL_OPT | 1403 #endif // FEAT_STL_OPT |
1400 | 1404 |
1401 /* | 1405 /* |