jonathanyeung / mark-sharp

Mark Sharp WYSIWYG Markdown Editor for VS Code
44 stars 0 forks source link

Pressing up arrow on the first row adds more lines at the top #31

Open amks1 opened 2 months ago

amks1 commented 2 months ago

Describe the bug.

If you place the cursor on the first row of your text in the editor and press the UP arrow key, more lines are added at the top, which is very unexpected behavior.

Repro Steps

  1. Place the cursor on the first row
  2. Press the UP arrow key

Version

1.5

What platform are you seeing the problem on?

Windows

jonathanyeung commented 2 months ago

This is actually by design - it provides a way to insert a paragraph if the first element in your page is a block element, like a table or code block.

However, the behavior is pretty jarring if you just have a blank document. Let me have a think about this.

amks1 commented 2 months ago
  1. It's a different behavior from every other editor one has ever used, including any other tab in VSCode.
  2. The problem is not just for an empty doc: I usually use the arrow keys to navigate my cursor in a file, and due to this unexpected behavior I have ended up adding multiple lines at the top accidentally.

Suggestions:

kitschpatrol commented 1 month ago

Hi, thanks for the extension — just chiming in that even if this behavior is technically useful, I agree with OP that it feels weird.