aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* selection: reset ‘empty_count’ after we’ve emitted the empty cellsDaniel Eklöf2021-06-05-0/+2
| | | | | | | | | | | | | | When marking and unmarking cells, we don’t highlight trailing empty cells. We do however highlight empty cells if they are followed by non-empty cells. I think this was an intentional choice. If one row ended with trailing empty cells, but *no* hard linebreak, then we’d continue on the next row, and emit all the empty cells once we hit a non-emtpy cell on the second row. But this is something that shouldn’t happen in any real-world use cases.
* Merge branch 'scrollback-key-bindings-pass-through-alt-screen'Daniel Eklöf2021-06-05-12/+36
|\ | | | | | | Closes #573
| * input: pass through scrollback-* key bindings when alt screen is activwDaniel Eklöf2021-06-04-12/+36
|/ | | | | | | | | Since the alt screen have no scrollback, all scrollback-* actions are effectively no-ops when the alt screen is active. Make them available to the client application instead. Closes #573
* Merge branch 'osc-9'Daniel Eklöf2021-06-04-1/+10
|\
| * osc: implement iTerm2’s OSC-9 - desktop notificationsDaniel Eklöf2021-06-04-1/+10
|/
* Merge branch 'chunked-reflow'Daniel Eklöf2021-06-04-96/+166
|\ | | | | | | Closes #504
| * changelog: text reflow performanceDaniel Eklöf2021-06-04-0/+1
| |
| * grid: reflow: ‘amount’ has already been added to ‘from’Daniel Eklöf2021-06-02-1/+1
| |
| * selection: fix bad assertionDaniel Eklöf2021-06-02-2/+2
| | | | | | | | | | When there are multiple multi-column characters back-to-back, the cell before the pivot end point may in fact be a SPACER+1 cell.
| * grid: reflow: URI range start: take over ownership of URI stringDaniel Eklöf2021-06-02-1/+2
| | | | | | | | | | Instead of strdup:ing the URI, take over ownership. This is ok since the old URI range will be free:d anyway.
| * grid: reflow: debug loggingDaniel Eklöf2021-06-02-12/+18
| |
| * grid: reflow: when determining row end coord, check *last* URI rangeDaniel Eklöf2021-06-02-1/+5
| |
| * grid: reflow: when determining row end coord, check *last* tracking pointDaniel Eklöf2021-06-02-2/+10
| |
| * grid: reflow: check the *entire* row for non-empty cellsDaniel Eklöf2021-06-02-1/+1
| |
| * grid: reflow: avoid unnecessary if-statements before chunking a rowDaniel Eklöf2021-06-02-8/+13
| |
| * grid: disable reflow timing by defaultDaniel Eklöf2021-06-02-1/+1
| |
| * grid: reflow: commentsDaniel Eklöf2021-06-02-1/+22
| |
| * grid: no need to keep the tp_col/uri_col variables aroundDaniel Eklöf2021-06-02-6/+3
| |
| * grid: fix col max calculation when row contains URI rangesDaniel Eklöf2021-06-02-1/+1
| |
| * grid: set tp/uri break flags explicitly when we know them to be trueDaniel Eklöf2021-06-02-6/+12
| |
| * grid: reflow: slightly simplified logic for end-coordinate calculationDaniel Eklöf2021-06-02-10/+8
| |
| * grid: reflow: rename _range -> rangeDaniel Eklöf2021-06-02-16/+16
| |
| * grid: reflow: remove dead codeDaniel Eklöf2021-06-02-135/+0
| |
| * grid: reflow: memcpy() chunks of cells, instead of single cell-by-cellDaniel Eklöf2021-06-02-1/+159
|/ | | | | | | | | | | | | | | | | | | | Instead of walking the old grid cell-by-cell, and checking for tracking points, OSC-8 URIs etc on each cell, memcpy() sequences of cells. For each row, find the end column, by scanning backward, looking for the first non-empty cell. Chunk the row based on tracking point coordinates. If there aren’t any tracking coordinates, or OSC-8 URIs on the current row, the entire row is copied in one go. The chunk of cells is copied to the new grid. We may have to split it up into multiple copies, since not all cells may fit on the current “new” row. Care must also be taken to not line break in the middle of a multi-column character.
* Merge branch 'restore-sighup-handler'Daniel Eklöf2021-06-02-2/+9
|\
| * slave/spawn: restore SIGHUP handler after fork(), before exec()Daniel Eklöf2021-06-02-2/+9
|/ | | | | | Foot installs a SIG_IGN handler for SIGHUP. Ignored signals are inherited in sub-processes. Thus, we need to restore it to SIG_DFL before exec:ing.
* Merge branch 'dont-split-multi-column-chars-when-resizing-alt-screen'Daniel Eklöf2021-06-02-1/+7
|\
| * grid: don’t cut multi-column chars in half when resizing the alt screenDaniel Eklöf2021-06-02-1/+7
|/ | | | | | | | When we resize the alt screen, we don’t reflow the text, we simply truncate all the lines. When doing this, make sure we don’t truncate in the middle of a multi-column character.
* Merge branch 'url-mode-off-by-one'Daniel Eklöf2021-06-02-5/+13
|\
| * url-mode: off-by-one error in end-point column of auto-detected URLsDaniel Eklöf2021-06-02-5/+13
|/ | | | | | When an auto-detected URL ended *on* the right-most column, the URL endpoint was off by one, resulting in the underline in URL mode being one character short.
* Merge branch 'document-terminfo'Daniel Eklöf2021-06-02-2/+70
|\ | | | | | | Closes #549
| * doc: foot{,client}: updates from feedback from @craigbarnesDaniel Eklöf2021-06-02-8/+8
| |
| * doc: footclient.1: -t,--term: add references to ENVIRONMENT and TERMINFO sectionsDaniel Eklöf2021-06-02-1/+2
| |
| * doc: footclient.1: add TERMINFO sectionDaniel Eklöf2021-06-02-0/+33
| |
| * doc: foot.1: -t,--term: add references to ENVIRONMENT and TERMINFO sectionsDaniel Eklöf2021-06-02-1/+2
| |
| * doc: foot.1: add TERMINFO sectionDaniel Eklöf2021-06-02-0/+33
|/
* Merge branch 'pua-double-width'Daniel Eklöf2021-06-01-8/+35
|\
| * config: add boolean option tweak.pua-double-widthDaniel Eklöf2021-06-01-8/+35
|/ | | | | | | When enabled, PUA (Private Usage Area) codepoints are always treated as double-width glyphs, regardless of the actual glyph width. Requires allow-overflowing-double-width-glyphs=yes
* Merge branch 'selection-recognizes-hard-linebreaks'Daniel Eklöf2021-06-01-4/+20
|\ | | | | | | Closes #565
| * selection: pay attention to hard linebreaks when search for word boundariesDaniel Eklöf2021-05-31-4/+20
|/ | | | | | | | | | | | | | | | | | | Double-clicking on a word in the left or right margin, would line-wrap the selection if there was a non-empty cell in the corresponding right/left margin on the prev/next line. Regardless of whether there was a hard linebreak or not. Script to reprouce: !/bin/bash cols=$(tput cols) printf "%*coo\nbar\n" $((${cols} - 2)) f Run, then double click either “foo” or “bar”. Neither should select the other part. Closes #565
* Merge branch 'environment-docs'Daniel Eklöf2021-05-30-0/+70
|\ | | | | | | Closes #556
| * changelog: add bug ref to ‘environment section added to foot/footclient’Daniel Eklöf2021-05-30-1/+2
| |
| * doc: add ENVIRONMENT section to foot(1) and footclient(1) man pagesCraig Barnes2021-05-30-0/+69
|/ | | | Closes #556
* Merge branch 'include-directive'Daniel Eklöf2021-05-30-19/+67
|\ | | | | | | Closes #555
| * config: add ‘include’ directiveDaniel Eklöf2021-05-28-19/+67
|/ | | | | | | | | | | | | | | This allows you to include sub-configurations. For example, theme files. The ‘include’ directive is a top-level keyword. I.e. it cannot be used inside sections. * The included file must be specified with an absolute path * The included file is parsed in its own scope * Nested includes are allowed * Multiple include directives are allowed Closes #555
* Merge branch 'add-window-title-template-parameter'Daniel Eklöf2021-05-27-3/+9
|\
| * notify: add ${window-title}Daniel Eklöf2021-05-27-3/+9
|/
* Merge branch 'app-id-in-notify'Daniel Eklöf2021-05-27-6/+8
|\
| * config: notify: change default value to use ${app-id}Daniel Eklöf2021-05-27-6/+8
|/ | | | | Make the default value of ‘notify’ use ${app-id} for icon and application name.
* readme: add OSC 8, 17, 19, 117, 119 and 777 to list of supported OSCDaniel Eklöf2021-05-26-0/+7
|
* Merge branch 'vt-remove-8bit-c1'Craig Barnes2021-05-26-26/+12
|\
| * vt: remove action_utf8_print(term, 0) calls from UTF-8 state handlersCraig Barnes2021-05-25-6/+6
| | | | | | | | | | These calls appear to be left over from a previous refactoring of the code. Calling this function with `wc == 0` is a no-op.
| * vt: remove partial support for 8-bit C1 control charsCraig Barnes2021-05-25-20/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are part of the "anywhere" state in Paul Flo Williams' VT parser state diagram[1]. That means that they should be accepted *anywhere* in a byte sequence, including in the middle of other sequences or even in the middle of a multi-byte UTF-8 sequence. Adhering to this requirement makes them incompatible with the use of UTF-8 as a universal encoding. Not adhering to the aforementioned requirement by making a special case for UTF-8 sequences may seem tempting, but it's much more at odds with the relevant standards[2] than it appears on the surface. UTF-8 is not an "8-bit code", at least not according to the parlance of ECMA-43, nor does it map the C1 control range in a compatible way. [1]: https://vt100.net/emu/dec_ansi_parser [2]: ECMA-35, ECMA-43, ECMA-48
* | Merge branch 'osc8-scrollback-wraparound'Daniel Eklöf2021-05-26-2/+10
|\ \ | | | | | | | | | Closes #552
| * | term: fix crash when an OSC-8 URI wraps around the scrollbackDaniel Eklöf2021-05-26-2/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long OSC-8 URIs, that are split up over multiple rows, are handled by emitting one URI range on each row the URL touches. This was done by initializing a row index variable, and then incrementing it each loop iteration. This caused an out-of-bounds array access when the row index reached the maximum number of scrollback lines. The fix is simple: make sure the row index variable wraps around, instead of incrementing without any bounds. Closes #552
* | Merge branch 'fix-iso-left-tab'Daniel Eklöf2021-05-26-14/+42
|\ \ | |/ |/| | | Closes #547
| * macros: add UNITTEST macro and use to replace test_keymap_lookup()Craig Barnes2021-05-26-4/+17
| |
| * input: regression test for escape sequence generated for ctrl+shift+tabDaniel Eklöf2021-05-26-0/+15
| |
| * input: keymap_lookup: remove unused argument ‘seat’Daniel Eklöf2021-05-26-3/+2
| |
| * changelog: fixed mod+shift+tab regressionDaniel Eklöf2021-05-26-0/+3
| |
| * keymap: iso_left_tab: we no longer “consume” shift when matchingDaniel Eklöf2021-05-26-11/+9
|/ | | | | | | Thus, the modifier list needs to include MOD_SHIFT, or we wont match anything, causing us to hit the last entry, \E[Z. Closes #547
* pkgbuild: bump fcft requirement to 2.4.0Daniel Eklöf2021-05-25-1/+1
|
* Merge branch 'ctrl-c-cancel'Craig Barnes2021-05-25-3/+7
|\
| * config: bind ctrl+c to "cancel" in search/url mode by defaultCraig Barnes2021-05-25-3/+7
| | | | | | | | Closes #544
* | Merge branch 'handle-display-roundtrip-failure'Daniel Eklöf2021-05-25-5/+19
|\ \ | | | | | | | | | Closes #542
| * | wayland: fdm callback: check return value of wl_display_dispatch_pending()Daniel Eklöf2021-05-25-2/+6
| | | | | | | | | | | | | | | Since it’s inside a while-loop, we’d better handle failures, or we risk getting stuck.
| * | wayland: roundtrip: log error and abort when wl_display_roundtrip() failsDaniel Eklöf2021-05-25-3/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / doc: foot.ini: fix default key combos for "cursor-right-word" actionCraig Barnes2021-05-24-1/+1
|/
* readme: add link to IRC logsDaniel Eklöf2021-05-24-2/+3
|
* Merge branch 'reflow-osc8-performance'Daniel Eklöf2021-05-23-55/+78
|\
| * grid: reflow: uri-ranges: avoid looping URI ranges when reflowingDaniel Eklöf2021-05-23-54/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we know the following: * URI ranges are sorted * URI coordinates are unique * URI ranges don’t cross rows We can optimize URI range reflowing by: * Checking if the *first* URI range’s start coordinate is on the current column. If so, keep a pointer to it. * Use this pointer as source when instantiating the reflowed URI range * If we already have a non-NULL range pointer, check its end coordinate instead. * If it matches, close the *last* URI range we inserted on the new row, and free/remove the range from the old row. * When line breaking, we only need to check if the *last* URI range is unclosed.
| * grid: add grid_row_uri_range_destroy()Daniel Eklöf2021-05-23-1/+7
| |
| * term: osc8_close: debug: assert all URI coordinates are uniqueDaniel Eklöf2021-05-23-0/+14
|/
* Merge branch 'foot_option_correction'Daniel Eklöf2021-05-22-1/+1
|\
| * foot.ini: use correct name for command-focused paramClayton Craft2021-05-22-1/+1
|/ | | | | | This expects a hyphen, not underscore, in the option name: err: config.c:892: /home/user/.config/foot/foot.ini:34: [bell]: command_focused: invalid key
* Merge branch 'sort-osc8-ranges'Daniel Eklöf2021-05-22-1/+7
|\
| * grid: row_add_uri_range: ensure the URIs are sortedDaniel Eklöf2021-05-22-1/+7
|/
* Merge branch 'dont-allow-overlapping-urls'Daniel Eklöf2021-05-22-10/+38
|\
| * url-mode: codespellDaniel Eklöf2021-05-22-1/+1
| |
| * url-mode: remove overlapping URLs, not just duplicatesDaniel Eklöf2021-05-22-10/+38
|/ | | | | | | | | | | | | | | | | 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.
* Merge branch 'configurable-protocols-to-match-in-url-mode'Daniel Eklöf2021-05-22-70/+236
|\ | | | | | | Closes #531
| * config: url.protocols: make it comma separated, for consistencyDaniel Eklöf2021-05-22-10/+21
| |
| * config: add url.protocolsDaniel Eklöf2021-05-22-19/+85
| | | | | | | | | | | | | | This makes the protocols recognized by auto-detected URLs configurable. Closes #531
| * config: move url-mode related options to a dedicated section, ‘url’Daniel Eklöf2021-05-22-51/+140
|/
* Merge branch 'underline-cursor-thickness'Daniel Eklöf2021-05-22-21/+71
|\ | | | | | | Closes #524
| * config: add cursor.underline-thicknessDaniel Eklöf2021-05-22-21/+71
|/ | | | | | | | | | | | | 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
* Merge branch 'fdm-always-check-for-signals'Daniel Eklöf2021-05-22-14/+21
|\ | | | | | | Closes #534
| * fdm: always check for signals after epoll_pwait(), not only on EINTRDaniel Eklöf2021-05-21-14/+21
|/ | | | | | | | | | | | | | | 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().
* notifications: use \e[22m to disable boldDaniel Eklöf2021-05-20-7/+10
| | | | | | | | | | | \e[21m was previously used to disable bold. That changed a while ago, to align foot with the majority of other terminal emulators. \e[22m now disables both bold and dim. When this change was done, the user notifications were not updated, meaning the ‘message’ part was always in bold. This was never the intended behavior.
* Merge branch 'irc-update'Daniel Eklöf2021-05-20-5/+3
|\
| * readme: remove my name from the IRC detailsDaniel Eklöf2021-05-20-2/+1
| |
| * readme/doc: update details for IRC channelCraig Barnes2021-05-19-5/+4
|/
* vt: limit maximum value of params in vt_param_get()Craig Barnes2021-05-17-2/+13
| | | | | | | | 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
* render: stop spamming “resize” INFO logsDaniel Eklöf2021-05-17-3/+0
| | | | | | | | It _may_ be acceptable in e.g. tiling WMs, where windows are seldom resized interactively. But in a stacking WM where the typical way of resizing windows is by interactive resizes, this spams way too much.
* grid: disable timing of resize operationsDaniel Eklöf2021-05-17-1/+1
|
* Merge branch 'search-refactor-extend-word'Daniel Eklöf2021-05-17-97/+170
|\ | | | | | | Closes #421
| * changelog: ctrl+w can now be used across linesDaniel Eklöf2021-05-17-0/+2
| |
| * search: match_to_end_of_word(): we update the selection ourselvesDaniel Eklöf2021-05-17-2/+8
| | | | | | | | | | | | No need to call search_find_next() after doing a search_match_to_end_of_word(), since we already *know* we have a match, and where it is.
| * extract: move ‘strip_trailing_empty’ parameter from extra_finish() to extract_begin()Daniel Eklöf2021-05-17-19/+32
| |
| * search: find_next(): correctly wrap row numberDaniel Eklöf2021-05-17-1/+1
| |