commit cd6d21ebb3c66a60a38b371e66179bac6e8044ed
Author: Kornel Benko <[email protected]>
Date: Sat May 14 09:51:23 2022 +0200
FindAdv: Amend f845a4e9
Also do not remove '\n' if in non-format-search mode. Otherwise
'\n' cannot be found with regex '\s'
---
src/lyxfind.cpp | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index b996cd0..480d4d1 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -3986,12 +3986,14 @@ static string convertLF2Space(docstring const &s, bool
ignore_format)
size_t pos;
size_t start = 0;
size_t end = s.size() - 1;
- while (s[start] == '\n' && start <= end)
- start++;
- while (end >= start && s[end] == '\n')
- end--;
- if (start >= end + 1)
- return "";
+ if (!ignore_format) {
+ while (s[start] == '\n' && start <= end)
+ start++;
+ while (end >= start && s[end] == '\n')
+ end--;
+ if (start >= end + 1)
+ return "";
+ }
do {
bool dospace = true;
int skip = -1;
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs