Commit Graph

8786 Commits

Author SHA1 Message Date
Kovid Goyal
0c3566cb80 Merge branch 'session-restore-tab-focus' of https://github.com/jackielii/kitty 2025-11-02 22:12:03 +05:30
Kovid Goyal
d32adcabea Automatic color scheme switching: Fix title bar color not being updated
Fixes #9167
2025-11-02 22:09:41 +05:30
Kovid Goyal
a5e0ba9f68 macOS: Quick access terminal: Fix a crash when changing font size
Cocoa window resize gets triggerred for QAT on font size change causing an out
of sequence render but the font data is not yet ready causing the crash.
Blank window instead of rendering when font data is not ready in an out
of sequence render.

Fixes #9178
2025-11-02 21:56:17 +05:30
bea4dev
a5848151e0 fix inner_corner 2025-11-02 16:46:08 +09:00
Kovid Goyal
666054955b macOS: Add an item to the global menu to Cycle through OS windows 2025-10-31 09:31:24 +05:30
Jackie Li
9b4bd01148 Fix --wait-for-child-to-exit not working with overlay windows
The issue was a closure problem where the on_child_death callback
referenced a responder variable that was created after do_launch()
was called. This caused the callback to fail when the child process
exited because responder didn't exist in the callback's closure.

The fix creates the responder before defining the callback and adds
a null check in the callback to ensure it exists before using it.

This allows commands like:
  kitten @ launch --type=overlay --wait-for-child-to-exit bash -c "echo test"
to properly wait for the child process to exit and return the exit code.
2025-10-27 13:04:05 +00:00
Jackie Li
23f49e3825 serialised tabs as they appear visually 2025-10-27 08:56:34 +00:00
Jackie Li
dfbf5103c2 add focus_tab to restore tab focus by default 2025-10-27 08:47:35 +00:00
Jackie Li
c324018969 make it work on tabs matching as well 2025-10-27 08:27:24 +00:00
Jackie Li
ae29085e5c add state:focused_os_window to match window 2025-10-27 08:22:53 +00:00
Kovid Goyal
5e366cb5a3 Merge branch 'feature-save-as-session' of https://github.com/jackielii/kitty 2025-10-27 08:39:31 +05:30
Zak Johnson
edf532b8ee Fix typo in launch docs 2025-10-26 13:00:10 -07:00
Jackie Li
eedd56ff93 cleanup + keep it simple 2025-10-26 17:47:58 +00:00
Jackie Li
2a129f2b3b remove --focus-tab and add docs 2025-10-26 17:32:23 +00:00
Jackie Li
47b4c94c61 implement --base-dir and --focus-tab to save_as_session 2025-10-26 11:08:43 +00:00
Jackie Li
75537187a8 support search_syntax in focus_tab 2025-10-26 09:44:29 +00:00
Jackie Li
c9645378f7 add focus-tab command to session file 2025-10-26 09:44:04 +00:00
Kovid Goyal
a54f30ab3d Fix incorrect calculation of tab bar margins
Fixes #9154
2025-10-26 08:51:41 +05:30
Kovid Goyal
c2be527d3d Merge branch 'utf-8-simd-parser-fix' of https://github.com/Wukuyon/kitty 2025-10-24 14:49:58 +05:30
Wukuyon
9d336be0d3 Combine ascii_mask/counts check with errors vector in simd-string-impl.h
Initialize errors by xoring ascii_mask with the movemask result and
setting the scalar mismatch into the chunk_is_invalid vector.

Removes another conditional branch.
Improves unicode benchmark performance by about 3%.
2025-10-23 22:37:33 -06:00
Wukuyon
1c869d3629 Refine test for overlapping UTF-8 sequences in simd-string-impl.h
Replace a shift_right_by_one_byte call with comparison operations.
Improves unicode benchmark performance by about 1%.
2025-10-23 22:37:33 -06:00
Wukuyon
65890de60d Fix UTF-8 overlong and special range checks in simd-string-impl.h
Modified `start_classification` in `utf8_decode_to_esc` in `simd-string-impl.h`, which now:

Rejects `0xC0`, `0xC1` and `0xF5..0xFF` lead bytes in UTF-8 subsequences.

Enforces special ranges for the second subsequence bytes after `0xE0`, `0xED`, `0xF0` and `0xF4` bytes to prevent overlong sequences, surrogates, and code points above U+10FFFF.

Accumulates UTF-8 validation errors in a single vector to avoid many conditional branches.

