Fill titles
So they don't run on too long off the screen.
This commit is contained in:
parent
a382f10aac
commit
93461d87cd
1 changed files with 22 additions and 17 deletions
|
@ -272,6 +272,7 @@ with `auth-source-search' and then by asking the user."
|
|||
(defun avandu--insert-article-title (id link title)
|
||||
"Insert a button with the label TITLE and store ID and LINK in
|
||||
the article-id and link properties, respectively."
|
||||
(let ((pos (point)))
|
||||
(insert-button
|
||||
(avandu--oneline title)
|
||||
'face 'avandu-overview-unread-article
|
||||
|
@ -280,12 +281,15 @@ the article-id and link properties, respectively."
|
|||
'keymap avandu-article-button-map
|
||||
'action #'(lambda (button)
|
||||
(message "%s" (button-get button 'link))))
|
||||
(insert-char ?\n 1))
|
||||
(fill-region pos (point))
|
||||
(insert-char ?\n 1)))
|
||||
|
||||
(defun avandu--insert-feed-title (id title)
|
||||
"Insert a button with the label TITLE and store ID in the
|
||||
feed-id property."
|
||||
(unless (eq (point) (point-min)) (insert-char ?\n 1))
|
||||
|
||||
(let ((pos (point)))
|
||||
(insert-button
|
||||
(avandu--oneline title)
|
||||
'face 'avandu-overview-feed
|
||||
|
@ -293,7 +297,8 @@ feed-id property."
|
|||
'keymap avandu-feed-button-map
|
||||
'action #'(lambda (button)
|
||||
(message "%s" (button-label button))))
|
||||
(insert-char ?\n 2))
|
||||
(fill-region pos (point))
|
||||
(insert-char ?\n 2)))
|
||||
|
||||
(defun avandu--oneline (text)
|
||||
"Make a single line out of and clean up TEXT."
|
||||
|
|
Loading…
Reference in a new issue