akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.38k stars 61 forks source link

Mouse Selection Broken #238

Closed fhill2 closed 2 years ago

fhill2 commented 3 years ago

OS: Windows Insiders Build 21390 NVIM: v0.5.0-dev+1274-gbb3372792 Build Type: RelWithDebInfo

Goneovim version: 5.14.1 commit: 2dcf144 actions CI

Posting this here to verify if this is an intended/default feature of Goneovim!

GIF: Left = Neovide Center = Goneovim windows app Right = Goneovim linux inside WSL (I wanted to test/show both at once)

In Neovide, I'm able to hold down left click and drag up/down to select text that is out of bounds of the current viewport. I can do this by either dragging the mouse up or using the scroll wheel. In Goneovim I am unable to select text that is out of bounds of the current viewport. When I drag the mouse up to select more text, the text selection is reset.

neovim config is empty apart from set mouse=a settings.toml hasn't been changed from default.

up

Weirdly enough I'm able to select text with the mouse if I drag down (or move mouse wheel down) in Goneovim Linux (WSL) but not in Goneovim Windows.

down

EDIT: I tried this on my arch linux install on Linux Host and the same behaviour exists (cant select text with mouse).

akiyosi commented 3 years ago

Hi, sorry for the late reply. Thank you for this report, the problem report with the GIF is very understandable and helpful.

I have not been able to reproduce this issue in my environment, but this behavior is not the intended specification. However, in the handling of scrolling operations implemented in goneovim, I believe that there will be some neovim settings or other that will cause this problem.

I will continue to investigate, but what are the actual steps to reproduce this? For example, do you run "set mouse=a" manually after launching with "goneovim -u NONE" or something similar?

fhill2 commented 3 years ago

@akiyosi Thank you for your reply!

To confirm, after launching with goneovim -u NONE, and manually runningset mouse=a the problem with not being able to select text with the mouse still exists (on Linux Host)

Also here is a gist of the Goneovim log output started with the command Goneovim --debug=/path/to/log -u NONE (nvim 0.5 Goneovim ea18bc8)

fhill2 commented 3 years ago

NVIM v0.5.0-dev+1449-gbdf3df402 Nvim 0.4.4 Goneovim Linux bin from actions CI


goneovim -u NONE set mouse=a try to select text


Starting from this version/commit the mouse selection breaks on my system (actions commit) in both nvim version 0.4 and 0.5.

Goneovim versions from the Actions CI before this commit the mouse selection is working okay in both nvim version 0.4 and 0.5.

akiyosi commented 2 years ago

@fhill2 Hi, I apologize for neglecting this issue for so long. However, due to some compound issues (on the Neovim core side, mouse handling on multigrid architecture, etc.) I could not immediately start working on fixing the problem.

The 0.4.13 branch that I am currently working on fixes the mouse handling issues on multigrid, and the latest version of Neovim (0.6.0 development branch) currently fixes the mouse handling bug.

If you are still interested in this project, I would appreciate it if you could check the reproducibility of the problem in the latest binary.

https://github.com/akiyosi/goneovim/actions/runs/1403969285

akiyosi commented 2 years ago

I think I have identified the cause of this problem in the process of reporting another problem(https://github.com/akiyosi/goneovim/issues/297, https://github.com/akiyosi/goneovim/issues/39#issuecomment-999180208). Probably the cause is that while the mouse drag event is being processed, other UI related widgets are unintentionally raised, causing the event to be cancelled. Since those issue has been fixed, I'll close this issue in the hope that it will be fixed as well.

I'll reopen this issue if I encounter the problem again.