Worsens unicode benchmark performance by about 4%.
2025-10-23 22:37:33 -06:00
Kovid Goyal
c7117c2839 Make the os window id available in tab bar drawing 2025-10-24 07:32:36 +05:30
Kovid Goyal
0a6ed15858 ... 2025-10-22 13:53:44 +05:30
Kovid Goyal
8e2b489eed Fix a couple more places where right/bottom edges were considered inclusive
Fixes #9132 (I hope as I cant reproduce it)
2025-10-22 12:29:26 +05:30
Kovid Goyal
77f282785c Allow resizing label to have lower background opacity if overall background opacity is low 2025-10-22 11:57:54 +05:30
Kovid Goyal
a9ad58fa78 Draw OS window contents at top left instead of bottom left during live resize
Also, since I was here, have the size display be translucent.

Fixes #9141
2025-10-22 11:53:43 +05:30
Kovid Goyal
8630f21af1 Merge branch 'evan-goode/accumulate-value120' of https://github.com/evan-goode/kitty 2025-10-21 09:43:43 +05:30
Evan Goode
80a9bdb999 Smoothly handle VALUE120 scroll events 2025-10-20 09:32:59 -04:00
Kovid Goyal
1e1a1851d0 Add support for Unicode 17
This is preliminary, all tests pass, but needs more careful review.
2025-10-18 09:59:53 +05:30
Kovid Goyal
c2fb9f14b5 Only reset termios when user triggers reset action rather than in reponse to reset escape code
Fixes #9126
2025-10-18 08:53:50 +05:30
Kovid Goyal
f06f85a9e0 Cleanup previous PR 2025-10-15 09:12:32 +05:30
Kovid Goyal
6586780371 Merge branch 'draw-borders-when-focused' of https://github.com/jackielii/kitty 2025-10-15 08:56:02 +05:30
Kovid Goyal
dd7caaa91b ... 2025-10-15 08:09:29 +05:30
Kovid Goyal
ee9a5386b9 When doing a reset also reset termios to its initial state 2025-10-15 07:56:45 +05:30
Jackie Li
b99a5bd7da fix comment 2025-10-14 19:50:47 +01:00
Jackie Li
6db3441e29 respect draw_window_borders_for_single_window=yes in lgd.draw_minimal_borders 2025-10-14 19:23:35 +01:00
Jackie Li
05810722be use draw_window_borders_for_single_window
single window + has focus -> active border
single window + no focus -> inactive border
multiple window + regardless of focus -> active border

a) option set:

    1) Single *visible* window in the layout - always draw a border
    border color = active if os_window is focused else inactive

    2) multiple visible windows in the layout - no change in existing
    behavior, in particular draw_minimal_borders is respected as before.

b) option unset - no changes from present behavior

option default to false.
2025-10-14 18:39:23 +01:00
Kovid Goyal
7c237dcb02 macOS: Fix progress bar on dock icon doubling speed with every indeterminate progress state without an intervening clear
Fixes #9114
2025-10-14 22:28:31 +05:30
Jackie Li
09e16adf8b Add draw_borders_when_focused option
Adds a new configuration option `draw_borders_when_focused` that allows
borders to be drawn around windows when the OS window is focused,
regardless of the layout or number of windows.

This is useful for:
- Seeing which terminal window has focus in layouts like stack that
  normally don't show borders
- Showing borders even when there's only a single window
- Providing visual feedback about OS window focus state

When enabled, borders use the active_border_color when the OS window is
focused and inactive_border_color when unfocused. This behavior only
applies when the option is enabled, preserving existing behavior by
default.

The implementation:
- Adds the draw_borders_when_focused config option (default: no)
- Modifies border drawing logic to check OS window focus state
- Triggers border redraw when OS window focus changes
- Only affects behavior when the option is explicitly enabled
2025-10-13 20:07:47 +01:00
bea4dev
4342cc68bd fix dhcorner & dvcorner & dcorner 2025-10-14 02:39:05 +09:00
bea4dev
7ff67b78cc fix corner 2025-10-13 22:22:32 +09:00
Kovid Goyal
a072a6fd2a Dont dump commands when --dump-bytes alone is specified
dumping commands flushes and therefore is expensive and might change
timing significantly.
2025-10-13 04:16:38 +05:30
Kovid Goyal
6ea4bfa433 Fix #9100 2025-10-12 09:00:13 +05:30
Jun Woo Shin
abd220fefc Fix references to text_rendering_strategy 2025-10-11 15:01:18 -04:00
alex-huff
14100a0274 decorations: simplify rounded corner 2025-10-11 02:29:11 -05:00
Kovid Goyal
ef15aa3f51 We only clamp to the unit interval 2025-10-11 10:23:35 +05:30
Kovid Goyal
c397fc4301 Fix continuous redraw when disable_ligatures set to cursor and tab bar visible
Fixes #9071
2025-10-11 10:14:36 +05:30
Kovid Goyal
6d66c87077 Cleanup previous PR
Fixes #9091
2025-10-11 09:16:35 +05:30
bea4dev
001c627f52 reimpl SDF rounded corner 2025-10-11 09:15:05 +05:30