vim-patch:8.1.0815: dialog for file changed outside of Vim not tested (#28184)

Problem:    Dialog for file changed outside of Vim not tested.
Solution:   Add a test.  Move FileChangedShell test.  Add 'L' flag to
            feedkeys().

5e66b42aae

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2024-04-05 18:04:45 +08:00
committed by GitHub
parent 4add77ddbf
commit a500c5f808
12 changed files with 30 additions and 234 deletions

View File

@@ -3395,9 +3395,7 @@ int do_dialog(int type, const char *title, const char *message, const char *butt
int retval = 0;
int i;
if (silent_mode // No dialogs in silent mode ("ex -s")
|| !ui_active() // Without a UI Nvim waits for input forever.
) {
if (silent_mode) { // No dialogs in silent mode ("ex -s")
return dfltbutton; // return default option
}
@@ -3414,6 +3412,12 @@ int do_dialog(int type, const char *title, const char *message, const char *butt
char *hotkeys = msg_show_console_dialog(message, buttons, dfltbutton);
while (true) {
// Without a UI Nvim waits for input forever.
if (!ui_active() && !input_available()) {
retval = dfltbutton;
break;
}
// Get a typed character directly from the user.
int c = get_keystroke(NULL);
switch (c) {