aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md (follow)
Commit message (Collapse)AuthorAgeLines
...
* Add support for xdg_toplevel.wm_capabilitiesSimon Ser2022-08-04-0/+3
| | | | See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/122
* server: Use "normal" socket activation, not inetdMax Gautier2022-07-30-0/+3
| | | | | | | | | | | | | | | | | Systemd, when doing socket activation, pass file descriptors in a non-stable order when there is multiples ones. But we only use one, so we don't need to identify it, and the file descriptors always start at 3. So use 3 for the systemd service. Source : sd_listen_fds (systemd man pages) We also need to unset variables systemd pass to socket activated process, since we don't need them and sub-process (footclient and theirs forks) could be confused by those. Closes #1107
* input: add new Unicode input modeDaniel Eklöf2022-07-29-0/+5
| | | | | | | | | | | | | | This mode is activated through the new key-bindings.unicode-input and search-bindings.unicode-input key bindings. When active, the user can “build” a Unicode codepoint by typing its hexadecimal value. Note that there’s no visual feedback in this mode. This is intentional. This mode is intended to be a fallback for users that don’t use an IME. Closes #1116
* selection: rework how we update a selectionDaniel Eklöf2022-07-28-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, each selection update would result in grid covered by the selection being walked *three* times. First to “premark” the area that *will* be selected after the update, then again to unmark the previous selection (excluding the cells that were premarked - but the cells are still iterated), and then one more time to finalize the selection state in the grid. Furthermore, each time a frame is rendered, the entire selection were iterated again, to ensure all the cells have their ‘selected’ bit set. This quickly gets *very* slow. This patch takes a completely different approach. Instead of looking at the selection as a range of cells to iterate, we view it as an area, or region. Thus, on each update, we have to regions: the region representing the previous selection, and the region representing the to-be selection. By diffing these two regions, we get two new regions: one that represents the cells that were selected, but aren’t any more, and one that represents the cells that previously were not selected, but now will be. We implement the regions using pixman regions. By subtracting the current selection from the previous selection, we get the region representing the cells that are no longer selected, and that should be unmarked. By subtracting the previous selection from the current, we get the region representing the cells that was added to the selection in this update, and that should be marked. selection_dirty_cells() is rewritten in a similar manner. We create pixman regions for the selection, and the current scrollback view. The intersection represents the (selected) cells that are visible. These need to iterated and marked as being selected. Closes #1114
* selection: extend: use scrollback relative coordinatesDaniel Eklöf2022-07-28-0/+1
| | | | | | | | | | | | | When extending a selection, we determine *how* to extend it (which endpoint to move, and whether to grow or shrink the selection) by comparing the extension point with the old start and end coordinates. For this to work correctly, we need to use scrollback relative coordinates. This fixes an issue where extending a very large selection (covering many pages) sometimes shrunk the selection instead of growing it, or just misbehaving in general.
* selection: selection_on_rows(): use scrollback relative coordsDaniel Eklöf2022-07-28-0/+1
| | | | | | | | | | | When checking if the current selection intersects with the region (passed as parameter to the function), use scrollback relative coordinates. This fixes an issue where selections crossing the scrollback wrap-around being misdetected, resulting in either the selection being canceled while scrolling, even though it wasn’t scrolled out, or the selection _not_ being canceled, when it _was_ scrolled out.
* search: find_next(): handle trailing SPACER cellsDaniel Eklöf2022-07-28-0/+2
| | | | | | | | Make sure to increment match_end_col to account for trailing SPACER cells after a match. This fixes an issue where search matches weren’t highlighted correctly when the match *ends* with a double-width character.
* config: add colors.search-box-{no-,}matchDaniel Eklöf2022-07-28-0/+3
| | | | Closes #1112
* input: kitty: always treat composed characters as ‘printable’Daniel Eklöf2022-07-28-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain dead key combinations results different escape sequences in foot, compared to kitty, when the kitty keyboard protocol is used. if (composed && is_text) key = utf32; else { key = xkb_keysym_to_utf32(sym_to_use); if (key == 0) return false; /* The *shifted* key. May be the same as the unshifted * key - if so, this is filtered out below, when * emitting the CSI */ alternate = xkb_keysym_to_utf32(sym); } If is_text=false, we’ll fall through to the non-composed logic. is_text is set to true if the character is printable *and* there aren’t any non-consumed modifiers enabled. shift+space is one example where shift is *not* consumed (typically - may be layouts where it is). As a result, pressing ", followed by shift+space with the international english keyboard layout (where " is a dead key) results in different sequences in foot and kitty. This patch fixes this by always treating composed characters as printable. Closes #1120
* keymap: change alt+escape to emit \E\E instead of a CSI 27 sequenceDaniel Eklöf2022-07-28-0/+3
| | | | Closes #1105
* csi: clamp color index for ‘CSI 38/48 ; 5 ; idx m’ sequencesDaniel Eklöf2022-07-22-0/+4
| | | | | | | | | | | | | | Indexed color values are stored in the cell attributes as color indices (into the 256-color table). However, the index from the CSI was not validated in any way, meaning you can do something like this: echo -e ‘\e[38:5:1024m CRASH \e[m’ and foot will crash on an out-of-bounds access. Fix by clamping the color index. Closes #1111
* input: don’t ignore keyboard enter/leave events when there’s no keymapDaniel Eklöf2022-06-28-0/+3
| | | | | | | | | | | The compositor _usually_ sends the keymap event *before* the enter event. But not always. Not (yet) having a keymap is not a reason to ignore the enter event (now, on the other hand, getting a key press/release event without a keymap is a compositor bug). Closes #1097
* selection: ignore drag-and-drops with unsupported mime-typesDaniel Eklöf2022-06-20-1/+6
| | | | | | | | Specifically, make sure we do *not* call wl_data_offer_receive() with a NULL mime-type, as this causes libwayland to error out, which in turn causes foot to exit. Closes #1092
* osc: add support for OSC 133;A (prompt markers)Daniel Eklöf2022-06-16-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the OSC-133;A sequence, introduced by FinalTerm and implemented by iTerm2, Kitty and more. See https://iterm2.com/documentation-one-page.html#documentation-escape-codes.html. The shell emits the OSC just before printing the prompt. This lets the terminal know where, in the scrollback, there are prompts. We implement this using a simple boolean in the row struct ("this row has a prompt"). The prompt marker must be reflowed along with the text on window resizes. In an ideal world, erasing, or overwriting the cell where the OSC was emitted, would remove the prompt mark. Since we don't store this information in the cell struct, we can't do that. The best we can do is reset it in erase_line(). This works well enough in the "normal" screen, when used with a "normal" shell. It doesn't really work in fullscreen apps, on the alt screen. But that doesn't matter since we don't support jumping between prompts on the alt screen anyway. To be able to jump between prompts, two new key bindings have been added: prompt-prev and prompt-next, bound to ctrl+shift+z and ctrl+shift+x respectively. prompt-prev will jump to the previous, not currently visible, prompt, by moving the viewport, ensuring the prompt is at the top of the screen. prompt-next jumps to the next prompt, visible or not. Again, by moving the viewport to ensure the prompt is at the top of the screen. If we're at the bottom of the scrollback, the viewport is instead moved as far down as possible. Closes #30
* ime: track IME focus independently from keyboard focusDaniel Eklöf2022-06-15-0/+1
| | | | | | | | | | | | | | | | | Replace the seat->ime.focused boolean with a terminal instace pointer, seat->ime_focus. Set and reset this on ime::enter() and ime::leave() events, and use this instead of seat->kbd_focus on all other IME events. This fixes two issues: a) buggy compositors that sometimes sends an IME enter event without first having sent a keyboard enter event. b) seats may be IME capable while still lacking the keyboard capability. Such seats will *always* see IME enter events without a corresponding keyboard enter event.
* selection: allow HT, VT and FF, disallow NUL in non-bracketed paste modeDaniel Eklöf2022-06-15-0/+6
| | | | | | | | | | | | | | | | This syncs foot with more recent versions of XTerm, where it’s “disallowedPasteControls” resource has changed its default value to BS,DEL,ENQ,EOT,ESC,NULL Note that we’re already stripping out ENQ,EOT,ESC in all modes. What does it mean for foot: * HT, VT and FF are now allowed, regardless of paste mode * NUL is now stripped in non-bracketed paste mode Closes #1084
* changelog: new ‘environment’ section in foot.iniDaniel Eklöf2022-06-13-0/+4
|
* grid: reflow: don’t trim trailing empty cells from logical linesDaniel Eklöf2022-06-11-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a line in the old grid (the one being reflowed) doesn’t have a hard linebreak, don’t trim trailing empty cells. Doing so means we’ll “compress” (remove) empty cells between text if/when we revert to a larger window size. The output from neofetch suffers from this; it prints a logo to the left, and system information to the right. The logo and the system info column is separated by empty cells (i.e. *not* spaces). If the window is reduced in size such that the system info is pushed to a new line, each logo line ends with a number of empty cells. The next time the window is resized, these empty cells were ignored (i.e. removed). That meant that once the window was enlarged again, the system info column was a) no longer aligned, and b) had been pulled closer to the logo. This patch doesn’t special case trailing empty cells when the line being reflowed doesn’t have a hard linebreak. This means e.g. ‘ls’ output is unaffected. Closes #1055
* config: use $HOME instead of getpwuid() to retrieve users’s home dirDaniel Eklöf2022-05-25-0/+5
| | | | | When searching for foot.ini, use $HOME instead of getpwuid() to retrieve the user’s home directory.
* meson: add -Dsystemd-units-dir=<path> meson command line optionDaniel Eklöf2022-05-12-0/+2
| | | | | | | | | This allows package maintainers to override the location to which our systemd service files are installed. It’s value is an *absolute* path, and *not* relative ${prefix}. The default is ${systemduserunitdir}.
* terminal: move viewport when part of it is scrolled outDaniel Eklöf2022-05-11-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the viewport is at the top of the scrollback, and a program is scrolling (e.g. by emitting newlines), the viewport needs to be moved. Otherwise, the top of the viewport will show the *bottom* of the scrollback (i.e. the newly emitted lines), and the bottom of the viewport shows the top of the scrollback. How do we detect if the viewport needs to be moved? We convert its absolute row number to a scrollback relative row. This number is also the maximum number of rows we can scroll without the viewport being scrolled out. In other words, if the number of rows to scroll is larger than the viewports scrollback relative row number, the viewport needs to moved. How much do we need to move it? The difference between the number of rows to scroll, and the viewports scrollback relative row number. Example: if the viewport is at the very top of the scrollback, its scrollback relative row number is 0. In this case, it needs to be moved the same number of rows as is being scrolled.
* url-mode: add support for XDG activation when opening URLsDaniel Eklöf2022-05-05-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | First, add a ‘token’ argument to spawn(). When non-NULL, spawn() will set the ‘XDG_ACTIVATION_TOKEN’ environment variable in the forked process. If DISPLAY is non-NULL, we also set DESKTOP_STARTUP_ID, for compatibility with X11 applications. Note that failing to set either of these environment variables are considered non-fatal - i.e. we ignore failures. Next, add a helper function, wayl_get_activation_token(), to generate an XDG activation token, and call a user-provided callback when it’s ‘done (since token generation is asynchronous). This function takes an optional ‘seat’ and ‘serial’ arguments - when both are non-NULL/zero, we set the serial on the token. ‘win’ is a required argument, used to set the surface on the token. Re-write wayl_win_set_urgent() to use the new helper function. Finally, rewrite activate_url() to first try to get an activation token (and spawn the URL launcher in the token callback). If that fails, or if we don’t have XDG activation support, spawn the URL launcher immediately (like before this patch). Closes #1058
* changelog: fix URL in #1047 issue linkDaniel Eklöf2022-04-28-1/+1
|
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2022-04-27-0/+11
|
* changelog: prepare for 1.12.1Daniel Eklöf2022-04-27-9/+3
|
* changelog: changed behavior of “extend-to-word-boundary”Daniel Eklöf2022-04-27-0/+6
|
* term: reset sixel options when hard resetting the terminal stateDaniel Eklöf2022-04-26-0/+2
|
* config: add ctrl+shift+v and XF86 paste to SEARCH_CLIPBOARD_PASTEDaniel Eklöf2022-04-26-0/+4
| | | | | | | | | | | | | We now bind ctrl+v, ctrl+shift+v, ctrl+y and XF86Paste to pasting from the clipboard into the scrollback search buffer. Why all these? Because we can, and because all are common shortcuts for pasting: * ctrl+v: “normal” apps use this by default * ctrl+shift+v: used in terminals (including foot) * ctrl+y: Emacs * XF86Paste: special keyboard key, for pasting
* search: fix infinite loop when highlighting all matchesDaniel Eklöf2022-04-26-1/+3
| | | | | | | | | | | | | | | find_next() did not always terminate correctly, causing search_matches_next() to never terminate, which finally leads to an infinite loop when rendering the search overlay surface, while finding all matches to highlight. The problem is that find_next(), after having found the initial matching characters, enters a nested while loop that tries to match the rest of the search criteria. This inner while loop did not check if we’ve reached the last cell, and happily continued past it (eventually wrappping around the scrollback buffer). Closes #1047
* changelog: typo: space on the wrong side of the parenthesisDaniel Eklöf2022-04-26-1/+1
|
* changelog: workaround for Sway bug #6960Daniel Eklöf2022-04-26-0/+9
|
* changelog: search mode not always highlighting all matches correctlyDaniel Eklöf2022-04-26-0/+2
|
* changelog: crash when extending selection in search modeDaniel Eklöf2022-04-26-0/+2
|
* changelog: scrollback mode freezing, with 100% CPUDaniel Eklöf2022-04-24-0/+2
|
* changelog: UI not refreshing when pasting into the scrollback search boxDaniel Eklöf2022-04-24-0/+5
|
* changelog: hyperlink lists under their corresponding sub-sectionDaniel Eklöf2022-04-23-23/+25
|
* changelog: pgo helper binary build fix (missing key-binding stubs)Daniel Eklöf2022-04-22-0/+4
|
* changelog: convert all issue links to reference links in the 1.12.0 releaseDaniel Eklöf2022-04-22-33/+49
|
* Revert "changelog: convert all issue links to reference links in the 1.12.0 release"Daniel Eklöf2022-04-22-245/+229
| | | | | | | This reverts commit 6652a836adb26ef55789bbd23113b158090451fd. We only added the actual links to the 1.12.0 release, meaning all other issue hyperlinks broke.
* changelog: convert all issue links to reference links in the 1.12.0 releaseDaniel Eklöf2022-04-22-229/+245
|
* changelog: replace all bug refs with markdown hyperlinksDaniel Eklöf2022-04-22-219/+219
|
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2022-04-22-0/+11
|
* changelog: prepare for 1.12.0Daniel Eklöf2022-04-22-5/+12
|
* meson: add -Dtests=false|true optionDaniel Eklöf2022-04-22-0/+4
| | | | | | | When set to false, no test binaries are neither built, nor executed (with “ninja test”). Closes #919
* search: don't modify search.start coord *before* finding next matchDaniel Eklöf2022-04-21-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The match logic uses the last start coordinate to determine which end points in the selection to update. This sometimes fails when the start coordinate has been changed by e.g. a key binding - the new start coordinate is incorrectly matched against the old-but-modified start coordinate, causing foot to e.g. *not* upate the selection start coordinate. Example: $ echo 'test\n\test\ntest' Then do a scrollback search for 'test. The first match is found correctly (the last 'test'), but searching for the previous match (ctrl+r) does not select the middle 'test'. Fix by passing the search direction to search_find_next(), and have _it_ calculate the coordinate to start search. There are three possibilities: * forward * backward * "backward", but at the same position The first two are used when searching for next/prev match with ctrl+s and ctrl+r. The last one is used when the search criteria is updated. In this case, we don't want to move to the previous match, *unless* the current match no longer matches.
* changelog: move “re-mapping input” from “changed” to “added”Daniel Eklöf2022-04-20-2/+2
|
* csi: implement CSI > 4n (reset modifyOtherKeys)Daniel Eklöf2022-04-19-0/+4
|
* search: fix next/prev not updating selection correctly when matches overlapDaniel Eklöf2022-04-17-0/+2
| | | | | When the new match overlapped with the old match, the selection wasn’t updated correctly.
* changelog: key binding overrides having no effect with footclientDaniel Eklöf2022-04-17-0/+2
|
* meson: install foot.ini to /etc/xdg/foot/foot.iniDaniel Eklöf2022-04-17-0/+4
| | | | Closes #1001
* url-mode: add a key binding that enables “persistent” URL modeDaniel Eklöf2022-04-17-0/+4
| | | | | | | This is an alternative to ‘show-urls-launch’, where we stay in URL mode after activating an URL. Closes #964
* changelog: scrollback search mode highlights all matchesDaniel Eklöf2022-04-17-0/+1
|
* changelog: [csd].hide-when-maximizedDaniel Eklöf2022-04-16-0/+2
|
* wayland: take (visible) border width into account on configure eventsDaniel Eklöf2022-04-16-0/+2
| | | | | | | | | | | When the compositor is asking us to resize ourselves, take our (visible) CSD borders into account. This is similar to how we already take the titlebar size into account. This fixes an issue where the window size “jumps” when the user starts an interactive resize, when csd.border-width > 0. This as been observed in GNOME.
* render: take visible border width into account when setting window geometryDaniel Eklöf2022-04-16-0/+2
| | | | This fixes e.g. window snapping in GNOME.
* client: add -E,--client-environmentDaniel Eklöf2022-04-12-0/+4
| | | | | | | | | | | | | | | | | When this option is used, the child process in the new terminal instance will inherit its environment from the footclient process, instead of the foot server’s. Implemented by sending (yet another) dynamic string list as part of the client -> server setup packet. When the new option is *not* used, the setup packet is now 2 bytes larger than before. On the server side, the slave process now uses execvpe() instead of execvp(). There’s plumbing to propagate a new ‘envp’ argument from term_init() all the way down to slave_exec(). If ‘envp’ is NULL, we use ‘environ’ instead (thus matching the old behavior of execvp()). Closes #1004
* changelog: improved compatibility with XTerm when modifyOtherKeys=2Daniel Eklöf2022-04-10-0/+2
|
* config: fallback to /etc/xdg if XDG_CONFIG_DIRS is unsetDaniel Eklöf2022-04-07-0/+2
| | | | Closes #1008
* config: add tweak option to allow disabling sixelsjvoisin2022-04-06-0/+2
| | | | Closes #950
* render: ensure an underline cursor is not positioned too lowDaniel Eklöf2022-04-06-0/+3
| | | | | | | | The underline cursor is positioned just below regular underlines. A bug in the positioning logic related to this, sometimes resulted in the cursor being thinner than what it should be, or even invisible. Fixes #1005
* Use circles for rendering light arc box-drawing characters.L3MON4D32022-04-03-0/+2
| | | | | | Ellipses can look weird when the font is narrow. Closes #988
* input: don’t allow non-significant modifiers when matching untranslated symbolsDaniel Eklöf2022-03-20-0/+2
| | | | | | | | | | | | | | | | | | When matching “untranslated” bindings (by matching the base symbol of the key, e.g. ctrl+shift+2 in US layout), require that no non-significant modifiers are active. This fixes an issue where AltGr was “ignored”, and would cause certain combinations to match a key binding. Example: ctrl+altgr+0, on many European layouts matched against the default ctrl+0 (reset the font size), instead of emitting ^] To make this work, we now need to filter out “locked” modifiers (e.g. NumLock and CapsLock). Otherwise having e.g. NumLock active would prevent *all* untranslated matching to fail. Closes #983
* selection: don’t translate \r to \n when pastingDaniel Eklöf2022-03-19-0/+2
| | | | | | | | | | | | | | | | | In non-bracketed paste mode, we translate \n to \r, and \r\n to \r. The latter matches XTerm, urxvt, alacritty and kitty. The former matches alacritty and kitty (xterm and urxvt just blindly replaces all \n occurrences with \r, meaning \r\n is translated to \r\r. For some reason, we then unconditionally translated all \r back to \n, regardless of whether bracketed paste was enabled or not. Unsure why/where this comes from, but it doesn't match any of the other terminal emulators I tested. One example where this caused issues is in older versions of nano (at least up to 2.9). Closes #980
* csi: add support for DECNKM private modeCraig Barnes2022-03-19-0/+5
| | | | | | | | | | | This is equivalent to DECKPAM/DECKPNM when enabled/disabled, but can also be saved/restored/queried with XTSAVE/XTRESTORE/DECRQM. See also: * https://vt100.net/docs/vt510-rm/DECNKM.html * https://vt100.net/docs/vt510-rm/DECKPAM.html * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-PC-Style-Function-Keys
* osc: use four digits in OSC-4 and OSC-11 rgb:r/g/b repliesDaniel Eklöf2022-03-13-0/+2
| | | | Closes #971
* input: get_current_modifiers(): don’t crash if seat has no keyboardDaniel Eklöf2022-03-04-0/+4
| | | | Closes #963
* meson: stop using deprecated functions, require meson >= 0.58Daniel Eklöf2022-02-27-0/+1
| | | | | | * get_pkgconfig_variable() -> get_variable() * prog.path() -> prog.full_path() * meson.build_root() -> meson.global_build_root()
* Socket activation changelog entryMax Gautier2022-02-26-1/+1
|
* config/input: add scrollback-home|end key bindings (unbound by default)Daniel Eklöf2022-02-23-0/+2
|
* changelog: remapping input to custom escape sequencesDaniel Eklöf2022-02-16-0/+2
|
* config: do key binding collision handling in overridesDaniel Eklöf2022-02-16-0/+2
| | | | | This ensures we detect, and handle, collisions also for key-bindings specified as overrides.
* main: --server: don’t exit with code 0 on failureDaniel Eklöf2022-02-16-0/+3
| | | | | | | | | | | | | | | | | | A foot --server instance would exit with code 0, even on failure, if the number of currently open terminal instances were 0. This is because ‘ret’ assumed failure, and then tried to set it to ‘success’ after the even loop had terminated, basted on the server’s current state. Fix by: * set ‘ret’ to success just before entering the event loop * set ‘ret’ to failure when we detect an FDM failure * don’t try to second-guess success/failure after having exited the event loop Closes #943
* csi/input: remove private mode 27127Craig Barnes2022-02-09-0/+5
| | | | This effectively reverts commit 31c73f0cf01e1d0bdcd1435136b010c1c1ab442c.
* changelog: fallback xcursorAshish SHUKLA2022-02-07-1/+1
|
* changelog: OSC-22Daniel Eklöf2022-02-07-0/+5
|
* changelog: crash in pipe-scrollbackDaniel Eklöf2022-02-07-0/+2
|
* changelog: scrollback wrap-around crossing selectionsDaniel Eklöf2022-02-07-0/+2
|
* changelog: mouse selections are finalized on window resizeDaniel Eklöf2022-02-07-0/+7
|
* changelog: “(null)” being logged as font-nameDaniel Eklöf2022-02-06-0/+2
|
* changelog: missing ‘wayland_client’ dependency in test-configDaniel Eklöf2022-02-06-0/+5
|
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2022-02-05-0/+11
|
* changelog: prepare for 1.11.0Daniel Eklöf2022-02-05-4/+13
|
* fcft: adapt to API changes in fcft-3.xDaniel Eklöf2022-02-05-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fcft no longer uses wchar_t, but plain uint32_t to represent codepoints. Since we do a fair amount of string operations in foot, it still makes sense to use something that actually _is_ a string (or character), rather than an array of uint32_t. For this reason, we switch out all wchar_t usage in foot to char32_t. We also verify, at compile-time, that char32_t used UTF-32 (which is what fcft expects). Unfortunately, there are no string functions for char32_t. To avoid having to re-implement all wcs*() functions, we add a small wrapper layer of c32*() functions. These wrapper functions take char32_t arguments, but then simply call the corresponding wcs*() function. For this to work, wcs*() must _also_ be UTF-32 compatible. We can check for the presence of the __STDC_ISO_10646__ macro. If set, wchar_t is at least 4 bytes and its internal representation is UTF-32. FreeBSD does *not* define this macro, because its internal wchar_t representation depends on the current locale. It _does_ use UTF-32 _if_ the current locale is UTF-8. Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is defined. Other fcft API changes: * fcft_glyph_rasterize() -> fcft_codepoint_rasterize() * font.space_advance has been removed * ‘tags’ have been removed from fcft_grapheme_rasterize() * ‘fcft_log_init()’ removed * ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
* changelog: XF86Copy+XF86Paste are now recognized by defaultDaniel Eklöf2022-02-05-0/+4
|
* box-drawing: LIGHT ARC: check for sqrt() failuresDaniel Eklöf2022-02-04-0/+2
| | | | Closes #914
* sixel: DECGRI (repeat) with a count of 0 should emit a single sixelDaniel Eklöf2022-02-04-1/+2
|
* sixel: resize: truncate instead of failing, when new size exceeds max sizeDaniel Eklöf2022-02-04-0/+2
| | | | | If the size we’re trying to set exceeds the configured max size, truncate instead of failing.
* main: reset signal mask and signal handlers at startupDaniel Eklöf2022-02-04-0/+3
| | | | | | | | This ensures processes spawned by us (e.g. the shell, new terminal instances etc) don’t inherit a flawed signal mask, or having signals unknowingly ignored. Closes #854
* Merge branch 'fix-bash-completions'Daniel Eklöf2022-02-03-0/+2
|\
| * Fix bash completion for lists of short optionsNicolai Dagestad2022-02-03-0/+2
| |
* | wayland: remove workaround for sway-1.5 bug - slow resizing of hidden windowsDaniel Eklöf2022-02-03-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Sway-1.5, sway waits for configure ACKs from hidden windows when views are being resized. I.e. if you have e.g. a stacked view, with one or more windows currently not visible, and you resize the stack, then sway will emit configure events to all windows, and then wait for ACKs before rendering the resized view. The problem with this is that sway also does **not** call frame callbacks on hidden windows. So if we have rendered one frame, and thus registered a frame callback, we’ll never render any more frames until the window becomes visible again. Ergo, if you resize the view interactively, only the first resize actually happens. After that, all hidden views are “stuck”, causing ACK timeouts. We worked around this in foot by preempting the frame callback. I.e. destroying it, and rendering the frame anyway. This has fixed in sway-1.6, and thus we can remove the workaround.
* | extract: ensure line-based selections are terminated with a newlineDaniel Eklöf2022-02-03-0/+2
| | | | | | | | Closes #869
* | selection: don’t quote file URIs on the alt screenDaniel Eklöf2022-02-02-0/+2
|/ | | | Closes #379
* keymap: alt-tab (C-tab) now emits “ESC tab” by defaultDaniel Eklöf2022-02-01-0/+2
| | | | | | | | | | | | | | | | In our default mode (roughly equivalent to XTerm’s modifyOtherKeys=1), alt-tab now emits ESC-tab instead of CSI 27;3;9~. When modifyOtherKeys=2 is enabled (CSI >4;2m), alt-tab emits the “old” CSI 27 escape. This better matches XTerm’s behavior. Note that other alt-tab combos are ambiguous in XTerm, and thus they are left unchanged here (i.e. we keep emitting CSI 27 escapes for them). Closes #900
* changelog: search for last searched-for stringDaniel Eklöf2022-01-29-0/+2
|
* replace gettimeofday with clock_gettimePranjal Kole2022-01-15-0/+2
| | | | | | | | | | | | | POSIX.1-2008 has marked gettimeofday(2) as obsolete, recommending the use of clock_gettime(2) instead. CLOCK_MONOTONIC has been used instead of CLOCK_REALTIME because it is unaffected by manual changes in the system clock. This makes it better for our purposes, namely, measuring the difference between two points in time. tv_sec has been casted to long in most places since POSIX does not define the actual type of time_t.
* dcs: implement DECRQSSDaniel Eklöf2022-01-14-0/+7
| | | | | | | | | | | This patch adds support for DECRQSS (request Selection or Setting), for the following sub-queries: * DECSTBM Set Top and Bottom Margins * SGR Set Graphic Rendition * DECSCUSR Set Cursor Style Closes #798
* changelog: XTGETTCAPDaniel Eklöf2022-01-14-1/+3
|
* changelog: improved handling of incompatible localesDaniel Eklöf2022-01-13-0/+5
|
* input: reset mouse button click counter when mouse movesDaniel Eklöf2022-01-13-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in #883, creating a block selection (with ctrl+BTN_LEFT), then *quickly* (within 300ms from) creating a new one, will, in fact, _not_ create a new block selection, but a ‘select-word-whitespace’ selection (ctrl+BTN_LEFT-2). A similar effect can be seen with plain selections (BTN_LEFT). Click and drag to make a selection, but *release*, and make a new selection within 300ms from the initial button press, and the new selection is suddenly a word-based selection. This happens because triggering a binding does *not* reset the button click counter. So, shouldn’t we just do that? No, because we rely on this behavior to handle single-, double- and triple-click actions. If we were to reset the button click handler, then we’d have to instead delay triggering the first action with 300ms, which would make things appear laggy. If we don’t do this, it would be impossible to double- and triple-click, since the single-click action would keep resetting the click counter. This patch takes a slightly different approach; we reset the click counter when the mouse has moved “too much”. For now, “too much” is when the cursor has moved to a different cell. This way, single-, double- and triple-clicks continue to work as before. But, creating actual selections, and then quickly releasing and starting a new selection produces the expected results. Closes #883