Main Window Bug

62 views
Skip to first unread message

Alexander Shukaev

unread,
Nov 12, 2013, 7:48:27 PM11/12/13
to vim...@googlegroups.com
Hello,

I want to report a bug which I found quite some time ago, but lately it became particularly annoying as one of my plugins depends on the bugged functionality.

I don't know if it's present on other platforms, but it is definitely present on Windows (GUI version, of course). To reproduce, do the following:

1. Create a stack of windows, i.e. there can be as many windows as you like, but there should be only horizontal splits (aka `:sp`);
2. Remember the position of Vim's main window now (upper-left corner);
3. Perform snapping: drag Vim's main window to left or right edge so that it "snaps", i.e. covers half of the screen;
4. In any of the windows in Vim perform `:wincmd H`;
5. Notice how Vim's main window instantly jumps to the previous position before snapping (the one you should have remembered); pretty annoying, isn't it?

There are other ways to reproduce it, and all of them result in this bug. For example:

1. Have your Vim with just one window opened inside;
2. Snap;
3. Perform `:vsp`;
4. Boom, the jump happens again.

NOTE: If you'd do `:sp` instead, everything would be smooth, no buggy jumps. So I suspect that this issue is especially related to "vertical" actions.

Hopefully, this is fixable. Regards.

Tony Mechelynck

unread,
Nov 12, 2013, 9:45:03 PM11/12/13
to vim...@googlegroups.com
I don't see this on GTK2/Gnome2, but also I can drag gvim as far as I
want to the side (with still a few pixels in view so that my mouse can
still hold the titlebar), I don't see any "snapping" at step 3.

I tried with ":wincmd H" and also with Ctrl-W H which is supposed to be
equivalent; and I do see the current window contents move to a
full-height vertical split at far left, which is what these commands are
supposed to do according to the help.


Best regards,
Tony.
--
Life is like a tin of sardines. We're, all of us, looking for the key.
-- Beyond the Fringe

Alexander Shukaev

unread,
Nov 12, 2013, 9:54:43 PM11/12/13
to vim...@googlegroups.com
"Snapping" is a feature of Windows. It makes the window you drag to the edge to automatically take half of the screen. I don't know if your current Gnome supports it.

I'm afraid you misunderstood my post. I also see the vertical split at far left on `wincmd H` and there are no problems with it. The point was different. Vim's main (GUI) window jumps to its previous location (before snapping), and this is an obvious bug.




--
--
You received this message from the "vim_dev" 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 a topic in the Google Groups "vim_dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/AT9j0nyIKFg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Gary Johnson

unread,
Nov 12, 2013, 11:15:52 PM11/12/13
to vim...@googlegroups.com
On 2013-11-13, Alexander Shukaev wrote:
> "Snapping" is a feature of Windows. It makes the window you drag to the edge to
> automatically take half of the screen. I don't know if your current Gnome
> supports it.
>
> I'm afraid you misunderstood my post. I also see the vertical split at far left
> on `wincmd H` and there are no problems with it. The point was different. Vim's
> main (GUI) window jumps to its previous location (before snapping), and this is
> an obvious bug.

I didn't know that Windows did that, so I've learned something.

I tried following your instructions using Vim 7.4.52 on Windows 7,
and observed the snapping, but I did not see any jumping.

Regards,
Gary

Tony Mechelynck

unread,
Nov 13, 2013, 12:56:46 AM11/13/13
to vim...@googlegroups.com
On 13/11/13 03:54, Alexander Shukaev wrote:
> "Snapping" is a feature of Windows. It makes the window you drag to the
> edge to automatically take half of the screen. I don't know if your
> current Gnome supports it.

Probably not.
>
> I'm afraid you misunderstood my post. I also see the vertical split at
> far left on `wincmd H` and there are no problems with it. The point was
> different. Vim's main (GUI) window jumps to its previous location
> (before snapping), and this is an obvious bug.

I tried to describe what I saw, whether relevant or not. I see that Gary
Johnson, also on Windows, experiences the first snap but not the
snap-back; I suppose you both could try and find what is different
between your two installations.


Best regards,
Tony.
--
<liiwi> so, what's the official way to get buildd to retry a package? prod
it with a stick?
<Joey> prod neuro
<liiwi> with a stick?
<Joey> yes.

