summaryrefslogtreecommitdiff
path: root/find.c
diff options
context:
space:
mode:
Diffstat (limited to 'find.c')
-rw-r--r--find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/find.c b/find.c
index f5fd9ce..b5fee08 100644
--- a/find.c
+++ b/find.c
@@ -538,7 +538,7 @@ static void find_edit_notify(void *context, TextBuffer *buffer, const EditInfo *
const u32 line = info->pos.line;
if (info->chars_inserted) {
- const u32 newlines_inserted = info->newlines_inserted;
+ const u32 newlines_inserted = info->end.line - info->pos.line;
if (newlines_inserted) {
// update line numbers for find results after insertion.
@@ -553,7 +553,7 @@ static void find_edit_notify(void *context, TextBuffer *buffer, const EditInfo *
find_research_lines(ted, line, line + newlines_inserted);
} else if (info->chars_deleted) {
- const u32 newlines_deleted = info->newlines_deleted;
+ const u32 newlines_deleted = info->end.line - info->pos.line;
if (newlines_deleted) {
// update line numbers for find results after deletion.