Closed wks closed 1 year ago
I've already opened a PR for the same problem set in #20. However, It differs a bit. Instead I'm treating all version components individually as numbers by converting them explicitly using str2nr
which makes the code and conversion more explicit to read.
close this in favor of #20
Fix the regexp so that matchstr won't match empty string if
skim --version
doesn't start with the version number.Fix version number comparison so that it compares major/minor/micro versions as number numbers instead of strings (so that 10 > 9).
The vim plugin recently started to break when using any command, such as
:Rg
, complaining that I "need to update fzf". I don't know if the output ofsk --version
changed recently and broke the code, but the regular expression'[0-9.]*'
in thematchstr
statement doesn't match the string "sk 0.10.2" whichsk --version
prints. The VIM documentation ofmatch()
says:So I changed
*
to\+
.It is also comparing version numbers as strings, which was OK when the major/minor/micro versions all had only one digit. I fixed that, too.