From 6bcc038329cf947e4478bb664e255feba77132ab Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 22 Sep 2014 13:45:07 +0100 Subject: [PATCH] tweak helper functions in buffer_utils.hh --- src/buffer_utils.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer_utils.hh b/src/buffer_utils.hh index 0211a926..8f9599db 100644 --- a/src/buffer_utils.hh +++ b/src/buffer_utils.hh @@ -15,13 +15,13 @@ inline String content(const Buffer& buffer, const Selection& range) inline BufferIterator erase(Buffer& buffer, const Selection& range) { return buffer.erase(buffer.iterator_at(range.min()), - utf8::next(buffer.iterator_at(range.max()), buffer.end())); + buffer.iterator_at(buffer.char_next(range.max()))); } inline CharCount char_length(const Buffer& buffer, const Selection& range) { return utf8::distance(buffer.iterator_at(range.min()), - utf8::next(buffer.iterator_at(range.max()), buffer.end())); + buffer.iterator_at(buffer.char_next(range.max()))); } CharCount get_column(const Buffer& buffer,