diff options
author | Thanos Apollo <[email protected]> | 2023-09-29 23:54:34 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-09-29 23:54:34 +0300 |
commit | 0ee00fd00e804409842e99bb37d623255afe1d57 (patch) | |
tree | 5cbbe1ffd3abfe5cbab3119bbde69be7a5621491 /yeetube-buffer.el | |
parent | 4431a7a1d214390c426f17ed43d997b97edb9828 (diff) | |
parent | f21f1f3b76ed30340451040ced1fe4665fa586d6 (diff) |
Merge fixes from branch 'master' into dev
- Remove duplicate formatting
- Remove extra lines in yeetube-buffer
- Remove obsolete functions from keymap
Diffstat (limited to 'yeetube-buffer.el')
-rw-r--r-- | yeetube-buffer.el | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/yeetube-buffer.el b/yeetube-buffer.el index c1cc431..1e4970e 100644 --- a/yeetube-buffer.el +++ b/yeetube-buffer.el @@ -111,18 +111,6 @@ "...")))) (propertize formatted-string 'face 'yeetube-face-duration))) -(defun yeetube-buffer--format-video-duration (video-duration) - "Format a video VIDEO-DURATION to be inserted in the *yeetube* buffer." - (let* ((n (string-width video-duration)) - (extra-chars (- n 7)) - (formatted-string (if (<= extra-chars 0) - (concat video-duration - (make-string (abs extra-chars) ?\ ) - " ") - (concat (seq-subseq video-duration 0 7) - "...")))) - (propertize formatted-string 'face 'yeetube-face-duration))) - (defun yeetube-buffer--format-channel (channel) "Format a video CHANNEL to be inserted in the *yeetube* buffer." (let* ((n (string-width channel)) @@ -170,7 +158,10 @@ video-duration "nil")) (yeetube-buffer--format-channel channel-name) - "\n"))))) + "\n"))) + (setf buffer-read-only nil) + (backward-delete-char 1) ;; Delete extra line + (beginning-of-buffer))) (provide 'yeetube-buffer) ;;; yeetube-buffer.el ends here |