Age | Commit message (Collapse) | Author |
|
Selections now *mostly* work. They move as the buffer scrolls, copying
works as it should, and it looks like the different selection modes
behave properly as well.
The new Selection implementation uses buffer coordinates instead of
screen coordinates. This leads to doing a transform from mouse input to
update the selection, and back to screen coordinates when displaying the
selection. Scrolling the selection is fast because the grid is already
operating in buffer coordinates.
There are several bugs to address:
* A _partially_ visible selection will lead to a crash since the drawing
routine converts selection coordinates to screen coordinates. The
solution will be to clip the coordinates at draw time.
* A selection scrolling off the buffer in either direction leads to
indexing out-of-bounds. The solution again is to clip, but this needs
to be done within Selection::rotate by passing a max limit. It may
also need a return type to indicate that the selection is no longer
visible and should be discarded.
* A selection scrolling out of a logical scrolling region is not
clipped. A temporary and robust workaround is to simply discard the
selection in the case of scrolling in a region.
wip selections
fix issue with line selection
selection mostly working
need to support selection not being on the screen at draw time
Fix selection_to_string
Uncomment tests
|
|
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.
|
|
The type selection::Region was defined identially to std::ops::Range.
Using something other than range just served to confuse.
|
|
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)
|
|
This commit adds clippy as a required step of the build process. To make
this possible, all existing clippy issues have been resolved.
|
|
(needless_pass_by_value, needless_borrow).
|
|
|
|
|
|
Could be cleaned up a bit if there was a wrapper for Option<Selection>
that contained this flag.
Also fixes a few compiler warnings.
|
|
Unlike the regular selection that is by cell, these selection modes
highlight either semantic groupings or entire lines while the mouse is
dragged.
|
|
|
|
|
|
Moving the window on macOS would cause a panic in certain circumstances.
|
|
|
|
Still need automatic loading into selection copy buffer for linux.
|
|
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.
|