summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dged/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dged/buffer.c b/src/dged/buffer.c
index 6337096..fed8f87 100644
--- a/src/dged/buffer.c
+++ b/src/dged/buffer.c
@@ -304,7 +304,8 @@ find_prev_in_line(struct buffer *buffer, struct location start,
text_line_codepoint_iterator(buffer->text, start.line);
uint32_t coli = 0, tab_width = get_tab_width(buffer), found_at;
struct codepoint *codepoint;
- while (coli < start.col && (codepoint = utf8_next_codepoint(&iter)) != NULL) {
+ while (coli <= start.col &&
+ (codepoint = utf8_next_codepoint(&iter)) != NULL) {
if (predicate(codepoint)) {
found = true;
found_at = coli;