mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.5084: when the GUI shows a dialog tests get stuck
Problem: When the GUI shows a dialog tests get stuck. Solution: Add the --gui-dialog-file argument.
This commit is contained in:
23
src/gui.c
23
src/gui.c
@@ -5641,3 +5641,26 @@ check_for_interrupt(int key, int modifiers_arg)
|
||||
return NUL;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the "--gui-log-file fname" argument is given write the dialog title and
|
||||
* message to a file and return TRUE. Otherwise return FALSE.
|
||||
* When there is any problem opening the file or writing to the file this is
|
||||
* ignored, showing the dialog might get the test to get stuck.
|
||||
*/
|
||||
int
|
||||
gui_dialog_log(char_u *title, char_u *message)
|
||||
{
|
||||
char_u *fname = get_gui_dialog_file();
|
||||
FILE *fd;
|
||||
|
||||
if (fname == NULL)
|
||||
return FALSE;
|
||||
|
||||
fd = mch_fopen((char *)fname, "a");
|
||||
if (fd != NULL)
|
||||
{
|
||||
fprintf(fd, "%s: %s\n", title, message);
|
||||
fclose(fd);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user