vim-surround icon indicating copy to clipboard operation
vim-surround copied to clipboard

wrong behavior of "dsB" command

Open cs86661 opened this issue 10 years ago • 5 comments

When the cursor is on "return" (vim: set noet, >--- means tab indent):

void foo()
{
>---if(bar)
>---{
>--->---return;
>---}
}

And then press "dsB", the result is...

void foo()
{
>---if(bar)
}
return;

cs86661 avatar Oct 10 '15 11:10 cs86661

Cannot recreate this. Maybe the issue is somewhere else.

hgiesel avatar Jun 17 '16 21:06 hgiesel

I guess you just paste above code ... You should replace ">---" to real TAB and then test.

cs86661 avatar Jun 18 '16 10:06 cs86661

I can recreate this on master. With expandtab enabled, this correctly results in the following:

void foo()
{
    if(bar)
        return;
}

ajzafar avatar Jul 02 '16 17:07 ajzafar

Reproduced on master with vim -u NONE :so [plugin directory]vim-surround/plugin/surround.vim

Same thing happens for ds{

sullyj3 avatar Jul 28 '16 15:07 sullyj3

This looks like a duplicate of #87

graywh avatar Oct 18 '17 16:10 graywh