From c5dff2f99eeee744c7be903a7127b283b8c7fbf8 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 22 Sep 2021 12:43:28 -0400
Subject: fixed problem with fontsize corruption.  fixed showing correct font
 size when creating a new empty document with storedMarks.  fixed color of
 previewcursor in dark mode.

---
 src/client/views/nodes/formattedText/RichTextMenu.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/client/views/nodes/formattedText/RichTextMenu.tsx')

diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx
index 3efc46259..bd05af977 100644
--- a/src/client/views/nodes/formattedText/RichTextMenu.tsx
+++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx
@@ -188,11 +188,10 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps>   {
         if (this.TextView.props.isSelected(true)) {
             const state = this.view.state;
             const pos = this.view.state.selection.$from;
-            const marks: Mark<any>[] = [];
+            const marks: Mark<any>[] = [...(state.storedMarks ?? [])];
             if (state.selection.empty) {
                 const ref_node = this.reference_node(pos);
-                marks.push(...[...(ref_node !== this.view.state.doc && ref_node?.isText ?
-                    [...(state.storedMarks ?? []), ...Array.from(ref_node.marks)] : [])]);
+                marks.push(...(ref_node !== this.view.state.doc && ref_node?.isText ? Array.from(ref_node.marks) : []));
             } else {
                 state.doc.nodesBetween(state.selection.from, state.selection.to, (node, pos, parent, index) => {
                     node.marks?.filter(mark => !mark.isInSet(marks)).map(mark => marks.push(mark));
-- 
cgit v1.2.3-70-g09d2

