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%.
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%.
The locks were not being initialized, and since I was there did some
general cleanup as well, moved the locks array into displayLinks rather
than having another global namespaced variable.
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.
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