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 when escaping insert mode in commit section #80

Closed
aerosol opened this issue Apr 12, 2016 · 5 comments
Closed

Error when escaping insert mode in commit section #80

aerosol opened this issue Apr 12, 2016 · 5 comments

Comments

@aerosol
Copy link

aerosol commented Apr 12, 2016

Steps to reproduce:

  1. Stage data
  2. CC
  3. ESC
  4. press h

One would expect to move the cursor one character back, instead an error is produced:

Error detected while processing function magit#toggle_help[2]..magit#update_buffer[9]..<SNR>71_mg_get_commit_msg[21]..magit#utils#
strip_array:
line    2:
E684: list index out of range: 0
E15: Invalid expression: ( a:array[start] == '' )
Press ENTER or type command to continue
@aerosol aerosol mentioned this issue Apr 13, 2016
@jreybert
Copy link
Owner

Hi @aerosol ,

thanks for your feedback. According to #81, this is definitely a misconception of key mapping.

I'll update it soon.

PS: thanks for your tweet :)

@aerosol
Copy link
Author

aerosol commented Apr 14, 2016

@jreybert hey don't mention it, thanks for the plugin! :)

@jreybert
Copy link
Owner

A fix has been pushed on branch next. Could you give it a try before I merge it to master?

Thanks!

@aerosol
Copy link
Author

aerosol commented Apr 14, 2016

@jreybert works for me! ❤️

The message Press h to display help should be changed accordingly. Thank you!

@jreybert
Copy link
Owner

Nice catch, thanks

jreybert added a commit that referenced this issue Apr 14, 2016
* next:
  doc,README: new help mapping
  plugin/magit.vim: handle empty commit (without staged file) and empty commit message (fix #79)
  autoload/magit/utils.vim: fix strip_array out of bound
  plugin/magit.vim: add magit#get_staged_files() and magit#get_unstaged_files() functions
  plugin/magit.vim: change inline help toggling mapping from 'h' to '?' (fix #80)
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