Skip to content

Fix type mismatch in Vim9 percentage parser - #79

Merged
vimpostor merged 2 commits into
vimpostor:masterfrom
gitx64:fix-vim91-type-mismatch
Aug 21, 2026
Merged

Fix type mismatch in Vim9 percentage parser#79
vimpostor merged 2 commits into
vimpostor:masterfrom
gitx64:fix-vim91-type-mismatch

Conversation

@gitx64

@gitx64 gitx64 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a Vim 9.1 type mismatch in the percentage statusline parser. #78

tpipeline#parse#Parse() is declared to return a string, but the %p case are directly returning the numeric result of tpipeline#util#percentage().

This causes Vim 9.1 to report:

E1012: Type mismatch; expected string but got number

The percentage value is now explicitly converted to a string before being returned.

Changes

  • Convert tpipeline#util#percentage() to a string for %p.

Testing

Tested with Vim 9.1 and confirmed that the type mismatch no longer occurs when using the percentage statusline items.

Comment thread autoload/tpipeline/parse.vim Outdated
@gitx64
gitx64 requested a review from vimpostor August 21, 2026 03:44
@vimpostor
vimpostor merged commit 78055d9 into vimpostor:master Aug 21, 2026
1 check passed
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.

2 participants