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

fix ctrlp buffer name #185

Merged
merged 1 commit into from
Dec 10, 2016
Merged

Conversation

HerringtonDarkholme
Copy link
Contributor

@HerringtonDarkholme HerringtonDarkholme commented Nov 18, 2016

Requirements (please check off with 'x')

What does this Pull Request (PR) do?

Fix CtrlPBuffer name is [no named]

How should this be manually tested?

Install ctrlp + vimdevicon. Open multiple files. Open CtrlPBuffer

Any background context you can provide?

What are the relevant tickets (if any)?

#183

Screenshots (if appropriate or helpful)

@darrinholst
Copy link

This gets the buffer names back. Is it possible to get the icons to go with them?

1__tmux_-2_attach____tmux_-2_new__tmux_

@HerringtonDarkholme
Copy link
Contributor Author

I think it requires another commit to address icon. buffer is handled specially in ctrlp.

@ryanoasis
Copy link
Owner

@HerringtonDarkholme Hey great fix! Thanks for this 👍 This is simple and clever way to handle it (wish I had realized this 😊)

@darrinholst @HerringtonDarkholme Yeah actually to have the icons would require another pull request to ctrlp 😞 . This is because of how the formatline function only accepts 1 param. I think it would have to accept 2 params (one for the entire line and a separate one for just the path)

Here is where things fall apart passing the icon and path as a single param (from ctrlp):

" Line formatting {{{3
fu! s:formatline(str)
    let str = a:str
    let ct = s:curtype()
    if ct == 'buf'
        let bufnr = s:bufnrfilpath(str)[0]
        " ^ we have a problem here now!
        " ...

@ryanoasis ryanoasis merged commit 25a6bf0 into ryanoasis:master Dec 10, 2016
@HerringtonDarkholme
Copy link
Contributor Author

Thanks!

@ryanoasis ryanoasis modified the milestone: v0.8.6 Feb 25, 2017
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.

3 participants