1772 Commits
Author SHA1 Message Date
Christian Duerr 5ac8060bf4 Bump version to 0.7.2 alacritty_terminal_v0.13.0 v0.7.2 2021-02-19 23:59:48 +00:00
Christian Duerr 917eeb5cf2 Bump version to 0.7.2-rc2 v0.7.2-rc2 2021-02-16 20:54:23 +00:00
Jason 99836ac7b9 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-02-16 20:54:23 +00:00
Christian Duerr 1f4a46b616 Bump version to 0.7.2-rc1 v0.7.2-rc1 2021-02-14 20:43:13 +00:00
Christian Duerr 284f35dbaf Update dependencies
This introduces some duplicate dependencies, though they are necessary
to build properly without any warnings.

Fixes #4735.
2021-02-14 20:43:13 +00:00
Nathan Lilienthal 8b4c8e9d6b 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-14 20:43:13 +00:00
Christian Duerr 5e8c9f1616 Fix segmentation fault on shutdown with Wayland
Fixes #4702.
2021-02-14 20:43:13 +00:00
r-c-f 9ddd660da1 Fix assertion crash on 32-bit systems
Fixes #4687.
2021-02-14 20:43:13 +00:00
Christian Duerr a852eb85d5 Bump version to 0.7.1 v0.7.1 2021-01-09 11:39:35 +00:00
Christian Duerr 1386887983 Bump version to 0.7.0-rc1 v0.7.1-rc1 2021-01-08 21:54:38 +00:00
Christian Duerr 8e74e57bad Fix jumping between matches in reverse vi search
Fixes #4676.
2021-01-08 21:54:38 +00:00
Christian Duerr 97fc6c7777 Bump version to 0.7.0 alacritty_terminal_v0.12.0 v0.7.0 2021-01-08 12:04:41 +00:00
Christian Duerr e6c4a2b085 Bump version to 0.7.0-rc2 v0.7.0-rc2 2021-01-03 11:49:30 +00:00
Christian Duerr 42b41cee94 Fix debug mode crash in vi-less search 2021-01-03 11:49:30 +00:00
Christian Duerr eaabba19d8 Update vte to 0.10.0 2021-01-03 11:49:30 +00:00
Christian Duerr 3d2d0ab700 Bump version to 0.7.0-rc1 v0.7.0-rc1 2021-01-02 03:04:43 +00:00
Christian Duerr 56097de74e Fix deserialization of untagged enums
Fixes #4634.
2021-01-02 02:30:52 +00:00
Christian Duerr 43ea180d8e Fix movement between matches in vi-less search
This resolves various bugs related to vi-less search. The primary issue
was that when jumping between matches more than 1000 lines apart, the
search would get stuck and not advance between matches properly due to
the 1000 line synchronous search limit.

Some other issues related to the tracking of the search origin have also
been fixed, improving the viewport positioning while interacting with
the search outside of vi mode. This was done by keeping the search
origin outside of the viewport, which allows for search to start right
at the first character. Previously the search was on top of the first
character which lead to it being excluded from search.

Fixes #4626.
2021-01-01 09:21:02 +00:00
Christian Duerr a1e2d6a557 Add vi/search line indicator
This adds a new visual indicator which shows the position in history of
either the display offset during search, or the vi mode cursor.

To make it as unintrusive as possible, the overlay is hidden whenever
the vi mode cursor collides with its position.

Fixes #3984.
2021-01-01 05:19:03 +00:00
Christian Duerr 8ed72cc065 Remove Windows WinPTY backend 2021-01-01 05:07:39 +00:00
Christian Duerr 1723e30d25 Use ConfigDeserialize for all config enums
This fixes up all of the remaining enums which are used in the
configuration file to make sure they all support fully case insensitive
deserialization.

Fixes #4611.
2020-12-31 05:52:45 +00:00
Christian Duerr 0aa1df327b Add default binding to cancel search on Ctrl+C
Fixes #4612.
2020-12-31 05:33:58 +00:00
Christian Duerr d0301ef655 Fix Wayland crash due to fontconfig
Fixes #4591.
2020-12-31 05:21:23 +00:00
Christian Duerr 0790605adf Fix characters getting swallowed during IME input
This reverts 1d00883 since it is not necessary anymore after all search
bindings are now proper key bindings. This fixes a bug which would cause
the first character to be swallowed when using IME after triggering any
key binding which doesn't send any `ReceivedCharacter` event.

