mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
Use window-full-width-p instead of comparing frame-width and
window-width.
This commit is contained in:
parent
1be8283dba
commit
70ad3da9ec
@ -2078,7 +2078,7 @@ Or, for optional MON, YR."
|
||||
;; Don't do any window-related stuff if we weren't called from a
|
||||
;; window displaying the calendar
|
||||
(when in-calendar-window
|
||||
(if (or (one-window-p t) (/= (frame-width) (window-width)))
|
||||
(if (or (one-window-p t) (not (window-full-width-p)))
|
||||
;; Don't mess with the window size, but ensure that the first
|
||||
;; line is fully visible
|
||||
(set-window-vscroll nil 0)
|
||||
|
@ -2547,12 +2547,12 @@ deletion of non-empty directories is allowed."
|
||||
(cond ;; if split-height-threshold is enabled, use the largest window
|
||||
((and (> (window-height (setq w2 (get-largest-window)))
|
||||
split-height-threshold)
|
||||
(= (frame-width) (window-width w2)))
|
||||
(window-full-width-p w2))
|
||||
(setq window w2))
|
||||
;; if the least-recently-used window is big enough, use it
|
||||
((and (> (window-height (setq w2 (get-lru-window)))
|
||||
(* 2 window-min-height))
|
||||
(= (frame-width) (window-width w2)))
|
||||
(window-full-width-p w2))
|
||||
(setq window w2)))
|
||||
(save-excursion
|
||||
(set-buffer buf)
|
||||
|
@ -158,7 +158,7 @@ Keep the cursor on the screen as needed."
|
||||
Basically, we check for existing horizontal scrolling."
|
||||
(or truncate-lines
|
||||
(> (window-hscroll (selected-window)) 0)
|
||||
(< (window-width) (frame-width))
|
||||
(not (window-full-width-p))
|
||||
(and
|
||||
mouse-drag-electric-col-scrolling
|
||||
(save-excursion ;; on a long line?
|
||||
|
Loading…
Reference in New Issue
Block a user