Commit graph

4134 commits

Author SHA1 Message Date
Daniel Eklöf
ca685c4c76
Merge branch 'add-truecolor-to-feature-list' 2021-05-02 10:33:52 +02:00
lord
259d6e26e1 Add TrueColors support to Readme 2021-05-02 09:57:01 +02:00
Daniel Eklöf
47c7665bd0
Merge branch 'bsu-esu-logging' 2021-04-26 19:44:07 +02:00
Craig Barnes
9026095a24 dcs: only log debug warnings in bsu() and esu() for unhandled params 2021-04-25 21:04:46 +01:00
Daniel Eklöf
4068e27938
Merge branch 'DECSET-2026'
Closes #459
2021-04-25 20:23:46 +02:00
Craig Barnes
f95d7d4684 csi: add support for DECSET 2026, as an alternative to BSU/ESU sequences
See: https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2#note_847720
2021-04-25 18:35:46 +01:00
Daniel Eklöf
3131eb0288
Merge branch 'modify-bg-color-when-highlighted-text-has-same-fg-bg'
Closes #455
2021-04-24 13:37:11 +02:00
Daniel Eklöf
886160ba89
render: modify background color for highlighted text when fg == bg
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
2021-04-24 10:43:20 +02:00
Daniel Eklöf
a614c8f7a2
Merge branch 'reveal-concealed-text-when-highlighted' 2021-04-24 10:41:55 +02:00
Daniel Eklöf
1f807c6336
render: do render concealed text when it’s highlighted 2021-04-23 21:27:32 +02:00
Daniel Eklöf
1cb89fef9e
pkgbuild: run ‘ninja test’ in the PGO generate phase
This is needed when fcft/tllist are built as subprojects, since then
we must ensure their unit tests are executed, or we’ll get “profile
count data file not found” errors.
2021-04-22 11:28:04 +02:00
Daniel Eklöf
070f102605
Merge branch 'generate-alt-random-writes-fixes' 2021-04-22 11:27:36 +02:00
Daniel Eklöf
033e1bd6ae
changelog: generate-alt-random-writes.py --sixel fixes 2021-04-22 11:26:59 +02:00
Daniel Eklöf
a9236129f6
generate-alt-random: don’t run TIOCGWINSZ ioctl if --cols and --rows were used 2021-04-22 11:20:55 +02:00
Daniel Eklöf
fbe6d8b4d0
readme: s/if/is 2021-04-22 11:14:47 +02:00
Daniel Eklöf
10e512f14f
generate-alt-random: do ioctl(TIOCGWINSZ) on /dev/tty, not stdout 2021-04-22 11:00:31 +02:00
Daniel Eklöf
44b8bd2364
generate-alt-random: wait for SIGWINCH if width/height is 0
If width/height (that is, the *pixel* values) are 0, that means we are
early (or that foot is slow) - we’ve managed to reach this point
before the foot window has been mapped.

Or rather, before foot has loaded the primary fonts and calculated the
cell geometry. But that, and the initial mapping of the window is
tightly coupled.

To handle this case, detect when width or height is 0, an then wait
for SIGWINCH before trying again.
2021-04-22 10:57:43 +02:00
Daniel Eklöf
da5a3bae3e
generate-alt-random: assert that lines/cols/width/height are > 0 2021-04-22 10:57:27 +02:00
Daniel Eklöf
17bc2f5070
generate-alt-random: use {width,height} + 1 in randrange()
When randomizing the sixel width and height, use width/height + 1 in
the call to randrange(). This ensures the width/height is never 0, and
that the maximum width/height is half the window size, not slightly
less than that.
2021-04-22 10:56:03 +02:00
Daniel Eklöf
4044b6fa99
Merge branch 'releases/1.7' 2021-04-18 20:16:48 +02:00
Daniel Eklöf
0d4e61bbe8
meson/pkgbuild: bump version to 1.7.2 2021-04-18 20:12:40 +02:00
Daniel Eklöf
7e2e9d4de8
changelog: prepare for 1.7.2 2021-04-18 20:12:26 +02:00
Daniel Eklöf
2f8ee9e61d
changelog: add cglogic to ‘contributors’ 2021-04-18 20:12:02 +02:00
Daniel Eklöf
b8f2c3b784
changelog: add cglogic to ‘contributors’ 2021-04-18 20:11:27 +02:00
Daniel Eklöf
1df48fcb33
config: bold-text-in-bright: add ‘palette-based’ as a special value
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.
2021-04-18 20:09:10 +02:00
Daniel Eklöf
11e8ff9dc5
render: brighten: use corresponding bright palette color for base 8 colors
When brightening one of the 8 base (“regular”) colors, use the
corresponding bright palette color, instead of increasing the
luminance.

