Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorpogue committed May 11, 2022
1 parent f15a275 commit 1ddb89f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions topspace.el
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Valid top space line heights are:
- only positive when `window-start' equals 1,
`topspace-active' returns non-nil, and `topspace-mode' is enabled,
- not larger than `topspace--window-height' minus `topspace--context-lines'."
(interactive "p")
(interactive "P")
(let ((old-height) (window (selected-window)))
;; Get the previous top space height
(unless old-height (setq old-height (topspace-height)))
Expand Down Expand Up @@ -460,8 +460,9 @@ ARGS are needed for compatibility with `advice-add'."
Will only set to HEIGHT if HEIGHT is a valid value as per
`topspace--correct-height'. This only sets the underlying stored value for
top space height, and it does not redraw the top space."
(setf (alist-get (selected-window) topspace--heights)
(topspace--correct-height height)))
(setq height (topspace--correct-height height))
(setf (alist-get (selected-window) topspace--heights) height)
height)

(defun topspace--correct-height (height)
"Return HEIGHT if a valid top space line height, else a valid value.
Expand Down

0 comments on commit 1ddb89f

Please sign in to comment.