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
echo -e '\e]8;;https://www.foo.bar\e\\https://www.foo\e]8;;\e\\.bar'
will produce an OSC-8 URL (https://www.foo) that is slightly shorter
than the auto-detected one (https://www.foo.bar).
This produces strange results in URL mode. For example, if
url.osc8-underline=always, the OSC8 underline will be removed when
url-mode is exited.
This patch changes the behavior so that auto-detected URLs that
overlap OSC-8 URLs are removed.
Note that OSC-8 URLs cannot overlap with each other, and that
auto-detected URLs also cannot overlap with each other.
Works in pretty much the same way as ‘beam-thickness’, except that the
default value is “the font’s underline thickness”.
This means, that when unset, the cursor underline thickness scales
with the font size.
But, when explicitly set, either to a point size value, or a pixel
size, it remains fixed at that size.
Closes#524
This fixes an issue where we, at least on FreeBSD, sometimes get stuck
in epoll_pwait() after the shell has exited.
It turned out to be because the SIGCHLD signal was delivered at the
same time FDs were made readable/writeable. I.e. epoll_pwait()
returned a non-zero value even though it should have been interrupted
by the SIGCHLD.
To avoid having to search the entire signal array *every time*
epoll_pwait() returns, add a flag that is set in the signal
handler. This tells the FDM to scan the signal array after returning
from epoll_pwait().
So that the value is clamped to the range [0, 0x7fffffff] and retains
the same value, regardless of whether it's interpreted as a signed or
unsigned integer.
Closes#522
Besides disallowing matches that crosses the scrollback wrap-around,
this also fixes a crash when the trying to search beyond the last
output, when the scrollback history hasn’t yet been completely filled.
If the image was accompanied with a “Set Raster Attributes” (SRA)
command, make sure we *never* shrink the image below the size
specified in the SRA.
Images are normally shrunk when their bottom rows are fully
transparent. This enables sixels that aren’t a multiple of 6 to be
emitted, without also emitting an SRA command.
But if there *is* an SRA command, obey it.
Verified against XTerm-367
In some cases, the underline position (typically provided by the font,
mind you), end up below the cell, making it visible.
Note that below the cell here means below the line. I.e. the font
provided underline position is below the font provided line height...
Oh well.
Doing this in foot rather than fcft, since other applications
typically don’t have to clip the rendered text.
Closes#503
Older version of Plasma/KWin had an issue where buffer damage recorded
before the buffer was attached were ignored. This appears to have been
fixed now.
1. Free buffers and strings
2. memset() the vt struct
3. re-initialize members that must not be zero
We _could_ replace the memset() with explicit zeroing of all the
members. It’s just that there’s a lot of arrays, so this is much
easier.
Closes#495
In all other cases, alpha is disabled. This includes:
* Palette- or RGB-colors matching the default background color
* When any kind of reverse video is enabled (e.g. DECSCNM, or ANSI
reverse)
* foot exits with -26/230
* footclient exits with -36/220
This is to give each application a range of exit codes. Currently
unused, but we may want to change this in the future.
Normally, foot and footclient uses the exit code from the client
application (i.e. the shell).
However, foot (or footclient) itself may fail to run; if run outside
of a Wayland session, or no fonts are installed, or the client
application/shell cannot be found (“foot lsdjfldsjf”) etc.
Up until now, there has been no way to differentiate these kind of
failures from the client application exiting with code 1.
This patch changes foot’s failure exit code to -27/229, and
footclient’s to -28/228. Note that footclient will exit with foot’s
-27/229 if footclient ran successfully, but the foot server failed to
instantiate a new window.
Closes#466.
* Rename cursor.style value ‘bar’ to ‘beam’. ‘bar’ remains recognized,
but should eventually be deprecated and then removed.
* Add ‘cursor.beam-thickness’ option, a pt-or-px value specifying the
thickness of the beam cursor. Defaults to 1.5pt.
* Rename (and export) pt_or_px_as_pixels() to
term_pt_or_px_as_pixels()
* Change term_pt_or_px_as_pixels() to round point values instead of
truncating them.
When rendering a selected/highlighted cell where the foreground and
background colors are the same, invert the background color to make
the selected text legible.
Closes#455
When ‘bold-text-in-bright’ is set ‘to palette-based’, colors matching
one of the 8 regular palette colors are brightened by using the
corresponding bright palette color.
Other colors, or all colors if ‘bold-text-in-bright’ is set to
‘yes|true’, are brightened by increasing the luminance.
We have no guarantee that sub-surfaces extending outside the window
geometry are rendered correctly (if at all).
For example, both Sway and River will render the window border on top
of the sub-surface.
Future versions of Sway may clip the sub-surface.
Since jump-labels are positioned slightly above, and to the left of
the URLs first character, having a label on either the top row, or on
the first column, will likely position it outside the window. This is
handled by simply setting x/y to 0 (or, to -margin, since the label
coordinate is later offsetted with the window margins).
Second, if the label is very long, it may extend outside the
window. This is very unusual for labels only showing the key, and not
the URL itself, but could happen in this case too, if e.g. the user
has configured double-width key characters.
This is handled by calculating its maximum width, and then truncating
the label.
Although very unlikely, it is possible for a label to also extend
outside the window’s vertical size. This could happen for very small
font sizes, where the label’s own margins are large, relative to the
font size. This case is currently not handled.
Closes#443
When disabled, we render box drawing characters ourselves. This is the
default.
When enabled, we instead use font glyphs. I.e. no special treatment.
Closes#430
This is done by:
* Not limiting the number of times we try to read from the PTY when
we’ve have POLLHUP
* Not requiring the entire the previous read to have filled our
buffer.
* Not erroring out on EIO.