| Commit message (Collapse) | Author | Age |
|
|
| |
Fixes #4617.
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Previously the _NET_WM_ICON would use the .ico which was also used for
the Windows icon. This icon used the dimensions 256x256, but the maximum
supported image size is 192x192, so a new image with the dimensions
64x64 has been added.
Since we know the image format anyways, the `image` dependency could
also be easily replaced with `png`, which cuts out a few extra unused
dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Since live-shader-reload is generally unused and unmaintained, and could
only be used for debugging purposes, since it refers relative paths,
this feature was removed for the sake of simplicity.
|
|
|
|
| |
Fixes potential split of multiline logs in the multithreaded context
by writing them all at once.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently Alacritty requires a separate `draw` call to OpenGL whenever a
new rectangle is rendered to the screen. With many rectangles visible,
this has a significant impact on rendering performance.
Instead of using separate draw calls, the new `RectRenderer` will build
a batch of rectangles for rendering. This makes sure that multiple
rectangles can be grouped together for single draw calls allowing a
reduced impact on rendering time.
Since this change is OpenGL 2 friendly, it should not make it more
complicated to transition away from the 3.3+ requirements like an
alternative instancing based implementation might have.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes some of Alacritty's CLI flags since the same functionality
is provided by the '--option' flag now.
The removed flags are:
* '--persistent-logging'
* '--live-config-reload'
* '--no-live-config-reload'
* '--dimensions'
* '--position'
Fixes #4246.
|
|
|
|
|
|
|
|
| |
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 allows the configuration file imports to start with '~/' and
resolve relative to the user's home directory.
There is no support for '~user/' or '$HOME/' or any other shell
expansion. However since paths relative to the home directory should be
sufficient for everything, this provides a very simple solution without
any significant drawbacks.
Fixes #4157.
|
|
|
|
|
| |
Winit changed the default font size for CSDs from 17pt to 11pt, this
patch reverts that since it is too small to be readable.
|
|
|
|
|
|
|
|
|
| |
This patch makes sure that the message for the creation of a log file is
always the first entry, before any other log file messages.
Since we initialize our log file dynamically, the message is printed as
soon as something is written to it. By making sure that we always write
to a file first and then try stdout, we can ensure that the log file is
always initialized before ever writing log messages to stdout.
|
|
|
| |
Fixes: #4330.
|
|
|
| |
Fixes #791.
|
|
|
|
| |
This is only an update to the development version and does not represent
a stable release.
|
|
|
| |
This fixes an unused import warning introduced with 198d3cb.
|
|
|
|
|
|
|
|
| |
This commit makes 'gl::load_with' only load
symbols from the minimal OpenGL (3.3) version alacritty
aims to support. Doing so reduces the size of gl_bindings.rs
from 21K LoC to 11K LoC, and also the actual
loading by up to ~2x, thugh the loading is usually sub millisecond
anyway.
|
|
|
|
| |
On Wayland there's no way to embed icon into the window,
thus there's no point in loading it when x11 feature is disabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
On macOS we can use 'proc_pidinfo' to determine the working
directory of the terminal foreground process.
Fixes #1979.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This resolves a problem with the visual bell where it would not
automatically trigger a redraw itself after the initial frame has been
rendered.
Since the unit of the visual bell duration is also unclear, it has been
clarified.
|
|
|
| |
Fixes #4363.
|
|
|
|
|
| |
It should simplify tracking of new warnings raised on CI builds
and when cross checking. This commit also enables warnings
for 'rust_2018_idioms' and 'future_incompatible'.
|
|
|
| |
Fixes #4353.
|
|
|
|
|
|
|
|
| |
Since our usage of the rustc_tools_util crate is so trivial, it seems
like we should be able to just inline it directly into Alacritty.
It's a very well trusted crate, being hosted directly by rust-lang and
it does not pull in any other dependencies, but having a dependency for
just 6 lines of code seems a bit extreme.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach Alacritty to stop setting the window as urgent upon a bell by
emulating xterm's 'bellIsUrgent' resource and relevant CSI. When this
resource is enabled (with 'CSI ? 1042 h'), a bell event causes the
window to be marked as urgent. When the resource is disabled (with 'CSI
? 1042 l'), the window is not marked urgent in the event of a bell.
There are two wrinkles worth noting here:
- The 'TermMode::URGENCY_HINTS' does _not_ affect the terminal's
configured bell command, since we only want to control whether or
not the window is marked as urgent, not anything else.
- In xterm, the 'bellIsUrgent' resource is _disabled_ by default.
Since bouncing the dock icon has been the default in Alacritty on
macOS thus far, do not make an effort to change that in this patch.
This allows users to emit "\e[?1042l" and disable bouncing the dock
icon.
Fixes #2950.
|
|
|
|
|
| |
Checking for target os in build.rs doesn't work, since build.rs
is running for host, so checking should be done in src. Thus moving
'compile_error!' check from build.rs to main.rs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #4206.
Fixes #4162.
Fixes #4017.
Fixes #3998.
Fixes #3831.
Fixes #3782.
Fixes #3708.
Fixes #2734.
Fixes #2714.
Fixes #1801.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When formatting text for display in the message bar, Alacritty was using
the byte length of the text instead of the glyph count. This lead to
unnecessary blank space at the end of lines due to overestimation of
their length.
There also were no extra spaces inserted after fullwidth characters,
leading to Alacritty giving them only a single cell of space. In line
with the rest of Alacritty's rendering, a wide char spacer whitespace is
now inserted in the message bar after glyphs which should occupy two
cells.
Fixes #4250.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'.
|
|
|
|
|
|
|
|
|
|
|
| |
Since we only applied the CLI arguments as overrides to the
configuration file after the file was loaded, all CLI arguments that are
stored on the config would be dropped without a configuration file in
place.
This also makes sure that all configuration file config overrides are
still loaded if the configuration file could not be loaded for any
reason, since there's no reason why we'd just drop everything in that
case.
|
|
|
| |
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|