kovidgoyal / kitty

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

"map <shoutcut> clear_terminal to_cursor active" doesn't seem to be working properly. #7397

Closed la1den closed 2 weeks ago

la1den commented 2 weeks ago

Describe the bug I've set the shortcut map ctrl+k clear_terminal to_cursor active, according to the documentation it's supposed to delete the scrollback, but when I scroll up with the mouse wheel, I can still see the historical output, behaving the same as to_cursor_scroll.

To Reproduce Steps to reproduce the behavior:

  1. set map ctrl+k clear_terminal to_cursor active
  2. restart kitty and execute the fc-list command.
  3. press ctrl+k
  4. scroll up with the mouse wheel.

Screenshots

Environment details

kitty 0.33.1 created by Kovid Goyal
Linux DESKTOP-6U7U2U0.bbrouter 6.6.28-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 10:11:09 +0000 x86_64
Arch Linux 6.6.28-1-lts (/dev/tty)

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"
Running under: X11
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/zsh
Loaded config files:
  /home/lfh/.config/kitty/kitty.conf

Config options different from defaults:
font_family      IosevkaTerm Nerd Font
font_size        14.0
scrollback_lines 100000
tab_bar_style    slant
Added shortcuts:
    ctrl+1 →  goto_tab 1
    ctrl+2 →  goto_tab 2
    ctrl+3 →  goto_tab 3
    ctrl+4 →  goto_tab 4
    ctrl+5 →  goto_tab 5
    ctrl+6 →  goto_tab 6
    ctrl+7 →  goto_tab 7
    ctrl+k →  clear_terminal to_cursor active
Colors:
    background       #2c2c2c   

Additional context

clear_terminal to_cursor active behaves the same as to_cursor_scroll when there are many output lines, but behaves normally with few outputs.

kovidgoyal commented 2 weeks ago

The docs dont say it deletes the scrollback, the everything there means everything on the screen. That should probably be clarified.

If you wan to clear oth the best way to do so is create an alias in your shell rc files, as described in: https://sw.kovidgoyal.net/kitty/conf/#shortcut-kitty.Reset-the-terminal