Commit Graph
1593 Commits
Author SHA1 Message Date
Christian Duerr 9ece44e762 Add readline bindings to search
Fixes #3938.
2020-07-10 21:00:33 +00:00
Kirill Chibisov 1e595431c0 Fix clipboard not working on KDE Wayland
Fixes #3920.
2020-07-10 22:58:44 +03:00
Kirill Chibisov 8bd2c13490 Add option to run command on bell
Fixes #1528.
2020-07-10 22:32:44 +03:00
Kirill Chibisov b78f3d1339 Set default FreeType properties
In addition it also starts respecting Fontconfig's `autohint`
and `hinting` options.

Fixes #3534.
2020-07-10 21:54:35 +03:00
Christian Duerr 44f25493ca Bump urlocator and unicode-width 2020-07-10 02:26:57 +03:00
Kirill Chibisov 0210a43196 Fail compilation if Fontconfig is not installed on Linux/BSD
Statically linking Fontconfig was leading to slow startup and
various errors, so forcing the use of system's library.
2020-07-10 01:24:55 +03:00
Christian Duerr 46c0f352c4 Add regex scrollback buffer search
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.
2020-07-09 21:45:22 +00:00
Christian Duerr 9974bc8baa Fix cursor reflow
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.
2020-07-09 05:16:20 +03:00
Christian Duerr 65bff1878f Fix saved cursor handling
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.
2020-07-06 19:10:06 +00:00
Christian Duerr 72c916ff43 Preserve linewrap flag across alt screen switches
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.
2020-07-06 05:08:36 +00:00
Kirill Chibisov 92ea355eee Fix compilation on 32bit targets
Fixes #3915.
2020-07-04 15:19:07 +00:00
Andrew Zhou 466f95d3ba Add auxiliary files to macOS Application bundle
Fixes #2653.
2020-07-04 14:03:48 +00:00
Jeff Windsor e1474a1e5f Update --help for class option to match manpage 2020-07-04 09:13:32 +03:00
Christian Duerr 09179d06fd Document supported escape sequences
Fixes #3440.
2020-07-03 20:27:18 +00:00
Christian Duerr bc60782e42 Fix reflow of empty wrapped cursor line
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.
2020-07-01 09:58:06 +03:00
Carlo Abelli 8688e47ddb Fix foreground dimming with truecolor text
Fixes #3766.
2020-06-29 00:07:16 +00:00
Christian Duerr 341832f820 Rename alt_grid to inactive_grid
Since the alt_grid is not always the alternate screen buffer, the name
inactive_grid should fit much better.

Fixes #3504.
2020-06-28 19:12:37 +00:00
Kirill Chibisov 8a39346b75 Clear selection on clear line/screen escapes
Selection is now cleared if clear line or clear screen escape sequences
are clearing content behind it.
2020-06-26 16:04:55 +00:00
Christian Duerr 6c8966f426 Fix scroll down escape pulling lines from history
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.
2020-06-25 09:50:17 +00:00
Christian Duerr f0775b3c89 Fix live right-click expansion
While the commit 43c0ad6ea9 introduced
right click as a way to expand the active selection, it did not allow
for holding right click to continuously do so.

This commit remedies that problem by allowing live expansion with while
holding the right mouse button.
2020-06-24 08:29:07 +00:00
Kirill Chibisov 5eb0792c90 Remove checks on nightly from CI 2020-06-23 11:13:14 +00:00
Kirill Chibisov e4e0218ede Run rustfmt on sr.ht
This should provide more clear feedback whether rustfmt
job is failed or not.
2020-06-23 11:13:14 +00:00
Christian Duerr 43c0ad6ea9 Add selection expansion
This allows for expanding the selection using the right mouse button.
The new selection type depends on the number of clicks and applies to
both sides of the selection.

Fixes #1554.
2020-06-23 12:57:15 +03:00
Christian Duerr 87e5b1aa25 Add automatic scrolling during selection
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.
2020-06-18 01:02:56 +00:00
Kirill Chibisov d526649ee6 Use compile_error! instead of panic! in build.rs
The compile_error! failure is way more readable and noticeable than
panic!.
2020-06-15 23:01:21 +03:00
Kirill Chibisov b15b476371 Rework default config binding replacement
This reworks the criteria necessary for default bindings to be
overwritten by custom user bindings. It should provide a better
heuristic which accounts for the possibility that notmodes are added
which prevent a conflict between the bindings, so the default isn't
unnecessarily removed.

It is still possible to define a new binding that intersects a default
binding without the default getting removed, if the user explicitly
specifies a mode that doesn't include the default binding's mode. This
is based on the assumption that users explicitly specifying a new mode
are trying to make a mode-specific addition and are capable of removing
the default when desired.

This helps with old modes still being present in user's config files,
since a lot of new config options just have the additional ~Vi mode set.

Fixes #3476.
2020-06-15 03:12:39 +03:00
Steve Dondley 00870b2c5c Improve documentation for install on macOS via brew cask 2020-06-15 01:06:14 +03:00
Kirill Chibisov 6ee8717917 Add missing docs for ScrollHalfPageUp/Down 2020-06-09 21:25:34 +00:00
Christian Duerr 3c7a960121 Cleanup window.rs imports
The window.rs imports have been extremely messy due to heavy
platform-specific import usage. While some of them are just stray
imports for a single platform, a lot of these are specific to Linux/BSD.

To make these a little easier to read and maintain, the Linux/BSD
specific imports were grouped together, since this allows us to just
have a single platform annotation.

Most of our imports follow the order of how relevant and foreign these
imports are to Alacritty, putting our own frequently used imports at the
far bottom and STD with things people usually don't need to care about
at the top. Since platform specific imports are generally important to
fewer people, I've decided to put them before all the other imports
rather than behind them.
2020-06-08 02:09:07 +00:00
Kirill Chibisov 3233ede028 Update dependencies 2020-06-07 01:07:22 +03:00
Kirill Chibisov 4f5f841296 Remove copypasta dependency from alacritty_terminal 2020-06-07 00:33:20 +03:00
Christian Duerr 7aafbb757d Remove copyright notice from files
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.
2020-06-06 21:49:14 +03:00
Kirill Chibisov de3437bcd6 Fix class and cursor thickness deserialization
Fixes #3820.
2020-06-05 22:31:57 +00:00
Kirill Chibisov f99220f015 Refactor Shell, Command, and Launcher to share impl 2020-06-05 01:10:31 +03:00
Jade Michael Thornton 1e32e5a515 Fix font rendering regression on macOS
This fixes a regression introduced in
77f2d6e853.

Fixes #3809.
2020-06-04 20:24:09 +00:00
Christian Duerr e6475c6753 Add version 0.4.3 entries to changelog 2020-06-03 19:52:50 +00:00
Fernando e009869623 Add whitespace after dropped file paths
Fixes #3767.
2020-06-03 00:01:26 +00:00
David Hewitt c102e845cd Add cargo feature for WinPTY 2020-06-02 21:31:06 +00:00
Christian Duerr 1dacc99183 Refactor Term/Grid separation
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`.
2020-05-30 20:45:44 +00:00
Kirill Chibisov f7fb67f870 Update dependencies 2020-05-30 22:54:56 +03:00
Christian Duerr f1bf481eb8 Remove env_logger depedency
The env logger has been broken for over a year and is not used by anyone
as far as I know. This removes this option entirely in favor of
Alacritty's built-in logger level selection flags.
2020-05-29 06:22:16 +00:00
Christian Duerr 2b2b2bfd2a Add documentation about patch releases 2020-05-27 19:39:44 +03:00
Kirill Chibisov a669f12793 Set IUTF8 input setting on supported platforms
Fixes #3769.
2020-05-27 18:24:01 +03:00
Kirill Chibisov a14c51797f Fix build warnings on macOS/Windows 2020-05-27 14:46:52 +00:00
Matthias Krüger 88d87cfa86 Remove unused dependencies 2020-05-24 00:52:47 +00:00
Kirill Chibisov 69a9ee5e0e Update dependencies 2020-05-24 02:52:36 +03:00
Kirill Chibisov 0f82817c03 Update copypasta to v0.7.0
Fixes #3592.
2020-05-21 01:22:39 +03:00
Casper Rogild Storm ab1f173ccd Add subpixel anti-aliasing support on macOS 10.14+ 2020-05-17 21:14:13 +00:00
Christian Duerr 395fee2b01 Fix crash when writing wide char in last column
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.
2020-05-17 15:32:06 +00:00
Christian Duerr 922f48e52c Bump winit to 0.22.2
Fixes #2601.
Fixes #2475.
2020-05-16 23:31:00 +00:00