Re: [patch] Window size is not restored when the command-line window closed.
Hirohito Higashi wrote: Hi Bram and Vim developer, How to reproduce: - run vim $ vim -N -u NONE - open quickfix window and vsp and sp on top window. :copen|wincmd k|vsp|sp - open command-line window and close this. q:CR Expected behavior: - Restore all window size before open command-line window. Actual behavior: - Top left window height is not restored. Investigation result: It is not going to see only up to the parent frame of the local frame in order to expand the height of window in the process to be restored in win_size_restore() I think that it may be processed in descending order of height window perhaps. However, the same problem can occur even for window width. I think a good solution to carry out twice the restore process. Attach a patch. please check and include this. Thanks for the fix. I suppose the proper solution would be to restore in the order of the window tree, but that's complicated. Restoring twice probably works in most situations and it's a nice simple solution. -- Living on Earth includes an annual free trip around the Sun. /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[patch] Window size is not restored when the command-line window closed.
Hi Bram and Vim developer, How to reproduce: - run vim $ vim -N -u NONE - open quickfix window and vsp and sp on top window. :copen|wincmd k|vsp|sp - open command-line window and close this. q:CR Expected behavior: - Restore all window size before open command-line window. Actual behavior: - Top left window height is not restored. Investigation result: It is not going to see only up to the parent frame of the local frame in order to expand the height of window in the process to be restored in win_size_restore() I think that it may be processed in descending order of height window perhaps. However, the same problem can occur even for window width. I think a good solution to carry out twice the restore process. Attach a patch. please check and include this. Thank you. -- Best regards, Hirohito Higashi -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. diff -r 0efec12f52ac src/window.c --- a/src/window.c Thu Jul 10 22:01:47 2014 +0200 +++ b/src/window.c Tue Jul 15 00:45:21 2014 +0900 @@ -4836,15 +4836,18 @@ garray_T *gap; { win_T *wp; -int i; +int i, j; if (win_count() * 2 == gap-ga_len) { - i = 0; - for (wp = firstwin; wp != NULL; wp = wp-w_next) + for (j = 0; j 2; ++j) { - frame_setwidth(wp-w_frame, ((int *)gap-ga_data)[i++]); - win_setheight_win(((int *)gap-ga_data)[i++], wp); + i = 0; + for (wp = firstwin; wp != NULL; wp = wp-w_next) + { + frame_setwidth(wp-w_frame, ((int *)gap-ga_data)[i++]); + win_setheight_win(((int *)gap-ga_data)[i++], wp); + } } /* recompute the window positions */ (void)win_comp_pos();