mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.0720: occasional exit when encountering an X error
Problem: Occasional exit when encountering an X error. (Manfred Lotz) Solution: On an X error do not exit, do preserve files.
This commit is contained in:
parent
a5565e4189
commit
b1062eb23e
@ -1544,10 +1544,15 @@ x_error_handler(Display *dpy, XErrorEvent *error_event)
|
|||||||
XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE);
|
XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE);
|
||||||
STRCAT(IObuff, _("\nVim: Got X error\n"));
|
STRCAT(IObuff, _("\nVim: Got X error\n"));
|
||||||
|
|
||||||
// We cannot print a message and continue, because no X calls are allowed
|
// In the GUI we cannot print a message and continue, because no X calls
|
||||||
// here (causes my system to hang). Silently continuing might be an
|
// are allowed here (causes my system to hang). Silently continuing seems
|
||||||
// alternative...
|
// like the best alternative. Do preserve files, in case we crash.
|
||||||
preserve_exit(); // preserve files and exit
|
ml_sync_all(FALSE, FALSE);
|
||||||
|
|
||||||
|
#ifdef FEAT_GUI
|
||||||
|
if (!gui.in_use)
|
||||||
|
#endif
|
||||||
|
msg((char *)IObuff);
|
||||||
|
|
||||||
return 0; // NOTREACHED
|
return 0; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
720,
|
||||||
/**/
|
/**/
|
||||||
719,
|
719,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user