kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.11k stars 972 forks source link

Scrolling in Ubuntu 22.04 - scroll twice to move once #5217

Closed keevan closed 2 years ago

keevan commented 2 years ago

Describe the bug When scrolling in the terminal, I've noticed it takes 2 scroll "bumps" (e.g. the feedback on the mouse wheel) to move up or down a line once.

To Reproduce Steps to reproduce the behavior:

  1. Be on Ubuntu 22.04
  2. Perform ls a few times until you can start scrolling
  3. Try scrolling and notice it takes 2 scroll events to move up or down a single line visually.

Screenshots If applicable, add screenshots to help explain your problem.

Environment details


kitty 0.24.2 created by Kovid Goyal
Linux hostname 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022 x86_64
Ubuntu 22.04 LTS hostname /dev/tty

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
Running under: Wayland
Frozen: True
Paths:
  kitty: /home/username/.local/kitty.app/bin/kitty
  base dir: /home/username/.local/kitty.app/lib/kitty
  extensions dir: /home/username/.local/kitty.app/lib/kitty-extensions
  system shell: /bin/bash
Loaded config files:
  /home/username/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_title_template {title}
copy_on_select            clipboard
cursor_blink_interval     0.0
enable_audio_bell         False
enabled_layouts           ['tall', 'stack', 'fat']
font_family               Fira Code
hide_window_decorations   1
input_delay               0
mouse_hide_wait           1.0
scrollback_lines          10000
strip_trailing_spaces     smart
tab_bar_style             powerline
tab_title_template        {index} - {title}
term                      xterm-256color
Added shortcuts:
    ctrl+shift+p > p → kitten hints --customize-processing hints-wrms.py
    ctrl+shift+y > e → kitten hints --type url --program @
    ctrl+shift+y > h → kitten hints --type hash --program @
    ctrl+shift+y > l → kitten hints --type line --program @
    ctrl+shift+y > w → kitten hints --type word --program @
    ctrl+shift+y > y → kitten hints --type hyperlink --program @
    ctrl+shift+y > shift+f → kitten hints --type path --program @
    ctrl+shift+y > shift+l → kitten hints --type line --multiple --program @
Colors:
    background                #300a24   
    cursor                    #e6e600   
    foreground                #ffffff   
    inactive_border_color     #333333   

Environment variable names seen by the kitty process:
    DBUS_SESSION_BUS_ADDRESS
    DESKTOP_SESSION
    DISPLAY
    GDMSESSION
    GIO_LAUNCHED_DESKTOP_FILE
    GIO_LAUNCHED_DESKTOP_FILE_PID
    GJS_DEBUG_OUTPUT
    GJS_DEBUG_TOPICS
    GNOME_DESKTOP_SESSION_ID
    GNOME_SETUP_DISPLAY
    GNOME_SHELL_SESSION_MODE
    GTK_MODULES
    HOME
    IM_CONFIG_PHASE
    INVOCATION_ID
    JOURNAL_STREAM
    LANG
    LC_ADDRESS
    LC_IDENTIFICATION
    LC_MEASUREMENT
    LC_MONETARY
    LC_NAME
    LC_NUMERIC
    LC_PAPER
    LC_TELEPHONE
    LC_TIME
    LOGNAME
    MANAGERPID
    PAPERSIZE
    PATH
    PWD
    QT_ACCESSIBILITY
    QT_IM_MODULE
    SESSION_MANAGER
    SHELL
    SHLVL
    SSH_AGENT_PID
    SSH_AUTH_SOCK
    SSL_CERT_FILE
    SYSTEMD_EXEC_PID
    USER
    USERNAME
    WAYLAND_DISPLAY
    XAUTHORITY
    XDG_CONFIG_DIRS
    XDG_CURRENT_DESKTOP
    XDG_DATA_DIRS
    XDG_MENU_PREFIX
    XDG_RUNTIME_DIR
    XDG_SESSION_CLASS
    XDG_SESSION_DESKTOP
    XDG_SESSION_TYPE
    XMODIFIERS
    _

Additional context Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

Whats interesting is that the problem doesn't seem to exist when running kitty --config NONE. But the settings I'm enabling don't seem to related? Here's a dump of the enabled/changed settings. Maybe I'm missing something simple.

active_tab_title_template {title}
background #300A24
copy_on_select clipboard
cursor #e6e600
cursor_blink_interval 0
enable_audio_bell no
enabled_layouts tall,stack,fat
font_family      Fira Code
foreground #fff
hide_window_decorations yes
inactive_border_color #333
inactive_text_alpha 1.0
input_delay 0
map kitty_mod+p>p kitten hints --customize-processing hints-wrms.py
map kitty_mod+y>e kitten hints --type url --program @
map kitty_mod+y>h kitten hints --type hash --program @
map kitty_mod+y>l kitten hints --type line --program @
map kitty_mod+y>shift+f kitten hints --type path --program @
map kitty_mod+y>shift+l kitten hints --type line --multiple --program @
map kitty_mod+y>w kitten hints --type word --program @
map kitty_mod+y>y kitten hints --type hyperlink --program @
mouse_hide_wait 1.0
scrollback_lines 10000
strip_trailing_spaces smart
tab_bar_style powerline
tab_title_template {index} - {title}
term xterm-256color
kovidgoyal commented 2 years ago

Does not reproduce for me using kitty 0.25.2 on Wayland. Try using https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.wheel_scroll_multiplier or https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.touch_scroll_multiplier depending on if the OS is reporting your mouse wheel as high precision or not

keevan commented 2 years ago

Ah, I updated and went through this exercise. What I failed to realise was launching a new terminal from within an older session of kitty (e.g. via ctrl+shift+n) doesn't actually start the new version of kitty (confirmed via ctrl+shift+f6) but launches the older version.

I can confirm that this does not appear to be an issue for the latest / current version. Thank you for your prompt response!

kitty 0.25.2 created by Kovid Goyal