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

Error detected while processing function <SNR>96_nmapping_wrapper[2]..magit#stage_hunk[32]..magit#stage_block #168

Closed
iaia opened this issue May 27, 2018 · 7 comments

Comments

@iaia
Copy link
Contributor

iaia commented May 27, 2018

Short description of the problem

Unstaged changes
================

modified: .zshrc
@@ -118,3 +118,5 @@ if [ -f '/Users/xxxx/google-cloud-sdk/path.zsh.inc' ]; then source '/
 if [ -f '/Users/xxxx/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/xxxx/google-cloud-sdk/completion.zsh.inc'; fi
 
 export PATH="${HOME}/Library/flutter/bin:$PATH"
+
+alias bu='bundle update'

type S

Error detected while processing function <SNR>96_nmapping_wrapper[2]..magit#stage_hunk[32]..magit#stage_block:
line    9:
E944: Reverse range in character class
E944: Reverse range in character class
Press ENTER or type command to continue

Environment

  • VIM - Vi IMproved 8.1 (2018 May 17, compiled May 24 2018 10:14:40)
  • git version 2.16.2
  • current vimagit version or (or SHA1): 1.7.2
  • OS: macOS 10.13.4
  • terminal
@jreybert
Copy link
Owner

I can't reproduce your issue. Could you please:

  • add to this issue all the vimagit options set in your vimrc
  • copy paste the exact vimagit buffer (including the empty lines at the end of this buffer). I am actually wondering why I don't see two empty lines after your line: +alias bu='bundle update'

@iaia
Copy link
Contributor Author

iaia commented May 28, 2018

add to this issue all the vimagit options set in your vimrc

" vimagit
let g:magit_default_fold_level = 2
let g:magit_default_sections = ['global_help', 'info', 'unstaged', 'staged', 'commit']
let g:magit_discard_untracked_do_delete=1

copy paste the exact vimagit buffer (including the empty lines at the end of this buffer). I am actually wondering why I don't see two empty lines after your line: +alias bu='bundle update'

Info
====

Repository:  /Users/xxxx/dotfiles/
Head:        master        追加
Upstream:    origin/master 修正
Push:        origin/master 修正

Press ? to display help


Unstaged changes
================

modified: .zshrc
@@ -118,3 +118,5 @@ if [ -f '/Users/xxxx/google-cloud-sdk/path.zsh.inc' ]; then source '/
 if [ -f '/Users/xxxx/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/xxxx/google-cloud-sdk/completion.zsh.inc'; fi
 
 export PATH="${HOME}/Library/flutter/bin:$PATH"
+
+alias bu='bundle update'


Staged changes
==============


@jreybert
Copy link
Owner

Do you have Japanese characters in place of xxxx in:

 if [ -f '/Users/xxxx/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/xxxx/google-cloud-sdk/completion.zsh.inc'; fi

?

@jreybert jreybert added the bug label May 28, 2018
@iaia
Copy link
Contributor Author

iaia commented May 28, 2018

No.

I tried another machine.

2018-05-28 21 30 11

@jreybert
Copy link
Owner

Crap, all my simple suppositions were wrong... Please keep your faulty repository with this exact state in a safe place, so we can reproduce it.

jreybert added a commit that referenced this issue Oct 3, 2018
Another issue with escape problem. It was finally the same culprit.

match() function take a pattern as a paramter. If a:selection[0], the
hunk title, contains any regex special character, it goes wild.

It seems safer to escape with special character \V (very nomagic)
instead of adding regularly special characters to escape() function.
@jreybert
Copy link
Owner

jreybert commented Oct 3, 2018

Finally, thanks to another issue #156 , I also fixed your issue.

Would you mind @iaia to test the branch next?

@iaia
Copy link
Contributor Author

iaia commented Oct 4, 2018

@jreybert I tried next branch. Successfully added to the stages. Thank you for fix.

@jreybert jreybert closed this as completed Oct 6, 2018
@jreybert jreybert added this to the Release 1.7.3 milestone Oct 13, 2018
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