emacs-framebuffer

Emacs library to show images and documents in console using Linux framebuffer
Log | Files | Refs

commit f2e7b2a5586a50dd51c8c8ce77cac75b4ef94306
parent 16a1b31e872e2c5eaa7f3a6c4f9c3c040ae0511d
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun,  8 Dec 2024 21:46:23 +0100

redraw when changing buffer

Diffstat:
Memacs-framebuffer.el | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -714,6 +714,16 @@ ((mkv mp4 ogg webm) (framebuffer-fbmpv filename)) ((3ga m4a mp3) (framebuffer-mocp filename))))) +(defun framebuffer-image-mode-kill-buffer () + (interactive) + (kill-buffer) + (redraw-display)) + +(defun framebuffer-image-mode-quit-window () + (interactive) + (quit-window) + (redraw-display)) + (add-hook 'framebuffer-image-mode-hook (lambda () @@ -726,10 +736,10 @@ (define-key framebuffer-image-mode-map "f" 'framebuffer-image-mode-fit-page) (define-key framebuffer-image-mode-map "g" 'framebuffer-image-mode-goto-page) (define-key framebuffer-image-mode-map "h" 'framebuffer-image-mode-fit-height) - (define-key framebuffer-image-mode-map "k" 'kill-buffer) + (define-key framebuffer-image-mode-map "k" 'framebuffer-image-mode-kill-buffer) (define-key framebuffer-image-mode-map "n" 'framebuffer-image-mode-next-page) (define-key framebuffer-image-mode-map "p" 'framebuffer-image-mode-previous-page) - (define-key framebuffer-image-mode-map "q" 'quit-window) + (define-key framebuffer-image-mode-map "q" 'framebuffer-image-mode-quit-window) (define-key framebuffer-image-mode-map "spc" 'framebuffer-image-mode-scroll-down) (define-key framebuffer-image-mode-map "u" 'framebuffer-image-mode-scroll-up) (define-key framebuffer-image-mode-map "w" 'framebuffer-image-mode-fit-width)