aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/locale.conf2
-rw-r--r--core/locales/locale.ar.conf2
-rw-r--r--core/locales/locale.de.conf2
-rw-r--r--core/locales/locale.es.conf2
-rw-r--r--core/locales/locale.fr.conf2
-rw-r--r--core/locales/locale.it.conf2
-rw-r--r--core/locales/locale.pl.conf2
-rw-r--r--core/locales/locale.ru.conf2
-rw-r--r--core/locales/locale.sv.conf2
-rw-r--r--core/locales/locale.zh.conf2
-rw-r--r--modules/textadept/find.lua12
11 files changed, 29 insertions, 3 deletions
diff --git a/core/locale.conf b/core/locale.conf
index daca45fa..53f16fa8 100644
--- a/core/locale.conf
+++ b/core/locale.conf
@@ -113,6 +113,8 @@ Files(F4) = Files(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = Search wrapped
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = No results found
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.ar.conf b/core/locales/locale.ar.conf
index d06e584f..5969fe3e 100644
--- a/core/locales/locale.ar.conf
+++ b/core/locales/locale.ar.conf
@@ -113,6 +113,8 @@ Files(F4) = ملفات(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = تلقائيًا عُدْ إلى البداية
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = عذرًا, لا يوجد نتائج
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.de.conf b/core/locales/locale.de.conf
index 5966a755..700065dd 100644
--- a/core/locales/locale.de.conf
+++ b/core/locales/locale.de.conf
@@ -113,6 +113,8 @@ Files(F4) = Dateien(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = Suche am Anfang fortgesetzt
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = Keine Treffer gefunden
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.es.conf b/core/locales/locale.es.conf
index d52b29d3..42d9fc9d 100644
--- a/core/locales/locale.es.conf
+++ b/core/locales/locale.es.conf
@@ -113,6 +113,8 @@ Files(F4) = Ficheros(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = La búsqueda ha sobrepasado el final/inicio del documento
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = No se han encontrado coincidencias
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.fr.conf b/core/locales/locale.fr.conf
index 786d2301..4820ee1e 100644
--- a/core/locales/locale.fr.conf
+++ b/core/locales/locale.fr.conf
@@ -114,6 +114,8 @@ Files(F4) = Fichiers(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = La recherche a recommencé
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = Aucun résultat trouvé
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.it.conf b/core/locales/locale.it.conf
index 48987955..1dde5e31 100644
--- a/core/locales/locale.it.conf
+++ b/core/locales/locale.it.conf
@@ -113,6 +113,8 @@ Files(F4) = File(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = La ricerca è ricominciata
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = Nessun risultato trovato
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.pl.conf b/core/locales/locale.pl.conf
index 40e3a4c2..50fe91f8 100644
--- a/core/locales/locale.pl.conf
+++ b/core/locales/locale.pl.conf
@@ -114,6 +114,8 @@ Files(F4) = Pliki (F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = Automatyczny powrót do początku
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = Niczego nie znaleziono
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.ru.conf b/core/locales/locale.ru.conf
index 9a95168c..5f24b6c3 100644
--- a/core/locales/locale.ru.conf
+++ b/core/locales/locale.ru.conf
@@ -113,6 +113,8 @@ Files(F4) = Files(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = Искать по кругу
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = Ничего не найдено
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.sv.conf b/core/locales/locale.sv.conf
index 4ad12e3c..015ab2f0 100644
--- a/core/locales/locale.sv.conf
+++ b/core/locales/locale.sv.conf
@@ -113,6 +113,8 @@ Files(F4) = Files(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = Sökningen slog runt
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = Inga resultat hittades
# The title of the dialog for selecting files to search in.
diff --git a/core/locales/locale.zh.conf b/core/locales/locale.zh.conf
index eb1a7689..7d366651 100644
--- a/core/locales/locale.zh.conf
+++ b/core/locales/locale.zh.conf
@@ -113,6 +113,8 @@ Files(F4) = 文件(F4)
# The statusbar text shown when a search has wrapped back to the beginning of
# the buffer.
Search wrapped = Search wrapped
+# Part of the statusbar text "Match X/Y" shown during searches.
+Match = Match
# The statusbar text shown when the text to search for was not found.
No results found = 未找到结果
# The title of the dialog for selecting files to search in.
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 761b70d0..ffc4d2b2 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -220,17 +220,23 @@ local function find(text, next, flags, no_wrap, wrapped)
ui.statusbar_text = ''
end
- -- Highlight all found occurrences.
+ -- Count and optionally highlight all found occurrences.
+ local count, current = 0
clear_highlighted_matches()
- if pos ~= -1 and M.highlight_all_matches and #text > 1 then
+ if pos ~= -1 then
buffer.search_flags = flags
buffer:target_whole_document()
while buffer:search_in_target(text) ~= -1 do
local s, e = buffer.target_start, buffer.target_end
if s == e then break end -- prevent loops
- buffer:indicator_fill_range(s, e - s)
+ if M.highlight_all_matches and e - s > 1 then
+ buffer:indicator_fill_range(s, e - s)
+ end
buffer:set_target_range(e, buffer.length + 1)
+ count = count + 1
+ if s == pos then current = count end
end
+ ui.statusbar_text = string.format('%s %d/%d', _L['Match'], current, count)
-- For regex searches, `buffer.tag` was clobbered. It needs to be filled in
-- again for any subsequent replace operations that need it.
if ui.find.regex then