tpope/vim-surround — Issue #46: dsB command breaks line order
Author: majewsky
Created: 2012-02-06 14:03:26+00:00
State: open

Suppose I have the following code (ft=c):

```c
//calculate sum
for (size_t idx = 0; idx < size; ++idx)
{
sum += array[idx];
}
//use sum for calculations
do_something(sum);
```

I want to remove the block braces, so I put the cursor inside them and say "dsB". This works fine for the braces, but incorrectly moves the comment up above the loop body, like this:

```c
//calculate sum
for (size_t idx = 0; idx < size; ++idx)
//use sum for calculations
sum += array[idx];
do_something(sum);
```

The same behavior occurs if the loop body spans multiple lines.