"Move line up/down" action behaves strangely when moving towards folded text sections

Nutshell: When I’m rearranging items in a bulleted list (80% of my Obsidian usage) and I use the hotkey to “Move line up/down” towards/past a folded section, the affected lines are rendered in a messed-up-looking way, even though the file (as written to disk) appears to be stored correctly.

Steps to reproduce

  • In a file, create a bulleted list of 3+ items, where the 1st list item contains a nested sublist.
  • Fold the 1st item so its sublist is hidden.
  • Put the cursor on the 2nd list item (ie. the one directly after the folded sublist), then use the “Move line up” hotkey.
  • Observe that the outline is now visually depicted in a broken-looking state.
  • For added pleasure, press Cmd + Z (or the “Move line down” hotkey) to move that same line back down, and observe similar brokenness.
  • Close and re-open the file; observe that the file was in fact written in a correct-seeming way, it was just the rendering that got messed up.

Expected result

Whenever I move a line up “towards” a folded section, my intended and ideal outcome is that the line should be moved up above the parent of the folded section, ie. the folded section should be treated as nonexistent for the purpose of the “Move line up/down” operations.

If this is not feasible, the next best result is probably that the folded section should become un-folded, and then the line is moved up 1 item as it currently does. That seems to me the least-confusing outcome to an ambiguous action, ever though it’s almost never the outcome that I actually intended.

Actual result

In terms of what’s written to the file, the line is moved up above line preceding it (this is generally not what I was trying to do when re-ordering items in a list that has folded sections, but at least it’s very predictable).

But in terms of what’s rendered to the display, the outline becomes “messed up”, for lack of a more specific word. The item I’m moving appears to the right of the folded section, which remains folded; the final line of the folded section is moved below the line which now contains (the fold parent + folded section + the item I moved). See screenshots below.

The unfolded outline:

The same outline, folded:

When I move item C up:

When I press cmd + Z to move item C back down:

Now I move item B up and that’s really confusing too:

Environment

MacOS, Obsidian v0.16.2, installer v0.15.9.


Thanks for reading!

1 Like

You want to use the outliner plugin. It does this.

I agree

You want to use the outliner plugin. It does this.

I’ve used the outliner plugin before, but had to disable it due to performance problems; each time I tried to indent, outdent, move a line up or down, the app froze for 500-1500 ms (on my 2015 Intel MBP), presumably because the plugin was calculating & validating the updated state of the outline.

I was pleased & impressed by the plugin’s featureset, but I found the constant UI freezes really disruptive to my thinking & writing process. Turns out I’m happier with “vanilla” Obsidian’s more basic behavior and far faster response times.