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

triple click does not select the entire line, it selects only the visible part #5654

Closed deepu-james closed 1 year ago

deepu-james commented 1 year ago

Describe the bug I am not sure if this is a bug or if this is deliberately excluded. When I select a line that is long enough that it does not fit in a screen, kitty selects only those part of the line that is visible in the screen. Not the part of the line that is not visible in screen.

To Reproduce Steps to reproduce the behavior:

  1. echo a line that fills more than the screen.
  2. triple click somewhere on the line.
  3. observe that only the visible part of the line is only selected, not the entire line.

Environment details

kitty 0.26.5 created by Kovid Goyal
Darwin Deepus-MacBook-Pro.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64
ProductName:        macOS ProductVersion:       13.0 BuildVersion:      22A380
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: /bin/zsh
Loaded config files:
  /Users/deepu/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_title_template  {fmt.fg._fff}{title}
background_opacity         0.85
bold_font                  JetBrainsMono Nerd Font Bold
bold_italic_font           JetBrainsMono Nerd Font Bold Italic
copy_on_select             clipboard
dynamic_background_opacity True
enable_audio_bell          False
font_family                JetBrainsMono Nerd Font
font_size                  17.0
hide_window_decorations    1
italic_font                JetBrainsMono Nerd Font Italic
mouse_hide_wait            3.0
scrollback_lines           10000000
tab_bar_style              powerline
tab_powerline_style        slanted
tab_title_template         {fmt.fg.c2c2c2}{title}
window_padding_width       FloatEdges(left=1.0, top=1.0, right=1.0, bottom=1.0)
Added mouse actions:
    shift+cmd+left release grabbed →  mouse_handle_click link
    shift+cmd+left release ungrabbed →  mouse_handle_click link
Added shortcuts:
    cmd+d →  close_tab
    opt+left →  send_text all \x1b\x62
    opt+right →  send_text all \x1b\x66
    shift+cmd+, →  move_tab_backward
    shift+cmd+. →  move_tab_forward
    shift+cmd+end →  scroll_end
    shift+cmd+enter →  new_window_with_cwd
    shift+cmd+home →  scroll_home
    shift+cmd+insert →  clear_terminal scrollback active
    shift+cmd+k →  clear_terminal scrollback active
    shift+cmd+l →  next_layout
    shift+cmd+left →  previous_tab
    shift+cmd+m →  set_tab_title
    shift+cmd+r →  start_resizing_window
    shift+cmd+right →  next_tab
    shift+cmd+t →  new_tab_with_cwd
Removed shortcuts:
    shift+cmd+d →  close_window
Changed shortcuts:
    shift+cmd+/ →  launch --location=hsplit --allow-remote-control kitty +kitten search.py @active-kitty-window-id
    shift+cmd+[ →  previous_window
    shift+cmd+] →  next_window
Colors:
    active_border_color        #c9cbff   
    active_tab_background      #575268   
    active_tab_foreground      #f5c2e7   
    background                 #122637   
    bell_border_color          #fae3b0   
    color1                     #ff0000   
    color10                    #3bcf1d   
    color11                    #ecc809   
    color12                    #5555ff   
    color13                    #ff55ff   
    color14                    #6ae3f9   
    color2                     #37dd21   
    color3                     #fee409   
    color4                     #1460d2   
    color5                     #ff005d   
    color6                     #00bbbb   
    color7                     #bbbbbb   
    color8                     #545454   
    color9                     #f40d17   
    cursor                     #f0cb09   
    cursor_text_color          #1e1e2e   
    foreground                 #ffffff   
    inactive_border_color      #575268   
    inactive_tab_background    #1e1e2e   
    inactive_tab_foreground    #d9e0ee   
    mark1_background           #96cdfb   
    mark1_foreground           #1e1e2e   
    mark2_background           #f5c2e7   
    mark2_foreground           #1e1e2e   
    mark3_background           #b5e8e0   
    mark3_foreground           #1e1e2e   
    selection_background       #18344f   
    selection_foreground       #122637   
    tab_bar_background         #161320   
    url_color                  #f5e0dc   

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                               /bin/zsh
    USER                                deepu
kovidgoyal commented 1 year ago

Does not reproduce for me, with the steps:

1) Start kitty 2) Run kitty +runpy 'print("1 1" * 200)' 3) Triple click the first line of 1 11 1s 4) all lines are selected, as expected.

deepu-james commented 1 year ago

Can you try this

I can try to record a gif if that helps.

kovidgoyal commented 1 year ago

The entire screen is selected for me. If you mean the part that is scrolled off the screen that is by design, since I dont like automatica selection that the user cannot see.

deepu-james commented 1 year ago

Yes. I meant that. Is there a way this can be overridden?

kovidgoyal commented 1 year ago

No, there's no setting for it.