fix: increase/decrease font size with cell.P (#6274)

Co-authored-by: r.sergeev <r.sergeev@yadro.com>
This commit is contained in:
Roman Sergeev
2025-12-10 05:51:11 +03:00
committed by GitHub
parent cfdd7409bf
commit 4cd65e69bc
@@ -28,9 +28,11 @@ export function getFontStyleAtCursor(accessor: IAccessor) {
if (editorDataModel == null || activeTextRange == null) return null;
const textRuns = editorDataModel.getBody()?.textRuns;
if (textRuns == null) return;
const { startOffset } = activeTextRange;
const textRun = textRuns.find(({ st, ed }) => startOffset >= st && startOffset <= ed);
const { startOffset, endOffset } = activeTextRange;
const textRun = textRuns.find(({ st, ed }) => startOffset >= st && endOffset <= ed);
return textRun;
}