word_diff_center filled an (m+1)*(n+1) table of ints for the differing
middle of every changed line pair. For a 100 KB line of minified
JavaScript with a word inserted near each end that is 2.6 GB and over
two seconds, and compute_centers runs the line pairs in parallel.
Changed words are only highlighted when they pair up by position, which
needs the same number of words on both sides, so return changed_center
right away when the counts differ. The output is the same as before in
that case. Lines with equal word counts but more than 2048 words between
the first and last changed word now get the central highlight too
instead of a huge table, and the table uses int32.
score_item tried every combination of positions of the needle chars in the
item, which is exponential in the length of the query. Typing the full name
of a theme like "Solarized Dark Higher Contrast" in the themes kitten froze it
for about half a minute.
Instead find the best score for each position of each needle char from the
best scores for the previous char. The per char scores are added in the same
order as before, so the scores are bit for bit identical. When several sets
of positions have exactly the same score, the highlighted positions can be
different from before.
Problem: On X11/KDE, with two kitty windows on different virtual
desktops, switching desktops with the keyboard while the mouse pointer
sits still caused both windows to report as "focused". Keyboard input
still went to visible window, but paste and other actions went to the
other window. Fixed by ignoring FocusIn/FocusOut when ``detail ==
NotifyPointer``.
Logfile before::
0x2 focused: 0 0x2 focused: 1 0x1 focused: 1
Logfile after::
0x2 focused: 0 0x1 focused: 1
Video attached. This same approach is used by Qt and Wine,
148bc4bc05/src/plugins/platforms/xcb/qxcbwindow.cpp (L2292-L2312)9d17984f27/dlls/winex11.drv/event.c (L697)
fish splits the output of the completion function on newlines to build
the candidate list, so an option whose help text spans paragraphs added
its continuation lines as candidates of their own. Build the candidate
with the newline replacement the fish2 branch already used, so both
paths agree.
active_window_padding only counted padding and cell-size compensation,
so the space a layout reserves for the window border (and margin) was
treated as outside the active window. With dim-inactive-windows this
left a thin dimmed strip around the active window and dimmed the active
border color.
Use render_data.geometry.spaces, which is exactly what the layout
reserved around the window. This respects layouts that do not reserve
border space in minimal border mode, so the active area never extends
into a neighboring window. Add a test that the reserved boxes of
visible windows never overlap and stay within the central area.
The builtin pipeline dimmed everything outside the cell area of the
active window, which produced a dark frame around the active window
(whose thickness varied with the size mismatch padding) and a dimmed tab
bar. Enable DIM_CENTRAL_AREA_ONLY and INCLUDE_WINDOW_PADDING.
Fixes#10524
draw_tab_with_powerline draws the separator right after the title and
blends it into the background of the next tab, which is correct for a
horizontal tab bar. In a vertical tab bar each tab has its own row,
pre-filled with the tab background, so the separator ended up in the
middle of the row, coloured as the tab on the row below, and tabs of the
same colour got a stray soft separator.
For vertical tab bars, pad the title with the tab background up to the
right edge and draw the separator there, blending into the tab bar
background, as is already done for the fade style.
Since coreutils 9.12, env shell-quotes values written to a terminal
by default (a pty counts as one, see coreutils issue #355 for the
history: https://github.com/coreutils/coreutils/issues/355).
This makes the literal, unquoted match for TSET= in
test_ssh_env_vars no longer find the value, so the test times out
waiting for it and eventually surfaces as an EIO reading from the pty
once the child has already exited. Accept the shlex-quoted form of
the value as well, since the ssh kitten's own env-passing code does
not use env and is unaffected.
Observed failure (Fedora rawhide buildroot with coreutils-9.12-1.fc46):
======================================================================
ERROR: test_ssh_env_vars (kitty_tests.ssh.SSHKitten.test_ssh_env_vars)
----------------------------------------------------------------------
Traceback (most recent call last):
File "kitty_tests/__init__.py", line 461, in wait_till
self.process_input_from_child(timeout=end_time - time.monotonic())
File "kitty_tests/__init__.py", line 449, in process_input_from_child
data = os.read(self.master_fd, io.DEFAULT_BUFFER_SIZE)
OSError: [Errno 5] Input/output error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "kitty_tests/__init__.py", line 250, in wrapper
return func(*args, **kwargs)
File "kitty_tests/ssh.py", line 146, in test_ssh_env_vars
pty.wait_till(lambda: 'TSET={}'.format(tset.replace('$A', 'AAA')) in pty.screen_contents())
File "kitty_tests/__init__.py", line 464, in wait_till
raise Exception(f'Failed to read from pty with error: {e}. {self.screen_contents_for_error()}') from e
Exception: Failed to read from pty with error: [Errno 5] Input/output error. Screen contents as repr:
'...\nA=AAA\nTSET=\'AAA-$(echo no)-`echo no2` !Q5 "something else"\'\n...'
Ran 337 tests in 19.341s
FAILED (errors=1, skipped=3)
Assisted-By: Claude Sonnet 5
write_escaped_ch compares the decoded rune against utf8.RuneError to
detect invalid UTF-8, but a literal U+FFFD decodes to that same rune, so
an escaped replacement character was silently deleted. The size returned
by DecodeRuneInString already tells the two apart: invalid bytes decode
with a size of one, a real U+FFFD with a size of three. Keep the rune
when the size is greater than one.