Do not save empty trailing lines when pane content is saved

This commit is contained in:
Bruno Sutic
2015-07-07 19:23:47 +02:00
parent 6fe70853a5
commit 852af79075
2 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,7 @@ capture_pane_contents() {
if [ "$pane_contents_area" = "visible" ]; then
start_line="0"
fi
tmux capture-pane -epJ -S "$start_line" -t "$pane_id" > "$(resurrect_pane_file "$pane_id")"
printf '%s\n' "$(tmux capture-pane -epJ -S "$start_line" -t "$pane_id")" > "$(resurrect_pane_file "$pane_id")"
}
save_shell_history() {