vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Ctrl+Delete removing entire line when used at the end of line

Open kaestlyn opened this issue 10 years ago • 4 comments

If you have some lines in a file such as:

public void Add( int x,
                          int y )
{
    // some code
}

If you place your cursor at the end of the first line, and hit Ctrl+Delete it removes the entire line, so you end up with just


                          int y )
{
    // some code
}

I would expect it to remove all the space between the current position and the next word:

public void Add( int x, int y )
{
    // some code
}

This is on Windows 7 if that's relevant or not.

kaestlyn avatar Mar 08 '16 20:03 kaestlyn

I think it's a regression in the latest update (0.10.10?). Pretty annoying :)

SmilyOrg avatar Mar 09 '16 15:03 SmilyOrg

@alexandrudima I end up with this after the first Ctrl+Delete:

public void Add( int x,                          int y )
{
    // some code
}

Please reopen if your fix wanted to get me to this as suggested by the issuer:

public void Add( int x, int y )
{
    // some code
}

bpasero avatar Mar 21 '16 13:03 bpasero

I like the suggestion, saves an extra Ctrl+Delete.

My change was to fix the blatantly wrong behavior of Ctrl+Delete that would delete the current line.

alexdima avatar Mar 21 '16 15:03 alexdima

:+1:

bpasero avatar Mar 21 '16 15:03 bpasero