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

Unable to kill-region of empty line in strict mode #776

Closed
dakrone opened this issue Jul 20, 2017 · 4 comments
Closed

Unable to kill-region of empty line in strict mode #776

dakrone opened this issue Jul 20, 2017 · 4 comments

Comments

@dakrone
Copy link

dakrone commented Jul 20, 2017

Expected behavior

When in strict-mode, I expect to be able to highlight empty lines and hit C-w to invoke kill-region, which should remove the empty lines.

Actual behavior

Instead, smartparens complains about an "Unbalanced region"

Steps to reproduce the problem

I reproduced it with a .js file, but any file where smartparens-strict-mode is enabled will work.

Starting with a file like:

{
  "foo": "bar"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
}

Where | is the cursor and XXXXX is the highlighted region (see screenshot)

screenshot_2017-07-20_09-46-17

(Basically I hit C-SPC on the line below "foo": "bar" and then moved the cursor down one line with C-n to highlight the entire empty line)

Hit C-w, and instead of removing the empty line, I get the error about "Unbalanced region".

It's interesting to note that if I hit backspace to issue a delete-backwards-char, the region is correctly deleted.

Backtraces if necessary (M-x toggle-debug-on-error)

(none)

Environment & version information

  • smartparens version: smartparens-20170716.1328
  • Active major-mode: js-mode (though it reproduces in other programming modes such as java-mode)
  • Emacs version (M-x emacs-version): GNU Emacs 25.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.15) of 2017-06-01
  • Spacemacs/Evil/Other starterkit (specify which)/Vanilla: Regular Emacs
  • OS: Linux 4.11.8-200.fc25.x86_64 #1 SMP Thu Jun 29 16:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@Fuco1
Copy link
Owner

Fuco1 commented Jul 20, 2017

This has already been fixed in #775.

@Fuco1
Copy link
Owner

Fuco1 commented Jul 20, 2017

Thanks for the report however, I value the early feedback very much!

@dakrone
Copy link
Author

dakrone commented Jul 20, 2017

You're right, I should have updated to the latest package this morning before filing this, thanks for the quick fix @Fuco1, I've confirmed it's fixed now!

@Fuco1
Copy link
Owner

Fuco1 commented Jul 20, 2017

Great, thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants