aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * render: render_timer(): round scaling factorDaniel Eklöf2023-06-29-1/+1
| |
| * render: csd_border: round scaled border width, instead of truncatingDaniel Eklöf2023-06-29-4/+3
| |
| * render: draw_unfocused_block(): round scale, instead of truncatingDaniel Eklöf2023-06-29-1/+1
| |
| * wayland: pointer.scale: convert to floatDaniel Eklöf2023-06-29-4/+4
| |
| * term: convert ‘scale’ to a floatDaniel Eklöf2023-06-29-21/+25
| |
| * wayland: plumbing for wp-fractional-scaleDaniel Eklöf2023-06-29-0/+77
| | | | | | | | | | | | | | * Bind the wp-viewporter and wp-fractional-scale-manager globals. * Create a viewport and fractional-scale when instantiating a window. * Add fractional-scale listener (that does nothing at the moment). * Destroy everything on teardown.
| * meson: generate bindings for wp-fractional-scale + wp-viewportDaniel Eklöf2023-06-29-0/+5
|/
* correct csd section entry: hide-when-maximizedVladimir Bauer2023-06-27-1/+1
|
* config: unittest: explicitly call fcft_init() + fcft_fini()Daniel Eklöf2023-06-26-0/+4
| | | | | This plugs a memory leak, caused by fontconfig functions being called as part of the unit test implicitly allocating global objects.
* sixel: assert upper pixel of last sixel maps to last image row, *or lower*Daniel Eklöf2023-06-24-0/+2
|
* sixel: ensure enough rows have been scrolled in, to fit the imageDaniel Eklöf2023-06-24-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When emitting a sixel, we need to: a) scroll terminal content to ensure the new image fits b) position the text cursor Recent changes in the cursor positioning logic meant we reduced the number of linefeeds, to ensure 1) sixels could be printed to the bottom row without scrolling the terminal contents, and 2) the cursor was positioned on the last sixel row. Except, we’re not actually positioning the cursor on the last sixel row. We’re positioning it on the text row that maps to the *upper* pixel of the last sixel. In most cases, this _is_ the last row of the sixel. But for certain combinations of font and image sizes, it may be higher up. This patch fixes a regression, where the terminal contents weren’t scrolled up enough for certain images, causing a crash when trying to dirty a not-yet scrolled in row. The fix is this: * Always scroll by the number of rows occupied by the image, minus one. This ensures the image "fits". * Adjust the cursor position, if necessary.
* sixel: resize(): handle no size changeDaniel Eklöf2023-06-24-0/+3
|
* sixel: regression: linefeed count for chunked up sixel imageDaniel Eklöf2023-06-24-1/+6
| | | | All image chunks but the last *should* scroll the screen content.
* sixel: minor fixes after implementing support for non-1:1 aspect ratiosDaniel Eklöf2023-06-24-17/+29
| | | | | | | * Lazy initialize image height. This is necessary to prevent garbage from being rendered for "empty" sixels. * Fix plotting of non-1:1 pixels * Fix calculation of height in resize(), for non-1:1 aspect ratios
* sixel: stop cropping images to the last non-transparent rowDaniel Eklöf2023-06-24-22/+1
|
* sixel: respect sixel aspect ratioDaniel Eklöf2023-06-24-14/+52
| | | | | | | | That is, parse P1 when initializing a new sixel, and don’t ignore pad/pad in the raster attributes command. The default aspect ratio is 2:1, but most sixels will override it in the raster attributes command (to 1:1).
* sixel: fix cursor positioning logicDaniel Eklöf2023-06-24-20/+26
| | | | | | | | | | | | | | | | | | This adjusts the logic that positions the text cursor after emitting a sixel, when sixel scrolling mode is *enabled*. We’ve always mimicked XTerm’s behavior. However, XTerm recently changed its behavior, to better match that of an VT382. Now, the cursor is placed *on* the last row of the sixel, instead of on a new row after the sixel. This allows applications to print sixels to the bottom row of the terminal, without causing the content to scroll. Finally, there was a bug in the horizontal positioning of the cursor; it was placed on the *first* column of the row, instead of on the first column of the sixel.
* term: scroll: only record scroll damage when viewport is at the bottomDaniel Eklöf2023-06-23-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don’t need to record scroll damage if the viewport isn’t at the bottom, since in this case, the renderer ignores the scroll damage anyway. This fixes a performance corner case, when the viewport is at the top of the scrollback history. When application scrolls the terminal contents, and the scrollback history is full, and the viewport is at top of the history, then the viewport needs to be moved (the scrollback history is a circular buffer, and thus the top of the history “moves” when we’re scrolling in new contents). Moving the viewport typically results in another type of scroll damage (DAMAGE_SCROLL_IN_VIEW, instead of the “normal” DAMAGE_SCROLL). Thus, each application triggered scroll, will result in two scroll damage records: one DAMAGE_SCROLL, and one DAMAGE_SCROLL_IN_VIEW. These two are incompatible, meaning they can’t be merged. What’s worse, it also means the DAMAGE_SCROLL records from two application triggered scrolls cannot be merged (since there’s a DAMAGE_SCROLL_IN_VIEW in between). As a result, the renderer will not see one, or “a few” scroll damage events, but a *ton*. _Each_ one typically a single line, or so. And each one resulting in lots of traffic on the wayland socket, as we create and destroy new buffer pools, when doing “shm scrolling”. This eventually leads to the socket not being able to keep up, and the socket is closed on us, forcing us to exit. The fix is really simple: don’t record “normal” scroll damage when scrolling, _unless_ the viewport is at the bottom (and thus “follows” the application output). As soon as the user scrolls up in the history, we’ll stop emitting normal scroll damage records. This is just fine, since, as mentioned above, the renderer ignores them when the viewport isn’t at the bottom. What if the viewport is moved back down again, before the next frame has been rendered? Wont there be “missing” scroll damage records? No, because moving the viewport results in scroll damage records by itself. Closes #1380
* Fixed a type for the pixel fontsize changewout2023-06-23-1/+1
| | | | xp -> px
* render: resize: fix crash when reflowing the alt screenDaniel Eklöf2023-06-20-3/+10
| | | | | | | | | | | | | | | | When doing an interactive resize, and `resize-delay-ms` > 0 (the default), we would crash if the original screen size (i.e. the size before the interactive resize started) was larger than the last window size. For example, if we interactively go from 85 rows to 75, and then non-interactively went from 75 to 80, we’d crash. The resizes had to be made in a single go. One way to trigger this was to start an interactive resize on a floating window, and then *while resizing* toggle the window’s floating mode. Closes #1377
* add srcery themeAntoine Beaupré2023-06-20-0/+26
| | | | Based on https://srcery.sh/
* csi: CHA+HPA (cursor horizontal absolute): use term_cursor_col()Daniel Eklöf2023-06-20-1/+1
|
* term: add term_cursor_col()Daniel Eklöf2023-06-20-0/+10
| | | | | | | Set cursor column, absolute. term_cursor_to() needs to reload the current row pointer, and is thus not very effective when we only need to modify the column.
* vt: split up action_param() to three separate functionsDaniel Eklöf2023-06-16-68/+75
| | | | | | | | | | | | | | | | | | | | | | | | We’re already switching on the next VT input byte in the state machine; no need to if...else if in action_param() too. That is, split up action_param() into three: * action_param_new() * action_param_new_subparam() * action_param() This makes the code cleaner, and hopefully slightly faster. Next, to improve performance further, only check for (sub)parameter overflow in action_param_new() and action_param_subparam(). Add pointers to the VT struct that points to the currently active parameter and sub-parameter. When the number of parameters (or sub-parameters) overflow, warn, and then point the parameter pointer to a "dummy" value in the VT struct. This way, we don’t have to check anything in action_param().
* test: config: add test for url.protocols optionDan Bungert2023-06-15-1/+45
|
* terminfo: add TS capabilityDaniel Eklöf2023-06-15-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new ‘extended’ capability. ‘TS’ has been around for a while, but was originally not part of foot’s terminfo. Not sure when it was added to ncurses’ foot terminfo. In any case, ncurses has this to say about TS: These building-blocks allow access to the X titlebar and icon name as a status line. There are a few problems in using them in entries: a) tsl should have a parameter to denote the column on which to transfer to the status line. ... But that issue regarding the parameter for tsl means that applications may not rely on it. The SVr4 documentation says tsl will "move to status line, column #1". At the point in time when ESR added DJM's "pseudo-color" entry with the split-up escape sequence for tsl/fsl, there were 65 entries using tsl: 32 used a parameter, matching the documentation (including x10term). 21 used a parameterless control, exiting from the status line on ^M. 6 used parameterless controls for tsl and fsl 6 used a split-up escape sequence, e.g., the same approach. The extension "TS" is preferable, because it does not accept a parameter. However, if you are using a non-extended terminfo, "TS" is not visible.
* terminfo: XM: add private mode 1004Daniel Eklöf2023-06-15-1/+1
| | | | | This was added to ncurses (to the xterm+sm+1006 fragment) in 2023-05-08.
* meson: use meson feed feature for scdoc inputsewn2023-06-14-4/+5
| | | | Removes the need for a shell dependency.
* Fix non UTF-8 locale complaintPhillip Susi2023-06-01-4/+6
| | | | | | | | | If the locale isn't UTF-8, foot tries to fall back to C.UTF-8 and prints a warning. The warning was garbled because the name of the original locale is no longer valid after calling setlocale() a second time. Use strdup to stash the original string. Closes #1362
* sixel: apply background alpha when P2=0 or P2=2, and current bg color is the default bg colorDaniel Eklöf2023-05-31-4/+24
| | | | Closes #1360
* ci: try alpine edge instead of latestDaniel Eklöf2023-05-26-5/+5
|
* osc: update font subpixel mode, and window opaque compositor hint, on alpha changesDaniel Eklöf2023-05-26-12/+32
| | | | | | | | | | | | | | | | | | | | | When background alpha is changed at runtime (using OSC-11), we (may) have to update the opaque hint we send to the compositor. We must also update the subpixel mode used when rendering font glyphs. Why? When the window is fully opaque, we use wl_surface_set_opaque_region() on the entire surface, to hint to the compositor that it doesn’t have to blend the window content with whatever is behind the window. Obviously, if alpha is changed from opaque, to transparent (or semi-transparent), that hint must be removed. Sub-pixel mode is harder to explain, but in short, we can’t do subpixel hinting with a (semi-)transparent background. Thus, similar to the opaque hint, subpixel antialiasing must be enabled/disabled when background alpha is changed.
* .desktop: remove StartupWMClass from server, use distinct StartupWMClass for foot and footclientjdevdevdev2023-05-22-13/+19
| | | | | | | | | | | | | | | For this to work, the default app-id of footclient has been changed from ‘foot’ to ‘footclient’. By using distinct StartupWMClasses, the compositor can connect a running foot/footclient instance to the correct .desktop-file. This ensures the correct icon is being used in e.g. docks, and that actions like “open another window” works correctly. Note that the user can override the app-id, either by setting app-id in foot.ini, or with the -a,--app-id command line option. Closes #1355
* test: config: add test for main.utmp-helper optionDaniel Eklöf2023-05-22-0/+1
|
* utmp: rewrite utmp loggingDaniel Eklöf2023-05-22-58/+159
| | | | | | | | | | | | | | | | | | | | | | | This patch generalizes the utmp support, to not only support libutempter, but also ulog (and in the future, even more interfaces). * Rename config option main.utempter to main.utmp-helper * Add meson option -Dutmp-backend=none|libutempter|ulog|auto * Rename meson option -Ddefault-utempter-path to -Dutmp-default-helper-path * utmp is no longer detected at compile time, but at runtime instead. Meson will configure the following pre-processor macros, based on the selected utmp backend: * UTMP_ADD - argument to pass to utmp helper when adding a record (starting foot) * UTMP_DEL - argument to pass to utmp helper when removing a record (exiting foot) * UTMP_DEL_HAVE_ARGUMENT - if defined, UTMP_DEL expects an extra argument ($WAYLAND_DISPLAY) * UTMP_DEFAULT_HELPER_PATH - path to the default utmp helper binary The documentation has been updated to mention which arguments are passed to the helper binary. Closes #1314
* slave: unset TERM_PROGRAM{,_VERSION}Daniel Eklöf2023-05-18-27/+4
| | | | | | | | | | | | | | | | | | | | | Foot’s policy is to not set environment variables that identifies it (except the well-known and established `TERM` variable). We encourage applications to use terminfo to determine capabilities, or terminal queries, when available. Or, at least use terminal queries to detect the terminal and its version. Setting environment variables is a bad idea since they are inherited by all applications started by the terminal (which is the whole point). But, this includes other terminal emulators, making it very possible a terminal emulator gets mis-detected just because it was started from another terminal. Since there are a couple of terminal emulators that _do_ set TERM_PROGRAM and TERM_PROGRAM_VERSION, unset these environment variables to avoid being misdetected. Closes #1349
* customized gnome-like csd buttonslocture2023-05-18-72/+107
|
* search: regression: refresh current view when canceling a scrollback searchDaniel Eklöf2023-05-15-0/+1
| | | | | | | | | | | | | | | | | | | | 3b41379be43a21a00a776d0d136c5d1b2fe4007e introduced a regression, where canceling a scrollback search didn’t refresh the viewport correctly; the viewport was changed, but the screen content was not refreshed. This worked before, because the workaround for https://github.com/swaywm/sway/issues/6960 always called term_damage_view() when exiting scrollback search mode. 3b41379be43a21a00a776d0d136c5d1b2fe4007e removed that call since it’s no longer required. *Except* when executing the BIND_ACTION_SEARCH_CANCEL binding, since then the viewport may be moved. Note that this regression affected *all* compositors, not just Sway. Closes #1354
* quirks: sway does not damage surface beneath sub-surface, when unmappedDaniel Eklöf2023-05-12-11/+43
| | | | | | | | | | | | | | | | | | | | | When unmapping a sub-surface, Sway <= 1.8 does not damage the surface beneath the sub-surface. https://github.com/swaywm/sway/issues/6960 The workaround is to manually damage the main surface. Previously, this was done when exiting scrollback search, and after the ‘flash’ OSC. But other sub-surfaces, that may also be unmapped, did not. This patch adds a quirk handler that does this, and calls it when: * Exiting scrollback search * Ending the ‘flash’ OSC * Exiting unicode input mode * Clearing URL labels * Removing the scrollback position indicator Closes #1335
* term: reset: switch modifyOtherKeys back to level 1Daniel Eklöf2023-05-12-0/+2
|
* kitty: F3 is no longer allowed to emit CSI RDaniel Eklöf2023-04-26-1/+8
| | | | | | | | The original kitty keyboard specification allowed F3 to emit either CSI R, or CSI 13~. Support for CSI R was removed in later revisions of the protocol, since it collides with "Cursor Position Report" sequences.
* csi: implement "CSI ? m"Daniel Eklöf2023-04-26-1/+42
|
* render: regression: keep empty bottom scroll margin empty after resizeDaniel Eklöf2023-04-12-1/+4
|
* render: ensure scroll region’s endpoint is valid after a window resizeDaniel Eklöf2023-04-12-5/+6
| | | | | | | | | If we had a non-empty bottom scroll region, and the window was resized to a smaller size, the scroll region was not reset correctly. This led to a crash when scrolling the screen content. Fix by making sure the scroll region’s endpoint is within range.
* meson: bump tllist dependency version to 1.1.0Vivian Szczepanski2023-04-09-1/+1
| | | | | The tll_sort() macro was added to tllist in version 1.1.0, and so building with a previous version causes a linking error.
* *.desktop: add StartupWMClass=footDaniel Eklöf2023-04-05-0/+9
| | | | | | | | At least Gnome needs this in order to link running instances of foot to their corresponding .desktop file, used e.g. when determining which icon to display for running applications. Closes #1317
* changelog: add a new ‘unreleased’ sectionDaniel Eklöf2023-04-03-0/+11
|
* Merge branch 'releases/1.14'Daniel Eklöf2023-04-03-6/+19
|\
| * meson: bump version to 1.14.01.14.0releases/1.14Daniel Eklöf2023-04-03-1/+1
| |
| * changelog: prepare for 1.14.0Daniel Eklöf2023-04-03-5/+18
|/
* terminfo: remove DECRST of DECCOLM+DECSCLMDaniel Eklöf2023-04-02-2/+3
| | | | | | | | We’ve never supported neither 132-column mode, nor smooth scrolling. But we _did_ recognize the escape sequences. We don’t, anymore. Thus it makes very little sense to include these escapes in any of our terminfo capabilities. So, remove them.
* csi: DECCOLM+DECSCLM: remove all supportDaniel Eklöf2023-03-31-21/+2
| | | | | | | | | | | We don’t support neither 132 column mode, nor smooth scrolling. Thus it makes little sense to recognize these control condes. Note that while XTerm does support 132 columns, it is disabled by default. In this mode, XTerm also doesn’t trigger the side-effects (i.e. clearing the screen). Closes #1265
* ci (woodpecker): do a second release build, using clang instead of gccDaniel Eklöf2023-03-31-4/+24
|
* input: kitty: don’t treat zero-length utf8/utf32 strings as textDaniel Eklöf2023-03-31-1/+1
| | | | | | This is a regression introduced in 3215d54f31c9e339598a34c9fa43f3dc3c5d1e42 Symptoms: e.g. arrow keys not working in vim/neovim
* changelog: typo: now -> notDaniel Eklöf2023-03-31-1/+1
|
* changeloge: remove bad escape charDaniel Eklöf2023-03-31-1/+1
|
* changelog: remove trailing back-tickDaniel Eklöf2023-03-31-1/+1
|
* test: config: call FcIni() + FcFini()Daniel Eklöf2023-03-31-0/+2
| | | | | | | | | | | | | | | | | Some of the config options we’re testing result in calls to FontConfig APIs. Without calling FcIni()+FcFini(), we leak memory: Direct leak of 768 byte(s) in 3 object(s) allocated from: #0 0x7f7e95cbfa89 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f7e95bd1fe5 (/usr/lib/libfontconfig.so.1+0x20fe5) Indirect leak of 96 byte(s) in 3 object(s) allocated from: #0 0x7f7e95cbf411 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77 #1 0x7f7e95bd63fd (/usr/lib/libfontconfig.so.1+0x253fd) Indirect leak of 19 byte(s) in 2 object(s) allocated from: #0 0x7f7e95c72faa in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:439 #1 0x7f7e95bd1898 in FcValueSave (/usr/lib/libfontconfig.so.1+0x20898)
* term: protect against integer overflow when accumulating scroll damageDaniel Eklöf2023-03-30-7/+13
| | | | | | | | | | | | | | | | | | | When accumulating scroll damage, we check if the last scroll damage’s scrolling region, and type, matches the new/current scroll damage. If so, the number of lines in the last scroll damage is increased, instead of adding a new scroll damage instance to the list. If the scroll damage list isn’t consumed, this build up of scroll damage would eventually overflow. And, even if it didn’t overflow, it could become large enough, that when later used to calculate e.g. the affected surface area, while rendering a frame, would cause an overflow there instead. This patch fixes both issues by: a) do an overflow check before increasing the line count b) limit the line count to UINT16_MAX
* render: protect against integer underflow when calculating scroll areaDaniel Eklöf2023-03-30-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | When applying scroll damage, we calculate the affected region’s height (in pixels), by subtracting the number of rows to scroll, from the scrolling region, and finally multiply by the cell height. If the number of rows to scroll is very large, the subtraction may underflow, resulting in a very large height value instead of a negative one. This caused the check for "scrolling too many lines" to fail. That in turn resulted in an integer overflow when calculating the source offset into the rendered surface buffer, which typically triggered a segfault. This bug happened when there was continuous output in the terminal without any new frames being rendered. This caused a buildup of scroll damage, that triggered the underflow+overflow when we finally did render a new frame. For example, a compositor that doesn’t send any frame callbacks (for example because the terminal window is minimized, or on a different workspace/tag) would cause this. Closes #1305
* input: (kitty kbd): the resulting UTF-8 string may translate to multiple UTF-32 codepointsDaniel Eklöf2023-03-30-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | When this happened (for example, by specifying a custom compose sequence), the kitty keyboard protocol didn’t emit any text at all. This was caused by the utf32 codepoint being -1. This in turned was caused by us trying to convert the utf8 sequence to a *single* utf32 codepoint. This patch replaces the use of mbrtoc32() with a call to ambstoc32(), and the utf32 codepoint with an utf32 string. The kitty keyboard protocol is updated: * When determining if we’re dealing with text, check *all* codepoints in the utf32 string. * Add support for multiple codepoints when reporting "associated text". The first codepoint is the actual parameter in the emitted sequence, and the remaining codepoints are sub-parameters. I.e. the codepoints are colon separated. Closes #1288
* fix typosHarri Nieminen2023-03-28-10/+10
|
* render: fix glitchy selection while resizing the ‘normal’ screenDaniel Eklöf2023-03-27-0/+7
| | | | | | | | | | | The selection coordinates are in absolute row numbers. As such, selection breaks when interactively resizing the normal grid, since we then instantiate a temporary grid mapping directly to the current viewport (for performance reason, to avoid reflowing the entire grid over and over again). Fix by stashing the actual selection coordinates, and ajusting the "active" ones to the temporary grid.
* slave: set $TERM_PROGRAM and $TERM_PROGRAM_VERSION environment variablesCraig Barnes2023-03-20-0/+28
| | | | | | | | | | | | | These are already being set by iTerm2, WezTerm, tmux and likely some others. Even though using yet more environment variables seems rather questionable, if we don't set these we run the risk of inheriting them from other terminals. See also: * https://gitlab.com/gnachman/iterm2/-/blob/97a6078df8e822da165e91737a01c0b9e115dd16/sources/PTYSession.m#L2568-2570 * https://github.com/tmux/tmux/blob/1d0f68dee9f71c504e03616fa472a408a6caa49b/environ.c#L263-L264 * https://github.com/search?q=TERM_PROGRAM&type=code
* config: apply fontconfig rules if user didn’t set an explicit font sizeDaniel Eklöf2023-03-06-6/+38
| | | | | | | | | | | | | | | | | | | | | | | If the user didn’t explicitly set the font size (e.g. font=monospace, instead of font=monospace:size=12), our initial attempt to read the FC_SIZE and FC_PIXEL_SIZE attributes will fail, and we used to fallback to setting the size to 8pt. Change this slightly, so that when we fail to read the FC_*_SIZE attributes, apply the fontconfig rules, but *without expanding* them (i.e. without calling FcDefaultSubstitute()). Then try reading FC_*_SIZE again. If that too fails, _then_ set size to 8pt. This allows us to pick up rules that set a default {pixel}size: <fontconfig> <match> <edit name="pixelsize" mode="append"><double>14</double></edit> </fontconfig> Closes #1287
* themes: add Material Amberjaroeichler2023-03-03-0/+40
|
* key-binding: sort binding listsDaniel Eklöf2023-03-03-0/+59
| | | | | | | | | | | | | | | | | | | | Sort bindings such that bindings with the same symbol are sorted with the binding having the most modifiers comes first. This fixes an issue where the “wrong” key binding are triggered when used with “consumed” modifiers. For example: if Control+BackSpace is bound before Control+Shift+BackSpace, then the latter binding is never triggered. Why? Because Shift is a consumed modifier. This means Control+BackSpace is “the same” as Control+Shift+BackSpace. By sorting bindings with more modifiers first, we work around the problem. But note that it is *just* a workaround, and I’m not confident there aren’t cases where it doesn’t work. Closes #1280
* render: resize: call xdg_toplevel_set_min_size()Daniel Eklöf2023-03-02-9/+9
| | | | This is a hint to the compositor, not to set a smaller size than this.
* render: fix inversed cursor fg color when alpha != 1.0, take #2Daniel Eklöf2023-02-28-6/+5
| | | | | | | | No need to check if terminal colors have been reversed - this is done by the cell rendering logic. This hopefully fixes all remaining issues with invisible text when background alpha < 1.0
* render: fix selected cursor cell being ‘invisble’ when background alpha is usedDaniel Eklöf2023-02-27-1/+1
| | | | | ... by taking the cell ‘selected’ state into account when determining whether to use the default fg or bg as the ‘text’ color.
* wayland: ignore configure events for unmapped surfacesDaniel Eklöf2023-02-25-0/+15
| | | | | | | | | | | | Closes #1249 Note that it is still unclear whether ack:ing a configure event for an unmapped surface is a protocol violation, or something that should be handled by the compositor. According to https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/108, Kwin, Mutter and Weston handles it, while wlroots does not.
* doc: foot.ini: fix spelling mistake in [bell].urgent descriptionCraig Barnes2023-02-16-1/+1
|
* doc: ctlseq: fix capitalization in description of DA3 sequenceCraig Barnes2023-02-16-1/+1
|
* Tag a couple variables with UNUSED, to fix warnings with clang-15Daniel Eklöf2023-02-12-2/+2
| | | | Closes #1278
* completions: bash: simplify awk command used to filter terminfo namesCraig Barnes2023-01-27-1/+1
|
* render: fix incorrect indent introduced by previous commitCraig Barnes2023-01-17-1/+1
|
* render: fix double-width glyphs glitching when surrounding cells overflow into itDaniel Eklöf2023-01-17-6/+13
| | | | | | | | | | | | | | | | | | | | | | | If cells overflowed (for example, by using an italic font that isn’t truly monospaced) into a double-width glyph (that itself is *not* overflowing), then the double-width glyph would glitch when being rendered; typically the second half of it would occasionally disappear. This happened because we tried to rasterize the second cell of the double-width glyph. This cell contains a special “spacer” value. Rasterizing that typically results the font’s “not available” glyph. If _that_ glyph overflows, things broke; we’d later end up forcing a re-render of it (thus erasing half the double-width glyph). But since the double-width glyph _itself_ doesn’t overflow, _it_ wouldn’t be re-rendered, leaving it half erased. Fix by recognizing spacer cells, and not trying to rasterize them (set glyph count to 0, and cell count to 1). Closes #1256
* terminfo: sync with ncurses 2023-01-14Daniel Eklöf2023-01-15-3/+11
| | | | | | * RV/rv: report DA2 * XR/xr: report version (XTVERSION) * XF: boolean, focus in/out events available
* config: don’t double-free key binding auxiliary dataDaniel Eklöf2023-01-15-0/+6
| | | | | | | | | | | | | | | | Key bindings with multiple key mappings share auxiliary data (e.g. the command to execute in pipe-* bindings, or the escape sequence in text-bindings). The first one is the designated “master” copy. Only that one should be freed. This fixed a double-free on exit, with e.g. [text-bindings] \x1b\x23=Mod4+space Mod4+equal Closes #1259
* config: remove unused structDaniel Eklöf2023-01-15-5/+0
|
* add rose-pine themeEuCaue2023-01-13-0/+26
|
* completions: bash: complete option arguments for short optionsCraig Barnes2023-01-10-13/+13
|
* completions: bash: use "case" instead of long if/elif/else chainCraig Barnes2023-01-10-43/+52
|
* Use "command -v" instead of "which" in bash completion scriptsCraig Barnes2023-01-10-3/+3
| | | | | The former is a built-in command in bash, whereas the latter is an external command and isn't always necessarily available.
* doc: fix a typoGrigory Kirillov2023-01-07-1/+1
|
* wayland: avoid passing NULL to log_msg() in wayl_reload_xcursor_theme()Craig Barnes2023-01-06-1/+2
| | | | | | This pointer ends up being passed to various printf-family functions, where passing a NULL pointer for an "%s" format specifier invokes undefined behaviour.
* themes: add Onedarkwoojiq2023-01-06-0/+27
|
* ci: drop gitlab CIDaniel Eklöf2023-01-02-112/+0
| | | | We’re no longer mirroring to gitlab.
* changelog: amend terminfo names, in accordance with previous commitCraig Barnes2023-01-01-1/+1
|
* terminfo: PD/PE -> PE/PSDaniel Eklöf2023-01-01-2/+2
| | | | | Ncurses 2022-12-24 had the names wrong. It was corrected on 2022-12-29.
* terminfo: add entries for bracketed pasteDaniel Eklöf2023-01-01-0/+6
| | | | | | | | | | Ncurses added these in 2022-12-24, but they have been used/supported by vim since 2017. * BE - Bracketed paste Enable * BD - Bracketed paste Disable * PE - Paste Enable (i.e. "begin") * PD - Paste Disable (i.e. "end")
* config: change default grapheme-width-method from wcswidth to double-widthDaniel Eklöf2023-01-01-2/+3
| | | | | | | | | | | | | | | | | | The old default, wcswidth, simply calls wcswidth() on the grapheme cluster. This was supposedly the implementation with the highest application compatibility. Except we never even tried to measure it. It was just assumed. A lot of modern applications have better implementations. Let’s try to push support for better emoji support by changing our default method from wcswith to double-width. While far from correct (it’s not based on the Unicode tables), the ‘double-width’ method produces accurate results anyway. double-width is like wcswidth(), in that it adds together the individual wcwidths of all codepoints in the grapheme cluster. But, it limits the maximum width to 2.
* themes: comment out selection-{foreground,background}Daniel Eklöf2022-12-26-46/+49
| | | | That is, mouse selections should default to inverse fg/bg
* themes: add ‘conf’ modelineDaniel Eklöf2022-12-26-0/+55
|
* themes: remove alphaDaniel Eklöf2022-12-26-54/+45
| | | | | Alpha isn’t really part of the theme. Leave it up to the user to set alpha.
* Add Deus theme.argosatcore2022-12-26-0/+32
| | | | New color palette based on: https://github.com/ajmwagar/vim-deus
* config: font-size-adjustment: don’t allow empty %-values (key=%)Daniel Eklöf2022-12-17-1/+1
|
* config: value_to_pt_or_px(): don’t allow empty px values (key=px)Daniel Eklöf2022-12-17-1/+1
|
* foot.ini: add font-size-adjustmentDaniel Eklöf2022-12-17-0/+1
|
* config: add ‘font-size-adjustment=N[px|%]’ optionDaniel Eklöf2022-12-17-18/+119
| | | | | | | | | | | This patch adds a new config option, font-size-adjustment. It lets you configure how much the font size should be incremented/decremented when zooming in or out (ctrl-+, ctrl+-). Values can be specified in points, pixels or percent. Closes #1188