kovidgoyal / kitty

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

Garbled display on Mac #7020

Closed gnufied closed 9 months ago

gnufied commented 9 months ago

Describe the bug

I notice that occasionally display on Mac just gets garbled. I can't reproduce it reliably and I think it happens when Laptop is resumed from Sleep.

I am running Mosh inside Kitty to run Emacs. It works pretty reliably tbh, except garbled screen as shown in the attached screenshot.

To Reproduce Steps to reproduce the behavior:

  1. Run mosh inside kitty and run Emacs inside it.
  2. Occasionally after resume from Sleep or something, the display gets garbled.
  3. I can't reproduce it reliably however.

Screenshots

Screenshot 2024-01-19 at 12 26 44 PM

Environment details

kitty 0.31.0 (b247fda672) created by Kovid Goyal
Darwin hekumar-mac 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64
ProductName:        macOS ProductVersion:       14.2.1 BuildVersion:        23C71
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /opt/homebrew/bin/zsh
Loaded config files:
  /Users/hekumar/.config/kitty/kitty.conf

Config options different from defaults:
clipboard_control       ('read-clipboard', 'read-primary', 'write-clipboard', 'write-primary')
font_family             FiraCode Nerd Font
font_size               13.0
hide_window_decorations 1
macos_option_as_alt     3
Colors:
    background              #ffffff   
    color1                  #cc0000   
    color10                 #8ae234   
    color11                 #fce94e   
    color12                 #719ecf   
    color13                 #ad7ea7   
    color14                 #34e2e2   
    color15                 #ededec   
    color2                  #4e9a05   
    color3                  #c4a000   
    color4                  #3464a4   
    color5                  #74507a   
    color6                  #05989a   
    color7                  #d3d7cf   
    color8                  #545753   
    color9                  #ef2828   
    cursor                  #ff0000   
    foreground              #000000   
    selection_background    #b4d5ff   
    selection_foreground    #ffffff   

Important environment variables seen by the kitty process:
    PATH                                /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin
    LANG                                en_US.UTF-8
    SHELL                               /opt/homebrew/bin/zsh
    DISPLAY                             /private/tmp/com.apple.launchd.fiTFQ5Noqv/org.xquartz:0
    USER                                hekumar

Additional context

Here is my kitty.conf, but I am not sure if it is related to config:

include ./kitty-themes/themes/Tango_Light.conf

font_family FiraCode Nerd Font

font_size 13
macos_option_as_alt yes

cursor red
hide_window_decorations yes
clipboard_control read-clipboard read-primary write-clipboard write-primary
n19htz commented 9 months ago

i'm not sure if its related to this issue, but last update broke fonts for me aswell

Screenshot 2024-01-20 at 00 05 47

top is kitty, bottom - terminal app macos

kovidgoyal commented 9 months ago

@gnufied I need a way to reproduce your issue or I cant really help. From your screenshot that just looks like whatever is drawing the screen is broken after a window resize. Try issuing a redraw command in emacs and you should be fine.

@n19htz Your issue is completely different and is caused by using outdated codepoints for ned fonts. I highly doubt it has anything to do with a kitty update.