The Lambda Lab
/
projects
/
lurk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f57d5c
)
Maximise visibility of buffer when point on the last line.
author
plugd
<plugd@thelambdalab.xyz>
Sun, 18 Jul 2021 19:46:24 +0000
(21:46 +0200)
committer
plugd
<plugd@thelambdalab.xyz>
Sun, 18 Jul 2021 19:46:24 +0000
(21:46 +0200)
lurk.el
patch
|
blob
|
history
diff --git
a/lurk.el
b/lurk.el
index
f030555
..
8967094
100644
(file)
--- a/
lurk.el
+++ b/
lurk.el
@@
-446,8
+446,14
@@
portion of the source component of the message, as LURK doesn't use this.")
(fill-region (point-min) (point-max) nil t)
(buffer-string))))
(fill-region (point-min) (point-max) nil t)
(buffer-string))))
+(defun lurk--start-of-final-line ()
+ (with-current-buffer "*lurk*"
+ (save-excursion
+ (goto-char (point-max))
+ (line-beginning-position))))
+
(defun lurk-display-string (context prefix &rest strings)
(defun lurk-display-string (context prefix &rest strings)
- (with-current-buffer
(get-buffer-create "*lurk*")
+ (with-current-buffer
"*lurk*"
(save-excursion
(goto-char lurk-prompt-marker)
(let* ((inhibit-read-only t)
(save-excursion
(goto-char lurk-prompt-marker)
(let* ((inhibit-read-only t)
@@
-474,7
+480,11
@@
portion of the source component of the message, as LURK doesn't use this.")
'face (lurk-get-context-facelist context)
'read-only t
'context context
'face (lurk-get-context-facelist context)
'read-only t
'context context
- 'invisible context-atom))))))))
+ 'invisible context-atom))))))
+ (dolist (window (get-buffer-window-list))
+ (if (>= (window-point window) (lurk--start-of-final-line))
+ (with-selected-window window
+ (recenter -1))))))
(defun lurk-display-message (from to text)
(let ((context (if (eq 'channel (lurk-get-context-type to))
(defun lurk-display-message (from to text)
(let ((context (if (eq 'channel (lurk-get-context-type to))