diff options
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 |