I have some commands set up that run the test under my current cursor position. using the command rails test <filename>:<linenumber>
. I execute this command through
exec '!rails test %:'.line('.')
which works fine in most situations. However, for some reason when the line number starts with an 8
it behaves weirdly.
when testing with the command :exec '!echo "%:'.line('.').'"'
i get the following outputs
line 7 -> test.txt:7
line 8 -> test.txt
line 9 -> test.txt:9
line 79 -> test.txt:79
line 80 -> test.txt0
line 89 -> test.txt9
line 90 -> test.txt:90
Even when hardcoding the number in the command it behaves similarly
!echo "%:80"
results in test.txt0
Hardcoding the filename does get the correct result though !echo "test.txt:80"
-> test.txt:80
This pattern repeats for the 800s as well. Am i missing something obvious?
I tried running the same test in vim --clean
to make sure there weren't any plugins messing with me but it has the same behavior
Am I missing something obvious?
:h filename-modifiers