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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202012172035.0BHKZtx51059999%40masaka.moolenaar.net.

Raspunde prin e-mail lui