Skip to content

Text selection ignores empty lines #8435

Description

@vulpes-vulpeos

Describe the bug
When selecting text which has empty lines, empty lines will be ignored and not selected.

To Reproduce
Steps to reproduce the behavior:

  1. run echo -e "First line\n\nThird line"
  2. Select text with mouse from F to e
  3. See that second line wasn't selected
  4. If you copy-paste text, you'll get:
First line
Third line

Instead of :

First line

Third line

Screenshots

Image

Environment details

Config options different from defaults:
enable_audio_bell       False
font_family             DejaVuSansM Nerd Font Mono
mouse_hide_wait         0.0
wheel_scroll_multiplier 3.0
window_padding_width    FloatEdges(left=5.0, top=5.0, right=5.0, bottom=5.0)
Added shortcuts:
        ctrl+c →  copy_and_clear_or_interrupt
        ctrl+v →  paste_from_clipboard
Colors:
        active_border_color     #286983   
        active_tab_background   #f2e9e1   
        active_tab_foreground   #575279   
        background              #faf4ed   
        color0                  #f2e9e1   
        color1                  #b4637a   
        color10                 #e5e6e2   
        color11                 #fbead8   
        color12                 #eaeae5   
        color13                 #f1e8e6   
        color14                 #fae8e1   
        color15                 #9893a5   
        color2                  #286983   
        color3                  #ea9d34   
        color4                  #56949f   
        color5                  #907aa9   
        color6                  #d7827e   
        color7                  #797593   
        color8                  #fffaf3   
        color9                  #f6e4e0   
        cursor                  #cecacd   
        cursor_text_color       #575279   
        foreground              #575279   
        inactive_border_color   #dfdad9   
        inactive_tab_background #faf4ed   
        inactive_tab_foreground #9893a5   
        selection_background    #dfdad9   
        selection_foreground    #575279   
        url_color               #907aa9   
Important environment variables seen by the kitty process:
        PATH                                /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/local/go/bin:/home/vulpeos/go/bin
        LANG                                en_IE.UTF-8
        VISUAL                              nvim
        EDITOR                              nvim
        SHELL                               /bin/bash
        DISPLAY                             :0
        WAYLAND_DISPLAY                     wayland-1
        USER                                vulpeos
        XCURSOR_SIZE                        24
        XDG_SESSION_TYPE                    wayland
        LC_COLLATE                          C
        XDG_RUNTIME_DIR                     /tmp/1000-runtime-dir
This debug output has been copied to the clipboard

PS: You can see that Environment details copied from kitty doesn't have empty lines.

Additional context
My config:

copy_on_select no
enable_audio_bell no
strip_trailing_spaces never


scrollback_lines 2000
wheel_scroll_multiplier 3.0

mouse_hide_wait 0.0

window_padding_width 5.0
# kitty list-fonts
font_family     DejaVuSansM Nerd Font Mono

map ctrl+c copy_and_clear_or_interrupt
map ctrl+v paste_from_clipboard


# BEGIN_KITTY_THEME
include rose-pine-dawn.conf
# END_KITTY_THEME

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions