When we resize the alt screen, we don’t reflow the text, we simply
truncate all the lines.
When doing this, make sure we don’t truncate in the middle of a
multi-column character.
When an auto-detected URL ended *on* the right-most column, the URL
endpoint was off by one, resulting in the underline in URL mode being
one character short.
When enabled, PUA (Private Usage Area) codepoints are always treated
as double-width glyphs, regardless of the actual glyph width.
Requires allow-overflowing-double-width-glyphs=yes
Double-clicking on a word in the left or right margin, would line-wrap
the selection if there was a non-empty cell in the corresponding
right/left margin on the prev/next line. Regardless of whether there
was a hard linebreak or not.
Script to reprouce:
!/bin/bash
cols=$(tput cols)
printf "%*coo\nbar\n" $((${cols} - 2)) f
Run, then double click either “foo” or “bar”. Neither should select
the other part.
Closes#565
This allows you to include sub-configurations. For example, theme
files.
The ‘include’ directive is a top-level keyword. I.e. it cannot be used
inside sections.
* The included file must be specified with an absolute path
* The included file is parsed in its own scope
* Nested includes are allowed
* Multiple include directives are allowed
Closes#555
Long OSC-8 URIs, that are split up over multiple rows, are handled by
emitting one URI range on each row the URL touches.
This was done by initializing a row index variable, and then
incrementing it each loop iteration.
This caused an out-of-bounds array access when the row index reached
the maximum number of scrollback lines.
The fix is simple: make sure the row index variable wraps around,
instead of incrementing without any bounds.
Closes#552
These are part of the "anywhere" state in Paul Flo Williams' VT parser
state diagram[1]. That means that they should be accepted *anywhere* in
a byte sequence, including in the middle of other sequences or even in
the middle of a multi-byte UTF-8 sequence. Adhering to this requirement
makes them incompatible with the use of UTF-8 as a universal encoding.
Not adhering to the aforementioned requirement by making a special case
for UTF-8 sequences may seem tempting, but it's much more at odds with
the relevant standards[2] than it appears on the surface. UTF-8 is not
an "8-bit code", at least not according to the parlance of ECMA-43, nor
does it map the C1 control range in a compatible way.
[1]: https://vt100.net/emu/dec_ansi_parser
[2]: ECMA-35, ECMA-43, ECMA-48
ayl_roundtrip() has the following code:
wl_display_roundtrip(wayl->display);
while (wl_display_prepare_read(wayl->display) != 0)
wl_display_dispatch_pending(wayl->display);
wayl_flush(wayl);
If the first wl_display_roundtrip() fails, for example because the
Wayland socket has been closed, we may get stuck in the while-loop.
This happens if the read queue isn’t empty, in which case
wl_display_prepare_read() will return -1 and we’ll continue trying to
dispatch the pending events forever, never succeeding since the socket
is gone.
Closes#542
Since we know the following:
* URI ranges are sorted
* URI coordinates are unique
* URI ranges don’t cross rows
We can optimize URI range reflowing by:
* Checking if the *first* URI range’s start coordinate is on the
current column. If so, keep a pointer to it.
* Use this pointer as source when instantiating the reflowed URI range
* If we already have a non-NULL range pointer, check its end
coordinate instead.
* If it matches, close the *last* URI range we inserted on the new
row, and free/remove the range from the old row.
* When line breaking, we only need to check if the *last* URI range is
unclosed.