Age | Commit message (Collapse) | Author |
|
There's a few places in Alacritty where it was assumed that after a
WIDE_CHAR cell, there'd always be a WIDE_CHAR_SPACER. However since
resizes in the alternate screen buffer do not reflow any content, it's
possible to have a WIDE_CHAR without any WIDE_CHAR_SPACER right behind
it.
This patch changes these instances to be more defensive about accepting
potentially unreasonable input data caused by alt screen resizes.
Fixes #5185.
Fixes #5170.
|
|
This PR combines a couple of optimizations to drastically reduce the
time it takes to gather everything necessary for rendering Alacritty's
terminal grid.
To help with the iteration over the grid, the `DisplayIter` which made
heavy use of dynamic dispatch has been replaced with a simple addition
to the `GridIterator` which also had the benefit of making the code a
little easier to understand.
The hints/search check for each cell was always performing an array
lookup before figuring out that the cell is not part of a hint or
search. Since the general case is that the cell is neither part of hints
or search, they've been wrapped in an `Option` to make verifying their
activity a simple `is_some()` check.
For some reason the compiler was also struggling with the `cursor`
method of the `RenderableContent`. Since the iterator is explicitly
drained, the performance took a hit of multiple milliseconds for a
single branch. Our implementation does never reach the case where
draining the iterator would be necessary, so this sanity check has just
been replaced with a `debug_assert`.
Overall this has managed to reduce the time it takes to collect all
renderable content from ~7-8ms in my large grid test to just ~3-4ms.
|
|
|
|
|
|
Fixes #5022.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
|
|
Fixes #3726.
|
|
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.
|
|
Fixes #4968.
|
|
Fixes #3697.
|
|
Fixes #4879.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
Fixes #4922.
|
|
|
|
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.
|
|
Since the bug was not present in the 0.7.2 release, there is no need to
add a changelog entry for this fix.
|
|
Since not all suggested clippy lints by stable clippy are supported on
the MSRV of Alacritty, this commit moves the clippy checks to the MSRV.
Unfortunately this will mean that our lints might be significantly
behind, however it ensures our CI never blocks any code that should be
valid.
Developers themselves of course can still run the latest clippy to
follow the up to date recommendations.
|
|
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.
|
|
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.
|
|
This implements support for temporarily freezing the terminal grid to
prevent rendering of incomplete frames.
This can be triggered using the escapes `DCS = 1 s` (start) and
`DCS = 2 s` (end).
The synchronization is implemented by forwarding all received PTY bytes
to a 2 MiB buffer. This should allow updating the entire grid even if it
is fairly dense. Unfortunately this also means that another branch is
necessary in Alacritty's parser which does have a slight performance
impact.
In a previous version the freezing was implemented by caching the
renderable grid state whenever a synchronized update is started. While
this strategy makes it possible to implement this without any
performance impact without synchronized updates, a significant
performance overhead is introduced whenever a synchronized update is
started. Since this can happen thousands of times per frame, it is not a
feasible solution.
While it would be possible to render at most one synchronized update per
frame, it is possible that another synchronized update comes in at any
time and stays active for an extended period. As a result the state
visible before the long synchronization would be the first received
update per frame, not the last, which could lead to the user missing
important information during the long freezing interval.
Fixes #598.
|
|
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.
|
|
|
|
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.
|
|
This introduces some duplicate dependencies, though they are necessary
to build properly without any warnings.
Fixes #4735.
|
|
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.
|
|
Fixes #4702.
|
|
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.
|
|
This fixes the shell completion by removing the flags removed from the
CLI in 0768428 and adding the new options flag.
|
|
|
|
Fixes #4687.
|
|
Fixes #4676.
|
|
This is only an update to the development version and does not represent
a stable release.
|
|
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.
|
|
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.
|
|
|
|
Fixes #4612.
|
|
Fixes #4591.
|
|
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.
|
|
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.
|
|
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>
|
|
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.
|
|
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.
|
|
This adds a history to the regex search limited to at most 255 entries.
Whenever a search is either confirmed or cancelled, the last regex is
entered into the history and can be accessed when a new search is
started.
This should help users recover complicated search regexes after
accidentally discarding them, or handle repeated searches with the same
regexes.
Fixes #4095.
|
|
|
|
|
|
This strictens the ESC escape sequence parser to prevent invalid
intermediates from being ignored. Previously the parser would just look
at the first intermediate without validating that the rest of them is
empty.
If an escape like `\e(#0` is used now, it will no longer be accepted as
`\e(0` since the intermediate `#` is also present.
|
|
Since BSD does not support inotify polling in the `notify` crate and
instead relies on manual filesystem polling, this would cause a high CPU
usage at 100 polls a second.
A separate polling rate of once per second is now used for platforms
which do not support filesystem polling, allowing users to still make
use of live config reload on BSD.
Fixes #3871.
|
|
Fixes #4189.
|
|
Since the current behavior would just load the default configuration
file whenever the configuration file couldn't be loaded, the path was
not set to any value. As a result however, the live config reload
feature would not work with a broken yaml (one which cannot be
deserialized, not one with warnings).
If a configuration file has been specified, but the deserialization
still failed, the path is now preserved on the default configuration
file to make it possible to live reload a fix for the issue.
Fixes #4561.
|
|
Previously Alacritty would not report cursor escapes to the application
when a mouse button was held down and the mouse was moved. This prevents
applications like tmux from updating their selection.
Similarly to how windowing libraries keep reporting mouse events when
the left mouse button is held down over the window, the escape sequences
are now clamped to within the grid and reported to applications.
Fixes #4566.
|
|
Fixes #4530.
Fixes #4072.
Fixes #1927.
|