Skip to content

Commit

Permalink
Merge pull request #99 from d5884/support-dedicated-window
Browse files Browse the repository at this point in the history
window-dedicated-p が t のウィンドウでウィンドウ構成が壊れる問題を修正
  • Loading branch information
Tomohiro Matsuyama committed Mar 9, 2014
2 parents b6ac46b + e285c90 commit be75a84
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions popwin.el
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ HFACTOR, and vertical factor VFACTOR."
(popwin:window-point node)
(window-start node)
(window-edges node)
(eq (selected-window) node))
(eq (selected-window) node)
(window-dedicated-p node))
(destructuring-bind (dir edges . windows) node
(append (list dir edges)
(mapcar 'popwin:window-config-tree-1 windows)))))
Expand All @@ -203,14 +204,17 @@ horizontal factor HFACTOR, and vertical factor VFACTOR. The
return value is a association list of mapping from old-window to
new-window."
(if (eq (car node) 'window)
(destructuring-bind (old-win buffer point start edges selected)
(destructuring-bind (old-win buffer point start edges selected dedicated)
(cdr node)
(set-window-dedicated-p window nil)
(popwin:adjust-window-edges window edges hfactor vfactor)
(with-selected-window window
(popwin:switch-to-buffer buffer t))
(when selected
(select-window window))
(set-window-point window point)
(when dedicated
(set-window-dedicated-p window t))
`((,old-win . ,window)))
(destructuring-bind (dir edges . windows) node
(loop while windows
Expand All @@ -227,7 +231,7 @@ which is a node of `window-tree' and OUTLINE which is a node of
((and (windowp node)
(eq (car outline) 'window))
;; same window
(destructuring-bind (old-win buffer point start edges selected)
(destructuring-bind (old-win buffer point start edges selected dedicated)
(cdr outline)
(popwin:adjust-window-edges node edges)
(when (and (eq (window-buffer node) buffer)
Expand Down

0 comments on commit be75a84

Please sign in to comment.