From fcae9e885e763be63a70ae03404b254c7684c0bc Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 16 Aug 2019 21:57:33 +0100 Subject: [PATCH] Unset the vim navigation flag on prompt redraw Make using the `@vim$TMUX_PANE` window flag much more robust by unsetting it every time the zsh prompt is drawn and setting it again using a `FocusGained` `autocmd` in vim. This removes the need for the hacky check for zsh in the conditional defined in the `in_vim` variable. --- prompt_fresh_setup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prompt_fresh_setup b/prompt_fresh_setup index 288d7bd..7e03286 100644 --- a/prompt_fresh_setup +++ b/prompt_fresh_setup @@ -109,6 +109,9 @@ fresh_line_one() { local result=" %{%B%F{1}%}$exit_code%{%f%b%}" fi + # Unset vim/tmux navigate flag to handle C-z and multiple vim jobs. + tmux set-window-option -u @vim$TMUX_PANE + # If a virtualenv is enabled, display it's basename if [[ ! -z "$VIRTUAL_ENV" ]]; then local py=" %{%F{4}%}py%{%f%}%{%F{3}%}$(basename $VIRTUAL_ENV)%{%f%}"