Skip to content

Incorrect spacing when inserting new line after multiple folded blocks of vode #40926

@GammaGames

Description

@GammaGames
  • VSCode Version: 1.19.1
  • OS Version: Windows 10.0.16299 Build 16299

Steps to Reproduce:

  1. Copy this code:
foo = {
    foobar: function(){
        this.foobar();
    },
    foobar: function(){
        this.foobar();
    },
    foobar: function(){
        this.foobar();
    },
    foobar: function(){
        this.foobar();
    },
    foobar: function(){
        this.foobar();
    },
}
  1. Collapse all functions
  2. Use alt+click to select the space to the right of the closing bracket
  3. Press enter/paste text with a new line in it

Reproduces without extensions: Yes

it seems like its effected by any insertions containing new line . The display is correct if you change tabs and go back it looks as expected. The issue appears to be across more than one language, it is still present in this code:

<?php
    class Foo
    {
        public function bar() {
            $this->foobar();
        }
        public function bar() {
            $this->foobar();
        }
        public function bar() {
            $this->foobar();
        }
        public function bar() {
            $this->foobar();
        }
        public function bar() {
            $this->foobar();
        }
    }

Expected:
image
Actual:
image

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-foldingEditor code folding issueseditor-multicursorEditor multiple cursor issuesinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions