aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md (follow)
Commit message (Collapse)AuthorAgeLines
* changelog: prepare for 1.10.2Daniel Eklöf2021-12-02-6/+4
|
* osc-4: don’t update the color of cells with RGB fg/bg colorsDaniel Eklöf2021-12-01-0/+2
| | | | | | | | | | | | | | | | | | | | OSC 4/104 changes the 256-color palette. We also run a pass over the visible cells, and update their colors. This was previously done by comparing the actual color of the cell, with the “old” color in the palette. If they matched, the cell was updated. This meant that cells with an RGB color (i.e. not a palette based color) was also updated, _if_ its color matched the palette color. Now that each cell tracks its color *source*, we can ignore all non-palette based cells. Note that this still isn’t perfect: if the palette contains multiple entries with the same color, we’ll end up updating the “wrong” cells. Closes #678
* input: always update the xcursor shape in pointer enter/motion eventsDaniel Eklöf2021-12-01-0/+1
| | | | | | | | | | | | | | | | Now that term_xcursor_update_for_seat() takes the current surface into account (i.e. doesn’t assume the cursor is over the main grid), there’s no longer any need to call render_xcursor_set() directly. Thus, we can simply call term_xcursor_update_for_seat() on **all** pointer enter and motion events. As long as we take care to update the internal state to reflect the, possibly new, current surface before doing so. Also make sure to **always** reset the seat’s “current” xcursor pointer on pointer leave events. This is done without actually sending anything to the compositor, but is necessary to ensure that we *do* send a request to update the xcursor on the next pointer enter event.
* changelog: window-menuDaniel Eklöf2021-11-30-0/+2
|
* render: fix csd border rendering glitch when width > 5pxDaniel Eklöf2021-11-29-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | CSD borders are always *at least* 5px. If url.border-width=0, those 5px are all fully transparent (and act as interactive resize handles). As csd.border-width increases, the number of transparent pixels decrease. Once csd.border-width >= 5, the border is fully opaque. When csd.border-width > 5, then width of the border is (obviously) more than 5px. But, when rendering the opaque part of the border, we still used 5px for the invisible part, which caused some pixman rectangles to have negative x/y coordinates. This resulted in rendering glitches due to overflows in pixman when rendering the borders. The fix is to ensure the total border size is always at least, but not *always* 5px. That is, set it to max(5, csd.border-width). This patch also fixes an issue where the CSD borders were not dimmed (like the titlebar) when the window looses input focus. Closes #823
* changelog: kitty keyboard protocol - disambiguate escape codesDaniel Eklöf2021-11-28-0/+3
|
* grid: bug: OSC-8 URIs were incorrectly skipped while resizing the alt screenDaniel Eklöf2021-11-26-0/+2
|
* osc8: update URI ranges as we print data, *not* when the URI is closedDaniel Eklöf2021-11-25-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | At first, an OSC-8 URI range was added when we received the closing OSC-8 escape (i.e. with an empty URI). But, this meant that cursor movements while the OSC-8 escape was in effect wasn’t handled correctly, since we’d add a range that spanned the cursor movements. Attempts were made to handle this in the cursor movement functions, by closing and re-opening the URI. However, there are too many corner cases to make this a viable approach. Scrolling is one such example, line-wrapping another. This patch takes a different approach; emit, or update the URI range when we print to the grid. This models the intended behavior much more closely, where an active OSC-8 URI act like any other SGR attribute - it is applied to all cells printed to, but otherwise have no effect. To avoid killing performance, this is only done in the “generic” printer. This means OSC-8 open/close calls must now “switch” the ASCII printer. Note that the “fast” printer still needs to *erase* pre-existing OSC-8 URIs. Closes #816
* input: finalize mouse selection on a pointer-leave event on the GRID surfaceDaniel Eklöf2021-11-25-0/+5
| | | | | | | | | If a mouse selection was ongoing, and the user switched workspace (probably using the keyboard...), and then back, the selection was still treated as ongoing, while all other mouse state has been reset. This meant the user had to tap at least once to stop the selection.
* config: add tweak.grapheme-width-method=maxDaniel Eklöf2021-11-23-0/+5
| | | | | | ‘max’ is a new value for ‘tweak.grapheme-width-method’. When enabled, the width of a grapheme cluster is that of the cluster’s widest codepoint.
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-11-22-0/+11
|
* changelog: add #801 to “OSC-8 data not being cleared...”Daniel Eklöf2021-11-22-1/+2
|
* changelog: prepare for 1.10.1Daniel Eklöf2021-11-22-6/+7
|
* changelog: osc-8 data not being cleared when cell is overwrittenDaniel Eklöf2021-11-21-0/+2
|
* changelog: pipe-* key bindings not being parsed correctlyDaniel Eklöf2021-11-21-0/+3
|
* config: create a copy of the section nameDaniel Eklöf2021-11-21-0/+1
| | | | | | | | | | | | The parsing context keeps a pointer to the current section name. This is used when logging errors. However, the pointer was into a buffer allocated by getline(). This buffer are often re-used in the next call to getline(), or free:d. Regardless, the section name pointer is invalid after the next call to getline(), which meant all error messages were logging a correct section name.
* config: letter-spacing: add missing ‘return’Daniel Eklöf2021-11-15-0/+5
| | | | | | | | | The missing return caused us to fall through to the bottom of the function, where we ended with an error message: [main].letter-spacing: 0: not a valid option: letter-spacing Closes #795
* footclient.desktop: new XDG desktop file, for footclientDaniel Eklöf2021-11-15-0/+1
|
* meson: add -Dthemes=false|trueDaniel Eklöf2021-11-14-0/+6
| | | | | | | This adds a new meson option that controls whether the example theme files should be installed or not. The default is true. Previously, themes were gated by the -Ddocs option.
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-11-14-0/+11
|
* changelog: prepare for 1.10.0Daniel Eklöf2021-11-14-4/+11
|
* config: remove options that were deprecated in 1.8.xDaniel Eklöf2021-11-14-0/+3
| | | | | | | * [main].bell * [main].jump-label-letters * [main].url-launch * [main].osc8-underline
* changelog: fix minor grammatical mistakeCraig Barnes2021-11-14-1/+1
|
* config: add [colors].dim0-7Daniel Eklöf2021-11-13-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This allows you to configure custom colors to be used when colors are being dimmed (`\E[2m`). It is implemented by color matching (just like bold-text-in-bright=palette-based); the color-to-be-dimmed is matched against the current color palette. If it matches one of the regular colors (colors 0-7), the corresponding “dim” color will be used. If it matches one of the bright colors (colors 8-15), the corresponding “regular” color will be used (but *only* if the “dim” color has been set). Otherwise, the color is dimmed by reducing its luminance. The default behavior, i.e. when dim0-7 hasn’t been configured, is to dim by reducing luminance for *all* colors. I.e. we don’t do any color matching at all. In particular, this means that dimming a bright color will *not* result in the corresponding “regular” color. Closes #776
* input: add support for modifyOtherKeys=2Daniel Eklöf2021-11-13-0/+1
| | | | | | | | | | | | | | | | Similar to modifyOtherKeys=1 (foot’s default, and only, mode), except that: * All modifiers (and not just Ctrl) generate \E[27;m;n~ escapes * Regular keys (with modifiers) also generate \E[27;m;n~ escapes (for example, C-h no longer generates ^H, but \E[27;5;104~) For our keymap based lookups, this is handled by adding MOD_MODIFY_OTHER_KEYS_STATE<N> variants. For “generic” keys, we simply adjust the conditions for when to emit a \E[27;m;n~ escape - the only requirement is that at least one modifier is active.
* input: don’t apply [scrollback].multiplier when alt screen is in useDaniel Eklöf2021-11-13-0/+2
| | | | Closes #787
* changelog: boolean optionsDaniel Eklöf2021-11-13-0/+4
|
* PKGBUILD: dropDaniel Eklöf2021-11-07-0/+4
| | | | | The bundled PKGBUILD has been pretty much identical to the one in the AUR package “foot-git” for a long time now.
* wayland: error out if there aren’t any seats availableDaniel Eklöf2021-11-07-0/+3
| | | | | | | | | | | | If there aren’t any seats available, input is not possible (neither keyboard nor mouse input). Note that this is not the same thing as e.g. no keyboard being plugged in. In this case, there will be a seat, but without the keybaord capability. Input may not be possible _right now_, but may be later, if the user plugs in a keyboard. Closes #779
* csd: add support for a visible borderDaniel Eklöf2021-10-27-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When we’re using CSDs, we’ve up until now rendered a 5px invisible border. This border handles interactive resizing. I.e. hovering it changes the mouse cursor, and mouse button events are used to start an interactive resize. This patch makes it possible to color part of (or the entire) border, with a configurable color. To facilitate this, two new options have been added: * csd.border-width * csd.border-color border-width defaults to 0, resulting in the look we’re used to. border-color defaults to the title bar color. If the title bar color hasn’t been set, it defaults to the default foreground color (just like the title bar color does). This means that, setting border-width but not border-color, results in a border that blends with the title bar.
* meson: install themes to $datadir/foot/themesDaniel Eklöf2021-10-27-0/+1
|
* config: add [key-bindings].noop actionDaniel Eklöf2021-10-27-1/+4
| | | | | | | Key combinations assigned to this action will not be sent to the application. Closes #765
* changeloge: style fixesDaniel Eklöf2021-10-22-5/+6
|
* term: ignore window title updates if title is un-changedDaniel Eklöf2021-10-22-0/+2
|
* input: update serial on each key press/release and mouse buttonDaniel Eklöf2021-10-20-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The serial is used when copying/pasting data from the clipboard. Up until now, we’ve used the serial from the keyboard/mouse enter events. This works in most cases, but breaks in the following example: $ wl-copy WLCOPY /* Ctrl+Shift+v works fine (pastes "WLCOPY") */ $ printf "\033]52;c;eHl6\a" /* Ctrl+Shift+v pastes "WLCOPY" instead of "xyz" */ Shifting focus away and then back to the foot window, and re-executing the printf works, suggesting the “enter” serial is no longer valid after another process(?) has copied something to the clipboard. Updating the serial on key press/release (and the corresponding mouse serial on mouse button events) seems to fix this. I’ve also tested that “normal” copy/paste operations, within the same foot instance, and between foot and other applications, are still working. In at least river (wlroots based), and GNOME/mutter. Closes #753
* selection: convert \r -> \n when reading clipboard dataDaniel Eklöf2021-10-19-0/+2
| | | | | | | | This fixes an issue where pasting (using e.g. OSC-52) in client applications that doesn’t do this conversion themselves, like tmux, doesn’t work. Closes #752
* pgo: full-inner: add --override tweak.grapheme-shaping=noDaniel Eklöf2021-10-16-0/+2
| | | | | | | | | Grapheme shaping is now enabled by default in foot. However, when generating the profiling data in PGO builds, this results in skewed optimizations. The end result is worse benchmark results regardless of whether grapheme-shaping is enabled or not (when running the benchmarks).
* config: enable grapheme shaping by defaultDaniel Eklöf2021-10-13-0/+7
| | | | | | | | This changes the default value of tweak.grapheme-shaping to “yes”, thus enabling grapheme shaping by default. It also changes the default value of tweak.grapheme-width-method to “wcswidth”, for maximum compatibility with terminal applications.
* changelog: list scrollback.indicator-color additionfeeptr@codeberg.org2021-10-09-0/+2
|
* Merge branch 'fix-0px-csd-crash'Daniel Eklöf2021-10-08-0/+1
|\
| * changelog: mention csd.size=0 fixfeeptr@codeberg.org2021-10-08-0/+1
| |
* | notify: add the notify-focus-inhibit config optionMitja Horvat2021-10-06-0/+5
|/ | | | | | | | | | | | | | | foot doesn't show desktop notifications (via OSC777) if the current terminal has keyboard focus. This is probably a sane default, but there are use cases where showing a notification regardless of the focus status may be desired. For example, a completion notification of a long running task inside a non-focused tmux window. This PR adds the notify-focus-inhibit option which can be used to disable inhibition of notifications when the window has focus. The default value is `yes`, which retains the old behavior.
* input: check for ‘effective’ modifiers, not ‘depressed’Daniel Eklöf2021-10-02-0/+6
| | | | | | | When reading XKB modifier state, use XKB_STATE_MODS_EFFECTIVE, not XKB_STATE_MODS_DEPRESSED. This fixes handling of ‘sticky’ modifier keys.
* changelog: add a new ‘unreleased’ sectionDaniel Eklöf2021-10-02-0/+11
|
* changelog: prepare for 1.9.2Daniel Eklöf2021-10-02-10/+3
|
* pgo: full-inner: do not set LC_CTYPE=en_US.UTF-8Daniel Eklöf2021-10-02-0/+7
| | | | | | | That locale may not exist. Instead, require the user/build script to explicitly set an UTF-8 locale. Document this in INSTALL.md, and in the bundled PKGBUILD.
* changelog: add a new ‘unreleased’ sectionDaniel Eklöf2021-10-01-0/+11
|
* changelog: prepare for 1.9.1Daniel Eklöf2021-10-01-5/+4
|
* selection: line-wise selection now handles soft line-wrappingDaniel Eklöf2021-09-30-0/+2
| | | | | | | | | | | Previously, soft-wrapped lines were not selected correctly, as the selection logic was hardcoded to simply select everything between the first and last column on the current terminal row. Now, we scan backward and forward, looking for hard-wrapped lines. This is similar to how word-based selection works. Closes #726
* term: only scale using DPI if *all* monitors have a scaling factor or oneDaniel Eklöf2021-09-24-0/+3
| | | | | | | | | | | | | | | | | | | | With dpi-aware=auto (the default), scale fonts using DPI *only* if *all* available monitors have a scaling factor of one. The idea is this: if a user, with multiple monitors, have enabled scaling on *at least* one monitor, he/she has most likely done so to match the size of his/hers other monitors. For example, if the user has one monitor with a scaling factor of one, and another one with a scaling factor of two, he/she expects things to be twice as large on the second monitor. If we (foot) scale using DPI on the first monitor, and using the scaling factor on the second monitor, foot will *not* look twice as big on the second monitor (this was the old behavior of dpi-aware=auto). Part of #714
* main/client: add no-op "-e" command-line optionCraig Barnes2021-09-18-0/+5
|
* box-drawing: add braille charactersDaniel Eklöf2021-09-12-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Render braille ourselves, instead of using font glyphs. Decoding a braille character is easy enough; there are 256 codepoints, represented by an 8-bit integer (i.e. subtract the Unicode codepoint offset, 0x2800, and you’re left with an integer in the range 0-255). Each bit corresponds to a dot. The first 6 bits represent the upper 6 dots, while the two last bits represent the fourth (and last) row of dots. The hard part is sizing the dots and the spacing between them. The aim is to have the spacing between the dots be the same size as the dots themselves, and to have the margins on each side be half the size of the dots. In a perfectly sized cell, this means two braille characters next to each other will be evenly spaced. This is however almost never the case. The layout logic currently: * Set dot size to either the width / 4, or height / 8, depending on which one is smallest. * Horizontal spacing is initialized to the width / 4 * Vertical spacing is initialized to the height / 8 * Horizontal margins are initialized to the horizontal spacing / 2 * Vertical margins are initialized to the vertical spacing / 2. Next, we calculate the number of “remaining” pixels. That is, if we add the left margin, two dots and the spacing between, how many pixels are left on the horizontal axis? These pixels are distributed in the following order (we “stop” as soon as we run out of pixels): * If the dot size is 0 (happens for very small font sizes), increase it to 1. * If the margins are 0, increase them to 1. * If we have enough pixels (need at 2 horizontal and 4 vertical), increase the dot size. * Increase spacing. * Increase margins. Closes #702
* changelog: pgo build scriptsDaniel Eklöf2021-09-12-0/+3
|
* input: workaround GNOME issue with pointer button eventsDaniel Eklöf2021-09-12-0/+6
| | | | | | | | | | | | | | | | | Under certain circumstances, GNOME will send multiple pointer button press events, without any release or leave events in between. This trips up our button tracking. Workaround, by replacing the existing state for the pressed button with the new state. Previously, debug builds would assert (and thus crash), while release builds would have multiple states for the same button, causing (probably) issues like the title bar not being usable (as in, cannot be dragged, buttons not working etc). Hopefully closes #709
* changelog: check if primary font is monospacedDaniel Eklöf2021-08-31-0/+6
|
* changelog: terminfo changesDaniel Eklöf2021-08-30-0/+11
|
* spawn: don’t error out if we fail to chdir()Daniel Eklöf2021-08-30-0/+2
|
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-08-27-0/+11
|
* changelog: prepare for 1.9.0Daniel Eklöf2021-08-27-5/+4
|
* changelog: cursor.blink now works in GNOMEDaniel Eklöf2021-08-18-0/+2
|
* terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRSDaniel Eklöf2021-08-17-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of 2021-07-31, ncurses ships its own version of foot’s terminfo. Since: * It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb capabilities. * It doesn’t set hs,fsl,dsl (statusbar). * We want to be able to update our termminfo without waiting for an ncurses release. * Foot should be installable and usable on Linux systems that doesn’t have the latest ncurses. we still want to ship our own version. We can however not install it to the default terminfo location (e.g. /usr/share/terminfo), since it will collide with the ncurses provided files. Our options are to either rename our terminfo to something else, or to keep the name, but install our terminfo files somewhere else. The first option would be the easy one. However, I think it makes sense to use the same name. For example, a user that SSH’s into a remote system that does *not* have our own version installed, but *does* have the ncurses one, will gracefully fall back to that one, which is better than manually having to set e.g. TERM=xterm-256color. Now, if we want to use the same name, we need to install it somewhere else. But where? And how do we ensure our version is preferred over the ncurses one? I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by default. It makes it namespaced to foot (i.e. we’re not introducing a new “standard” terminfo location), thus guaranteeing it wont collide with ncurses. To enable applications to find it, we export TERMINFO_DIRS. This is a list of *additional* directories to search for terminfo files. If it’s already defined, we *append* to it. The nice thing with this is, if there’s no terminfo in that location (e.g. when you SSH into a remote), the default terminfo location is *also* searched. But only *after* having searched through TERMINFO_DIRS. In short: our version is preferred, but the ncurses one (or an older version of our terminfo package!) will be used if ours cannot be found. To enable packagers full control over the new behavior, the existing meson command line options have been modified, and a new option added: -Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo files. -Dcustom-terminfo-install-location=<path>: *where* the terminfo files are expected to be found. This *needs* to be set *even* if -Dterminfo=disabled. For example, if the packaging script builds and packages the terminfo files separate from the regular foot build. The path is *relative to $prefix*, and defaults to $datadir/foot/terminfo. This is the value that will be appended to TERMINFO_DIRS. Note that you can set it to ‘no’, in which case foot will *not* set/modify TERMINFO_DIRS. Only do this if you don’t intend to package foot’s terminfo files at all (i.e. you plan on using the ncurses ones only). -Ddefault-terminfo=foot. Allows overriding the default TERM value. This should only be changed if the target platform doesn’t support terminfo files. Closes #671
* term: check visual-focus, not kbd-focus when enabling/disabling cursor blinkDaniel Eklöf2021-08-17-0/+3
| | | | | | | | | | | | term_cursor_blink_update() is called when the visual focus changes state (i.e. when our top-level surface is activated de-activated). Checking keyboard focus worked on Sway, but on e.g. GNOME, the order in which keyboard focus and visual focus are updated is different, and we ended up either making the cursor invisible, or visible, but not blinking, when changing focus back to the window. Closes #686
* changelog: mention keypad application mode keys being removedDaniel Eklöf2021-08-14-0/+4
|
* changelog: mention km/smm/rmm being removedDaniel Eklöf2021-08-14-0/+8
|
* pt-or-px: heed the dpi-aware settingDaniel Eklöf2021-08-13-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Before this patch, pt-or-px values, like letter-spacing, were *always* scaled using the current DPI value. This is wrong; if the fonts are scaled using the output’s scaling factor, then so should all other point values. This also fixes an issue where e.g. letter-spacing would use one DPI value at startup, but then when increasing/decreasing or resetting the font size, would be re-calculated using a different DPI value, leading to completely different spacing. This happened when there were multiple monitors, with different DPI values, and foot guessed the initial DPI value wrong. Normally, foot would correct itself as soon as the window was mapped, and the “correct” DPI value known. But if the fonts were scaled using the scaling factor, it was possible that the font reload never happened. This patch also updates the thickness calculation (for LIGHT and HEAVY box drawing characters) to use the scaling factor when appropriate. Closes #680
* render: run the “overflowing glyphs” prepass *before* rendering sixelsDaniel Eklöf2021-08-11-0/+2
| | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where the left-most column of a sixel was “overwritten” by the cell content. This patch also rewrites the prepass logic, to try to reduce the number of loads performed. The new logic loops each row from left to right, looking for dirty cells. When a dirty cell is found, we first scan backwards, until we find a non-overflowing cell. That cell is unaffected by the overflowing cell we’re currently dealing with. We can also stop as soon as we see a dirty cell, since that cell will already have been dealt with. Then, we scan forward, dirtying cells until we see a non-overflowing cell. That first non-overflowing cell is also dirtied, but after that we break. The last loop, that scans forward, advances the same cell pointer used in the outer loop.
* changelog: url.uri-charactersDaniel Eklöf2021-08-09-0/+2
|
* input: implement support for mouse wheel left/rightDaniel Eklöf2021-08-07-0/+1
| | | | | | | | | | | | | We now emit button 6/7 events (when the client application grabs the mouse). This buttons map to mouse wheel horizontal scroll events. Or, left/right tilting, if you like. Wayland report these as ‘axis’ events (just like regular scroll wheel events), and thus we need to translate those scroll events to button events. libinput does not define any mouse buttons for wheel tilts, so we add our own defitions. These are added last in the BTN_* range, just before the BTN_JOYSTICK events.
* Revert "terminfo: add ich1=\E[@"Daniel Eklöf2021-08-07-1/+0
| | | | | | This reverts commit 76fab8cf695b8e18e9f07d383189a34ca129e3ac. See https://codeberg.org/dnkl/foot/issues/668#issuecomment-246149
* terminfo: change kmous to \E[<, add XM+xm capabilitiesDaniel Eklöf2021-08-06-0/+2
| | | | | | | | | | | ncurses has had a bug where mouse support is completely disabled if the terminfo didn’t have kmous=\E[M, *or*, the terminfo *name* contained ‘xterm’. This appears to have been fixed. Thus, change kmous to \E[<, and set xm/XM accordingly. With this, ncurses application will use the SGR mouse reporting mode, instead of the legacy reporting mode.
* terminfo: add ich1=\E[@Daniel Eklöf2021-08-06-0/+1
|
* box-drawing: add U+1FB3C-U+1FB6F, U+1FB9A and U+1FB9BDaniel Eklöf2021-08-05-0/+3
| | | | | | These are the “wedges” from the Unicode 13 “Legacy Computing” symbols. Closes #474
* term: send SIGTERM/SIGKILL to the entire process groupDaniel Eklöf2021-07-31-0/+2
|
* changelog: asynchronous client application terminationDaniel Eklöf2021-07-31-0/+6
|
* config: include: add support for ~-expansionDaniel Eklöf2021-07-30-0/+2
| | | | Closes #659
* Only brighten palette colors with bold-text-in-bright=palette-basedDavid Rosca2021-07-26-0/+5
|
* changelog: initialize output scaling factor to 1Daniel Eklöf2021-07-26-0/+5
|
* wayland: prevent hang when terminating due to broken Wayland connectionDaniel Eklöf2021-07-24-0/+2
| | | | | | | | | | | | | | | | | | | | | If the call to fdm_wayl() with EPOLLHUP was followed by calls to wayl_roundtrip(), foot would hang. The reason for this is that the EPOLLHUP handler in fdm_wayl() would call wl_display_cancel_read(). wayl_roundtrip() also calls wl_display_cancel_read() (since we normally have called wl_display_prepare_read()), before calling wl_display_roundtrip(). When calling wl_display_cancel_read() two times in a row, without a wl_display_prepare_read() in between, wl_display_roundtrip() hangs. Fix by not calling wl_display_cancel_read() in fdm_wayl(). This ensures our invariant holds: wl_display_prepare_read() is *always* in effect outside of fdm_wayl(). Closes #651
* meson: add -Ddocs=disabled|enabled|auto command line optionDaniel Eklöf2021-07-24-0/+1
| | | | | When enabled (the default, if scdoc is found), we build and install the man pages, example foot.ini, readme, changelog and license files.
* changelog: window title in CSDsDaniel Eklöf2021-07-24-0/+5
|
* search: reset match state when selection is cancelledDaniel Eklöf2021-07-22-0/+3
| | | | | | | | | | | | While we’re in scrollback search mode, the selection may be cancelled (for example, if the application is scrolling out the selected text). Trying to e.g. extend the search selection after this has happened triggered a crash. This fixes it by simply resetting the search match state when the selection is cancelled. Closes #644
* pgo: fix PGO builds with clangDaniel Eklöf2021-07-22-0/+1
| | | | | | | | Add stubs for shm_chain_new(), shm_chain_free() and shm_unref(). This fixes ‘pgo’ linking failures in the ‘generate’ phase when doing a PGO build with clang. Closes #642
* render: prevent cells from overflowing into marginTimur Celik2021-07-20-0/+5
|
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-07-18-0/+11
|
* changelog: prepare for 1.8.2Daniel Eklöf2021-07-18-4/+3
|
* changelog: remove entries that are no longer relevantDaniel Eklöf2021-07-18-4/+0
| | | | | The tweak.allow-overflowing-double-width-glyphs option have been superseded by tweak.overflowing-glyphs.
* term: erase_scrollback(): destroy sixels that touch the scrollbackDaniel Eklöf2021-07-18-1/+1
|
* changelog: crash when \E[3J was executed with a selection in the scrollbackDaniel Eklöf2021-07-18-0/+3
|
* render: Allow cells to bleed into their neighborTimur Celik2021-07-17-0/+11
| | | | | | | | | | | | | | | | This patch adds a `confined` flag to each cell to track if the last rendered glyph bled into it's right neighbor. To keep things simple, bleeding into any other neighbor cell than the immediate right one is not allowed. This should cover most use cases. Before rendering a row we now do a prepass and mark all cells unclean that are affected by a bleeding neighbor. If there are consecutive bleeding cells, the whole group must be re-rendered even if only a single cell has changed. The patch also deprecates both old overflowing glyph options *allow-overflowing-double-width-glyphs* and *pua-double-width* in favor of a single new one named *overflowing-glyphs*.
* Merge branch 'decsdm'Daniel Eklöf2021-07-16-0/+2
|\ | | | | | | Closes #631
| * csi: invert the meaning of DECSDMDaniel Eklöf2021-07-14-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There has been some confusion whether enabling DECSDM (private mode 80) enables or disables sixel scrolling. Foot currently enables scrolling when DECSDM is set, and this patch changes this, such that setting DECSDM now *disables* scrolling. The confusion is apparently due to a documentation error in the VT340 manual, as described in https://github.com/dankamongmen/notcurses/issues/1782#issuecomment-863603641. And that makes sense, in a way: the SDM in DECSDM stands for Sixel Display Mode. I.e. it stands to reason that enabling that disables scrolling. Anyway, this lead to https://github.com/hackerb9/lsix/issues/41, where it was eventually proven (by testing on a real VT340), that foot, and a large number of other terminals (including XTerm) has it wrong: https://github.com/hackerb9/lsix/issues/41#issuecomment-873269599.
* | url-mode: use shm_get_many()Daniel Eklöf2021-07-15-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have lots of URLs, we use up a *lot* of SHM buffers (and thus pools). Each and every one is a single mmap(), of at least 4K. Since all URL labels are created and destroyed at the same time, it makes sense to use a single pool for all buffers. To do this, we must now do two passes; first one to generate the actual string (label content), and to calculate the label sizes. Then we use this information to allocate all SHM buffers at once, from the same pool. Finally, we iterate the URLs again, this time to actually render them.
* | render: search: set clip regionDaniel Eklöf2021-07-15-0/+2
| | | | | | | | | | Fixes crash when the search box has been reduced in height, due to limited window space.
* | render: scrollback indicator: improve handling of very small window sizesDaniel Eklöf2021-07-15-0/+2
| |
* | changelog: box-drawing fixes on big-endianDaniel Eklöf2021-07-14-0/+2
|/
* url-mode: abort when running into un-allocated scrollback memoryDaniel Eklöf2021-07-11-0/+2
| | | | | | | | | | | | | | | | | | | | When tagging URL cells (in preparation for rendering URL mode), we loop the URL’s entire range, setting the `url` attribute of all cells, and dirtying the rows. It is possible to create URLs that are invalid, and wrap around the scrollback, even though the scrollback hasn’t yet been filled. For example, by starting an OSC-8 URL, moving the cursor, and then closing the OSC-8 URL. These URLs are invalid, but are still rendered just fine. “Fine” being relative - they will typically fill the entire screen. But at least that’s a very clear indication for the user that’s something is wrong. The problem is when we hit un-allocated scrollback rows. We didn’t check for NULL rows, and crashed. This has now been fixed.
* url-mode: fix crash when removing duplicate and/or overlapping URLsDaniel Eklöf2021-07-11-0/+2
| | | | | | | | | | | | | | | | Removing overlaping and duplicated URLs is done by running two nested loops, that both iterate the same URL list. When a duplicate is found, one of the URLs is destroyed and removed from the list. Deleting and removing an item *is* safe, but only as long as _no other_ iterator has references to it. In this case, if we remove an item from e.g. the inner iterator, we’ll crash if the outer iterator’s *next* item is the item being removed. Closes #627
* url-mode: purge SHM pixmaps when destroying URLsDaniel Eklöf2021-07-11-0/+2
| | | | | | | | | | Unlike other surface types, the SHM cookie depends on the address of each URL instance. This means if we enable, disable, and then enable URL mode again (thus showing exactly the same URLs as the first time), the URLs will have new addresses, and thus the old SHM pixmaps will not get purged automatically. So, manually purge them when destroying the URLs.
* config: add locked-title=no|yesDaniel Eklöf2021-07-04-0/+5
| | | | Closes #386
* term: rows printed to now defaults to having a hard linebreakDaniel Eklöf2021-07-03-0/+5
| | | | | | | That is, instead of requiring a ‘\n’ to be printed, non-empty lines are now treated as having a hard linebreak by default. The linebreak is cleared on an explicit wrap.