diff options
Diffstat (limited to 'lisp/+tab-bar.el')
-rw-r--r-- | lisp/+tab-bar.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index 1dc1f68..1ee7606 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el | |||
@@ -21,6 +21,14 @@ | |||
21 | (defvar +tab-bar-show-original nil | 21 | (defvar +tab-bar-show-original nil |
22 | "Original value of `tab-bar-show'.") | 22 | "Original value of `tab-bar-show'.") |
23 | 23 | ||
24 | (defun +tab-bar-basename () | ||
25 | "Generate the tab name from the basename of the buffer of the | ||
26 | selected window." | ||
27 | (let* ((tab-file-name (buffer-file-name (window-buffer (minibuffer-selected-window))))) | ||
28 | (if tab-file-name | ||
29 | (file-name-nondirectory tab-file-name) | ||
30 | (+tab-bar-tab-name-truncated-left)))) | ||
31 | |||
24 | (defun +tab-bar-tab-name-truncated-left () | 32 | (defun +tab-bar-tab-name-truncated-left () |
25 | "Generate the tab name from the buffer of the selected window. | 33 | "Generate the tab name from the buffer of the selected window. |
26 | This is just like `tab-bar-tab-name-truncated', but truncates the | 34 | This is just like `tab-bar-tab-name-truncated', but truncates the |