aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* spawn-terminal: spawn with all the original command line optionsspawn-terminal-cmdline-argumentsDaniel Eklöf6 days-42/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this, spawn-terminal would spawn a new foot or footclient, but *without* any of the command line options the user started the original foot/footclient with. We did have a hack for --config, but all other options were forgotten in the new instance. This patch fixes this. * term_init() stores the raw argc/argv in the terminal struct. * term_spawn_new() calls spawn() with the stored argc/argv. * for single instances, main() calls term_init() with the unparsed argc/argv. * the client/server protocol is extended to always send the raw argc/argv to the server. * the server calls term_init() with the argc/argv from the client. * bonus: on linux, we now use /proc/self/exe to determine which binary to launch. This means if you run e.g. a foot from your build tree, spawn-terminal will exec _that_ foot, not the system foot. A couple of behavioral changes, and/or side-effects, caused by the above (not exhaustive): * footclient -E: spawn-terminal will not use the _exact_ environment from the original footclient, but will simply pass -E to the new footclient. This means the new instance will inherit the *current* environment of the original instance. * foot htop: spawn-instance will _also_ launch a new foot+htop. Before this patch, spawn-instance would launch a new foot+shell. Closes #1622
* ime: reset view & cancel selection on text commitCismonX6 days-1/+5
| | | | | IMEs may commit text directly without updating preedit text (seen on Squeekboard), thus 5c8d520807 is not enough.
* selection: fix multi-cell chars selection updateCismonX2026-10-28-3/+1
| | | | | | | | As in 0e7e943062, absolute row numbers cannot be used for comparison. Here it may break selection update with multi-cell characters. Note that there's no need to compare the coordinates again. A better fix is to check the selection direction instead.
* wayland: update_terms_on_monitor(): skip terminals in the process of shutting downDaniel Eklöf2026-10-25-8/+14
| | | | | | | | | In rare cases, xdg_output_handle_done() may be called while a terminal is shutting down. This triggered a crash in update_terms_for_monitor(), which de-references term->window (which is NULL for terminals shutting down). Closes #2487
* ime: reset view and cancel selection on inputCismonX2026-10-25-1/+5
| | | | | | | The text input area should be visible when using input methods. This also keeps the behavior consistent with the wl_keyboard.key event handler.
* selection: fix row comparison in selection updateCismonX2026-10-25-3/+11
| | | | | | | | | | Absolute row numbers may wrap around, thus not suitable for comparison. This may incorrectly update the selection direction and break word-wise selection. Compare scrollback-relative row numbers instead. Fixes #2483.
* changelog: fix linksCismonX2026-10-25-2/+2
|
* input: no need to strip trailing NULs from keymapCismonX2026-10-14-3/+2
| | | | | | | | | | | | | | Since libxkbcommon 1.6.0, xkb_keymap_new_from_buffer() allows a NUL-terminated string as keymap text [1]. Also the keymap text cannot have multiple trailing NULs according to the Wayland protocol spec. This also avoids length mismatch for munmap(), which may leak resource when 'size % sysconf(_SC_PAGESIZE) == 1'. Also see the original patch [2] which reported this issue. [1]: https://github.com/xkbcommon/libxkbcommon/commit/b06aedb8ba [2]: https://codeberg.org/dnkl/foot/pulls/2482
* grid: reflow: fix two issues when truncating wide charactersDaniel Eklöf2026-09-18-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resizing to a very small grid, it may be impossible to fit a wide character (for example, a 6-cell character won't ever fit in a 5-cell grid). What we do is replace with wide character with a space. There were however two issues: 1. We never set the attributes of the space cell, only the wc member 2. We breaked out of the loop, causing any tracking points associated with any of the SPACER cells to never be matched. The last point is very real, since e.g. OSC-8 links cover the spacer cells. The first point is easy to fix; we first copy the entire cell from the old grid, then replace wc with 0. The second point is somewhat more complex. We remove the break, to ensure we run all the tracking point logic. Then, we only write the empty cell in the first iteration. Subsequent iterations do nothing (to the new grid). Then, to ensure tracking points associated with the spacer cells point to a valid cell, we keep the new_col_idx value at the first (now empty) cell. Only when we've processed the last SPACER cell do we increment new_col_idx once. This ensures consistency (the wide character was replaced with a single-cell character, thus new_col_idx should only be incremented by one).
* shm: clang 23 complains max_pool_size is unused on x86 (which it is)Daniel Eklöf2026-09-18-0/+1
|
* ime: ignore enter events with a NULL surfaceDaniel Eklöf2026-09-18-0/+9
| | | | Closes #2467
* input: add log message when ignoring a keyboard_enter() with NULL surfaceDaniel Eklöf2026-09-18-0/+1
|
* selection: treat spacer pad cells as empty cells when marking cells for highlightingDaniel Eklöf2026-09-10-1/+3
|
* selection: don't allow the start/end-points to be inside spacer pad cellsDaniel Eklöf2026-09-10-0/+13
| | | | | | Having the start/end-points in the pad area made the spacer cells tracking points when reflowing the grid. This caused the spacer cells to be kept, instead of removed.
* selection: don't include spacer pad cells when extending the selection to cover all of a ↵Daniel Eklöf2026-09-10-4/+13
| | | | | | | | | | | multi-cell character When the selection starts or ends in the middle of a multi-cell character, we stretch the selection so that all of the cells belonging to the character is selected. When we do this, we do *not* want trailing pad cells to be included in the selection.
* grid: reflow: Preserve cells with background colorCelina Sophie Kalus2026-09-10-1/+9
| | | | | | | | | | | A cell was previously considered empty if its content is empty. When an empty cell has a non-default background color, truncating such cells from the end of the line when reflowing is unexpected. Instead, treat such cells as non-empty to preserve them. Closes #2462 Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
* server: fix use-after-free during shutdownCismonX2026-09-10-4/+9
| | | | | | | | | | | | | | When terminal shutdown is in progress, calling client_destroy() results in subsequent fdm_shutdown() (registered by term_shutdown()) always called with a dangling 'struct terminal' pointer. This may happen when footclient and the client application exit simultaneously in a short window. See #2432 for more information. Fixed by not calling client_destroy() when terminal shutdown is in progress. The client will eventually be destroyed in term_shutdown_handler() (invoked from shutdown_maybe_done()), so there's no resource leak.
* foot.ini: `color-theme-switch-1`, `color-theme-switch-2` -> `color-theme-switch-dark`, `color-theme-Arnaudv62026-09-06-2/+2
| | | | foot.ini: `color-theme-switch-1`, `color-theme-switch-2` -> `color-theme-switch-dark`, `color-theme-switch-light`
* doc: foot.ini: colors.cursor: tweak wording of the default valueDaniel Eklöf2026-09-05-1/+1
| | | | | | | Try to make it clearer that it is the *current* fg/bg inversed, not the *default* fg/bg. Related: #2455
* changelog: add new 'unreleased' sectionDaniel Eklöf2026-09-02-0/+11
|
* Merge branch 'releases/1.28'Daniel Eklöf2026-09-02-5/+19
|\
| * meson: bump version to 1.28.01.28.0releases/1.28Daniel Eklöf2026-09-02-1/+1
| |
| * changelog: prepare for 1.28.0Daniel Eklöf2026-09-02-4/+18
|/
* config: remove support for the deprecated color-theme-switch-{1,2} key bindingsDaniel Eklöf2026-09-02-31/+6
| | | | | They were deprecated in 1.26.0, along with the 'colors' and 'colors2' sections.
* config: remove support for the deprecated colors and colors2 sectionsDaniel Eklöf2026-09-02-72/+9
| | | | | They were deprecated in 1.26.0, and replaced by colors-dark and colors-light.
* config: remove debug printf from unit testDaniel Eklöf2026-09-02-2/+0
|
* policy: no generative AI / LLM contributionsDaniel Eklöf2026-09-02-4/+35
|
* term: wrap url related fields into a structK42026-09-02-49/+50
|
* changelog: selection-override-modifiers fixesDaniel Eklöf2026-09-02-0/+4
|
* config: add unit test for modifiers_disjoint()Daniel Eklöf2026-09-02-1/+77
|
* terminal: fix selection-override-modifiers=noneCismonX2026-09-02-1/+1
| | | | | | | | | Currently, if config option 'selection-override-modifiers' is set to 'none', the mouse is _always_ grabbed for selection, making mouse tracking mode unusable. A more reasonable behavior is to _never_ override mouse grabbing instead.
* config: fix modifiers conflict checkCismonX2026-09-02-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if a mouse binding contains _any_ modifier key set in config 'selection-override-modifiers', it does not work since these modifiers get unset in function 'match_mouse_binding()'. Function 'resolve_key_binding_collisions()' is supposed to detect this and display an error message, however, it does not work unless the conflicting modifiers are identical. For example, given the following config options: selection-override-modifiers=Control+Shift select-begin-block=Control+BTN_LEFT Foot does not display an error message for this, but if you try to select text with 'Control+BTN_LEFT', it behaves as if only 'BTN_LEFT' is pressed. This is due to function 'modifiers_disjoint()' being implemented as "not equal" rather than "disjoint". Fixed by properly implementing this function. Also clarify the 'selection-override-modifiers' config option in the man page. As a side effect, this also fixes 'selection-override-modifiers=none' conflicting with mouse bindings that do not contain modifier keys (an empty set is disjoint with itself).
* config: fix error message for modifiers conflictCismonX2026-08-30-3/+0
| | | | | The trailing '+' is already removed in modifiers_to_str(). Don't do that twice.
* render: re-evaluate mouse col/row coordinates after a window resizeDaniel Eklöf2026-08-29-2/+16
| | | | | | | | | | | | | | | | | | | Before this, the col/row coordinates for the mouse pointer was only updated when the mouse either entered our window, or was moved inside it. However, when a window is resized without using the mouse, and the user then clicks (again, without moving the mouse), we can get a button event outside the cell grid, that we still think is on top of the grid. Example: user moves mouse over the bottom row. The window is shrunk. Enough that the mouse is now outside the cell grid, but still inside our window. This means we get a button event outside the grid. But since we haven't updated the col/row coordinates, we think it's on a row, that no longer exists. Closes #2435
* input: ignore keyboard_enter() with NULL surfaceDaniel Eklöf2026-08-29-1/+8
| | | | | | | | It's a compositor bug to emit a keyboard_enter() event with a NULL surface, but has been seen happening on Hyprland. Workaround by ignoring the event. Closes #2438
* Add support for file:// URLs for initial working directoryairkoala2026-08-29-7/+56
| | | | | | | | | | | This will allow for foot to be registered as a MIME type handler for directories, allowing a "open with foot" action via xdg-open. Some applications pass a simple directory path (eg. qbittorrent) but others pass it as a "file://" URL (lutris), which is also sometimes percent-encoded (calibre) but sometimes not. This patch should be able to handle all 3 of these variants.
* changelog: mouse grabbing without keymapDaniel Eklöf2026-08-29-0/+2
|
* terminal: don't override mouse grab without keymapCismonX2026-08-29-1/+2
| | | | | | | | Without keymap, never grab the mouse for selection when mouse tracking is enabled, since we can't tell whether a mod key is being held. Fixes #2443
* gitignore: ignore `/subprojects/.wraplock`K42026-08-29-0/+1
| | | | see https://github.com/mesonbuild/meson/issues/14948
* wayland: clear touch focus in wayl_win_destroy()Marinus Klasen2026-08-29-0/+18
| | | | | | | | | | | | | | | | wl_touch has no leave event, so unmapping the surfaces cannot drop touch focus the way it drops keyboard and pointer focus. seat->touch.surface kept pointing at the window being destroyed, and seat->touch.state stayed HELD/DRAGGING, so the guard in wl_touch_up() and wl_touch_motion() did not fire. A wl_touch.up dispatched from the roundtrips in wayl_win_destroy() then dereferenced the freed window: #0 wl_touch_up () at input.c:3587 #12 wayl_roundtrip () at wayland.c:2416 #13 wayl_win_destroy () at wayland.c:2297 Reproduced by touching a foot window and holding while the window is destroyed: 3/3 crashes before, 0/7 after.
* wayland: handle_global_remove(): call wl_fixes::ack_global_remove(), when availableDaniel Eklöf2026-08-19-2/+39
| | | | | | | | | | | wayland 1.26 adds wl_fixes::ack_global_remove(). Clients should call it when they've received a global_remove() event, after doing internal cleanup. Not tested yet: * Waiting for arch to update wayland to 1.26 * None of the compositors I use (or test on) implement it yet.
* term: don't do a cursor refresh if we're shutting downDaniel Eklöf2026-08-17-1/+1
| | | | | | | | | When running e.g. "foot true", we may reach a state where the window has received the configure event, but we've also already decided to shutdown. In this case, we may not have a grid (render_resize() doesn't do anything when we've started the shutdown routine). Fixes a race that triggers a crash.
* terminal: keep saved SGR attributes per-gridaloires2026-08-15-3/+3
| | | | | | | | | | | | | DECSC/DECRC (ESC7/ESC8), CSI s/u and DECSET/DECRST 1048/1049 all save/restore the SGR attributes through the same, global saved_attrs slot. An application emitting ESC7/ESC8 in the alternate screen to wrap sixel rendering in a save/restore-cursor pair overwrites the slot with its own SGR state. DECRST 1049 then restores those attributes, instead of the ones saved by DECSET 1049. The shell prompt is left with the application's attributes, even though the application reset them (sgr0) before exiting.
* changelog: window urgency on notification activation without XDG tokenDaniel Eklöf2026-08-06-0/+2
|
* notify: improve debug logging for window focusing on notification activationDaniel Eklöf2026-08-06-4/+5
|
* notify: fall back to urgency when activation has no tokensentriz2026-08-06-3/+5
|
* selection: check column when updating selectionCismonX2026-08-06-8/+12
| | | | | | Selection coordinates may appear outside of the terminal grid (e.g., during the "fast resize" stage of delayed resize), resulting in bad width passed to pixman_region32_union_rect().
* unicode: update data files to Unicode 17 (no actual changes)Daniel Eklöf2026-08-06-3/+3
|
* terminal: add visibility reportsTim Culverhouse2026-07-30-1/+49
| | | | | | | | | | | | | Applications cannot infer whether their terminal view is observable from keyboard focus alone, so they may continue expensive rendering while the surface is hidden. Implement private mode 2033 and the one-shot visibility query. Report Wayland xdg_toplevel suspension as not visible and otherwise remain conservative by treating the terminal as potentially visible. Amp-Thread-ID: https://ampcode.com/threads/T-019fb2b7-f245-7124-a69a-1484812532bb Co-authored-by: Amp <amp@ampcode.com>
* changelog: add missing bug referenceDaniel Eklöf2026-07-30-0/+1
|
* wayland: fix version selection of the shape-manager globalDaniel Eklöf2026-07-30-2/+2
| | | | | | | | | Use the smallest of the *implemented* version, and the *preferred* version. Before this, we used the minimum of our *required* version, and the *preferred* version, which is both useless and wrong, since we'll always pick the required version (since required <= preferred).
* render: fix broken selection on delayed resizeCismonX2026-07-30-4/+9
| | | | | | | | | | | | | Interactive resize of a terminal window breaks current selection, if scrollback is not empty, and option 'resize-delay-ms' is not 0. This behavior is introduced by commit 296e75f4f5, which: - Subtracts selection row by view offset every time render_resize() is called, resulting in bad coordinates. - Does not properly restore the original selection coordinates during the final text reflow stage.
* selection: find-quote-right: assert next-row > 0Daniel Eklöf2026-07-30-0/+4
|
* selection: fixed segfault when quote is on newlineEmily Vlasics2026-07-30-3/+10
| | | | Closes #2405
* changelog: default URL regex updatedDaniel Eklöf2026-07-26-0/+7
|
* config: add unit test for default URL regexDaniel Eklöf2026-07-26-0/+137
|
* config: update default URL regexDaniel Eklöf2026-07-26-44/+45
| | | | | | | | * Allow single-quotes _inside_ URLs (but still not at the end) * Require at least one character inside balanced parenthesis or quotes. Closes #2417
* doc: add fyi example configuration, as an alternative to notify-sendDaniel Eklöf2026-07-26-13/+34
| | | | Closes #2401
* scripts: various ruff fixesDaniel Eklöf2026-07-26-8/+4
| | | | | * ruff 0.16.0 * python 3.14.6
* ime: refresh search matches after IME commit0WD02026-07-21-3/+6
| | | | | | | | | The IME commit handler appended text to the search buffer and refreshed the search box, but never called search_find_next(). CJK input into scrollback search therefore showed no match until another key press re-triggered the regular search input path. Call search_find_next() in the commit branch, and apply the same fix to unicode-mode.c. To allow this, search_find_next() is no longer static.
* xmalloc/xsnprintf: simplify some code with new FATAL_ERROR_ON() macroCraig Barnes2026-07-21-13/+5
|
* xmalloc: avoid using reallocarray(3) to implement xreallocarray()Craig Barnes2026-07-21-8/+14
| | | | | | | | | | | | | | | | | | See the added comment for reasoning. The reallocarray(3) function in libc could have been used conditionally, when available, but since it can be implemented simply and efficiently, the portable version may just as well be used in all cases. See also: * https://pubs.opengroup.org/onlinepubs/9799919799/functions/reallocarray.html#:~:text=adding-,reallocarray * https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md#:~:text=reallocarray * https://github.com/termux/termux-packages/tree/26826aec834182c/x11-packages/foot * https://github.com/termux/termux-packages/blob/26826aec834182c/x11-packages/foot/reallocarray.c#L6 * https://github.com/termux/termux-packages/blob/26826aec834182c/x11-packages/foot/xmalloc.c.patch#L7 * https://github.com/termux/termux-packages/pull/17818 * https://github.com/termux/termux-packages/issues/23833 (see expanded build log)
* config: add ferra themekoru2026-07-21-0/+31
|
* selection: fix word boundary checkCismonX2026-07-21-23/+20
| | | | | | | | This patch fixes rightmost boundary check for a word wrapped to another line, where a multi-column character appears as the last character in the original line. Closes #2411
* csi: log warning when capping color/title stackDaniel Eklöf2026-06-24-6/+11
|
* csi: push-title: limit title stack to 128 entriesDaniel Eklöf2026-06-24-1/+3
| | | | Closes #2367
* csi: XTPUSHCOLORS: limit stack depth to 128Daniel Eklöf2026-06-24-0/+2
| | | | Closes #2362
* csi: clamp REP count to scrollback-lines * colsDaniel Eklöf2026-06-24-1/+2
| | | | | | | This can be quite a lot, but hopefully less than 0x7fffffff, which is the max value a VT parameter can have... Closes #2366
* csi: kitty: limit pop count to the size of the flag stackDaniel Eklöf2026-06-24-2/+2
| | | | | | | | | | It's circular, but there's no need to walk through it more than once... csi: kitty: limit pop count to the size of the flag stack It's circular, but there's no need to walk through it more than once...
* config: font_parse(): handle font family names with \-:,Daniel Eklöf2026-06-24-1/+19
| | | | | | | | | These characters have special meaning, and when they appear in the font *family name*, they need to be escaped in the font pattern. Before this patch, even if the user did escape them properly, _we_ un-escaped them in FcNameUnparse(), causing the wrong font to be loaded later.
* notify: fix crash in notify_done() when terminal has been closed before notificationDaniel Eklöf2026-06-23-5/+35
| | | | | | | | | | | | | | | | In server mode, if a terminal instance triggered a tracked notification (e.g. a bell notification, or a kitty notification), then the foot server crashed if the terminal instance was closed before the notification. This happened because the notify_done() callback's user supplied argument was the terminal instance, and this pointer was not verified before it was de-referenced. Fix by searching the wayland global's list of terminal instances, and ignore the callback if the wanted terminal instance is gone. Closes #2397
* main/client: add --class, an alias for --app-idDaniel Eklöf2026-06-20-0/+16
| | | | | | | | | | | | | | | This is to help e.g. scripts that wants to launch terminal instances in a terminal agnostic way. Many terminals were originally for X11, where the '--class' choice was obvious. When they were ported to Wayland, it made sense for them to keep the '--class' command line option, but have it set the application ID instead (since "class" is not a thing on Wayland). Let's add the alias, but minimally documented. We don't want to _encourage_ its use after all. Closes #2368
* wayland: win_destroy(): unmap overlay surface before destroyDaniel Eklöf2026-06-18-0/+5
| | | | Like we do with all other surfaces.
* selection: escape quotes in file names being DnD:ed on the command lineDaniel Eklöf2026-06-12-1/+12
| | | | Closes #2363
* osc: kitty text-size: bail out if text is zero-lengthDaniel Eklöf2026-06-12-0/+6
| | | | | | | This fixes a crash further down, where we try to lookup an existing compose sequence. Closes #2364
* sixel: fix NULL deref when using a shared palette and gamma-correct blendingDaniel Eklöf2026-06-12-4/+7
| | | | | | | | | This fixes a copy-paste error where we read/modified/wrote the private-palette instead of the shared palette. Since the private palette is NULL in this case, that meant a crash. Closes #2370
* sixel: clamp pan/pad to 5Daniel Eklöf2026-06-12-2/+4
| | | | | | | | | | | | | Pad is always (in real life) 1, and no-one should be setting pan to anything larger than 5 (the largest value possible to set with the sixel init parameters). FWIW, no-one really uses anything but 1 here either. Clamping ensures we don't blow up allocations to something huge, or worse, trigger an overflow that results in a pixel height of 0, causing a division-by-zero. Closes #2371
* add ayu-darklumerue2026-06-12-0/+26
|
* Import official Dracula (dark) / Alucard (light) themefhqh2026-06-12-18/+40
| | | | | Some colors in dark theme have slightly different I assume more correct values then previously
* csi: refactor CHT/CBTCismonX2026-06-12-18/+24
| | | | | | | | | | Eliminate the outer loop, so that when moving the cursor multiple tab stops, we no longer iterate the tab stop list all over again. This also fixes a DoS flaw when passing a very large value as CHT/CBT argument, which may hang the terminal. Closes #2360
* selection: fix block selection direction updateCismonX2026-06-12-1/+3
| | | | | | This patch fixes a condition check in selection_update(), so that during block selection, the selection area no longer gets incorrectly updated when selecting back across the starting column.
* term: do not allow codepoint merging into grapheme clusters directly after a cursor moveDaniel Eklöf2026-06-12-1/+21
| | | | | | | That is, only do grapheme clustering when printing codepoints in sequence, without any cursor movements in between. Closes #2383
* Fix #2377: DECCRA: swapped row-bounds check dropping multi-row copiesCampbell Barton2026-06-12-1/+1
| | | | | | `dst_bottom > dst_top` holds for every multi-row destination (rows increase downward), so the guard rejected all multi-row copies. Flip to `dst_top > dst_bottom`, mirroring the sibling column check and DEC STD 070.
* meson: require xkbcommon >= 1.6.0Daniel Eklöf2026-06-12-1/+5
| | | | | | | | We use XKB_KEYSYM_MAX, which was added in 1.6.0. In other words, this requirement isn't really new, but now we've formalized it in meson.build. Closes #2379
* selection: do not copy empty textCismonX2026-05-22-0/+8
| | | | | | | | | | Copy-on-select (configured with 'selection-target') may accidentally clear the clipboard, if the user drags the mouse a little bit when clicking inside a terminal window. Now we only copy if there is actual text being selected. Closes #2327
* csi: DECCRA: clamp and verify destination rectangle coordinatesDaniel Eklöf2026-05-22-3/+17
| | | | | | | | | | | | dst_right was already being clamped, but not dst_left. In addition to that, reject the sequence if dst_left > dst_right, or dst_bottom > dst_top. This is already being done for the source rectangle, in params_to_rectangular_area(). Closes #2352
* uri-parse: fix out-of-bounds read with malformed %-encoded contentDaniel Eklöf2026-05-22-1/+37
| | | | | | | | | | | | | | | | | | If the input URI ends with a trailing '%' (or a trailing '%N'), we read outside the provided buffer. On NULL terminated input, this happened to work out since we'd correctly detect an invalid %-sequence as soon as we read the NULL terminator. On input that is not NULL terminated, we're out of luck. This patch fixes this by also checking we have enough input left to even _try_ to read the %-digits. Also add unit tests for this particular case. Closes #2353
* uri-parse: add a bunch of unit testsDaniel Eklöf2026-05-22-0/+147
|
* project: add .clangd, where we set -Wno-c2y-extensionsDaniel Eklöf2026-05-17-0/+5
| | | | | | | | | We make use of __COUNTER__, which recent versions of clang emit a warning for (unless you compile with -std=c2y). Our meson.build already handles this for the actual build, but if your build is using gcc, -Wno-c2y-extensions isn't added to the build rules (since gcc doesn't support the flag).
* changelog: add new 'unreleased' sectionDaniel Eklöf2026-05-15-0/+11
|
* Merge branch 'releases/1.27'Daniel Eklöf2026-05-15-9/+4
|\
| * meson: bump version to 1.27.01.27.0releases/1.27Daniel Eklöf2026-05-15-1/+1
| |
| * changelog: prepare for 1.27.0Daniel Eklöf2026-05-15-8/+3
|/
* osc: kitty notifications: increase query reply buffer sizeDaniel Eklöf2026-05-14-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we initially implemented the kitty notification protocol, 128 bytes was enough. Since then, the protocol has grown, and 128 bytes is no longer enough, resulting in a crash when you try to query the protocol: printf "\e]99;i=123:p=?;\e\\" Results in #0 0x7fe4fad3dcde in __sanitizer_print_stack_trace (/usr/lib/libasan.so.8+0x13dcde) (BuildId: 38f5643355445a477f07ffa9b6a83a55c87415a0) #1 0x561ec61454e8 in print_stack_trace ../../debug.c:20 #2 0x561ec6145550 in fatal_error ../../debug.c:28 #3 0x561ec61462d0 in xvsnprintf ../../xsnprintf.c:42 #4 0x561ec614640a in xsnprintf ../../xsnprintf.c:52 #5 0x561ec6131fe6 in kitty_notification ../../osc.c:765 #6 0x561ec6139fec in osc_dispatch ../../osc.c:1511 #7 0x561ec60fcac8 in action_osc_end ../../vt.c:614 #8 0x561ec60fe6bb in state_osc_string_switch ../../vt.c:924 #9 0x561ec60ff437 in vt_from_slave ../../vt.c:1115 #10 0x561ec6078748 in fdm_ptmx ../../terminal.c:297 #11 0x561ec5ee6ed0 in fdm_poll ../../fdm.c:483 #12 0x561ec5f344d3 in main ../../main.c:676 #13 0x7fe4f9e2777d (/usr/lib/libc.so.6+0x2777d) (BuildId: 674f3ebbcb651fbc7d1189cb300acfd7d007849a) #14 0x7fe4f9e278bb in __libc_start_main (/usr/lib/libc.so.6+0x278bb) (BuildId: 674f3ebbcb651fbc7d1189cb300acfd7d007849a) #15 0x561ec5e77a14 in _start (/home/daniel/src/foot/bld/debug/foot+0x4b8a14) (BuildId: 9fca511350f3745edd3546ff800a763c1957e673) Closes #2335
* render: cursor: improve handling of fg == bgDaniel Eklöf2026-05-12-5/+20
| | | | | | | | | | | | | | | | | | | | We already detect if the final cursor colors (foreground/background) are identical. If they were, we replaced them with the default fg/bg. Unfortunately, this can still result in an invisible cursor. For example, if the current cell's default bg matches the current cell's fg. Instead, update the colors in two steps: 1. First, use the provided (cell's) fg/bg 2. If they too match, invert the cursor color This should ensure the cursor is always visible Closes #2323
* search/url/unicode-mode: set last-shortcut-symDaniel Eklöf2026-05-12-0/+8
| | | | | | | | | | When processing shortcuts, set seat->kbd.last_shortcut_sym. This ensures the corresponding release event is ignored in the main mode, if the shortcut triggered a mode exit. For example, pressing Return in search mode would exit search mode, and then immediately reset the search match, if the kitty keyboard protocol mode with release events were enabled.
* uri: check 'scheme' is non-null before de-referencing itDaniel Eklöf2026-05-11-1/+1
|
* meson: add -Dfanalyzer=false|trueDaniel Eklöf2026-05-11-1/+6
| | | | When enabled, compile with -fanalyzer
* keymap: no reason keypad keys shouldn't map shiftDaniel Eklöf2026-04-17-22/+3
| | | | | | | | | | I'm guessing, but I'm not sure, that when I initially implemented this, XTerm ignored shift in keypad escapes. Testing again, it doesn't. And regardless of what XTerm does, I don't really see any reason to exclude shift from keypad escapes. Closes #2324
* config: add url.style=none|single|double|curly|dotted|dashedDaniel Eklöf2026-04-06-11/+50
| | | | | | | | | | | This option allows you to configure which underline style to use with URLs. The default is dotted. Since before this patch, URL underlines were always plain underlines, this means the default URL underline style has changed, from single to dotted. Closes #2302