@@ -800,13 +800,14 @@ fn align_selections(cx: &mut Context) {
800800 let text = doc.text().slice(..);
801801 let selection = doc.selection(view.id);
802802
803+ let tab_width = doc.tab_width();
803804 let mut column_widths: Vec<Vec<_>> = Vec::new();
804805 let mut last_line = text.len_lines() + 1;
805806 let mut col = 0;
806807
807808 for range in selection {
808− let coords = coords_at_pos(text, range.head);
809− let anchor_coords = coords_at_pos(text, range.anchor);
809+ let coords = visual_coords_at_pos(text, range.head, tab_width);
810+ let anchor_coords = visual_coords_at_pos(text, range.anchor, tab_width);
810811
811812 if coords.row != anchor_coords.row {
812813 cx.editor