mirror of
				https://github.com/tmux-plugins/tmux-resurrect.git
				synced 2025-11-04 00:46:04 +00:00 
			
		
		
		
	Correctly capture wrapped lines in the pane contents
Add the -J options to `capture-pane` to handle wrapped lines correctly. This way wrapped lines will be joined upon capture and once restored, will re-wrap upon pane size changes.
This commit is contained in:
		@@ -113,7 +113,7 @@ capture_pane_contents() {
 | 
				
			|||||||
	local pane_id="$1"
 | 
						local pane_id="$1"
 | 
				
			||||||
	local start_line="0"
 | 
						local start_line="0"
 | 
				
			||||||
	[[ "$(get_tmux_option "$pane_contents_area_option" "visible")" == "full" ]] && start_line="-$2"
 | 
						[[ "$(get_tmux_option "$pane_contents_area_option" "visible")" == "full" ]] && start_line="-$2"
 | 
				
			||||||
	tmux capture-pane -ep -S "$start_line" -t "$pane_id" > "$(resurrect_pane_file "$pane_id")"
 | 
						tmux capture-pane -epJ -S "$start_line" -t "$pane_id" > "$(resurrect_pane_file "$pane_id")"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
save_shell_history() {
 | 
					save_shell_history() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user