Mercurial > vim
comparison src/gui.c @ 29128:d8a962d7b008 v8.2.5084
patch 8.2.5084: when the GUI shows a dialog tests get stuck
Commit: https://github.com/vim/vim/commit/2d12c25a1b73fb6991006fd970b3132ab8ee8b62
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 13 21:42:45 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 13 Jun 2022 22:45:06 +0200 |
parents | d0241e74bfdb |
children | 87ad2de4fe41 |
comparison
equal
deleted
inserted
replaced
29127:a6e64a2231b5 | 29128:d8a962d7b008 |
---|---|
5639 return c; | 5639 return c; |
5640 } | 5640 } |
5641 return NUL; | 5641 return NUL; |
5642 } | 5642 } |
5643 | 5643 |
5644 /* | |
5645 * If the "--gui-log-file fname" argument is given write the dialog title and | |
5646 * message to a file and return TRUE. Otherwise return FALSE. | |
5647 * When there is any problem opening the file or writing to the file this is | |
5648 * ignored, showing the dialog might get the test to get stuck. | |
5649 */ | |
5650 int | |
5651 gui_dialog_log(char_u *title, char_u *message) | |
5652 { | |
5653 char_u *fname = get_gui_dialog_file(); | |
5654 FILE *fd; | |
5655 | |
5656 if (fname == NULL) | |
5657 return FALSE; | |
5658 | |
5659 fd = mch_fopen((char *)fname, "a"); | |
5660 if (fd != NULL) | |
5661 { | |
5662 fprintf(fd, "%s: %s\n", title, message); | |
5663 fclose(fd); | |
5664 } | |
5665 return TRUE; | |
5666 } |