summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-05-06 21:44:30 +0000
committerBram Moolenaar <Bram@vim.org>2006-05-06 21:44:30 +0000
commit56a907af93bfd0a51f79c7441d679889d936a223 (patch)
tree2fd8bf07fcce5c31718dcddc54bd9b1e29753a01 /src
parent97e8f356004f564d3232a64428927d3c29164f66 (diff)
downloadvim-git-56a907af93bfd0a51f79c7441d679889d936a223.tar.gz
updated for version 7.0g05
Diffstat (limited to 'src')
-rw-r--r--src/gui_w32.c15
-rw-r--r--src/version.h6
2 files changed, 16 insertions, 5 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 711fe825e..cf1f6fcdb 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1599,6 +1599,7 @@ gui_mch_set_shellsize(int width, int height,
int win_width, win_height;
int win_xpos, win_ypos;
WINDOWPLACEMENT wndpl;
+ int workarea_left;
/* Try to keep window completely on screen. */
/* Get position of the screen work area. This is the part that is not
@@ -1632,11 +1633,21 @@ gui_mch_set_shellsize(int width, int height,
#endif
;
+ /* There is an inconsistency when using two monitors and Vim is on the
+ * second (right) one: win_xpos will be the offset from the workarea of
+ * the left monitor. While with one monitor it's the offset from the
+ * workarea (including a possible taskbar on the left). Detect the second
+ * monitor by checking for the left offset to be quite big. */
+ if (workarea_rect.left > 300)
+ workarea_left = 0;
+ else
+ workarea_left = workarea_rect.left;
+
/* If the window is going off the screen, move it on to the screen.
* win_xpos and win_ypos are relative to the workarea. */
if ((direction & RESIZE_HOR)
- && workarea_rect.left + win_xpos + win_width > workarea_rect.right)
- win_xpos = workarea_rect.right - win_width - workarea_rect.left;
+ && workarea_left + win_xpos + win_width > workarea_rect.right)
+ win_xpos = workarea_rect.right - win_width - workarea_left;
if ((direction & RESIZE_HOR) && win_xpos < 0)
win_xpos = 0;
diff --git a/src/version.h b/src/version.h
index 389219d49..88c9d2ee1 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
*/
#define VIM_VERSION_NODOT "vim70g"
#define VIM_VERSION_SHORT "7.0g"
-#define VIM_VERSION_MEDIUM "7.0g04 BETA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0g04 BETA (2006 May 5)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0g04 BETA (2006 May 5, compiled "
+#define VIM_VERSION_MEDIUM "7.0g05 BETA"
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0g05 BETA (2006 May 6)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0g05 BETA (2006 May 6, compiled "