Commit graph

6025 commits

Author SHA1 Message Date
Daniel Eklöf
fe11baa4bc
Merge branch 'releases/1.16' 2023-10-17 17:25:22 +02:00
Daniel Eklöf
8b3dbf0972
meson: bump version to 1.16.2 2023-10-17 17:24:12 +02:00
Daniel Eklöf
47bc28ce55
changelog: prepare for 1.16.2 2023-10-17 17:24:00 +02:00
Daniel Eklöf
f1e7d78c96
Merge branch 'master' into releases/1.16 2023-10-17 17:23:18 +02:00
Daniel Eklöf
3dbb86914c
render: sixel: regression: wrong cell color behind opaque sixels
An opaque sixel that isn't a multiple of the cell size will have some
cells partially visible (either the entire last row, the entire last
column, or both).

These must be rendered before blitting the sixel.

f5f2f5a954 introduced a regression,
where all such cells were rendered as if the cursor was there, giving
them the wrong appearance.

Closes #1520
2023-10-13 18:44:44 +02:00
Daniel Eklöf
857ac224c5
changelog: add new 'unreleased' section 2023-10-12 20:36:28 +02:00
Daniel Eklöf
667095e429
Merge branch 'releases/1.16' 2023-10-12 20:35:48 +02:00
Daniel Eklöf
195eb3356a
meson: bump version to 1.16.1 2023-10-12 16:36:18 +02:00
Daniel Eklöf
c26c6e285a
changelog: prepare for 1.16.1 2023-10-12 16:36:07 +02:00
Daniel Eklöf
ee7e6e7234
Merge branch 'master' into releases/1.16 2023-10-12 16:35:37 +02:00
Daniel Eklöf
f5f2f5a954
render: fix surface damage when rendering sixels.
Pass a damage region to render_row()/render_cell() when rendering
partially visible cells underneath a sixel.

This ensures the affected regions are later reported as 'damaged' to
the Wayland compositor.

Closes #1515
2023-10-12 16:32:00 +02:00
Daniel Eklöf
4aa67e464a
sixel: erase: fix clearing of cell->attrs.clean
When erasing a sixel, the cells underneath it must be marked as
'dirty', in order to be re-rendered.

This was not being done correctly; the for loop loops *from* the start
col, meaning the *end* col is *not* sixel->pos.col, as that's
the *number* of columns, not the *end* column.
2023-10-12 16:31:37 +02:00
Daniel Eklöf
c006ac3a07
shm: memfd_create: fallback to not using MFD_NOEXEC_SEAL
MFD_NOEXEC_SEAL was introduced in linux 6.3. Kernels before that
will *reject* memfd_create() calls that set it.

This caused foot to exit (i.e. not start at all), when compiled on
linux >= 6.3, but run on linux < 6.3.

We _do_ want to use MFD_NOEXEC_SEAL, since a) our memory mapped really
shouldn't be executable, and b) to silence a warning on linux >= 6.3.

To handle all cases, first try *with* MFD_NOEXEC_SEAL. If that fails
with EINVAL, retry *without* it.

Closes #1514
2023-10-12 16:16:11 +02:00
Daniel Eklöf
7d7b48f104
changelog: fix link to issue 1077 2023-10-11 18:39:43 +02:00
Daniel Eklöf
4847cc3bd1
changelog: add new 'unreleased' section 2023-10-11 18:19:31 +02:00
Daniel Eklöf
dff9e4ec59
Merge branch 'releases/1.16' 2023-10-11 18:19:10 +02:00
Daniel Eklöf
a9d6eaf937
meson: bump version to 1.16.0 2023-10-11 18:15:01 +02:00
Daniel Eklöf
7131c96b26
changelog: prepare for 1.16.0 2023-10-11 18:14:40 +02:00
Daniel Eklöf
1cafadea6c
changelog: emphasize the new key bindings are for search mode 2023-10-11 18:12:18 +02:00
Daniel Eklöf
6e58bd8351
Merge branch 'fix-font-baseline-calculation'
Closes #1511
Closes #1463
2023-10-11 16:31:53 +02:00
Daniel Eklöf
4449177517
term: cache font baseline
No need to redo the calculation for every single cell we render,
every frame...
2023-10-10 14:23:33 +02:00
Daniel Eklöf
34aa979f46
term_font_baseline(): only center glyph when a custom line-height is being used
When using the font's own line-height, simply set the baseline
'descent' pixels above the bottom of the cell.

This fixes an issue where some fonts appeared "glued" to the top of
the cell, and sometimes getting partially clipped.
2023-10-10 13:52:24 +02:00
Daniel Eklöf
7d126ff414
changelog: fixed font baseline calculation 2023-10-10 10:55:26 +02:00
Daniel Eklöf
41932287cf
Revert "font baseline: use max(font->height, font->ascent + font->descent) when calculating font height"
This reverts commit fd813d0e6c.

The intent of the reverted commit was to align font height calculation
with cell height calculation. However, it turns out this breaks some
fonts. Typically those with large:ish differences in their 'height'
attribute, and their ascent+descent value.

