tmux: fix nvim edit helper behavior

This commit is contained in:
Daniel Lundin 2022-12-14 10:06:42 +01:00
parent 481f545b90
commit d8de4826ff

View file

@ -11,8 +11,9 @@ else
fre --store_name "$_store" --add "$_file"
fi
tmux new-window -S -n nvim \
-e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \
nvim --listen "$XDG_RUNTIME_DIR/nvim.sock"
tmux select-window -t nvim 2>/dev/null ||
tmux new-window -S -n nvim \
-e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \
nvim --listen "$XDG_RUNTIME_DIR/nvim.sock"
nvim --server "$XDG_RUNTIME_DIR/nvim.sock" --remote "$_file"