[LyX features/biginset] FindAdv: Handle neg-spaces like normal space if searching without format

Kornel Benko kornel at lyx.org
Fri Apr 5 13:41:47 UTC 2024


commit 07cacef398d6d748e30d70fa6f06821e82ac4e4e
Author: Kornel Benko <kornel at lyx.org>
Date:   Sun Dec 31 14:27:40 2023 +0100

    FindAdv: Handle neg-spaces like normal space if searching without format
---
 src/insets/InsetSpace.cpp | 7 ++++++-
 src/insets/InsetSpace.h   | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp
index 53fda518da..8ad6f7f5e0 100644
--- a/src/insets/InsetSpace.cpp
+++ b/src/insets/InsetSpace.cpp
@@ -773,7 +773,12 @@ int InsetSpace::plaintext(odocstringstream & os,
 	case InsetSpaceParams::NEGTHIN:
 	case InsetSpaceParams::NEGMEDIUM:
 	case InsetSpaceParams::NEGTHICK:
-		return 0;
+		if (rp.find_effective()) {
+			os << ' ';
+			return 1;
+		}
+		else
+			return 0;
 	default:
 		os << ' ';
 		return 1;
diff --git a/src/insets/InsetSpace.h b/src/insets/InsetSpace.h
index 04edaed2c4..ceca1cfa06 100644
--- a/src/insets/InsetSpace.h
+++ b/src/insets/InsetSpace.h
@@ -136,7 +136,7 @@ public:
 	///
 	void validate(LaTeXFeatures & features) const override;
 	///
-	bool findUsesToString() const override { return true; }
+	bool findUsesToString() const override { return false; }
 	///
 	void toString(odocstream &) const override;
 	///


More information about the lyx-cvs mailing list