Commit Graph

19 Commits

Author SHA1 Message Date
Kirill Chibisov 72dfa477a9 Fix cursor flickering on url hover
This commit fixes the regression introduced in 84aca67 and also fixes url
highlight bounds computation when url ends on a last column.

Fixes #2665.
2019-07-28 17:04:26 +00:00
Kirill Chibisov 9a159a7760 Fix cursor color setting with escape sequence
The cursor rework introduced a regression where cursor color was always picked
from a config file, rather then using `ansi::NamedColor::Cursor` for this
purpose.

This commit also removes `CursorText` option from `NamedColor` enum,
since we can't speculate with `CursorText` during runtime.

Cursor rework commits:
  cfc20d4f34
  371d13f8ef
  0d060d5d80
2019-07-10 21:24:04 +00:00
Elaina Martineau 84aca67296 Change mouse cursor when hovering over the message bar 2019-07-08 18:13:55 +00:00
Christian Duerr f002171c84
Fix performance issues with text reflow
Fixes #2567.
Fixes #2414.
2019-06-23 23:29:01 +00:00
Kirill Chibisov 72088dafec Fix inconsitent cursor position when scrolling
This commit fixes regression introduced in cfc20d4f34.
`self.cursor.line` forced the cursor to hold a fixed location while scrolling
until its "original" location (usually the shell prompt) went off the screen.
So cursor position should be keep updated, which can be achieved by using
`self.inner.line()`.

Fixes #2570.
2019-06-21 23:00:01 +00:00
Christian Duerr e0a286515f
Add block selection
This implements a block selection mode which can be triggered by holding
Control before starting a selection.

If text is copied using this block selection, newlines will be
automatically added to the end of the lines.

This fixes #526.
2019-06-20 15:56:09 +00:00
Christian Duerr d3cc9743b7
Fix dynamic color escape response
The dynamic color escape response would answer to requests with
rgb:0/0/0 when the color was completely black, instead of properly
responding with double-digit hex colors. This has been changed so that
Alacritty now always properly responds with the same number of hex
digits for all colors.

The number of digits has also been changed from two to four digits per
color, since that is the more commonly used format.

Using the `write!` macro was also causing problems with NeoVim,
since it caused Alacritty to write the dynamic color escape in multiple
write calls, switching to `write_all` fixed that.

Fixes #2543.
2019-06-15 16:52:23 +00:00
Christian Duerr bc2c34eb7f
Add wayland primary selection clipboard support 2019-06-09 11:46:31 +00:00
Christian Duerr f15ef63edb
Fix index out of bounds during selection
This reworks the selection logic to prevent any possible index out of
bounds exceptions by clamping the start and end points before doing
anything else with them when converting selections to spans.

This also fixes a bug where semantic selections would not automatically
expand across double-width characters.

Fixes #2486.
2019-06-06 13:04:12 +00:00
Elaina Martineau 45565bb9ca Re-invert cursor when in selection 2019-06-06 00:02:20 +00:00
rbong f79007035c Add foreground/background request escape codes 2019-06-02 13:16:38 +00:00
Jean Mertz 1656aff85e Add support for double-click bracket-pair selection 2019-05-11 16:15:32 +00:00
Elaina Martineau ca9724a5ef Fix cursor only showing up over left half of wide characters 2019-05-11 15:57:22 +00:00
Christian Duerr 5d173f6df3
Refactor config parsing files
This is a large refactor of the config parsing structure, attempting to
reduce the size of the file a bit by splitting it up into different
modules with more specific purposes.

This also fixes #2279.
2019-05-10 11:36:16 +00:00
Christian Duerr bf353059a0
Fix selection of double-width characters
This changes the selection behavior to automatically select both cells
of double width characters in either selection direction.

This fixes #2322.
2019-04-29 14:33:25 +00:00
JDTX 2c462c7d03 Fix spelling mistakes 2019-04-28 21:42:43 +00:00
Christian Duerr 9e89aaa477
Switch from copypasta to rust-clipboard
This switches our own `copypasta` crate with the more standardized
`clipboard` library, which allows us to get rid of the `xclip`
dependency on X11.

Additionally, this lays the foundation for native Wayland clipboard
support once the clipboard crate is updated (or a fork is created).

Fixes #5.
2019-04-28 20:21:39 +00:00
Elaina Martineau b321406908 Fix double-width characters in URLs only highlighting halfway 2019-04-28 16:09:26 +00:00
Theodore Dubois dbd8538762 Split alacritty into a separate crates
The crate containing the entry point is called alacritty, and the crate
containing everything else is called alacritty_terminal.
2019-04-28 13:24:58 +00:00