aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* | doc: foot-ctlseqs: mention that SS2/SS3 only affect the next characterCraig Barnes2021-06-12-2/+2
| |
* | doc: foot-ctlseqs: rename SS0/SS1 to SO/SICraig Barnes2021-06-12-2/+2
|/ | | | | | | | | | | There's no mention of SS0 or SS1 functions in ECMA-48 or ECMA-35. 0x0E/0x0F are SO/SI (Shift In/Out) in "7-bit environments" or LS0/LS1 (Locking Shift 0/1) in "8-bit environments". The former is the one that applies to foot, since it generally follows "7-bit" conventions due to its use of UTF-8. See also: ECMA-35 §7.2 and §9.2.
* Replace tab indents with spaces in config.hCraig Barnes2021-06-12-2/+2
|
* Merge branch 'config-cli-override'Daniel Eklöf2021-06-12-87/+182
|\ | | | | | | Closes #554
| * Override options from command lineRyan Farley2021-06-12-87/+182
|/ | | | | | | | | Allow any configuration option to be overridden with -o/--override 'section.key=value' arguments, as suggested in #554 update completitions for override slight refactoring to ease footclient support
* Merge branch 'no-conf-found-is-not-an-error'Daniel Eklöf2021-06-11-1/+4
|\
| * config: demote “no configuration found, using defaults” to a mere warningDaniel Eklöf2021-06-10-1/+4
| | | | | | | | | | And don’t notify the user in the terminal window, only log it on stderr.
| * config: change “no configuration found, using defaults” from error to warningDaniel Eklöf2021-06-10-1/+1
|/
* Merge branch 'free-box-drawings-data'Daniel Eklöf2021-06-09-13/+19
|\ | | | | | | Closes #586
| * term: free the data associated with the pixman image when destroying box-drawing glyphsDaniel Eklöf2021-06-09-13/+19
|/ | | | Closes #586
* Merge branch 'clipboard-mime-types'Daniel Eklöf2021-06-09-6/+21
|\ | | | | | | Closes #583
| * selection: add support for TEXT/STRING/UTF8_STRING mime-types in incoming offersDaniel Eklöf2021-06-09-6/+21
|/ | | | | | | | | We were already offering these mime types for our own clipboard data, but ignored them in incoming offers. Fixes paste issues from Geany. Closes #583
* Merge branch 'charset-shift-fixes'Craig Barnes2021-06-09-14/+47
|\
| * terminal: add 'charset_designator' enum to make code more self-documentingCraig Barnes2021-06-09-18/+19
| | | | | | | | | | | | This commit also renames the term_set_single_shift_ascii_printer() function to term_single_shift(), since the former is overly verbose and not really even accurate.
| * changelog: add issue links for previous 2 entriesCraig Barnes2021-06-09-2/+3
| |
| * vt: fix SS2/SS3 escape sequences to act correctly as single shiftsCraig Barnes2021-06-08-4/+22
| | | | | | | | | | | | These sequences are supposed to affect the next printable ASCII character and then reset to the previous character set, but before this commit they were behaving like locking shifts.
| * vt: add support for LS2 and LS3 locking shiftsCraig Barnes2021-06-08-0/+13
| |
* | Merge branch 'overlapping-sixels'Daniel Eklöf2021-06-09-17/+225
|\ \ | | | | | | | | | Closes #562
| * | sixel: add support for overlapping sixelsDaniel Eklöf2021-06-09-17/+225
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writing a sixel on top of an already existing sixel currently has the following limitations in foot: * The parts of the first sixel that is covered by the new sixel are removed, completely. Even if the new sixel has transparent areas. I.e. writing a transparent sixel on top of another sixel *replaces* the first sixel with the new sixel, instead of layering them on top of each other. * The second sixel erases the first sixel cell-wise. That is, a sixel whose size isn’t a multiple of the cell dimensions will leave unsightly holes in the first sixel. This patch takes care of both issues. The first one is actually the easiest one: all we need to do is calculate the intersection, and blend the two images. To keep things relatively simple, we use the pixman image from the *new* image, and use the ‘OVER_REVERSE’ operation to blend the new image over the old one. That is, the old image is still split into four tiles (top, left, right, bottom), just like before. But instead of throwing away the fifth middle tile, we blend it with the new image. As an optimization, this is only done if the new image has transparency (P1=1). The second problem is solved by detecting when we’re erasing an area from the second image that is larger than the new image. In this case, we enlarge the new image, and copy the old image into the new one. Finally, when we enlarge the new image, there may be areas in the new image that is *not* covered by the old image. These areas are made transparent. The end result is: * Each cell is covered by at *most* 1 sixel image. I.e. the total numbers of sixels are finite. This is important for the ‘mpv --vo=sixel’ use case - we don’t want to end up with thousands of sixels layered on top of each other. * Writing an opaque sixel on top of another sixel has _almost_ zero performance impact. Especially if the two sixels have the same size, so that we don’t have to resize the new image. Again, important for the ‘mpv --vo=sixel’ use case. Closes #562
* | Merge branch 'tabs'Daniel Eklöf2021-06-09-4/+70
|\ \ | |/ |/| | | Closes #508
| * changelog: tabs are preservedDaniel Eklöf2021-06-09-0/+2
| |
| * csi: CHT: don’t alter the LCF flagDaniel Eklöf2021-06-08-0/+3
| | | | | | | | | | This makes us pass the vttest 11.5.4 (Test non-VT100 -> Test ISO-6429 cursor-movement -> CHT) test.
| * vt: TAB: don’t print a ‘\t’ to the grid if the *current* cell isn’t emptyDaniel Eklöf2021-06-08-3/+4
| | | | | | | | | | | | | | | | If the cursor is already at the right edge, our logic that checked for non-empty cells failed; it didn’t check the current cell. Fix by initializing ‘emit_tab_char’ to true/false, depending on the contents of the current cell.
| * extract: consume spaces following a tabDaniel Eklöf2021-06-08-0/+23
| | | | | | | | | | | | That is, we choose to copy the tab character, and not the spaces it represents. Most importantly, we don’t copy *both* the tab and the spaces.
| * vt: emit a tab character if all cells between cursor and tab stop are emptyDaniel Eklöf2021-06-08-4/+41
|/ | | | | | | | | | | | | | | | | | | | | | TAB (\t) move the cursor to the next tab stop. That’s it, according to the specification. However, many terminal emulators try to keep tabs in the grid, to be able to e.g. copy them. That is, copying a text chunk containing tabs should result in tabs being pasted, not spaces. In order to do that, we need to print a tab character to the grid. To improve text reflow of tabs, we also print spaces to the subsequent cells, up until (but not including) the next tab stop. However, we can only do this if all the cells between the cursor and the next tab stop are empty, since (obviously), we cannot overwrite pre-existing characters. Finally, while some fonts render tabs as spaces (i.e. an empty glyph), some use a glyph representing “unprintable” characters, or similar. Thus, we need to exclude cells with tab characters when rendering.
* Merge branch 'il-dl-reset-cursor-col'Daniel Eklöf2021-06-08-0/+3
|\
| * csi: IL+DL: move cursor to column 0Daniel Eklöf2021-06-08-0/+3
|/ | | | | | | | | This fixes vttest 11.6.6.3 Test non-VT100 -> Test ISO-6429 colors -> Test of VT102-style features with BCE -> Test Insert/Delete Char/Line
* Merge branch 'reverse-video-only-affects-default-fg-bg'Daniel Eklöf2021-06-08-4/+7
|\
| * render: reverse video only swaps *default* fg/bgDaniel Eklöf2021-06-08-4/+7
| | | | | | | | | | | | | | | | | | This matches XTerm behavior, and fixes vttest 11.6.6.2: Test non-VT100 -> Test ISO-6429 colors -> Test of VT102-style features with BCE -> Test of screen features
* | vt: fix buggy chains of ternary expressions in action_esc_dispatch()Craig Barnes2021-06-08-18/+9
| | | | | | | | | | | | | | | | | | | | Only the first character in the chain was being compared with `priv` and the rest were just being evaluated as simple expressions. This was causing the G2 and G3 operations to erroneously use the G1 index. Since the characters are a contiguous range, we can just subtract the start of the range to get the appropriate index. The outer switch statement already ensures the values are in range.
* | terminal: fix compilation error when debug logging is enabledCraig Barnes2021-06-08-2/+2
|/ | | | | | | | | | Without this fix, setting LOG_ENABLE_DBG to 1 in terminal.c would cause the following error: > terminal.c:1787: 'struct terminal' has no member named 'font_scale' The 'font_scale' member was removed in commit 2afc6782361d0deaa443234466775b1121feec8f.
* vt: \E#8: print ‘E’ using the default attributesDaniel Eklöf2021-06-07-1/+1
|
* 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
|/