Closed RRethy closed 3 years ago
For reference if I run 'hello' =~ /hello/
in irb
I get a result of 0 with version irb 1.2.3 (2020-02-15)
and ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18]
.
Nvm it seems 0 is truthy even in the boolean expression, my Ruby is a bit rusty. Seems to be something else.
It seems the regex was incorrectly failing to match file lines. PR has been created with fix.
Fixed in #9
When running
vcs-jump diff ...
in a terminal orVcsJump diff ...
in Vim, nothing is picked up even if there are changes in the repo. From looking at the code I think it's because of these lines which short-circuit the boolean expression whether the regex matches or not. ~This is because a regex match evals to 0 which is truthy except for things like&&
~. I'll verify this tmrw and I can put up a PR to fix if it's the case.