To: vim_dev@googlegroups.com Subject: Patch 8.1.2117 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2117 Problem: CursorLine highlight used while 'cursorline' is off. Solution: Check 'cursorline' is set. (cloes #5017) Files: src/drawline.c, src/testdir/test_cursorline.vim *** ../vim-8.1.2116/src/drawline.c 2019-09-23 22:17:11.763604665 +0200 --- src/drawline.c 2019-10-05 21:47:17.199457292 +0200 *************** *** 1113,1123 **** // the line number itself. // TODO: Can we use CursorLine instead of CursorLineNr // when CursorLineNr isn't set? ! if ((wp->w_p_cul || wp->w_p_rnu) && (wp->w_p_culopt_flags & CULOPT_NBR) && (row == startrow ! || wp->w_p_culopt_flags & CULOPT_LINE) ! && lnum == wp->w_cursor.lnum) char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN)); #endif } --- 1113,1123 ---- // the line number itself. // TODO: Can we use CursorLine instead of CursorLineNr // when CursorLineNr isn't set? ! if (wp->w_p_cul ! && lnum == wp->w_cursor.lnum && (wp->w_p_culopt_flags & CULOPT_NBR) && (row == startrow ! || wp->w_p_culopt_flags & CULOPT_LINE)) char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN)); #endif } *** ../vim-8.1.2116/src/testdir/test_cursorline.vim 2019-09-14 21:00:01.387100866 +0200 --- src/testdir/test_cursorline.vim 2019-10-05 21:53:12.313172770 +0200 *************** *** 52,58 **** setl nocursorline relativenumber redraw let attr31 = s:screen_attr(1) ! call assert_equal(attr21[0:3], attr31[0:3]) call assert_equal(attr11[4:7], attr31[4:7]) call s:close_windows() --- 52,58 ---- setl nocursorline relativenumber redraw let attr31 = s:screen_attr(1) ! call assert_equal(attr22[0:3], attr31[0:3]) call assert_equal(attr11[4:7], attr31[4:7]) call s:close_windows() *** ../vim-8.1.2116/src/version.c 2019-10-05 21:35:12.228950931 +0200 --- src/version.c 2019-10-05 21:52:07.845577120 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 2117, /**/ -- [Autumn changed into Winter ... Winter changed into Spring ... Spring changed back into Autumn and Autumn gave Winter and Spring a miss and went straight on into Summer ... Until one day ...] "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///