summaryrefslogtreecommitdiff
path: root/alacritty_terminal
AgeCommit message (Collapse)Author
2020-08-07Add support for colon separated SGR parametersChristian Duerr
This implements the colon separated form of SGR 38 and 48. Fixes #1485.
2020-08-06Use `tcgetpgrp` to get PID for SpawnNewInstanceChristian Duerr
Fixes #4082.
2020-07-28Bump minimum supported Rust version to 1.43.0Kirill Chibisov
2020-07-27Fix CellForeground and CellBackground cursor colorsKirill Chibisov
This commit fixes regression introduced in bedf5f3004e8f33011925ca471be02ead96f4581, when setting certain CellForeground/CellBackground combinations stoppped working.
2020-07-26Invert fixed color cursor if it's close to cell bgChristian Duerr
This should reduce the number of times people with fixed cursor colors run into troubles when existing text is already colored. Using just the background color as a metric instead of both background and foreground color should ensure that the cursor still has a clear shape, since just changing the foreground color for a cursor might be difficult to see. Always inverting the entire cursor instead of keeping the fixed foreground color is important to make sure the contrast isn't messed up. Fixes #4016.
2020-07-23Add secondary DA supportChristian Duerr
This adds support for the secondary DA escape sequence response. Alacritty's version is formatted allowing for up to 99 minor and patch versions, which should be sufficient. The tertiary DA is intentionally not implemented and marked as rejected in the documentation, since a lot of terminals do not support it, or report useless data (XTerm/URxvt/Kitty). Fixes #3100.
2020-07-19Bump version to 0.6.0-devChristian Duerr
2020-07-19Bump alacritty_terminal versionChristian Duerr
This change bumps the version of the `alacritty_terminal` crate to force it out of sync with the Alacritty application. Since it is a library that will be published on crates.io, it should be following semver rather than our binary's release version. While it would be possible to just keep it at 0.5.0, explicitly disconnecting it from the Alacritty version should give it a clean starting-off point and prevent unnecessary confusion. Bumping it to 0.10.0 instead of something like 0.6.0 should allow for a nice gap between the different versions without being too arbitrary. Changing the version to 0.1.0 is not an option since decreasing semver version would likely cause a lot of problems. While it would be possible to further separate the Alacritty terminal library from the Alacritty terminal emulator, by renaming it from `alacritty_terminal` to something different, I don't think that is necessary or a good idea at the moment. Even though the `alacritty_terminal` library *can* be used for other terminals, its primary goal is still to support the Alacritty terminal emulator and I don't see that changing. So making that clear in its name seems like a good idea. Since there is no plan to maintain this library separately from Alacritty, but to keep both tied together, the naming should reflect this.
2020-07-15Add support for searching without vi modeChristian Duerr
This implements search without vi mode by using the selection to track the active search match and advancing it on user input. The keys to go to the next or previous match are not configurable and are bound to enter and shift enter based on Firefox's behavior. Fixes #3937.
2020-07-15Fix cursor reflowChristian Duerr
This resolves three different issues with cursor reflow. The first issue was that the cursor could reach the top of the screen during reflow, since content was pushed into history despite viewport space being available. Since the cursor cannot leave the viewport, this would insert new space between the cursor and content (see #3968). Another issue was that the wrapline flag was not set correctly with content being available behind the cursor. Since the cursor is not necessarily at the end of the line, it is possible that the cursor should reflow to the next line instead of staying on the current one and setting the wrapline flag. The last bug fixed in this is about reflow with content available behind the cursor. Since that might have en effect on new lines being inserted and deleted below the cursor, the cursor needs to be reflown based on it. Fixes #3968.
2020-07-14Fallback to SHELL instead of passwd if presentMattbazooka
Instead of just always falling back to the shell specified in the passwd file when no config or cli shell was specified, Alacritty will not first look at the `$SHELL` environment variable. If this is unset, it will still read the passwd file. Since macOS is a bit peculiar and does not set the `$SHELL` environment variable by default, it is set manually to the shell used by Alacritty while any existing `$SHELL` variables are ignored. This matches the behavior of iTerm and Terminal.app. Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-07-14Fix crash on cursor resizeChristian Duerr
Fixes #3960.
2020-07-11Remove gui dependencies from alacritty_terminalKirill Chibisov
This commit removes font dependency from alacritty_terminal, so it'll simplify the usage of alacritty_terminal as a library, since you won't link to system's libraries anymore. It also moves many alacritty related config options from it. Fixes #3393.
2020-07-10Add option to run command on bell Kirill Chibisov
Fixes #1528.
2020-07-10Fail compilation if Fontconfig is not installed on Linux/BSDKirill Chibisov
Statically linking Fontconfig was leading to slow startup and various errors, so forcing the use of system's library.
2020-07-09Add regex scrollback buffer searchChristian Duerr
This adds a new regex search which allows searching the entire scrollback and jumping between matches using the vi mode. All visible matches should be highlighted unless their lines are excessively long. This should help with performance since highlighting is done during render time. Fixes #1017.
2020-07-09Fix cursor reflowChristian Duerr
To make sure that output is consistent even while resizing the window, the cursor will now reflow with the content whenever the window size is changed. Since the saved cursor is more likely to represent a position in the grid rather than a reference to the content below it and handling of resize before jumping back to it is more likely than with the primary cursor, no reflow is performed for the saved cursor The primary cursor is unfortunately always reflowed automatically by shells like zsh, which has always caused problems like duplicating parts of the prompt and stretching it out "infinitely". Since the cursor is now reflowed appropriately the duplication of the shell prompt should be reduced, however it is possible that the shell moves the cursor up one line after it has already been reflowed, which will cause a line of history to be deleted if there is no duplicated prompt line above the reflowed prompt. Since this behavior is identical in VTE and Kitty, no attempt is made to work around it in this patch. Fixes #3584.
2020-07-06Fix saved cursor handlingChristian Duerr
This resolves several problems with handling of the saved cursor when switching between primary and alternate screen. Additionally ref-tests are also added for all common interactions to make sure the behavior does not regress. The behavior is based on XTerm's behavior except for interaction with `reset`. XTerm does not reset the alternate screen's saved cursor on `reset`, but VTE does. Since a `reset` should reset as much as possible, Alacritty copies VTE here instead of XTerm.
2020-07-06Preserve linewrap flag across alt screen switchesChristian Duerr
While neither VTE, URxvt nor Kitty handle this, preserving the linewrap flag across alternate screen switches seems like the correct thing to do. XTerm also does handle this correctly, which indicates that it is a bug and not a feature.
2020-07-03Document supported escape sequencesChristian Duerr
Fixes #3440.
2020-07-01Fix reflow of empty wrapped cursor lineChristian Duerr
This bug was caused by trying to grow the terminal while the cursor line was wrapped but entirely empty. Resizing the terminal now accounts for the position of the deleted line and moves the cursor up only when the line deleted was above it. The deletion of the line was caused by the shell redrawing itself whenever the cursor is moved. Fixes #3583.
2020-06-29Fix foreground dimming with truecolor textCarlo Abelli
Fixes #3766.
2020-06-28Rename alt_grid to inactive_gridChristian Duerr
Since the alt_grid is not always the alternate screen buffer, the name inactive_grid should fit much better. Fixes #3504.
2020-06-26Clear selection on clear line/screen escapesKirill Chibisov
Selection is now cleared if clear line or clear screen escape sequences are clearing content behind it.
2020-06-25Fix scroll down escape pulling lines from historyChristian Duerr
This works around a bug where the optimized version of the `Grid::scroll_down` function would just rotate the entire grid down if the scrolling region starts at the top of the screen, even if there is history available. Since rotations of scrolling regions should not affect the scrollback history, this optimized version is now only called when the max scrollback size is 0, making it impossible for the grid to have any history while it is used. Since the main usecase of this is the alternate screen buffer, which never has any history, the performance should not be affected negatively by this change. Fixes #3582.
2020-06-18Add automatic scrolling during selectionChristian Duerr
This adds a new `Scheduler` which allows for staging events to be processed at a later time. If there is a selection active and the mouse is above or below the window, the viewport will now scroll torwards the direction of the mouse. The amount of lines scrolled depends on the distance of the mouse to the boundaries used for selection scrolling. To make it possible to scroll while in fullscreen, the selection scrolling area includes the padding of the window and is at least 5 pixels high in case there is not enough padding present.
2020-06-07Update dependenciesKirill Chibisov
2020-06-07Remove copypasta dependency from alacritty_terminalKirill Chibisov
2020-06-06Remove copyright notice from filesChristian Duerr
Keeping the license as part of every file bloats up the files unnecessarily and introduces an additional overhead to the creation of new modules. Since cargo already provides excellent dependency management, most of the code-reuse of Alacritty should occur through Rust's dependency management instead of copying it source. If code is copied partially, copying the license from the main license file should be just as easy as copying from the top of the file and making some adjustments based on where it is used is likely necessary anyways.
2020-06-05Fix class and cursor thickness deserializationKirill Chibisov
Fixes #3820.
2020-06-05Refactor Shell, Command, and Launcher to share implKirill Chibisov
2020-06-02Add cargo feature for WinPTYDavid Hewitt
2020-05-30Refactor Term/Grid separationChristian Duerr
This commit aims to clear up the separation between Term and Grid to make way for implementing search. The `cursor` and `cursor_save` have been moved to the grid, since they're always bound to their specific grid and this makes updating easier. Since the selection is independent of the active grid, it has been moved to the `Term`.
2020-05-27Set IUTF8 input setting on supported platformsKirill Chibisov
Fixes #3769.
2020-05-24Remove unused dependenciesMatthias Krüger
2020-05-21Update copypasta to v0.7.0Kirill Chibisov
Fixes #3592.
2020-05-17Fix crash when writing wide char in last columnChristian Duerr
This resolves an issue where trying to write a fullwidth character in the last column would crash Alacritty, if linewrapping was disabled. Instead of assuming that the linewrap put after the linewrapping spacer was successful, the character writing is now skipped completely when trying to put a wide character in the last column.
2020-05-16Change default color scheme to 'Tomorrow Night'Alexey Chernyshov
Fixes #3404.
2020-05-13Fix OSCs terminated by \x9c byte in unicodeChristian Duerr
Fixes #3591.
2020-05-05Extend style guideline documentationChristian Duerr
2020-05-01Fix clippy warningsMatthias Krüger
2020-04-30Fix startup locale on macOSCasper Rogild Storm
Fixes #2800. Fixes #2566.
2020-04-20Clear selection on grid swapRémi Garde
Fixes #3290.
2020-04-18Update depedenciesBastien Orivel
2020-04-15Add config option to set cursor thicknessKirill Chibisov
Fixes #3526.
2020-04-09Use config colors to theme Wayland decorationsKirill Chibisov
Fixes #2092.
2020-03-30Fix tabstops not being reset with 'reset'Kirill Chibisov
2020-03-26Remove `fs::read_to_string` reimplementationsChristian Duerr
After two previous PRs already removed some instances of reimplementations of the `fs::read_to_string` functionality, this removes the last remaining occurence and with it all instances of `File::open`. So this should remove them all for good.
2020-03-25Remove std::fs::read_to_string reimplementation from testsMatthias Krüger
2020-03-24Fix cursor position after alt screen resizeChristian Duerr
This fixes a regression introduced in 4cc6421, which ignored the main grid's cursor when increasing the number of lines available, causing incorrect cursor position after restoring to the primary screen. Additionally another similar bug has been fixed where the grid was not scrolled correctly when shrinking while in the alternate screen. When the grid is resized multiple lines at once, there was also an issue with Alacritty either pulling all lines from history or none at all, instead of mixing both approaches and pulling just what is required. This lead to incorrect cursor positions when the resize could partially make use of history. Fixes #3499.