summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-06-05 18:47:39 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-06-06 19:44:07 +0200
commit70bf71e51fb8433cbbd3170d698ad3dc28ce8d16 (patch)
treec3e1e209ac775793b93511a580fcb272e0465a3b /src/normal.cc
parent580749a91da1e293c9dc8c5f3a72aa9c5a5e7666 (diff)
remove Buffer:char_{distance,advance} use line access instead
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)