kovidgoyal / kitty

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

close_window now behaves like closing the whole tab #7039

Closed subokita closed 8 months ago

subokita commented 8 months ago

Describe the bug the close_window function in config file, used to close the window (of the horizontal / vertical layout). But somehow after the recent update (Version 0.32), it tries to close the whole tab (asking me for confirmation "Are you sure you want to close this tab, it has 2 windows running?")

IIRC, it was still working properly in version 0.31.

map cmd+w close_window

To Reproduce Steps to reproduce the behavior:

  1. update kitty.conf file with map cmd+w close_window
  2. update kitty.conf file with map cmd+d combine : new_window_with_cwd : goto_layout horizontal
  3. cmd+d on the kitty tab
  4. then cmd.+w on the kitty tab

Environment details

kitty 0.32.0 (eb5dd364ae) created by Kovid Goyal
Darwin mini.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 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: /bin/zsh
Loaded config files:
  /Users/sub_o/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_font_style              (True, False)
active_tab_title_template          {sup.index}{title[title.rfind('/') + 1: ]}
background_opacity                 0.4
background_tint                    0.8
confirm_os_window_close            1
cursor_beam_thickness              3.5
cursor_shape                       2
dim_opacity                        0.8
draw_minimal_borders               False
font_family                        DejaVu Sans Mono for Powerline
font_size                          13.0
hide_window_decorations            2
inactive_text_alpha                0.5
macos_quit_when_last_window_closed True
startup_session                    /Users/sub_o/.config/kitty/default-session.conf
tab_activity_symbol                ♻️
tab_bar_margin_height              TabBarMarginHeight(outer=5.0, inner=5.0)
tab_bar_margin_width               10.0
tab_bar_style                      powerline
tab_powerline_style                slanted
tab_title_template                  {sup.index}{title.replace( 'sub_o@mini-2075: ', '')}
window_padding_width               FloatEdges(left=15.0, top=5.0, right=15.0, bottom=5.0)
Added shortcuts:
    cmd+[ →  previous_window
    cmd+] →  next_window
    cmd+d →  combine : new_window_with_cwd : goto_layout horizontal
    cmd+left →  send_text all \x01
    cmd+right →  send_text all \x05
    opt+left →  send_text all \x1b\x62
    opt+right →  send_text all \x1b\x66
Removed shortcuts:
    cmd+, →  edit_config_file
    cmd+enter →  new_window
    cmd+h →  hide_macos_app
    cmd+k →  clear_terminal to_cursor active
    cmd+m →  minimize_macos_window
    cmd+n →  new_os_window
    cmd+q →  quit
    cmd+t →  new_tab
    cmd+w →  close_tab
    ctrl+cmd+, →  load_config_file
    ctrl+cmd+f →  toggle_fullscreen
    opt+cmd+h →  hide_macos_other_apps
    opt+cmd+r →  clear_terminal reset active
    opt+cmd+s →  toggle_macos_secure_keyboard_entry
    shift+cmd+/ →  open_url https://sw.kovidgoyal.net/kitty/
    shift+cmd+[ →  previous_tab
    shift+cmd+] →  next_tab
    shift+cmd+w →  close_os_window
Changed shortcuts:
    cmd+- →  change_font_size all -2.0, change_font_size all -2.0
    cmd+0 →  change_font_size all 0, change_font_size all 0
    cmd+1 →  first_window, goto_tab 1
    cmd+2 →  second_window, goto_tab 2
    cmd+3 →  third_window, goto_tab 3
    cmd+4 →  fourth_window, goto_tab 4
    cmd+5 →  fifth_window, goto_tab 5
    cmd+6 →  sixth_window, goto_tab 6
    cmd+7 →  seventh_window, goto_tab 7
    cmd+8 →  eighth_window, goto_tab 8
    cmd+9 →  ninth_window, goto_tab 9
    cmd+= →  change_font_size all +2.0, change_font_size all +2.0
    cmd+c →  copy_to_clipboard, copy_to_clipboard
    kitty_mod+q →  close_tab, no-op
    shift+cmd+d →  close_window, combine : new_window_with_cwd : goto_layout vertical
Colors:
    active_border_color                #99ccff   
    active_tab_background              #99ccff   
    cursor                             #99ccff   
    inactive_tab_foreground            #333333   

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                                sub_o

On older versions of kitty, run kitty --debug-config instead

Additional context

kovidgoyal commented 8 months ago

dup of #7016