Skip to content

Commit

Permalink
Fix multiline URL highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisduerr authored Aug 30, 2020
1 parent cdf5e51 commit aaf80c2
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions alacritty/src/renderer/rects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashMap;

use crossfont::Metrics;

use alacritty_terminal::index::{Line, Point};
use alacritty_terminal::index::{Column, Point};
use alacritty_terminal::term::cell::Flags;
use alacritty_terminal::term::color::Rgb;
use alacritty_terminal::term::{RenderableCell, SizeInfo};
Expand Down Expand Up @@ -35,16 +35,12 @@ impl RenderLine {
let mut rects = Vec::new();

let mut start = self.start;
for line in start.line.0..=self.end.line.0 {
let mut end = Point::new(Line(line), self.end.col);
if line != self.end.line.0 {
end.col = size.cols() - 1;
}

while start.line < self.end.line {
let end = Point::new(start.line, size.cols() - 1);
Self::push_rects(&mut rects, metrics, size, flag, start, end, self.color);

start.col.0 = 0;
start = Point::new(start.line + 1, Column(0));
}
Self::push_rects(&mut rects, metrics, size, flag, start, self.end, self.color);

rects
}
Expand Down

0 comments on commit aaf80c2

Please sign in to comment.