fix an issue where a selection could bleed out of a pane

When split horizontally, selecting multiple lines at the top of the left
pane could paint a horizontal selection line all the way across the rest
of the terminal to the right hand edge.
This commit is contained in:
Wez Furlong committed 2021-10-04 17:35:54 -07:00
1 parent 3da775d0e5
commit a5319d66bd
1 file changed
+2
+2
View File
@@ -952,6 +952,8 @@ impl super::TermWindow {
let stable_row = stable_top + line_idx as StableRowIndex;
let selrange = selrange.map_or(0..0, |sel| sel.cols_for_row(stable_row));
// Constrain to the pane width!
let selrange = selrange.start..selrange.end.min(dims.cols);
self.render_screen_line_opengl(
RenderScreenLineOpenGLParams {