> After recompiling vim from the current sources, I noticed the following
> bug: A :redraw command that is called during startup, causes gvim to print
> its screen view on the terminal -- as if vim were called. This happens when
> I run gvim from gnome-terminal.
first verify you got a good compile: examine your
:ver
output, 3rd or 4th line, and see if it says something along the
lines of
Big version with GTK2 GUI.
no-one else on this list is having such a weird problem (or they
are being very secretive about it) so if your compile was good,
the next question might be answered by looking at the output
from
:scriptnames
> Unfortunately, I cannot tell which patch causes this but this bug must have
> been introduced after 340, I'd say.
which was about two months ago, and you're the first to report a
gui that doesn't come up
sc
> On Sun, Dec 11, 2011 at 11:02:01PM -0800, lith wrote:
>> After recompiling vim from the current sources, I noticed the
>> following bug: A :redraw command that is called during startup,
>> causes gvim to print its screen view on the terminal -- as if vim
>> were called. This happens when I run gvim from gnome-terminal.
>
> no-one else on this list is having such a weird problem (or they are
> being very secretive about it) so if your compile was good, the next
> question might be answered by looking at the output from
Or they haven't tested it for themselves yet...
>> Unfortunately, I cannot tell which patch causes this but this bug
>> must have been introduced after 340, I'd say.
>
> which was about two months ago, and you're the first to report a
> gui that doesn't come up
The bug report is not that the GUI does not come up, it's that the
terminal that gVim is invoked from gets drawn by gVim, then the GUI
does come up. The effect is somewhat like starting Vim in the
terminal, then immediately typing ":gui".
...Which is, incidentally, the behavior I can reproduce by putting
"redraw" in my .vimrc and then invoking gvim from a terminal.
While this is strange and definitely not correct behavior, the gVim
session does appear to work fine once it is fully initialized.
- Christian
--
Home, to a young boy, is merely a filling station.
Christian J. Robinson <hep...@gmail.com> http://christianrobinson.name/
> The bug report is not that the GUI does not come up, it's that the terminal that gVim is invoked from gets drawn by gVim, then the GUI does come up.
Sorry for being imprecise. This is exactly what happens. The GUI comes up as always. It's just that a :redraw command in vimrc causes gvim to paint its view on the terminal first ... Then the gui is being displayed.
Regards,
Tom
The startup sequence for the GUI was indeed changed. Calling :redraw in
the startup script is weird, you probably need to change that. If there
really are redrawing problems use a VimEnter or GUIEnter autocommand.
:autocmd VimEnter * redraw
--
In his lifetime van Gogh painted 486 oil paintings. Oddly enough, 8975
of them are to be found in the United States.
/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
I was going to do a bisect to see when this got introduced, thinking it may
have been related to 7.3.315. However, in trying to find an old state where
that behavior didn't exist, I didn't have much luck. I went all the way back
to the v7-1-001 tag, saw that the behavior still existed there and gave up
searching.
> Unfortunately, I cannot tell which patch causes this but this bug must have
> been introduced after 340, I'd say.
Or it's existed for > 4.75 years and hadn't been noticed. I'd have to agree
with Bram that calling :redraw in ~/.vimrc is rather odd (there's no UI yet)
and that would be better served with VimEnter/GuiEnter depending on why you're
using it at all.
--
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jame...@jamessan.com>
The startup sequence for the GUI was indeed changed. Calling :redraw in
the startup script is weird, you probably need to change that. If there
really are redrawing problems use a VimEnter or GUIEnter autocommand.
First, the problem was introduced during the latest patches.
On Di, 13 Dez 2011, lith wrote:
> > First, the problem was introduced during the latest patches.
>
>
> This should read: the problem was *not* ...
Can you provide a minimal example of the crash?
regards,
Christian
--
Patriotismus ist die Tugend der Bosheit.
-- Oscar Wilde
Can you provide a minimal example of the crash?
Sorry, I forgot about this mail.
I see that this triggers redrawing the terminal, also the gui should be
used. I think, this patch fixes it:
0 2174 chrisbra@R500 ~/code/vim/src (hg)-[default]- % hg diff screen.c
diff --git a/src/screen.c b/src/screen.c
--- a/src/screen.c
+++ b/src/screen.c
@@ -766,7 +766,11 @@
/* Return when there is nothing to do or screen updating already
* happening. */
- if (!doit || updating_screen)
+ if (!doit || updating_screen
+#ifdef FEAT_GUI
+ || gui.in_use || gui.starting
+#endif
+ )
return;
regards,
Christian
> On Mi, 14 Dez 2011, lith wrote:
>
> > Hi,
> >
> > Am Dienstag, 13. Dezember 2011 20:24:01 UTC+1 schrieb Christian Brabandt:
> > >
> > > Can you provide a minimal example of the crash?
> >
> >
> > Since I don't own a Mac, I cannot give an example for the crash, but the
> > following example triggers the problem described above. I assume this was
> > also what caused MacVim to crash since not placing a sign solved the
> > problem.
> >
> > gvim -u vimrc.test
> >
> > where vimrc.test is
> >
> > sign define Foo text=F
> > sign place 1 line=1 name=Foo buffer=1
>
> Sorry, I forgot about this mail.
>
> I see that this triggers redrawing the terminal, also the gui should be
> used. I think, this patch fixes it:
What does this patch fix?
I can see some messing of the terminal when using "vim -u vimrc.test".
Your patch only changes something for the GUI, it appears. But the
problem also exists in the non-GUI version.
--
[Another hideous roar.]
BEDEVERE: That's it!
ARTHUR: What?
BEDEVERE: It's The Legendary Black Beast of Aaaaarrrrrrggghhh!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
On Do, 05 Jan 2012, Bram Moolenaar wrote:
>
> Christian Brabandt wrote:
>
> > On Mi, 14 Dez 2011, lith wrote:
> >
> > > Hi,
> > >
> > > Am Dienstag, 13. Dezember 2011 20:24:01 UTC+1 schrieb Christian Brabandt:
> > > >
> > > > Can you provide a minimal example of the crash?
> > >
> > >
> > > Since I don't own a Mac, I cannot give an example for the crash, but the
> > > following example triggers the problem described above. I assume this was
> > > also what caused MacVim to crash since not placing a sign solved the
> > > problem.
> > >
> > > gvim -u vimrc.test
> > >
> > > where vimrc.test is
> > >
> > > sign define Foo text=F
> > > sign place 1 line=1 name=Foo buffer=1
> >
> > Sorry, I forgot about this mail.
> >
> > I see that this triggers redrawing the terminal, also the gui should be
> > used. I think, this patch fixes it:
>
> What does this patch fix?
I thought the problem was, that although the GUI will start, it still
draws the signs on the terminal.
> I can see some messing of the terminal when using "vim -u vimrc.test".
> Your patch only changes something for the GUI, it appears. But the
> problem also exists in the non-GUI version.
Yes, I was just looking at the GUI.
regards,
Christian
> > > On Mi, 14 Dez 2011, lith wrote:
> > >
> > > > Hi,
> > > >
> > > > Am Dienstag, 13. Dezember 2011 20:24:01 UTC+1 schrieb Christian Brabandt:
> > > > >
> > > > > Can you provide a minimal example of the crash?
> > > >
> > > >
> > > > Since I don't own a Mac, I cannot give an example for the crash, but the
> > > > following example triggers the problem described above. I assume this was
> > > > also what caused MacVim to crash since not placing a sign solved the
> > > > problem.
> > > >
> > > > gvim -u vimrc.test
> > > >
> > > > where vimrc.test is
> > > >
> > > > sign define Foo text=F
> > > > sign place 1 line=1 name=Foo buffer=1
> > >
> > > Sorry, I forgot about this mail.
> > >
> > > I see that this triggers redrawing the terminal, also the gui should be
> > > used. I think, this patch fixes it:
> >
> > What does this patch fix?
>
> I thought the problem was, that although the GUI will start, it still
> draws the signs on the terminal.
I also see it draw "~" lines.
> > I can see some messing of the terminal when using "vim -u vimrc.test".
> > Your patch only changes something for the GUI, it appears. But the
> > problem also exists in the non-GUI version.
>
> Yes, I was just looking at the GUI.
We should have a fix that also fixes it for the terminal. Can you
reproduce it with vim instead of gvim?
--
VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
and his knights seemed hopeless, when, suddenly ... the animator
suffered a fatal heart attack.
ANIMATOR: Aaaaagh!
VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
continue.
On Fr, 06 Jan 2012, Bram Moolenaar wrote:
>
> Christian Brabandt wrote:
>
> > > > On Mi, 14 Dez 2011, lith wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Am Dienstag, 13. Dezember 2011 20:24:01 UTC+1 schrieb Christian Brabandt:
> > > > > >
> > > > > > Can you provide a minimal example of the crash?
> > > > >
> > > > >
> > > > > Since I don't own a Mac, I cannot give an example for the crash, but the
> > > > > following example triggers the problem described above. I assume this was
> > > > > also what caused MacVim to crash since not placing a sign solved the
> > > > > problem.
> > > > >
> > > > > gvim -u vimrc.test
> > > > >
> > > > > where vimrc.test is
> > > > >
> > > > > sign define Foo text=F
> > > > > sign place 1 line=1 name=Foo buffer=1
> > > >
> > > > Sorry, I forgot about this mail.
> > > >
> > > > I see that this triggers redrawing the terminal, also the gui should be
> > > > used. I think, this patch fixes it:
> > >
> > > What does this patch fix?
> >
> > I thought the problem was, that although the GUI will start, it still
> > draws the signs on the terminal.
>
> I also see it draw "~" lines.
Yes.
> > > I can see some messing of the terminal when using "vim -u vimrc.test".
> > > Your patch only changes something for the GUI, it appears. But the
> > > problem also exists in the non-GUI version.
> >
> > Yes, I was just looking at the GUI.
>
> We should have a fix that also fixes it for the terminal. Can you
> reproduce it with vim instead of gvim?
This should fix it for gvim and vim
diff --git a/src/screen.c b/src/screen.c
--- a/src/screen.c
+++ b/src/screen.c
@@ -765,8 +765,13 @@
}
/* Return when there is nothing to do or screen updating already
- * happening. */
- if (!doit || updating_screen)
+ * happening or we are starting up. */
+ if (!doit || updating_screen
+#ifdef FEAT_GUI
+ || gui.starting
+#endif
+ || starting
+ )
return;
/* update all windows that need updating */
regards,
Christian
Thanks! I'll verify it works and include it.
--
It is illegal for a driver to be blindfolded while operating a vehicle.
[real standing law in Alabama, United States of America]