-
Notifications
You must be signed in to change notification settings - Fork 402
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
Support mouse scroll #58
Comments
Please. This is the one thing preventing me from using delta. |
Hi, thanks for the report, let's get to the bottom of this. You might have to help me out a bit as I don't usually use a mouse. Are you familiar with bat? The code in delta relating to paging is literally copied from bat, and my intention in doing that was that the two projects would behave the same in these respects. So, there are many issues in the bat github repo concerning scrolling. Ultimately, the solution the bat author recommends is described here: https://github.com/sharkdp/bat#using-a-different-pager. Would you be able to do the following?
Maybe you could help me understand something: I've read the various bat issues but I don't think I understand what people mean when they talk about "scrolling in less". I have just located a mouse and I find (in MacOS iTerm2 and Terminal.app) that the scroll wheel scrolls the terminal application's main scroll bar, and so "scrolling works" in a sense for delta, less and bat. |
Tried to use bat, same problem as with delta. Try to run |
OK, just to be totally clear, did it work like a charm in both delta and bat? (It should.) So maybe we can close this issue by updating the README to explain that the solution is the same as bat? |
@dandavison @Darkhogg thanks! I confirm that
@dandavison a mention in the README seems appropriate to me too. Thanks for delta!!! |
Oh, nice, I didn't realize that was supposed to make delta work, I just tried bat. |
@Darkhogg @ronjouch awesome, I'll add the explanation to the README. @Darkhogg You actually don't have to use a bat env var; delta also honors the standard Unix In general, my intention is for delta in some ways to be a companion tool to bat. bat does not implement language-specific syntax highlighting for diff output, or for the multi-language diff output produced by |
Hmmm yes, and bat is supposed to user |
@ronjouch is that the effect of the precedence rule? Is As an extra level of complexity, I believe that for |
@dandavison I'm using the fish shell, and I tested my change in a fresh session after editing my config.fish :
|
For me, setting |
Ah sorry, that's right, bat (and therefore delta, which uses a bat's code here) replaces the arguments to less when I'm glad we have a solution here and I'll ping this ticket again when I add an explanation to the README. (Unless someone else wants to which would also be great). |
README: Document env. var to fix mouse scrolling (fix #58)
I think this issue can stay closed now. Thanks all and thanks @ronjouch who added a section on mouse scrolling to the README. |
Hello people. First, what an incredible tool this is! I know this is probably not a problem in delta, but if anyone can help me, I will be very grateful. I'm using fish as my main shell, and my problem follows below: If I set the EV using I tried to set the environment variable through the I decided to ask here, because maybe if I had the |
My less version was
I just installed brew install less
brew link less less --version
less 551 (PCRE regular expressions)
Copyright (C) 1984-2019 Mark Nudelman |
Wonderful wonderful tool. I can't get scrolling to work on |
@freak4pc You could try to append Your terminal emulator needs to support mouse events for this to work, of course. The number of lines to scroll with the wheel can be adjusted with |
Mac user here. I tried the steps outlined in the docs (install latest However, I did manage to get it working with This is the same fix as suggested in this issue for |
Another Mac user. Just updating |
It worked to me with:
On ~/.bashrc |
Hey there. When I use e.g.
Apparently my delta uses There are no aliases or so, that would cause that. Cheers, |
Hey @dandavison With my standalone
so no parameters, and:
But these shouldn't affect scrolling (which works). At the same time for
with:
(with scrolling not working) Now
gives:
with:
(with scrolling working). Now I played around and set It's the Next I wanted to see whether
I accidentally commented only:
(which I merely have because of But that's already it, with that, I get:
and:
So I'd guess it's in fact Is it really needed (I guess so)? And if, couldn’t you just also add At least my So probably, you should actually not not add Yeah not really sure what would be the best way to go. Cheers, |
Hm, neither delta, nor the bat crate that delta uses in places, alter the Also my understanding is that the Could you double check the part of your experiment where you found that [interactive]
diffFilter = delta --color-only adds |
Uhm... I have no idea how I've managed to mess that up ^^ (=sorry) So dug further and found: So git is the "offender" ;-) ... an in fact, even the I've asked at the git mailing list, why they even add Next I'd ask less upstream, why |
Ok great, that's progress! |
Hm is there any cross-platform solution that would work on Windows? (like native Rust tools do) |
After reading a lot of threads, passing git sets Another workaround is to omit IMO the best solution is to replace Sorry for necroing, but I figured this was useful information to have here (especially as https://dandavison.github.io/delta/tips-and-tricks/mouse-scrolling.html points to this issue). |
In the default git pager (
less
on my system) I can use the mouse scroll wheel to scroll through the pager output. Whendelta
is used, the mouse scroll does not work, and I'm forced to use the navigation shortcuts. It would be really nice to be able to scroll with the mouse wheel.System:
Linux pop-os 5.3.0-22-generic #24+system76~1573659475~19.10~26b2022-Ubuntu SMP Wed Nov 13 20:0 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: