microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.5k stars 28.1k forks source link

Identation rules are broken #57197

Open fabiospampinato opened 5 years ago

fabiospampinato commented 5 years ago

I think I've had the following problems since the very first version of VSC I tried.

Problem 1

up

  1. Have Todo+ installed and create a new "todo" document with the same content as mine.
  2. Move the line up.
  3. Undo.
  4. Move the line up.
  5. We get 2 different results for doing the same thing.

Problem 2

down

  1. Have Todo+ installed and create a new "todo" document with the same content as mine.
  2. Move the line down.
  3. Undo.
  4. Move the line down.
  5. We get 2 different results for doing the same thing.

Problem 3

In both the gifs above the indentation for a line gets decreased, my understanding is that this is governed by the indentationRules.decreaseIndentPattern setting, which in my extension is set to /(?=a)b/gm, a regex that can never match any string, why are those lines' indentations decreased then?

vscodebot[bot] commented 5 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

marco-m commented 5 years ago

Hello @rebornix, any chance to fix this bug ? Thanks!

roblourens commented 3 years ago

If I start with this

Project: (2)
    ☐ hi
    ☐ hi2

Then "move line up" on the second line, I get this

Project: (2)
☐ hi2
    ☐ hi

Is that what's expected?

marco-m commented 3 years ago

Thanks @rebornix :-)

fabiospampinato commented 3 years ago

Is that what's expected?

@roblourens No, in that scenario the task being moved up remains on the same level so its indentation shouldn't change.