mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-18 09:08:30 +00:00
do not flash when empty
This commit is contained in:
parent
13545d147b
commit
dc2ff83fa5
@ -103,7 +103,7 @@ const flashField = StateField.define({
|
|||||||
try {
|
try {
|
||||||
for (let e of tr.effects) {
|
for (let e of tr.effects) {
|
||||||
if (e.is(setFlash)) {
|
if (e.is(setFlash)) {
|
||||||
if (e.value) {
|
if (e.value && tr.newDoc.length > 0) {
|
||||||
const mark = Decoration.mark({ attributes: { style: `background-color: #FFCA2880` } });
|
const mark = Decoration.mark({ attributes: { style: `background-color: #FFCA2880` } });
|
||||||
flash = Decoration.set([mark.range(0, tr.newDoc.length)]);
|
flash = Decoration.set([mark.range(0, tr.newDoc.length)]);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user