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

Is thera a way move by mouse when into normal mode? #19

Closed
zaiqiang-dong opened this issue Mar 19, 2024 · 3 comments
Closed

Is thera a way move by mouse when into normal mode? #19

zaiqiang-dong opened this issue Mar 19, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@zaiqiang-dong
Copy link

Is thera a way move by mouse when into normal mode?

@juliusHuelsmann
Copy link
Owner

Hey :)

I think with the latest version of the history patch this should be possible in normal mode; in normal mode you can click a location, which should subsequently become active. If you click twice, the word underneath is selected and copied into clipboard, I think if you click three times it copies the entire line.

In insert mode this is currently not possible, might be cool to add that (+ maybe a way to leave normal mode & keep the current location). But I think when I had a look at this initially, the naive implementation seemed like a bit more work / error prone than I expected, because we not only need the location on screen, but also extract the current location inside the command buffer. But that's quite a while ago, I am not too sure if I remember correctly

@juliusHuelsmann juliusHuelsmann added the enhancement New feature or request label Mar 19, 2024
@juliusHuelsmann
Copy link
Owner

or do you mean scroll up and down? That is currently not implemented, but should be an easy-ish addition (that you could also patch on top of the vim patch).

for moving up you can use:

historyMove(0, -(int)state.m.c, 0);

motion down is without the -.

you can theoretically add this to the shortcuts table, but that would be executed even if not in normal mode, so probably you should implement it in executeMotion or kPressHist; (wherever you have access to the input produced by spinning the weel up / down resp).

If you want help on this I can look into this at some point in the future and come back to you about this in this issue in the next couple of days / weeks

@zaiqiang-dong
Copy link
Author

historyMove work ok for me.Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants