Commit Graph

15 Commits

Author SHA1 Message Date
Joe Wilm 79576b6c0b Add better printing for ref test failure
The previous format was extremely difficult for a human to parse.
2017-04-03 20:44:23 -07:00
Joe Wilm 31ed5160a0 Change cursor colors config to use text and cursor
This changes the cursor color config to use the `text` and `cursor`
properties instead of the current `foreground` and `background`
properties. The latter names stop making sense when dealing with cursors
like a vertical bar or underscore. In the new system, the block,
underscore, or vertical bar would always take the color of `cursor`, and
the text would take the color of `text` when using a block, or keep its
normal color when using the underscore or vertical bar.

A warning is now emitted on startup when the old form of cursor color
config is used. This will be a hard error in the future.
2017-02-25 07:55:35 -08:00
Manish Goregaokar 4e1f4c8cd7 Clippy fixes! 2017-01-06 20:44:51 -08:00
Manish Goregaokar 49187d53f2 Add `nightly` feature, use for `unlikely` intrinsic 2017-01-06 20:28:17 -08:00
Joe Wilm d4e20a4741 Improve error handling for clipboard actions
Previously, these could have crashed alacritty. Now, they simply print
an error message in Red to stderr. The Red format wrapper was moved to a
central location where both main.rs and the alacritty lib can access it.
2017-01-01 19:09:27 -08:00
Joe Wilm b704dafb24 Fix some bugs with selections
Moving the window on macOS would cause a panic in certain circumstances.
2016-12-29 20:53:41 -05:00
Joe Wilm f32199ae69 Remove dead code 2016-12-16 22:52:38 -08:00
Joe Wilm bde4dacc79 Misc formatting fixes 2016-12-16 22:48:04 -08:00
Joe Wilm 71de5501c4 Rustup and update dependencies
Now uses serde_dervive \o/
2016-10-14 16:38:15 -07:00
Joe Wilm 3f6deb8e2f Refactor EventLoop into event_loop module
This type and its implementations were seriously cluttering main.rs.
2016-09-25 19:49:44 -07:00
Joe Wilm 3c5d46c851 Scrolling v2
The previous scrolling + scroll region implementation exhibited display
corruption bugs in several applications including tmux, irssi, htop, and
vim. The new implementation doesn't seem to suffer from any of those
issues.

This implementation is able to `find /usr` on my machine (nearly 600k
lines) in ~2.0 seconds while st is able to do the same in ~2.2 seconds.
Alacritty is officially faster!
2016-08-22 08:37:50 -07:00
Joe Wilm c8fd2c090c Add license headers to source files 2016-06-29 20:59:14 -07:00
Joe Wilm 8566e17860
Fix all trivial compiler warnings
Of note are the `ansi` and `grid` modules becoming public. There are
several bits of unused code in each of these. In the case of `grid`, the
unused parts are generally useful, like some indexing implementations.
In ansi, there are pieces that will be used once the parser is more
complete. In any case, these modules are fairly generic and mostly
usable outside of Alacritty.

Unused cargo packages were also removed.
2016-06-09 08:30:55 -07:00
Joe Wilm 8126841ed3
Add support for scrolling regions
It's now possible to move around within Vim without the screen becoming
corrupt!

The ANSI parser now calls a (new) `set_scrolling_region` on the handler
when the DECSTBM CSI is received. In order to provide a sensible default
in case that the sequence doesn't include arguments, a TermInfo trait
was added which currently has methods for inspecting number of rows and
columns. This was added as an additional trait instead of being included
on Handler since they have semantically different purposes. The tests
had to be updated to account for the additional trait bounds.

The utilities module now has a `Rotate` trait which is implemented for
the built-in slice type. This means that slices and anything derefing to
a slice can be rotated. Since VecDeque doesn't support slicing (it's
a circular buffer), the grid rows are now held in a Vec to support
rotation.

For ergomomic access to the grid for scrolling and clearing regions,
additional Index/IndexMut implementations were added to the grid::Row
type.

Finally, a `reset` method was added to `Cell` which properly resets the
state to default (instead of just clearing the char). This supports
region clearing and also fixed a bug where cell backgrounds would remain
after being cleared.
2016-06-08 10:39:49 -07:00
Joe Wilm 06451fbab1
Add named thread for pty reader 2016-06-07 21:11:23 -07:00