1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00
Commit graph

15 commits

Author SHA1 Message Date
Joe Wilm
8ef062efd9 Move selection into Grid
Supporting selections with scrollback has two major components:

1. Grid needs access to Selection so that it may update the scroll
   position as the terminal text changes.
2. Selection needs to be implemented in terms of buffer offsets -- NOT
   lines -- and be updated when Storage is rotated.

This commit implements the first part.
2018-06-02 09:34:28 -07:00
Joe Wilm
a88961bbf0 Remove redundant selection::Region type
The type selection::Region was defined identially to std::ops::Range.
Using something other than range just served to confuse.
2018-06-02 09:24:38 -07: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
Matthias Krüger
d552d28418 clippy: do and don't pass some things by reference as suggested (needless_pass_by_value, needless_borrow). 2017-12-03 12:50:40 -08:00
Martin Lindhe
5b444375f2 fix some typos in comments 2017-10-30 09:25:13 -07:00
Joe Wilm
f12fd880fe Update tests for new Selection API 2017-06-19 21:31:50 -07:00
Joe Wilm
6b081dcc95 Fix unnecessary redraws with active selection
Could be cleaned up a bit if there was a wrapper for Option<Selection>
that contained this flag.

Also fixes a few compiler warnings.
2017-06-19 21:31:50 -07:00
Joe Wilm
63bcb46011 Implement semantic and line selection dragging
Unlike the regular selection that is by cell, these selection modes
highlight either semantic groupings or entire lines while the mouse is
dragged.
2017-06-19 21:31:50 -07:00
Manish Goregaokar
4e1f4c8cd7 Clippy fixes! 2017-01-06 20:44:51 -08:00
Manish Goregaokar
fbeded8ac5 Remove need for inclusive ranges 2017-01-06 20:28:17 -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
689e0f4ad7 Unify Cursor, Location and name it Point 2016-12-29 11:09:29 -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
6e708d2119 Implement visual component of mouse selections
This adds the ability to click and drag with the mouse and have the
effect of visually selecting text. The ability to copy the selection
into a clipboard buffer is not yet implemented.
2016-12-22 13:44:13 -05:00