To: vim_dev@googlegroups.com Subject: Patch 8.0.1705 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1705 Problem: When making a vertical split the mode message isn't always updated, "VISUAL" remains. (Alexei Averchenko) Solution: Only reset clear_cmdline when filling all columns of the last screen line. (Tom M. closes #2611) Files: src/screen.c, src/testdir/test_window_cmd.vim *** ../vim-8.0.1704/src/screen.c 2018-04-10 18:47:16.097527017 +0200 --- src/screen.c 2018-04-13 20:29:04.489860436 +0200 *************** *** 8699,8705 **** if (row == Rows - 1) /* overwritten the command line */ { redraw_cmdline = TRUE; ! if (c1 == ' ' && c2 == ' ') clear_cmdline = FALSE; /* command line has been cleared */ if (start_col == 0) mode_displayed = FALSE; /* mode cleared or overwritten */ --- 8699,8706 ---- if (row == Rows - 1) /* overwritten the command line */ { redraw_cmdline = TRUE; ! if (start_col == 0 && end_col == Columns ! && c1 == ' ' && c2 == ' ' && attr == 0) clear_cmdline = FALSE; /* command line has been cleared */ if (start_col == 0) mode_displayed = FALSE; /* mode cleared or overwritten */ *** ../vim-8.0.1704/src/testdir/test_window_cmd.vim 2018-01-31 19:06:45.446257165 +0100 --- src/testdir/test_window_cmd.vim 2018-04-13 20:28:41.182041651 +0200 *************** *** 483,486 **** --- 483,510 ---- bwipe xxx endfunc + func Test_visual_cleared_after_window_split() + new | only! + let smd_save = &showmode + set showmode + let ls_save = &laststatus + set laststatus=1 + call setline(1, ['a', 'b', 'c', 'd', '']) + norm! G + exe "norm! kkvk" + redraw + exe "norm! \v" + redraw + " check if '-- VISUAL --' disappeared from command line + let columns = range(1, &columns) + let cmdlinechars = map(columns, 'nr2char(screenchar(&lines, v:val))') + let cmdline = join(cmdlinechars, '') + let cmdline_ltrim = substitute(cmdline, '^\s*', "", "") + let mode_shown = substitute(cmdline_ltrim, '\s*$', "", "") + call assert_equal('', mode_shown) + let &showmode = smd_save + let &laststatus = ls_save + bwipe! + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.0.1704/src/version.c 2018-04-12 21:37:28.618561305 +0200 --- src/version.c 2018-04-13 20:31:06.592923159 +0200 *************** *** 764,765 **** --- 764,767 ---- { /* Add new patch number below this line */ + /**/ + 1705, /**/ -- Living in Hollywood is like living in a bowl of granola. What ain't fruits and nuts is flakes. /// 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 ///