mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
do not flash when empty
This commit is contained in:
@@ -103,7 +103,7 @@ const flashField = StateField.define({
|
||||
try {
|
||||
for (let e of tr.effects) {
|
||||
if (e.is(setFlash)) {
|
||||
if (e.value) {
|
||||
if (e.value && tr.newDoc.length > 0) {
|
||||
const mark = Decoration.mark({ attributes: { style: `background-color: #FFCA2880` } });
|
||||
flash = Decoration.set([mark.range(0, tr.newDoc.length)]);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user