From: NeilBrown Date: Sun, 4 Jun 2023 01:18:42 +0000 (+1000) Subject: doc: fix doc_default_content X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=1fc45cca4916358863fec0a6218f27348ab46795;p=edlib.git doc: fix doc_default_content We were ignoring ->mark2 (endpoint) and sending a CHAR_RET() rather than a char. Signed-off-by: NeilBrown --- diff --git a/core-doc.c b/core-doc.c index 0066ff43..b936f1ce 100644 --- a/core-doc.c +++ b/core-doc.c @@ -838,7 +838,8 @@ DEF_CMD(doc_default_content) nxt = ccall(&dchar, cmd, ci->home, 1, m); while (nxt > 0 && nxt != CHAR_RET(WEOF) && - comm_call(ci->comm2, "consume", ci->home, nxt, m) > 0) + (!ci->mark2 || mark_ordered_or_same(m, ci->mark2)) && + comm_call(ci->comm2, "consume", ci->home, (nxt & 0x1FFFF), m) > 0) nxt = ccall(&dchar, cmd, ci->home, 1, m); return nxt < 0 ? nxt : 1;