Commit 0ef2c2f2 authored by Karl Heuer's avatar Karl Heuer
Browse files

(split-window-horizontally): If size is negative, measure from the right.

parent 21d5959f
......@@ -124,10 +124,14 @@ new mode line."
(defun split-window-horizontally (&optional arg)
"Split current window into two windows side by side.
This window becomes the leftmost of the two, and gets
ARG columns. No arg means split equally."
This window becomes the leftmost of the two, and gets ARG columns.
Negative arg means select the size of the rightmost window instead.
No arg means split equally."
(interactive "P")
(split-window nil (and arg (prefix-numeric-value arg)) t))
(let ((size (and arg (prefix-numeric-value arg))))
(and size (< size 0)
(setq size (+ (window-width) size)))
(split-window nil size t)))
(defun enlarge-window-horizontally (arg)
"Make current window ARG columns wider."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment