From 0be053895d818c5b898dbf50b7203bbb5f0e8cd9 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 29 Sep 2023 19:29:05 +1000 Subject: [PATCH] renderline: fix handling of with nested attrs. Without this, a 'hide' would stop when any nest attribute stopped. Signed-off-by: NeilBrown --- DOC/TODO.md | 2 +- lib-renderline.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/DOC/TODO.md b/DOC/TODO.md index 121faccf..f81ef9ab 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -16,7 +16,7 @@ the file. in x11selection_Xcb gets freed??? - [X] adding new lines at end of doc in x11 leaves phantom underline cursors. -- [ ] 20230908090027.6AA0DC05B9@prodcs.lwn.net has a wrapped +- [X] 20230908090027.6AA0DC05B9@prodcs.lwn.net has a wrapped tag which isn't parsed well. - [X] find-document - if default doc has <>, displays wrongly. - [X] From start-of-file move to end, then up, then down. diff --git a/lib-renderline.c b/lib-renderline.c index 04c9a5cf..e5d8169a 100644 --- a/lib-renderline.c +++ b/lib-renderline.c @@ -63,7 +63,6 @@ * recognised has "wrap-" stripped and is used for the * head and tail. Default is fg:blue,underline * hide - Text is hidden if cursor is not within range. - * NOT YET IMPLEMENTED * * "nn" is measured in "points" which is 1/10 the nominal width of chars * in the default font size, which is called "10". A positive value is @@ -96,7 +95,7 @@ struct render_item { * it. */ uint8_t hide; /* This and consecutive render_items - * with the same hide nmber form a + * with the same hide number form a * hidden extent which is visible when * the cursor is in it. */ @@ -256,8 +255,8 @@ static void parse_line(struct rline_data *rd safe) * which should leave either a trailing comma, or an * empty string. */ - buf_append(&attr, ','); old_len = attr.len; + buf_append(&attr, ','); foreach_attr(a, v, st, line) { if (amatch(a, "centre") || amatch(a, "center") || amatch(a, "ctab")) { -- 2.43.0