Skip to content

Enter key behavior seems incorrect on an empty list item at the end of a document #8

@ridleywinters

Description

@ridleywinters

Say you have a document like the below, where the | character represents where the cursor is (it's not a literal character in this example):

-   Item 1
-   Item 2
-   |

If you press Enter in this case, nothing happens. It's as if the Enter key were not pressed. This seems like a bug.

In order, I would have expected the behavior to be one of the folllowing:

  1. Interpret Enter on a trailing empty list item to mean it's the end of the list, so delete the preceding empty list - and move to the next line
  2. Interpret Enter on a trailing empty list item naively and just insert a newline character and move to the start of the next line
  3. Interpret Enter on a trailing empty list item the same as it does for a non-empty list item and insert - on the next line, starting a new list item

I think any of the above behaviors is arguably correct, but I prefer the first! :)

FWIW, I'm using v1.1.0 of the extension with vscode version 1.101.2 on Mac OS.

Lastly, thanks for making this extension! It's great!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions