File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -165,11 +165,17 @@ Interactively, a prefix argument says to rotate the parent window of the
165
165
selected window."
166
166
(interactive (list (window--rotate-interactive-arg)))
167
167
(when (or (not window) (window-live-p window))
168
- (user-error " No windows to transpose " ))
168
+ (user-error " No windows to rotate " ))
169
169
(let* ((frame (window-frame window))
170
170
(selected-window (frame-selected-window window))
171
171
(win-tree (car (window-tree-normal-sizes window)))
172
- (winls (seq-filter #'window-live-p (flatten-list win-tree)))
172
+ (winls (or
173
+ (seq-filter
174
+ (lambda (win )
175
+ (and (window-live-p win)
176
+ (not (window-dedicated-p win))))
177
+ (flatten-list win-tree))
178
+ (user-error " All windows are dedicated" )))
173
179
(rotated-ls (if reverse
174
180
(append (cdr winls) (list (car winls)))
175
181
(append (last winls) winls)))
@@ -181,7 +187,9 @@ selected window."
181
187
(named-let rec ((tree win-tree))
182
188
(cond
183
189
((consp tree) (cons (rec (car tree)) (rec (cdr tree))))
184
- ((window-live-p tree) (pop rotated-ls))
190
+ ((and (window-live-p tree)
191
+ (not (window-dedicated-p tree)))
192
+ (pop rotated-ls))
185
193
(t tree)))))
186
194
(when (or (seq-some #'window-atom-root winls)
187
195
(seq-some #'window-fixed-size-p winls))
You can’t perform that action at this time.
0 commit comments