vim-patch:8.2.4523: when gvim is started maximized the 'window' option isn't set

Problem:    When gvim is started maximized the 'window' option isn't set
            properly. (Christian J. Robinson)
Solution:   Check if 'windows' was already set or not. (Ken Takata,
            closes vim/vim#9904)
6ca883dd8a
This commit is contained in:
zeertzjq 2022-10-12 07:47:28 +08:00
parent 45cc5fd765
commit 3b562535c3

View File

@ -5226,7 +5226,7 @@ void win_new_screensize(void)
if (old_Rows != Rows) { if (old_Rows != Rows) {
// If 'window' uses the whole screen, keep it using that. // If 'window' uses the whole screen, keep it using that.
// Don't change it when set with "-w size" on the command line. // Don't change it when set with "-w size" on the command line.
if (p_window == old_Rows - 1 || (old_Rows == 0 && p_window == 0)) { if (p_window == old_Rows - 1 || (old_Rows == 0 && !option_was_set("window"))) {
p_window = Rows - 1; p_window = Rows - 1;
} }
old_Rows = Rows; old_Rows = Rows;