Patch 8.0.0299
Problem: When the GUI window is resized Vim does not always take over the
new size. (Luchr)
Solution: Reset new_p_guifont in gui_resize_shell(). Call
gui_may_resize_shell() in the main loop.
Files: src/main.c, src/gui.c
*** ../vim-8.0.0298/src/main.c 2016-11-24 15:09:03.405856662 +0100
--- src/main.c 2017-02-03 21:54:32.793578542 +0100
***************
*** 1118,1123 ****
--- 1118,1127 ----
skip_redraw = FALSE;
else if (do_redraw || stuff_empty())
{
+ # ifdef FEAT_GUI
+ /* If ui_breakcheck() was used a resize may have been postponed. */
+ gui_may_resize_shell();
+ # endif
#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
/* Trigger CursorMoved if the cursor moved. */
if (!finish_op && (
*** ../vim-8.0.0298/src/gui.c 2016-08-29 22:42:20.000000000 +0200
--- src/gui.c 2017-02-03 21:41:15.659646605 +0100
***************
*** 1459,1464 ****
--- 1459,1466 ----
}
again:
+ new_pixel_width = 0;
+ new_pixel_height = 0;
busy = TRUE;
/* Flush pending output before redrawing */
***************
*** 1468,1475 ****
gui.num_rows = (pixel_height - gui_get_base_height()) / gui.char_height;
gui_position_components(pixel_width);
-
gui_reset_scroll_region();
/*
* At the "more" and ":confirm" prompt there is no redraw, put the cursor
* at the last line here (why does it have to be one row too low?).
--- 1470,1477 ----
gui.num_rows = (pixel_height - gui_get_base_height()) / gui.char_height;
gui_position_components(pixel_width);
gui_reset_scroll_region();
+
/*
* At the "more" and ":confirm" prompt there is no redraw, put the cursor
* at the last line here (why does it have to be one row too low?).
***************
*** 1491,1507 ****
busy = FALSE;
! /*
! * We could have been called again while redrawing the screen.
! * Need to do it all again with the latest size then.
! */
if (new_pixel_height)
{
! pixel_width = new_pixel_width;
! pixel_height = new_pixel_height;
! new_pixel_width = 0;
! new_pixel_height = 0;
! goto again;
}
}
--- 1493,1514 ----
busy = FALSE;
! /* We may have been called again while redrawing the screen.
! * Need to do it all again with the latest size then. But only if the
size
! * actually changed. */
if (new_pixel_height)
{
! if (pixel_width == new_pixel_width && pixel_height == new_pixel_height)
! {
! new_pixel_width = 0;
! new_pixel_height = 0;
! }
! else
! {
! pixel_width = new_pixel_width;
! pixel_height = new_pixel_height;
! goto again;
! }
}
}
***************
*** 1511,1528 ****
void
gui_may_resize_shell(void)
{
- int h, w;
-
if (new_pixel_height)
- {
/* careful: gui_resize_shell() may postpone the resize again if we
* were called indirectly by it */
! w = new_pixel_width;
! h = new_pixel_height;
! new_pixel_width = 0;
! new_pixel_height = 0;
! gui_resize_shell(w, h);
! }
}
int
--- 1518,1527 ----
void
gui_may_resize_shell(void)
{
if (new_pixel_height)
/* careful: gui_resize_shell() may postpone the resize again if we
* were called indirectly by it */
! gui_resize_shell(new_pixel_width, new_pixel_height);
}
int
*** ../vim-8.0.0298/src/version.c 2017-02-03 21:19:00.289942006 +0100
--- src/version.c 2017-02-03 21:56:01.788913106 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 299,
/**/
--
Citizens are not allowed to attend a movie house or theater nor ride in a
public streetcar within at least four hours after eating garlic.
[real standing law in Indiana, United States of America]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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/d/optout.