@@ -516,8 +516,8 @@ impl EditorView {
516516 use helix_core::graphemes::{grapheme_width, RopeGraphemes};
517517
518518 for grapheme in RopeGraphemes::new(text) {
519− let out_of_bounds = offset.col > (visual_x as usize)
520− || (visual_x as usize) >= viewport.width as usize + offset.col;
519+ let out_of_bounds = offset.col > visual_x
520+ || visual_x >= viewport.width as usize + offset.col;
521521
522522 if LineEnding::from_rope_slice(&grapheme).is_some() {
523523 if !out_of_bounds {
@@ -547,7 +547,7 @@ impl EditorView {
547547 let (display_grapheme, width) = if grapheme == "\t" {
548548 is_whitespace = true;
549549 // make sure we display tab as appropriate amount of spaces
550− let visual_tab_width = tab_width - (visual_x as usize % tab_width);
550+ let visual_tab_width = tab_width - (visual_x % tab_width);
551551 let grapheme_tab_width =
552552 helix_core::str_utils::char_to_byte_idx(&tab, visual_tab_width);
553553
@@ -566,7 +566,7 @@ impl EditorView {
566566 (grapheme.as_ref(), width)
567567 };
568568
569− let cut_off_start = offset.col.saturating_sub(visual_x as usize);
569+ let cut_off_start = offset.col.saturating_sub(visual_x);
570570
571571 if !out_of_bounds {
572572 // if we're offscreen just keep going until we hit a new line
@@ -583,7 +583,7 @@ impl EditorView {
583583 } else if cut_off_start != 0 && cut_off_start < width {
584584 // partially on screen
585585 let rect = Rect::new(
586− viewport.x as u16,
586+ viewport.x,
587587 viewport.y + line,
588588 (width - cut_off_start) as u16,
589589 1,