Skip to content

Commit b449558

Browse files
committed
Exclude child frames while calculating window numbers.
1 parent 8c71b43 commit b449558

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doom-modeline-segments.el

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,14 @@ one. The ignored buffers are excluded unless `aw-ignore-on' is nil."
13641364
(window-numbering-get-number-string))
13651365
(t ""))))
13661366
(if (and (< 0 (length num))
1367-
(< (if (active-minibuffer-window) 2 1)
1368-
(length (cl-mapcan #'window-list (visible-frame-list)))))
1367+
(< (if (active-minibuffer-window) 2 1) ; exclude minibuffer
1368+
(length (cl-mapcan
1369+
(lambda (frame)
1370+
;; Exclude child frames
1371+
(unless (and (fboundp 'frame-parent)
1372+
(frame-parent frame))
1373+
(window-list)))
1374+
(visible-frame-list)))))
13691375
(propertize (format " %s " num)
13701376
'face (if (doom-modeline--active)
13711377
'doom-modeline-buffer-major-mode

0 commit comments

Comments
 (0)