summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 31f3b582..652a193e 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -707,7 +707,7 @@ void align(Context& context)
auto& selections = context.editor().selections();
auto& buffer = context.buffer();
auto get_column = [&buffer](const BufferCoord& coord)
- { return buffer.char_distance({coord.line, 0}, coord); };
+ { return buffer[coord.line].char_count_to(coord.column); };
CharCount max_col = 0;
for (auto& sel : selections)