Fixes #4588.
2020-12-31 05:06:15 +00:00
Christian Duerr 65f6e22bb4 Fix readme image alt description 2020-12-29 23:47:53 +00:00
Christian Duerr 3d7b16d4b0 Update Alacritty's description
Alacritty's description in the readme and manpage has always been a bit
overly aggressive in its marketing. This new updated text should more
accurately describe Alacritty's current state without pointlessly
agitating people.
2020-12-29 20:05:19 +00:00
Christian Duerr 3a54ce899e Fix missing glyphs crash on Windows
Fixes #4617.
2020-12-29 00:05:18 +00:00
Kirill Chibisov 12fbd0051c Draw cursor with rect renderer
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.
2020-12-28 09:45:39 +00:00
Kirill ChibisovandChristian Duerr fdc10d270e Hide "missing" glyp for zerowidth character
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>
2020-12-23 22:28:41 +00:00
Christian Duerr f19cbca9b4 Disable shadows for transparent windows on macOS
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.
2020-12-22 04:25:43 +00:00
Caden HausteinandChristian Duerr 8982000f01 Remove terminfo dependency
Fixes #4597.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-12-22 02:38:50 +00:00
Christian Duerr 5725f5812c Fix artifacts on macOS with transparent windows
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.
2020-12-21 06:40:22 +00:00
Christian Duerr 6e1b9d8b25 Replace serde's derive with custom proc macro
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.
2020-12-21 02:44:38 +00:00
Christian Duerr 37a3198d88 Fix embedded _NET_WM_ICON on X11
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.
2020-12-20 07:57:03 +00:00
Christian Duerr f016a209b4 Add search history support
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.
2020-12-20 04:27:08 +00:00
Christian Duerr 8a7f8c9d3e Add separate mode for search bindings 2020-12-19 04:07:20 +00:00
Kirill Chibisov 116faba7c6 Fix crash due to clipboard not being properly released on Wayland 2020-12-17 15:15:17 +03:00
Christian Duerr c065c5f2f9 Fix invalid ESC escape sequence parsing
This strictens the ESC escape sequence parser to prevent invalid
intermediates from being ignored. Previously the parser would just look
at the first intermediate without validating that the rest of them is
empty.

If an escape like `\e(#0` is used now, it will no longer be accepted as
`\e(0` since the intermediate `#` is also present.
2020-12-17 01:05:40 +00:00
Christian Duerr 1e9b550f44 Increase file watcher delay on BSD
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.
2020-12-17 00:52:03 +00:00
Christian Duerr bb4fddd593 Fix draining of PTY when holding on exit
Fixes #4189.
2020-12-17 00:39:15 +00:00
Ray Hong b4dccbe526 Fix typo in .editorconfig 2020-12-14 06:46:28 +00:00
Christian Duerr 4de1048628 Fix live reload with broken yaml on start
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.
2020-12-14 00:22:16 +00:00
Christian Duerr f701b22c2d Fix cursor reports with mouse outside of window
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.
2020-12-13 05:59:30 +03:00
Kirill Chibisov 6b208a6958 Bump glutin to 0.26.0
Fixes #4530.
Fixes #4072.
Fixes #1927.
2020-12-11 00:40:32 +00:00
Kirill Chibisov b002204754 Remove live-shader-reload feature
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.
2020-12-10 09:38:32 +03:00
Kirill Chibisov 8e6a608b2d Print multiline logs in one write call
Fixes potential split of multiline logs in the multithreaded context
by writing them all at once.
2020-12-10 09:00:54 +03:00
Ivan Avdeev 5ececc3105 Render underline and strikeout rects in batches
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.
2020-12-10 05:42:03 +00:00
Christian Duerr 4975be29df Fix scrolling region performance with fixed lines
This resolves an issue with Alacritty's scrolling region performance
when there's a number of fixed lines at the top of the screen. This
affects commonly used applications like tmux or vim.

Instead of using separate logic for when the scrolling region starts at
the top of the screen without any fixed lines, the code should now try
to figure out the target position of these fixed lines ahead of time,
swap them into place and still perform the optimized implementation to
move the grid.

This comes with the small trade-off that since lines are swapped before
rotating the screen without clearing or removing any lines during the
rotation process, that the places the fixed lines have been swapped with
will appear out of order when using scrolling regions in the primary
screen buffer. Since the use of scrolling regions primarily affects the
alternate screen and most terminals don't keep any history at all, this
should however not cause any problems.
2020-12-10 02:10:24 +00:00
Christian Duerr e924c8441d Remove alacritty.spec
Since Alacritty is now officially packaged by Fedora, it is no longer
necessary to provide this in the official repository.
2020-12-08 23:20:36 +00:00
Christian Duerr 9e71002e40 Fix dimming of indexed colors
It seems like the list of colors might have changed a bit, leading to
indexed colors not being transformed into their dim colors correctly.

To prevent this from happening in the future, the dimming for colors in
the range '0..=7' is now performed by offsetting them from the
'NamedColor::DimBlack'. Since this is the first dimmed color, this
should always work as long as all dimmed colors are added in the correct
order.
2020-12-05 12:03:03 +03:00