Commit Graph

1046 Commits

Author SHA1 Message Date
Christian Duerr 7275ecc282
Fix line metrics
Since bitmap fonts do not provide their own underline metrics, the
self-calculated metrics which have been used for rusttype are now also
used for bitmap fonts with freetype.

The rusttype and bitmap fallback metrics have incorrectly offset the
underline by the underline height. Since the position is already defined
as the center point, that is not necessary.

All rounding and clamping has also been removed from the font library,
so that the raw values are reported now. The clamping and rounding is
now done in the line renderer.
2018-12-31 17:01:06 +00:00
Christian Duerr 9ffaac8ee7
Fix underline interruption with empty cells
Since completely empty cells are not reported by the renderable cells
iterator, the line renderer has incorrectly assumed that these cells did
not cause any change in cell state, leading to underlines spanning empty
cells.

Instead of assuming that the line state is unchanged, the line
calculation now correctly interprets a jump in the renderable cells
column as an interruption of the line.

This fixes #1960.
2018-12-31 16:52:29 +00:00
David Hewitt f1bc6802e1 Add support for Windows ConPTY API 2018-12-28 16:01:58 +00:00
Christian Duerr ec6f756946
Fix Windows config location documontation
The path `%APPDATA%` already includes the `Roaming` folder.
2018-12-28 15:26:58 +00:00
Nathan Lilienthal 9cd868f887 Fix `create_rect` function documentation 2018-12-27 21:02:40 +00:00
Bastien Orivel 562d96341c Update reqwest to 0.9 2018-12-27 20:43:55 +00:00
Bastien Orivel e6c4d08192 Use mio-extras instead of mio-more
The latter isn't maintained anymore and this removes a bunch of outdated
dependencies.
2018-12-27 19:49:29 +00:00
Zac Pullar-Strecker 6d7647c890 Make windows config location more sensible 2018-12-27 14:16:31 +00:00
Matt T. Proud f0180430df Report Windows panics through MessageBox
Alacritty is often spawned through the executable on
Windows. Since this doesn't allow access to the stderr
and crashes on startup are more common on Windows
due to the agent, it can be hard to troubleshoot issues.

This reports all Alacritty crashes through error popups
on Windows, which should resolve the problem of
crashing Alacritty instances without any error feedback.
2018-12-23 22:36:06 +00:00
Christian Duerr 2f9b815ebd
Add proper underline and strikeout support
This makes use of the new rectangle rendering methods used to display
the colored visual bell to add proper underline and strikeout support to
Alacritty.
2018-12-22 17:16:54 +00:00
Tim McNamara dad44134e2 Expand snap description and remove comments
This commit removes the boilerplate comments that come with the template snapcraft.yaml. It also expand the description to match the project's README.
2018-12-20 00:49:26 +00:00
skliew c47c52d844 Send alt key with actual key in one flush
The delay between the alt key and the actual received key might cause
certain key sequences to be missed, ex. when tmux has its escape-time
set to 0.
2018-12-20 00:33:42 +00:00
kekePower e1ee890750 Add Mageia install instructions to README.md 2018-12-18 21:41:17 +00:00
Christian Duerr cf9d94eb12
Add color option to visual bell
This adds the option to specify the color of the visual bell using the
`visual_bell.color` configuration setting.

This is done by rendering a big quad over the entire screen, which also
opens up options to draw other arbitrary rectangles on the screen in the
future.
2018-12-17 19:06:07 +00:00
Steve Blundy 0c3e28617a Fixing tabs in copy-paste
This resolves issues with copy-pasting tabs by including them in the
pasted string.

Selection of tabs is still inconsistent with what might be expected
based on other terminal emulators, however the behavior hasn't
regressed.

This fixes https://github.com/jwilm/alacritty/issues/219.
2018-12-15 21:33:33 +00:00
Christian Duerr 21f888ec41
Update dependencies
This fixes #1674.
2018-12-15 12:10:26 +00:00
Ross Smith II e4db833137 Add scoop install instructions for windows 2018-12-14 10:00:50 +00:00
dm1try 53c7489217 Ignore result on deregistering pty
Fixes #1897.
2018-12-14 03:54:05 +00:00
Kyle Rooker 0a73312c3d Fix color issues in ncurses programs
Certain programs like `htop` have problems with the number
of color pairs which are specified by the Alacritty terminfo
file. 

By reducing the maximum number of color pairs to the value
which is specified by xterm-256color, these issues are
resolved.

This fixes #1862.
2018-12-12 14:12:59 +00:00
Joe Wilm 217ad9ec28 Upgrade to Rust 2018
This resolves a lot of NLL issues, however full NLL will be necessary to
handle a couple of remaining issues.
2018-12-10 17:53:56 +00:00
Christian Duerr 7ab0b44847
Bump version to 0.2.4 2018-12-09 23:28:29 +00:00
Christian Duerr 1cebcd660b
Fix rendering of zero-width characters
Instead of rendering zero-width characters as full characters, they are
now properly rendered without advancing the cursor.

Because of performance limitations, this implementation only supports up
to 5 zero-width characters per cell. However, as a result of this
limitation there should not be any performance impact.

This fixes #1317, fixes #696 and closes #1318.
2018-12-09 15:28:22 +00:00
Vineeth Sagar 47f8f1bac6 Add a contributing.md file 2018-12-09 01:46:09 +00:00
Tezkerek aef38d6c2f Change missing config log level to info 2018-12-08 20:51:36 +00:00
Nathan Lilienthal f32facfbfd Refactor Alacritty scripts
This includes some changes to the scripts `README.md` to provide
some more information on the different Alacritty scripts.

A new script for testing the 24 bit support of Alacritty has been
added with the `24-bit-color.sh` name. This should help with
troubleshooting truecolor support issues.

Since `perf` is a standard tool which is available in the official
repositories for most distributions, it doesn't make much sense to
provide an installation script specifically for Ubuntu. As a result of
this, the script has been removed.
2018-12-08 20:28:57 +00:00
Christian Duerr 6b61e96739
Fix recording of ref tests
Due to the lazy initialization of lines in the Alacritty history, the
recording of ref tests was broken. Because a WM would often resize the
ref test window after it was spawned, some additional lines were
initialized in the stored ref test.

To make sure lazy initialization does not play any role in the recording
and replaying of reftests, before recording and replaying the tests, the
complete grid is initialized and then truncated. This should make sure
that only the relevant lines are kept.
2018-12-08 01:50:01 +00:00
Matthias Krüger a6764ba05f Use tool lints for clippy allow/deny lint attributes 2018-12-07 13:58:11 +00:00
Muhammad Talal Anwar cdc22ce76a Add docs for enabling system font smoothing on macOS 2018-12-06 21:55:02 +00:00
Vineeth Sagar cadbb86eb7 Detach Child process to avoid zombie processes
This makes use of the common double-fork behavior to prevent
spawning zombie processes every time a URL is clicked.
2018-12-06 21:38:34 +00:00
Muhammad Talal Anwar f57bd6e12f Remove sudo keyword from travis
The `sudo` keyword has been deprecated.

See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2018-12-06 14:17:54 +00:00
Bjorn Neergaard 0d2f5b0f0f Launch a login shell by default on macOS 2018-12-03 22:26:59 +00:00
Barret Rennie ca9a259caa Request user attention when bell received in macOS
We now request the user's attention in macOS when a visual bell
character is received. This manifests as the window jumping up and down
in the dock.
2018-12-02 16:11:51 +00:00
Christian Duerr e690a1444e
Add change log entries for macOS privacy requests 2018-12-02 17:07:23 +01:00
John Naylor 973db4845c Request OSX privacy permissions 2018-12-02 16:06:24 +00:00
Zac Pullar-Strecker 742a6b48a1
Fix for an underflow on some type conversions (#1715) 2018-11-25 10:08:02 +13:00
dm1try 0d47cd25b9 Ignore initial size if the window is maximized on start 2018-11-23 23:41:06 +00:00
Zac Pullar-Strecker 6f4ad9bb4f Move winpty-sys dep to crates.io 2018-11-24 12:02:10 +13:00
Jonathan Dahan 2ede659134 Add option for launching Alacritty maximized 2018-11-19 21:23:47 +00:00
Ilya Epifanov fc04bc1e6d Changed path to standard /usr/bin/..., registered as an x-terminal-emulator alternative 2018-11-19 09:24:22 +00:00
Christian Duerr 42d8989916
Add keybinding action for clearing warns/errors
Since running `clear` inside of tmux doesn't actually clear any part of
the screen, but just resets the scrolling region, the warning and error
notices can't be removed without quitting tmux or Alacritty.

As a solution, a new action `ClearLogNotice` has been added which has
been bound to Ctrl+L by default. As a result, Ctrl+L can be used inside
of tmux to remove the messages, even though tmux doesn't clear the
screen.

This fixes #1811.
2018-11-19 08:33:48 +00:00
Christian Duerr e429b8dfdd
Remove `scale_with_dpi` setting from config
Since the `scale_with_dpi` setting has been deprecated, but it hasn't
been removed from the config, Alacritty would print an error every time
it is started.

To resolve this problem, the option is removed from the default
configuration file.
2018-11-18 23:05:38 +00:00
Andrei-Marius Radu e72a649794 Update filetime to v0.2.4
filetime v0.2.3 fails to build on OpenBSD.

This fixes #1784 .
2018-11-18 15:49:16 +00:00
Christian Duerr 75504ef05b
Lower log level of warnings in ansi.rs
Since ansi.rs is mostly about control sequences sent by applications,
displaying all issues during parsing to the user can be annoying since
Alacritty might not actually do anything wrong.

To resolve this problem, all `warn!` logs in `src/ansi.rs` have been
decreased to the `debug!` level.

This fixes #1809.
2018-11-18 13:48:10 +00:00
Ryan Morey 3593ec72dd Add NixOS install instructions to README.md 2018-11-17 18:29:08 +00:00
Christian Duerr 6265ef91d5
Display errors and warnings
To make sure that all error and information reporting to the user is
unified, all instances of `print!`, `eprint!`, `println!` and
`eprintln!` have been removed and replaced by logging.

When `RUST_LOG` is not specified, the default Alacritty logger now also
prints to both the stderr and a log file. The log file is only created
when a message is written to it and its name is printed to stdout the
first time it is used.

Whenever a warning or an error has been written to the log file/stderr,
a message is now displayed in Alacritty which points to the log file
where the full error is documented.

The message is cleared whenever the screen is cleared using either the
`clear` command or the `Ctrl+L` key binding.

To make sure that log files created by root don't prevent normal users
from interacting with them, the Alacritty log file is `/tmp/Alacritty-$PID.log`.

Since it's still possible that the log file can't be created, the UI
error/warning message now informs the user if the message was only
written to stderr. The reason why it couldn't be created is then printed
to stderr.

To make sure the deletion of the log file at runtime doesn't create any
issues, the file is re-created if a write is attempted without the file
being present.

To help with debugging Alacritty issues, a timestamp and the error
level are printed in all log messages.

All log messages now follow this format:
    [YYYY-MM-DD HH:MM] [LEVEL] Message

Since it's not unusual to spawn a lot of different terminal emulators
without restarting, Alacritty can create a ton of different log files.

To combat this problem, logfiles are removed by default after
Alacritty has been closed. If the user wants to persist the log of a
single session, the `--persistent_logging` option can be used. For
persisting all log files, the `persistent_logging` option can be set in
the configuration file
2018-11-17 14:39:13 +00:00
Christian Duerr ea637cde1c
Fix blurry fonts without dynamic padding
There were some minor rounding issues in the padding codepath without
dynamic padding. These have been fixed, which should resolve issues with
blurry fonts on monitors with a fractional DPR.

This fixes https://github.com/jwilm/alacritty/issues/1806.
2018-11-16 21:28:49 +00:00
Christian Duerr d68ecb0def
Add option for dynamic padding (#1780)
This adds the `window.dynamic_padding` option which allows disabling the
dynamic spread of additional padding around the grid's content.

Based on the feedback I've gotten so far and the fact that most other
terminal emulators do not seem to center the content inside themselves,
I've changed the default configuration option to disable centering of the grid.

This fixes #1778.
2018-11-15 19:57:15 +00:00
Fintan ba76ac8661 Document homebrew cask option for macOS installation 2018-11-15 13:58:24 +00:00
Christian Duerr 82d0c5ea44
Fix i386 CI releases
The i386 CI releases were still using x86_64 platforms for building the
output binaries, as a result the produced binaries did not work properly
on i386 systems.

The maximum time of 50 minutes was exceeded when Alacritty tries to build
for all Linux platforms, this was because it was effectively compiling
Alacritty from scratch four times.

By making use of the previous build artifacts, it's possible to cut this
down to two compiles using the `--no-build` option of `cargo-deb`.
2018-11-14 23:47:13 +00:00
Christian Duerr 00830b3da8
Update all dependencies
This applies all breaking and non-breaking dependency updates.
2018-11-14 23:44:53 +00:00