Dyldog / luhman-obsidian-plugin

GNU General Public License v3.0
61 stars 18 forks source link

[BUG] Weird Static Space Behavior with Create Child/Sibling Selection #32

Closed Eforen closed 2 years ago

Eforen commented 2 years ago

Issue Searching

OtherIssues

Similar issues open, however I feel this issue is difrent enough to warrent a new issue.

Description

Selecting text and then runing Create Child/Sibling Zettel has very weird results

Reproduction steps

  1. Go to a note for example 1⁝ Root
  2. Type in abcdefghijklmnop
  3. On the next line a b c d e f g h i j k l m n o p
  4. On the first line select cdef
  5. Run the Luhman: New Child Zettel Note CMD
  6. Go back to the original note
  7. On the first line select klmn
  8. Run the Luhman: New Sibling Zettel Note CMD
  9. Go back to the original note
  10. On the second line select cdef
  11. Run the Luhman: New Child Zettel Note CMD
  12. Go back to the original note
  13. On the second line select klmn
  14. Run the Luhman: New Sibling Zettel Note CMD
  15. Go back to the original note

Expected Result

ab [[1a⁝ Cdef]]ghijklmno [[2⁝ Klmn]] p
a b [[1b⁝ C D E F]]g h i j [[3⁝ K L M N]] o p

or

ab[[1a⁝ Cdef]]gghijklmno [[2⁝ Klmn]]p
a b [[1b⁝ C D E F]] g h i j [[3⁝ K L M N]] o p

Actual Result

abcdefg [[2c4n1a25a⁝ Cdef]]hijklmno [[2c4n1a26⁝ Klmn]]p
a b c d e f  [[2c4n1a25b⁝ C D E F]]g h i j k l m n  [[2c4n1a27⁝ K L M N]]o p

Version

1.1.0 (Current Version)

Relevent log output

No response

Screenshots

No response

Other Notes

I think I know where this code is and will probably be addressing the fix just making the issue to do it the right way / incase I fall off the face of the earth somehow...