From 47b0c33820eeddfd0405b5d1464b5ea9865dedc1 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Tue, 1 Jun 2021 23:59:50 -0400 Subject: [PATCH] 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 file changed, 6 insertions(+) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 1760c94384..004e10b51e 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))