-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
git: allow to show git project dir #2507
base: master
Are you sure you want to change the base?
Conversation
nvimlsp: use vim.diagnostic.get() if available
…test [fix] Fix meaningless tests.
The current way to parse the statusline content and decide whether a section is empty, has some flaws: That is for the following reasons: - accents are considered to be empty (which they really shouldn't) - manually parsing the expressions using a `:while ... matchlist() ... endwhile` loop is slow and fragile - grouping items such as %( %) are not considered So replace the logic by using `substitute('pat', '\=add()', '')` to capture all single expression groups into a list and then looping over those to decide whether the section is empty. fixes vim-airline#2411
…-condition Test for the correct fern loaded variable.
unicode: Fix check for :UnicodeTable buffer
This extension shows the project dir. It depends on Futivedir, so will only work when the fugitive plugin is available. closes vim-airline#2505
let dir = FugitiveGitDir(bufnr('')) | ||
return empty(dir) ? '' : pathshorten(fnamemodify(simplify(dir .. '/../'), ':h:t')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will return the wrong result for submodules, multiple work trees, bare repositories, and probably other things. Recommended method to retrieve the work tree is FugitiveFind(':/', bufnr(''))
.
ah, thanks for the hing. In general, I am not yet completely satisfied with the pull here, that's why I haven't merged it yet. |
This extension shows the project dir. It depends on Futivedir, so will
only work when the fugitive plugin is available.
closes #2505