Commit Graph
1808 Commits
Author SHA1 Message Date
Christian Duerr 1f46bb7b92 Add hint action for moving the vi cursor
Fixes #4319.
2021-04-15 21:25:49 +00:00
Christian Duerr 05917b2740 Fix initial vi cursor position while in scrollback
Fixes #4968.
2021-04-14 19:39:35 +00:00
Christian Duerr 37f638fc42 Fix hint label with start above viewport
Fixes #4960.
2021-04-14 03:47:10 +00:00
Christian Duerr 7f31275e74 Fix URL highlight in mouse mode without shift
This resolves a regression introduced in 96fc9ec where URLs would get
highlighted on mouse hover while mouse mode is active even when the
shift modifier was not held down.
2021-04-14 01:05:20 +00:00
Christian Duerr 96fc9ecc9a Add vi/mouse hint highlighting support
This patch removes the old url highlighting code and replaces it with a
new implementation making use of hints as sources for finding matches in
the terminal.
2021-04-13 03:24:42 +00:00
Kam Kudla 40bcdb1133 Add hide other windows binding on macOS
Fixes #3697.
2021-04-08 21:01:47 +00:00
Richard Steinmetz 78953e4f7e Fix automatic scrolling on resize 2021-04-08 20:29:47 +00:00
Christian Duerr cbcc129440 Add copy/paste/select hint actions
This adds some built-in actions for handling hint selections without
having to spawn external applications.

The new actions are `Copy`, `Select` and `Paste`.
2021-04-03 23:52:44 +00:00
Christian Duerr 531e494cf9 Fix focused match selection color
In 3bd5ac221a a regression was introduced
which caused the selection of a focused match to invert the cell color
back to its original color. This was due to the removal of the
`is_match` flag on the renderable cell, which was used to make sure a
cell is not marked as part of a match if it is already part of a
selection.

Instead of relying on a flag that is passed through from content.rs, the
application of the cell colors is instead done in the content.rs file
directly. This not only fixes the bug with selecting the focused match,
but also makes the logic a bit more transparent.

Fixes #4934.
2021-04-02 21:36:35 +00:00
Richard SteinmetzandChristian Duerr 58cae8f2ed Keep viewport in place during resize
Fixes #4879.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2021-03-31 19:11:16 +00:00
Christian Duerr 3bd5ac221a Unify the grid line indexing types
Previously Alacritty was using two different ways to reference lines in
the terminal. Either a `usize`, or a `Line(usize)`. These indexing
systems both served different purposes, but made it difficult to reason
about logic involving these systems because of its inconsistency.

To resolve this issue, a single new `Line(i32)` type has been
introduced.  All existing references to lines and points now rely on
this definition of a line.

The indexing starts at the top of the terminal region with the line 0,
which matches the line 1 used by escape sequences. Each line in the
history becomes increasingly negative and the bottommost line is equal
to the number of visible lines minus one.

Having a system which goes into the negatives allows following the
escape sequence's indexing system closely, while at the same time making
it trivial to implement `Ord` for points.

The Alacritty UI crate is the only place which has a different indexing
system, since rendering and input puts the zero line at the top of the
viewport, rather than the top of the terminal region.

All instances which refer to a number of lines/columns instead of just a
single Line/Column have also been changed to use a `usize` instead. This
way a Line/Column will always refer to a specific place in the grid and
no confusion is created by having a count of lines as a possible index
into the grid storage.
2021-03-30 23:25:38 +00:00
Stokhos 974392cdc6 Fix cursor thickness on wide cells
Fixes #4922.
2021-03-28 18:02:12 +00:00
Serban Constantin 17923efccf Fix URLs opening in explorer on Windows 2021-03-15 14:27:57 +00:00
Matthias Krüger 5aa02816c4 Fix inconsistent_struct_constructor clippy lint 2021-03-12 19:40:18 +00:00
Christian Duerr d5dd009a6d Fix vi mode search
This fixes a regression introduced in a954e07 which caused the vi mode
cursor to be invisible after starting a search.

This was caused by a discrepancy between the search DFA and search
active state, since a search is not active after it has been confirmed
but the DFAs are still present for highlighting.
2021-03-06 03:18:48 +00:00
Christian Duerr a954e076ca Add regex terminal hints
This adds support for hints, which allow opening parts of the visual
buffer with external programs if they match a certain regex.

This is done using a visual overlay triggered on a specified key
binding, which then instructs the user which keys they need to press to
pass the text to the application.

In the future it should be possible to supply some built-in actions for
Copy/Pasting the action and using this to launch text when clicking on
it with the mouse. But the current implementation should already be
useful as-is.

Fixes #2792.
Fixes #2536.
2021-03-01 19:50:39 +00:00
Christian Duerr 772afc6a8a Remove incorrect changelog entry
Since the bug was not present in the 0.7.2 release, there is no need to
add a changelog entry for this fix.
2021-03-01 00:50:47 +00:00
r-c-f 557b28d0ac Add Windows version requirements to readme
Fixes #4846.
2021-02-28 17:12:24 +00:00
Christian Duerr edfcb81339 Run clippy on MSRV
Since not all suggested clippy lints by stable clippy are supported on
the MSRV of Alacritty, this commit moves the clippy checks to the MSRV.

Unfortunately this will mean that our lints might be significantly
behind, however it ensures our CI never blocks any code that should be
valid.

Developers themselves of course can still run the latest clippy to
follow the up to date recommendations.
2021-02-27 15:06:22 +00:00
Kirill Chibisov 72b341425d Fix hollow block cursor being drawn for hidden cursor
Commit 530de00 refactored large chunk of Alacritty's internal handling
of renderable cells, cursors, and such. This patch fixes a regression
where a hollow block cursor was drawn for unfocused windows even if the
terminal cursor was hidden.
2021-02-26 20:36:38 +00:00
Christian Duerr ea24a106e9 Fix vi cursor after leaving search
This resolves an issue which caused the vi cursor position to be
incorrect when leaving the search with the vi cursor at the far bottom.

Previously this could lead to the vi cursor disappearing completely,
when starting a vi mode search that has a match on the last line while
the original vi mode cursor was right above it.

Fixes #4833.
2021-02-26 19:54:09 +00:00
Christian Duerr 9999bd53e1 Add sync update terminfo and docs
This adds documentation stating that Alacritty supports the synchronized
update escape, which was implemented in 9575aed.

Since tmux does check terminfo for this feature, the `Sync` capability
has also been added. Tmux's implementation can be found here:

https://github.com/tmux/tmux/blob/f5b7ebc540fe3db5c3a5fe97d01de44551e76058/tty-features.c#L185
2021-02-24 18:20:47 +00:00
Bastien Orivel 8409d7d5e2 Bump base64 to 0.13.0 2021-02-24 17:52:35 +00:00
Christian Duerr 9575aed681 Add support for synchronized updates
This implements support for temporarily freezing the terminal grid to
prevent rendering of incomplete frames.

This can be triggered using the escapes `DCS = 1 s` (start) and
`DCS = 2 s` (end).

The synchronization is implemented by forwarding all received PTY bytes
to a 2 MiB buffer. This should allow updating the entire grid even if it
is fairly dense. Unfortunately this also means that another branch is
necessary in Alacritty's parser which does have a slight performance
impact.

In a previous version the freezing was implemented by caching the
renderable grid state whenever a synchronized update is started. While
this strategy makes it possible to implement this without any
performance impact without synchronized updates, a significant
performance overhead is introduced whenever a synchronized update is
started. Since this can happen thousands of times per frame, it is not a
feasible solution.

While it would be possible to render at most one synchronized update per
frame, it is possible that another synchronized update comes in at any
time and stays active for an extended period. As a result the state
visible before the long synchronization would be the first received
update per frame, not the last, which could lead to the user missing
important information during the long freezing interval.

Fixes #598.
2021-02-24 16:16:38 +00:00
Christian Duerr 64abd7fb43 Match intermediates directly in CSI parser
There's no point in always trying to access the first field of the
intermediates when the only goal is figuring out that there is none.

Matching on all intermediates should make it possible to easily match
multiple intermediates directly using array matchers.
2021-02-24 16:16:38 +00:00
Christian Duerr 35e6fdaddd Fix selection after search without match
This resolves an issue where the last match would be selected after
leaving non-vi search, even if further changes to the search regex did
not result in any matches.

Fixes #4831.
2021-02-22 23:54:12 +00:00
Christian Duerr 369c927d9d Add version 0.7.2 to changelog 2021-02-20 00:33:02 +00:00
Mikhail "L117" Nikolenko 4f22e6f518 Add Drop implementations for OpenGL structures 2021-02-19 19:00:10 +00:00
Christian Duerr 3dafec076b Fix search freezing Alacritty
This resolves a regression introduced in 530de00 where searching would
cause a deadlock when the viewport is at the bottom of the scrollback
and a match ends in the last cell.

Fixes #4800.
2021-02-18 20:27:52 +00:00
Christian Duerr 6f1ddf7010 Fix cursor position when scrolled into history
This fixes a regression introduced in 530de00, where the terminal cursor
would move up when the user scrolled up in the terminal history, rather
than staying in place.

Fixes #4784.
2021-02-18 04:25:50 +00:00
Christian Duerr fc87aaa4b1 Limit the maximum DPR on X11 to 10
Since there have a bunch of problems caused by an excessive DPI reported
by XRandr, this limits the maximum DPR on X11 to 10.

These issues would commonly cause problems like long startup times or
crashes, which are hard to troubleshoot for the user. While a limit of
10 might not eliminate all of these issues, it should still make it
possible for Alacritty to start to make troubleshooting simpler.

Fixes #3214.
2021-02-15 14:58:12 +00:00
Christian Duerr d872b9f3ae Update dependencies
This introduces some duplicate dependencies, though they are necessary
to build properly without any warnings.

Fixes #4735.
2021-02-13 18:15:57 +00:00
Nathan Lilienthal a5e2ccd5ab Fix the estimated DPR to 1 on Wayland.
On Wayland, regardless of the underlying scale factor for an output, The
scale factor is 1.0 until we receive the first DPRChanged event. To
correctly calculate the window sizes, we must use a DPR of 1.0 as well.

Ideally we would know what the DPR of the window we're being opened in
is going to be, and avoid the estimation guessing game, but that doesn't
seem possible with the current interfaces provided by the window
systems.
2021-02-04 09:30:10 -05:00
Christian Duerr 73759da0f5 Fix segmentation fault on shutdown with Wayland
Fixes #4702.
2021-01-29 22:41:15 +00:00
Ben Denhartog cb46f0e1ac Remove --dimensions/-d from bash completions 2021-01-29 20:29:26 +00:00
Christian Duerr a3bc380956 Fix damage tracking on Wayland
Since the Wayland event loop might delay rendering across event loop
callback executions, it's necessary to track the global damage globally
rather than just within a single loop execution.

Fixes #4736.
2021-01-27 16:21:38 +00:00
Christian Duerr 530de00049 Move renderable cell transformation to alacritty
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.
2021-01-24 21:45:36 +00:00
James McCoyandChristian Duerr 7291702f6b Remove all rustc benchmarks
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2021-01-21 19:45:33 +00:00
Christian Duerr 753c4ed19e Fix dead Alacritty talk link in readme 2021-01-18 11:17:04 +00:00
Jason 34435ed776 Update shell completions
This fixes the shell completion by removing the flags removed from the
CLI in 0768428 and adding the new options flag.
2021-01-17 11:22:06 +00:00
Khinenw 3ed9f9ac38 Add IME support for Windows 2021-01-15 08:48:30 +00:00
Christian Duerr 80f7adf20f Fix typo in README.md 2021-01-12 20:09:44 +00:00
Christian Duerr ab9d5a7452 Add minimum OpenGL version to readme
Fixes #4693.
2021-01-12 13:51:32 +00:00
r-c-f aefffde539 Fix assertion crash on 32-bit systems
Fixes #4687.
2021-01-11 12:42:06 +00:00
Alex Touchet 7045a1ec07 Fix readme logo icon URL 2021-01-09 17:05:25 +00:00
Christian Duerr 1260c4bf6f Fix jumping between matches in reverse vi search
Fixes #4676.
2021-01-08 16:40:45 +00:00
Christian Duerr c566f78c3e Remove the GitHub pull request template
The template itself never provided much of a benefit and just causes
additional work for every single PR that is opened. That makes it easier
to just remind people after the PR was created than putting it in the
description so contributors always have to remove it.
2021-01-07 05:32:06 +00:00
Christian Duerr fb9b362b6e Fix inefficient search initialization
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.
2021-01-07 05:19:37 +00:00
Arthur Woimbée 9f560b3e11 Update cargo lockfile
Fixes #4664.
2021-01-06 09:54:18 +00:00
Christian Duerr 6ff4e840f8 Bump development version to 0.8.0-dev
This is only an update to the development version and does not represent
a stable release.
2021-01-04 09:55:13 +00:00