Commit Graph
1705 Commits
Author SHA1 Message Date
Christian Duerr 2bb2ed817b Bump development version to 0.7.0-dev
This is only an update to the development version and does not represent
a stable release.
2020-11-15 13:38:46 +00:00
Christian Duerr c5340a2ccc Fix unused import warning
This fixes an unused import warning introduced with 198d3cb.
2020-11-15 00:48:23 +00:00
Kirill ChibisovandChristian Duerr 2a16cc5155 Fix zerowidth characters in the last column
This commit fixes the issue that when attempting to write zerowidth
characters into the last column, it is written in the second to last
column instead.

Fixes #4227.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-11-15 00:28:03 +00:00
Kirill Chibisov 198d3cb78d Load only gl 3.3 functions
This commit makes 'gl::load_with' only load
symbols from the minimal OpenGL (3.3) version alacritty
aims to support. Doing so reduces the size of gl_bindings.rs
from 21K LoC to 11K LoC, and also the actual
loading by up to ~2x, thugh the loading is usually sub millisecond
anyway.
2020-11-14 21:48:24 +03:00
Kirill Chibisov 9531e661b1 Feature gate 'image' when building without x11 feature
On Wayland there's no way to embed icon into the window,
thus there's no point in loading it when x11 feature is disabled.
2020-11-14 21:10:26 +03:00
Christian Duerr c63bdf5cb9 Fix github releases tag pattern 2020-11-14 03:51:40 +00:00
Christian Duerr bfb1a571d1 Update vte to 0.9.0 2020-11-13 18:47:44 +00:00
Christian Duerr 9a78449876 Add ability to select text during search
This removes the restriction of not being able to select text while the
search is active, making it a bit less jarring of a UX when the user
tries to interact with the terminal during search.

Since the selection was used during vi-less search to highlight the
focused match, there is now an option for a focused match color, which
uses the inverted normal match color by default. This focused match is
used for both search modes.

Other mouse interactions are now also possible during search, like
opening URLs or clicking inside of mouse mode applications.
2020-11-13 08:40:09 +03:00
Kirill Chibisov b6d94e7b13 Fix use after free when dropping zerowidth data
Commit ec42b42ce6 added an optional
pointer for each cell, thus some old code that was optimizing copying
with 'ptr::copy' was duplicating "unique" pointers ('Box'), which was
resulting in use after free, after attempting to free both of these
pointers.

By replacing these unsafe blocks with safe Rust, the issue itself is
fixed and the potential for future memory problems is eliminated from
this area of the code.
2020-11-13 02:22:28 +00:00
Matthew Neal 7203f226fc Add g++ to Fedora build dependency documentation
Fixes #4400.
2020-11-10 19:33:46 +00:00
Kirill Chibisov 9a851fdbb1 Fix sr.ht clippy job
This commit brings back '--all-targets' parameter for clippy,
which was accidentally removed in dae0145.
2020-11-10 15:47:49 +00:00
Christian Duerr dae014511d Fix github actions clippy job 2020-11-10 04:36:19 +03:00
Kirill Chibisov 78f6cc4086 Update wayland-rs to 0.28.2
Fixes #4385.
2020-11-09 11:30:01 +00:00
Christian Duerr 5fd792fc9b Fix configuration file formatting
The configuration file, especially the section documenting the different
binding actions, had some extremely long lines. All the text is now
reformatted to be at most 80 columns wide.

The only lines remaining which are beyond 80 columns wide are the
configuration bindings, which would significantly suffer from linebreaks
and are not plain text.
2020-11-07 05:17:32 +00:00
Nathan Lilienthal 4fc35f6038 Spawn new alacritty processes in CWD on macOS
On macOS we can use 'proc_pidinfo' to determine the working
directory of the terminal foreground process.

Fixes #1979.
2020-11-07 04:48:48 +00:00
Christian Duerr 43d1afbeeb Migrate from Travis CI to GitHub Actions
This removes all CI builds from travis-ci, due to their recent changes
in policy and harsh limitations on builds. With build times over 2
hours, it was a significant hindrance to development.

Instead of Travis CI, the CI is now split on Sourcehut and GitHub. Since
Sourcehut only supports Linux/BSD, all builds on those operating systems
are executed there. The GitHub Actions CI is used to build for
Windows/macOS, which are not available on Sourcehut.

Since asset deployment for releases requires builds on all platforms,
this is also done on GitHub actions. Though the new `upload_asset.sh`
script makes sure that migration in the future is fairly simple and we
do not tie ourselves to the overly complicated GitHub Actions ecosystem.
2020-11-06 23:52:56 +00:00
Christian Duerr 3957a2555d Deprecate the WinPTY backend 2020-11-06 17:33:02 +00:00
Kirill Chibisov 812c8bc14a Add editorconfig
This commit also purges .gitignore, since the files mentioned in it
should be handled by global ignore file.

