@@ -260,7 +260,7 @@ impl View {
261 // If pos is in the middle of a wider grapheme (tab for example)
261 // If pos is in the middle of a wider grapheme (tab for example)
262 // return the starting offset.
262 // return the starting offset.
263− if col + width >= target {
263+ if col + width > target {
@@ -356,7 +356,7 @@ mod tests {
357 assert_eq!(
357 assert_eq!(
358 view.text_pos_at_screen_coords(&text, 41, 40 + OFFSET + 1, 4),
358 view.text_pos_at_screen_coords(&text, 41, 40 + OFFSET + 1, 4),
362 assert_eq!(
362 assert_eq!(
@@ -384,9 +384,13 @@ mod tests {
388+ view.text_pos_at_screen_coords(&text, 40, 40 + OFFSET + 4, 4),
387 assert_eq!(
391 assert_eq!(
388 view.text_pos_at_screen_coords(&text, 40, 40 + OFFSET + 5, 4),
392 view.text_pos_at_screen_coords(&text, 40, 40 + OFFSET + 5, 4),
392 assert_eq!(
396 assert_eq!(
@@ -396,7 +400,7 @@ mod tests {
397 assert_eq!(
401 assert_eq!(
398 view.text_pos_at_screen_coords(&text, 40, 40 + OFFSET + 7, 4),
402 view.text_pos_at_screen_coords(&text, 40, 40 + OFFSET + 7, 4),
402 assert_eq!(
406 assert_eq!(