[gedit-plugins] Fix #37. When multiline match return the first line of the match



commit 8e735fe99c2678045333592f31eedcddb30e85bd
Author: Jordi Mas <jmas softcatala org>
Date:   Sun Feb 21 23:53:04 2021 +0100

    Fix #37. When multiline match return the first line of the match

 plugins/findinfiles/job.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/findinfiles/job.vala b/plugins/findinfiles/job.vala
index bad47fc..5876571 100644
--- a/plugins/findinfiles/job.vala
+++ b/plugins/findinfiles/job.vala
@@ -251,7 +251,7 @@ class FindJob {
             var line_length = nl - ptr;
 
             // Check if the match is within this line
-            if (span.from >= line_start && span.to < line_start + line_length) {
+            if (line_start >= span.from) {
                 // Update the bookmark
                 bookmark.line_number = line_count;
                 bookmark.line_start = line_start;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]