Commit 0f22018
committed
fix: avoid
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: #415invalid option '%-100' to 'format' and similar1 parent 429b6b7 commit 0f22018
1 file changed
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
0 commit comments