-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Splitting windows vertically doesn't work #12
Comments
I'll take a look asap. |
I'm facing the same problem, however, it appears that the issue does not affect My current workaround until this is fixed is to put An issue with this solution is that now the split windows are both centered. Toggling |
Hi, I pushed a new version that hopefully will fix this issue. |
Issue doesn't seem to be fixed with latest build. BacktraceWhen calling
Environment
|
I'm working on it, thanks for reporting it! |
@wagk Are you sure you've having problems splitting windows vertically and not horizontally?
Fringes are on the left and right, so the trouble should be with splitting horizontally, not vertically. That's what I'm experiencing. |
@xiongtx Yes I believe |
@anler It may be worth taking a look at I haven't dug too deeply into how they do things, but one thing I see is that they use margins instead of fringes to center the window. |
Hi all, I haven't forgotten about this, but I'm going to merge #21 first, I'm using it and haven't had this issue since, but still is not a definitive solution. Thanks! |
I just tried out #21, I had to set |
@anler I think this is due to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24193, Olivetti had the same problem and they hacked around it. Maybe you can do something similar? I love this mode since this is the only lightroom mode clone that works with |
I'll take a look later today, thanks! |
So, using https://github.com/railwaycat/homebrew-emacsmacport, setting fullscreen frame parameter to maximized with |
Hi! It seems that the error is triggered at Line 5544 on window.el file. It seems that As a temporary solution I tried to advise the (defun my-cwm-turn-off (fnc &optional window size side pixelwise)
"Deactivate the centered-window-mode before splitting."
(if centered-window-mode
(progn
(centered-window-mode -1)
(apply fnc window size side pixelwise)
(centered-window-mode t))
(apply fnc window size side pixelwise)))
(advice-add 'split-window :around #'my-cwm-turn-off) This works in my Emacs... but maybe there is a better solution for this? 🤔 |
As an FYI I think this is a more universal solution (i.e. one that works regardless of what function/command is doing the splitting): (defun kb/window-splittable-p (window &optional horizontal)
"Override for `window-splittable-p'.
Determine if WINDOW is splittable."
(when (and (window-live-p window)
(not (window-parameter window 'window-side)))
(with-current-buffer (window-buffer window)
(if horizontal
(and (memq window-size-fixed '(nil height))
(numberp split-width-threshold)
(>= (if (bound-and-true-p centered-window-mode)
;; Added this. Not sure if this is foolproof, since all
;; it does is take into consideration the margins and
;; fringes, but for now it's a sufficient approximation
(window-total-width window)
(window-width window))
(max split-width-threshold
(* 2 (max window-min-width 2)))))
(and (memq window-size-fixed '(nil width))
(numberp split-height-threshold)
(>= (window-height window)
(max split-height-threshold
(* 2 (max window-min-height
(if mode-line-format 2 1))))))))))
(advice-add 'window-splittable-p :override #'kb/window-splittable-p) |
Hello, this does everything I want for my purposes, however, it refuses to split up windows. I use Evil so I do
C-w v
to split my window vertically but get the following error message:split-window: Window #<window 3 on emacs.org> too small for splitting (2) [2 times]
. However splitting horizontally works just fine. Any ideas why?I'm using the Emacs 25.1 on OS X El Capitan.
The text was updated successfully, but these errors were encountered: