]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Tweaks to the wcwidth() algorithm in QRF, for better agreement with
authordrh <>
Sun, 30 Nov 2025 23:09:24 +0000 (23:09 +0000)
committerdrh <>
Sun, 30 Nov 2025 23:09:24 +0000 (23:09 +0000)
the Terminal on Ubuntu.  There is no perfect solution, as different
ttys do things differently, but we should try to get as close as we
can.

FossilOrigin-Name: 35f39f7cb1030b1a57f2921f50ab600496fc1e774593717845e87f2e47dc49ba

ext/qrf/qrf.c
manifest
manifest.uuid

index 172b56ee22acb3aab9c71052d9acc413528cee47..1e3a3a44ba0eaaa36a6a1d6ffe02ae62e155e897 100644 (file)
@@ -428,7 +428,7 @@ static const struct {
   {1, 0x00f7f},  {0, 0x00f80},  {1, 0x00f85},  {0, 0x00f86},  {1, 0x00f88},
   {0, 0x00f90},  {1, 0x00f98},  {0, 0x00f99},  {1, 0x00fbd},  {0, 0x00fc6},
   {1, 0x00fc7},  {0, 0x0102d},  {1, 0x01031},  {0, 0x01032},  {1, 0x01033},
-  {0, 0x01036},  {1, 0x01038},  {0, 0x01039},  {1, 0x0103a},  {0, 0x01058},
+  {0, 0x01036},  {1, 0x0103b},  {0, 0x01058},
   {1, 0x0105a},  {2, 0x01100},  {0, 0x01160},  {1, 0x01200},  {0, 0x0135f},
   {1, 0x01360},  {0, 0x01712},  {1, 0x01715},  {0, 0x01732},  {1, 0x01735},
   {0, 0x01752},  {1, 0x01754},  {0, 0x01772},  {1, 0x01774},  {0, 0x017b4},
@@ -471,7 +471,7 @@ int sqlite3_qrf_wcwidth(int c){
   int iFirst, iLast;
 
   /* Fast path for common characters */
-  if( c<=0x300 ) return 1;
+  if( c<0x300 ) return 1;
 
   /* The general case */
   iFirst = 0;
index 1f7e6e3951117a6ca86649ba6c7caf8e12173eb6..f4db881bb042740fa4d71521968346c17038e0a9 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improvement\simplementation\sof\sthe\sprevious\scheck-in:\sruns\sfaster.
-D 2025-11-30T17:47:27.835
+C Tweaks\sto\sthe\swcwidth()\salgorithm\sin\sQRF,\sfor\sbetter\sagreement\swith\nthe\sTerminal\son\sUbuntu.\s\sThere\sis\sno\sperfect\ssolution,\sas\sdifferent\nttys\sdo\sthings\sdifferently,\sbut\swe\sshould\stry\sto\sget\sas\sclose\sas\swe\ncan.
+D 2025-11-30T23:09:24.695
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -417,7 +417,7 @@ F ext/misc/windirent.h 02211ce51f3034c675f2dbf4d228194d51b3ee05734678bad5106fff6
 F ext/misc/zipfile.c 09e6e3a3ff40a99677de3c0bc6569bd5f4709b1844ac3d1c1452a456c5a62f1c
 F ext/misc/zorder.c bddff2e1b9661a90c95c2a9a9c7ecd8908afab5763256294dd12d609d4664eee
 F ext/qrf/README.md 86fc5c3c5e3eddbe54fc1235cbdc52b8c2c0732791d224345c3014cd45c4c0e7
-F ext/qrf/qrf.c 32b5e5a189dde20117210d385abae48e08b5f111f302a8803cffffb8f79a7cdb
+F ext/qrf/qrf.c 425d02cffcc5b5fe9ff5817794bf751b1fdd6912f570c354272429ce1262b866
 F ext/qrf/qrf.h 322d48537a5aa39c206c2ec0764a7938ea7662a8c25be1c4e9d742789609ba1e
 F ext/rbu/rbu.c 801450b24eaf14440d8fd20385aacc751d5c9d6123398df41b1b5aa804bf4ce8
 F ext/rbu/rbu1.test 25870dd7db7eb5597e2b4d6e29e7a7e095abf332660f67d89959552ce8f8f255
@@ -2180,8 +2180,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 42b6dab92464833eeae5fb261ed689e4b632132d7c8e1ea920aeeb5d50091ab7
-R a055702d155b1a51b4b772dbcde9c4ed
+P 484d1fd2a240c8fd006e7794936d6678b8db792a8b2b30d2ae5baf5a1b19463a
+R 421579a1dc9b719bd685b85a638635dd
 U drh
-Z 79eb370b2f8598cdf686e419d28e8dd2
+Z 45edc4a3bdf06ba616e7832a1c1aa528
 # Remove this line to create a well-formed Fossil manifest.
index 270e31532b95ea6d71f5fc0fb7266bf54beba854..f7b6ac45bca471eae2d4e554b9e7cd2bb7d545fd 100644 (file)
@@ -1 +1 @@
-484d1fd2a240c8fd006e7794936d6678b8db792a8b2b30d2ae5baf5a1b19463a
+35f39f7cb1030b1a57f2921f50ab600496fc1e774593717845e87f2e47dc49ba