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:
1 parent
3da775d0e5
commit
a5319d66bd
1 file changed
+2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user