Skip to content

Commit

Permalink
lab/text: reflow if needed in getLinesV2 (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin authored Jun 10, 2024
1 parent 1315db4 commit 823b884
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/lab/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,9 @@

const state = this._getState(util.target);
if (Scratch.Cast.toString(args.WITH_WORD_WRAP) === "with word wrap") {
if (state.skin._needsReflow()) {
state.skin._reflowText();
}
return state.skin.lines.length;
}
return state.skin.text.split("\n").length;
Expand Down

0 comments on commit 823b884

Please sign in to comment.