]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change the non-printing character escapes for editline to U+0001 and
authordrh <>
Sat, 2 May 2026 23:40:40 +0000 (23:40 +0000)
committerdrh <>
Sat, 2 May 2026 23:40:40 +0000 (23:40 +0000)
U+0002.  Also insert those escapes for readline.  Readline does not
need it (because it can figure them out on its own) but they are needed
when editline is being used in readline-compatibility mode, and we have
no way of distinguishing between editline and readline in that case, so
we might as well include them.

FossilOrigin-Name: b9545b0f0b6fa0a777a064e1410b17f52cb49d853c188f9b8b3a772bd810ece3

manifest
manifest.uuid
src/shell.c.in

index 4dd0138826c51994e03b66924575712768f8a668..f5fedd3d85c61e823fb051318bebf622cbfcdebe 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Attempt\sto\sautomatically\sinsert\sU+0001\sescape\sbytes\sbefore\sand\safter\nANSI\sX3.64\sescape\ssequences\swhen\susing\seditline,\sto\swork\saround\sthe\nlimitations\sof\seditline.
-D 2026-05-02T23:03:42.300
+C Change\sthe\snon-printing\scharacter\sescapes\sfor\seditline\sto\sU+0001\sand\nU+0002.\s\sAlso\sinsert\sthose\sescapes\sfor\sreadline.\s\sReadline\sdoes\snot\nneed\sit\s(because\sit\scan\sfigure\sthem\sout\son\sits\sown)\sbut\sthey\sare\sneeded\nwhen\seditline\sis\sbeing\sused\sin\sreadline-compatibility\smode,\sand\swe\shave\nno\sway\sof\sdistinguishing\sbetween\seditline\sand\sreadline\sin\sthat\scase,\sso\nwe\smight\sas\swell\sinclude\sthem.
+D 2026-05-02T23:40:40.608
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -736,7 +736,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
 F src/resolve.c fcc406bfb055bee9954ee77c023f4a2a66a24bcdf1573516a72280811a269c20
 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
 F src/select.c 4c05cde130f26991b7411d8c6809e0630625e18078742c963a047b4b9cc01d49
-F src/shell.c.in d8fcd944b71df552850c5f700cca5017cdb3afa8d9f271bfe61dc267d6bf94fd
+F src/shell.c.in 28e4b97a6746973c935b8510c7926ee9fe3d03bb35056064e9a3b7cb29c73178
 F src/sqlite.h.in 39d2e09114d2bdb7afd998f4a469c8f8cd065f8093835a7d0422f260fc78fb4f
 F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479
 F src/sqlite3ext.h 9788c301f95370fa30e808861f1d2e6f022a816ddbe2a4f67486784c1b31db2e
@@ -2203,8 +2203,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee
 F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
 F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
-P bb8f6deeff31e9cc9b5a88b17b29dc6cd4fb4515134fa8e9758e33e42bbe89b0
-R 0f275a4b9bd7e4293f045b3ef7e7c6fd
+P 63050bee6e5ed46cead14bd5a02b0cb6a7dbcdcb6a56601b90c10cf1c8d84efc
+R 3d27d61ea4b8d5c891af38a2c8c58401
 U drh
-Z c6adb3eb6a7746eb8a9a09f41037dc74
+Z f6ed14e12eebf843b747f8d53d83a51a
 # Remove this line to create a well-formed Fossil manifest.
index c37047b03419cb83b3b755f45981c3a819991387..1c02524f5bb71b1ce881116843b9b66cb11e7ded 100644 (file)
@@ -1 +1 @@
-63050bee6e5ed46cead14bd5a02b0cb6a7dbcdcb6a56601b90c10cf1c8d84efc
+b9545b0f0b6fa0a777a064e1410b17f52cb49d853c188f9b8b3a772bd810ece3
index aee9a32a6d7b6941d95504431dd05bbc54a3f1f7..8e08823166b71ad237ea5e1e6cf52e8bd84b3c39 100644 (file)
@@ -1357,9 +1357,12 @@ static char *expand_prompt(
     sqlite3_str_appendchar(pOut, 1, '\0');
   }
 
-#if HAVE_EDITLINE
+#if HAVE_EDITLINE || HAVE_READLINE
   /* Editline does not recognize ANSI X3.64 escape sequences.  So we have
-  ** to find them all and enclose them inside '\1' delimiters.
+  ** to find them all and enclose them inside '\1'...'\2' delimiters.
+  ** Readline does not require this crutch, but it does not hurt to include
+  ** it, for the cases where editline is running in readline compatibility
+  ** mode.
   */
   if( strstr(sqlite3_str_value(pOut),"\033[")!=0 ){
     char *zOrig = sqlite3_str_finish(pOut);
@@ -1375,7 +1378,7 @@ static char *expand_prompt(
           k += 2;
         }
         sqlite3_str_append(pOut, &zOrig[i], k-i);
-        sqlite3_str_appendchar(pOut, 1, 1);
+        sqlite3_str_appendchar(pOut, 1, 2);
         i = k-1;
       }else{
         sqlite3_str_appendchar(pOut, 1, zOrig[i]);