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

Fix incorrect point placement in minibuffer when prefixed. #160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Raphus-cucullatus
Copy link

Users can prefix an ag-command to pass additional arguments. If so,
all the arguments will be prompted in the minibuffer for user editing
and point is adjusted to the position for user's input.

However, the calculation of the point position does not take the
backslash (after shell-quote-argument) into account, nor the
variable-length of the `:files' argument.

This commit fixes this issue by searching for " -- " and place the
cursor before it rather than subtracting a fixed value.

Users can prefix an ag-command to pass additional arguments.  If so,
all the arguments will be prompted in the minibuffer for user editing
and point is adjusted to the position for user's input.

However, the calculation of the point position does not take the
backslash (after shell-quote-argument) into account, nor the
variable-length of the `:files' argument.

This commit fixes this issue by searching for " -- " and place the
cursor before it rather than subtracting a fixed value.
@Raphus-cucullatus
Copy link
Author

This pull request tries to fix #159.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 18.773% when pulling 6fa9541 on Raphus-cucullatus:fix_incorrect_point_placement into bd81d68 on Wilfred:master.

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

Successfully merging this pull request may close these issues.

2 participants