summaryrefslogtreecommitdiff
path: root/find.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-07 15:18:45 -0400
committerpommicket <pommicket@gmail.com>2023-09-07 22:49:53 -0400
commit5cad1bee9b72610d9d97b5f97e7f1a245a2d2ba5 (patch)
tree5ee6f155f6900be4eeec07ad33417d2d9992a80f /find.c
parent815d652b570f53c989f62d0c7db847d7d6dfd940 (diff)
more diagnostics
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.