edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

First vertical split changes window size #111

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Make the MacVim window the width of your screen
2. Create a vertical split (ctrl-w ctrl-v)

What is the expected output? What do you see instead?

I expect the split to be placed in the center of the window and another buffer 
to open on the 
right, while maintaining the current window size.  However, when it adds the 
scroll bar it adds it 
outside the existing window area, making the window bigger.  It should shrink 
the usable 
window area by the size of the added scroll bar.

What version of the product are you using? On what operating system?

MacVim 7.1/33, MacOS X 10.5.4

Original issue reported on code.google.com by nick.bas...@gmail.com on 4 Aug 2008 at 6:21

GoogleCodeExporter commented 9 years ago
Hmmm...if I do the following:

1. Cmd-n to open a new window
2. Cmd-click the zoom button to make window fill the entire screen
3. Ctrl-w Ctrl-v to make a split

The result is a window that still covers the entire screen with a split down 
the middle, exactly the way I expect 
it to be.

Are you saying this does not happen for you?  If I understand you correctly the 
window grows to become 
bigger than the screen after step 3, is that right?  If not, please clarify.

Original comment by bjorn.winckler@gmail.com on 4 Aug 2008 at 7:41

GoogleCodeExporter commented 9 years ago
Yes, that's what happens.  It's probably important to mention that I have two 
displays, so the window creeps 
onto the second display.

Original comment by nick.bas...@gmail.com on 4 Aug 2008 at 9:27

GoogleCodeExporter commented 9 years ago
You can see this even on a single display system with the following steps (a 
little backwards, but similar 
problem):

1. Open MacVim window
2. Set to full screen (command-zoom)
3. Split the window vertically (ctrl-w ctrl-v)
4. Delete the left buffer (:q)
5. See the window get smaller - no longer be full screen

Original comment by nick.bas...@gmail.com on 4 Aug 2008 at 11:06

GoogleCodeExporter commented 9 years ago
The window becoming smaller when you delete a split is intentional...MacVim 
does not (and will never) try to 
keep the window size constant.  All it does is to make sure the window does not 
become bigger than the 
screen.

Your first problem is because of the two monitor setup and I'll see if anything 
can be done about this.  
However, it sounds to me like you're not aware of MacVim's full-screen mode and 
I think this is what you are 
looking for; hit Cmd-Shift-f to enter/exit full-screen.  In full-screen there 
should be no problem with two 
displays.  Also, you will want to add the following line to your .gvimrc file 
to make full-screen fill out the 
entire screen:

set fuopt=maxhorz,maxvert

See ":h 'fuopt'" for more info.

Original comment by bjorn.winckler@gmail.com on 5 Aug 2008 at 11:08

GoogleCodeExporter commented 9 years ago
I'm not concerned about the window size being constant when the window is 
"sized" by the user.  However, if 
the user has elected to make the window full zoomed, then the window should 
always obey that constraint 
when it needs to size (I believe the HIG requires this behaviour).  It already 
does this in the first case - when 
you split zoomed with only one monitor, it doesn't change the window size.  It 
then follows that the window 
should also not shrink when the split goes away.

Separately, full screen mode blows away the titlebar of the window, which means 
that you lose any custom 
scripts you had which controlled your window title, which is pretty bad in my 
case (when looking at multiple 
versions of the same file, for example, my title bar shows the clearcase 
version and branch of the current 
buffer).  Also, it's somewhat disconcerting to work with full screen mode 
because of the behaviour of the dock 
and menu bar when you're working in more than one application.  Full-screen 
mode really only seems useful 
if vim is the only application I'm really using.

Original comment by nick.bas...@gmail.com on 5 Aug 2008 at 5:38

GoogleCodeExporter commented 9 years ago
You'll notice that apps such as Terminal behaves exactly the same way if you 
zoom, open a new tab, then 
close the tab (Safari does not, but it unlike Terminal and MacVim it does not 
have its window size constrained 
to the actual content of its view; i.e. MacVim displays whole rows and columns 
and cannot deal with partial 
rows&columns).  It would be difficult to make the changes that you ask for so I 
sincerely hope you can live 
with it the way it is now.

I highly suggest you bring this subject up on the vim_mac mailing list and ask 
for other users opinion.  If 
enough people agree with you I may be convinced that it would be worthwhile 
implementing this behavior.  
As it stands it is too much work if only one person is going to benefit from 
it.  Sorry. :(

Original comment by bjorn.winckler@gmail.com on 5 Aug 2008 at 6:25