Don't use fancy Unicode quotes, stick to ASCII

This commit is contained in:
Daniel Eklöf 2024-02-06 12:36:45 +01:00
parent d6939dd634
commit 7999975016
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
31 changed files with 328 additions and 328 deletions

View file

@ -378,7 +378,7 @@
* Kitty keyboard protocol: F3 is now encoded as `CSI 13~` instead of * Kitty keyboard protocol: F3 is now encoded as `CSI 13~` instead of
`CSI R`. The kitty keyboard protocol originally allowed F3 to be `CSI R`. The kitty keyboard protocol originally allowed F3 to be
encoded as `CSI R`, but this was removed from the specification encoded as `CSI R`, but this was removed from the specification
since `CSI R` conflicts with the _”Cursor Position Report”_. since `CSI R` conflicts with the _"Cursor Position Report"_.
* `[main].utempter` renamed to `[main].utmp-helper`. The old option * `[main].utempter` renamed to `[main].utmp-helper`. The old option
name is still recognized, but will log a deprecation warning. name is still recognized, but will log a deprecation warning.
* Meson option `default-utempter-path` renamed to * Meson option `default-utempter-path` renamed to
@ -386,9 +386,9 @@
* Opaque sixels now retain the background opacity (when current * Opaque sixels now retain the background opacity (when current
background color is the **default** background color) background color is the **default** background color)
([#1360][1360]). ([#1360][1360]).
* Text cursors vertical position after emitting a sixel, when sixel * Text cursor's vertical position after emitting a sixel, when sixel
scrolling is **enabled** (the default) has been updated to match scrolling is **enabled** (the default) has been updated to match
XTerms, and the VT382s behavior: the cursor is positioned **on** XTerm's, and the VT382's behavior: the cursor is positioned **on**
the last sixel row, rather than _after_ it. This allows printing the last sixel row, rather than _after_ it. This allows printing
sixels on the last row without scrolling up, but also means sixels on the last row without scrolling up, but also means
applications may have to explicitly emit a newline to ensure the applications may have to explicitly emit a newline to ensure the
@ -484,8 +484,8 @@
([#1188][1188]). ([#1188][1188]).
* Bracketed paste terminfo entries (`BD`, `BE`, `PE` and `PS`, added * Bracketed paste terminfo entries (`BD`, `BE`, `PE` and `PS`, added
to ncurses in 2022-12-24). Vim makes use of these. to ncurses in 2022-12-24). Vim makes use of these.
* “Report version” terminfo entries (`XR`/`xr`). * "Report version" terminfo entries (`XR`/`xr`).
* “Report DA2” terminfo entries (`RV`/`rv`). * "Report DA2" terminfo entries (`RV`/`rv`).
* `XF` terminfo capability (focus in/out events available). * `XF` terminfo capability (focus in/out events available).
* `$TERM_PROGRAM` and `$TERM_PROGRAM_VERSION` environment variables * `$TERM_PROGRAM` and `$TERM_PROGRAM_VERSION` environment variables
unset in the slave process. unset in the slave process.
@ -538,12 +538,12 @@
* Crash when interactively resizing the window with a very large * Crash when interactively resizing the window with a very large
scrollback. scrollback.
* Crash when a sixel image exceeds the current sixel max height. * Crash when a sixel image exceeds the current sixel max height.
* Crash after reverse-scrolling (`CSI Ps T`) in the normal * Crash after reverse-scrolling (`CSI Ps T`) in the 'normal'
(non-alternate) screen ([#1190][1190]). (non-alternate) screen ([#1190][1190]).
* Background transparency being applied to the text "behind" the * Background transparency being applied to the text "behind" the
cursor. Only applies to block cursor using inversed fg/bg cursor. Only applies to block cursor using inversed fg/bg
colors. ([#1205][1205]). colors. ([#1205][1205]).
* Crash when monitors physical size is "too small" ([#1209][1209]). * Crash when monitor's physical size is "too small" ([#1209][1209]).
* Line-height adjustment when incrementing/decrementing the font size * Line-height adjustment when incrementing/decrementing the font size
with a user-set line-height ([#1218][1218]). with a user-set line-height ([#1218][1218]).
* Scaling factor not being correctly applied when converting pt-or-px * Scaling factor not being correctly applied when converting pt-or-px
@ -614,7 +614,7 @@
* Crash on buggy compositors (GNOME) that sometimes send pointer-enter * Crash on buggy compositors (GNOME) that sometimes send pointer-enter
events with a NULL surface. Foot now ignores these events, and the events with a NULL surface. Foot now ignores these events, and the
subsequent motion and leave events. subsequent motion and leave events.
* Regression: “random” selected empty cells being highlighted as * Regression: "random" selected empty cells being highlighted as
selected when they should not. selected when they should not.
* Crash when either resizing the terminal window, or scrolling in the * Crash when either resizing the terminal window, or scrolling in the
scrollback history ([#1074][1074]) scrollback history ([#1074][1074])
@ -654,7 +654,7 @@
### Changed ### Changed
* Use `$HOME` instead of `getpwuid()` to retrieve the users home * Use `$HOME` instead of `getpwuid()` to retrieve the user's home
directory when searching for `foot.ini`. directory when searching for `foot.ini`.
* HT, VT and FF are no longer stripped when pasting in non-bracketed * HT, VT and FF are no longer stripped when pasting in non-bracketed
mode ([#1084][1084]). mode ([#1084][1084]).
@ -718,7 +718,7 @@
### Added ### Added
* Workaround for Sway bug [#6960][sway-6960]: scrollback search and * Workaround for Sway bug [#6960][sway-6960]: scrollback search and
the OSC-555 (“flash”) escape sequence leaves dimmed (search) and the OSC-555 ("flash") escape sequence leaves dimmed (search) and
yellow (flash) artifacts ([#1046][1046]). yellow (flash) artifacts ([#1046][1046]).
* `Control+Shift+v` and `XF86Paste` have been added to the default set * `Control+Shift+v` and `XF86Paste` have been added to the default set
of key bindings that paste from the clipboard into the scrollback of key bindings that paste from the clipboard into the scrollback
@ -731,7 +731,7 @@
### Changed ### Changed
* Scrollback searchs `extend-to-word-boundary` no longer stops at * Scrollback search's `extend-to-word-boundary` no longer stops at
space-to-word boundaries, making selection extension feel more space-to-word boundaries, making selection extension feel more
natural. natural.
@ -772,7 +772,7 @@
([#950][950]). ([#950][950]).
* footclient: `-E,--client-environment` command line option. When * footclient: `-E,--client-environment` command line option. When
used, the child process in the new terminal instance inherits the used, the child process in the new terminal instance inherits the
environment from the footclient process instead of the servers environment from the footclient process instead of the server's
([#1004][1004]). ([#1004][1004]).
* `[csd].hide-when-maximized=yes|no` option ([#1019][1019]). * `[csd].hide-when-maximized=yes|no` option ([#1019][1019]).
* Scrollback search mode now highlights all matches. * Scrollback search mode now highlights all matches.
@ -828,7 +828,7 @@
* Build: missing `wayland_client` dependency in `test-config` * Build: missing `wayland_client` dependency in `test-config`
([#918][918]). ([#918][918]).
* “(null)” being logged as font-name (for some fonts) when warning * "(null)" being logged as font-name (for some fonts) when warning
about a non-monospaced primary font. about a non-monospaced primary font.
* Rare crash when the window is resized while a mouse selection is * Rare crash when the window is resized while a mouse selection is
ongoing ([#922][922]). ongoing ([#922][922]).
@ -850,7 +850,7 @@
([#1009][1009]). ([#1009][1009]).
* Window geometry when CSDs are enabled and CSD border width set to a * Window geometry when CSDs are enabled and CSD border width set to a
non-zero value. This fixes window snapping in e.g. GNOME. non-zero value. This fixes window snapping in e.g. GNOME.
* Window size “jumping” when starting an interactive resize when CSDs * Window size "jumping" when starting an interactive resize when CSDs
are enabled, and CSD border width set to a non-zero value. are enabled, and CSD border width set to a non-zero value.
* Key binding overrides on the command line having no effect with * Key binding overrides on the command line having no effect with
`footclient` instances ([#931][931]). `footclient` instances ([#931][931]).
@ -916,15 +916,15 @@
* PaperColorDark and PaperColorLight themes renamed to * PaperColorDark and PaperColorLight themes renamed to
paper-color-dark and paper-color-light, for consistency with other paper-color-dark and paper-color-light, for consistency with other
theme names. theme names.
* `[scrollback].multiplier` is now applied in “alternate scroll” mode, * `[scrollback].multiplier` is now applied in "alternate scroll" mode,
where scroll events are translated to fake arrow key presses on the where scroll events are translated to fake arrow key presses on the
alt screen ([#859](https://codeberg.org/dnkl/foot/issues/859)). alt screen ([#859](https://codeberg.org/dnkl/foot/issues/859)).
* The width of the block cursors outline in an unfocused window is * The width of the block cursor's outline in an unfocused window is
now scaled by the output scaling factor (desktop now scaled by the output scaling factor ("desktop
scaling). Previously, it was always 1px. scaling"). Previously, it was always 1px.
* Foot will now try to change the locale to either “C.UTF-8” or * Foot will now try to change the locale to either "C.UTF-8" or
“en_US.UTF-8” if started with a non-UTF8 locale. If this fails, foot "en_US.UTF-8" if started with a non-UTF8 locale. If this fails, foot
will start, but only to display a window with an error (users shell will start, but only to display a window with an error (user's shell
is not executed). is not executed).
* `gettimeofday()` has been replaced with `clock_gettime()`, due to it being * `gettimeofday()` has been replaced with `clock_gettime()`, due to it being
marked as obsolete by POSIX. marked as obsolete by POSIX.
@ -952,7 +952,7 @@
### Fixed ### Fixed
* Font size adjustment (“zooming”) when font is configured with a * Font size adjustment ("zooming") when font is configured with a
**pixelsize**, and `dpi-aware=no` **pixelsize**, and `dpi-aware=no`
([#842](https://codeberg.org/dnkl/foot/issues/842)). ([#842](https://codeberg.org/dnkl/foot/issues/842)).
* Key presses triggering keyboard layout switches also emitting CSI * Key presses triggering keyboard layout switches also emitting CSI
@ -1026,7 +1026,7 @@
* Initial support for the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/). * Initial support for the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/).
Modes supported: Modes supported:
- [Disambiguate escape codes](https://sw.kovidgoyal.net/kitty/keyboard-protocol/#disambiguate) (mode `0b1`) - [Disambiguate escape codes](https://sw.kovidgoyal.net/kitty/keyboard-protocol/#disambiguate) (mode `0b1`)
* “Window menu” (compositor provided) on right clicks on the CSD title * "Window menu" (compositor provided) on right clicks on the CSD title
bar. bar.
@ -1063,7 +1063,7 @@
### Fixed ### Fixed
* Regression: `letter-spacing` resulting in a “not a valid option” * Regression: `letter-spacing` resulting in a "not a valid option"
error ([#795](https://codeberg.org/dnkl/foot/issues/795)). error ([#795](https://codeberg.org/dnkl/foot/issues/795)).
* Regression: bad section name in configuration error messages. * Regression: bad section name in configuration error messages.
* Regression: `pipe-*` key bindings not being parsed correctly, * Regression: `pipe-*` key bindings not being parsed correctly,
@ -1098,7 +1098,7 @@
* `[csd].border-width` and `[csd].border-color`, allowing you to * `[csd].border-width` and `[csd].border-color`, allowing you to
configure the width and color of the CSD border. configure the width and color of the CSD border.
* Support for `XTMODKEYS` with `Pp=4` and `Pv=2` (_modifyOtherKeys=2_). * Support for `XTMODKEYS` with `Pp=4` and `Pv=2` (_modifyOtherKeys=2_).
* `[colors].dim0-7` options, allowing you to configure custom “dim” * `[colors].dim0-7` options, allowing you to configure custom "dim"
colors ([#776](https://codeberg.org/dnkl/foot/issues/776)). colors ([#776](https://codeberg.org/dnkl/foot/issues/776)).
@ -1114,9 +1114,9 @@
due to the compositor not implementing a recent enough version of due to the compositor not implementing a recent enough version of
the `wl_seat` interface ([#779](https://codeberg.org/dnkl/foot/issues/779)). the `wl_seat` interface ([#779](https://codeberg.org/dnkl/foot/issues/779)).
* Boolean options in `foot.ini` are now limited to * Boolean options in `foot.ini` are now limited to
“yes|true|on|1|no|false|off|0”, Previously, anything that did not "yes|true|on|1|no|false|off|0", Previously, anything that did not
match “yes|true|on”, or a number greater than 0, was treated as match "yes|true|on", or a number greater than 0, was treated as
“false”. "false".
* `[scrollback].multiplier` is no longer applied when the alternate * `[scrollback].multiplier` is no longer applied when the alternate
screen is in use ([#787](https://codeberg.org/dnkl/foot/issues/787)). screen is in use ([#787](https://codeberg.org/dnkl/foot/issues/787)).
@ -1131,7 +1131,7 @@
### Fixed ### Fixed
* Sticky modifiers in input handling; when determining modifier * 'Sticky' modifiers in input handling; when determining modifier
state, foot was looking at **depressed** modifiers, not state, foot was looking at **depressed** modifiers, not
**effective** modifiers, like it should. **effective** modifiers, like it should.
* Fix crashes after enabling CSD at runtime when `csd.size` is 0. * Fix crashes after enabling CSD at runtime when `csd.size` is 0.
@ -1139,7 +1139,7 @@
([#752](https://codeberg.org/dnkl/foot/issues/752)). ([#752](https://codeberg.org/dnkl/foot/issues/752)).
* Clipboard occasionally ceasing to work, until window has been * Clipboard occasionally ceasing to work, until window has been
re-focused ([#753](https://codeberg.org/dnkl/foot/issues/753)). re-focused ([#753](https://codeberg.org/dnkl/foot/issues/753)).
* Dont propagate window title updates to the Wayland compositor * Don't propagate window title updates to the Wayland compositor
unless the new title is different from the old title. unless the new title is different from the old title.
@ -1159,7 +1159,7 @@
### Changed ### Changed
* PGO helper scripts no longer set `LC_CTYPE=en_US.UTF-8`. But, note * PGO helper scripts no longer set `LC_CTYPE=en_US.UTF-8`. But, note
that “full” PGO builds still **require** a UTF-8 locale; you need that "full" PGO builds still **require** a UTF-8 locale; you need
to set one manually in your build script to set one manually in your build script
([#728](https://codeberg.org/dnkl/foot/issues/728)). ([#728](https://codeberg.org/dnkl/foot/issues/728)).
@ -1187,11 +1187,11 @@
definitions when `-Dterminfo=enabled`. definitions when `-Dterminfo=enabled`.
* `-Dcustom-terminfo-install-location` no longer accepts `no` as a * `-Dcustom-terminfo-install-location` no longer accepts `no` as a
special value, to disable exporting `TERMINFO`. To achieve the same special value, to disable exporting `TERMINFO`. To achieve the same
result, simply dont set it at all. If it _is_ set, `TERMINFO` is result, simply don't set it at all. If it _is_ set, `TERMINFO` is
still exported, like before. still exported, like before.
* The default install location for the terminfo definitions have been * The default install location for the terminfo definitions have been
changed back to `${datadir}/terminfo`. changed back to `${datadir}/terminfo`.
* `dpi-aware=auto`: fonts are now scaled using the monitors DPI only * `dpi-aware=auto`: fonts are now scaled using the monitor's DPI only
when **all** monitors have a scaling factor of one when **all** monitors have a scaling factor of one
([#714](https://codeberg.org/dnkl/foot/issues/714)). ([#714](https://codeberg.org/dnkl/foot/issues/714)).
* fcft >= 3.0.0 in now required. * fcft >= 3.0.0 in now required.
@ -1240,12 +1240,12 @@
terminating the client application) from 4 to 60 seconds. terminating the client application) from 4 to 60 seconds.
* When terminating the client application, foot now sends `SIGTERM` immediately * When terminating the client application, foot now sends `SIGTERM` immediately
after closing the PTY, instead of waiting 2 seconds. after closing the PTY, instead of waiting 2 seconds.
* Foot now sends `SIGTERM`/`SIGKILL` to the client applications process group, * Foot now sends `SIGTERM`/`SIGKILL` to the client application's process group,
instead of just to the client applications process. instead of just to the client application's process.
* `kmous` terminfo capability from `\E[M` to `\E[<`. * `kmous` terminfo capability from `\E[M` to `\E[<`.
* pt-or-px values (`letter-spacing`, etc) and the line thickness * pt-or-px values (`letter-spacing`, etc) and the line thickness
(`tweak.box-drawing-base-thickness`) in box drawing characters are (`tweak.box-drawing-base-thickness`) in box drawing characters are
now translated to pixel values using the monitors scaling factor now translated to pixel values using the monitor's scaling factor
when `dpi-aware=no`, or `dpi-aware=auto` and the scaling factor is when `dpi-aware=no`, or `dpi-aware=auto` and the scaling factor is
larger than 1 ([#680](https://codeberg.org/dnkl/foot/issues/680)). larger than 1 ([#680](https://codeberg.org/dnkl/foot/issues/680)).
* Spawning a new terminal with a working directory that does not exist * Spawning a new terminal with a working directory that does not exist
@ -1255,7 +1255,7 @@
### Removed ### Removed
* `km`/`smm`/`rmm` from terminfo; foot prefixes Alt-key combinations * `km`/`smm`/`rmm` from terminfo; foot prefixes Alt-key combinations
with `ESC`, and not by setting the 8:th “meta” bit, regardless of with `ESC`, and not by setting the 8:th "meta" bit, regardless of
`smm`/`rmm`. While this _can_ be disabled by, resetting private mode `smm`/`rmm`. While this _can_ be disabled by, resetting private mode
1036, the terminfo should reflect the **default** behavior 1036, the terminfo should reflect the **default** behavior
([#670](https://codeberg.org/dnkl/foot/issues/670)). ([#670](https://codeberg.org/dnkl/foot/issues/670)).
@ -1422,10 +1422,10 @@ For full support, the following is required:
If `tweak.grapheme-shaping` has **not** been enabled, foot will If `tweak.grapheme-shaping` has **not** been enabled, foot will
neither use libutf8proc to do grapheme cluster segmentation, nor will neither use libutf8proc to do grapheme cluster segmentation, nor will
it use fcfts grapheme shaping capabilities to shape combining it use fcft's grapheme shaping capabilities to shape combining
characters. characters.
This feature is _experimental_ mostly due to the “wcwidth” problem; This feature is _experimental_ mostly due to the "wcwidth" problem;
how many cells should foot allocate for a grapheme cluster? While the how many cells should foot allocate for a grapheme cluster? While the
answer may seem simple, the problem is that, whatever the answer is, answer may seem simple, the problem is that, whatever the answer is,
the client application **must** come up with the **same** the client application **must** come up with the **same**
@ -1503,9 +1503,9 @@ supported.
* Point values in `line-height`, `letter-spacing`, * Point values in `line-height`, `letter-spacing`,
`horizontal-letter-offset` and `vertical-letter-offset` are now `horizontal-letter-offset` and `vertical-letter-offset` are now
rounded, not truncated, when translated to pixel values. rounded, not truncated, when translated to pixel values.
* Foots exit code is now -26/230 when foot itself failed to launch * Foot's exit code is now -26/230 when foot itself failed to launch
(due to invalid command line options, client application/shell not (due to invalid command line options, client application/shell not
found etc). Footclients exit code is -36/220 when it itself fails found etc). Footclient's exit code is -36/220 when it itself fails
to launch (e.g. bad command line option) and -26/230 when the foot to launch (e.g. bad command line option) and -26/230 when the foot
server failed to instantiate a new window server failed to instantiate a new window
([#466](https://codeberg.org/dnkl/foot/issues/466)). ([#466](https://codeberg.org/dnkl/foot/issues/466)).
@ -1558,7 +1558,7 @@ supported.
resulting in PGO build failures. resulting in PGO build failures.
* Wrong colors in the 256-color cube * Wrong colors in the 256-color cube
([#479](https://codeberg.org/dnkl/foot/issues/479)). ([#479](https://codeberg.org/dnkl/foot/issues/479)).
* Memory leak triggered by “opening” an OSC-8 URI and then resetting * Memory leak triggered by "opening" an OSC-8 URI and then resetting
the terminal without closing the URI the terminal without closing the URI
([#495](https://codeberg.org/dnkl/foot/issues/495)). ([#495](https://codeberg.org/dnkl/foot/issues/495)).
* Assertion when emitting a sixel occupying the entire scrollback * Assertion when emitting a sixel occupying the entire scrollback
@ -1567,7 +1567,7 @@ supported.
invisible) for certain combinations of fonts and font sizes invisible) for certain combinations of fonts and font sizes
([#503](https://codeberg.org/dnkl/foot/issues/503)). ([#503](https://codeberg.org/dnkl/foot/issues/503)).
* Sixels with transparent bottom border being resized below the size * Sixels with transparent bottom border being resized below the size
specified in _”Set Raster Attributes”_. specified in _"Set Raster Attributes"_.
* Fonts sometimes not being reloaded with the correct scaling factor * Fonts sometimes not being reloaded with the correct scaling factor
when `dpi-aware=no`, or `dpi-aware=auto` with monitor(s) with a when `dpi-aware=no`, or `dpi-aware=auto` with monitor(s) with a
scaling factor > 1 ([#509](https://codeberg.org/dnkl/foot/issues/509)). scaling factor > 1 ([#509](https://codeberg.org/dnkl/foot/issues/509)).
@ -1763,7 +1763,7 @@ supported.
background color for empty pixels instead of the default background background color for empty pixels instead of the default background
color ([#391](https://codeberg.org/dnkl/foot/issues/391)). color ([#391](https://codeberg.org/dnkl/foot/issues/391)).
* Sixel decoding optimized; up to 100% faster in some cases. * Sixel decoding optimized; up to 100% faster in some cases.
* Reported sixel “max geometry” from current window size, to the * Reported sixel "max geometry" from current window size, to the
configured maximum size (defaulting to 10000x10000). configured maximum size (defaulting to 10000x10000).
@ -1862,7 +1862,7 @@ supported.
* Pasting URIs from the clipboard when the source has not * Pasting URIs from the clipboard when the source has not
newline-terminated the last URI newline-terminated the last URI
([#291](https://codeberg.org/dnkl/foot/issues/291)). ([#291](https://codeberg.org/dnkl/foot/issues/291)).
* Sixel “current geometry” query response not being bounded by the * Sixel "current geometry" query response not being bounded by the
current window dimensions (fixes `lsix` output) current window dimensions (fixes `lsix` output)
* Crash on keyboard input when repeat rate was zero (i.e. no repeat). * Crash on keyboard input when repeat rate was zero (i.e. no repeat).
* Wrong button encoding of mouse buttons 6 and 7 in mouse events. * Wrong button encoding of mouse buttons 6 and 7 in mouse events.
@ -1939,7 +1939,7 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
and `CSI ? 737769 l` disables it. This can be used to and `CSI ? 737769 l` disables it. This can be used to
e.g. enable/disable IME when entering/leaving insert mode in vim. e.g. enable/disable IME when entering/leaving insert mode in vim.
* `dpi-aware` option to `foot.ini`. The default, `auto`, sizes fonts * `dpi-aware` option to `foot.ini`. The default, `auto`, sizes fonts
using the monitors DPI when output scaling has been using the monitor's DPI when output scaling has been
**disabled**. If output scaling has been **enabled**, fonts are **disabled**. If output scaling has been **enabled**, fonts are
sized using the scaling factor. DPI-only font sizing can be forced sized using the scaling factor. DPI-only font sizing can be forced
by setting `dpi-aware=yes`. Setting `dpi-aware=no` forces font by setting `dpi-aware=yes`. Setting `dpi-aware=no` forces font
@ -2019,7 +2019,7 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
`\E[38:2...m`) can now be used _without_ the color space ID `\E[38:2...m`) can now be used _without_ the color space ID
parameter. parameter.
* SGR 21 no longer disables **bold**. According to ECMA-48, SGR 21 is * SGR 21 no longer disables **bold**. According to ECMA-48, SGR 21 is
_”double underline_”. Foot does not (yet) implement that, but thats _"double underline_". Foot does not (yet) implement that, but that's
no reason to implement a non-standard behavior. no reason to implement a non-standard behavior.
* `DECRQM` now returns actual state of the requested mode, instead of * `DECRQM` now returns actual state of the requested mode, instead of
always returning `2`. always returning `2`.
@ -2067,7 +2067,7 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
([#194](https://codeberg.org/dnkl/foot/issues/194)). ([#194](https://codeberg.org/dnkl/foot/issues/194)).
* Single-width characters with double-width glyphs are now allowed to * Single-width characters with double-width glyphs are now allowed to
overflow into neighboring cells by default. Set overflow into neighboring cells by default. Set
**tweak.allow-overflowing-double-width-glyphs** to no to disable **tweak.allow-overflowing-double-width-glyphs** to 'no' to disable
this. this.
### Fixed ### Fixed
@ -2271,7 +2271,7 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
binding has consumed it. binding has consumed it.
* Input events from getting mixed with paste data * Input events from getting mixed with paste data
([#101](https://codeberg.org/dnkl/foot/issues/101)). ([#101](https://codeberg.org/dnkl/foot/issues/101)).
* Missing DPI values for “some” monitors on Gnome * Missing DPI values for "some" monitors on Gnome
([#118](https://codeberg.org/dnkl/foot/issues/118)). ([#118](https://codeberg.org/dnkl/foot/issues/118)).
* Handling of multi-column composed characters while reflowing. * Handling of multi-column composed characters while reflowing.
* Escape sequences sent for key combinations with `Return`, that did * Escape sequences sent for key combinations with `Return`, that did

View file

@ -94,24 +94,24 @@ A note on terminfo; the terminfo database exposes terminal
capabilities to the applications running inside the terminal. As such, capabilities to the applications running inside the terminal. As such,
it is important that the terminfo used reflects the actual it is important that the terminfo used reflects the actual
terminal. Using the `xterm-256color` terminfo will, in many cases, terminal. Using the `xterm-256color` terminfo will, in many cases,
work, but I still recommend using foots own terminfo. There are two work, but I still recommend using foot's own terminfo. There are two
reasons for this: reasons for this:
* foots terminfo contains a couple of non-standard capabilities, * foot's terminfo contains a couple of non-standard capabilities,
used by e.g. tmux. used by e.g. tmux.
* New capabilities added to the `xterm-256color` terminfo could * New capabilities added to the `xterm-256color` terminfo could
potentially break foot. potentially break foot.
* There may be future additions or changes to foots terminfo. * There may be future additions or changes to foot's terminfo.
As of ncurses 2021-07-31, ncurses includes a version of foots As of ncurses 2021-07-31, ncurses includes a version of foot's
terminfo. **The recommendation is to use those**, and only install the terminfo. **The recommendation is to use those**, and only install the
terminfo definitions from this git repo if the systems ncurses terminfo definitions from this git repo if the system's ncurses
predates 2021-07-31. predates 2021-07-31.
But, note that the foot terminfo definitions in ncurses lack the But, note that the foot terminfo definitions in ncurses' lack the
non-standard capabilities. This mostly affects tmux; without them, non-standard capabilities. This mostly affects tmux; without them,
`terminal-overrides` must be configured to enable truecolor `terminal-overrides` must be configured to enable truecolor
support. For this reason, it _is_ possible to install “our” terminfo support. For this reason, it _is_ possible to install "our" terminfo
definitions as well, either in a non-default location, or under a definitions as well, either in a non-default location, or under a
different name. different name.
@ -124,10 +124,10 @@ details.
Installing them under a different name generally works well, but will Installing them under a different name generally works well, but will
break applications that check if `$TERM == foot`. break applications that check if `$TERM == foot`.
Hence the recommendation to simply use ncurses terminfo definitions Hence the recommendation to simply use ncurses' terminfo definitions
if available. if available.
If packaging “our” terminfo definitions, I recommend doing that as a If packaging "our" terminfo definitions, I recommend doing that as a
separate package, to allow them to be installed on remote systems separate package, to allow them to be installed on remote systems
without having to install foot itself. without having to install foot itself.
@ -176,9 +176,9 @@ meson ... -Ddefault-terminfo=foot -Dterminfo-base-name=foot-extra
``` ```
(or just leave out `-Ddefault-terminfo`, since it defaults to `foot` anyway). (or just leave out `-Ddefault-terminfo`, since it defaults to `foot` anyway).
Finally, `-Dcustom-terminfo-install-location` enables foots terminfo Finally, `-Dcustom-terminfo-install-location` enables foot's terminfo
to co-exist with ncurses version, without changing the terminfo to co-exist with ncurses' version, without changing the terminfo
names. The idea is that you install foots terminfo to a non-standard names. The idea is that you install foot's terminfo to a non-standard
location, for example `/usr/share/foot/terminfo`. Use location, for example `/usr/share/foot/terminfo`. Use
`-Dcustom-terminfo-install-location` to tell foot where the terminfo `-Dcustom-terminfo-install-location` to tell foot where the terminfo
is. Foot will set the environment variable `TERMINFO` to this value is. Foot will set the environment variable `TERMINFO` to this value
@ -194,7 +194,7 @@ in the meson build. It does **not** change the default value of
`TERM`, and it does **not** disable `TERMINFO`, if `TERM`, and it does **not** disable `TERMINFO`, if
`-Dcustom-terminfo-install-location` has been set. Use this if `-Dcustom-terminfo-install-location` has been set. Use this if
packaging the terminfo definitions in a separate package (and the packaging the terminfo definitions in a separate package (and the
build script isnt shared with the foot package). build script isn't shared with the 'foot' package).
Example: Example:
@ -269,7 +269,7 @@ reason there are a number of helper scripts available.
scripts in the `pgo` directory to do a complete PGO build. This script scripts in the `pgo` directory to do a complete PGO build. This script
is intended to be used when doing manual builds. is intended to be used when doing manual builds.
Note that all “full” PGO builds (which `auto` will prefer, if Note that all "full" PGO builds (which `auto` will prefer, if
possible) **require** `LC_CTYPE` to be set to an UTF-8 locale. This is possible) **require** `LC_CTYPE` to be set to an UTF-8 locale. This is
**not** done automatically. **not** done automatically.
@ -370,7 +370,7 @@ fail.
The snippet above then creates an (empty) temporary file. Then, it The snippet above then creates an (empty) temporary file. Then, it
runs a script that generates random escape sequences (if you cat runs a script that generates random escape sequences (if you cat
`${tmp_file}` in a terminal, youll see random colored characters all `${tmp_file}` in a terminal, you'll see random colored characters all
over the screen). Finally, we feed the randomly generated escape over the screen). Finally, we feed the randomly generated escape
sequences to the PGO helper. This is what generates the profiling data sequences to the PGO helper. This is what generates the profiling data
used in the next step. used in the next step.
@ -450,7 +450,7 @@ sed 's/@default_terminfo@/foot/g' foot.info | \
tic -o <output-directory> -x -e foot,foot-direct - tic -o <output-directory> -x -e foot,foot-direct -
``` ```
Where _”output-directory”_ **must** match the value passed to Where _"output-directory"_ **must** match the value passed to
`-Dcustom-terminfo-install-location` in the foot build. If `-Dcustom-terminfo-install-location` in the foot build. If
`-Dcustom-terminfo-install-location` has not been set, `-o `-Dcustom-terminfo-install-location` has not been set, `-o
<output-directory>` can simply be omitted. <output-directory>` can simply be omitted.

View file

@ -303,10 +303,10 @@ Foot supports URL detection. But, unlike many other terminal
emulators, where URLs are highlighted when they are hovered and opened emulators, where URLs are highlighted when they are hovered and opened
by clicking on them, foot uses a keyboard driven approach. by clicking on them, foot uses a keyboard driven approach.
Pressing <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>o</kbd> enters _URL Pressing <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>o</kbd> enters _"URL
mode_, where all currently visible URLs are underlined, and is mode"_, where all currently visible URLs are underlined, and is
associated with a _“jump-label”_. The jump-label indicates the _key associated with a _"jump-label"_. The jump-label indicates the _key
sequence_ (e.g. **”AF”**) to use to activate the URL. sequence_ (e.g. **"AF"**) to use to activate the URL.
The key binding can, of course, be customized, like all other key The key binding can, of course, be customized, like all other key
bindings in foot. See `show-urls-launch` and `show-urls-copy` in the bindings in foot. See `show-urls-launch` and `show-urls-copy` in the
@ -329,7 +329,7 @@ the jump label key sequences can be configured.
New foot terminal instances (bound to New foot terminal instances (bound to
<kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>n</kbd> by default) will open in <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>n</kbd> by default) will open in
the current working directory, **if** the shell in the “parent” the current working directory, **if** the shell in the "parent"
terminal reports directory changes. terminal reports directory changes.
This is done with the OSC-7 escape sequence. Most shells can be This is done with the OSC-7 escape sequence. Most shells can be
@ -360,9 +360,9 @@ See the
[wiki](https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts) [wiki](https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts)
for details, and examples for other shells. for details, and examples for other shells.
### Piping last commands output ### Piping last command's output
The key binding `pipe-command-output` can pipe the last commands The key binding `pipe-command-output` can pipe the last command's
output to an application of your choice (similar to the other `pipe-*` output to an application of your choice (similar to the other `pipe-*`
key bindings): key bindings):
@ -372,7 +372,7 @@ pipe-command-output=[sh -c "f=$(mktemp); cat - > $f; footclient emacsclient -nw
``` ```
When pressing <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>g</kbd>, the last When pressing <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>g</kbd>, the last
commands output is written to a temporary file, then an emacsclient command's output is written to a temporary file, then an emacsclient
is started in a new footclient instance. The temporary file is removed is started in a new footclient instance. The temporary file is removed
after the footclient instance has closed. after the footclient instance has closed.
@ -472,19 +472,19 @@ multiplied.
For this reason, and because of the new _fractional scaling_ protocol For this reason, and because of the new _fractional scaling_ protocol
(see below for details), and because this is how Wayland applications (see below for details), and because this is how Wayland applications
are expected to behave, foot >= 1.15 will default to scaling fonts are expected to behave, foot >= 1.15 will default to scaling fonts
using the compositors scaling factor, and **not** the monitor using the compositor's scaling factor, and **not** the monitor
DPI. DPI.
This means the (assuming the monitors are at the same viewing This means the (assuming the monitors are at the same viewing
distance) the font size will appear to change when you move the foot distance) the font size will appear to change when you move the foot
window across different monitors, **unless** you have configured the window across different monitors, **unless** you have configured the
monitors scaling factors correctly in the compositor. monitors' scaling factors correctly in the compositor.
This can be changed by setting the `dpi-aware` option to `yes` in This can be changed by setting the `dpi-aware` option to `yes` in
`foot.ini`. When enabled, fonts will **not** be sized using the `foot.ini`. When enabled, fonts will **not** be sized using the
scaling factor, but will instead be sized using the monitors scaling factor, but will instead be sized using the monitor's
DPI. When the foot window is moved across monitors, the font size is DPI. When the foot window is moved across monitors, the font size is
updated for the current monitors DPI. updated for the current monitor's DPI.
This means that, assuming the monitors are **at the same viewing This means that, assuming the monitors are **at the same viewing
distance**, the font size will appear to be the same, at all times. distance**, the font size will appear to be the same, at all times.
@ -574,7 +574,7 @@ emulator actually responded to.
Starting with version 1.7.0, foot also implements `XTVERSION`, to Starting with version 1.7.0, foot also implements `XTVERSION`, to
which it will reply with `\EP>|foot(version)\E\\`. Version is which it will reply with `\EP>|foot(version)\E\\`. Version is
e.g. “1.8.2” for a regular release, or “1.8.2-36-g7db8e06f” for a git e.g. "1.8.2" for a regular release, or "1.8.2-36-g7db8e06f" for a git
build. build.
@ -587,9 +587,9 @@ It allows querying the terminal for terminfo
capabilities. Applications using this feature do not need to use the capabilities. Applications using this feature do not need to use the
classic, file-based, terminfo definition. For example, if all classic, file-based, terminfo definition. For example, if all
applications used this feature, you would no longer have to install applications used this feature, you would no longer have to install
foots terminfo on remote hosts you SSH into. foot's terminfo on remote hosts you SSH into.
XTerms implementation (as of XTerm-370) only supports querying key XTerm's implementation (as of XTerm-370) only supports querying key
(as in keyboard keys) capabilities, and three custom capabilities: (as in keyboard keys) capabilities, and three custom capabilities:
* `TN` - terminal name * `TN` - terminal name
@ -601,7 +601,7 @@ Kitty has extended this, and also supports querying all integer and
string capabilities. string capabilities.
Foot supports this, and extends it even further, to also include Foot supports this, and extends it even further, to also include
boolean capabilities. This means foots entire terminfo can be queried boolean capabilities. This means foot's entire terminfo can be queried
via `XTGETTCAP`. via `XTGETTCAP`.
Note that both Kitty and foot handles **responses** to Note that both Kitty and foot handles **responses** to
@ -613,7 +613,7 @@ capability/value pairs. There are a couple of issues with this:
* The success/fail flag in the beginning of the response is always `1` * The success/fail flag in the beginning of the response is always `1`
(success), unless the very **first** queried capability is invalid. (success), unless the very **first** queried capability is invalid.
* XTerm will not respond **at all** to an invalid capability, unless * XTerm will not respond **at all** to an invalid capability, unless
its the first one in the `XTGETTCAP` query. it's the first one in the `XTGETTCAP` query.
* XTerm will end the response at the first invalid capability. * XTerm will end the response at the first invalid capability.
In other words, if you send a large multi-capability query, you will In other words, if you send a large multi-capability query, you will

View file

@ -2098,7 +2098,7 @@ draw_braille(struct buf *buf, char32_t wc)
if (x_px_left >= 1) { x_spacing++; x_px_left--; } if (x_px_left >= 1) { x_spacing++; x_px_left--; }
if (y_px_left >= 3) { y_spacing++; y_px_left -= 3; } if (y_px_left >= 3) { y_spacing++; y_px_left -= 3; }
/* Fourth, margins (“spacing”, but on the sides) */ /* Fourth, margins ("spacing", but on the sides) */
if (x_px_left >= 2) { x_margin++; x_px_left -= 2; } if (x_px_left >= 2) { x_margin++; x_px_left -= 2; }
if (y_px_left >= 2) { y_margin++; y_px_left -= 2; } if (y_px_left >= 2) { y_margin++; y_px_left -= 2; }

View file

@ -23,7 +23,7 @@ cmd_scrollback_up(struct terminal *term, int rows)
const int grid_rows = grid->num_rows; const int grid_rows = grid->num_rows;
/* The view row number in scrollback relative coordinates. This is /* The view row number in scrollback relative coordinates. This is
* the maximum number of rows were allowed to scroll */ * the maximum number of rows we're allowed to scroll */
int sb_start = grid_sb_start_ignore_uninitialized(grid, term->rows); int sb_start = grid_sb_start_ignore_uninitialized(grid, term->rows);
int view_sb_rel = int view_sb_rel =
grid_row_abs_to_sb_precalc_sb_start(grid, sb_start, view); grid_row_abs_to_sb_precalc_sb_start(grid, sb_start, view);

View file

@ -540,7 +540,7 @@ value_to_str(struct context *ctx, char **res)
* *
* - key="value" OK * - key="value" OK
* - key=abc "quote" def NOT OK * - key=abc "quote" def NOT OK
* - key=value OK * - key='value' OK
* *
* Finally, we support escaping the quote character, and the * Finally, we support escaping the quote character, and the
* escape character itself: * escape character itself:
@ -1898,7 +1898,7 @@ modifiers_disjoint(const config_modifier_list_t *mods1,
static char * NOINLINE static char * NOINLINE
modifiers_to_str(const config_modifier_list_t *mods) modifiers_to_str(const config_modifier_list_t *mods)
{ {
size_t len = tll_length(*mods); /* + , and NULL terminator */ size_t len = tll_length(*mods); /* '+' , and NULL terminator */
tll_foreach(*mods, it) tll_foreach(*mods, it)
len += strlen(it->item); len += strlen(it->item);
@ -3537,7 +3537,7 @@ config_font_parse(const char *pattern, struct config_font *font)
/* /*
* First look for user specified {pixel}size option * First look for user specified {pixel}size option
* e.g. font-name:size=12 * e.g. "font-name:size=12"
*/ */
double pt_size = -1.0; double pt_size = -1.0;
@ -3548,9 +3548,9 @@ config_font_parse(const char *pattern, struct config_font *font)
if (have_pt_size != FcResultMatch && have_px_size != FcResultMatch) { if (have_pt_size != FcResultMatch && have_px_size != FcResultMatch) {
/* /*
* Apply fontconfig config. Cant do that until weve first * Apply fontconfig config. Can't do that until we've first
* checked for a user provided size, since we may end up with * checked for a user provided size, since we may end up with
* both size and pixelsize being set, and we dont know * both "size" and "pixelsize" being set, and we don't know
* which one takes priority. * which one takes priority.
*/ */
FcPattern *pat_copy = FcPatternDuplicate(pat); FcPattern *pat_copy = FcPatternDuplicate(pat);

View file

@ -311,7 +311,7 @@ struct config {
uint32_t buttons; uint32_t buttons;
uint32_t minimize; uint32_t minimize;
uint32_t maximize; uint32_t maximize;
uint32_t quit; /* close collides with #define in epoll-shim */ uint32_t quit; /* 'close' collides with #define in epoll-shim */
uint32_t border; uint32_t border;
} color; } color;

8
csi.c
View file

@ -1536,8 +1536,8 @@ csi_dispatch(struct terminal *term, uint8_t final)
break; break;
case 4: /* modifyOtherKeys */ case 4: /* modifyOtherKeys */
/* We dont support fully disabling modifyOtherKeys, /* We don't support fully disabling modifyOtherKeys,
* but simply revert back to mode 1 */ * but simply revert back to mode '1' */
term->modify_other_keys_2 = false; term->modify_other_keys_2 = false;
LOG_DBG("modifyOtherKeys=1"); LOG_DBG("modifyOtherKeys=1");
break; break;
@ -1615,7 +1615,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
break; break;
} }
} }
break; /* private[0] == < */ break; /* private[0] == '<' */
} }
case ' ': { case ' ': {
@ -1762,7 +1762,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
break; break;
} }
break; /* private[0] == ? && private[1] == $ */ break; /* private[0] == '?' && private[1] == '$' */
default: default:
UNHANDLED(); UNHANDLED();

8
dcs.c
View file

@ -138,12 +138,12 @@ xtgettcap_reply(struct terminal *term, const char *hex_cap_name, size_t len)
/* /*
* Reply format: * Reply format:
* \EP 1 + r cap=value \E\\ * \EP 1 + r cap=value \E\\
* Where cap and value are hex encoded ascii strings * Where 'cap' and 'value are hex encoded ascii strings
*/ */
char *reply = xmalloc( char *reply = xmalloc(
5 + /* DCS 1 + r (\EP1+r) */ 5 + /* DCS 1 + r (\EP1+r) */
len + /* capability name, hex encoded */ len + /* capability name, hex encoded */
1 + /* = */ 1 + /* '=' */
strlen(value) * 2 + /* capability value, hex encoded */ strlen(value) * 2 + /* capability value, hex encoded */
2 + /* ST (\E\\) */ 2 + /* ST (\E\\) */
1); 1);
@ -253,8 +253,8 @@ decrqss_unhook(struct terminal *term)
/* /*
* A note on the Ps parameter in the reply: many DEC manual * A note on the Ps parameter in the reply: many DEC manual
* instances (e.g. https://vt100.net/docs/vt510-rm/DECRPSS) claim * instances (e.g. https://vt100.net/docs/vt510-rm/DECRPSS) claim
* that 0 means request is valid, and 1 means request is * that 0 means "request is valid", and 1 means "request is
* invalid. * invalid".
* *
* However, this appears to be a typo; actual hardware inverts the * However, this appears to be a typo; actual hardware inverts the
* response (as does XTerm and mlterm): * response (as does XTerm and mlterm):

View file

@ -313,10 +313,10 @@ Foot supports URL detection. But, unlike many other terminal
emulators, where URLs are highlighted when they are hovered and opened emulators, where URLs are highlighted when they are hovered and opened
by clicking on them, foot uses a keyboard driven approach. by clicking on them, foot uses a keyboard driven approach.
Pressing *ctrl*+*shift*+*o* enters _“Open URL mode”_, where all currently Pressing *ctrl*+*shift*+*o* enters _"Open URL mode"_, where all currently
visible URLs are underlined, and is associated with a visible URLs are underlined, and is associated with a
_“jump-label”_. The jump-label indicates the _key sequence_ _"jump-label"_. The jump-label indicates the _key sequence_
(e.g. *”AF”*) to use to activate the URL. (e.g. *"AF"*) to use to activate the URL.
The key binding can, of course, be customized, like all other key The key binding can, of course, be customized, like all other key
bindings in foot. See *show-urls-launch* and *show-urls-copy* in bindings in foot. See *show-urls-launch* and *show-urls-copy* in
@ -398,7 +398,7 @@ For more information, see *foot.ini*(5).
New foot terminal instances (bound to *ctrl*+*shift*+*n* by default) New foot terminal instances (bound to *ctrl*+*shift*+*n* by default)
will open in the current working directory, if the shell in the will open in the current working directory, if the shell in the
“parent” terminal reports directory changes. "parent" terminal reports directory changes.
This is done with the OSC-7 escape sequence. Most shells can be This is done with the OSC-7 escape sequence. Most shells can be
scripted to do this, if they do not support it natively. See the wiki scripted to do this, if they do not support it natively. See the wiki
@ -424,16 +424,16 @@ See the wiki
(https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts) (https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts)
for details, and examples for other shells. for details, and examples for other shells.
## Piping last commands output ## Piping last command's output
The key binding *pipe-command-output* can pipe the last commands The key binding *pipe-command-output* can pipe the last command's
output to an application of your choice (similar to the other output to an application of your choice (similar to the other
*pipe-\** key bindings): *pipe-\** key bindings):
*\[key-bindings\]++ *\[key-bindings\]++
pipe-command-output=[sh -c "f=$(mktemp); cat - > $f; footclient emacsclient -nw $f; rm $f"] Control+Shift+g* pipe-command-output=[sh -c "f=$(mktemp); cat - > $f; footclient emacsclient -nw $f; rm $f"] Control+Shift+g*
When pressing *ctrl*+*shift*+*g*, the last commands output is written When pressing *ctrl*+*shift*+*g*, the last command's output is written
to a temporary file, then an emacsclient is started in a new to a temporary file, then an emacsclient is started in a new
footclient instance. The temporary file is removed after the footclient instance. The temporary file is removed after the
footclient instance has closed. footclient instance has closed.
@ -496,10 +496,10 @@ also implemented (and extended, to some degree) by Kitty.
It allows querying the terminal for terminfo classic, file-based, It allows querying the terminal for terminfo classic, file-based,
terminfo definition. For example, if all applications used this terminfo definition. For example, if all applications used this
feature, you would no longer have to install foots terminfo on remote feature, you would no longer have to install foot's terminfo on remote
hosts you SSH into. hosts you SSH into.
XTerms implementation (as of XTerm-370) only supports querying key XTerm's implementation (as of XTerm-370) only supports querying key
(as in keyboard keys) capabilities, and three custom capabilities: (as in keyboard keys) capabilities, and three custom capabilities:
- TN - terminal name - TN - terminal name
@ -511,7 +511,7 @@ Kitty has extended this, and also supports querying all integer and
string capabilities. string capabilities.
Foot supports this, and extends it even further, to also include Foot supports this, and extends it even further, to also include
boolean capabilities. This means foots entire terminfo can be queried boolean capabilities. This means foot's entire terminfo can be queried
via *XTGETTCAP*. via *XTGETTCAP*.
Note that both Kitty and foot handles responses to multi-capability Note that both Kitty and foot handles responses to multi-capability
@ -522,7 +522,7 @@ capability/value pairs. There are a couple of issues with this:
- The success/fail flag in the beginning of the response is always 1 - The success/fail flag in the beginning of the response is always 1
(success), unless the very first queried capability is invalid. (success), unless the very first queried capability is invalid.
- XTerm will not respond at all to an invalid capability, unless its - XTerm will not respond at all to an invalid capability, unless it's
the first one in the XTGETTCAP query. the first one in the XTGETTCAP query.
- XTerm will end the response at the first invalid capability. - XTerm will end the response at the first invalid capability.

32
grid.c
View file

@ -17,7 +17,7 @@
#define TIME_REFLOW 0 #define TIME_REFLOW 0
/* /*
* sb (scrollback relative) coordinates * "sb" (scrollback relative) coordinates
* *
* The scrollback relative row number 0 is the *first*, and *oldest* * The scrollback relative row number 0 is the *first*, and *oldest*
* row in the scrollback history (and thus the *first* row to be * row in the scrollback history (and thus the *first* row to be
@ -606,7 +606,7 @@ _line_wrap(struct grid *old_grid, struct row **new_grid, struct row *row,
/* /*
* TODO: detect if the reused row is covered by the * TODO: detect if the reused row is covered by the
* selection. Of so, cancel the selection. The problem: we * selection. Of so, cancel the selection. The problem: we
* dont know if weve translated the selection coordinates * don't know if we've translated the selection coordinates
* yet. * yet.
*/ */
} }
@ -616,7 +616,7 @@ _line_wrap(struct grid *old_grid, struct row **new_grid, struct row *row,
return new_row; return new_row;
/* /*
* URI ranges are per row. Thus, we need to close the still-open * URI ranges are per row. Thus, we need to 'close' the still-open
* ranges on the previous row, and re-open them on the * ranges on the previous row, and re-open them on the
* next/current row. * next/current row.
*/ */
@ -796,7 +796,7 @@ grid_resize_and_reflow(
} }
if (!old_row->linebreak && col_count > 0) { if (!old_row->linebreak && col_count > 0) {
/* Dont truncate logical lines */ /* Don't truncate logical lines */
col_count = old_cols; col_count = old_cols;
} }
@ -885,8 +885,8 @@ grid_resize_and_reflow(
xassert(amount > 0); xassert(amount > 0);
/* /*
* If were going to reach the end of the new row, we * If we're going to reach the end of the new row, we
* need to make sure we dont end in the middle of a * need to make sure we don't end in the middle of a
* multi-column character. * multi-column character.
*/ */
int spacers = 0; int spacers = 0;
@ -895,7 +895,7 @@ grid_resize_and_reflow(
* While the cell *after* the last cell is a CELL_SPACER * While the cell *after* the last cell is a CELL_SPACER
* *
* This means we have a multi-column character * This means we have a multi-column character
* that doesnt fit on the current row. We need to * that doesn't fit on the current row. We need to
* push it to the next row, and insert CELL_SPACER * push it to the next row, and insert CELL_SPACER
* cells as padding. * cells as padding.
*/ */
@ -1004,9 +1004,9 @@ grid_resize_and_reflow(
{ {
/* /*
* line_wrap() "closes" still-open URIs. Since this is * line_wrap() "closes" still-open URIs. Since this is
* the *last* row, and since were line-breaking due * the *last* row, and since we're line-breaking due
* to a hard line-break (rather than running out of * to a hard line-break (rather than running out of
* cells in the "new_row"), there shouldnt be an open * cells in the "new_row"), there shouldn't be an open
* URI (it would have been closed when we reached the * URI (it would have been closed when we reached the
* end of the URI while reflowing the last "old" * end of the URI while reflowing the last "old"
* row). * row).
@ -1033,7 +1033,7 @@ grid_resize_and_reflow(
xassert(old_rows == 0 || *next_tp == &terminator); xassert(old_rows == 0 || *next_tp == &terminator);
#if defined(_DEBUG) #if defined(_DEBUG)
/* Verify all URI ranges have been “closed” */ /* Verify all URI ranges have been "closed" */
for (int r = 0; r < new_rows; r++) { for (int r = 0; r < new_rows; r++) {
const struct row *row = new_grid[r]; const struct row *row = new_grid[r];
@ -1077,7 +1077,7 @@ grid_resize_and_reflow(
grid->num_cols = new_cols; grid->num_cols = new_cols;
/* /*
* Set new viewport, making sure its not too far down. * Set new viewport, making sure it's not too far down.
* *
* This is done by using scrollback-start relative cooardinates, * This is done by using scrollback-start relative cooardinates,
* and bounding the new viewport to (grid_rows - screen_rows). * and bounding the new viewport to (grid_rows - screen_rows).
@ -1143,7 +1143,7 @@ grid_row_uri_range_put(struct row *row, int col, const char *uri, uint64_t id)
const bool matching_id = r->id == id; const bool matching_id = r->id == id;
if (matching_id && r->end + 1 == col) { if (matching_id && r->end + 1 == col) {
/* Extend existing URIs tail */ /* Extend existing URI's tail */
r->end++; r->end++;
goto out; goto out;
} }
@ -1182,7 +1182,7 @@ grid_row_uri_range_put(struct row *row, int col, const char *uri, uint64_t id)
uri_range_insert(extra, i + 1, col + 1, r->end, r->id, r->uri); uri_range_insert(extra, i + 1, col + 1, r->end, r->id, r->uri);
/* The insertion may xrealloc() the vector, making our /* The insertion may xrealloc() the vector, making our
* old pointer invalid */ * 'old' pointer invalid */
r = &extra->uri_ranges.v[i]; r = &extra->uri_ranges.v[i];
r->end = col - 1; r->end = col - 1;
xassert(r->start <= r->end); xassert(r->start <= r->end);
@ -1319,7 +1319,7 @@ grid_row_uri_range_erase(struct row *row, int start, int end)
extra, i + 1, end + 1, old->end, old->id, old->uri); extra, i + 1, end + 1, old->end, old->id, old->uri);
/* The insertion may xrealloc() the vector, making our /* The insertion may xrealloc() the vector, making our
* old pointer invalid */ * 'old' pointer invalid */
old = &extra->uri_ranges.v[i]; old = &extra->uri_ranges.v[i];
old->end = start - 1; old->end = start - 1;
return; /* There can be no more URIs affected by the erase range */ return; /* There can be no more URIs affected by the erase range */
@ -1402,11 +1402,11 @@ UNITTEST
* The insertion logic typically triggers an xrealloc(), which, in * The insertion logic typically triggers an xrealloc(), which, in
* some cases, *moves* the entire URI vector to a new base * some cases, *moves* the entire URI vector to a new base
* address. grid_row_uri_range_erase() did not account for this, * address. grid_row_uri_range_erase() did not account for this,
* and tried to update the end member in the URI range we just * and tried to update the 'end' member in the URI range we just
* split. This causes foot to crash when the xrealloc() has moved * split. This causes foot to crash when the xrealloc() has moved
* the URI range vector. * the URI range vector.
* *
* (note: were only verifying we dont crash here, hence the lack * (note: we're only verifying we don't crash here, hence the lack
* of assertions). * of assertions).
*/ */
free(row_data.uri_ranges.v); free(row_data.uri_ranges.v);

62
input.c
View file

@ -416,7 +416,7 @@ execute_binding(struct seat *seat, struct terminal *term,
if (!row->shell_integration.prompt_marker) { if (!row->shell_integration.prompt_marker) {
if (r_abs == grid->offset + term->rows - 1) { if (r_abs == grid->offset + term->rows - 1) {
/* Weve reached the bottom of the scrollback */ /* We've reached the bottom of the scrollback */
break; break;
} }
continue; continue;
@ -979,19 +979,19 @@ legacy_kbd_protocol(struct seat *seat, struct terminal *term,
if (term->modify_other_keys_2) { if (term->modify_other_keys_2) {
/* /*
* Try to mimic XTerms behavior, when holding shift: * Try to mimic XTerm's behavior, when holding shift:
* *
* - if other modifiers are pressed (e.g. Alt), emit a CSI escape * - if other modifiers are pressed (e.g. Alt), emit a CSI escape
* - upper-case symbols A-Z are encoded as an CSI escape * - upper-case symbols A-Z are encoded as an CSI escape
* - other upper-case symbols (e.g Ö) or emitted as is * - other upper-case symbols (e.g 'Ö') or emitted as is
* - non-upper cased symbols are _mostly_ emitted as is (foot * - non-upper cased symbols are _mostly_ emitted as is (foot
* always emits as is) * always emits as is)
* *
* Examples (assuming Swedish layout): * Examples (assuming Swedish layout):
* - Shift-a (A) emits a CSI * - Shift-a ('A') emits a CSI
* - Shift-, (;) emits ; * - Shift-, (';') emits ';'
* - Shift-Alt-, (Alt-;) emits a CSI * - Shift-Alt-, (Alt-;) emits a CSI
* - Shift-ö (Ö) emits Ö * - Shift-ö ('Ö') emits 'Ö'
*/ */
/* Any modifiers, besides shift active? */ /* Any modifiers, besides shift active? */
@ -1004,9 +1004,9 @@ legacy_kbd_protocol(struct seat *seat, struct terminal *term,
seat->kbd.xkb_state, ctx->key); seat->kbd.xkb_state, ctx->key);
/* /*
* Get pressed keys base symbol. * Get pressed key's base symbol.
* - for A (shift-a), thats a * - for 'A' (shift-a), that's 'a'
* - for ; (shift-,), thats , * - for ';' (shift-,), that's ','
*/ */
const xkb_keysym_t *base_syms = NULL; const xkb_keysym_t *base_syms = NULL;
size_t base_count = xkb_keymap_key_get_syms_by_level( size_t base_count = xkb_keymap_key_get_syms_by_level(
@ -1142,7 +1142,7 @@ kitty_kbd_protocol(struct seat *seat, struct terminal *term,
if (composed && released) if (composed && released)
return false; return false;
/* TODO: should we even bother with this, or just say its not supported? */ /* TODO: should we even bother with this, or just say it's not supported? */
if (!disambiguate && !report_all_as_escapes && pressed) if (!disambiguate && !report_all_as_escapes && pressed)
return legacy_kbd_protocol(seat, term, ctx); return legacy_kbd_protocol(seat, term, ctx);
@ -1287,32 +1287,32 @@ emit_escapes:
* *
* If the keysym is shifted, use its unshifted codepoint * If the keysym is shifted, use its unshifted codepoint
* instead. In other words, ctrl+a and ctrl+shift+a should * instead. In other words, ctrl+a and ctrl+shift+a should
* both use the same value for key (97 - i.a. a). * both use the same value for 'key' (97 - i.a. 'a').
* *
* However, dont do this if a non-significant modifier was * However, don't do this if a non-significant modifier was
* used to generate the symbol. This is needed since we cannot * used to generate the symbol. This is needed since we cannot
* encode non-significant modifiers, and thus the extra * encode non-significant modifiers, and thus the "extra"
* modifier(s) would get lost. * modifier(s) would get lost.
* *
* Example: * Example:
* *
* the Swedish layout has 2, QUOTATION MARK (double * the Swedish layout has '2', QUOTATION MARK ("double
* quote), @, and ² on the same key. 2 is the base * quote"), '@', and '²' on the same key. '2' is the base
* symbol. * symbol.
* *
* Shift+2 results in QUOTATION MARK * Shift+2 results in QUOTATION MARK
* AltGr+2 results in @ * AltGr+2 results in '@'
* AltGr+Shift+2 results in ² * AltGr+Shift+2 results in '²'
* *
* The kitty kbd protocol cant encode AltGr. So, if we * The kitty kbd protocol can't encode AltGr. So, if we
* always used the base symbol (2), Alt+Shift+2 would * always used the base symbol ('2'), Alt+Shift+2 would
* result in the same escape sequence as * result in the same escape sequence as
* AltGr+Alt+Shift+2. * AltGr+Alt+Shift+2.
* *
* (yes, this matches what kitty does, as of 0.23.1) * (yes, this matches what kitty does, as of 0.23.1)
*/ */
/* Get the keys shift level */ /* Get the key's shift level */
xkb_level_index_t lvl = xkb_state_key_get_level( xkb_level_index_t lvl = xkb_state_key_get_level(
seat->kbd.xkb_state, ctx->key, ctx->layout); seat->kbd.xkb_state, ctx->key, ctx->layout);
@ -1324,7 +1324,7 @@ emit_escapes:
masks, ALEN(masks)); masks, ALEN(masks));
/* Check modifier combinations - if a combination has /* Check modifier combinations - if a combination has
* modifiers not in our set of significant modifiers, * modifiers not in our set of 'significant' modifiers,
* use key sym as-is */ * use key sym as-is */
bool use_level0_sym = true; bool use_level0_sym = true;
for (size_t i = 0; i < mask_count; i++) { for (size_t i = 0; i < mask_count; i++) {
@ -1371,7 +1371,7 @@ emit_escapes:
char event[4]; char event[4];
if (report_events /*&& !pressed*/) { if (report_events /*&& !pressed*/) {
/* Note: this deviates slightly from Kitty, which omits the /* Note: this deviates slightly from Kitty, which omits the
* :1 subparameter for key press events */ * ":1" subparameter for key press events */
event[0] = ':'; event[0] = ':';
event[1] = '0' + (pressed ? 1 : repeating ? 2 : 3); event[1] = '0' + (pressed ? 1 : repeating ? 2 : 3);
event[2] = '\0'; event[2] = '\0';
@ -2032,7 +2032,7 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
* event with a NULL surface - see wl_pointer_enter(). * event with a NULL surface - see wl_pointer_enter().
* *
* In this case, we never set seat->mouse_focus (since we * In this case, we never set seat->mouse_focus (since we
* cant map the enter event to a specific window). */ * can't map the enter event to a specific window). */
return; return;
} }
@ -2141,7 +2141,7 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
if (cursor_is_on_new_cell) { if (cursor_is_on_new_cell) {
/* Prevent multiple/different mouse bindings from /* Prevent multiple/different mouse bindings from
* triggering if the mouse has moved too much (to * triggering if the mouse has moved "too much" (to
* another cell) */ * another cell) */
seat->mouse.count = 0; seat->mouse.count = 0;
} }
@ -2161,14 +2161,14 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
if (!term->is_searching) { if (!term->is_searching) {
if (auto_scroll_direction != SELECTION_SCROLL_NOT) { if (auto_scroll_direction != SELECTION_SCROLL_NOT) {
/* /*
* Start selection auto-scrolling * Start 'selection auto-scrolling'
* *
* The speed of the scrolling is proportional to the * The speed of the scrolling is proportional to the
* distance between the mouse and the grid; the * distance between the mouse and the grid; the
* further away the mouse is, the faster we scroll. * further away the mouse is, the faster we scroll.
* *
* Note that the speed is measured in intervals (in * Note that the speed is measured in 'intervals (in
* ns) between each timed scroll of a single line. * ns) between each timed scroll of a single line'.
* *
* Thus, the further away the mouse is, the smaller * Thus, the further away the mouse is, the smaller
* interval value we use. * interval value we use.
@ -2375,7 +2375,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
* clicking twice, waiting for the CSD timer, and finally * clicking twice, waiting for the CSD timer, and finally
* clicking once more, results in the following sequence * clicking once more, results in the following sequence
* (keyboard and other irrelevant events filtered out, unless * (keyboard and other irrelevant events filtered out, unless
* theyre needed to prove a point): * they're needed to prove a point):
* *
* dbg: input.c:1551: cancelling drag timer, moving window * dbg: input.c:1551: cancelling drag timer, moving window
* dbg: input.c:759: keyboard_leave: keyboard=0x607000003580, serial=873, surface=0x6070000036d0 * dbg: input.c:759: keyboard_leave: keyboard=0x607000003580, serial=873, surface=0x6070000036d0
@ -2407,12 +2407,12 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
* - GNOME does *not* send a pointer *enter* event after the drag * - GNOME does *not* send a pointer *enter* event after the drag
* has stopped * has stopped
* - The second drag does *not* generate a pointer *leave* event * - The second drag does *not* generate a pointer *leave* event
* - The missing leave event means were still tracking LMB as * - The missing leave event means we're still tracking LMB as
* being held down in our seat struct. * being held down in our seat struct.
* - This leads to an assert (debug builds) when LMB is clicked * - This leads to an assert (debug builds) when LMB is clicked
* again (seats button list already contains LMB). * again (seat's button list already contains LMB).
* *
* Note: Ive also observed variants of the above * Note: I've also observed variants of the above
*/ */
tll_foreach(seat->mouse.buttons, it) { tll_foreach(seat->mouse.buttons, it) {
if (it->item.button == button) { if (it->item.button == button) {

View file

@ -11,12 +11,12 @@
* Custom defines for mouse wheel left/right buttons. * Custom defines for mouse wheel left/right buttons.
* *
* Libinput does not define these. On Wayland, all scroll events (both * Libinput does not define these. On Wayland, all scroll events (both
* vertical and horizontal) are reported not as buttons, as axis * vertical and horizontal) are reported not as buttons, as 'axis'
* events. * events.
* *
* Libinput _does_ define BTN_BACK and BTN_FORWARD, which is * Libinput _does_ define BTN_BACK and BTN_FORWARD, which is
* what we use for vertical scroll events. But for horizontal scroll * what we use for vertical scroll events. But for horizontal scroll
* events, there arent any pre-defined mouse buttons. * events, there aren't any pre-defined mouse buttons.
* *
* Mouse buttons are in the range 0x110 - 0x11f, with joystick defines * Mouse buttons are in the range 0x110 - 0x11f, with joystick defines
* starting at 0x120. * starting at 0x120.

View file

@ -243,27 +243,27 @@ maybe_repair_key_combo(const struct seat *seat,
* modifier, and replace the shifted symbol with its unshifted * modifier, and replace the shifted symbol with its unshifted
* variant. * variant.
* *
* For example, the combo is Control+Shift+U. In this case, * For example, the combo is "Control+Shift+U". In this case,
* Shift is the modifier used to shift u to U, after which * Shift is the modifier used to "shift" 'u' to 'U', after which
* Shift will have been consumed. Since we filter out consumed * 'Shift' will have been "consumed". Since we filter out consumed
* modifiers when matching key combos, this key combo will never * modifiers when matching key combos, this key combo will never
* trigger (we will never be able to match the Shift modifier). * trigger (we will never be able to match the 'Shift' modifier).
* *
* There are two correct variants of the above key combo: * There are two correct variants of the above key combo:
* - Control+U (upper case U) * - "Control+U" (upper case 'U')
* - Control+Shift+u (lower case u) * - "Control+Shift+u" (lower case 'u')
* *
* What we do here is, for each key *code*, check if there are any * What we do here is, for each key *code*, check if there are any
* (shifted) levels where it produces sym. If there are, check * (shifted) levels where it produces 'sym'. If there are, check
* *which* sets of modifiers are needed to produce it, and compare * *which* sets of modifiers are needed to produce it, and compare
* with mods. * with 'mods'.
* *
* If there is at least one common modifier, it means sym is a * If there is at least one common modifier, it means 'sym' is a
* shifted symbol, with the corresponding shifting modifier * "shifted" symbol, with the corresponding shifting modifier
* explicitly included in the key combo. I.e. the key combo will * explicitly included in the key combo. I.e. the key combo will
* never trigger. * never trigger.
* *
* We then proceed and repair the key combo by replacing sym * We then proceed and "repair" the key combo by replacing 'sym'
* with the corresponding unshifted symbol. * with the corresponding unshifted symbol.
* *
* To reduce the noise, we ignore all key codes where the shifted * To reduce the noise, we ignore all key codes where the shifted
@ -283,7 +283,7 @@ maybe_repair_key_combo(const struct seat *seat,
seat->kbd.xkb_keymap, code, layout_idx, 0, &base_syms); seat->kbd.xkb_keymap, code, layout_idx, 0, &base_syms);
if (base_count == 0 || sym == base_syms[0]) { if (base_count == 0 || sym == base_syms[0]) {
/* No unshifted symbols, or unshifted symbol is same as sym */ /* No unshifted symbols, or unshifted symbol is same as 'sym' */
continue; continue;
} }
@ -313,7 +313,7 @@ maybe_repair_key_combo(const struct seat *seat,
seat->kbd.xkb_keymap, code, layout_idx, level_idx, seat->kbd.xkb_keymap, code, layout_idx, level_idx,
mod_masks, ALEN(mod_masks)); mod_masks, ALEN(mod_masks));
/* Check if key combos modifier set intersects */ /* Check if key combo's modifier set intersects */
for (size_t j = 0; j < mod_mask_count; j++) { for (size_t j = 0; j < mod_mask_count; j++) {
if ((mod_masks[j] & mods) != mod_masks[j]) if ((mod_masks[j] & mods) != mod_masks[j])
continue; continue;
@ -359,19 +359,19 @@ key_cmp(struct key_binding a, struct key_binding b)
* Sort bindings such that bindings with the same symbol are * Sort bindings such that bindings with the same symbol are
* sorted with the binding having the most modifiers comes first. * sorted with the binding having the most modifiers comes first.
* *
* This fixes an issue where the wrong key binding are triggered * This fixes an issue where the "wrong" key binding are triggered
* when used with consumed modifiers. * when used with "consumed" modifiers.
* *
* For example: if Control+BackSpace is bound before * For example: if Control+BackSpace is bound before
* Control+Shift+BackSpace, then the latter binding is never * Control+Shift+BackSpace, then the latter binding is never
* triggered. * triggered.
* *
* Why? Because Shift is a consumed modifier. This means * Why? Because Shift is a consumed modifier. This means
* Control+BackSpace is the same as Control+Shift+BackSpace. * Control+BackSpace is "the same" as Control+Shift+BackSpace.
* *
* By sorting bindings with more modifiers first, we work around * By sorting bindings with more modifiers first, we work around
* the problem. But note that it is *just* a workaround, and Im * the problem. But note that it is *just* a workaround, and I'm
* not confident there arent cases where it doesnt work. * not confident there aren't cases where it doesn't work.
* *
* See https://codeberg.org/dnkl/foot/issues/1280 * See https://codeberg.org/dnkl/foot/issues/1280
*/ */

View file

@ -13,7 +13,7 @@ struct kitty_key_data {
_Static_assert(sizeof(struct kitty_key_data) == 7, "bad size"); _Static_assert(sizeof(struct kitty_key_data) == 7, "bad size");
/* Note! *Must* Be kept sorted (on sym) */ /* Note! *Must* Be kept sorted (on 'sym') */
static const struct kitty_key_data kitty_keymap[] = { static const struct kitty_key_data kitty_keymap[] = {
{XKB_KEY_ISO_Level3_Shift, 57453, 'u', true}, {XKB_KEY_ISO_Level3_Shift, 57453, 'u', true},
{XKB_KEY_ISO_Level5_Shift, 57454, 'u', true}, {XKB_KEY_ISO_Level5_Shift, 57454, 'u', true},

2
main.c
View file

@ -427,7 +427,7 @@ main(int argc, char *const *argv)
/* /*
* Try to force an UTF-8 locale. If we succeed, launch the * Try to force an UTF-8 locale. If we succeed, launch the
* users shell as usual, but add a user-notification saying * user's shell as usual, but add a user-notification saying
* the locale has been changed. * the locale has been changed.
*/ */
for (size_t i = 0; i < ALEN(fallback_locales); i++) { for (size_t i = 0; i < ALEN(fallback_locales); i++) {

View file

@ -20,7 +20,7 @@ notify_notify(const struct terminal *term, const char *title, const char *body)
LOG_DBG("notify: title=\"%s\", msg=\"%s\"", title, body); LOG_DBG("notify: title=\"%s\", msg=\"%s\"", title, body);
if (term->conf->notify_focus_inhibit && term->kbd_focus) { if (term->conf->notify_focus_inhibit && term->kbd_focus) {
/* No notifications while were focused */ /* No notifications while we're focused */
return; return;
} }

6
osc.c
View file

@ -353,7 +353,7 @@ parse_rgb(const char *string, uint32_t *color, bool *_have_alpha,
return false; return false;
} }
/* Verify prefix is “rgb:” or “rgba:” */ /* Verify prefix is "rgb:" or "rgba:" */
if (have_alpha) { if (have_alpha) {
if (strncmp(string, "rgba:", 5) != 0) if (strncmp(string, "rgba:", 5) != 0)
return false; return false;
@ -443,9 +443,9 @@ osc_uri(struct terminal *term, char *string)
/* /*
* \E]8;<params>;URI\e\\ * \E]8;<params>;URI\e\\
* *
* Params are key=value pairs, separated by :. * Params are key=value pairs, separated by ':'.
* *
* The only defined key (as of 2020-05-31) is id, which is used * The only defined key (as of 2020-05-31) is 'id', which is used
* to group split-up URIs: * to group split-up URIs:
* *
* file1 * file1

View file

@ -10,5 +10,5 @@ trap "rm -rf '${runtime_dir}'" EXIT INT HUP TERM
XDG_RUNTIME_DIR="${runtime_dir}" WLR_RENDERER=pixman WLR_BACKENDS=headless cage "${srcdir}"/pgo/full-inner.sh "${srcdir}" "${blddir}" XDG_RUNTIME_DIR="${runtime_dir}" WLR_RENDERER=pixman WLR_BACKENDS=headless cage "${srcdir}"/pgo/full-inner.sh "${srcdir}" "${blddir}"
# Cages exit code doesnt reflect our scripts exit code # Cage's exit code doesn't reflect our script's exit code
[ -f "${blddir}"/pgo-ok ] || exit 1 [ -f "${blddir}"/pgo-ok ] || exit 1

View file

@ -17,8 +17,8 @@ trap cleanup EXIT INT HUP TERM
# Generate a custom config that executes our generate-pgo-data script # Generate a custom config that executes our generate-pgo-data script
> "${sway_conf}" echo "exec '${srcdir}'/pgo/full-headless-sway-inner.sh '${srcdir}' '${blddir}'" > "${sway_conf}" echo "exec '${srcdir}'/pgo/full-headless-sway-inner.sh '${srcdir}' '${blddir}'"
# Run Sway. full-headless-sway-inner.sh ends with a swaymsg exit # Run Sway. full-headless-sway-inner.sh ends with a 'swaymsg exit'
XDG_RUNTIME_DIR="${runtime_dir}" WLR_RENDERER=pixman WLR_BACKENDS=headless sway -c "${sway_conf}" XDG_RUNTIME_DIR="${runtime_dir}" WLR_RENDERER=pixman WLR_BACKENDS=headless sway -c "${sway_conf}"
# Sways exit code doesnt reflect our scripts exit code # Sway's exit code doesn't reflect our script's exit code
[ -f "${blddir}"/pgo-ok ] || exit 1 [ -f "${blddir}"/pgo-ok ] || exit 1

View file

@ -98,8 +98,8 @@ if [ ${do_pgo} = yes ]; then
ninja -C "${blddir}" ninja -C "${blddir}"
# If fcft/tllist are subprojects, we need to ensure their tests # If fcft/tllist are subprojects, we need to ensure their tests
# have been executed, or well get “profile count data file not # have been executed, or we'll get "profile count data file not
# found errors. # found" errors.
ninja -C "${blddir}" test ninja -C "${blddir}" test
# Run mode-dependent script to generate profiling data # Run mode-dependent script to generate profiling data

106
render.c
View file

@ -269,12 +269,12 @@ color_dim(const struct terminal *term, uint32_t color)
continue; continue;
if (term->colors.table[0 + i] == color) { if (term->colors.table[0 + i] == color) {
/* “Regular” color, return the corresponding “dim” */ /* "Regular" color, return the corresponding "dim" */
return conf->colors.dim[i]; return conf->colors.dim[i];
} }
else if (term->colors.table[8 + i] == color) { else if (term->colors.table[8 + i] == color) {
/* “Bright” color, return the corresponding “regular” */ /* "Bright" color, return the corresponding "regular" */
return term->colors.table[i]; return term->colors.table[i];
} }
} }
@ -1073,7 +1073,7 @@ grid_render_scroll(struct terminal *term, struct buffer *buf,
/* /*
* TODO: remove this if re-enabling scroll damage when re-applying * TODO: remove this if re-enabling scroll damage when re-applying
* last frames damage (see reapply_old_damage() * last frame's damage (see reapply_old_damage()
*/ */
pixman_region32_union_rect( pixman_region32_union_rect(
&buf->dirty[0], &buf->dirty[0], 0, dst_y, buf->width, height); &buf->dirty[0], &buf->dirty[0], 0, dst_y, buf->width, height);
@ -1150,7 +1150,7 @@ grid_render_scroll_reverse(struct terminal *term, struct buffer *buf,
/* /*
* TODO: remove this if re-enabling scroll damage when re-applying * TODO: remove this if re-enabling scroll damage when re-applying
* last frames damage (see reapply_old_damage() * last frame's damage (see reapply_old_damage()
*/ */
pixman_region32_union_rect( pixman_region32_union_rect(
&buf->dirty[0], &buf->dirty[0], 0, dst_y, buf->width, height); &buf->dirty[0], &buf->dirty[0], 0, dst_y, buf->width, height);
@ -1288,7 +1288,7 @@ render_sixel(struct terminal *term, pixman_image_t *pix,
* If the last sixel row only partially covers the cell row, * If the last sixel row only partially covers the cell row,
* 'erase' the cell by rendering them. * 'erase' the cell by rendering them.
* *
* In all cases, do *not* clear the dirty bit on the row, to * In all cases, do *not* clear the 'dirty' bit on the row, to
* ensure the regular renderer includes them in the damage * ensure the regular renderer includes them in the damage
* rect. * rect.
*/ */
@ -1403,8 +1403,8 @@ render_ime_preedit_for_seat(struct terminal *term, struct seat *seat,
{ {
/* Cursor will be drawn *after* the pre-edit string, i.e. in /* Cursor will be drawn *after* the pre-edit string, i.e. in
* the cell *after*. This means we need to copy, and dirty, * the cell *after*. This means we need to copy, and dirty,
* one extra cell from the original grid, or well leave * one extra cell from the original grid, or we'll leave
* trailing cursors after us if the user deletes text while * trailing "cursors" after us if the user deletes text while
* pre-editing */ * pre-editing */
cells_needed++; cells_needed++;
} }
@ -1613,23 +1613,23 @@ render_overlay(struct terminal *term)
* When possible, we only update the areas that have *changed* * When possible, we only update the areas that have *changed*
* since the last frame. That means: * since the last frame. That means:
* *
* - clearing/erasing cells that are now selected, but werent * - clearing/erasing cells that are now selected, but weren't
* in the last frame * in the last frame
* - dimming cells that were selected, but arent anymore * - dimming cells that were selected, but aren't anymore
* *
* To do this, we save the last frames selected cells as a * To do this, we save the last frame's selected cells as a
* pixman region. * pixman region.
* *
* Then, we calculate the corresponding region for this * Then, we calculate the corresponding region for this
* frames selected cells. * frame's selected cells.
* *
* Last frames region minus this frames region gives us the * Last frame's region minus this frame's region gives us the
* region that needs to be *dimmed* in this frame * region that needs to be *dimmed* in this frame
* *
* This frames region minus last frames region gives us the * This frame's region minus last frame's region gives us the
* region that needs to be *cleared* in this frame. * region that needs to be *cleared* in this frame.
* *
* Finally, the union of the two diff regions above, gives * Finally, the union of the two "diff" regions above, gives
* us the total region affected by a change, in either way. We * us the total region affected by a change, in either way. We
* use this as the bounding box for the * use this as the bounding box for the
* wl_surface_damage_buffer() call. * wl_surface_damage_buffer() call.
@ -1642,12 +1642,12 @@ render_overlay(struct terminal *term)
buf->age == 0; buf->age == 0;
if (!buffer_reuse) { if (!buffer_reuse) {
/* Cant reuse last frames damage - set to full window, /* Can't reuse last frame's damage - set to full window,
* to ensure *everything* is updated */ * to ensure *everything* is updated */
pixman_region32_init_rect( pixman_region32_init_rect(
&old_see_through, 0, 0, buf->width, buf->height); &old_see_through, 0, 0, buf->width, buf->height);
} else { } else {
/* Use last frames saved region */ /* Use last frame's saved region */
pixman_region32_init(&old_see_through); pixman_region32_init(&old_see_through);
pixman_region32_copy(&old_see_through, see_through); pixman_region32_copy(&old_see_through, see_through);
} }
@ -2072,7 +2072,7 @@ render_csd_border(struct terminal *term, enum csd_surface surf_idx,
} }
/* /*
* The visible border. * The "visible" border.
*/ */
float scale = term->scale; float scale = term->scale;
@ -2692,21 +2692,21 @@ reapply_old_damage(struct terminal *term, struct buffer *new, struct buffer *old
pixman_region32_init(&dirty); pixman_region32_init(&dirty);
/* /*
* Figure out current frames damage region * Figure out current frame's damage region
* *
* If current frame doesnt have any scroll damage, we can simply * If current frame doesn't have any scroll damage, we can simply
* subtract this frames damage from the last frames damage. That * subtract this frame's damage from the last frame's damage. That
* way, we dont have to copy areas from the old frame thatll * way, we don't have to copy areas from the old frame that'll
* just get overwritten by current frame. * just get overwritten by current frame.
* *
* Note that this is row based. A half damaged row is not * Note that this is row based. A "half damaged" row is not
* excluded. I.e. the entire row will be copied from the old frame * excluded. I.e. the entire row will be copied from the old frame
* to the new, and then when actually rendering the new frame, the * to the new, and then when actually rendering the new frame, the
* updated cells will overwrite parts of the copied row. * updated cells will overwrite parts of the copied row.
* *
* Since were scanning the entire viewport anyway, we also track * Since we're scanning the entire viewport anyway, we also track
* whether *all* cells are to be updated. In this case, just force * whether *all* cells are to be updated. In this case, just force
* a full re-rendering, and dont copy anything from the old * a full re-rendering, and don't copy anything from the old
* frame. * frame.
*/ */
bool full_repaint_needed = true; bool full_repaint_needed = true;
@ -2739,28 +2739,28 @@ reapply_old_damage(struct terminal *term, struct buffer *new, struct buffer *old
} }
/* /*
* TODO: re-apply last frames scroll damage * TODO: re-apply last frame's scroll damage
* *
* We used to do this, but it turned out to be buggy. If we decide * We used to do this, but it turned out to be buggy. If we decide
* to re-add it, this is where to do it. Note that wed also have * to re-add it, this is where to do it. Note that we'd also have
* to remove the updates to buf->dirty from grid_render_scroll() * to remove the updates to buf->dirty from grid_render_scroll()
* and grid_render_scroll_reverse(). * and grid_render_scroll_reverse().
*/ */
if (tll_length(term->grid->scroll_damage) == 0) { if (tll_length(term->grid->scroll_damage) == 0) {
/* /*
* We can only subtract current frames damage from the old * We can only subtract current frame's damage from the old
* frames if we dont have any scroll damage. * frame's if we don't have any scroll damage.
* *
* If we do have scroll damage, the damage region we * If we do have scroll damage, the damage region we
* calculated above is not (yet) valid - we need to apply the * calculated above is not (yet) valid - we need to apply the
* current frames scroll damage *first*. This is done later, * current frame's scroll damage *first*. This is done later,
* when rendering the frame. * when rendering the frame.
*/ */
pixman_region32_subtract(&dirty, &old->dirty[0], &dirty); pixman_region32_subtract(&dirty, &old->dirty[0], &dirty);
pixman_image_set_clip_region32(new->pix[0], &dirty); pixman_image_set_clip_region32(new->pix[0], &dirty);
} else { } else {
/* Copy *all* of last frames damaged areas */ /* Copy *all* of last frame's damaged areas */
pixman_image_set_clip_region32(new->pix[0], &old->dirty[0]); pixman_image_set_clip_region32(new->pix[0], &old->dirty[0]);
} }
@ -2819,7 +2819,7 @@ grid_render(struct terminal *term)
struct buffer_chain *chain = term->render.chains.grid; struct buffer_chain *chain = term->render.chains.grid;
struct buffer *buf = shm_get_buffer(chain, term->width, term->height); struct buffer *buf = shm_get_buffer(chain, term->width, term->height);
/* Dirty old and current cursor cell, to ensure theyre repainted */ /* Dirty old and current cursor cell, to ensure they're repainted */
dirty_old_cursor(term); dirty_old_cursor(term);
dirty_cursor(term); dirty_cursor(term);
@ -2938,11 +2938,11 @@ grid_render(struct terminal *term)
* they are overflowing. * they are overflowing.
* *
* As soon as we see a non-overflowing cell we can * As soon as we see a non-overflowing cell we can
* stop, since it isnt affecting the string of * stop, since it isn't affecting the string of
* overflowing glyphs that follows it. * overflowing glyphs that follows it.
* *
* As soon as we see a dirty cell, we can stop, since * As soon as we see a dirty cell, we can stop, since
* that means weve already handled it (remember the * that means we've already handled it (remember the
* outer loop goes from left to right). * outer loop goes from left to right).
*/ */
for (struct cell *c = cell - 1; c >= &row->cells[0]; c--) { for (struct cell *c = cell - 1; c >= &row->cells[0]; c--) {
@ -2960,9 +2960,9 @@ grid_render(struct terminal *term)
* Note that the first non-overflowing cell must be * Note that the first non-overflowing cell must be
* re-rendered as well, but any cell *after* that is * re-rendered as well, but any cell *after* that is
* unaffected by the string of overflowing glyphs * unaffected by the string of overflowing glyphs
* were dealing with right now. * we're dealing with right now.
* *
* For performance, this iterates the *outer* loops * For performance, this iterates the *outer* loop's
* cell pointer - no point in re-checking all these * cell pointer - no point in re-checking all these
* glyphs again, in the outer loop. * glyphs again, in the outer loop.
*/ */
@ -3137,9 +3137,9 @@ render_search_box(struct terminal *term)
/* /*
* We treat the search box pretty much like a row of cells. That * We treat the search box pretty much like a row of cells. That
* is, a glyph is either 1 or 2 (or more) cells wide. * is, a glyph is either 1 or 2 (or more) "cells" wide.
* *
* The search length, and cursor (position) is in * The search 'length', and 'cursor' (position) is in
* *characters*, not cells. This means we need to translate from * *characters*, not cells. This means we need to translate from
* character count to cell count when calculating the length of * character count to cell count when calculating the length of
* the search box, where in the search string we should start * the search box, where in the search string we should start
@ -3307,7 +3307,7 @@ render_search_box(struct terminal *term)
} }
/* /*
* Render the search string, starting at glyph_offset. Note that * Render the search string, starting at 'glyph_offset'. Note that
* glyph_offset is in cells, not characters * glyph_offset is in cells, not characters
*/ */
for (size_t i = 0, for (size_t i = 0,
@ -3580,7 +3580,7 @@ render_urls(struct terminal *term)
int x = col * term->cell_width - 15 * term->cell_width / 10; int x = col * term->cell_width - 15 * term->cell_width / 10;
int y = row * term->cell_height - 5 * term->cell_height / 10; int y = row * term->cell_height - 5 * term->cell_height / 10;
/* Dont position it outside our window */ /* Don't position it outside our window */
if (x < -term->margins.left) if (x < -term->margins.left)
x = -term->margins.left; x = -term->margins.left;
if (y < -term->margins.top) if (y < -term->margins.top)
@ -3621,12 +3621,12 @@ render_urls(struct terminal *term)
label[i] = U' '; label[i] = U' ';
/* /*
* Dont extend outside our window * Don't extend outside our window
* *
* Truncate label so that it doesnt extend outside our * Truncate label so that it doesn't extend outside our
* window. * window.
* *
* Do it in a way such that we dont cut the label in the * Do it in a way such that we don't cut the label in the
* middle of a double-width character. * middle of a double-width character.
*/ */
@ -3805,7 +3805,7 @@ delayed_reflow_of_normal_grid(struct terminal *term)
term->selection.coords.end.row >= 0 ? ALEN(tracking_points) : 0, term->selection.coords.end.row >= 0 ? ALEN(tracking_points) : 0,
tracking_points); tracking_points);
/* Replace the current, truncated, “normal” grid with the /* Replace the current, truncated, "normal" grid with the
* correctly reflowed one */ * correctly reflowed one */
grid_free(&term->normal); grid_free(&term->normal);
term->normal = *term->interactive_resizing.grid; term->normal = *term->interactive_resizing.grid;
@ -3868,7 +3868,7 @@ send_dimensions_to_client(struct terminal *term)
win->resize_timeout_fd = -1; win->resize_timeout_fd = -1;
} }
} else { } else {
/* Send new dimensions to client “in a while” */ /* Send new dimensions to client "in a while" */
assert(win->is_resizing && term->conf->resize_delay_ms > 0); assert(win->is_resizing && term->conf->resize_delay_ms > 0);
int fd = win->resize_timeout_fd; int fd = win->resize_timeout_fd;
@ -4083,8 +4083,8 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts)
/* /*
* Since text reflow is slow, dont do it *while* resizing. Only * Since text reflow is slow, don't do it *while* resizing. Only
* do it when done, or after pausing the resize for sufficiently * do it when done, or after "pausing" the resize for sufficiently
* long. We reuse the TIOCSWINSZ timer to handle this. See * long. We reuse the TIOCSWINSZ timer to handle this. See
* send_dimensions_to_client() and fdm_tiocswinsz(). * send_dimensions_to_client() and fdm_tiocswinsz().
* *
@ -4095,7 +4095,7 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts)
if (term->interactive_resizing.grid == NULL) { if (term->interactive_resizing.grid == NULL) {
term_ptmx_pause(term); term_ptmx_pause(term);
/* Stash the current normal grid, as-is, to be used when /* Stash the current 'normal' grid, as-is, to be used when
* doing the final reflow */ * doing the final reflow */
term->interactive_resizing.old_screen_rows = term->rows; term->interactive_resizing.old_screen_rows = term->rows;
term->interactive_resizing.old_cols = term->cols; term->interactive_resizing.old_cols = term->cols;
@ -4106,7 +4106,7 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts)
if (term->grid == &term->normal) if (term->grid == &term->normal)
term->interactive_resizing.selection_coords = term->selection.coords; term->interactive_resizing.selection_coords = term->selection.coords;
} else { } else {
/* Well replace the current temporary grid, with a new /* We'll replace the current temporary grid, with a new
* one (again based on the original grid) */ * one (again based on the original grid) */
grid_free(&term->normal); grid_free(&term->normal);
} }
@ -4116,12 +4116,12 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts)
/* /*
* Copy the current viewport (of the original grid) to a new * Copy the current viewport (of the original grid) to a new
* grid that will be used during the resize. For now, throw * grid that will be used during the resize. For now, throw
* away sixels and OSC-8 URLs. Theyll be "restored" when we * away sixels and OSC-8 URLs. They'll be "restored" when we
* do the final reflow. * do the final reflow.
* *
* Note that OSC-8 URLs are perfectly ok to throw away; they * Note that OSC-8 URLs are perfectly ok to throw away; they
* cannot be interacted with during the resize. And, even if * cannot be interacted with during the resize. And, even if
* url.osc8-underline=always, the underline attribute is * url.osc8-underline=always, the "underline" attribute is
* part of the cell, not the URI struct (and thus our faked * part of the cell, not the URI struct (and thus our faked
* grid will still render OSC-8 links underlined). * grid will still render OSC-8 links underlined).
* *
@ -4163,7 +4163,7 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts)
selection_cancel(term); selection_cancel(term);
else { else {
/* /*
* Dont cancel, but make sure there arent any ongoing * Don't cancel, but make sure there aren't any ongoing
* selections after the resize. * selections after the resize.
*/ */
tll_foreach(term->wl->seats, it) { tll_foreach(term->wl->seats, it) {
@ -4175,7 +4175,7 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts)
/* /*
* TODO: if we remove the selection_finalize() call above (i.e. if * TODO: if we remove the selection_finalize() call above (i.e. if
* we start allowing selections to be ongoing across resizes), the * we start allowing selections to be ongoing across resizes), the
* selections pivot point coordinates *must* be added to the * selection's pivot point coordinates *must* be added to the
* tracking points list. * tracking points list.
*/ */
/* Resize grids */ /* Resize grids */
@ -4195,7 +4195,7 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts)
int old_normal_rows = old_rows; int old_normal_rows = old_rows;
if (term->interactive_resizing.grid != NULL) { if (term->interactive_resizing.grid != NULL) {
/* Throw away the current, truncated, “normal” grid, and /* Throw away the current, truncated, "normal" grid, and
* use the original grid instead (from before the resize * use the original grid instead (from before the resize
* started) */ * started) */
grid_free(&term->normal); grid_free(&term->normal);

View file

@ -858,8 +858,8 @@ pixman_region_for_coords_block(const struct terminal *term,
return region; return region;
} }
/* Returns a pixman region representing the selection between start /* Returns a pixman region representing the selection between 'start'
* and end (given the current selection kind), in *scrollback * and 'end' (given the current selection kind), in *scrollback
* relative coordinates* */ * relative coordinates* */
static pixman_region32_t static pixman_region32_t
pixman_region_for_coords(const struct terminal *term, pixman_region_for_coords(const struct terminal *term,
@ -921,17 +921,17 @@ mark_selected_region(struct terminal *term, pixman_box32_t *boxes,
* followed by non-empty cell(s), since this * followed by non-empty cell(s), since this
* corresponds to what gets extracted when the * corresponds to what gets extracted when the
* selection is copied (that is, empty cells * selection is copied (that is, empty cells
* between non-empty cells are converted to * "between" non-empty cells are converted to
* spaces). * spaces).
* *
* However, they way we handle selection updates * However, they way we handle selection updates
* (diffing the old selection area against the * (diffing the "old" selection area against the
* new one, using pixman regions), means we * "new" one, using pixman regions), means we
* cant correctly update the state of empty * can't correctly update the state of empty
* cells. The result is random empty cells being * cells. The result is "random" empty cells being
* rendered as selected when they shouldnt. * rendered as selected when they shouldn't.
* *
* Fix by *never* highlighting selected empty * "Fix" by *never* highlighting selected empty
* cells (they still get converted to spaces when * cells (they still get converted to spaces when
* copied, if followed by non-empty cells). * copied, if followed by non-empty cells).
*/ */
@ -944,8 +944,8 @@ mark_selected_region(struct terminal *term, pixman_box32_t *boxes,
* *
* This is due to how the algorithm for updating * This is due to how the algorithm for updating
* the selection works; it uses regions to * the selection works; it uses regions to
* calculate the difference between the old and * calculate the difference between the "old" and
* the new selection. This makes it impossible * the "new" selection. This makes it impossible
* to tell if an empty cell is a *trailing* empty * to tell if an empty cell is a *trailing* empty
* cell (that should not be highlighted), or an * cell (that should not be highlighted), or an
* empty cells between non-empty cells (that * empty cells between non-empty cells (that
@ -957,7 +957,7 @@ mark_selected_region(struct terminal *term, pixman_box32_t *boxes,
* empty cell is trailing or not. * empty cell is trailing or not.
* *
* So, what we need to do is check if a * So, what we need to do is check if a
* selected, and empty cell has been marked as * 'selected', and empty cell has been marked as
* selected, temporarily unmark (forcing it dirty, * selected, temporarily unmark (forcing it dirty,
* to ensure it gets re-rendered). If it is *not* * to ensure it gets re-rendered). If it is *not*
* a trailing empty cell, it will get re-tagged as * a trailing empty cell, it will get re-tagged as
@ -1042,7 +1042,7 @@ set_pivot_point_for_block_and_char_wise(struct terminal *term,
*pivot_start = start; *pivot_start = start;
/* First, make sure start isnt in the middle of a /* First, make sure 'start' isn't in the middle of a
* multi-column character */ * multi-column character */
while (true) { while (true) {
const struct row *row = term->grid->rows[pivot_start->row & (term->grid->num_rows - 1)]; const struct row *row = term->grid->rows[pivot_start->row & (term->grid->num_rows - 1)];
@ -1051,7 +1051,7 @@ set_pivot_point_for_block_and_char_wise(struct terminal *term,
if (cell->wc < CELL_SPACER) if (cell->wc < CELL_SPACER)
break; break;
/* Multi-column chars dont cross rows */ /* Multi-column chars don't cross rows */
xassert(pivot_start->col > 0); xassert(pivot_start->col > 0);
if (pivot_start->col == 0) if (pivot_start->col == 0)
break; break;
@ -1876,7 +1876,7 @@ cancelled(void *data, struct wl_data_source *wl_data_source)
clipboard->text = NULL; clipboard->text = NULL;
} }
/* We dont support dragging *from* */ /* We don't support dragging *from* */
static void static void
dnd_drop_performed(void *data, struct wl_data_source *wl_data_source) dnd_drop_performed(void *data, struct wl_data_source *wl_data_source)
{ {
@ -2218,11 +2218,11 @@ fdm_receive(struct fdm *fdm, int fd, int events, void *data)
/* /*
* In addition to stripping non-formatting C0 controls, * In addition to stripping non-formatting C0 controls,
* XTerm has an option, disallowedPasteControls, that * XTerm has an option, "disallowedPasteControls", that
* defines C0 controls that will be replaced with spaces * defines C0 controls that will be replaced with spaces
* when pasted. * when pasted.
* *
* Its default value is BS,DEL,ENQ,EOT,NUL * It's default value is BS,DEL,ENQ,EOT,NUL
* *
* Instead of replacing them with spaces, we allow them in * Instead of replacing them with spaces, we allow them in
* bracketed paste mode, and strip them completely in * bracketed paste mode, and strip them completely in
@ -2716,7 +2716,7 @@ enter(void *data, struct wl_data_device *wl_data_device, uint32_t serial,
reject_offer: reject_offer:
/* Either terminal is already busy sending paste data, or mouse /* Either terminal is already busy sending paste data, or mouse
* pointer isnt over the grid */ * pointer isn't over the grid */
seat->clipboard.window = NULL; seat->clipboard.window = NULL;
wl_data_offer_accept(offer, serial, NULL); wl_data_offer_accept(offer, serial, NULL);
wl_data_offer_set_actions( wl_data_offer_set_actions(
@ -2812,7 +2812,7 @@ drop(void *data, struct wl_data_device *wl_data_device)
term, read_fd, clipboard->mime_type, term, read_fd, clipboard->mime_type,
&receive_dnd, &receive_dnd_done, ctx); &receive_dnd, &receive_dnd_done, ctx);
/* data offer is now “owned” by the receive context */ /* data offer is now "owned" by the receive context */
clipboard->data_offer = NULL; clipboard->data_offer = NULL;
clipboard->mime_type = DATA_OFFER_MIME_UNSET; clipboard->mime_type = DATA_OFFER_MIME_UNSET;
} }

8
shm.c
View file

@ -511,7 +511,7 @@ get_new_buffers(struct buffer_chain *chain, size_t count,
#endif #endif
if (!(bufs[0] && shm_can_scroll(bufs[0]))) { if (!(bufs[0] && shm_can_scroll(bufs[0]))) {
/* We only need to keep the pool FD open if were going to SHM /* We only need to keep the pool FD open if we're going to SHM
* scroll it */ * scroll it */
close(pool_fd); close(pool_fd);
pool->fd = -1; pool->fd = -1;
@ -579,7 +579,7 @@ shm_get_buffer(struct buffer_chain *chain, int width, int height)
cached = buf; cached = buf;
else { else {
/* We have multiple buffers eligible for /* We have multiple buffers eligible for
* reuse. Pick the youngest one, and mark the * reuse. Pick the "youngest" one, and mark the
* other one for purging */ * other one for purging */
if (buf->public.age < cached->public.age) { if (buf->public.age < cached->public.age) {
shm_unref(&cached->public); shm_unref(&cached->public);
@ -589,8 +589,8 @@ shm_get_buffer(struct buffer_chain *chain, int width, int height)
* TODO: I think we _can_ use shm_unref() * TODO: I think we _can_ use shm_unref()
* here... * here...
* *
* shm_unref() may remove it, but that * shm_unref() may remove 'it', but that
* should be safe; our tll_foreach() already * should be safe; "our" tll_foreach() already
* holds the next pointer. * holds the next pointer.
*/ */
if (buffer_unref_no_remove_from_chain(buf)) if (buffer_unref_no_remove_from_chain(buf))

4
shm.h
View file

@ -49,7 +49,7 @@ void shm_chain_free(struct buffer_chain *chain);
/* /*
* Returns a single buffer. * Returns a single buffer.
* *
* May returned a cached buffer. If so, the buffers age indicates how * May returned a cached buffer. If so, the buffer's age indicates how
* many shm_get_buffer() calls have been made for the same * many shm_get_buffer() calls have been made for the same
* width/height while the buffer was still busy. * width/height while the buffer was still busy.
* *
@ -57,7 +57,7 @@ void shm_chain_free(struct buffer_chain *chain);
*/ */
struct buffer *shm_get_buffer(struct buffer_chain *chain, int width, int height); struct buffer *shm_get_buffer(struct buffer_chain *chain, int width, int height);
/* /*
* Returns many buffers, described by info, all sharing the same SHM * Returns many buffers, described by 'info', all sharing the same SHM
* buffer pool. * buffer pool.
* *
* Never returns cached buffers. However, the newly created buffers * Never returns cached buffers. However, the newly created buffers

16
sixel.c
View file

@ -979,7 +979,7 @@ sixel_reflow_grid(struct terminal *term, struct grid *grid)
struct grid *active_grid = term->grid; struct grid *active_grid = term->grid;
term->grid = grid; term->grid = grid;
/* Need the “real” list to be empty from the beginning */ /* Need the "real" list to be empty from the beginning */
tll(struct sixel) copy = tll_init(); tll(struct sixel) copy = tll_init();
tll_foreach(grid->sixel_images, it) tll_foreach(grid->sixel_images, it)
tll_push_back(copy, it->item); tll_push_back(copy, it->item);
@ -1028,7 +1028,7 @@ sixel_reflow_grid(struct terminal *term, struct grid *grid)
continue; continue;
} }
/* Sixels that didnt overlap may now do so, which isnt /* Sixels that didn't overlap may now do so, which isn't
* allowed of course */ * allowed of course */
_sixel_overwrite_by_rectangle( _sixel_overwrite_by_rectangle(
term, six->pos.row, six->pos.col, six->rows, six->cols, term, six->pos.row, six->pos.col, six->rows, six->cols,
@ -1200,8 +1200,8 @@ sixel_unhook(struct terminal *term)
* Position the text cursor based on the **upper** * Position the text cursor based on the **upper**
* pixel, of the last sixel. * pixel, of the last sixel.
* *
* In most cases, thatll end up being the very last * In most cases, that'll end up being the very last
* row of the sixel (which were already at, thanks to * row of the sixel (which we're already at, thanks to
* the linefeeds). But for some combinations of font * the linefeeds). But for some combinations of font
* and image sizes, the final cursor position is * and image sizes, the final cursor position is
* higher up. * higher up.
@ -1580,8 +1580,8 @@ decsixel_generic(struct terminal *term, uint8_t c)
case '$': case '$':
if (likely(term->sixel.pos.col <= term->sixel.max_width)) { if (likely(term->sixel.pos.col <= term->sixel.max_width)) {
/* /*
* We set, and keep, col outside the image boundary when * We set, and keep, 'col' outside the image boundary when
* weve reached the maximum image height, to avoid also * we've reached the maximum image height, to avoid also
* having to check the row vs image height in the common * having to check the row vs image height in the common
* path in sixel_add(). * path in sixel_add().
*/ */
@ -1775,12 +1775,12 @@ decgci(struct terminal *term, uint8_t c)
int sat = min(c3, 100); int sat = min(c3, 100);
/* /*
* Sixels HLS use the following primary color hues: * Sixel's HLS use the following primary color hues:
* blue: 0° * blue: 0°
* red: 120° * red: 120°
* green: 240° * green: 240°
* *
* While standard HSL uses: * While "standard" HSL uses:
* red: 0° * red: 0°
* green: 120° * green: 120°
* blue: 240° * blue: 240°

View file

@ -260,8 +260,8 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
if (unlikely(term->interactive_resizing.grid != NULL)) { if (unlikely(term->interactive_resizing.grid != NULL)) {
/* /*
* Dont consume PTMX while were doing an interactive resize, * Don't consume PTMX while we're doing an interactive resize,
* since the normal grid were currently using is a * since the 'normal' grid we're currently using is a
* temporary one - all changes done to it will be lost when * temporary one - all changes done to it will be lost when
* the interactive resize ends. * the interactive resize ends.
*/ */
@ -817,7 +817,7 @@ get_font_dpi(const struct terminal *term)
* downscaled by the compositor. * downscaled by the compositor.
* *
* With the newer fractional-scale-v1 protocol, we use the * With the newer fractional-scale-v1 protocol, we use the
* monitors real DPI, since we scale everything to the correct * monitor's real DPI, since we scale everything to the correct
* scaling factor (no downscaling done by the compositor). * scaling factor (no downscaling done by the compositor).
*/ */
@ -1092,8 +1092,8 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
goto close_fds; goto close_fds;
} }
/* Need to register *very* early (before the first “goto err”), to /* Need to register *very* early (before the first "goto err"), to
* ensure term_destroy() doesnt unref a key-binding we havent * ensure term_destroy() doesn't unref a key-binding we haven't
* yet ref:d */ * yet ref:d */
key_binding_new_for_conf(wayl->key_binding_manager, wayl, conf); key_binding_new_for_conf(wayl->key_binding_manager, wayl, conf);
@ -1340,11 +1340,11 @@ term_window_configured(struct terminal *term)
* *
* A foot instance can be terminated in two ways: * A foot instance can be terminated in two ways:
* *
* - the client application terminates (user types exit, or pressed C-d in the * - the client application terminates (user types 'exit', or pressed C-d in the
* shell, etc) * shell, etc)
* - the foot window is closed * - the foot window is closed
* *
* Both variants need to trigger to other action. I.e. if the client * Both variants need to trigger to "other" action. I.e. if the client
* application is terminated, then we need to close the window. If the window is * application is terminated, then we need to close the window. If the window is
* closed, we need to terminate the client application. * closed, we need to terminate the client application.
* *
@ -1361,7 +1361,7 @@ term_window_configured(struct terminal *term)
* - fdm_client_terminated(): reaper callback, called when the client * - fdm_client_terminated(): reaper callback, called when the client
* application has terminated. * application has terminated.
* *
* + Kills the terminate timeout timer * + Kills the "terminate" timeout timer
* + Calls shutdown_maybe_done() if the shutdown procedure has already * + Calls shutdown_maybe_done() if the shutdown procedure has already
* started (i.e. the window being closed initiated the shutdown) * started (i.e. the window being closed initiated the shutdown)
* -OR- * -OR-
@ -1369,18 +1369,18 @@ term_window_configured(struct terminal *term)
* application termination initiated the shutdown). * application termination initiated the shutdown).
* *
* - term_shutdown(): unregisters all FDM callbacks, sends SIGTERM to the client * - term_shutdown(): unregisters all FDM callbacks, sends SIGTERM to the client
* application and installs a terminate timeout timer (if it hasnt already * application and installs a "terminate" timeout timer (if it hasn't already
* terminated). Finally registers an event FD with the FDM, which is * terminated). Finally registers an event FD with the FDM, which is
* immediately triggered. This is done to ensure any pending FDM events are * immediately triggered. This is done to ensure any pending FDM events are
* handled before shutting down. * handled before shutting down.
* *
* - fdm_shutdown(): FDM callback, triggered by the event FD in * - fdm_shutdown(): FDM callback, triggered by the event FD in
* term_shutdown(). Unmaps and destroys the window resources, and ensures the * term_shutdown(). Unmaps and destroys the window resources, and ensures the
* seats focused pointers dont reference us. Finally calls * seats' focused pointers don't reference us. Finally calls
* shutdown_maybe_done(). * shutdown_maybe_done().
* *
* - fdm_terminate_timeout(): FDM callback for the terminate timeout * - fdm_terminate_timeout(): FDM callback for the "terminate" timeout
* timer. This function is called when the client application hasnt * timer. This function is called when the client application hasn't
* terminated after 60 seconds (after the SIGTERM). Sends SIGKILL to the * terminated after 60 seconds (after the SIGTERM). Sends SIGKILL to the
* client application. * client application.
* *
@ -1391,7 +1391,7 @@ term_window_configured(struct terminal *term)
* It may however also be called without term_shutdown() having been called * It may however also be called without term_shutdown() having been called
* (typically in error code paths - for example, when the Wayland connection * (typically in error code paths - for example, when the Wayland connection
* is closed by the compositor). In this case, the client application is * is closed by the compositor). In this case, the client application is
* typically still running, and we cant assume the FDM is running. To handle * typically still running, and we can't assume the FDM is running. To handle
* this, we install configure a 60 second SIGALRM, send SIGTERM to the client * this, we install configure a 60 second SIGALRM, send SIGTERM to the client
* application, and then enter a blocking waitpid(). * application, and then enter a blocking waitpid().
* *
@ -1715,7 +1715,7 @@ term_destroy(struct terminal *term)
int ret = EXIT_SUCCESS; int ret = EXIT_SUCCESS;
if (term->slave > 0) { if (term->slave > 0) {
/* Well deal with this explicitly */ /* We'll deal with this explicitly */
reaper_del(term->reaper, term->slave); reaper_del(term->reaper, term->slave);
int exit_status; int exit_status;
@ -1729,7 +1729,7 @@ term_destroy(struct terminal *term)
kill(-term->slave, SIGTERM); kill(-term->slave, SIGTERM);
/* /*
* weve closed the ptxm, and sent SIGTERM to the client * we've closed the ptxm, and sent SIGTERM to the client
* application. It *should* exit... * application. It *should* exit...
* *
* But, since it is possible to write clients that ignore * But, since it is possible to write clients that ignore
@ -2086,10 +2086,10 @@ term_update_scale(struct terminal *term)
const struct wl_window *win = term->window; const struct wl_window *win = term->window;
/* /*
* We have a number of sources we can use as scale. We choose * We have a number of "sources" we can use as scale. We choose
* the scale in the following order: * the scale in the following order:
* *
* - preferred scale, from the fractional-scale-v1 protocol * - "preferred" scale, from the fractional-scale-v1 protocol
* - "preferred" scale, from wl_compositor version 6. * - "preferred" scale, from wl_compositor version 6.
NOTE: if the compositor advertises version 6 we must use 1.0 NOTE: if the compositor advertises version 6 we must use 1.0
until wl_surface.preferred_buffer_scale is sent until wl_surface.preferred_buffer_scale is sent
@ -2098,7 +2098,7 @@ term_update_scale(struct terminal *term)
* - if we're not mapped, and we don't have a last known scaling * - if we're not mapped, and we don't have a last known scaling
* factor, use the scaling factor from the first available * factor, use the scaling factor from the first available
* output. * output.
* - if there arent any outputs available, use 1.0 * - if there aren't any outputs available, use 1.0
*/ */
const float new_scale = (term_fractional_scaling(term) const float new_scale = (term_fractional_scaling(term)
? win->scale ? win->scale
@ -2260,7 +2260,7 @@ term_damage_scroll(struct terminal *term, enum damage_type damage_type,
dmg->region.start == region.start && dmg->region.start == region.start &&
dmg->region.end == region.end)) dmg->region.end == region.end))
{ {
/* Make sure we dont overflow... */ /* Make sure we don't overflow... */
int new_line_count = (int)dmg->lines + lines; int new_line_count = (int)dmg->lines + lines;
if (likely(new_line_count <= UINT16_MAX)) { if (likely(new_line_count <= UINT16_MAX)) {
dmg->lines = new_line_count; dmg->lines = new_line_count;
@ -2324,14 +2324,14 @@ term_erase_scrollback(struct terminal *term)
if (sel_end >= 0) { if (sel_end >= 0) {
/* /*
* Cancel selection if it touches any of the rows in the * Cancel selection if it touches any of the rows in the
* scrollback, since we cant have the selection reference * scrollback, since we can't have the selection reference
* soon-to-be deleted rows. * soon-to-be deleted rows.
* *
* This is done by range checking the selection range against * This is done by range checking the selection range against
* the scrollback range. * the scrollback range.
* *
* To make this comparison simpler, the start/end absolute row * To make this comparison simpler, the start/end absolute row
* numbers are rebased against the scrollback start, where * numbers are "rebased" against the scrollback start, where
* row 0 is the *first* row in the scrollback. A high number * row 0 is the *first* row in the scrollback. A high number
* thus means the row is further *down* in the scrollback, * thus means the row is further *down* in the scrollback,
* closer to the screen bottom. * closer to the screen bottom.
@ -3282,7 +3282,7 @@ term_bell(struct terminal *term)
if (!wayl_win_set_urgent(term->window)) { if (!wayl_win_set_urgent(term->window)) {
/* /*
* Urgency (xdg-activation) is relatively new in * Urgency (xdg-activation) is relatively new in
* Wayland. Fallback to our old, faked, urgency - * Wayland. Fallback to our old, "faked", urgency -
* rendering our window margins in red * rendering our window margins in red
*/ */
term->render.urgency = true; term->render.urgency = true;
@ -3728,20 +3728,20 @@ term_command_output_to_text(const struct terminal *term, char **text, size_t *le
* column, then the *entire* previous line is part of the command * column, then the *entire* previous line is part of the command
* output. *Including* the newline, if any. * output. *Including* the newline, if any.
* *
* Since rows_to_text() doesnt extract the column * Since rows_to_text() doesn't extract the column
* FTCS_COMMAND_FINISHED was emitted at (that would be wrong - * FTCS_COMMAND_FINISHED was emitted at (that would be wrong -
* FTCS_COMMAND_FINISHED is emitted *after* the command output, * FTCS_COMMAND_FINISHED is emitted *after* the command output,
* not at its last character), the extraction logic will not see * not at its last character), the extraction logic will not see
* the last newline (this is true for all non-line-wise selection * the last newline (this is true for all non-line-wise selection
* types), and the extracted text will *not* end with a newline. * types), and the extracted text will *not* end with a newline.
* *
* Here we try to compensate for that. Note that if end_col is * Here we try to compensate for that. Note that if 'end_col' is
* not 0, then the command output only covers a partial row, and * not 0, then the command output only covers a partial row, and
* thus we do *not* want to append a newline. * thus we do *not* want to append a newline.
*/ */
if (end_col > 0) { if (end_col > 0) {
/* Command output covers partial row - dont append newline */ /* Command output covers partial row - don't append newline */
return true; return true;
} }

View file

@ -152,8 +152,8 @@ struct sixel {
* We store the cell dimensions of the time the sixel was emitted. * We store the cell dimensions of the time the sixel was emitted.
* *
* If the font size is changed, we rescale the image accordingly, * If the font size is changed, we rescale the image accordingly,
* to ensure it stays within its cell boundaries. scaled is a * to ensure it stays within its cell boundaries. 'scaled' is a
* cached, rescaled version of data + pix. * cached, rescaled version of 'data' + 'pix'.
*/ */
int cell_width; int cell_width;
int cell_height; int cell_height;
@ -346,7 +346,7 @@ struct url {
char32_t *key; char32_t *key;
struct range range; struct range range;
enum url_action action; enum url_action action;
bool url_mode_dont_change_url_attr; /* Entering/exiting URL mode doesnt touch the cells attr.url */ bool url_mode_dont_change_url_attr; /* Entering/exiting URL mode doesn't touch the cells' attr.url */
bool osc8; bool osc8;
bool duplicate; bool duplicate;
}; };
@ -382,7 +382,7 @@ struct terminal {
bool bracketed_paste; bool bracketed_paste;
bool focus_events; bool focus_events;
bool alt_scrolling; bool alt_scrolling;
bool modify_other_keys_2; /* True when modifyOtherKeys=2 (i.e. “CSI >4;2m”) */ bool modify_other_keys_2; /* True when modifyOtherKeys=2 (i.e. "CSI >4;2m") */
enum cursor_origin origin; enum cursor_origin origin;
enum cursor_keys cursor_keys_mode; enum cursor_keys cursor_keys_mode;
enum keypad_keys keypad_keys_mode; enum keypad_keys keypad_keys_mode;
@ -644,7 +644,7 @@ struct terminal {
} render; } render;
struct { struct {
struct grid *grid; /* Original normal grid, before resize started */ struct grid *grid; /* Original 'normal' grid, before resize started */
int old_screen_rows; /* term->rows before resize started */ int old_screen_rows; /* term->rows before resize started */
int old_cols; /* term->cols before resize started */ int old_cols; /* term->cols before resize started */
int old_hide_cursor; /* term->hide_cursor before resize started */ int old_hide_cursor; /* term->hide_cursor before resize started */
@ -678,7 +678,7 @@ struct terminal {
* Pan is the vertical shape of a pixel * Pan is the vertical shape of a pixel
* Pad is the horizontal shape of a pixel * Pad is the horizontal shape of a pixel
* *
* pan/pad is the sixels aspect ratio * pan/pad is the sixel's aspect ratio
*/ */
int pan; int pan;
int pad; int pad;

View file

@ -196,7 +196,7 @@ urls_input(struct seat *seat, struct terminal *term,
char32_t wc = xkb_state_key_get_utf32(seat->kbd.xkb_state, key); char32_t wc = xkb_state_key_get_utf32(seat->kbd.xkb_state, key);
/* /*
* Determine if this is a valid key. I.e. if there is a URL * Determine if this is a "valid" key. I.e. if there is a URL
* label with a key combo where this key is the next in * label with a key combo where this key is the next in
* sequence. * sequence.
*/ */
@ -358,7 +358,7 @@ auto_detected(const struct terminal *term, enum url_action action,
if (match == NULL) { if (match == NULL) {
/* /*
* Character is not a valid URI character. Emit * Character is not a valid URI character. Emit
* the URL weve collected so far, *without* * the URL we've collected so far, *without*
* including _this_ character. * including _this_ character.
*/ */
emit_url = true; emit_url = true;
@ -410,7 +410,7 @@ auto_detected(const struct terminal *term, enum url_action action,
if (c >= term->cols - 1 && row->linebreak) { if (c >= term->cols - 1 && row->linebreak) {
/* /*
* Endpoint is inclusive, and well be subtracting * Endpoint is inclusive, and we'll be subtracting
* 1 from the column when emitting the URL. * 1 from the column when emitting the URL.
*/ */
c++; c++;
@ -557,7 +557,7 @@ remove_overlapping(url_list_t *urls, int cols)
(in_start >= out_start && in_end <= out_end)) (in_start >= out_start && in_end <= out_end))
{ {
/* /*
* OSC-8 URLs cant overlap with each * OSC-8 URLs can't overlap with each
* other. * other.
* *
* Similarly, auto-detected URLs cannot overlap with * Similarly, auto-detected URLs cannot overlap with
@ -633,7 +633,7 @@ generate_key_combos(const struct config *conf,
xassert(hints_count - offset >= count); xassert(hints_count - offset >= count);
/* Copy slice of hints array to the caller provided array */ /* Copy slice of 'hints' array to the caller provided array */
for (size_t i = 0; i < hints_count; i++) { for (size_t i = 0; i < hints_count; i++) {
if (i >= offset && i < offset + count) if (i >= offset && i < offset + count)
combos[i - offset] = hints[i]; combos[i - offset] = hints[i];
@ -642,7 +642,7 @@ generate_key_combos(const struct config *conf,
} }
free(hints); free(hints);
/* Sorting is a kind of shuffle, since were sorting on the /* Sorting is a kind of shuffle, since we're sorting on the
* *reversed* strings */ * *reversed* strings */
qsort(combos, count, sizeof(char32_t *), &c32cmp_qsort_wrapper); qsort(combos, count, sizeof(char32_t *), &c32cmp_qsort_wrapper);
@ -709,7 +709,7 @@ urls_assign_key_combos(const struct config *conf, url_list_t *urls)
it->item.key = combos[combo_idx++]; it->item.key = combos[combo_idx++];
} }
/* Free combos we didnt use up */ /* Free combos we didn't use up */
for (size_t i = combo_idx; i < count; i++) for (size_t i = combo_idx; i < count; i++)
free(combos[i]); free(combos[i]);
@ -789,7 +789,7 @@ urls_render(struct terminal *term)
} }
term->render.last_cursor.row = NULL; term->render.last_cursor.row = NULL;
/* Clear scroll damage, to ensure we dont apply it twice (once on /* Clear scroll damage, to ensure we don't apply it twice (once on
* the snapshot:ed grid, and then later again on the real grid) */ * the snapshot:ed grid, and then later again on the real grid) */
tll_free(term->grid->scroll_damage); tll_free(term->grid->scroll_damage);
@ -833,10 +833,10 @@ urls_reset(struct terminal *term)
term->url_grid_snapshot = NULL; term->url_grid_snapshot = NULL;
/* /*
* Make sure last cursor doesnt point to a row in the just * Make sure "last cursor" doesn't point to a row in the just
* free:d snapshot grid. * free:d snapshot grid.
* *
* Note that it will still be erased properly (if hasnt already), * Note that it will still be erased properly (if hasn't already),
* since we marked the cell as dirty *before* taking the grid * since we marked the cell as dirty *before* taking the grid
* snapshot. * snapshot.
*/ */

20
vt.c
View file

@ -137,12 +137,12 @@ action_execute(struct terminal *term, uint8_t c)
/* backspace */ /* backspace */
#if 0 #if 0
/* /*
* This is the correct BS behavior. However, it doesnt play * This is the "correct" BS behavior. However, it doesn't play
* nicely with bw/auto_left_margin, hence the alternative * nicely with bw/auto_left_margin, hence the alternative
* implementation below. * implementation below.
* *
* Note that it breaks vttest 1. Test of cursor movements -> * Note that it breaks vttest "1. Test of cursor movements ->
* Test of autowrap * Test of autowrap"
*/ */
term_cursor_left(term, 1); term_cursor_left(term, 1);
#else #else
@ -154,7 +154,7 @@ action_execute(struct terminal *term, uint8_t c)
likely(term->reverse_wrap && term->auto_margin)) likely(term->reverse_wrap && term->auto_margin))
{ {
if (term->grid->cursor.point.row <= term->scroll_region.start) { if (term->grid->cursor.point.row <= term->scroll_region.start) {
/* Dont wrap past, or inside, the scrolling region(?) */ /* Don't wrap past, or inside, the scrolling region(?) */
} else } else
term_cursor_to( term_cursor_to(
term, term,
@ -398,7 +398,7 @@ action_collect(struct terminal *term, uint8_t c)
* more. * more.
* *
* As such, we optimize *reading* the private(s), and *resetting* * As such, we optimize *reading* the private(s), and *resetting*
* them (in action_clear()). Writing is ok if its a bit slow. * them (in action_clear()). Writing is ok if it's a bit slow.
*/ */
if ((term->vt.private & 0xff) == 0) if ((term->vt.private & 0xff) == 0)
@ -783,7 +783,7 @@ action_utf8_print(struct terminal *term, char32_t wc)
/* /*
* We may have a key collisison, so need to check that * We may have a key collisison, so need to check that
* its a true match. If not, bump the key and try * it's a true match. If not, bump the key and try
* again. * again.
*/ */
@ -920,8 +920,8 @@ action_utf8_33(struct terminal *term, uint8_t c)
return; return;
} }
/* Note: the E0 range contains overlong encodings. We dont try to /* Note: the E0 range contains overlong encodings. We don't try to
detect, as theyll still decode to valid UTF-32. */ detect, as they'll still decode to valid UTF-32. */
action_utf8_print(term, term->vt.utf8); action_utf8_print(term, term->vt.utf8);
} }
@ -960,8 +960,8 @@ action_utf8_44(struct terminal *term, uint8_t c)
return; return;
} }
/* Note: the F0 range contains overlong encodings. We dont try to /* Note: the F0 range contains overlong encodings. We don't try to
detect, as theyll still decode to valid UTF-32. */ detect, as they'll still decode to valid UTF-32. */
action_utf8_print(term, term->vt.utf8); action_utf8_print(term, term->vt.utf8);
} }

View file

@ -405,7 +405,7 @@ update_term_for_output_change(struct terminal *term)
if (fonts_updated) { if (fonts_updated) {
/* /*
* If the fonts have been updated, the cell dimensions have * If the fonts have been updated, the cell dimensions have
* changed. This requires a forced resize, since the surface * changed. This requires a "forced" resize, since the surface
* buffer dimensions may not have been updated (in which case * buffer dimensions may not have been updated (in which case
* render_resize() normally shortcuts and returns early). * render_resize() normally shortcuts and returns early).
*/ */
@ -921,7 +921,7 @@ xdg_toplevel_wm_capabilities(void *data,
static const struct xdg_toplevel_listener xdg_toplevel_listener = { static const struct xdg_toplevel_listener xdg_toplevel_listener = {
.configure = &xdg_toplevel_configure, .configure = &xdg_toplevel_configure,
/*.close = */&xdg_toplevel_close, /* epoll-shim defines a macro close... */ /*.close = */&xdg_toplevel_close, /* epoll-shim defines a macro 'close'... */
#if defined(XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION) #if defined(XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION)
.configure_bounds = &xdg_toplevel_configure_bounds, .configure_bounds = &xdg_toplevel_configure_bounds,
#endif #endif
@ -991,7 +991,7 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
#if 1 #if 1
/* /*
* TODO: decide if we should do the last forced call when ending * TODO: decide if we should do the last "forced" call when ending
* an interactive resize. * an interactive resize.
* *
* Without it, the last TIOCSWINSZ sent to the client will be a * Without it, the last TIOCSWINSZ sent to the client will be a
@ -2152,7 +2152,7 @@ bool
wayl_win_set_urgent(struct wl_window *win) wayl_win_set_urgent(struct wl_window *win)
{ {
if (win->urgency_token_is_pending) { if (win->urgency_token_is_pending) {
/* We already have a pending token. Dont request another one, /* We already have a pending token. Don't request another one,
* to avoid flooding the Wayland socket */ * to avoid flooding the Wayland socket */
return true; return true;
} }