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

Implement faux scrolling #550

Closed
PaulBGD opened this issue May 8, 2017 · 9 comments · Fixed by #946
Closed

Implement faux scrolling #550

PaulBGD opened this issue May 8, 2017 · 9 comments · Fixed by #946

Comments

@PaulBGD
Copy link

PaulBGD commented May 8, 2017

Well my example uses two examples. I can use the mouse wheel to scroll inside of Vim, but scrolling inside of htop or man doesn't work.

Let me know if you need any more information.

@PaulBGD
Copy link
Author

PaulBGD commented May 9, 2017

@3goliad Let me rephrase that, certain applications are not handling my mouse's scroll wheel.

@3goliad
Copy link

3goliad commented May 9, 2017

@PaulBGD Oof, I was hoping nobody saw that. My apologies, I read your issue a little too quickly.
Could it be possible that htop and man are using an older version of ncurses?

@PaulBGD
Copy link
Author

PaulBGD commented May 9, 2017

Well they're the latest versions of both provided for Ubuntu 16.10, even if they're a little outdated I'd think that it'd be good for alacritty to have support for them anyways.

@3goliad
Copy link

3goliad commented May 9, 2017

I'm not sure whether or not this is relevant, but this debian issue references an issue with scrolling using the ncurses version provided in 16.10. Which terminal emulators are displaying the correct behavior?

@PaulBGD
Copy link
Author

PaulBGD commented May 9, 2017

Gnome Terminal and Xfce Terminal both work correctly. Doing

man man

in both lets me use the mouse wheel to scroll, however in alacritty it doesn't work.

@NickeZ
Copy link
Contributor

NickeZ commented May 9, 2017

I can reproduce this. I can also scroll man man in gnome-terminal but not in alacritty.

@siiptuo
Copy link
Contributor

siiptuo commented May 9, 2017

VTE library used for example by GNOME and XFCE terminals emulates scrolling for applications without mouse support. From its CHANGELOG:

New feature: mouse scroll-wheel now feeds three arrow-up/down keys to the
terminal if in the "alternate" mode. The alternate mode is used by apps
like vim, less, emacs, screen, etc. This makes the scroll-wheel usable
in a state that it was of no use before.

@algesten
Copy link
Contributor

It seems other terminals implement a hack to make this happen. man uses the default pager (set by either $MANPAGER or $PAGER system env), which often defaults to less.

But less doesn't know anything about mouse scrolling, though I found this:

Many terminal emulators figured out that when it's in alternate screen mode and the application running inside is not interested in mouse events, it makes sense to convert scrolling into Up or Down keypress events.

So the question is whether @jwilm want that hack to be implemented also in alacritty?

@jwilm
Copy link
Contributor

jwilm commented May 14, 2017

Since it seems to be standard behavior in other emulators, we should probably add it.

@jwilm jwilm changed the title Scrolling doesn't work in some applications Implement faux scrolling Jul 1, 2017
@arcnmx arcnmx mentioned this issue Oct 6, 2017
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

6 participants