From: Stefan Bund Date: Fri, 6 Oct 2017 10:31:52 +0000 (+0200) Subject: mywin: use whitespace-line-column to calculate number of parallel windows X-Git-Url: http://g0dil.de/git?p=emacs-init.git;a=commitdiff_plain;h=4ff4851e3bf7b5467c4783676d2793a4b04a589a mywin: use whitespace-line-column to calculate number of parallel windows --- diff --git a/setup/mywin.el b/setup/mywin.el index 6eda23b..7d961c1 100644 --- a/setup/mywin.el +++ b/setup/mywin.el @@ -67,7 +67,9 @@ window smaller than MIN-HEIGHT lines." (if (integerp n) (setq my-windows-count n) (setq my-windows-count nil))) - (let* ((width (if my-windows-count (- (/ (frame-width) my-windows-count) 4) 100)) + (let* ((width (if my-windows-count + (- (/ (frame-width) my-windows-count) 4) + (or whitespace-line-column 100))) (min width) (distribute t) (currentbuffer (current-buffer)) (currentwindow (selected-window)) @@ -142,8 +144,9 @@ window smaller than MIN-HEIGHT lines." if (and (= (aref name 0) ?*) (not (member name setup-my-windows-precious-buffers))) return w) firstwindow)) - (if (and distribute (> (length newtopwindows) 1)) - (balance-windows firstwindow)) + (when (and distribute (> (length newtopwindows) 1)) + ;;(balance-windows) + ) (select-window newwindow) (if (not (member (buffer-name currentbuffer) setup-my-windows-junk-buffers)) (switch-to-buffer currentbuffer))))