easy-kill icon indicating copy to clipboard operation
easy-kill copied to clipboard

Please don't save the newline and extra empty line

Open c02y opened this issue 5 years ago • 0 comments

When I tried to M-w inside a line (without selecting the whole line first),

M-w, it will save the newline and one extra empty line into kill ring

For example:


        for (i; i < 10; i++) {
                printf("i: %d\n", i);
        }

I M-w on the printf line, create a new line after that line and C-y, it should be


        for (i; i < 10; i++) {
                printf("i: %d\n", i);
                printf("i: %d\n", i);
        }

But it turns out to be like this:


        for (i; i < 10; i++) {
                printf("i: %d\n", i);
                                printf("i: %d\n", i);

        }

It contains newline and one extra empty line, could you please remove them.

If I mark and select the line or block and do M-w, the result is right.

Of cause, if you can make the suffix space removed then I wouldn't have to reindent the yanked block, that is better.

c02y avatar Mar 08 '19 08:03 c02y