comparison src/testdir/test_functions.vim @ 28087:4c60e656e054 v8.2.4568

patch 8.2.4568: getmousepos() does not compute the column below the last line Commit: https://github.com/vim/vim/commit/10792feebd237aee89270669e509e85cafdfac60 Author: Sean Dewar <seandewar@users.noreply.github.com> Date: Tue Mar 15 09:46:54 2022 +0000 patch 8.2.4568: getmousepos() does not compute the column below the last line Problem: getmousepos() does not compute the column below the last line. Solution: Also compute the column when the mouse is below the last line. (Sean Dewar, closes #9946)
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Mar 2022 11:00:07 +0100
parents 236b80af9833
children 1c97a31f8f22
comparison
equal deleted inserted replaced
28086:d66743eafbb7 28087:4c60e656e054
2781 \ winrow: 1, 2781 \ winrow: 1,
2782 \ wincol: 50, 2782 \ wincol: 50,
2783 \ line: 1, 2783 \ line: 1,
2784 \ column: 8, 2784 \ column: 8,
2785 \ }, getmousepos()) 2785 \ }, getmousepos())
2786
2787 " If the mouse is positioned past the last buffer line, "line" and "column"
2788 " should act like it's positioned on the last buffer line.
2789 call test_setmouse(2, 25)
2790 call assert_equal(#{
2791 \ screenrow: 2,
2792 \ screencol: 25,
2793 \ winid: win_getid(),
2794 \ winrow: 2,
2795 \ wincol: 25,
2796 \ line: 1,
2797 \ column: 4,
2798 \ }, getmousepos())
2799 call test_setmouse(2, 50)
2800 call assert_equal(#{
2801 \ screenrow: 2,
2802 \ screencol: 50,
2803 \ winid: win_getid(),
2804 \ winrow: 2,
2805 \ wincol: 50,
2806 \ line: 1,
2807 \ column: 8,
2808 \ }, getmousepos())
2786 bwipe! 2809 bwipe!
2787 endfunc 2810 endfunc
2788 2811
2789 " Test for glob() 2812 " Test for glob()
2790 func Test_glob() 2813 func Test_glob()