Commit Graph
1685 Commits
Author SHA1 Message Date
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
Christian Duerr ee2c5a6cdd Unify term dimension calls
Since the `Term` implements the `Dimensions` trait itself, we shouldn't
call `term.grid()` to call methods from the `Dimensions` trait.

This removes all instances of this that I could find in the code at the
moment.
2020-08-25 21:24:16 +03:00
Christian Duerr 6cfcd7c259 Add CLI parameter to override config options
This uses the facilities added in
3c3e6870de to allow overriding individual
configuration file options dynamically from the CLI using the
--options/-o parameter.

Fixes #1258.
2020-08-22 20:55:27 +00:00
Christian Duerr 92a3d482d0 Fix config import error handling 2020-08-22 00:38:09 +00:00
Christian Duerr 3c3e6870de Add configuration file imports
This adds the ability for users to have multiple configuration files
which all inherit from each other.

The order of imports is chronological, branching out to the deepest
children first and overriding every field with that of the configuration
files that are loaded at a later point in time.

Live config reload watches the directories of all configuration files,
allowing edits in any of them to update Alacritty immediately. While the
imports are live reloaded, a new configuration file watcher will only be
spawned once Alacritty is restarted.

Since this might cause loops which would be very difficult to detect, a
maximum depth is set to limit the recursion possible with nested
configuration files.

Fixes #779.
2020-08-21 18:48:48 +03:00
grumpey 3a7130086a Update spec file 2020-08-15 14:39:11 +00:00
Christian Duerr 8a6fe7e5d0 Add logging for crossfont
This refactors the logging function to clean things up a little bit and
also adds the ability to see log messages for the `crossfont` library.
2020-08-14 21:22:02 +00:00
Christian Duerr 0003f6683f Fix selection scrolling with message bar visible
This resolves an issue with selection scrolling which would cause the
selection to wrap to the top of the screen once the cursor enters the
padding below the message bar.

Fixes #4120.
2020-08-14 10:26:42 +03:00
Kirill Chibisov 0a1683e84d Use yellow/red from the config for message bar colors
This commit completes the effort to use config colors for
message bar content by picking red/yellow from user's
colors.normal.{red,yellow} for error/warning messages
instead of fixed colors.

It also removes alacritty_terminal::term::color::RED and
alacritty_terminal::term::color::YELLOW from the alacritty_terminal API,
bumping its version to 0.11.0-dev.

Fixes #4116.
2020-08-13 14:59:35 +03:00
Kirill Chibisov f221108086 Use user's background color for render timer text
Using the user's background color in pair with red should provide better
contrast.
2020-08-13 10:55:11 +00:00
Christian Duerr b904207b19 Add support for double underlines
This adds support for double underlines using the colon separated escape
sequence `CSI 4 : 2 m`.

Alacritty will now also always fallback to the normal underline in case
any of the other underlines like the undercurl are specified. The escape
sequence `CSI 4 : 0 m` can now be used to clear all underlines.

Some terminals support `CSI 21 m` for double underline, but since
Alacritty already uses that as cancel bold which is a little more
consistent, that behavior has not changed. So the colon separated
variant must be used.
2020-08-12 19:05:22 +03:00
Christian Duerr 96ea5c445e Fix handling of wrapline flag in last line
This resolves an issue where Alacritty would crash when a wrapline flag
was present in the last column of the last line.

While it should not be possible to achieve this with normal text flow,
it is possible to rotate the content downwards using the `CSI Ps T`
escape, causing this bug to occur.

This also works around other issues like the vi cursor jumping to the
top of the screen when trying to move beyond the last column using the
`l` key. In debug mode this even lead to a crash due to the overflow.

Fixes #4109.
2020-08-12 08:36:24 +00:00
Christian Duerr 424791842f Add Vi to available binding modes 2020-08-12 10:37:54 +03:00
Kirill Chibisov ef7cb258b2 Remove copyright notice from files
This commit is a follow-up to 7aafbb757d
which was an effort to remove copyright notice from files.
2020-08-10 16:07:19 +03:00
Kirill Chibisov b630bb45df Remove markdownish markup from --help output 2020-08-10 15:22:11 +03:00
Christian Duerr 1d00883f10 Fix characters swallowed during search
This resolves a bug where characters get swallowed when pressing them
after pressing backspace before the backspace key is released.
2020-08-09 23:29:58 +00:00
Christian Duerr 4b516c6365 Add ^C binding to cancel search and leave Vi mode
Fixes #4089.
2020-08-10 01:57:55 +03:00
Christian Duerr 576252294d Add support for colon separated SGR parameters
This implements the colon separated form of SGR 38 and 48.

Fixes #1485.
2020-08-07 22:37:23 +00:00
Canh DinhandChristian Duerr b14d032432 Rework installation instructions
Since users should be capable of finding packages for their
distributions, this removes all instructions that point users directly
at specific packages.

The third party repositories like COPR have been kept, since those
are more difficult to find.

The structure of the installation instructions has also been reworked to
adjust for this and the post build instructions should be a bit cleaner
now.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-08-07 14:13:41 +00:00
Christian DuerrandKirill Chibisov c478a9fc52 Fix clippy issues
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
2020-08-06 01:09:46 +00:00
Christian Duerr 291de2500f Use tcgetpgrp to get PID for SpawnNewInstance
Fixes #4082.
2020-08-06 00:42:49 +00:00