Skip to content

Please don't save the newline and extra empty line #40

@c02y

Description

@c02y

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions