aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term
AgeCommit message (Collapse)Author
2024-04-18Fix window being focused by defaultKirill Chibisov
Winit explicitly states that the window is not focused by default and the `Focused` event will deliver the state later on. Also start adding notable changes to alacritty_terminal in its own CHANGELOG. Closes #7866.
2024-03-12Fix hint `Select` action for hyperlink escapeChristian Duerr
This fixes an issue where the `Select` action for hyperlink escape text would select the entire line, instead of selecting only the hyperlink itself. It also changes the way hyperlinks with the same ID are highlighted, removing the restriction of being on consecutive lines and instead highlighting all visible cells that correspond to the matching hyperlink. Closes #7766.
2024-03-06Fix log typoshuajin tong
2024-01-14Fix inline search expanding across newlinesChristian Duerr
Closes #7587.
2024-01-06Fix serde tests without default featuresChristian Duerr
Authored-by: James McCoy <jamessan@jamessan.com>
2023-12-06Implement kitty's keyboard protocolKirill Chibisov
The protocol enables robust key reporting for the applications, so they could bind more keys and the user won't have collisions with the normal control keys. Links: https://sw.kovidgoyal.net/kitty/keyboard-protocol Fixes #6378.
2023-11-29Fix DECRPM reportingKirill Chibisov
The DECRQM uses `p` to query, but the reply uses `y`. Fixes #7397.
2023-11-23Damage only terminal inside `alacritty_terminal`Kirill Chibisov
The damage tracking was including selection and vi_cursor which were rendering viewport related, however all the damage tracking inside the `alacritty_terminal` was _terminal viewport_ related, meaning that it should be affected by `display_offset`. Refactor the damage tracking so `alacritty_terminal` is only tracking actual terminal updates and properly applying display offset to them, while `alacritty` pulls this damage into its own UI damage state. Fixes #7111.
2023-11-23Add support for DECRPM/DECRQMKirill Chibisov
2023-11-23Update VTE to 0.13.0Kirill Chibisov
2023-11-10Remove `alacritty_config` from alacritty_terminalKirill Chibisov
There's no need to force alacritty's user configuration on other users of the crate, thus provide the options actually used by alacritty_terminal itself.
2023-10-29Fix clippy warningsPavel Roskin
2023-10-25Fix typosPavel Roskin
2023-10-20Add inline vi mode searchChristian Duerr
This patch adds inline search to vi mode using `f`/`F` and `t`/`T` as default bindings. The behavior matches that of vim. Fixes #7203.
2023-10-09Fix regex patterns allowing for empty stringsChristian Duerr
This patch changes the mode we search for patterns which allow an empty string, by anchoring all searches. As a result we will match the longest possible match when multiple patterns are present (like `;*|rust`), instead of using the leftmost pattern only. This is only possible with empty matches since our parser is reset on every byte anyway, so anchoring the search makes no difference. Fixes #7276.
2023-10-08Fix regex matches ending on multilineChristian Duerr
This fixes an issue where the reverse search for the regex start would truncate a character when ending on a newline, since it was omitting the EOI check in that case. This also fixes a separate issue which caused regexes which capture empty strings (e.g.: `.*`) to always report a match. This is a regression introduced in 73276b6.
2023-10-08Update dependenciesChristian Duerr
This patch applies all breaking and non-breaking dependency updates and bumps MSRV to 1.70.0.
2023-09-17Fix regex memory usageChristian Duerr
This fixes an issue where regexes with a large number of possible states would consume excessive memory, since the entire DFA was compiled ahead of time. To solve this, the DFA is now built at runtime using `regex-automata`'s hybrid DFA. There are however still some checks performed ahead of time, causing errors with obscenely large regexes (`[0-9A-Za-z]{999999999}`), which shouldn't cause any issues. A regex which is large, but not large enough to fail the NFA construction (like `[0-9A-Za-z]{999999}`) will cause a long search of the entire grid, but will complete and show the match. Closes #7097.
2023-08-31Fix crash with anchored searchesChristian Duerr
While this does **not** enable the use of anchors (`^`) in user regexes, it does prevent Alacritty from crashing when attempting to do so.
2023-08-27Update regex-automata to v0.3.6Christian Duerr
This seems like a sensible first step before looking into #7097.
2023-07-22Add `terminal` config section to control OSCs Kirill Chibisov
Some environments demand certain OSC sequences to be disabled or some escape sequence could require handling which is out of scope of alacritty, but could be done by external script (OSC 777). Added section for now just handles the `OSC 52` sequence and changes its default to be `OnlyCopy`, which is handy for remote copy, but `Paste` is redundant because normal `Paste` hotkey could be used as well. Fixes #3386. Co-authored-by: Christian Duerr <contact@christianduerr.com>
2023-05-23Switch to VTE's built-in ansi featureAnhad Singh
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2023-05-17Update bitflags to 2.2.1Kirill Chibisov
2023-03-24Fix selection rotation on the last lineChristian Duerr
This fixes an issue with terminal resizes when the selection is on the last line. Alacritty would fail to rotate lines and keep the selection in the same line index whenever the terminal line count was grown or shrunk. This issue occurred due to the range passed to the selection's rotate function still being based on the old terminal size, which caused the initial or target state of the rotation to be outside of the terminal bounds. Closes #6698.
2023-03-19Fix `;` character in URI OSC 8 payloadKirill Chibisov
The special character `;` can be not URL-encoded, thus it'll add extra parameter in the payload. Handle it joining extra parameters with the `;` as a separator.
2023-02-02Update winit to 0.28Kirill Chibisov
Fixes #6644. Fixes #6615. Fixes #6558. Fixes #6515. Fixes #3187. Fixes #62.
2023-01-15Preserve last column with erase in line rightChristian Duerr
When the erase in line escape sequence with a parameter of 0 (right) is passed while the wrapline flag is already set, it will no longer clear the last column and instead ignore the operation. The behavior of `\e[1K` and `\e[2K` is unchanged and both will clear the entire first line without clearing the wrapline flag. Closes #6159.
2022-10-12Fix clippy warningsChristian Duerr
This patch applies all clippy lints currently present on the latest clippy master than are compatible with our oldstable clippy (only exception is the `_else(||` stuff).
2022-09-01Add IPC config subcommandChristian Duerr
This patch adds a new mechanism for changing configuration options without editing the configuration file, by sending options to running instances through `alacritty msg`. Each window will load Alacritty's configuration file by default and then accept IPC messages for config updates using the `alacritty msg config` subcommand. By default all windows will be updated, individual windows can be addressed using `alacritty msg config --window-id "$ALACRITTY_WINDOW_ID"`. Each option will replace the config's current value and cannot be reset until Alacritty is restarted or the option is overwritten with a new value. Configuration options are passed in the format `field.subfield=value`, where `value` is interpreted as yaml. Closes #472.
2022-07-29Make grid mutably accessible to librariesMikayla Maki
Co-authored-by: Mikayla Maki <mikayla.c.maki@icloud.com>
2022-07-24Fix inverted condition for cell's extra clearingKirill Chibisov
Fixes #6215.
2022-07-11Fix hyperlinks not being keyboard actionableKirill Chibisov
This fixes a typo in 694a52b which was filtering all hyperlinks, except only duplicated ones when opening them with keyboard. Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-07-10Add support for hyperlink escape sequenceKirill Chibisov
This commit adds support for hyperlink escape sequence `OSC 8 ; params ; URI ST`. The configuration option responsible for those is `hints.enabled.hyperlinks`. Fixes #922.
2022-06-09Fix flickering during resize on WaylandKirill Chibisov
This also fixes an issue of windows not being rendered while resizing. Fixes #6069.
2022-06-07Fix old vi cursor not being properly damagedKirill Chibisov
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-02Fix a few minor clippy lintsYuri Astrakhan
2022-05-26Fix Vi cursor not being damaged on scrollKirill Chibisov
There's no need to damage intermediate Vi mode cursor points, since it can't change the terminal content meaning that only the previous and current vi cursor's viewport points matter to damage it properly.
2022-04-06Extract `SizeInfo` from alacritty_terminalKirill Chibisov
The `SizeInfo` is a SizeInfo used for rendering, which contains information about padding, and such, however all the terminal need is number of visible lines and columns.
2022-03-31Fix OSC 4 color response formatChristian Duerr
The commit 60ef17e introduced support for the color query response escape for OSC 4, however it did omit the `4;` prefix and started the OSC with just the color index. This patch fixes this bug and correctly responds to queries with full OSC 4 format, including prefix plus color index. Fixes #5981.
2022-03-16Add colored underline supportKirill Chibisov
This commit adds support for colored underline and refines the dynamic extra storage. The extra storage now is using `Arc` making cloning it way faster compared to `Box` approach which scales really well when it comes to cloning in `Term::write_at_cursor`, since cloning `Arc` is constant time. Fixes #4142.
2022-03-10Fix crash when searching during resetChristian Duerr
This fixes a crash which occurs when the terminal is reset while searching, due to the vi mode cursor being outside of the visible area. This also fixes an issue where the search state reset would incorrectly clamp the vi mode cursor to the grid, rather than the absolute viewport position. While this fix does resolve all crashes when searching while running `cat /dev/urandom`, it does raise the question if manually clamping the vi mode cursor in every location where it is modified is the right choice. A follow-up to provide a safer API which guarantees correct modification of the vi mode cursor location is probably a good idea. Fixes #5942.
2022-02-14Add support for dashed and dotted underlinesKirill Chibisov
This finishes implementation of underline styles provided by `CSI 4 : [1-5] m` escape sequence.
2022-02-08Add support for drawing undercurlsKirill Chibisov
Fixes #1628.
2022-02-07Fix alacritty_terminal not emitting damage on color changeKirill Chibisov
2022-02-02Add damage tracking and reporting to compatible compositorsKirill Chibisov
This allows compositors to only process damaged (that is, updated) regions of our window buffer, which for larger window sizes (think 4k) should significantly reduce compositing workload under compositors that support/honor it, which is good for performance, battery life and lower latency over remote connections like VNC. On Wayland, clients are expected to always report correct damage, so this makes us a good citizen there. It can also aid remote desktop (waypipe, rdp, vnc, ...) and other types of screencopy by having damage bubble up correctly. Fixes #3186.
2022-01-21Fix typo in SizeInfo padding_y rustdocÖmer Sinan Ağacan
2022-01-15Add ´?´ support to OSC 4DaftMouse
2022-01-08Fix fullwidth char regex search infinite loopChristian Duerr
This resolves an issue where the regex search could loop indefinitely when the end point was defined in a location containing a fullwidth character, thus skipping over the end before termination. Fixes #5753.
2022-01-07Fix last column block selectiona5ob7r
This fixes a regression introduced in 8e584099, where block selections containing the last cell would have the trailing newline stripped and be joined into one long line on copy.
2022-01-04Trim \n from hints/semantic-/simple selectiona5ob7r
Before this patch a hint regex ending in the last column would append a newline, despite this newline being "invisible" to the user. To match the expected behavior, newlines are trimmed from regex hint matches. To ensure consistency the simple and semantic selection also do not include a newline at the end of the copied text anymore. Fixes #5697.