| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a crash which occurs when the terminal is reset while
searching, due to the vi mode cursor being outside of the visible area.
This also fixes an issue where the search state reset would incorrectly
clamp the vi mode cursor to the grid, rather than the absolute viewport
position.
While this fix does resolve all crashes when searching while running
`cat /dev/urandom`, it does raise the question if manually clamping the
vi mode cursor in every location where it is modified is the right
choice.
A follow-up to provide a safer API which guarantees correct modification
of the vi mode cursor location is probably a good idea.
Fixes #5942.
|
|
|
|
| |
The starting point of damage should be computed from the right side
of the terminal, not from the starting point of line indicator.
|
|
|
|
| |
Ceiling line position results in strikeout line being lower than
it should.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently Alacritty only works on hardware which supports OpenGL 3.3 or
more, which can become problematic with older devices. This patch adds a
new GLES2 renderer, since it is much more widely supported, especially
on weaker hardware like phones or a Raspberry Pi.
While the GLES2 renderer is slower than the OpenGL 3.3+ version, it is
still significantly faster than software rendering. However because of
this performance difference it is only used when necessary and there
should be no difference for machines supporting OpenGL 3.3+.
The two renderers are largely independent and separated in the
`renderer/text/glsl3` and `renderer/text/gles2` modules. Separate
shaders are also required for text rendering. The rectangle rendering
for underlines and the visual bell works identically for both versions,
but does have some version-specific shader code.
Fixes #128.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
| |
|
| |
|
|
|
|
|
| |
This commit finishes the effort from a64553b to avoid reloading font
twice during startup, since the original issue is with getting font
metrics without building the glyph cache.
|
|
|
|
| |
If WAYLAND_DISPLAY contains a '/', we have to replace with with another
character before using WAYLAND_DISPLAY as a path component.
|
|
|
|
|
|
|
| |
Instead of creating a `Rasterizer` to guess the window dimensions,
dropping it and then creating a new one for the glyph cache, reuse the
same `Rasterizer`.
This prevents the font from being loaded twice during startup.
|
|
|
|
| |
This finishes implementation of underline styles provided by
`CSI 4 : [1-5] m` escape sequence.
|
|
|
|
| |
Since we could queue damage before we get into the actual rendering
we should clear it after drawing not before.
|
|
|
|
|
| |
If font size changes however the cells stay the same the terminal won't
be damaged, since it wasn't resized, however the visual change happened,
thus the entire screen should be damaged.
|
| |
|
|
|
|
| |
This commit also makes our CI fail hard when warning encountered when
building only for either Wayland or X11.
|
|
|
| |
Fixes #1628.
|
|
|
|
|
| |
This method no longer returns an `Option` since #5773.
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
|
| |
|
|
|
|
| |
This fixes an issue when search results were not damaged when leaving Vi
mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows compositors to only process damaged (that is, updated)
regions of our window buffer, which for larger window sizes (think 4k)
should significantly reduce compositing workload under compositors that
support/honor it, which is good for performance, battery life and lower
latency over remote connections like VNC.
On Wayland, clients are expected to always report correct damage, so
this makes us a good citizen there. It can also aid remote desktop
(waypipe, rdp, vnc, ...) and other types of screencopy by having damage
bubble up correctly.
Fixes #3186.
|
|
|
| |
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
|
|
|
|
|
|
|
|
|
| |
While using underline thickness could sound logical to draw other
lines most fonts don't make underlines thick compared to cell bounding
box if you increase font size. So instead we're using cell width to
scale builtin font nicely.
This commit also adjusts arcs drawing and alignment.
Fixes #5826.
Fixes #5821.
|
|
|
| |
This also fixes a bug where the welcome log message wasn't logged.
|
|
|
|
| |
This commit takes into account `font.offset` and `font.glyph_offset`
when generating built-in font.
|
|
|
|
|
| |
This commit adds the config `font.builtin_box_drawing` option to
control built-in font, which is enabled by default.
|
| |
|
|
|
| |
Fixes #4468.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 7398e9f a regression was introduced which causes Alacritty to crash
on startup since wayland has a keyboard repeat rate thread started
before our logger is initialized.
Since the latest version of time was rather inconvenient to use anyway
and there is no nice solution for this issue other than downgrading the
`time` version again, the time since startup is now logged instead of
the local time.
This should still provide all the relevant information, while getting
rid of an unnecessary dependency. While it would be possible to also
print the delta between log messages, this can be trivially computed so
it has been omitted to skip adding another `Mutex` to the `Logger`
struct.
|
|
|
|
|
|
|
| |
Due to unsoundness issues (c.f., time-rs/time#380 and time-rs/time#293),
determining the local timezone can only happen while single-threaded.
Determine the timezone early in startup and apply the offset to the UTC
timestamp before formatting.
|
|
|
|
| |
This prevents unnecessary redraws when the terminal is idle, cursor is
hidden and blinking is enabled.
|
|
|
|
| |
This uses `with_position` method on a `WindowBuilder` instead of setting
window position on the created window later on.
|
|
|
|
|
|
| |
When 'ExpandSelection' binding was added only default binding for
RightClick was added, however to expand block selection holding control
when doing a click is required, so this commit adds a binding for
'RMB + Control'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds hand rolled drawing of unicode box drawing[1] and
block elements[2] from ranges U+2500 up to U+259f. While using system
font for such characters will look better most of the time, the
characters tend to overlap or not align, so providing builtin font is
the lesser evil here.
[1] - https://www.unicode.org/charts/PDF/U2500.pdf
[2] - https://www.unicode.org/charts/PDF/U2580.pdf
Fixes #5485.
|
| |
|
|
|
|
|
| |
This adds the ability to pass title and class over IPC via the
create-window subcommand, so users can run only one instance for windows
of different spurposes in the window managers of their choice.
|
|
|
| |
Fixes #5717.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing behavior for the new CreateNewWindow actions was to always
pass in their own options, which would discard the existing options
configured on the terminal's PTY config.
To fix this the behavior for CreateNewWindow is now the same as for the
initial window creation, the config values are overwritten conditionally
based on their individual presence in the CLI options.
However all temporary CLI options set on the "master" Alacritty
instance are discarded by all future windows.
Fixes #5659.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing PID/FD atomics in alacritty_terminal/src/tty/unix.rs were
shared across all Alacritty windows, causing problem with the new
multiwindow feature.
Instead of sharing these between the different windows, the master FD
and shell PID are now stored on the `window_context`.
Unfortunately this makes spawning new daemons a little more complicated,
having to pass through additional parameters. To ease this a little bit
the helper method `spawn_daemon` has been defined on the
`ActionContext`, making it accessible from most parts of Alacritty's
event loop.
Fixes #5700.
|
|
|
|
|
|
|
|
|
| |
To allow applications spawned by Alacritty to make use of the
shell/foreground process' working directory, it is now set for all new
processes spawned by Alacritty on Unix platforms.
Fixes #5616.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
|
|
|
|
|
|
| |
Fixes #5603.
Fixes #5422.
Fixes #5350.
Fixes #4105.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Alacritty's `msg create-window` subcommand would previously inherit all
the CLI parameters from the original executable. However not only could
this lead to unexpected behavior, it also prevents multi-window users
from making use of parameters like `-e`, `--working-directory`, or
`--hold`.
This is solved by adding a JSON-based message format to the IPC socket
messages which instructs the Alacritty server on which CLI parameters
should be used to create the new window.
Fixes #5562.
Fixes #5561.
Fixes #5560.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current completions required a lot of domain-specific knowledge
about each individual shell and their completion functionality. Much of
which is sparsely documented.
While clap does not generate perfect completions, since parameters like
`-e` are missing completions, it does a reasonable job while requiring
no work on writing these completions.
Since access to `cli.rs` isn't possible from the `build.rs`, these
completions aren't always generated on build. Instead a test verifies
that there has been no changes to these completions and provides a
simple code sample for re-generating them. This should provide a simple
solution with minimal overhead.
|
|
|
|
|
| |
Fixes #5492.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
|
| |
Fixes #5586.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously Alacritty would always initialize only a single terminal
emulator window feeding into the winit event loop, however some
platforms like macOS expect all windows to be spawned by the same
process and this "daemon-mode" can also come with the advantage of
increased memory efficiency.
The event loop has been restructured to handle all window-specific
events only by the event processing context with the associated window
id. This makes it possible to add new terminal windows at any time using
the WindowContext::new function call.
Some preliminary tests have shown that for empty terminals, this reduces
the cost of additional terminal emulators from ~100M to ~6M. However at
this point the robustness of the daemon against issues with individual
terminals has not been refined, making the reliability of this system
questionable.
New windows can be created either by using the new `CreateNewWindow`
action, or with the `alacritty msg create-window` subcommand. The
subcommand sends a message to an IPC socket which Alacritty listens on,
its location can be found in the `ALACRITTY_SOCKET` environment
variable.
Fixes #607.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing cursor inversion logic was causing more problems than it
solved, without solving the problem of invisible cursor when inverting a
cell with matching foreground and background colors.
This patch reworks this logic and only inverts the cursor when the
foreground and background colors of the cursor are similar and the
cursor colors aren't set to fixed RGB values.
Fixes #4564.
Fixes #5550.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this change I went through all current rustfmt configuration options
and expanded our existing configuration with overrides whenever deemed
appropriate.
The `normalize_doc_attributes` option is still unstable, but seems to
work without any issues. Even when passing macros like `include_str!`
that is recognized properly and not normalized. So while this wasn't an
issue anywhere in the code, it should make sure it never will be.
When it comes to imports there are two new major additions. The
`imports_granularity` and `group_imports` options. Both mostly just
incorporate unwritten rules that have existed in Alacritty for a long
time. Unfortunately since `alacritty_terminal` imports in `alacritty`
are supposed to be separate blocks, the `group_imports` option cannot be
used.
|
|
|
| |
Fixes #5460.
|
|
|
| |
Fixes #5504.
|