1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-30 14:49:26 +03:00

fix overflow calc

refs: #1627
This commit is contained in:
Wez Furlong 2022-02-07 07:49:51 -07:00
parent 7a5956d3b8
commit 39babc1f1e

View File

@ -2082,7 +2082,6 @@ impl super::TermWindow {
// TODO: clipping, but we can do that based on pixels // TODO: clipping, but we can do that based on pixels
let pos_x = cluster_x_pos let pos_x = cluster_x_pos
+ params.left_pixel_x
+ if params.use_pixel_positioning { + if params.use_pixel_positioning {
(glyph.x_offset + glyph.bearing_x).get() as f32 (glyph.x_offset + glyph.bearing_x).get() as f32
} else { } else {
@ -2090,14 +2089,10 @@ impl super::TermWindow {
}; };
if pos_x > params.pixel_width { if pos_x > params.pixel_width {
log::info!( log::info!("breaking on overflow {} > {}", pos_x, params.pixel_width);
"breaking on overflow {} > {} + {}",
pos_x,
params.left_pixel_x,
params.pixel_width
);
break; break;
} }
let pos_x = pos_x + params.left_pixel_x;
// We need to conceptually slice this texture into // We need to conceptually slice this texture into
// up into strips that consider the cursor and selection // up into strips that consider the cursor and selection