Skip to content

Commit

Permalink
Exclude child frames while calculating window numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed Apr 7, 2020
1 parent 8c71b43 commit b449558
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doom-modeline-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -1364,8 +1364,14 @@ one. The ignored buffers are excluded unless `aw-ignore-on' is nil."
(window-numbering-get-number-string))
(t ""))))
(if (and (< 0 (length num))
(< (if (active-minibuffer-window) 2 1)
(length (cl-mapcan #'window-list (visible-frame-list)))))
(< (if (active-minibuffer-window) 2 1) ; exclude minibuffer
(length (cl-mapcan
(lambda (frame)
;; Exclude child frames
(unless (and (fboundp 'frame-parent)
(frame-parent frame))
(window-list)))
(visible-frame-list)))))
(propertize (format " %s " num)
'face (if (doom-modeline--active)
'doom-modeline-buffer-major-mode
Expand Down

0 comments on commit b449558

Please sign in to comment.