@trygveaa commented on this pull request.
In src/testdir/test_termcodes.vim:
> @@ -220,10 +221,23 @@ func Test_1xterm_mouse_wheel()
call MouseWheelUp(1, 1)
call assert_equal(1, line('w0'), msg)
call assert_equal([0, 7, 1, 0], getpos('.'), msg)
+
+ call MouseWheelRight(1, 1)
I wanted to test the window column position too here, like the asserts above for mouse wheel up/down, but I didn't find any function to report the current window column position. Is there any?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
@trygveaa commented on this pull request.
In src/testdir/test_termcodes.vim:
> @@ -220,10 +221,23 @@ func Test_1xterm_mouse_wheel() call MouseWheelUp(1, 1) call assert_equal(1, line('w0'), msg) call assert_equal([0, 7, 1, 0], getpos('.'), msg) + + call MouseWheelRight(1, 1)I wanted to test the window column position too here, like the asserts above for mouse wheel up/down, but I didn't find any function to report the current window column position. Is there any?
Hm, I see that the tests I added are failing on freebsd and mac, while they are passing on linux. Do you have any tips on debugging this? (I don't have freebsd or mac available)
—
You are receiving this because you commented.
Depending on what you are checking for, you can use one of the following functions: col(), virtcol(), getpos(), getcurpos(), getmousepos(), screencol(), screenpos() and wincol() - Yegappan
Ah, I found this post which said to use 1 + virtcol(".") - wincol(). That seems to work. I've added the asserts to the test.
—
You are receiving this because you are subscribed to this thread.
This adds support for left/right mouse wheel when running in a terminal emulator, for terminal emulators that supports it (e.g. xterm and urxvt).
The support is the same as in gvim, i.e.:
<ScrollWheelLeft> and <ScrollWheelRight>.Additionally, they are now supported as mouse events in :terminal, when an application running in it enables mouse.
https://github.com/vim/vim/pull/6363
—
You are receiving this because you are subscribed to this thread.
Hm, I see that the tests I added are failing on freebsd and mac, while they are passing on linux. Do you have any tips on debugging this? (I don't have freebsd or mac available)
This is fixed now. It turns out that horizontal scrolling is done by the gui feature, even when running in a terminal emulator, and it seems that is disabled in the freebsd and mac tests. So I changed the new tests to only run when gui is enabled.
A further improvement could be to implement horizontal scrolling when the gui feature is disabled.
The two remaining failing builds (huge/gcc-s390x and huge-testgui+coverage/gcc) didn't seem to run properly. I don't think it's related to the changes in this PR.
—
You are receiving this because you commented.