| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Allow the use of numeric keys in [colors] to configure the full set of
256 colors in the palette. Fixes #489
|
| |\ |
|
| | | |
|
| |/ |
|
| |
|
|
| |
Closes #479
|
| |
|
|
| |
Part of #471
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
See: https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2#note_847720
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When brightening one of the 8 base (“regular”) colors, use the
corresponding bright palette color, instead of increasing the
luminance.
Closes #449
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 ensures the cursor is visible on cells where the text is
underlined.
Closes #415
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
And of course, we also implement the corresponding reset sequences,
OSC 117+119.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
There are two variants, either using a ‘[percent]’ prefix for legacy
colors, or using ‘rgba:r/g/b/a’ instead of ‘rgb:r/g/b’.
Closes #436
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| | |
Closes #434
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Don’t call has_key_binding_collisions() with ‘binding_action_map’
unconditionally; use the provided ‘action_map’ instead.
This fixes wrong error messages for key combo collisions in key
binding sections other than the regular “key-bindings”.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sixel_color_set() is called when the number of (sixel) color registers
is changed.
It frees the current palette, and changes the “palette size” variable.
Originally, we only had a single palette. This is the one free:d by
sixel_color_set().
Later, we added support for private vs. shared palettes. With this
change, we now have one palette that is “never” free:d (the shared
one), and a private palette that is always free:d after a sixel has
been emitted.
‘sixel.palette’ is a pointer to the palette currently in use, and
should only be accessed **while emitting a sixel**.
This is the pointer sixel_color_set() free:d. So for example, if
‘sixel.palette’ pointed to the shared palette, we’d free the shared
palette. But, we didn’t reset ‘sixel.shared_palette’, causing a double
free later on.
Closes #427
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were two issues with it:
* Not all applications decode the sequence into a set of modifiers +
key, but use a fixed sequence -> combo mapping, that we broke.
* There were unforeseen issues with e.g. F1-12, where the modifier
were removed from combos like Ctrl+F12, or Alt+F12. The reason is
simple; XKB tells us that Ctrl, or Alt, is a consumed modifier. Now,
_why_ it thinks that is a different story.
This reverts 6cd72bdee6c2b11f7cab15df9afb0ed92a7f8ba0
Closes #425
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When brightening one of the 8 base (“regular”) colors, use the
corresponding bright palette color, instead of increasing the
luminance.
Closes #449
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \
| | |
| | |
| | | |
Closes #430
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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 ensures the cursor is visible on cells where the text is
underlined.
Closes #415
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
And of course, we also implement the corresponding reset sequences,
OSC 117+119.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
There are two variants, either using a ‘[percent]’ prefix for legacy
colors, or using ‘rgba:r/g/b/a’ instead of ‘rgb:r/g/b’.
Closes #436
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| | |
Closes #434
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Don’t call has_key_binding_collisions() with ‘binding_action_map’
unconditionally; use the provided ‘action_map’ instead.
This fixes wrong error messages for key combo collisions in key
binding sections other than the regular “key-bindings”.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sixel_color_set() is called when the number of (sixel) color registers
is changed.
It frees the current palette, and changes the “palette size” variable.
Originally, we only had a single palette. This is the one free:d by
sixel_color_set().
Later, we added support for private vs. shared palettes. With this
change, we now have one palette that is “never” free:d (the shared
one), and a private palette that is always free:d after a sixel has
been emitted.
‘sixel.palette’ is a pointer to the palette currently in use, and
should only be accessed **while emitting a sixel**.
This is the pointer sixel_color_set() free:d. So for example, if
‘sixel.palette’ pointed to the shared palette, we’d free the shared
palette. But, we didn’t reset ‘sixel.shared_palette’, causing a double
free later on.
Closes #427
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were two issues with it:
* Not all applications decode the sequence into a set of modifiers +
key, but use a fixed sequence -> combo mapping, that we broke.
* There were unforeseen issues with e.g. F1-12, where the modifier
were removed from combos like Ctrl+F12, or Alt+F12. The reason is
simple; XKB tells us that Ctrl, or Alt, is a consumed modifier. Now,
_why_ it thinks that is a different story.
This reverts 6cd72bdee6c2b11f7cab15df9afb0ed92a7f8ba0
Closes #425
|
| |/ |
|
| | |
|
| |\ |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This fixes a possible deadlock; render_sixels_images() may call
render_cell(), which may need to take the worker lock (when rendering
either a blinking cell, or a box drawing glyph that isn’t yet in the
glyph cache).
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
When the user has set a custom line-height, we now adjust it when
increasing/decreasing (“zooming”) the font size at run-time.
Previously, the line-height was fixed at the size specified in
foot.ini.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When detecting, and repairing, “broken” key bindings (where the key
binding itself explicitly lists a modifier that is consumed by the
final symbol - e.g “Shift+W”), don’t just look for an intersection
between the set of modifiers needed to produce the final symbol, and
the modifiers listed in the key combo. Instead, check if the key combo
has *all* the required modifiers.
Example: Shift+AltGr+w produces Page_Down. I.e. Page_Down is the
_shifted_ symbol, ‘w’ is the un-shifted symbol, and Shift+AltGr are
the modifiers required to shift ‘w’ to Page_Down.
If we have the key combo Shift+Page_Down, foot would, correctly,
determine that Page_Down is a shifted symbol. It would find the
Shift+AltGr modifier set, and since the intersection of “Shift+AltGr”
and “Shift” (from our key combo) is non-empty, foot
would (incorrectly) determine that we can, and should, replace
Page_Down with its un-shifted symbol ‘w’.
This is completely wrong, since Shift+w does _not_ produce Page_Down.
Closes #407
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* use toe for terminfo, thanks Craig.
* adds optional dependency on bash-completion for positional arguments
Co-authored-by: Craig Barnes <craigbarnes@protonmail.com>
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
“current geometry” will report whatever value is the smallest; the max
geometry or the current window size.
But “max geometry” always returns the configured max geometry.
This aligns foot’s behavior with XTerm.
|
| |\ \
| |/
|/|
| | |
Closes #395
|
| | | |
|
| |/
|
|
|
|
|
|
|
| |
Closing it as soon as we detect that the client has died, means we may
not have drained it completely.
The PTY is either closed _by_ the client application, or by us when we
shutdown the terminal. Thus, leaving it open (until we call
term_shutdown()) is fine.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
When sending a key escape sequence to the client application, do not
include consumed modifiers.
Fixes part of #376
|
| |
|
|
|
|
|
| |
This requirement is due to the recently added maybe_repair_key_combo()
function, which is making use of xkb_keymap_key_get_mods_for_level().
See also: commit a5b554761a8b376657be2a7e613b37fd5803920c.
|
| | |
|
| |
|
|
|
| |
No need to a changelog entry for fixing something that hasn’t yet been
released.
|
| | |
|
| |\
| |
| |
| | |
Closes #361
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When enabled (the default), sixels behave much like normal output; the
start where the cursor is, and the cursor moves with the
sixel. I.e. after emitting a sixel the cursor is left after the image;
either to the right, if private mode 8452 is enabled, or otherwise on
the next line. Terminal content is scrolled up if the sixel is larger
than the screen.
When disabled, sixels *always* start at (0,0), the cursor never moves,
and the terminal content never scrolls.
In other words, the ‘disabled’ mode is a much simpler mode.
All we need to do to support both modes is re-write the sixel-emitting
loop to:
* break early if we’re “out of rows”, i.e. we’ve reached the bottom of
the screen.
* not linefeed, or move the cursor when scrolling is disabled
This patch also fixes a bug in the (new) implementation of private
mode 8452.
When emitting a sixel, we may break it up into smaller pieces, to
ensure a single sixel (as tracked internally) does not cross the
scrollback wrap-around.
The code that checked if we should do a linefeed or not, would skip
the linefeed on the last row of *each* such sixel piece. The correct
thing to do is to skip it only on the last row of the *last* piece.
I chose not to fix this bug in a separate patch since doing so would
have meant re-writing it again when implementing private mode 80.
|
| |/ |
|
| |
|
|
|
|
| |
According to the way ECMA-48 defines these terms, "escape sequences"
are a superset of "control sequences", so there's no real reason to
mention both.
|
| | |
|