This commit makes the following changes to the text sizing protocol's docs, to describe Kitty's current Unicode behavior more precisely in the text sizing protocol docs (#8533).
These changes describe **behavior that Kitty *already* has**. It does not require any changes to any actual Kitty source code. (I don't know if Foot currently matches this behavior.)
1. The algorithm for splitting text into cells now uses the phrases
"code point" or "Unicode scalar value" instead of "Unicode character",
which is an ambiguous phrase.
2. The algorithm now requires that the terminal uses UTF-8 to decode the bytes it receives into Unicode scalar values.
3. The algorithm now requires that the terminal replace each maximal subpart of any ill-formed subsequence with U+FFFD REPLACEMENT CHARACTER (�).
If the user's bash profile contains 'set -u' (to protect against typos
in variable names; think "rm -Rf $TMp/*"), starting a new kitty terminal
resulted in a spurious `bash: sourced: unbound variable` message.
Previously, if the last character was `'` parsing would fail: from `abc'`
it would produce the literal `'''abc''''`, which has one too many
unescaped single quote at the end.
This also fixes the issue for solo `'''`, where before it would produce
`''''\\'''''`, again with one too many single quote at the end.
I added tests for both cases.
Now NSWindow::close no longer actually closes the window. Sigh. Have to
also set its frame to zero size, otherwise an invisible rect remains
that intercepts mouse events and takes up space in Mission Control.
Life is too short for this shit. Fixes#8952
This doubles VRAM consumption, but is needed for accurate color
blending of the intermediate layers. 16bits is mostly enough, though for
perfect accuracy 32 bits is required. Use 16 as a compromise.
Fixes#8953
Add a "copy_or_noop" option which copies the text, and if there is no
selected text passes through the key. This allows applications to
implement native text selection but also have cmd+c still function as a
copy key since they can now receive it.
Make this the default on macos. This should have very little impact on
users because when no text is selected, the application can
(potentially) handle the key.
After redirecting stdout and stderr to the log file, they become block
buffered. This results in a (temporarily) incomplete log and becomes
particularly annoying when kitty crashes/hangs and has to be killed, as
the error messages are not flushed then and thus lost.