Age | Commit message (Collapse) | Author |
|
To make sure that output is consistent even while resizing the window,
the cursor will now reflow with the content whenever the window size is
changed.
Since the saved cursor is more likely to represent a position in the
grid rather than a reference to the content below it and handling of
resize before jumping back to it is more likely than with the primary
cursor, no reflow is performed for the saved cursor
The primary cursor is unfortunately always reflowed automatically by
shells like zsh, which has always caused problems like duplicating parts
of the prompt and stretching it out "infinitely". Since the cursor is
now reflowed appropriately the duplication of the shell prompt should be
reduced, however it is possible that the shell moves the cursor up one
line after it has already been reflowed, which will cause a line of
history to be deleted if there is no duplicated prompt line above the
reflowed prompt. Since this behavior is identical in VTE and Kitty, no
attempt is made to work around it in this patch.
Fixes #3584.
|
|
This resolves several problems with handling of the saved cursor when
switching between primary and alternate screen. Additionally ref-tests
are also added for all common interactions to make sure the behavior
does not regress.
The behavior is based on XTerm's behavior except for interaction with
`reset`. XTerm does not reset the alternate screen's saved cursor on
`reset`, but VTE does. Since a `reset` should reset as much as possible,
Alacritty copies VTE here instead of XTerm.
|
|
While neither VTE, URxvt nor Kitty handle this, preserving the linewrap
flag across alternate screen switches seems like the correct thing to
do. XTerm also does handle this correctly, which indicates that it is a
bug and not a feature.
|
|
Fixes #3440.
|
|
This bug was caused by trying to grow the terminal while the cursor line
was wrapped but entirely empty. Resizing the terminal now accounts for
the position of the deleted line and moves the cursor up only when the
line deleted was above it.
The deletion of the line was caused by the shell redrawing itself
whenever the cursor is moved.
Fixes #3583.
|
|
Fixes #3766.
|
|
Since the alt_grid is not always the alternate screen buffer, the name
inactive_grid should fit much better.
Fixes #3504.
|
|
Selection is now cleared if clear line or clear screen escape sequences
are clearing content behind it.
|
|
This works around a bug where the optimized version of the
`Grid::scroll_down` function would just rotate the entire grid down if
the scrolling region starts at the top of the screen, even if there is
history available.
Since rotations of scrolling regions should not affect the scrollback
history, this optimized version is now only called when the max
scrollback size is 0, making it impossible for the grid to have any
history while it is used.
Since the main usecase of this is the alternate screen buffer, which
never has any history, the performance should not be affected negatively
by this change.
Fixes #3582.
|
|
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.
|
|
Fixes #3820.
|
|
|
|
|
|
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`.
|
|
Fixes #3769.
|
|
This resolves an issue where trying to write a fullwidth character in
the last column would crash Alacritty, if linewrapping was disabled.
Instead of assuming that the linewrap put after the linewrapping spacer
was successful, the character writing is now skipped completely when
trying to put a wide character in the last column.
|
|
Fixes #3404.
|
|
|
|
|
|
Fixes #2800.
Fixes #2566.
|
|
Fixes #3290.
|
|
Fixes #3526.
|
|
Fixes #2092.
|
|
|
|
After two previous PRs already removed some instances of
reimplementations of the `fs::read_to_string` functionality, this
removes the last remaining occurence and with it all instances of
`File::open`. So this should remove them all for good.
|
|
This fixes a regression introduced in 4cc6421, which ignored the main
grid's cursor when increasing the number of lines available, causing
incorrect cursor position after restoring to the primary screen.
Additionally another similar bug has been fixed where the grid was not
scrolled correctly when shrinking while in the alternate screen.
When the grid is resized multiple lines at once, there was also an issue
with Alacritty either pulling all lines from history or none at all,
instead of mixing both approaches and pulling just what is required.
This lead to incorrect cursor positions when the resize could partially
make use of history.
Fixes #3499.
|
|
This resolves a bug where the very first/last cell would still be
selected when both the start and the end were below/above the viewport.
|
|
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 enables live config reload for the window title. This includes
updating the title after it has been pushed and popped from the title
stack.
The dynamic title option also isn't disabled automatically anymore when
the title is set in the config. If the title is set from CLI, the
behavior is unchanged and dynamic title changes are still disabled.
If the dynamic title is disabled in the config, the title is still
updated when the config title is changed. Dynamic title now only
prevents changes to the UI's title.
|
|
This commit adds two cargo features `x11` and `wayland` to pick
Linux/BSD backends, with both enabled by default.
Fixes #3340.
|
|
This resolves a bug where the selection start would be set to the number
of columns, causing an out of bounds when trying to index with it.
Instead of extending the selection beyond the grid when the right side
of the last column is the start of the selection, the selection will now
start in the beginning of the next line.
Fixes #3446.
|
|
This resolves an issue with the selection clamping, where no selection
would be rendered at all when the start was above the viewport while the
end was below it.
|
|
This removes the `debug.ref_test` option from the configuration file,
after this change was originally requested from kchibisov in
https://github.com/alacritty/alacritty/pull/3396.
While this option is valueable for the CLI, it provides no value in the
configuration file.
|
|
Fixes #3367.
|
|
This completely removes the tabspaces option from the Alacritty
configuration, due to frequent misuse of it. Based on some research,
none of the terminal emulators support setting the value for tabspaces
or read the terminfo to determine init_tabs value at startup. The tested
terminal emulators were URxvt, XTerm, and Termite.
|
|
This resolves an issue with tabs not breaking across line boundaries,
instead the characters would just all get written to the last column and
thus be lost.
It also tweaks the behavior of what happens when the terminal resizes
with the default tabspaces changed, using something like the `tabs`
program. Previously all tabstops would be reset to the default on
resize, which is what URxvt does. Now the tabspaces are kept and the new
columns are filled with the default tabstops, which emulates Termite.
|
|
Due to incorrect log target in the color config errors, the message bar was not
cleared when the error was fixed.
|
|
|
|
|
|
The block selection will now only insert extra newline characters after
each line if the last line isn't already included. This resolves an
issue with duplicate newlines, since newlines are automatically appended
when the last column is part of a selection.
Fixes #3304.
|
|
This resolves an issue in the parser where it would stop as soon as the
first unknown value is encountered in private mode/sgr attribute
escapes.
Fixes #3339.
|
|
Regression was introduced in 4cc6421daa4ff5976ab43c67110a7a80a36541e5,
however it was working before only due to grid.len() bug.
|
|
Fixes #3247.
|
|
This reverts commit 7f4dce2ee04859fb0b48f15cf808b60065778703.
Originally it was assumed that macOS always sends the \x7f on backspace
anyways, however this is not true. It seems like the character on
backspace can change even within the same terminal session, so we need
to have our own binding to reliably set the correct binding.
A solution for #1606 should be implemented in cooperation with winit.
|
|
Instead of trying to expand the start and end of a selection across
full-width glyphs, the selection should now only go from its origin to
the end without any kind of expansion.
Instead, the expansion is now done where the cells are actually checked
for their selection status, expanding across the entire full-width glyph
whenever any part of it is selected.
Fixes #3106.
|
|
Fixes #3091.
|
|
|
|
|