Skip to content

Commit

Permalink
Enable tab-bar-mode if the loaded session includes a tab-bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescherti committed Jan 20, 2025
1 parent b9c6d9b commit 4c03397
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion easysession.el
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,16 @@ When LOAD-GEOMETRY is non-nil, load the frame geometry."
:cleanup-frames easysession-frameset-restore-cleanup-frames
:force-display easysession-frameset-restore-force-display
:force-onscreen easysession-frameset-restore-force-onscreen)

(when (fboundp 'tab-bar-mode)
(when (seq-some
(lambda (frame)
(menu-bar-positive-p
(frame-parameter frame 'tab-bar-lines)))
(frame-list))
(tab-bar-mode 1)))

;; Return t
t)
(easysession--warning "%s: Failed to restore the frameset"))))))

Expand Down Expand Up @@ -739,7 +749,7 @@ Returns t if the session file exists, nil otherwise."
(easysession--prompt-session-name
"Delete session: " session-name)))
(session-file (easysession--get-session-file-name session-name)))
(if-let ((session-buffer (find-buffer-visiting session-file)))
(if-let* ((session-buffer (find-buffer-visiting session-file)))
(kill-buffer session-buffer))
(if (file-exists-p session-file)
(progn (delete-file session-file nil)
Expand Down

0 comments on commit 4c03397

Please sign in to comment.