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

Duplicated newline when doing copy/paste #5832

Closed foxhoundsk closed 1 year ago

foxhoundsk commented 1 year ago

Describe the bug When doing copy/paste, for example, a code snippet from this repo or gedit, there always exist a duplicated newline for each line being pasted.

To Reproduce Steps to reproduce the behavior:

  1. copy any text from browser or GUI editor (e.g. gedit).
  2. paste the text to, for example, Vim.
  3. there would be duplicated newlines

Screenshots The result: image

The expected result: image

Environment details

kitty 0.26.3 created by Kovid Goyal
Linux Zulu 5.19.13-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 04 Oct 2022 14:36:58 +0000 x86_64
Arch Linux 5.19.13-arch1-1 (/dev/tty)

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/fox/.config/kitty/kitty.conf

Config options different from defaults:
click_interval       0.3
enable_audio_bell    False
font_family          Bitstream Vera Sans Mono Nerd Font Complete Mono
font_size            14.0
tab_bar_edge         1
tab_bar_style        powerline
Colors:
    color1               #ff0000   
    color10              #56db3a   
    color11              #ffff00   
    color12              #0084d4   
    color13              #b729d9   
    color14              #e0ffff   
    color2               #56db3a   
    color3               #ffe700   
    color4               #00d4f1   
    color5               #ff00ff   
    color6               #00ffff   
    color7               #c0c0c0   
    color8               #1b1d21   
    color9               #dc322f   
    cursor               #dc628f   
    foreground           #e0e0e0   
    selection_background #00ffff   

Important environment variables seen by the kitty process:
    PATH                                /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
    LANG                                en_US.UTF-8
    SHELL                               /usr/bin/zsh
    DISPLAY                             :0
    USER                                fox
    XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session1
    XDG_SEAT                            seat0
    XDG_SESSION_DESKTOP                 i3
    XDG_SESSION_TYPE                    x11
    XDG_CURRENT_DESKTOP                 i3
    XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
    XDG_SESSION_CLASS                   user
    XDG_VTNR                            1
    XDG_SESSION_ID                      2
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_DATA_DIRS                       /home/fox/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share

Additional context Starting kitty with kitty --config NONE yields the same result. Plus, this probably has nothing to do with my Vim setting since another terminal emulator, Alacritty, has no duplicated newline mentioned above.

Thanks!

kovidgoyal commented 1 year ago

dup of #5528