summaryrefslogtreecommitdiff
path: root/alacritty_terminal
AgeCommit message (Collapse)Author
2022-07-20Remove panics from UNIX PTY initializationMikayla Maki
Co-authored-by: Mikayla Maki <mikayla.c.maki@icloud.com>
2022-07-20Replace `map().unwrap_or()` with `map_or()`Chris Copeland
Use a `map_or` instead of a `map().unwrap_or()` chain.
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-07-01Add `cursor.blink_timeout` config optionKirill Chibisov
This option should prevent extensive power usage due to cursor blinking when there's no user activity being performed. Fixes #5992.
2022-06-20Bump dirs to 4.0.0a5ob7r
This is to remove dependencies on multiple versions of dirs crate.
2022-06-16Bump copypasta to 0.8.0Christian Duerr
This also applies all non-breaking semver updates.
2022-06-15Use `MaybeUninit<usize>` instead of `usize` in `Storage::swap`nils
`Row` contains pointer bytes, which are not valid for `usize`, therefore `MaybeUninit<usize>` should be used instead to do an untyped copy.
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-06-01Fix DEC Special Character Set (Line drawing)André Kugland
This patch resolves some mapping issues with the line drawing character set where characters like linefeed were incorrectly mapped to their proper character representation rather than the codepoint of their identification glpyh. Co-authored-by: Christian Duerr <contact@christianduerr.com>
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-05-20Enable damage tracking only on WaylandKirill Chibisov
Other platforms don't have such concepts in general or have them via different interfaces not related to EGL. This commit also resolves some minor clippy issues. Fixes #6051. Co-authored-by: Christian Duerr <contact@christianduerr.com>
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-20Fix OSC 104 with empty second parameterDaftMouse
This fixes a bug where using OSC 104 without parameters but with a trailling semicolon (e.g. '\e]104;\e\\') would not be handled. Fixes #5542.
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.
2021-12-26Migrate to 2021 editionChristian Duerr
2021-12-26Bump development version to 0.11.0-devChristian Duerr
This is only an update to the development version and does not represent a stable release.
2021-12-23Fix CreateNewWindow CLI fallbackChristian Duerr
The existing behavior for the new CreateNewWindow actions was to always pass in their own options, which would discard the existing options configured on the terminal's PTY config. To fix this the behavior for CreateNewWindow is now the same as for the initial window creation, the config values are overwritten conditionally based on their individual presence in the CLI options. However all temporary CLI options set on the "master" Alacritty instance are discarded by all future windows. Fixes #5659.
2021-12-19Remove shared PID/FD variablesChristian Duerr
The existing PID/FD atomics in alacritty_terminal/src/tty/unix.rs were shared across all Alacritty windows, causing problem with the new multiwindow feature. Instead of sharing these between the different windows, the master FD and shell PID are now stored on the `window_context`. Unfortunately this makes spawning new daemons a little more complicated, having to pass through additional parameters. To ease this a little bit the helper method `spawn_daemon` has been defined on the `ActionContext`, making it accessible from most parts of Alacritty's event loop. Fixes #5700.
2021-12-18Keep history position when viewport is cleareda5ob7r
This patch resolves a behavior that display area doesn't keep track of content in a scrollback buffer due to display offset reset when viewport clear is invoked. This is similar to #5341, but this problem is caused by viewport clear instead of new outputs to the viewport.
2021-12-18Remove trailing whitespace from block selectionjeremycostanzo
Fixes #5638.
2021-12-17Remove outdated Rust compatibility codefee1-dead
2021-12-03Fix vi cursor moving incorrectly with new outputa5ob7r
This fixes an issue where the vi cursor would move down one line if it's positioned at the topmost visible line, while at least partially scrolled up into history, when new lines are added to the terminal. This problem is caused by using a display offset of a grid not scrolled yet when scrolling and determining a new vi cursor position.
2021-12-03Fix crash when vi cursor in history during cleara5ob7r
Fixes #5544.
2021-11-22Add parameters to `msg create-window` subcommandKirill Chibisov
Alacritty's `msg create-window` subcommand would previously inherit all the CLI parameters from the original executable. However not only could this lead to unexpected behavior, it also prevents multi-window users from making use of parameters like `-e`, `--working-directory`, or `--hold`. This is solved by adding a JSON-based message format to the IPC socket messages which instructs the Alacritty server on which CLI parameters should be used to create the new window. Fixes #5562. Fixes #5561. Fixes #5560.
2021-11-15Update signal-hook to 0.3.10James McCoy
2021-11-02Fix libxkbcommon-devel package name for openSUSEDiego Garza
Fixes #5586.
2021-10-23Add multi-window supportChristian Duerr
Previously Alacritty would always initialize only a single terminal emulator window feeding into the winit event loop, however some platforms like macOS expect all windows to be spawned by the same process and this "daemon-mode" can also come with the advantage of increased memory efficiency. The event loop has been restructured to handle all window-specific events only by the event processing context with the associated window id. This makes it possible to add new terminal windows at any time using the WindowContext::new function call. Some preliminary tests have shown that for empty terminals, this reduces the cost of additional terminal emulators from ~100M to ~6M. However at this point the robustness of the daemon against issues with individual terminals has not been refined, making the reliability of this system questionable. New windows can be created either by using the new `CreateNewWindow` action, or with the `alacritty msg create-window` subcommand. The subcommand sends a message to an IPC socket which Alacritty listens on, its location can be found in the `ALACRITTY_SOCKET` environment variable. Fixes #607.
2021-10-11Update rustfmt configurationChristian Duerr
In this change I went through all current rustfmt configuration options and expanded our existing configuration with overrides whenever deemed appropriate. The `normalize_doc_attributes` option is still unstable, but seems to work without any issues. Even when passing macros like `include_str!` that is recognized properly and not normalized. So while this wasn't an issue anywhere in the code, it should make sure it never will be. When it comes to imports there are two new major additions. The `imports_granularity` and `group_imports` options. Both mostly just incorporate unwritten rules that have existed in Alacritty for a long time. Unfortunately since `alacritty_terminal` imports in `alacritty` are supposed to be separate blocks, the `group_imports` option cannot be used.
2021-09-19Handle PTY EIO error for Rust 1.55+Ilya Bobyr
`ErrorKind::Other` no longer includes `EIO` since Rust 1.55: https://blog.rust-lang.org/2021/09/09/Rust-1.55.0.html#stdioerrorkind-variants-updated It was not precise enough from the very beginning, as the comment says that only EIO should be hidden, while the code was any uncategorised errors.
2021-09-15Remove unused struct fieldsChristian Duerr
While it might be nice to have the full `Passwd` struct around should anything ever change in the future, there's really no reason why Alacritty would need this information. So just removing things for now makes more sense than adding `#[allow(unused)]`.
2021-08-26Fix alacitty_terminal build on windowsAndrew Chin
The "consoleapi" feature in the winapi crate is required when using things from the `winapi::um::consoleapi` module.
2021-08-01Fix fullwidth character crash on resizeChristian Duerr
Fixes #5383.
2021-07-22Fix insert mode crash with fullwidth charactersChristian Duerr
This patch resolves an issue with fullwidth characters, where it is possible to crash Alacritty by moving a fullwidth character off the side of the terminal using insert mode. This issue occurs since trying to overwrite a fullwidth spacer in the first column leads to an underflow when trying to access its fullwidth character cell. During insert mode before the character is inserted into the cell, the existing content is rotated to the right, which leads to the fullwidth spacer being in the first column even though it is only there temporarily to be immediately overwritten. While it would be possible to clear the flags after rotation, this would still leave the opportunity for other ways to trigger this issue and cause a separate crash. So instead the column is checked while overwriting the spacer to make sure the fullwidth character isn't accessed if it would lead to an underflow. The following is a minimal example for reproducing this crash: ```sh printf "漢" printf "\e[4h" printf "\r" for _ in $(seq 3 $(tput cols)); do printf "x" done printf "\r_" ``` Fixes #5337.
2021-07-18Bump development version to 0.10.0-devChristian Duerr
This is only an update to the development version and does not represent a stable release.
2021-07-17Fix vi cursor tracking during scrollingChristian Duerr
This resolves an issue with the vi mode cursor where it would not keep track of the content while scrolled up in history but instead slowly leave the viewport due to its absolute positioning. While an alternative solution would have been to always keep the vi mode cursor in the same spot on the viewport, keeping track of the content is not only more easy to implement but it also makes for a nicer connection between the vi mode cursor and the content below it. Fixes #5339.
2021-07-16Fix copying interrupted tab charactersChristian Duerr
Fixes #5084.