summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index fd2be75c..956ca959 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -501,12 +501,12 @@ static BufferCompletion complete_word(const Buffer& buffer,
bool other_buffers)
{
auto pos = buffer.iterator_at(cursor_pos);
- if (pos.is_begin() or not is_word(*utf8::previous(pos)))
+ if (pos == buffer.begin() or not is_word(*utf8::previous(pos)))
return {};
auto end = buffer.iterator_at(cursor_pos);
auto begin = end-1;
- while (not begin.is_begin() and is_word(*begin))
+ while (begin != buffer.begin() and is_word(*begin))
--begin;
if (not is_word(*begin))
++begin;