Skip to content

Tab characters appear incorrectly in scrollback since 0.40.0 #8741

Closed

Description

@sayap

Describe the bug
Starting with kitty 0.40.0, when I activate scrollback with ctrl-shift-h, and the screen contains tab characters, then the tab characters will appear incorrectly in scrollback. Moreover, if the screen contains tab characters from diff output, there will be ^G characters.

It was fine with 0.39.1, and the issue still persists with 0.42.1.

To Reproduce
Steps to reproduce the behavior:

  1. Create a text file /tmp/1.txt with content:
a
	b
		c
			d
				e
  1. Create a text file /tmp/2.txt with content:
a
	b
		cc
			d
				e
  1. cat /tmp/1.txt
  2. cat /tmp/2.txt
  3. diff -u /tmp/1.txt /tmp/2.txt
  4. Activate scrollback

Screenshots
Normal mode:
Image

Scrollback mode:
Image

Environment details
(above steps were done with kitty --config NONE)

kitty 0.40.0 created by Kovid Goyal
Linux havertz 6.15.2 #4 SMP PREEMPT_DYNAMIC Fri Jun 20 00:59:10 WIB 2025 x86_64

This is havertz (Linux x86_64 6.15.2) 14:44:11

DISTRIB_ID="Gentoo"
Running under: Wayland (kwin 6.4.0)
OpenGL: '4.6 (Core Profile) Mesa 25.1.4' Detected version: 4.6
Frozen: False
Fonts:
  medium: LiberationMono: /usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf:0
          Features: ()
    bold: LiberationMono-Bold: /usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf:0
          Features: ()
  italic: LiberationMono-Italic: /usr/share/fonts/liberation-fonts/LiberationMono-Italic.ttf:0
          Features: ()
      bi: LiberationMono-BoldItalic: /usr/share/fonts/liberation-fonts/LiberationMono-BoldItalic.ttf:0
          Features: ()
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib64/kitty
  extensions dir: /usr/lib64/kitty/kitty
  system shell: /bin/bash
System color scheme: dark. Applied color theme type: none

Config options different from defaults:

Important environment variables seen by the kitty process:
	PATH                                /usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/spark-3/bin:/usr/lib/spark-3/sbin:/usr/lib/llvm/20/bin:/usr/lib/llvm/19/bin:/opt/cuda/bin:/home/sayap/bin:/home/sayap/.cargo/bin:/home/sayap/go/bin
	LANG                                en_US.utf8
	EDITOR                              /usr/bin/micro
	SHELL                               /bin/bash
	DISPLAY                             :0
	WAYLAND_DISPLAY                     wayland-0
	USER                                sayap
	XDG_CONFIG_DIRS                     /home/sayap/.config/kdedefaults:/etc/xdg
	XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session1
	XDG_MENU_PREFIX                     plasma-
	XDG_SEAT                            seat0
	XDG_SESSION_TYPE                    wayland
	XDG_CURRENT_DESKTOP                 KDE
	XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
	XDG_SESSION_CLASS                   user
	XDG_VTNR                            8
	XDG_SESSION_ID                      3
	XDG_RUNTIME_DIR                     /run/user/1000
	XDG_DATA_DIRS                       /usr/local/share:/usr/share

Activity

  1. added a commit that references this issue on Jun 20, 2025
    bca017f
  2. added a commit that references this issue on Jul 8, 2026
    3fa27ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions