[LyX/master] Stop using a GCC extension for an unprintable character in regex.

Thibaut Cuvelier tcuvelier at lyx.org
Sat Feb 13 17:19:58 UTC 2021


commit d8c6bc7c1f23ae984c016ffd3a809bde517a24ce
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sat Feb 13 18:23:01 2021 +0100

    Stop using a GCC extension for an unprintable character in regex.
---
 src/support/filetools.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index cbbc2dd..41e508b 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -718,15 +718,15 @@ string const replaceEnvironmentPath(string const & path)
 			}
 			string env_var = getEnv(what.str(2));
 			if (env_var.empty()) {
-				// temporarily use escape (0x1B) in place of $
+				// temporarily use alert/bell (0x07) in place of $
 				if (brackets)
-					env_var = "\e{" + what.str(2) + '}';
+					env_var = "\a{" + what.str(2) + '}';
 				else
-					env_var = "\e" + what.str(2);
+					env_var = "\a" + what.str(2);
 			}
 			result = what.str(1) + env_var + what.str(3);
 		}
-		return subst(result, '\e', '$');
+		return subst(result, '\a', '$');
 	} catch (exception const & e) {
 		LYXERR0("Something is very wrong: " << e.what());
 		return path;


More information about the lyx-cvs mailing list