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:
quentin 2015-03-18 10:14:20 +01:00
parent 4f685d5c3d
commit a1e3d37461

View File

@ -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() {