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

Horizontal scrolling is reversed #7439

Closed
MithicSpirit opened this issue May 16, 2024 · 7 comments · Fixed by #7440
Closed

Horizontal scrolling is reversed #7439

MithicSpirit opened this issue May 16, 2024 · 7 comments · Fixed by #7440
Labels

Comments

@MithicSpirit
Copy link
Contributor

MithicSpirit commented May 16, 2024

Describe the bug
Horizontal scrolling is backwards: scrolling left moves right, and scrolling right moves left.

To Reproduce
Steps to reproduce the behavior:

  1. Run a terminal program that supports horizontal scrolling, like Neovim (make sure to set nowrap);
  2. Attempt scrolling left and right on a mouse with a horizontal wheel, or on a trackpad, and observe behavior;
  3. For comparison, try doing the same on another GUI program with horizontal scrolling (either another terminal emulator with horizontal scrolling like Alacritty, or something else like GIMP);
  4. The direction of scrolling is different between 2 and 3.

Environment details

kitty 0.34.0 created by Kovid Goyal
Linux apollonius 6.8.9-7-cachyos-lto #1 SMP PREEMPT_DYNAMIC Thu, 09 May 2024 19:26:57 +0000 x86_64
Arch Linux 6.8.9-7-cachyos-lto (/dev/tty)

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"
Running under: Wayland (sway version 1.9-8aa59c8 (Apr 10 2024, branch 'HEAD')) missing: blur
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/zsh

Config options different from defaults:

Important environment variables seen by the kitty process:
	PATH                                /home/mithic/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/mithic/.config/emacs/bin:/home/mithic/.local/bin:/home/mithic/.local/bin/flatpak:/home/mithic/.local/share/cabal/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin:/usr/lib/rustup/bin
	LANG                                en_US.UTF-8
	EDITOR                              nvim
	SHELL                               /usr/bin/zsh
	DISPLAY                             :0
	WAYLAND_DISPLAY                     wayland-1
	USER                                mithic
	XCURSOR_SIZE                        24
	XDG_CONFIG_DIRS                     :/etc/xdg
	XDG_BIN_HOME                        /home/mithic/.local/bin
	XDG_DATA_HOME                       /home/mithic/.local/share
	XDG_CONFIG_HOME                     /home/mithic/.config
	XDG_SEAT                            seat0
	XDG_VIDEOS_DIR                      /home/mithic/media/videos
	XDG_SESSION_TYPE                    wayland
	XDG_PICTURES_DIR                    /home/mithic/media/pictures
	XDG_PUBLICSHARE_DIR                 /home/mithic/documents/public
	XDG_DOWNLOAD_DIR                    /home/mithic/downloads
	XDG_MUSIC_DIR                       /home/mithic/media/music
	XDG_TEMPLATES_DIR                   /home/mithic/.local/share/templates
	XDG_CACHE_HOME                      /home/mithic/.cache
	XDG_SESSION_CLASS                   user
	XDG_DESKTOP_DIR                     /home/mithic/documents/desktop
	LC_MEASUREMENT                      C
	XDG_VTNR                            1
	XDG_SESSION_ID                      1
	XDG_STATE_HOME                      /home/mithic/.local/state
	XDG_RUNTIME_DIR                     /run/user/1000
	LC_TIME                             C
	XDG_DOCUMENTS_DIR                   /home/mithic/documents
	XDG_DATA_DIRS                       /home/mithic/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/usr/local/share:/usr/share:/home/mithic/.nix-profile/share:/nix/var/nix/profiles/default/share

Additional context
Successfully reproduces with --config NONE.

@rami3l
Copy link

rami3l commented May 30, 2024

@kovidgoyal Oops, looks like this has broken Neovim scrolling for me on macOS 14.5...

Tested with the following steps:

> kitty --version
kitty 0.35.0 created by Kovid Goyal
> kitty --config NONE

[Enters Kitty with default settings]

> nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Run "nvim -V1 -v" for more info
> nvim -u NORC

[Enters Neovim with default settings]

:set wrap!
20i1234567890<ESC>

[Now scrolling to the left will cause the buffer to move right and vice versa]

@MithicSpirit
Copy link
Contributor Author

I think it might've been a wayland-specific issue with the graphics library. I'll make another PR undoing this change and fixing that.

@trygveaa
Copy link
Contributor

@rami3l, @MithicSpirit: It's fixed in master/nightly as far as I can see, see #7475 and #7481.

@rami3l
Copy link

rami3l commented May 30, 2024

@rami3l, @MithicSpirit: It's fixed in master/nightly as far as I can see, see #7475 and #7481.

@trygveaa I see. I'll wait for the next release then. Thanks for doing the linking :)

@rami3l
Copy link

rami3l commented May 31, 2024

I can confirm that the newly-released kitty 0.35.1 has fixed the issue for me. Many thanks for the hard work @kovidgoyal!

@nawordar
Copy link

nawordar commented Jun 6, 2024

I installed Kitty 0.35.1 with Nix on Manjaro and I still have the issue on Wayland. I didn't test on X11, because it is broken on my computer.

@kovidgoyal
Copy link
Owner

I dont see how that's possible. Running

kitty kitten mouse-demo

and moving fingers right on the touchpad gives me WHEEL_RIGHT and left
gives me WHEEL_LEFT. Reverting the patch inverts the output, as
expected. I suggest you use the official kitty binaries as I
have no idea whats in the nix package.

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

Successfully merging a pull request may close this issue.

5 participants