diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-08-01 15:37:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 15:37:01 +0000 |
commit | 9dddf649a15d103295f4ce97b8ae4c178c9623e0 (patch) | |
tree | 609cba8c7eecddc8a2b032e826967bcc04395592 /alacritty_terminal/src/index.rs | |
parent | f51c7b067a05dec7863cca9b8bfaf8329b0cfdfc (diff) | |
download | alacritty-9dddf649a15d103295f4ce97b8ae4c178c9623e0.tar.gz alacritty-9dddf649a15d103295f4ce97b8ae4c178c9623e0.zip |
Switch to rfind_url for URL detection
This switches to rfind_url for detecting URLs inside the grid. Instead
of expanding at the cursor position, the complete terminal is searched
from the bottom until the visible region is left with no active URL.
Instead of having the field `cur` publicly accessibly on the
`DisplayIterator`, there are the two methods `DisplayIterator::point`
and `DisplayIterator::cell` for accessing the current element of the
iterator now. This allows accessing the current element right after
creating the iterator.
Fixes #2629.
Fixes #2627.
Diffstat (limited to 'alacritty_terminal/src/index.rs')
-rw-r--r-- | alacritty_terminal/src/index.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/alacritty_terminal/src/index.rs b/alacritty_terminal/src/index.rs index f6ea4ad3..7d1a8e91 100644 --- a/alacritty_terminal/src/index.rs +++ b/alacritty_terminal/src/index.rs @@ -59,6 +59,12 @@ impl From<Point<usize>> for Point<isize> { } } +impl From<Point<usize>> for Point<Line> { + fn from(point: Point<usize>) -> Self { + Point::new(Line(point.line), point.col) + } +} + impl From<Point<isize>> for Point<usize> { fn from(point: Point<isize>) -> Self { Point::new(point.line as usize, point.col) |