Closes #1511
2023-10-10 10:52:35 +02:00
Daniel Eklöf
4cf2c45baa
render: better description of why we disable transparency in fullscreen 2023-10-10 09:27:00 +02:00
Daniel Eklöf
5c58fc2a28
Merge branch 'visual-bell-remastered'
Closes #1337
2023-10-10 08:15:11 +02:00
Daniel Eklöf
af0feed3e5
changelog: fix issue number for visual bell
1508 refers to the pull request, not the feature request.
2023-10-10 08:14:43 +02:00
Daniel Eklöf
ce64da2fe1
doc: foot.ini.5: move flash{,-alpha} to the bottom of the 'colors' section 2023-10-10 08:13:35 +02:00
Daniel Eklöf
0c6a3731c3
doc: foot.ini.5: flash_alpha -> flash-alpha 2023-10-10 08:13:35 +02:00
Daniel Eklöf
9cf22df784
foot.ini: flash_alpha -> flash-alpha 2023-10-10 08:13:35 +02:00
Daniel Eklöf
eea995637d
term: remove unneeded (and mostly unused) term->flash{,_alpha} 2023-10-10 08:13:35 +02:00
Daniel Eklöf
8a2a450778
doc: foot.ini: flash: tweak grammar, use consistent formatting 2023-10-10 08:13:35 +02:00
Raimund Sacherer
8273962372
Enable the use of flash as visual bell
With this patch we can configure flash in the bell section. The colors
section allow now to configure the color and translucency of the
flash.
2023-10-10 08:12:48 +02:00
Daniel Eklöf
c50b1f9900
render: more fine-grained wayland surface damage tracking
Before this patch. Wayland surface damage tracking was done on a
per-row basis. That is, even if just one cell was updated, the entire
row was "damaged".

Now, damage is per cell. This hopefully results in lower latencies in
many use cases, and especially on high DPI monitors.
2023-10-10 07:56:27 +02:00
Daniel Eklöf
1c9d98d57e
config: log_contextual_errno(): sync with log_contextual()
... in terms of whether to print section/value separators
2023-10-08 16:52:21 +02:00
Daniel Eklöf
e41555fe0f
shm: move definition of FOOT_MFD_FLAGS to the top 2023-10-08 11:03:13 +02:00
Daniel Eklöf
e36d95a4c8
Merge branch 'search-extend-selection' 2023-10-08 10:58:33 +02:00
Daniel Eklöf
6970055dca
changelog: add the remaining scrollback-up/down bindings 2023-10-08 10:39:57 +02:00
Daniel Eklöf
3e67415e3e
config: add remaining search.scrollback key bindings
All scrollback up/down key bindings are now available in search mode.
2023-10-08 10:38:39 +02:00
Daniel Eklöf
a772179b6c
search: fix mixup in search_extend_find_line()
The has_wrapped_around_{right,left} functions were mixed up, causing
false positives and false negatives, resulting in bad search matches.

Also make all search_extend_find* functions return a boolean; false
means no change in the selection. In this case, we can skip trying to
extend the selection, and updating the UI.
2023-10-08 10:38:39 +02:00
Daniel Eklöf
6a708b35ee
foot.ini: document all the new search.extend* bindings 2023-10-08 10:38:39 +02:00
Daniel Eklöf
419f0be441
config: map ctrl+shift+right to extend-to-word-boundary 2023-10-08 10:38:39 +02:00
Daniel Eklöf
ca128ae380
selection: find_word_boundary: ensure row number is bounded 2023-10-08 10:38:39 +02:00
Daniel Eklöf
ddf4eb3b78
search: don't try to extend a search match when there is none 2023-10-08 10:38:39 +02:00
Daniel Eklöf
5e013cad78
selection: selection_update() uses view-local coordinates 2023-10-08 10:38:38 +02:00
Daniel Eklöf
78665a7e80
search: add more key bindings to extend the current match
This patch adds the following new search key bindings:

* extend-char (shift+right)
* extend-line-down (shift+down)
* extend-backward-char (shift+left)
* extend-backward-to-word-boundary (ctrl+shift+left)
* extend-backward-to-next-whitespace (ctrl+shift+alt+left)
* extend-line-up (shift+up)

They can be used to extend the search match (i.e. the selection).

This patch also adds an initial set of key bindings to scroll in the
scrollback history:

* scrollback-up-page
* scrollback-down-page

These work just like the key bindings for the normal mode. Also note
that it was already possible to scroll using the mouse.

This patch also fixes a couple of search mode bugs:

* crashing when a search match ends in the last column
* grapheme clusters not being matched correctly
* Search match not being "extendable" after a pointer leave event
* A few others, related to either large matches, or extending matches
  after moving the viewport.

There are still a couple of (known) issues:

* A search match isn't correctly highlighted if its *starting* point
  is outside the viewport.
* Extending the match to end of the scrollback (i.e. the most recent
  output) is simply buggy.

Related to #419
2023-10-08 10:38:37 +02:00
Daniel Eklöf
56d5d4cc21
render: disable transparency in margins when in fullscreen
This amends 899b768b74, where we started
disabling transparency in fullscreen

Closes #1503
2023-10-07 07:58:55 +02:00
6t8k
61eb56dfda
shm: if defined, set MFD_NOEXEC_SEAL flag for memfd_create
Effective from Linux 6.3.0 onward, this creates the memfd without
execute permissions and prevents that setting from ever being changed.

This is a defense-in-depth security measure and prevents a respective
kernel warning from being emitted.

See https://lwn.net/Articles/918106/ for more information.
2023-10-05 12:33:05 +02:00
Daniel Eklöf
33a5a369f2
term_reset: log hard vs. soft reset 2023-10-04 08:23:27 +02:00
Daniel Eklöf
5e1d73f3cd
Codespell fixes 2023-10-03 14:12:58 +02:00