Christian Brabandt

unread,
Nov 13, 2013, 2:34:22 AM11/13/13
to vim...@googlegroups.com, yukihiro....@gmail.com
On Wed, November 13, 2013 01:48, Alexander Shukaev wrote:
> Hello,
>
> I want to report a bug which I found quite some time ago, but lately it
> became particularly annoying as one of my plugins depends on the bugged
> functionality.
>
> I don't know if it's present on other platforms, but it is definitely
> present on Windows (GUI version, of course). To reproduce, do the
> following:
>
> 1. Create a stack of windows, i.e. there can be as many windows as you
> like, but there should be only horizontal splits (aka `:sp`);
> 2. Remember the position of Vim's main window now (upper-left corner);
> 3. Perform snapping: drag Vim's main window to left or right edge so that
> it "snaps", i.e. covers half of the screen;
> 4. In any of the windows in Vim perform `:wincmd H`;
> 5. Notice how Vim's main window instantly jumps to the previous position
> before snapping (the one you should have remembered); pretty annoying,
> isn't it?
>
> There are other ways to reproduce it, and all of them result in this bug.
> For example:
>
> 1. Have your Vim with just one window opened inside;
> 2. Snap;
> 3. Perform `:vsp`;
> 4. Boom, t:he jump happens again.
>
> NOTE: If you'd do `:sp` instead, everything would be smooth, no buggy
> jumps. So I suspect that this issue is especially related to "vertical"
> actions.
>
> Hopefully, this is fixable. Regards.

I am pretty sure, I have read several bug reports about this behaviour
before, but can't find them currently. If I remember correctly, this is
caused by adding a scrollbar, which causes Vim to resize.

Can you see, if this helps?
:set guioptions-=L

I think this was also discussed here:
https://groups.google.com/d/msg/vim_dev/xRdOvRDM3-Y/Ej-vJ0dWzPoJ
But not sure, whether this patch fixes it or has even been included
(which means, we would need another patch, since that one did not
fix that particular behaviour).

Perhaps Yukihiro Nakadaira can say more about this (CC'ed).


Best,
Christian

Alexander Shukaev

unread,
Nov 13, 2013, 9:07:49 AM11/13/13
to vim...@googlegroups.com
Sure, that's what I thought: `set guioptions-=L` does the trick, the bug is gone. Nevertheless, it would be nice if this can be fixed.


--
--
You received this message from the "vim_dev" 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 a topic in the Google Groups "vim_dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/AT9j0nyIKFg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_dev+u...@googlegroups.com.

Christian Brabandt

unread,
Nov 13, 2013, 9:45:37 AM11/13/13
to vim...@googlegroups.com
(please don't top poste. It's general list consenus,
to trim quotes and answer below).

On Wed, November 13, 2013 15:07, Alexander Shukaev wrote:
> Sure, that's what I thought: `set guioptions-=L` does the trick, the bug
> is gone. Nevertheless, it would be nice if this can be fixed.

Alternatively, let gvim always draw a left and right scrollbar
(e.g. set guioptions+=lr) Then Vim doesn't need to resize, when
you create vertical split windows.

Best,
Christian


Gary Johnson

unread,
Nov 13, 2013, 12:43:30 PM11/13/13
to vim...@googlegroups.com
On 2013-11-13, Tony Mechelynck wrote:
> On 13/11/13 03:54, Alexander Shukaev wrote:
> >"Snapping" is a feature of Windows. It makes the window you drag to the
> >edge to automatically take half of the screen. I don't know if your
> >current Gnome supports it.
>
> Probably not.
> >
> >I'm afraid you misunderstood my post. I also see the vertical split at
> >far left on `wincmd H` and there are no problems with it. The point was
> >different. Vim's main (GUI) window jumps to its previous location
> >(before snapping), and this is an obvious bug.
>
> I tried to describe what I saw, whether relevant or not. I see that
> Gary Johnson, also on Windows, experiences the first snap but not the
> snap-back; I suppose you both could try and find what is different
> between your two installations.

The difference was the L flag in 'guioptions', as discussed in other
posts. I don't use scrollbars, so my _vimrc removes L and a number
of other 'guioptions' flags. After executing ":set guioptions+=L",
I see the jumping, too.

Regards,
Gary

Reply all
Reply to author
Forward
0 new messages