Enable preview window for BTags

Close #195
Close #799

Close #724
Close #955
This commit is contained in:
Junegunn Choi
2020-03-15 16:43:10 +09:00
parent 15ed47f561
commit ef24327796
2 changed files with 3 additions and 2 deletions

View File

@@ -17,9 +17,10 @@ if [[ $1 =~ ^[A-Z]:\\ ]]; then
CENTER=${INPUT[2]}
fi
if [[ ! "$CENTER" =~ ^[0-9]*$ ]]; then
if [[ -n "$CENTER" && ! "$CENTER" =~ ^[0-9] ]]; then
exit 1
fi
CENTER=${CENTER/[^0-9]*/}
FILE="${FILE/#\~\//$HOME/}"
if [ ! -r "$FILE" ]; then