Bram Moolenaar wrote:
Dennis Benzinger wrote:
Am 29.12.2010 18:41, schrieb Roy Jamison:
Hi all,
A bug has been reported to Launchpad (quite a while back in fact) at
https://bugs.launchpad.net/ubuntu/+source/vim/+bug/137854 and also to
Debian at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=379612 but
there doesn't appear to have been anything done with it, therefore I
would like to request that a developer would look at this problem
directly if possible.
Sorry to email you all directly, but I hope it pushes it through enough
that it can be looked at :)
Description:
gvim does not correctly resize the window when the first tab is opened,
part of the window becomes hidden behind task panel, thus hiding the :ex
command and status area making it necessary to manually resize the
window again.
Recreate:
1) launch gvim
2) expand the window to full size
3) :tabnew test.txt
Result:
The tab is created properly, but the bottom of the window is forced
downward, proportionately to the height of the tab, and behind the task
panel of the Gnome desktop.
Expected result:
gvim should have have shrunk the editing area, not resized the
window.
Note: This affects all versions from 7.1 up to the most recent version
in a stable Ubuntu: 7.2.330
[...]
It works for me with version 7.3.75. And there's already 7.3.89.
Seems like it has been fixed now. Please test again with the newest version.
Also see the 'guiheadroom' option.
This problem occurred when using multi monitor and screen height is
larger than maximized window height. For example, when using vertical
layout.
+----------+
| |
| monitor1 |
| |
+----------+
| |
| monitor2 |
| |
+----------+
Please check the following patch.
diff --git a/src/gui.c b/src/gui.c
--- a/src/gui.c
+++ b/src/gui.c
@@ -1402,7 +1402,7 @@
if (!gui.shell_created)
return;
-#ifdef MSWIN
+#if defined(MSWIN) || defined(FEAT_GUI_GTK)
/* If not setting to a user specified size and maximized, calculate the
* number of characters that fit in the maximized window. */
if (!mustset && gui_mch_maximized())
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3901,6 +3901,17 @@
gtk_window_unmaximize(GTK_WINDOW(gui.mainwin));
}
+ void
+gui_mch_newfont()
+{
+ int w, h;
+
+ gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
+ w -= get_menu_tool_width();
+ h -= get_menu_tool_height();
+ gui_resize_shell(w, h);
+}
+
/*
* Set the windows size.
*/
diff --git a/src/proto/gui_gtk_x11.pro b/src/proto/gui_gtk_x11.pro
--- a/src/proto/gui_gtk_x11.pro
+++ b/src/proto/gui_gtk_x11.pro
@@ -20,6 +20,7 @@
void gui_mch_set_winpos __ARGS((int x, int y));
int gui_mch_maximized __ARGS((void));
void gui_mch_unmaximize __ARGS((void));
+void gui_mch_newfont __ARGS((void));
void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int
base_height, int direction));
void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
--
Yukihiro Nakadaira - [email protected]
--
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