Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New test to drag tabpage to move it, and double click to create new tabpage #4258


None yet
2 participants
Copy link

commented Apr 14, 2019

This PR adds 2 new tests:

  • Test_xterm_mouse_drag_to_move_tab() checks that dragging a tab with the mouse moves it.
  • Test_xterm_mouse_double_click_to_create_tab() checks that double-click in tabline creates a new tabpage.

For the tests to work, I needed to introduce 2 sleeps of 500ms each, otherwise some click events can be interpreted as spurious double-clicks. Sleeping is not ideal. Not sure if there is a better way. It's still fast anyway as test_termcodes.vim only takes ~1 second:

$ time make test_termcodes
From test_termcodes.vim:
Executing Test_xterm_mouse_click()
Executing Test_xterm_mouse_click_X_to_close_tab()
Executing Test_xterm_mouse_click_tab()
Executing Test_xterm_mouse_double_click_to_create_tab()
Executing Test_xterm_mouse_drag_statusline()
Executing Test_xterm_mouse_drag_to_move_tab()
Executing Test_xterm_mouse_drag_window_separator()
Executing Test_xterm_mouse_wheel()
Executed 8 tests

real	0m1,084s
user	0m0,043s
sys	0m0,026s`

This comment has been minimized.

Copy link

commented Apr 15, 2019

@brammool brammool closed this in e3e3828 Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.