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

Visual mode bug fix #1

Conversation

FoamScience
Copy link

This PR tries to do two things:

  1. Keep the % autocomplete; we cannot live without it XD while a small bug with visual mode where the current behavior
    doesn't take into consideration what already has been typed into the cmdline
    2024-04-23_17-20
  2. Rebase the branch on top of hrsh7th/cmp-cmdline:main

No it's better
2024-04-23_17-54

My initial testing went OK, no problems so far.

hrsh7th and others added 3 commits March 22, 2024 13:17
The current behavior if you try to complete :e %:p:h or something similar
replaces only the h with the path, which isn't the desired behavior, because
then nvim tries to open the wrong filename. Detect this case and produce edits
that will replace the entire `%` chain with modifiers.
@iteratee
Copy link
Owner

The fixed_input breaks things like :vert sp %:.:h:h. It strips off the final h and it breaks. If you find a solution that continues to do what you need, but doesn't break that, I'll accept it.

@iteratee
Copy link
Owner

I just pushed up a better fix to my branch. Hopefully that will work for you. I'm going to close this, but feel free to open another PR if you have additional fixes.

@iteratee iteratee closed this Apr 24, 2024
@iteratee
Copy link
Owner

You may also want hrsh7th/nvim-cmp#1900 until it gets merged. I found it while doing some debugging to remember why I stripped out fixed_input in the first place.

@FoamScience
Copy link
Author

works like a charm thanks!

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