Skip to content

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