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
[RFC] Restore vim's tab drag behavior #4874
Conversation
Can you try to add a test? See mouse_spec.lua |
Okay, I will add a test. |
I can confirm that this patch does not address the NerdTree issue I reported in #3310 (comment) . |
Would you mind adding a commit for #3310 (comment) ? Don't need to add a test for it if it's too difficult. |
The ASAN build might be failing because that build is very slow. You could increase the timeout of the screen tests to 15 seconds (default is 3.5 seconds):
(see |
@@ -64,6 +64,294 @@ describe('Mouse input', function() | |||
]]) | |||
end) | |||
|
|||
describe('tab drag', function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this describe
block:
before_each(function()
screen.timeout = 15000
end)
Thanks for the help @justinmk. I thought that would do it for sure, but it seems to still be failing on the left tab drags for some of the builds. I will look over the code and tests to see if there is anything weird with the left drags and if not try a longer timeout. |
Only 1 test failed now. I guess it needs to be 30s 😓 |
Forget 30s... I'm gonna go with 60... and then reduce :) |
On both of the os x machines: ... to the code and tests it is |
It is looking a bit better. This time 1 os x build stalled, the other said the tests I added failed, and the other linux one was just having other issues. |
Now both os x builds stalled... at least no errors this time ;) |
@sach1t Is this ready? Can you squash it a bit and rebase? |
@justinmk I think the only issue was that os x did not like drags that go left. I will squash it today, rebase and see how the tests go. Hopefully it should be fine, and get merged. |
2c0a97c
to
08bc374
Compare
It seems that dragging tabs left on os x comes across as a click. I am going to run some tests against master as dragging in tabline works. |
So I brought over the tests for the in tab line dragging to master in pull request #5263. And similar to here the left dragging is failing only on os x builds. This either means it is a problem with the tests or something other than this patch. However, since the tests are passing on the other builds it probably means that it is not the tests themselves. |
These tests fail on master, so it's not a regression. Changes in neovim#4874 (parent commit) seem to work (and pass most CI), so skipping these tests is better than blocking the changes.
Closes neovim#4663 References neovim#3310
These tests fail on master, so it's not a regression. Changes in neovim#4874 (parent commit) seem to work (and pass most CI), so skipping these tests is better than blocking the changes.
These tests fail on master, so it's not a regression. Changes in #4874 (parent commit) seem to work (and pass most CI), so skipping these tests is better than blocking the changes.
The left-drag test is failing (on master; twice now) in non-macOS UBSAN build (which is slow): https://s3.amazonaws.com/archive.travis-ci.org/jobs/159554179/log.txt so the failure is almost certainly timing-related. That means we can tweak it somehow, then enable it for macOS too. |
@justinmk thanks. I will also look into fixing those test cases on master, so those tests can be re-enabled. |
FEATURES: 0b5a7e4 neovim#4432 API: external UIs can render custom popupmenu c6ac4f8 neovim#4934 API: call any API method from vimscript 31df051 neovim#4568 API: nvim_call_atomic(): multiple calls in a single request b268ba3 neovim#5424 API: nvim_win_get_number(), nvim_tabpage_get_number() e7e2844 has("nvim-1.2.3") checks for a specific Nvim version 522b885 neovim#5295, neovim#5493 `:CheckHealth` checks tmux, terminfo, performance 719dae2 neovim#5384 events: allow event processing in getchar() f25797f neovim#5386 API: metadata: Nvim version & API level 22dfe69 neovim#5389 API: metadata: "since", "deprecated_since" 605e743 Added QuickFixLine highlight group CHANGES: 4af6ec7 neovim#5253 perf: Disable clipboard in do_cmdline() 6e9f329 neovim#5299 perf: Skip foldUpdate() in insert-mode. 9d4fcec neovim#5426 perf: Do not auto-update folds for some foldmethods. eeec0ca neovim#5419 tui: Default to normal-mode cursor shape. FIXES: e838452 neovim#5436 tui: Fix "weird characters" / "bleeding termcodes" 10a54ad neovim#5243 signal_init: Always unblock SIGCHLD. bccb49b neovim#5316 eval.c: Fix memory leak for detached pty job 626065d neovim#5227 tchdir: New tab should inherit CWD. cd321b7 neovim#5292 getcwd(): Return empty string if CWD is invalid. 6127eae shada: Fix non-writeable ShaDa directory handling ca65514 neovim#2789 system(): Respect shellxescape, shellxquote 2daf54e neovim#4874 Restore vim-like tab dragging 0c536b5 neovim#5319 syntax.c: Support bg/fg special color-names. 3c53371 neovim#4972 from justinmk/schedule-ui_refresh 68bcb32 neovim#4789 tui.c: Do not wait for tui loop on teardown. c8b6ec2 neovim#5409 v:count broken in command-line window 6bc3bce neovim#5461 fix emoji display 51937e1 neovim#5470 fix :terminal with :argadd, :argu 79d77da neovim#5481 external UIs: opening multiple files from command-line 657ba62 neovim#5501 rplugin: resolve paths in manifest file 6a6f188 neovim#5502 system('foo &', 'bar'): Show error, don't crash. 1ff162c neovim#5515 os_nodetype: open fd with O_NONBLOCK 2a6c5bb neovim#5450 modeline: Handle version number overflow. 0ade1bb neovim#5225 CI tests now run against Windows!
FEATURES: 0b5a7e4 neovim#4432 API: external UIs can render custom popupmenu c6ac4f8 neovim#4934 API: call any API method from vimscript 31df051 neovim#4568 API: nvim_call_atomic(): multiple calls in a single request b268ba3 neovim#5424 API: nvim_win_get_number(), nvim_tabpage_get_number() e7e2844 has("nvim-1.2.3") checks for a specific Nvim version 522b885 neovim#5295, neovim#5493 `:CheckHealth` checks tmux, terminfo, performance 719dae2 neovim#5384 events: allow event processing in getchar() f25797f neovim#5386 API: metadata: Nvim version & API level 22dfe69 neovim#5389 API: metadata: "since", "deprecated_since" 605e743 Added QuickFixLine highlight group CHANGES: 4af6ec7 neovim#5253 perf: Disable clipboard in do_cmdline() 6e9f329 neovim#5299 perf: Skip foldUpdate() in insert-mode. 9d4fcec neovim#5426 perf: Do not auto-update folds for some foldmethods. eeec0ca neovim#5419 tui: Default to normal-mode cursor shape. FIXES: e838452 neovim#5436 tui: Fix "weird characters" / "bleeding termcodes" 10a54ad neovim#5243 signal_init: Always unblock SIGCHLD. bccb49b neovim#5316 eval.c: Fix memory leak for detached pty job 626065d neovim#5227 tchdir: New tab should inherit CWD. cd321b7 neovim#5292 getcwd(): Return empty string if CWD is invalid. 6127eae shada: Fix non-writeable ShaDa directory handling ca65514 neovim#2789 system(): Respect shellxescape, shellxquote 2daf54e neovim#4874 Restore vim-like tab dragging 0c536b5 neovim#5319 syntax.c: Support bg/fg special color-names. 3c53371 neovim#4972 from justinmk/schedule-ui_refresh 68bcb32 neovim#4789 tui.c: Do not wait for tui loop on teardown. c8b6ec2 neovim#5409 v:count broken in command-line window 6bc3bce neovim#5461 fix emoji display 51937e1 neovim#5470 fix :terminal with :argadd, :argu 79d77da neovim#5481 external UIs: opening multiple files from command-line 657ba62 neovim#5501 rplugin: resolve paths in manifest file 6a6f188 neovim#5502 system('foo &', 'bar'): Show error, don't crash. 1ff162c neovim#5515 os_nodetype: open fd with O_NONBLOCK 2a6c5bb neovim#5450 modeline: Handle version number overflow. 0ade1bb neovim#5225 CI tests now run against Windows!
This fixes issue #4663.
It also depends on pull request #4873.
I just restored the tab drag behavior from vim. Since mouse release events now work, as of pull request #4873, the original tab drag implementation works correctly in neovim.