summaryrefslogtreecommitdiff
path: root/src/display_buffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/display_buffer.cc')
-rw-r--r--src/display_buffer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display_buffer.cc b/src/display_buffer.cc
index c112679d..c26ca8da 100644
--- a/src/display_buffer.cc
+++ b/src/display_buffer.cc
@@ -2,6 +2,7 @@
#include "assert.hh"
#include "buffer.hh"
+#include "buffer_utils.hh"
#include "utf8.hh"
#include "face_registry.hh"
@@ -62,8 +63,7 @@ CharCount DisplayAtom::length() const
switch (m_type)
{
case BufferRange:
- return utf8::distance(m_buffer->iterator_at(m_range.begin),
- m_buffer->iterator_at(m_range.end));
+ return char_length(*m_buffer, m_range.begin, m_range.end);
case Text:
case ReplacedBufferRange:
return m_text.char_length();