Open noisyscanner opened 1 year ago
While using return
in that context is wrong (it should be something like exit 1
), :Tags
works fine on my machine with
proper preview support.
Any idea why the command is not working for you in the first place?
For me both with vim 9.0 and nvim 0.9.0, it just returns the number of the last line in the tags file Eg
export VIMNAME=nvim
export FILE=whatever-it-does-not-matter
export EXCMD="47 tags"
nvim -i NONE -u NONE -e -m -s "${FILE}" \
-c "set nomagic" \
-c "${EXCMD}" \
-c 'let l=line(".") | new | put =l | print | qa!'
# returns 8216, the number of lines in the `tags` file
Not sure I fully understand what this command is doing. EXCMD
contains the line number in $FILE
(ie 47 above), is it not ok to simply use that?
man fzf
)When using
:Tags
, the preview window does not display the correct line number, but displays the below error.Seems that the below snippet in
tagpreview.sh
is the cause:A simple replace with the below works for me, but I am wondering the implications of this. Ie, just take the line number we already get passed in via
EXCMD
and use that for the center.I can stick a PR in for this if it looks fine