[LyX/master] find: give status message when auto-wrapping
Scott Kostyshak
skostysh at lyx.org
Fri Jul 16 19:40:54 UTC 2021
commit 47b0c33820eeddfd0405b5d1464b5ea9865dedc1
Author: Scott Kostyshak <skostysh at lyx.org>
Date: Tue Jun 1 23:59:50 2021 -0400
find: give status message when auto-wrapping
When auto-wrap is enabled, it is sometimes informative to know
when the search wraps.
A status message is consistent with LibreOffice and Vim.
---
src/lyxfind.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 1760c94..004e10b 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -359,6 +359,12 @@ bool findOne(BufferView * bv, docstring const & searchstr,
bv->cursor().setCursor(doc_iterator_end(&bv->buffer()));
bv->cursor().backwardPos();
}
+ if (auto_wrap) {
+ docstring const msg = forward
+ ? _("Search reached end of document, continuing from beginning.")
+ : _("Search reached beginning of document, continuing from end.");
+ bv->message(msg);
+ }
bv->clearSelection();
if (findOne(bv, searchstr, case_sens, whole, forward,
find_del, false, false, false, false))
More information about the lyx-cvs
mailing list