ashersyed / macvim

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

MacVim resizes the window when creating tabs... Snapshot 43 #165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Resize the MacVim window to take up the left or right half of the screen.
Open a tab, then another, keep opening tabs.  Navigate back and forth
between them

What is the expected output? What do you see instead?
I would expect the window to stay in the same place, and have the same size
as tabs are created and navigated.  Instead, the window occasionaly resizes
a bit, growing by a few pixels.  This can cause parts of MacVim to be
obscured by other windows.

What version of MacVim and OS X are you using (see "MacVim->About MacVim"
and  "Apple Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6
Intel")?
Snapshot 43
10.5.6

Please provide any additional information below.

Original issue reported on code.google.com by douglas....@gmail.com on 3 Apr 2009 at 6:07

GoogleCodeExporter commented 9 years ago
I don't understand what the problem is -- can you perhaps attach some 
screenshots?

It certainly is true that a window should not resize or move when you navigate
between tabs.  On the other hand, the windows height will change when the 
tabline is
shown or hidden.

Original comment by bjorn.winckler@gmail.com on 3 Apr 2009 at 6:48

GoogleCodeExporter commented 9 years ago
Sure.  Sorry about the giant images, this is my working desktop and it really 
shows
the problem.  First, I have two windows open on my screen, equally sized, 
firefox and
macvim.
http://skitch.com/pootul/bkxa1/issue-165-macvim-macvim-resizes-the-window-when-c
reating-tabs-snapshot-43-google-code

From this point, I just hit 'gT' to go left one tab, and you'll see that MacVim 
has
extended itself to the left, partially covering Firefox.  Every other time I 
change
tabs, or create them, MacVim resizes the window just a little bit.  I'm 
constantly
adjusting my windows, and it's really bizarre.
http://skitch.com/pootul/bkxaf/1238676666-nerd-tree--vim

Thanks

Original comment by douglas....@gmail.com on 3 Apr 2009 at 8:17

GoogleCodeExporter commented 9 years ago
Something else I just noticed.  It only happens when there's a discrepancy in 
the
number of vertically split windows.  The MacVim window is bigger if there's at 
least
one vertical split.  Changing tabs changes the number of vertical splits, and 
resizes
the window

Original comment by douglas....@gmail.com on 3 Apr 2009 at 8:21

GoogleCodeExporter commented 9 years ago
So the problem is just that you switch between two tabs: one with a vertical 
split
(a) and the other without (b).  When you go from (a) to (b) the window becomes
smaller because the left scrollbar is hidden.  When you go from (b) to (a) the 
window
becomes larger when the left scrollbar is shown.  Can you confirm if this is 
indeed
the problem?

To work around this I have two suggestions:
1. Disable the left scrollbar by typing ":set go-=L"
2. Always enable the left scrollbar by typing ":set go+=l"

Original comment by bjorn.winckler@gmail.com on 3 Apr 2009 at 8:53

GoogleCodeExporter commented 9 years ago
As it turns out, that's exactly the problem, and the workaround handles my 
problem. 
It's not a fix, but it's completely workable, so thank you.

Original comment by douglas....@gmail.com on 3 Apr 2009 at 9:22

GoogleCodeExporter commented 9 years ago
I can't think of any way to "fix" this problem...do you have any suggestions?

Original comment by bjorn.winckler@gmail.com on 4 Apr 2009 at 7:38

GoogleCodeExporter commented 9 years ago
Sure, regardless of switching tabs (which is just how it manifested for me), if 
you
:vsplit, you're going to be adding a scrollbar.  When that happens, rather than
resizing the gui window to add the scrollbar, keep the gui window the same, and 
the
scrollbar, and shrink the content just enough to make space for the scrollbar.  
Think
of how other applications handle this. Firefox, for example, adds the scrollbar 
to
the inside of the window as as the content becomes large enough to need one.  It
doesn't resize the window.

Original comment by ledougla...@gmail.com on 7 Apr 2009 at 2:10

GoogleCodeExporter commented 9 years ago
Good point.  I'll investigate how hard that is to implement.  Thanks for the 
suggestion!

Original comment by bjorn.winckler@gmail.com on 7 Apr 2009 at 2:20

GoogleCodeExporter commented 9 years ago
Ok, I spoke a bit too soon.  Your suggestion does not work since the width of 
the scrollbars need not be a 
multiple of the width of a display cell.  So if you e.g. show the left 
scrollbar while keeping the window size fixed 
then the "text area" may not fit an even number of characters.  Of course you 
could try to fill the text area with as 
many characters as possible and then leave a gap on the sides, but 
unfortunately I think this would be more 
trouble than its worth.

I'll keep this issue open and if lots of people do request this kind of change 
I will look into it.

Original comment by bjorn.winckler@gmail.com on 7 Apr 2009 at 2:48

GoogleCodeExporter commented 9 years ago
Thanks for being open.  I thought about that problem as well, and was hoping 
you'd
discount it ;-)

Just so you know, the work you're doing on this is fantastic, and it makes such 
a
difference for me in my everyday work.  Thank you.

Original comment by ledougla...@gmail.com on 7 Apr 2009 at 9:30

GoogleCodeExporter commented 9 years ago

Original comment by bjorn.winckler@gmail.com on 8 Apr 2009 at 12:48