Check for conversion errors per option so a failed conversion returns
immediately instead of storing the error sentinel and continuing. Document
why macos_titlebar_color stays signed. Make the test meaningful on 64-bit
platforms by asserting negative values are rejected for the unsigned
options, and restore options afterwards.
RGB encodings can use the high bit of a 32-bit long. Decode the Wayland titlebar and scrollbar colors as unsigned values at runtime, matching their config converters. Keep the signed macOS titlebar sentinels.
Displays the URL in a box sized to fit it, just below the hovered cell,
like a web browser tooltip. Split render_a_bar() into rendering the text
and drawing it so the width of the rendered text can be used to position
the box.
Also redraw when the hovered cell within a hyperlink changes, as the
position of the displayed target now depends on it.
Controls where the URL shown by show_hyperlink_targets is displayed:
along the top or bottom edge of the window, or immediately below the
hovered line. In all cases the URL is moved to the opposite side if it
would otherwise obscure the hovered line.
Fixes#10770
Both axes of a scroll event are dispatched, so a diagonal gesture can fire
both, and the event is consumed if either axis is mapped. An unmapped event
continues a mapped gesture only if it scrolls along axes without any mappings.
The ceiling in change_font_size is ten times the configured font_size, so
the largest size you can reach depends on the size you configured. With
font_size 6 zooming stops at 60pt, while font_size 20 reaches 200pt. That
is backwards: a small configured font is if anything a reason to want a
larger temporary zoom, not a smaller one.
Use the larger of that multiple and an absolute 256pt. No existing setup
loses range, since the multiple still wins whenever it is the bigger of
the two. The bounds and the clamp move into options/utils.py so the
numbers are in one place and can be tested directly.
increase_font_size also had its own cap of five times font_size. That was
the old limit, missed when 25d8d9fe6 raised change_font_size to ten, and
because the wrapper clamps before delegating, the stale bound is the one
that wins. Both legacy wrappers can simply drop their bounds: they go
through change_font_size, which already clamps.
Adds remap_modifier config option to present one modifier key to kitty
as another, as discussed in issue #1077. Resolves merge conflicts by
adopting master's formatting style (multi-line macros, pointer spacing)
while preserving all new PR functionality.
Co-Authored-By: Bjoern <bjohas@users.noreply.github.com>
Covers the empty default, a single remap, that both directions of a swap are
recorded, that the last declaration for a source wins wherever it appears,
multi-modifier destinations, and that every rejection is reported rather than
silently ignored: wrong arity, unknown or non-remappable modifier names, a
source naming more than one modifier, and a no-op mapping.
Whether the permutation is applied simultaneously rather than sequentially is
a property of the C code and is not observable from the parsed dict, which is
identical either way; the comment says so rather than implying more coverage
than exists.
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.
Can now set bool values explicitly with =
Handle multi short flag args like -abc
Add unit tests for CLI parsing
Generate go code to serialize CLI options as a cmdline
TODO: Implement setting of bool vals in C and Go parsing code
TODO: Help/rst output should somehow indicate this feature
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.
Fixes#6810