Skip to content

Extra characters deleted with a region #12

@ThibautVerron

Description

@ThibautVerron

Hi,

When calling the smart commands from keybindings with a region selected, smart-hungry-delete-forward-char will also delete the char after point, and smart-hungry-delete-backward-char also deletes the char before point. If the char is whitespace, it will hungrily delete it.

For example, with ([] being point and | mark):

ab[]cde|fg

pressing backspace results in

a[]fg

instead of

ab[]fg

The weird thing is that it only happens if the functions are called from a bound key. Using M-x smart-hungry-delete-XXX-char works fine in both cases, deleting only the region.

It also appears to be two actions for undo: one undo will undo the character deletion, the second will undo the region deletion.

I don't know if it is related to #3 (regarding delete-selection-mode).

Cheers!

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