fix buffer renaming

per https://github.com/ch11ng/exwm/pull/30
This commit is contained in:
Philip 2015-08-17 06:40:43 +00:00
parent 15ad591d97
commit 43b00d2f0f

View file

@ -171,9 +171,11 @@ The optional FORCE option is for internal use only."
(with-current-buffer (exwm--id->buffer id) (with-current-buffer (exwm--id->buffer id)
(let ((frame (elt exwm-workspace--list index))) (let ((frame (elt exwm-workspace--list index)))
(when (not (equal exwm--frame frame)) (when (not (equal exwm--frame frame))
(let ((name (replace-regexp-in-string "^\\s-*" "" (buffer-name))))
(exwm-workspace-rename-buffer (if (= index exwm-workspace-current-index)
name
(concat " " name))))
(setq exwm--frame frame) (setq exwm--frame frame)
(exwm-workspace-rename-buffer
(concat " " (replace-regexp-in-string "^\\s-*" "" (buffer-name))))
(if exwm--floating-frame (if exwm--floating-frame
;; Move the floating frame is enough ;; Move the floating frame is enough
(progn (progn