Fixes #4378.
2020-11-06 05:12:29 +03:00
Christian Duerr ec42b42ce6 Use dynamic storage for zerowidth characters
The zerowidth characters were conventionally stored in a [char; 5].
This creates problems both by limiting the maximum number of zerowidth
characters and by increasing the cell size beyond what is necessary even
when no zerowidth characters are used.

Instead of storing zerowidth characters as a slice, a new CellExtra
struct is introduced which can store arbitrary optional cell data that
is rarely required. Since this is stored behind an optional pointer
(Option<Box<CellExtra>>), the initialization and dropping in the case
of no extra data are extremely cheap and the size penalty to cells
without this extra data is limited to 8 instead of 20 bytes.

The most noticible difference with this PR should be a reduction in
memory size of up to at least 30% (1.06G -> 733M, 100k scrollback, 72
lines, 280 columns). Since the zerowidth characters are now stored
dynamically, the limit of 5 per cell is also no longer present.
2020-11-05 04:45:14 +00:00
Christian Duerr 9028fb451a Fix visual bell getting stuck
This resolves a problem with the visual bell where it would not
automatically trigger a redraw itself after the initial frame has been
rendered.

Since the unit of the visual bell duration is also unclear, it has been
clarified.
2020-10-30 09:22:13 +03:00
Christian Duerr bede5d5d1c Fix crash with large negative font offset
Fixes #4363.
2020-10-29 22:14:43 +00:00
Kirill Chibisov a99a9fd84c Error on warnings when running clippy
It should simplify tracking of new warnings raised on CI builds
and when cross checking. This commit also enables warnings
for 'rust_2018_idioms' and 'future_incompatible'.
2020-10-29 07:17:33 +03:00
Christian Duerr 598684243b Fix build failure on macOS without features
Fixes #4353.
2020-10-28 01:15:49 +00:00
Christian Duerr 5a3bf69e3f Remove rustc_tools_util dependency
Since our usage of the rustc_tools_util crate is so trivial, it seems
like we should be able to just inline it directly into Alacritty.

It's a very well trusted crate, being hosted directly by rust-lang and
it does not pull in any other dependencies, but having a dependency for
just 6 lines of code seems a bit extreme.
2020-10-25 05:07:28 +03:00
Christian Duerr 269f00051e Remove all duplicate dependencies from Linux/BSD
This bumps andrew and removes the last duplicate dependency
('num-traits') from Alacritty's Linux/BSD dependencies.
2020-10-24 15:26:39 +03:00
Mark Lodato f33a44e1c4 Remove unneeded collect during line rect creation 2020-10-22 19:39:38 +00:00
Christian Duerr 80688e082d Check viewport size after initial resize
Since the 'set_inner_size' call might immediately alter the window size,
the query for the window's dimensions should be performed after the
resize has been requested.
2020-10-22 00:16:12 +03:00
Stefano Figura 21eb84fc5e Add license symlinks for crates 2020-10-17 14:47:51 +00:00
Kirill Chibisov f03269cab0 Update dependencies
Fixes #4194.
2020-10-14 19:09:19 +03:00
Christian Duerr b2629192ab Fix incorrect X11 feature check
See https://github.com/alacritty/alacritty/commit/721f789b5f98ab5c47e6e817c3c2228636ca0a1a#r43183826.
2020-10-12 22:13:38 +00:00
Kirill Chibisov 721f789b5f Make use of glutin wayland/x11 features
This should allow users that are not using Wayland/X11
to reduce the resulted binary size and compilation times.
2020-10-12 12:22:36 +03:00
Taylor Blau 56e0f5bb05 Add support for urgency hints CSI
Teach Alacritty to stop setting the window as urgent upon a bell by
emulating xterm's 'bellIsUrgent' resource and relevant CSI. When this
resource is enabled (with 'CSI ? 1042 h'), a bell event causes the
window to be marked as urgent. When the resource is disabled (with 'CSI
? 1042 l'), the window is not marked urgent in the event of a bell.

There are two wrinkles worth noting here:

  - The 'TermMode::URGENCY_HINTS' does _not_ affect the terminal's
    configured bell command, since we only want to control whether or
    not the window is marked as urgent, not anything else.

  - In xterm, the 'bellIsUrgent' resource is _disabled_ by default.
    Since bouncing the dock icon has been the default in Alacritty on
    macOS thus far, do not make an effort to change that in this patch.

This allows users to emit "\e[?1042l" and disable bouncing the dock
icon.

Fixes #2950.
2020-10-10 21:24:40 +00:00
Kirill Chibisov 860adde457 Fix feature checking in cross builds
Checking for target os in build.rs doesn't work, since build.rs
is running for host, so checking should be done in src. Thus moving
'compile_error!' check from build.rs to main.rs.
2020-10-10 00:25:39 +03:00
Kirill Chibisov 67db9b228d Bump glutin to 0.25.0
Fixes #4206.
Fixes #4162.
Fixes #4017.
Fixes #3998.
Fixes #3831.
Fixes #3782.
Fixes #3708.
Fixes #2734.
Fixes #2714.
Fixes #1801.
2020-10-07 17:40:50 +03:00
Alessandro MenezesandChristian Duerr 44a6dba0af Fix non-ascii message bar text width calculation
When formatting text for display in the message bar, Alacritty was using
the byte length of the text instead of the glyph count. This lead to
unnecessary blank space at the end of lines due to overestimation of
their length.

There also were no extra spaces inserted after fullwidth characters,
leading to Alacritty giving them only a single cell of space. In line
with the rest of Alacritty's rendering, a wide char spacer whitespace is
now inserted in the message bar after glyphs which should occupy two
cells.

Fixes #4250.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-10-04 03:17:36 +00:00
Christian Duerr f5813899c3 Add additional CentOS/RHEL build dependencies
Fixes #4271.
2020-09-30 22:28:42 +00:00
ii41andChristian Duerr a754d06b44 Add support for single line terminals
This changes the minimum terminal dimensions from 2 lines and 2 columns,
to 1 line and 2 columns.

This also reworks the `SizeInfo` to store the number of columns and
lines and consistently has only the terminal lines/columns stored,
instead of including the message bar and search in some places of the
Alacritty renderer/input.

These new changes also make it easy to properly start the selection
scrolling as soon as the mouse is over the message bar, instead of
waiting until it is beyond it.

Fixes #4207.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-09-27 22:36:08 +00:00
Kirill Chibisov e9c0034f4d Fix selection incorrectly expanding when scrolled in history
When doing selection expansion we were checking for wide char flags
on a cells from the bottom of the terminal instead of in a current
viewport when scrolled up in history, which was leading to expanding
more than needed if we had wide chars on the same viewport cell,
but in the bottom of the terminal.

Fixes #4257.
2020-09-26 23:51:31 +00:00
Christian Duerr 085cc35b14 Fix IME position with fullwidth chars in search 2020-09-25 00:21:21 +00:00
Nathan Lilienthal 9a62f47292 Remove unused Linear newtype. (#4248) 2020-09-24 19:40:57 -04:00
Kirill Chibisov 62c300c14c Log new padding and cell size on 'SizeInfo' update
This makes our logging of 'SizeInfo' changes more consistent
with the one we're using when creating a new 'Display'.
2020-09-24 03:08:26 +03:00
Christian Duerr 56d25d1ff8 Add changelog entry for FreeType version bump 2020-09-22 20:42:16 +00:00
Christian Duerr 539855cdb9 Fix CLI arguments without config file
Since we only applied the CLI arguments as overrides to the
configuration file after the file was loaded, all CLI arguments that are
stored on the config would be dropped without a configuration file in
place.

This also makes sure that all configuration file config overrides are
still loaded if the configuration file could not be loaded for any
reason, since there's no reason why we'd just drop everything in that
case.
2020-09-20 09:58:39 +00:00
Christian Duerr 56cff18486 Update cargo lockfile
This updates the lockfile to the new format introduced in Rust 1.41.0.
Since the lockfile has been completely regenerated, all depedencies were
updated.
2020-09-16 07:44:17 +03:00
Nathan LilienthalandChristian Duerr c77ab137f1 Improve example for the -o CLI flag
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-09-13 21:10:44 +00:00
Rohan PoojaryandChristian Duerr 1bf40a8cc7 Pass existing CLI parameters to SpawnNewInstance
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-09-06 15:38:49 +00:00
Mateusz MikułaandChristian Duerr 5ee7ae8a27 Disable WinPTY with windows-gnu toolchain
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-08-31 22:30:45 +00:00
Kirill Chibisov b39c791649 Update smithay-clipboard to 0.5.2
Fixes #4139.
Fixes #4085.
2020-08-30 21:18:01 +03:00
Christian Duerr aaf80c2fef Fix multiline URL highlighting
Fixes #4182.
2020-08-30 07:55:32 +03:00
Ayose Cazorla cdf5e51e74 Add escape to report text area size
This implements the escapes `CSI 14 t` and `CSI 18 t` which report the
text area size in pixels and characters.
2020-08-28 22:26:03 +00:00