Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sp-delete-char and friends do not respect strict mode with delete-selection-mode on #726

Closed
Fuco1 opened this issue Apr 3, 2017 · 0 comments
Labels
Milestone

Comments

@Fuco1
Copy link
Owner

Fuco1 commented Apr 3, 2017

Expected behavior

If the strict mode is on and delete-selection-mode is enabled, we should not allow to delete regions that would break structure.

Actual behavior

Strict mode checks are ignored and it is possible to delete region leading to breakage.

Steps to reproduce the problem

Enable the two modes, then select text and hit backspace.

Solution

(put 'sp-backward-delete-char 'delete-selection 'supersede)
(put 'sp-delete-char 'delete-selection 'supersede)

should use a callback instead of supersede, and return nil if we can't delete the region, and return supersede when we can.

@Fuco1 Fuco1 added the bug label Apr 3, 2017
@Fuco1 Fuco1 added this to the 1.11 milestone Apr 3, 2017
@Fuco1 Fuco1 self-assigned this Apr 3, 2017
@Fuco1 Fuco1 closed this as completed in 7a8dff4 Nov 12, 2017
@Fuco1 Fuco1 removed their assignment Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant