Make nvim pane switching work when inside devcontainer

This commit is contained in:
Dreaded_X 2025-06-04 01:22:31 +02:00
parent d755aa90f5
commit c146ff0f95
Signed by: Dreaded_X
GPG Key ID: 5A0CBFE3C3377FAA

View File

@ -68,7 +68,13 @@ if hash devcontainer 2>/dev/null; then
if find "$PWD"/ -maxdepth 1 -type d -name ".devcontainer" | grep -q ".devcontainer"; then
WORKSPACE_FOLDER="$PWD"
builtin cd "$ORIG_DIR"
if [[ "$1" == "nvim" ]]; then
tmux set-option -pt 0 @pane-is-vim 1
fi
devcontainer exec --workspace-folder "$WORKSPACE_FOLDER" $@
tmux set-option -pt 0 @pane-is-vim 0
return 0
else
builtin cd ..