diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-03-19 19:14:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-19 19:14:17 +0000 |
commit | a672f7d553ac17d5aaef8dc667dee31d5815677d (patch) | |
tree | 0289e3deb60e3fdce6025fded1ec9c3299bc893d /src/grid/tests.rs | |
parent | eb7a1ea803ba54d3b8cd6af49255eb8fbe0d7544 (diff) | |
download | alacritty-a672f7d553ac17d5aaef8dc667dee31d5815677d.tar.gz alacritty-a672f7d553ac17d5aaef8dc667dee31d5815677d.zip |
Add URL hover highlighting
This changes the cursor whenever it moves to a cell which contains
part of a URL.
When a URL is hovered over, all characters that are recognized as part
of the URL will be underlined and the mouse cursor shape will be
changed. After the cursor leaves the URL, the previous hover state is
restored.
This also changes the behavior when clicking an illegal character right
in front of a URL. Previously this would still launch the URL, but strip
the illegal character. Now these clicks are ignored to make sure there's
no mismatch between underline and legal URL click positions
Diffstat (limited to 'src/grid/tests.rs')
-rw-r--r-- | src/grid/tests.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/grid/tests.rs b/src/grid/tests.rs index 82edda69..33d772a2 100644 --- a/src/grid/tests.rs +++ b/src/grid/tests.rs @@ -112,8 +112,8 @@ fn test_iter() { assert_eq!(None, iter.prev()); assert_eq!(Some(&1), iter.next()); - assert_eq!(Column(1), iter.cur.col); - assert_eq!(4, iter.cur.line); + assert_eq!(Column(1), iter.cur().col); + assert_eq!(4, iter.cur().line); assert_eq!(Some(&2), iter.next()); assert_eq!(Some(&3), iter.next()); @@ -121,12 +121,12 @@ fn test_iter() { // test linewrapping assert_eq!(Some(&5), iter.next()); - assert_eq!(Column(0), iter.cur.col); - assert_eq!(3, iter.cur.line); + assert_eq!(Column(0), iter.cur().col); + assert_eq!(3, iter.cur().line); assert_eq!(Some(&4), iter.prev()); - assert_eq!(Column(4), iter.cur.col); - assert_eq!(4, iter.cur.line); + assert_eq!(Column(4), iter.cur().col); + assert_eq!(4, iter.cur().line); // test that iter ends at end of grid |