Commit Graph

8770 Commits

Author SHA1 Message Date
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
Kovid Goyal
c40ff94395 Fix error when trying to serialize a tab without any windows 2025-10-10 12:39:09 +05:30
alex-huff
3ca953d98e panel: allow toggling fullscreen regardless of edge 2025-10-09 16:46:44 -05:00
Kovid Goyal
dc0bcbcec3 reset a few more image fields 2025-10-09 22:29:36 +05:30
Kovid Goyal
55f1ab3843 Merge branch 'fix-panel-toggle-fullscreen' of https://github.com/alex-huff/kitty 2025-10-09 21:43:18 +05:30
Kovid Goyal
a2604f6958 Fix animated images sometimes not auto playing or auto playing at the wrong start frame if the same image id is used for a subsequent image 2025-10-09 21:42:37 +05:30
alex-huff
59371ded7e panel: restore left and right margin when leaving fullscreen 2025-10-09 10:06:55 -05:00
Kovid Goyal
ef8079eb27 Clear python error when using read_from_disk_cache_simple 2025-10-09 15:45:03 +05:30
Kovid Goyal
811b4fa127 Fix #9083 2025-10-08 10:02:51 +05:30
Kovid Goyal
3d5200e1ce On second thoughts dont inject PATH as it is already handled by which() and exe_search_paths 2025-10-08 05:26:27 +05:30
Kovid Goyal
67ca9f5b7d Rename read_from_login_shell -> read_from_shell 2025-10-08 05:21:48 +05:30
Kovid Goyal
6879432704 When using read_from_login_shell inject PATH into os.environ
This allows kitty to use that PATH to launch child executables
2025-10-08 05:19:47 +05:30
Kovid Goyal
726c693edf Avoid reading shell env twice to get editor
Its cached, but still...
2025-10-07 22:27:57 +05:30
Kovid Goyal
a9f80fe05b Allow easily injecting env vars from the login shell config into the env in which kitty runs child processes
Fixes #9042
2025-10-07 22:23:31 +05:30
Kovid Goyal
fcccadc8f3 Make reading resolved shell env more robust
We pass -0 to env so that it works even for env vars that have newlines
in them.
2025-10-07 21:44:01 +05:30
Kovid Goyal
fa808c3b10 Fix tab bar sometimes showing incorrect tabs when it is filtered to show only tabs from the current session
Fixes #9079
2025-10-07 14:35:13 +05:30
Kovid Goyal
4af95b3c51 choose_files: start work on image previews 2025-10-07 11:11:42 +05:30