aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src
Commit message (Collapse)AuthorAge
* Use cell colors for focused match CellRgbNathan Lilienthal2021-04-30
| | | | | Fixes #5022. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Cleanup config path logging without any filesNathan Lilienthal2021-04-30
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Add support for magnet URLsRaphael Nestler2021-04-30
|
* Fix highlighting multiple hints in the same lineChristian Duerr2021-04-30
| | | Fixes #5010.
* Update vi-mode `Open` config docs for hintsNathan Lilienthal2021-04-26
|
* Fix cursor expansion across wide charsChristian Duerr2021-04-22
| | | | | | | | | This fixes a regression introduced in 0.7.0 where the block cursor would not expand across both cells anymore when on top of a wide char spacer cell. The logic to always move the cursor on the wide char instead of the spacer has been moved to the alacritty_terminal crate, making sure it is always performed before any processing in the UI.
* Fix out of order terminal query responsesChristian Duerr2021-04-17
| | | | | | | | | | | | | This forces all responses made to the PTY through the indirection of the UI event loop, making sure that the writes to the PTY are in the same order as the original requests. This just delays all escape sequences by forcing them through the event loop, ideally all responses which are not asynchronous (like a clipboard read) would be made immediately. However since some escapes require feedback from the UI to mutable structures like the config (e.g. color query escapes), this would require additional locking. Fixes #4872.
* Fix selection flooding Wayland connectionChristian Duerr2021-04-17
| | | | | | | | | | This resolves an issue where an excessive clipboard update frequency would cause the Wayland display server to ignore necessary selection updates. Instead of copying the selection to the clipboard during the selection process, it is now only copied once the mouse button is released. Fixes #4953.
* Fix mouse reportsChristian Duerr2021-04-16
| | | | | | | The patch 9cb5562 has introduced a regression which would abort if a mouse report's line was bigger than zero, which is the exact opposite of when a mouse report is required. Fixes #4980.
* Fix mouse point crash on resizeChristian Duerr2021-04-15
| | | | | | | | | This resolves an issue with Alacritty crashing after a resize, due to the last cached mouse point being out of bounds. Instead of caching the mouse point, it is now computed on demand to make sure it can never be invalid. Fixes #4977.
* Add hint action for moving the vi cursorChristian Duerr2021-04-15
| | | Fixes #4319.
* Fix hint label with start above viewportChristian Duerr2021-04-14
| | | Fixes #4960.
* Fix URL highlight in mouse mode without shiftChristian Duerr2021-04-14
| | | | | This resolves a regression introduced in 96fc9ec where URLs would get highlighted on mouse hover while mouse mode is active even when the shift modifier was not held down.
* Add vi/mouse hint highlighting supportChristian Duerr2021-04-13
| | | | | This patch removes the old url highlighting code and replaces it with a new implementation making use of hints as sources for finding matches in the terminal.
* Add hide other windows binding on macOSKam Kudla2021-04-08
| | | Fixes #3697.
* Add copy/paste/select hint actionsChristian Duerr2021-04-03
| | | | | | This adds some built-in actions for handling hint selections without having to spawn external applications. The new actions are `Copy`, `Select` and `Paste`.
* Fix focused match selection colorChristian Duerr2021-04-02
| | | | | | | | | | | | | | | In 3bd5ac221ab3b122962063edd1f4c10f9f2d117f a regression was introduced which caused the selection of a focused match to invert the cell color back to its original color. This was due to the removal of the `is_match` flag on the renderable cell, which was used to make sure a cell is not marked as part of a match if it is already part of a selection. Instead of relying on a flag that is passed through from content.rs, the application of the cell colors is instead done in the content.rs file directly. This not only fixes the bug with selecting the focused match, but also makes the logic a bit more transparent. Fixes #4934.
* Unify the grid line indexing typesChristian Duerr2021-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Alacritty was using two different ways to reference lines in the terminal. Either a `usize`, or a `Line(usize)`. These indexing systems both served different purposes, but made it difficult to reason about logic involving these systems because of its inconsistency. To resolve this issue, a single new `Line(i32)` type has been introduced. All existing references to lines and points now rely on this definition of a line. The indexing starts at the top of the terminal region with the line 0, which matches the line 1 used by escape sequences. Each line in the history becomes increasingly negative and the bottommost line is equal to the number of visible lines minus one. Having a system which goes into the negatives allows following the escape sequence's indexing system closely, while at the same time making it trivial to implement `Ord` for points. The Alacritty UI crate is the only place which has a different indexing system, since rendering and input puts the zero line at the top of the viewport, rather than the top of the terminal region. All instances which refer to a number of lines/columns instead of just a single Line/Column have also been changed to use a `usize` instead. This way a Line/Column will always refer to a specific place in the grid and no confusion is created by having a count of lines as a possible index into the grid storage.
* Fix cursor thickness on wide cellsStokhos2021-03-28
| | | Fixes #4922.
* Fix URLs opening in explorer on WindowsSerban Constantin2021-03-15
|
* Fix inconsistent_struct_constructor clippy lintMatthias Krüger2021-03-12
|
* Fix vi mode searchChristian Duerr2021-03-06
| | | | | | | | This fixes a regression introduced in a954e07 which caused the vi mode cursor to be invisible after starting a search. This was caused by a discrepancy between the search DFA and search active state, since a search is not active after it has been confirmed but the DFAs are still present for highlighting.
* Add regex terminal hintsChristian Duerr2021-03-01
| | | | | | | | | | | | | | | | This adds support for hints, which allow opening parts of the visual buffer with external programs if they match a certain regex. This is done using a visual overlay triggered on a specified key binding, which then instructs the user which keys they need to press to pass the text to the application. In the future it should be possible to supply some built-in actions for Copy/Pasting the action and using this to launch text when clicking on it with the mouse. But the current implementation should already be useful as-is. Fixes #2792. Fixes #2536.
* Fix hollow block cursor being drawn for hidden cursorKirill Chibisov2021-02-26
| | | | | | | Commit 530de00 refactored large chunk of Alacritty's internal handling of renderable cells, cursors, and such. This patch fixes a regression where a hollow block cursor was drawn for unfocused windows even if the terminal cursor was hidden.
* Fix vi cursor after leaving searchChristian Duerr2021-02-26
| | | | | | | | | | This resolves an issue which caused the vi cursor position to be incorrect when leaving the search with the vi cursor at the far bottom. Previously this could lead to the vi cursor disappearing completely, when starting a vi mode search that has a match on the last line while the original vi mode cursor was right above it. Fixes #4833.
* Fix selection after search without matchChristian Duerr2021-02-22
| | | | | | | This resolves an issue where the last match would be selected after leaving non-vi search, even if further changes to the search regex did not result in any matches. Fixes #4831.
* Add Drop implementations for OpenGL structuresMikhail "L117" Nikolenko2021-02-19
|
* Limit the maximum DPR on X11 to 10Christian Duerr2021-02-15
| | | | | | | | | | | Since there have a bunch of problems caused by an excessive DPI reported by XRandr, this limits the maximum DPR on X11 to 10. These issues would commonly cause problems like long startup times or crashes, which are hard to troubleshoot for the user. While a limit of 10 might not eliminate all of these issues, it should still make it possible for Alacritty to start to make troubleshooting simpler. Fixes #3214.
* Update dependenciesChristian Duerr2021-02-13
| | | | | | This introduces some duplicate dependencies, though they are necessary to build properly without any warnings. Fixes #4735.
* Fix the estimated DPR to 1 on Wayland.Nathan Lilienthal2021-02-04
| | | | | | | | | | | On Wayland, regardless of the underlying scale factor for an output, The scale factor is 1.0 until we receive the first DPRChanged event. To correctly calculate the window sizes, we must use a DPR of 1.0 as well. Ideally we would know what the DPR of the window we're being opened in is going to be, and avoid the estimation guessing game, but that doesn't seem possible with the current interfaces provided by the window systems.
* Fix segmentation fault on shutdown with WaylandChristian Duerr2021-01-29
| | | Fixes #4702.
* Fix damage tracking on WaylandChristian Duerr2021-01-27
| | | | | | | Since the Wayland event loop might delay rendering across event loop callback executions, it's necessary to track the global damage globally rather than just within a single loop execution. Fixes #4736.
* Move renderable cell transformation to alacrittyChristian Duerr2021-01-24
| | | | | | | | | | | | This refactors a large chunk of the alacritty_terminal API to expose all data necessary for rendering uniformly through the `renderable_content` call. This also no longer transforms the cells for rendering by a GUI but instead just reports the content from a terminal emulation perspective. The transformation into renderable cells is now done inside the alacritty crate. Since the terminal itself only ever needs to know about modified color RGB values, the configuration for colors was moved to the alacritty UI code.
* Remove all rustc benchmarksJames McCoy2021-01-21
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Add IME support for WindowsKhinenw2021-01-15
|
* Fix jumping between matches in reverse vi searchChristian Duerr2021-01-08
| | | Fixes #4676.
* Fix inefficient search initializationChristian Duerr2021-01-07
| | | | | | The creation of the renderable search iterator was doing a lot of work even when absolutely no search is active at the moment. To resolve this problem, an early return now makes sure that a search is active before going through the trouble of creating an iterator for it.
* Fix debug mode crash in vi-less searchChristian Duerr2021-01-03
|
* Fix movement between matches in vi-less searchChristian Duerr2021-01-01
| | | | | | | | | | | | | | | This resolves various bugs related to vi-less search. The primary issue was that when jumping between matches more than 1000 lines apart, the search would get stuck and not advance between matches properly due to the 1000 line synchronous search limit. Some other issues related to the tracking of the search origin have also been fixed, improving the viewport positioning while interacting with the search outside of vi mode. This was done by keeping the search origin outside of the viewport, which allows for search to start right at the first character. Previously the search was on top of the first character which lead to it being excluded from search. Fixes #4626.
* Add vi/search line indicatorChristian Duerr2021-01-01
| | | | | | | | | This adds a new visual indicator which shows the position in history of either the display offset during search, or the vi mode cursor. To make it as unintrusive as possible, the overlay is hidden whenever the vi mode cursor collides with its position. Fixes #3984.
* Remove Windows WinPTY backendChristian Duerr2021-01-01
|
* Use ConfigDeserialize for all config enumsChristian Duerr2020-12-31
| | | | | | | This fixes up all of the remaining enums which are used in the configuration file to make sure they all support fully case insensitive deserialization. Fixes #4611.
* Add default binding to cancel search on Ctrl+CChristian Duerr2020-12-31
| | | Fixes #4612.
* Fix characters getting swallowed during IME inputChristian Duerr2020-12-31
| | | | | | | | This reverts 1d00883 since it is not necessary anymore after all search bindings are now proper key bindings. This fixes a bug which would cause the first character to be swallowed when using IME after triggering any key binding which doesn't send any `ReceivedCharacter` event. Fixes #4588.
* Fix missing glyphs crash on WindowsChristian Duerr2020-12-29
| | | Fixes #4617.
* Draw cursor with rect rendererKirill Chibisov2020-12-28
| | | | | | | | This commit makes cursors being drawn via rects, thus it's always above underlines/strikeouts. Also, since the cursor isn't a glyph anymore, it can't be obscured due to atlas switching while glyphs are rendered. Fixes #4404. Fixes #3471.
* Hide "missing" glyp for zerowidth characterKirill Chibisov2020-12-23
| | | | | | | | | | | This patch prevents missing zerowidth glyphs from obscuring the rendered glyph of a cell. The missing glyph itself is also consistently loaded and displayed on all platforms. It is initialized once together with the ascii symbols and then written to the atlas only once for every cached missing glyph. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Disable shadows for transparent windows on macOSChristian Duerr2020-12-22
| | | | | | | | | | | | Commit 5725f58 introduced a performance regression on macOS due to excessive calls to the `invalidateShadow` function, however calling this function only on redraw after a resize was performed does not fix the underlying problem. As a solution, window shadows are now disabled completely for all transparent windows. This makes sure there is no performance impact, while still solving the problem with text artifacts on resize. Fixes #4604.
* Fix artifacts on macOS with transparent windowsChristian Duerr2020-12-21
| | | | | | | | | | | Due to the way macOS draws shadows for transparent windows, resizing them will lead to text artifacts remaining present after a window has been resized. The `invalidateShadow` call is used whenever the opacity isn't `1.0` to make sure these shadows are cleared before redrawing, so no artifacts remain when resizing transparent windows. Fixes #889.
* Replace serde's derive with custom proc macroChristian Duerr2020-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the existing `Deserialize` derive from serde with a `ConfigDeserialize` derive. The goal of this new proc macro is to allow a more error-friendly deserialization for the Alacritty configuration file without having to manage a lot of boilerplate code inside the configuration modules. The first part of the derive macro is for struct deserialization. This takes structs which have `Default` implemented and will only replace fields which can be successfully deserialized. Otherwise the `log` crate is used for printing errors. Since this deserialization takes the default value from the struct instead of the value, it removes the necessity for creating new types just to implement `Default` on them for deserialization. Additionally, the struct deserialization also checks for `Option` values and makes sure that explicitly specifying `none` as text literal is allowed for all options. The other part of the derive macro is responsible for deserializing enums. While only enums with Unit variants are supported, it will automatically implement a deserializer for these enums which accepts any form of capitalization. Since this custom derive prevents us from using serde's attributes on fields, some of the attributes have been reimplemented for `ConfigDeserialize`. These include `#[config(flatten)]`, `#[config(skip)]` and `#[config(alias = "alias)]`. The flatten attribute is currently limited to at most one per struct. Additionally the `#[config(deprecated = "optional message")]` attribute allows easily defining uniform deprecation messages for fields on structs.