Bugfix: non-existing window names

Fixes #11
This commit is contained in:
Bruno Sutic 2014-08-26 17:28:40 +02:00
parent 877780eb02
commit c78a38803a
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
3 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
### master ### master
- save and restore current and alternate session - save and restore current and alternate session
- fix a bug with non-existing window names
### v0.0.2, 2014-08-26 ### v0.0.2, 2014-08-26
- saving a new session does not remove the previous one - saving a new session does not remove the previous one

View File

@ -71,7 +71,7 @@ new_pane() {
restore_pane() { restore_pane() {
local pane="$1" local pane="$1"
echo "$pane" | echo "$pane" |
while IFS=$'\t' read line_type session_name window_number window_name dir; do while IFS=$'\t' read line_type session_name window_number dir window_name; do
if window_exists "$session_name" "$window_number"; then if window_exists "$session_name" "$window_number"; then
new_pane "$session_name" "$window_number" "$window_name" "$dir" new_pane "$session_name" "$window_number" "$window_name" "$dir"
elif session_exists "$session_name"; then elif session_exists "$session_name"; then

View File

@ -13,9 +13,9 @@ pane_format() {
format+="${delimiter}" format+="${delimiter}"
format+="#{window_index}" format+="#{window_index}"
format+="${delimiter}" format+="${delimiter}"
format+="#{window_name}"
format+="${delimiter}"
format+="#{pane_current_path}" format+="#{pane_current_path}"
format+="${delimiter}"
format+="#{window_name}"
echo "$format" echo "$format"
} }