Skip to content

Commit

Permalink
Set make-window-start-visible to t to enhance user experience
Browse files Browse the repository at this point in the history
This commit helps with how Emacs displays windows and scrolling. When
make-window-start-visible is set to t, Emacs will ensure that the first
line of text in a window is fully visible, rather than potentially being
partially cut off at the top of the window.
  • Loading branch information
jamescherti committed Nov 24, 2024
1 parent 5659559 commit 9bc9304
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions outline-indent.el
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ display table). To apply the change, you need to execute
:type '(choice string (const nil))
:group 'outline-indent)

(defcustom outline-indent-make-window-start-visible t
"Non-nil to ensure `window-start' is never invisible.
If you're in doubt, leave this to its default (t).
Setting this to t improves the user experience by ensuring that the first line
of text in a window is fully visible, rather than potentially becoming
invisible. This sets the buffer local variable `make-window-start-visible'."
:type 'boolean
:group 'outline-indent)

(defcustom outline-indent-advise-outline-functions t
"If non-nil, advises built-in `outline' functions to improve compatibility.
It is highly recommended to keep `outline-indent-advise-outline-functions'
Expand Down Expand Up @@ -403,6 +412,10 @@ This mode sets up outline to work based on indentation."
(not (any " \t\n"))))
(outline-indent--update-ellipsis)

;; Ensures that window-start is never invisible
(setq-local make-window-start-visible
outline-indent-make-window-start-visible)

(when outline-indent-advise-outline-functions
;; Advise the built-in `outline-mode' and `outline-minor-mode'
;; functions to improve compatibility with
Expand Down

0 comments on commit 9bc9304

Please sign in to comment.