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.
> 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