On Tuesday, July 9, 2013 3:50:20 PM UTC+2, David Fishburn wrote:
> I believe I saw this fixed earlier, or something related.
>
>
> I have tested this with:
>
> :ver
> VIM - Vi IMproved 7.4a BETA (2013 Jul 6, compiled Jul 9 2013 09:34:36)
>
> MS-Windows 32-bit GUI version with OLE support
> Included patches: 1-6
> Compiled by me
> Big version with GUI. Features included (+) or not (-):
>
>
> Run on Windows 7 x64.
>
>
>
> gvim.exe -u NONE -U NONE
>
>
> Open Vim.
> Resize Vim so that the top and bottom of the Vim window is nearly maximized.
> Or
>
> Simply maximize Vim by double clicking on the title bar.
>
>
> Run the following:
>
> :echo confirm('Test'.repeat("\nNext line", 80))
>
>
>
> This will produce a dialog box with a scrollbar within it.
> The scrolling of the items is correct.
>
>
> But, there are 2 issues.
>
>
>
> 1. Assuming your taskbar is at the default windows position (bottom of
> screen) then window is much longer than than the window size. Many of the
> "Next lines" are off the screen and the OK button is no where to be seen.
>
>
>
> 2. If you taskbar is at the top of the screen (as mine always is) then the
> problem may stem from the same issue of being too large, but there is an
> additional problem. The top of the window is underneath the taskbar, so you
> cannot click on it to move it. Many of the "Next lines" are off the screen
> and the OK button is no where to be seen.
>
>
>
> Please make sure Vim has either been maximized or nearly the length of the
> screen first. If you do not, you will not see the same behaviour. The
> confirm modal window is larger than Vim, but it will not exceed screen size
> if Vim isn't using most of screen real-estate.
>
>
>
> David
The attached patch should fix it. The dialog is border size smaller than the
window so it would fit when the window is maximized.
Also made the dialog a bit smaller when we don't have a window, e.g. gvim -h.
It didn't fit completely on my PC, part of the dialog was behind the taskbar.
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
diff -r feddf3681a17 src/gui_w32.c
--- a/src/gui_w32.c Sun Jul 28 18:29:29 2013 +0200
+++ b/src/gui_w32.c Thu Aug 01 01:47:22 2013 +0200
@@ -3179,12 +3179,12 @@
maxDialogWidth = workarea_rect.right - workarea_rect.left - 100;
if (maxDialogWidth > 600)
maxDialogWidth = 600;
- maxDialogHeight = workarea_rect.bottom - workarea_rect.top - 100;
+ maxDialogHeight = workarea_rect.bottom - workarea_rect.top - 150;
}
else
{
- /* Use our own window for the size, unless it's very small. */
- GetWindowRect(s_hwnd, &rect);
+ /* Use our own window's client area for the size, unless it's very small. */
+ GetClientRect(s_hwnd, &rect);
maxDialogWidth = rect.right - rect.left
- (GetSystemMetrics(SM_CXFRAME) +
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
@@ -3192,8 +3192,9 @@
maxDialogWidth = DLG_MIN_MAX_WIDTH;
maxDialogHeight = rect.bottom - rect.top
- - (GetSystemMetrics(SM_CXFRAME) +
- GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ - (GetSystemMetrics(SM_CYFRAME) +
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 4
+ - GetSystemMetrics(SM_CYCAPTION);
if (maxDialogHeight < DLG_MIN_MAX_HEIGHT)
maxDialogHeight = DLG_MIN_MAX_HEIGHT;
}