To: vim_dev@googlegroups.com Subject: Patch 8.2.2152 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2152 Problem: screenpos() does not include the WinBar offset. Solution: Use W_WINROW() instead of directly using w_window. (closes #7487) Files: src/move.c, src/testdir/test_cursor_func.vim *** ../vim-8.2.2151/src/move.c 2020-11-15 21:11:15.207039765 +0100 --- src/move.c 2020-12-17 21:21:59.689528676 +0100 *************** *** 1247,1253 **** // character is left or right of the window row = scol = ccol = ecol = 0; } ! *rowp = wp->w_winrow + row + rowoff; *scolp = scol + coloff; *ccolp = ccol + coloff; *ecolp = ecol + coloff; --- 1247,1253 ---- // character is left or right of the window row = scol = ccol = ecol = 0; } ! *rowp = W_WINROW(wp) + row + rowoff; *scolp = scol + coloff; *ccolp = ccol + coloff; *ecolp = ecol + coloff; *** ../vim-8.2.2151/src/testdir/test_cursor_func.vim 2020-06-22 21:34:24.331583419 +0200 --- src/testdir/test_cursor_func.vim 2020-12-17 21:21:25.753555784 +0100 *************** *** 101,106 **** --- 101,111 ---- close call assert_equal({}, screenpos(999, 1, 1)) bwipe! + + call assert_equal({'col': 1, 'row': 1, 'endcol': 1, 'curscol': 1}, screenpos(win_getid(), 1, 1)) + nmenu WinBar.TEST : + call assert_equal({'col': 1, 'row': 2, 'endcol': 1, 'curscol': 1}, screenpos(win_getid(), 1, 1)) + nunmenu WinBar.TEST endfunc func Test_screenpos_number() *** ../vim-8.2.2151/src/version.c 2020-12-17 20:50:20.788386045 +0100 --- src/version.c 2020-12-17 21:19:41.581601777 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2152, /**/ -- DENNIS: Oh, very nice. King, eh! I expect you've got a palace and fine clothes and courtiers and plenty of food. And how d'you get that? By exploiting the workers! By hanging on to outdated imperialist dogma which perpetuates the social and economic differences in our society! "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 ///