Closes #449
2021-04-18 20:09:07 +02:00
Oleh Hushchenkov
a2251a399c
Fix comment 2021-04-18 20:09:02 +02:00
Oleh Hushchenkov
98db408e1a
term: stop reading on eof 2021-04-18 20:09:01 +02:00
Daniel Eklöf
e85c19d546
term: attributes struct: use ‘bool’ instead of ‘uint32_t’ for 1-bit members 2021-04-18 20:08:58 +02:00
Daniel Eklöf
f62ac3d683
render: no need to blend fully opaque sixel images - just blit them 2021-04-18 20:08:46 +02:00
Daniel Eklöf
8561fdb004
render: don’t let URL jump label sub-surfaces extend outside window geometry
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
2021-04-18 20:08:41 +02:00
Daniel Eklöf
4325d5a4ab
doc: foot.ini: re-phrase the box-drawings-uses-font-glyphs section 2021-04-18 20:08:35 +02:00
Daniel Eklöf
39d65bf083
doc: foot.ini: codespell: antaliasing -> antialiasing 2021-04-18 20:08:32 +02:00
Daniel Eklöf
ce321e663e
config: add box-drawings-uses-font-glyphs=no|yes option
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
2021-04-18 20:08:30 +02:00
Daniel Eklöf
2efd1016ce
render: draw underline cursor below text underline
This ensures the cursor is visible on cells where the text is
underlined.

Closes #415
2021-04-18 20:08:21 +02:00
Daniel Eklöf
0f792fa1ce
changelog: rewrite entry for OSC 17/117/19/119 2021-04-18 20:08:17 +02:00
Daniel Eklöf
c005c16504
changelog: auto_left_margin on cub1 only 2021-04-18 20:08:14 +02:00
Daniel Eklöf
24e88dd224
term/vt: only do reverse-wrapping (‘bw’) on cub1
Foot currently does reverse-wrapping (‘auto_left_margin’, or ’bw’) on
everything that calls ‘term_cursor_left()’. This is wrong; it should
only be done for cub1. From man terminfo:

    auto_left_margin | bw | bw | cub1 wraps from column 0 to last
    column

This patch moves the reverse-wrapping logic from term_cursor_left() to
the handling of BS (backspace).

Closes #441
2021-04-18 20:08:13 +02:00
Daniel Eklöf
d620a7b3b4
osc: implement OSC 17+19: change selection background/foreground colors
And of course, we also implement the corresponding reset sequences,
OSC 117+119.
2021-04-18 20:08:08 +02:00
Daniel Eklöf
e853098f46
osc: reset background alpha when resetting the background color 2021-04-18 20:08:06 +02:00
Daniel Eklöf
713a53fa3e
doc: foot-ctlseq: mention that we support transparency in OSC 11 2021-04-18 20:08:04 +02:00
Daniel Eklöf
660b771396
changelog: don’t use a hyphen between ‘OSC’ and the number 2021-04-18 20:08:02 +02:00
Daniel Eklöf
220fdc173e
changelog: tweak wording for URxvt’s XParseColor extension 2021-04-18 20:08:00 +02:00
Daniel Eklöf
7fc3b18586
osc: parse_legacy_color(): the alpha component is not a floating point number
When using the urxvt extension of the XParseColor format, the alpha
component is not a floating point number, but a decimal number in the
range 0-100.
2021-04-18 20:07:58 +02:00
Daniel Eklöf
8adb52e63a
osc: parse_rgb(): ensure ‘alpha’ has been initialized 2021-04-18 20:07:56 +02:00
Daniel Eklöf
1023f9a6e9
osc: add support for URxvt extension to include alpha in OSC-11
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
2021-04-18 20:07:54 +02:00
Daniel Eklöf
f42e42246f
terminal: drain PTY when client terminates
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.
2021-04-18 20:07:50 +02:00
Daniel Eklöf
275b62371f
ci: build on alpine/latest, not edge 2021-04-18 20:07:47 +02:00
Daniel Eklöf
7b0d2522ee
sixel: unhook: tighten up the condition needed for us to free image data pre-maturely 2021-04-18 20:07:35 +02:00
Daniel Eklöf
8d06278a29
sixel: sixel_fini(): free image data
Normally, this data is always free:d indirectly, when the sixel image
that took over ownership is destroyed. But let’s play it safe.
2021-04-18 20:07:31 +02:00