vipzhicheng / logseq-plugin-move-block

A Logseq plugin help you copy or cut blocks to anywhere you want.
https://www.vipzhicheng.com/logseq-plugin-move-block/
Other
47 stars 6 forks source link

"Cannot move empty block" error #19

Open quantumfrost opened 10 months ago

quantumfrost commented 10 months ago

When I try to move a block while keeping an embed, I often get "Cannot move an empty block" error. Works after a few tries.

G-i-o commented 3 months ago

Same here. When trying to move any block anywhere (cut/copy) it fails and shows the "Cannot move an empty block".

Tested on Logseq v0.10.7 as well as on previous versions.

Looking forward to see this fixed as I find this a useful addon.

Thank YOU!

vipzhicheng commented 1 month ago

I can not reproduce this issue, so I think I need some examples to debug.

vipzhicheng commented 1 month ago

Please upgrade and test again. Before the logic is stop at empty block if you select more than one. Now the logic is to ignore empty block and continue to process the rest of blocks.

G-i-o commented 1 month ago

@vipzhicheng, re-tested on latest version.

As before, it would work on some blocks, in particular in newly created ones. On some others it would give out an error as "Found empty selected block, ignore and continue to process!".

vipzhicheng commented 1 month ago

This means selected blocks include empty blocks. Here I need some example cases to reproduce.

G-i-o commented 3 weeks ago

I understand. I cannot see empty blocks but it seems that if I delete the empty lines than it works.

Here's an example that does not work:

- TODO [#C] Report Bugs :#IT:

    * Bug 1
    * Bug 2

But if I change it to the following, it works:

- TODO [#C] Report Bugs :#IT:
    * Bug 1
    * Bug 2
G-i-o commented 3 weeks ago

Something strange. I have just tried manually re-inputting the first example above and this time it works. But if I copy it from here as it is, it doesn't. Still, I cannot see any empty blocks.