Numbered list not is updated when deleting item in Edit mode

This is similar to this issue, which has been promoted to the bug graveyard.

Nevertheless, the numbering does NOT update in Edit mode when a middle item is deleted, as described in issue 404. It IS updated in Preview mode.

Is there a way to get it to update in Edit mode too because it is confusing in Edit mode to see a discontinuous number series?

3 Likes

Switched from help to bug reports as I don’t think this is on the user side.

Thanks

1 Like

Thanks. I 1st thought it was my issue, so started typing in the Help section. Then, before posting I checked and found the other issue, and forgot to switch to the Bug section. Sorry.

1 Like

I’ve noticed this as well. Not a huge deal but it would be nice if both modes updated to the correct number.

1 Like

We strongly recommend you to search the forum with possible keywords before submitting a new bug report. Please also try your repro steps with third-party plugins and custom CSS disabled and see if it’s still reproducible. If it’s an issue with third-party plugins or themes, try contacting the author for help. Once you’ve done the above, delete this line.

Steps to reproduce

type a list with 4 item

  1. xx
  2. xx
  3. xx
  4. xx
    then delete the third index content 3.xx

Expected result

the left side index is same as right side

Actual result

Environment

  • Operating system: win10
  • Obsidian version: 0.9.20

Additional information

1 Like

same issue

1 Like

+1 for this bug report.
It’s annoying… esp. when you have a numbered list with many items, updating the correct number (in edit mode) is really a huge project.
During the correction, if you press the enter key by accident, a new numbered item is insert, and numbers in the rest of the list will automatically +1 again.

I found a way to trigger the re-ordering of the numbered list, which can be a workaround:

1. item-1
2. item-2
4. item-3
6. item-4

One can insert a sub item under the 2-nd item, and the items in parental list which is after the 2nd item will be re-ordered automatically.

Dec-25-2020 14-12-29

@GLight: the issue is about deleting an item.

I think the issue is that the action of deleting does not trigger the expected update of the number of the items in the list in the edit mode.

What I posted is a workaround which can trigger the update of the number in the list. With this workaround, we can wait for the developers to enhance the Obsidian without getting our noting experience affected too much by this issue.

@GLight: your workaround is for adding an item to a list. But if one deletes an item, is there a workaround so it updates?

After some more tests, I found the real trigger is the tab key. You can always trigger the update whenever you want(e.g. after deleting an item): directly pressing the tab key to trigger the re-numbering of the current item and the items below which are with the same indent level:
Dec-29-2020 09-30-13

NOTE: The items above the insertion are not affected.
NOTE: The child items are not affected.

btw, you may need to delete the inserted tab key after the update.

5 Likes

Would it be feasible to automatically trigger the renumbering whenever inserting or deleting a line in a numbered list?

(as pointed out by @GLight the functionality already exists, but it needs to be manually invoked by hitting tab).

There are many bug reports/comments/requests to improve re-numbering in lists.