Vertical split changing GVim application window position

109 views
Skip to first unread message

geoffr...@thomsonreuters.com

unread,
Jun 19, 2012, 7:24:21 AM6/19/12
to vim...@googlegroups.com
tUsing Vim 7.3 patches 1 - 556 (the Vim without Cream
version) on XP SP3.

I have a dual-monitor system, both monitors are the same
size and resolution, the left-hand monitor is the primary
one so no negative desktop coordinates.

When switching the display to show a vertical split (e.g.
use :vsplit, or switch to a tab that's already split), if
the GVim Application window is across the boundary of the
two monitors, it changes position to be on one of them -
I think whichever monitor is showing more of the window
at the time. It's reproducible, like this:

. Run "gvim -N -u NONE -i NONE"
. Put the Application window across the boundary between
the two monitors
. Enter command ":vsplit"

Background: I'm using ":vert diffsplit" and stretching gvim
across both monitors to fill the screen. Every time I
switch to another tab and back, it changes the application
window position.

Can I stop this from happening? Anyone else see this, or
indeed do this with vimdiff and NOT see it?

regards,
Geoff

This doesn't happen with horizontal splits, but some time
back I mentioned another issue with this configuration that
does - switch the position of the application window
between monitors and the split changes position. (I've
turned off the SwapScreen utility I used there so it
isn't involved in this vsplit problem.) No-one had any
insight into that one, so I'm wondering if my machine
is peculiar in some way.

https://groups.google.com/forum/?fromgroups#!searchin/vim_use/Vim$20splits$20resize$20switching$20between$20dual$20monitors/vim_use/Zra0F3EhFsg/Mv3adN7YtQIJ

Yukihiro Nakadaira

unread,
Jun 20, 2012, 8:46:26 AM6/20/12
to vim...@googlegroups.com, vim...@googlegroups.com
I can reproduce it.

Workaround is :set guioptions+=l, :set guioptions-=L, :set guioptions+=r
or :set guioptions-=R.

When splitting window vertically, Vim shows scrollbar. It causes window
resize. When resizing window, Vim try to keep window completely on
screen. And currently it is performed by comparing window position with
workarea (not entire screen). Therefore, Vim window always moves when
it is across the boundary the two monitors.

We are discussing this problem in vim_dev.

--
Yukihiro Nakadaira - yukihiro....@gmail.com

geoffr...@thomsonreuters.com

unread,
Jun 21, 2012, 6:17:50 AM6/21/12
to vim...@googlegroups.com, vim...@googlegroups.com
On Wednesday, 20 June 2012 13:46:26 UTC+1, Yukihiro Nakadaira wrote:
> On Tue, Jun 19, 2012 at 8:24 PM, <geoffr...@thomsonreuters.com> wrote:
> > When switching the display to show a vertical split (e.g.
> > use :vsplit, or switch to a tab that's already split), if
> > the GVim Application window is across the boundary of the
> > two monitors, it changes position to be on one of them -

> Workaround is :set guioptions+=l, :set guioptions-=L, :set guioptions+=r


> or :set guioptions-=R.
>
> When splitting window vertically, Vim shows scrollbar. It causes window
> resize. When resizing window, Vim try to keep window completely on
> screen. And currently it is performed by comparing window position with
> workarea (not entire screen). Therefore, Vim window always moves when
> it is across the boundary the two monitors.
>
> We are discussing this problem in vim_dev.
>
> --
> Yukihiro Nakadaira - yukihiro....@gmail.com

I see, so it's the vertical scrollbars appearing
or disappearing that triggers it. This workaround
works for me, thanks! (I had guioption L)

I'll keep an eye on the thread in vim_dev :)

> > This doesn't happen with horizontal splits, but some time
> > back I mentioned another issue with this configuration that
> > does - switch the position of the application window
> > between monitors and the split changes position.

Turns out that problem is no longer reproducible
in the latest build (I checked before upgrading to
latest build, I should have checked afterwards).

Thanks for your help,
Geoff

Reply all
Reply to author
Forward
0 new messages