aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/position.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/position.rs b/helix-core/src/position.rs
index 17908d7a..ce37300a 100644
--- a/helix-core/src/position.rs
+++ b/helix-core/src/position.rs
@@ -83,7 +83,7 @@ pub fn visual_coords_at_pos(text: RopeSlice, pos: usize, tab_width: usize) -> Po
for grapheme in RopeGraphemes::new(text.slice(line_start..pos)) {
if grapheme == "\t" {
- col += tab_width;
+ col += tab_width - (col % tab_width);
} else {
let grapheme = Cow::from(grapheme);
col += grapheme_width(&grapheme);