Skip to content

Commit bff8a46

Browse files
authored
Merge pull request #2964 from Meinzzzz/master
Fix duplicate atoms created by setValue() with incomplete LaTeX
2 parents 13563e1 + 9c98e1c commit bff8a46

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/editor-model/model-private.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,11 +933,11 @@ function atomIsInRange(
933933
const firstChild = includeFirstAtoms
934934
? atom.firstChild
935935
: firstNonFirstChild(atom);
936-
if (!firstChild) return false;
936+
if (!firstChild) return true;
937937
const lastChild = includeFirstAtoms
938938
? atom.lastChild
939939
: lastNonFirstChild(atom);
940-
if (!lastChild) return false;
940+
if (!lastChild) return true;
941941

942942
const firstOffset = model.offsetOf(firstChild);
943943
if (firstOffset >= first && firstOffset <= last) {

0 commit comments

Comments
 (0)