-
Notifications
You must be signed in to change notification settings - Fork 318
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
bug: invalid option '%-100' to 'format'
#415
Comments
wincent
changed the title
bug: `invalid option '%-100' to 'format'
bug: Dec 13, 2022
invalid option '%-100' to 'format'
This comment was marked as spam.
This comment was marked as spam.
I can confirm the fix in 0f22018 resolves the issue in one of my repos. 🎄🎉 |
Padmamanickam
added a commit
to Padmamanickam/command-t
that referenced
this issue
Feb 6, 2023
As described in the related issue, I didn't have a reliable repro, but I have seen this error message on occasion: > Error executing lua callback: > ...command-t/lua/wincent/commandt/private/match_listing.lua:65: > invalid option '%-100' to 'format' I first suspected a bad cached value, and that may be the case, but either way, the arithmetic here seems off, as it will allow a bad format to occur whenever `width` is, say, 103 (`width` usually comes from a `Window` instance, with `vim.o.columns` used as a fallback). I was finally able to repro by setting `margin` to `1` and then adjusting my window size until `'columns'` was (I think) 107. Closes: wincent/command-t#415
ColonQExclamationMark
pushed a commit
to ColonQExclamationMark/qfview.nvim
that referenced
this issue
Aug 7, 2023
ColonQExclamationMark
pushed a commit
to ColonQExclamationMark/qfview.nvim
that referenced
this issue
Aug 7, 2023
ColonQExclamationMark
added a commit
to ColonQExclamationMark/qfview.nvim
that referenced
this issue
Aug 7, 2023
When the value for string.format gets above 99, then you get an error message saying "invalid option %-XXX for format". see e.g wincent/command-t#415
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't have a reliable repro for this yet, but this code1:
can blow up with:
if
width
is, say, 103, and#line
is less 99 or less.Very likely cause is this line:
command-t/lua/wincent/commandt/private/match_listing.lua
Line 85 in 429b6b7
Footnotes
Sorry about the formatting; my copy-paste brought in indent markers from Vim. ↩
The text was updated successfully, but these errors were encountered: