Correct fit() for fill() (#16899)
* add test for #16897
this test fails at this commit.
snapshots are taken at e3b8a16c7f
* Fix #16897
* add changelog
* omit redundant test case
This commit is contained in:
1 parent
10db357c5f
commit
e13614ffd8
4 files changed
+90
-1
No files matched your search
@@ -234,7 +234,8 @@ function fits(
|
||||
case DOC_TYPE_ARRAY:
|
||||
case DOC_TYPE_FILL: {
|
||||
const parts = docType === DOC_TYPE_ARRAY ? doc : doc.parts;
|
||||
for (let i = parts.length - 1; i >= 0; i--) {
|
||||
const end = doc[DOC_FILL_PRINTED_LENGTH] ?? 0;
|
||||
for (let i = parts.length - 1; i >= end; i--) {
|
||||
cmds.push({ mode, doc: parts[i] });
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user