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.
This commit is contained in:
		
							parent
							
								
									7a8cf750bd
								
							
						
					
					
						commit
						fcae9e885e
					
				@ -109,6 +109,9 @@ fresh_line_one() {
 | 
				
			|||||||
    local result=" %{%B%F{1}%}$exit_code%{%f%b%}"
 | 
					    local result=" %{%B%F{1}%}$exit_code%{%f%b%}"
 | 
				
			||||||
  fi
 | 
					  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 a virtualenv is enabled, display it's basename
 | 
				
			||||||
  if [[ ! -z "$VIRTUAL_ENV" ]]; then
 | 
					  if [[ ! -z "$VIRTUAL_ENV" ]]; then
 | 
				
			||||||
    local py=" %{%F{4}%}py%{%f%}%{%F{3}%}$(basename $VIRTUAL_ENV)%{%f%}"
 | 
					    local py=" %{%F{4}%}py%{%f%}%{%F{3}%}$(basename $VIRTUAL_ENV)%{%f%}"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user