Saturday, May 9, 2020

Re: X error and vim dies

On Sat, 09 May 2020 16:11:57 +0200
Bram Moolenaar <Bram@moolenaar.net> wrote:

> Manfred Lotz wrote:
>
> > On Tue, 5 May 2020 23:31:02 -0700 (PDT)
> > John Little <john.b.little@gmail.com> wrote:
> >
> > > If this problem has consequences (vim dying in the middle of your
> > > work can be bad), if you build your own vim a workaround is to
> > > modify os_unix.c in the x_error_handler function, to replace the
> > > preserve_exit() call with
> > >
> > > g_print("%s", IObuff);
> > >
> > > or just comment out the preserve_exit() call. I have used this
> > > workaround for a BadWindow error for about a decade, with no ill
> > > effect.
> > >
> >
> > Sounds like a good idea. But why isn't this changed this way in the
> > official vim sources?
>
> This is "not supposed to happen". But there was already a comment
> that it might be possible to silently continue.
>

That would be great.


> Let's make it a bit safer by preserving swap files, in case X does
> decide to exit or we crash.
>

Sounds good.

> In a terminal we can show the message. The comment mentions that in
> the GUI, using the X server may fail in the error handler. So we'll
> not show the message.
>

I think this could happen. In my case I started gvim in a terminal to
see what's going on and got the messages I wanted to see.

--
Manfred


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200509174016.0a7119d5%40hogwart.

No comments: