Commit Graph

22 Commits

Author SHA1 Message Date
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
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 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
Christian Duerr d387ebe1d7
Add hidden escape sequence
This adds support for the `hidden` escape sequence `\e[8m`, which will
render the text as invisible.

This has also raised a few questions about the rendering of foreground
and background colors and their interaction with the different escape
sequences. Previously, Alacritty has oriented itself after URxvt, which
has some strange and unexpected behavior.

The new implementation of color inversion is modeled after XTerm, which
has a consistent pattern of always inverting the foreground and
background colors. This should hopefully lead to less confusion for the
user and a more consistent behavior.

A full matrix showcasing the new way Alacritty inverses text can be
found here:
https://i.imgur.com/d1XavG7.png

This fixes #1454 and fixes #1455.
2018-09-19 19:18:51 +00:00
Christian Duerr 7f2b398ad2
Remove all instances of unwrap() from config
Unwrapping inside the config file parsing can lead to some issues that
prevent us from falling back to a default configuration file.

One instance of that issue was mentioned in #1135.

Now all instances of `unwrap()` have been removed and replaced with
proper error handling. This will make the config more robust and
prevents live reload from silently breaking while alacritty is running.

This also fixes a few currently existing clippy issues.
Clippy added an additonal lint which complains about `MyStruct { field:
field }`.

These issues have been fixed, except for some false-positives and issues
in external macros which will probably be fixed with future updates (rust-lang-nursery/bitflags#149)
2018-03-04 22:40:15 +00:00
Christian Duerr 2920cbe710
Add clippy check to travis
This commit adds clippy as a required step of the build process. To make
this possible, all existing clippy issues have been resolved.
2018-01-06 01:42:55 +00:00
Chet Gurevitch 76ca679e89 Update bitflags to v1 2017-12-23 21:39:09 -08:00
Jonathan Schleußer a3d35ec185 Update most remaining deps 2017-09-05 09:07:00 -07:00
Jake Merdich b4a839aee9 Add dim color support
Add support for the VTE 'dim' flag, with additional support for
custom-themed dim colors. If no color is specified in the config, it
will default to 2/3 the previous (not a spec, but the value other
terminals seem to use).

The actual dimming behavior brings bright colors to normal and regular
colors to the new dim ones. Custom RGB values are not changed, nor are
non-named indexed colors.
2017-06-23 11:27:15 -07:00
DarkDefender 35e4f2096a Fix bright inverse colors (#621)
Fixes #611.
2017-06-18 17:04:16 -07:00
Joe Wilm 529ac47fc8 Add support for Beam, Underline cursors
Notable about this implementation is it takes a different approach for
managing cursor cells that previously. The terminal Grid is now
borrowed *immutably*. Instead of mutating Cells in the Grid, a list is
managed within the RenderableCellsIter. The cell at the cursor location
is skipped over, and instead cells are popped off a list of cursor
cells.

It would be good in the future to share some more code between the
different cursor style implementations for populating the cursor cells
list.

Supercedes #349.
2017-06-11 13:21:13 -07:00
Joe Wilm 119c7d2856 Add support for wide characters 2017-03-02 09:19:01 -08:00
Tuomas Siipola 9d44526bf9 Render underline on empty cells
This fixes rendering underlines spanning multiple words.
2017-02-06 11:45:09 -08:00
Joe Wilm f2f750f9f3 Alacritty now compiles on stable Rust 🎉 2017-02-03 08:11:19 -08:00
Danny Dulai e04584b082 support for inverting the cursor or using colors 2017-01-29 16:06:29 -08:00
Manish Goregaokar 4e1f4c8cd7 Clippy fixes! 2017-01-06 20:44:51 -08:00
Joe Wilm 72ff775b23 Improve RenderableCellsIter performance
Also adds a benchmark for cell.reset().
2016-12-29 21:56:49 -05:00
Joe Wilm 26ac1df0b1 Add Default impl for Cell
Just a bit of cleanup.
2016-12-29 21:43:55 -05:00
Joe Wilm 115a4085b4 Fix selection copy for long lines
Long lines were previously broken at the terminal width. Now, a wrapping
marker is kept on the final cell so that extra newlines are not
inserted.
2016-12-29 10:43:58 -05:00
Joe Wilm ae470bf68b Implement copying selection for macOS
Still need automatic loading into selection copy buffer for linux.
2016-12-26 22:56:19 -05:00
Joe Wilm 23e36f1925 Add support for indexed colors
ANSI escape sequences like `\x1b[48;5;10m` were not supported until now.
Specifically, the second attribute, 5, says that the following attribute
is a color index.

The ref tests were updated since `enum Color` variants changed.
2016-12-11 20:23:41 -08:00
Joe Wilm 7bf3d059c3 Move term::cell module to its own file
The cell module was previously implemented within term.rs. Now each
module has its own file.
2016-12-11 20:23:41 -08:00