@@ -47,6 +47,9 @@ func tpipeline#initialize()
4747	if  ! exists (' g:tpipeline_fillcentre' 
4848		let  g: tpipeline_fillcentre=  0 
4949	endif 
50+ 	if  ! exists (' g:tpipeline_usepane' 
51+ 		let  g: tpipeline_usepane=  0 
52+ 	endif 
5053	if  ! exists (' g:tpipeline_autoembed' 
5154		let  g: tpipeline_autoembed=  1 
5255	endif 
@@ -120,19 +123,27 @@ func tpipeline#fork_job()
120123		let  s: restore_right=  system (" tmux display-message -p '#{status-right}'" 
121124	endif 
122125	let  script  =  printf (" while IFS='$\\ n' read -r l; do echo \" $l\"  > '%s'" s: tpipeline_filepath
126+ 	if  g: tpipeline_usepane
127+ 		"  end early if file was truncated so as not to overwrite any 
128+ 		"  titles of panes we may switch to 
129+ 		let  script  .=  " ; if [ -z \" $l\"  ]; then continue; fi" 
130+ 	endif 
123131	if  g: tpipeline_autoembed
124132		for  o  in  g: tpipeline_embedopts
125133			let  script  =  ' tmux set -g ' o  . ' ; ' script 
126134		endfor 
127135	endif 
128136	if  g: tpipeline_fillcentre
129137		let  script  .=  " ; C=$(echo \" $l\"  | grep -o 'bg=#[0-9a-f]\\ {6\\ }'| tail -1)" 
138+ 		if  ! g: tpipeline_usepane
139+ 			let  script  .=  " ; tmux set -g status-style \" $C\" " 
140+ 		endif 
130141	endif 
131142	if  g: tpipeline_split
132- 		let  script  .=  printf (" ; IFS='$\\ n' read -r l ; echo \" $l \"  > '%s'" s: tpipeline_right_filepath
143+ 		let  script  .=  printf (" ; IFS='$\\ n' read -r r ; echo \" $r \"  > '%s'" s: tpipeline_right_filepath
133144	endif 
134- 	if  g: tpipeline_fillcentre 
135- 		let  script  .=  " ; tmux set -g status-style  \" $C \" " 
145+ 	if  g: tpipeline_usepane 
146+ 		let  script  .=  " ; tmux select-pane -T  \" #[fill=${C:3}]#[align=left]$l#[align=right]$r \" " 
136147	endif 
137148	let  script  .=  " ; tmux refresh-client -S; done" 
138149
0 commit comments