| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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 support for blinking the terminal cursor. This can be
controlled either using the configuration file, or using escape
sequences.
The supported control sequences for changing the blinking state are
`CSI Ps SP q` and private mode 12.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the restriction of not being able to select text while the
search is active, making it a bit less jarring of a UX when the user
tries to interact with the terminal during search.
Since the selection was used during vi-less search to highlight the
focused match, there is now an option for a focused match color, which
uses the inverted normal match color by default. This focused match is
used for both search modes.
Other mouse interactions are now also possible during search, like
opening URLs or clicking inside of mouse mode applications.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The zerowidth characters were conventionally stored in a [char; 5].
This creates problems both by limiting the maximum number of zerowidth
characters and by increasing the cell size beyond what is necessary even
when no zerowidth characters are used.
Instead of storing zerowidth characters as a slice, a new CellExtra
struct is introduced which can store arbitrary optional cell data that
is rarely required. Since this is stored behind an optional pointer
(Option<Box<CellExtra>>), the initialization and dropping in the case
of no extra data are extremely cheap and the size penalty to cells
without this extra data is limited to 8 instead of 20 bytes.
The most noticible difference with this PR should be a reduction in
memory size of up to at least 30% (1.06G -> 733M, 100k scrollback, 72
lines, 280 columns). Since the zerowidth characters are now stored
dynamically, the limit of 5 per cell is also no longer present.
|
|
|
| |
Fixes #4363.
|
|
|
|
|
| |
Since the 'set_inner_size' call might immediately alter the window size,
the query for the window's dimensions should be performed after the
resize has been requested.
|
|
|
| |
See https://github.com/alacritty/alacritty/commit/721f789b5f98ab5c47e6e817c3c2228636ca0a1a#r43183826.
|
|
|
|
| |
This should allow users that are not using Wayland/X11
to reduce the resulted binary size and compilation times.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #4206.
Fixes #4162.
Fixes #4017.
Fixes #3998.
Fixes #3831.
Fixes #3782.
Fixes #3708.
Fixes #2734.
Fixes #2714.
Fixes #1801.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the minimum terminal dimensions from 2 lines and 2 columns,
to 1 line and 2 columns.
This also reworks the `SizeInfo` to store the number of columns and
lines and consistently has only the terminal lines/columns stored,
instead of including the message bar and search in some places of the
Alacritty renderer/input.
These new changes also make it easy to properly start the selection
scrolling as soon as the mouse is over the message bar, instead of
waiting until it is beyond it.
Fixes #4207.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
| |
|
|
|
|
| |
This makes our logging of 'SizeInfo' changes more consistent
with the one we're using when creating a new 'Display'.
|
|
|
|
| |
This implements the escapes `CSI 14 t` and `CSI 18 t` which report the
text area size in pixels and characters.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit completes the effort to use config colors for
message bar content by picking red/yellow from user's
colors.normal.{red,yellow} for error/warning messages
instead of fixed colors.
It also removes alacritty_terminal::term::color::RED and
alacritty_terminal::term::color::YELLOW from the alacritty_terminal API,
bumping its version to 0.11.0-dev.
Fixes #4116.
|
|
|
|
|
| |
Using the user's background color in pair with red should provide better
contrast.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes two crashes related to search. The first crash was due to
variable shadowing computing the incorrect length of a search as soon as
it was started, causing an overflow after attempting a subtraction.
Since overflows are only debug mode checks, in release this would lead
to an IME positioned far, far beyond the window's boundaries (likely
offscreen).
The other bug was that the search was always started from the last
column in reverse search without vi mode, but after shrinking the
terminal width that origin point is no longer a valid part of the grid.
As a result it would cause an index out of bounds. The line was already
clamped to the grid, but now the same is also done for the column.
Fixes #3987.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Fixes #1528.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of blocking on vsync, Alacritty now requests a notification from
wayland about when the next frame should be rendered. this helps with
input latency, since it gives alacritty more time to process events
before a redraw. it also prevents alacritty from drawing unless the
compositor tells it to do so.
Fixes #2851.
|
|
|
|
|
|
|
|
|
|
| |
On X11 `swap_buffers` does not block for vsync. However the next OpenGl command
will block to synchronize (this is `glClear` in Alacritty), which causes a
permanent one frame delay.
Calling `glFinish` after swapping buffers forces Alacritty to finish the buffer
swap before returning control to the event loop.
Fixes #3061.
|
|
|
| |
Fixes #3526.
|
|
|
|
|
|
|
|
|
| |
This commit fixes some issues introduced by
1a8cd172e520e493bacc9c6a2ae6f80de086eaa3:
1. Vi cursor not moving properly on double/triple click
2. URL not launching via mouse click in vi mode + mouse mode
3. Ability to select in mouse mode with double/triple click regardless
of shift modifier
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).
Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.
This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.
Fixes #262.
|
|
|
|
|
|
|
|
| |
This fixes various outdated links pointing to the old jwilm/alacritty
repository.
Since `copypasta` now has its own github repository at
https://github.com/alacritty/copypasta, the sources have been removed
from Alacritty.
|
|
|
| |
Fixes #3165.
|
|
|
| |
Fixes #2226.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The URL check uses a division to wrap column indices across lines, which
will cause a runtime error if the size of the terminal is zero columns
wide.
Since a lot of our logic assumes that we at least have one column and
line to work with and our behavior doesn't matter otherwise, this change
fixes the terminal dimensions to have space for at least one cell.
|
|
|
|
| |
Fixes #2898.
Fixes #2479.
|
|
|
|
| |
Fixes #2737.
|
|
|
|
|
|
| |
This regression was introduced in
729eef0c933831bccfeac6a355bdb410787fbe5f.
Fixes #2924.
|
|
|
| |
Fixes #2911.
|