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

Fixed cmdline_force_redraw hack for path completion #189

Closed
wants to merge 1 commit into from

Conversation

Gordin
Copy link

@Gordin Gordin commented Nov 1, 2022

This fixes #188. The hack was doing stuff to make sure the screen is redrawn when typing a substitution command, but s/ also matches every path with a directory with an s at the end. For the user, it looks like every path with an s at the end is automatically accepted (see the bug report). I Changed the hack to first check for an s/ and if there is one, check that the current command is not a command that could use path completion.

A better way would probably be to check if the completion pop-up is currently open, but I don't know how to do that and this works.

@folke
Copy link
Owner

folke commented Nov 7, 2022

Thank you for the report! I've changed it to check for vim.fn.pumvisible() instead. Seems to work fine with that. Thanks again!

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.

Path autocompletion in cmdline_popup automatically selects matches that end with s
2 participants