Fix E94 on selecting a file when there is only one help window#503
Merged
mattn merged 1 commit intoctrlpvim:masterfrom Feb 8, 2019
Merged
Fix E94 on selecting a file when there is only one help window#503mattn merged 1 commit intoctrlpvim:masterfrom
mattn merged 1 commit intoctrlpvim:masterfrom
Conversation
Member
|
Thank you |
Author
|
Thank you for merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix E94 on selecting a file when there is only one help window.
How to recreate
vim -c 'help | only':CtrlPMRUFilesor another CtrlP commandCause
#444 has changed the behavior when the current buffer type is 'help' so that s:openfile() would always use 'b' command. This works well for
:CtrlPBufTag, but doesn't work for other commands like:CtrlPMRUFiles.Fix
Use 'b' only if the current buffer type is 'help' and the opening file is the help file itself. Otherwise, use ctrlp#normcmd() function as before. (ctrlp#normcmd() looks for a available normal window to open the file and assumes that a window for 'help' is not available, so, #444 (#437) occurs.)
I also found that md == 't' <c-t>, md == 'h' <c-x> and md == 'v' <c-v> doesn't work for
:CtrlPBufTag. So I createdl:openmyselfto setl:usebcorrectly.Validation
:CtrlPBufTagwithout the patch.:CtrlPBufTagwith the patch.