Skip to content

Commit

Permalink
chore: change buffer hop persp name fn position
Browse files Browse the repository at this point in the history
  • Loading branch information
Artawower committed Feb 21, 2023
1 parent 99015ad commit 0a0e27c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions buffer-hop.el
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
(string-match-p regexp (string-trim buffer-name)))
buffer-hop-always-allowed-buffers-patterns)))

(defun buffer-hop--get-persp-name ()
"Get persp name of current opened buffer or return default."
(if (and (fboundp 'safe-persp-name) (fboundp 'get-current-persp))
(safe-persp-name (get-current-persp))
"default"))

(defun buffer-hop--init-persp-window-store ()
"Init storage for persp and windows if not exist."
(let* ((persp-name (buffer-hop--get-persp-name))
Expand Down Expand Up @@ -158,12 +164,6 @@
(buffer-hop--lock-buffer (buffer-name (current-buffer))))


(defun buffer-hop--get-persp-name ()
"Get persp name of current opened buffer or return default."
(if (and (fboundp 'safe-persp-name) (fboundp 'get-current-persp))
(safe-persp-name (get-current-persp))
"default"))

(defun buffer-hop--get-window-id ()
"Get window id of current opened buffer."
;; NOTE: I didn't find how to extract ID of the window correctly 🤷‍♂️
Expand Down

0 comments on commit 0a0e27c

Please sign in to comment.