aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-05-25 07:52:15 +0300
committerGitHub <noreply@github.com>2023-05-25 07:52:15 +0300
commit32ea98deeba5f0eb6c51062cfb0fd2caa802054d (patch)
treee818066ce9f8072cdd96b54bcae93ce3958ed741 /alacritty/src
parent65a5bed2e1371cce71c6aea6ab1ab2d6a91e059d (diff)
downloadr-alacritty-32ea98deeba5f0eb6c51062cfb0fd2caa802054d.tar.gz
r-alacritty-32ea98deeba5f0eb6c51062cfb0fd2caa802054d.tar.bz2
r-alacritty-32ea98deeba5f0eb6c51062cfb0fd2caa802054d.zip
Fix hyperlink preview for 2 lines terminal (#6953)
The intention was to show it, however it was hidden due to wrong comparisson check.
Diffstat (limited to 'alacritty/src')
-rw-r--r--alacritty/src/display/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs
index b575b1a8..98dd04ad 100644
--- a/alacritty/src/display/mod.rs
+++ b/alacritty/src/display/mod.rs
@@ -1201,10 +1201,9 @@ impl Display {
// The maximum amount of protected lines including the ones we'll show preview on.
let max_protected_lines = uris.len() * 2;
- // Lines we shouldn't shouldn't show preview on, because it'll obscure the highlighted
- // hint.
+ // Lines we shouldn't show preview on, because it'll obscure the highlighted hint.
let mut protected_lines = Vec::with_capacity(max_protected_lines);
- if self.size_info.screen_lines() >= max_protected_lines {
+ if self.size_info.screen_lines() > max_protected_lines {
// Prefer to show preview even when it'll likely obscure the highlighted hint, when
// there's no place left for it.
protected_lines.push(self.hint_mouse_point.map(|point| point.line));