]> git.neil.brown.name Git - edlib.git/commitdiff
renderline: don't try to parse <> in the prefix.
authorNeilBrown <neil@brown.name>
Fri, 8 Sep 2023 05:46:32 +0000 (15:46 +1000)
committerNeilBrown <neil@brown.name>
Fri, 8 Sep 2023 05:46:32 +0000 (15:46 +1000)
Markup isn't allowed in the prefix, so don't try to parse it.
This fixes a problem when the default for find-document ends <2>.

Signed-off-by: NeilBrown <neil@brown.name>
DOC/TODO.md
lib-renderline.c

index ecdcd66c984689e29ba34e0ea27bf035ec40661e..0b515397dbb59a240460ed56d874e550a9c29cda 100644 (file)
@@ -9,7 +9,7 @@ the file.
 
 ### Triage
 
-- [ ] find-document - if default doc has <>, displays wrongly.
+- [X] find-document - if default doc has <>, displays wrongly.
 - [ ] From start-of-file move to end, then up, then down.
       Display jumps.  Why?
 - [ ] Add menubar menu with recent documents?
index 77876d22d19e16c4f46d75bcb3734048cb5839be..c5108de0b15a434f12a65cbd0f44e47a08cc59e7 100644 (file)
@@ -1315,8 +1315,9 @@ DEF_CMD(renderline_set)
        if (!ci->str)
                return -Enoarg;
        if (prefix)
-               prefix = cvt(strconcat(ci->home, "<bold>", prefix, "</>"));
-
+               prefix = strconcat(ci->home, ACK SOH "bold" STX,
+                                  prefix, // No mark in prefix!
+                                  ETX);
        if (prefix)
                rd->line = strconcat(NULL, prefix, ci->str);
        else