To: vim_dev@googlegroups.com Subject: Patch 8.2.1780 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1780 Problem: Statusline not updated when splitting windows. Solution: Call status_redraw_all(). (Jason Franklin, closes #5496) Files: src/window.c, src/testdir/test_statusline.vim *** ../vim-8.2.1779/src/window.c 2020-09-26 19:11:35.713467957 +0200 --- src/window.c 2020-10-01 19:04:29.195852533 +0200 *************** *** 1273,1285 **** if (flags & (WSP_TOP | WSP_BOT)) (void)win_comp_pos(); ! /* ! * Both windows need redrawing ! */ redraw_win_later(wp, NOT_VALID); - wp->w_redr_status = TRUE; redraw_win_later(oldwin, NOT_VALID); ! oldwin->w_redr_status = TRUE; if (need_status) { --- 1273,1283 ---- if (flags & (WSP_TOP | WSP_BOT)) (void)win_comp_pos(); ! // Both windows need redrawing. Update all status lines, in case they ! // show something related to the window count or position. redraw_win_later(wp, NOT_VALID); redraw_win_later(oldwin, NOT_VALID); ! status_redraw_all(); if (need_status) { *** ../vim-8.2.1779/src/testdir/test_statusline.vim 2020-06-25 19:01:32.989844093 +0200 --- src/testdir/test_statusline.vim 2020-10-01 19:01:08.608203171 +0200 *************** *** 433,436 **** --- 433,453 ---- call delete('XTest_statusline') endfunc + func Test_statusline_after_split_vsplit() + only + + " Make the status line of each window show the window number. + set ls=2 stl=%{winnr()} + + split | redraw + vsplit | redraw + + " The status line of the third window should read '3' here. + call assert_equal('3', nr2char(screenchar(&lines - 1, 1))) + + only + set ls& stl& + endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.1779/src/version.c 2020-10-01 16:53:13.165345429 +0200 --- src/version.c 2020-10-01 19:02:41.888048214 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1780, /**/ -- "Making it up? Why should I want to make anything up? Life's bad enough as it is without wanting to invent any more of it." -- Marvin, the Paranoid Android in Douglas Adams' "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- Bram@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 ///