Last active
February 10, 2019 07:12
-
-
Save ryanoasis/4e1bdf027580cbd4d2b89622dcaeec91 to your computer and use it in GitHub Desktop.
DevIcons CtrlP issue PR 238
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
| diff --git a/autoload/devicons/plugins/ctrlp.vim b/autoload/devicons/plugins/ctrlp.vim | |
| index fe50746..1ea4898 100644 | |
| --- a/autoload/devicons/plugins/ctrlp.vim | |
| +++ b/autoload/devicons/plugins/ctrlp.vim | |
| @@ -1,9 +1,10 @@ | |
| " Initialize for up to date ctrlp fork: ctrlpvim/ctrlp.vim | |
| " Support for kien/ctrlp.vim deprecated since v0.7.0 | |
| " @TODO implementation for CtrlP buffer and find file mode | |
| + | |
| function! devicons#plugins#ctrlp#init() abort | |
| let l:ctrlp_warning_message = 'vim-devicons: https://github.com/kien/ctrlp.vim is deprecated since v0.7.0, please use https://github.com/ctrlpvim/ctrlp.vim' | |
| - let l:ctrlp_warned_file = s:plugin_home . '/status_warned_ctrlp' | |
| + let l:ctrlp_warned_file = webdevicons#pluginHome() . '/status_warned_ctrlp' | |
| if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | |
| let l:forkedCtrlp = exists('g:ctrlp_mruf_map_string') | |
| diff --git a/plugin/webdevicons.vim b/plugin/webdevicons.vim | |
| index ca4cacd..d2cc77c 100644 | |
| --- a/plugin/webdevicons.vim | |
| +++ b/plugin/webdevicons.vim | |
| @@ -390,8 +390,6 @@ function! s:initialize() | |
| if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | call devicons#plugins#ctrlp#init() | endif | |
| endfunction | |
| -" had some issues with VimEnter, for now using: | |
| -call s:initialize() | |
| " public functions {{{2 | |
| "======================================================================== | |
| @@ -402,6 +400,11 @@ function! webdevicons#version() | |
| endfunction | |
| " scope: public | |
| +function! webdevicons#pluginHome() | |
| + return s:plugin_home | |
| +endfunction | |
| + | |
| +" scope: public | |
| " allow the first version of refresh to now call softRefresh | |
| function! webdevicons#refresh() | |
| call webdevicons#softRefresh() | |
| @@ -622,6 +625,11 @@ function! NERDTreeWebDevIconsRefreshListener(event) | |
| endfunction | |
| +" call setup after processing all the functions (to avoid errors) {{{1 | |
| +"======================================================================== | |
| +" had some issues with VimEnter, for now using: | |
| +call s:initialize() | |
| + | |
| " standard fix/safety: line continuation (avoiding side effects) {{{1 | |
| "======================================================================== | |
| let &cpo = s:save_cpo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment