mu4e: add mu4e-headers-split-view-shrink
This commit is contained in:
@ -489,11 +489,9 @@ after the end of the search results."
|
|||||||
|
|
||||||
;; change the number of headers
|
;; change the number of headers
|
||||||
(define-key map (kbd "C-+") 'mu4e-headers-split-view-resize)
|
(define-key map (kbd "C-+") 'mu4e-headers-split-view-resize)
|
||||||
(define-key map (kbd "C--")
|
(define-key map (kbd "C--") 'mu4e-headers-split-view-shrink)
|
||||||
(lambda () (interactive) (mu4e-headers-split-view-resize -1)))
|
|
||||||
(define-key map (kbd "<C-kp-add>") 'mu4e-headers-split-view-resize)
|
(define-key map (kbd "<C-kp-add>") 'mu4e-headers-split-view-resize)
|
||||||
(define-key map (kbd "<C-kp-subtract>")
|
(define-key map (kbd "<C-kp-subtract>") 'mu4e-headers-split-view-shrink)
|
||||||
(lambda () (interactive) (mu4e-headers-split-view-resize -1)))
|
|
||||||
|
|
||||||
|
|
||||||
;; switching to view mode (if it's visible)
|
;; switching to view mode (if it's visible)
|
||||||
@ -1256,9 +1254,11 @@ maildir)."
|
|||||||
(mu4e-headers-search (concat "\"maildir:" maildir "\""))))
|
(mu4e-headers-search (concat "\"maildir:" maildir "\""))))
|
||||||
|
|
||||||
(defun mu4e-headers-split-view-resize (n)
|
(defun mu4e-headers-split-view-resize (n)
|
||||||
"In horizontal split-view, increase the number of lines shown by
|
"In split-view grow the headers window.
|
||||||
N; in vertical split-view, increase the number of columns shown by
|
In horizontal split-view, increase the number of lines shown by N.
|
||||||
N. Otherwise, don't do anything."
|
In vertical split-view, increase the number of columns shown by N.
|
||||||
|
If N is negative shrink the headers window.
|
||||||
|
When not in split-view do nothing."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(let ((n (or n 1))
|
(let ((n (or n 1))
|
||||||
(hwin (get-buffer-window mu4e~headers-buffer)))
|
(hwin (get-buffer-window mu4e~headers-buffer)))
|
||||||
@ -1273,6 +1273,15 @@ N. Otherwise, don't do anything."
|
|||||||
(window-resize hwin n t)
|
(window-resize hwin n t)
|
||||||
(incf mu4e-headers-visible-columns n)))))))
|
(incf mu4e-headers-visible-columns n)))))))
|
||||||
|
|
||||||
|
(defun mu4e-headers-split-view-shrink (n)
|
||||||
|
"In split-view shrink the headers window.
|
||||||
|
In horizontal split-view, decrease the number of lines shown by N.
|
||||||
|
In vertical split-view, decrease the number of columns shown by N.
|
||||||
|
If N is negative grow the headers window.
|
||||||
|
When not in split-view do nothing."
|
||||||
|
(interactive "P")
|
||||||
|
(mu4e-headers-split-view-resize (- n)))
|
||||||
|
|
||||||
(defun mu4e-headers-action ()
|
(defun mu4e-headers-action ()
|
||||||
"Ask user what to do with message-at-point, then do it. The
|
"Ask user what to do with message-at-point, then do it. The
|
||||||
actions are specified in `mu4e-headers-actions'."
|
actions are specified in `mu4e-headers-actions'."
|
||||||
|
|||||||
@ -518,11 +518,9 @@ at POINT, or if nil, at (point)."
|
|||||||
|
|
||||||
;; change the number of headers
|
;; change the number of headers
|
||||||
(define-key map (kbd "C-+") 'mu4e-headers-split-view-resize)
|
(define-key map (kbd "C-+") 'mu4e-headers-split-view-resize)
|
||||||
(define-key map (kbd "C--")
|
(define-key map (kbd "C--") 'mu4e-headers-split-view-shrink)
|
||||||
(lambda () (interactive) (mu4e-headers-split-view-resize -1)))
|
(define-key map (kbd "<C-kp-add>") 'mu4e-headers-split-view-resize)
|
||||||
(define-key map (kbd "<C-kp-add>") 'mu4e-headers-split-view-resize)
|
(define-key map (kbd "<C-kp-subtract>") 'mu4e-headers-split-view-shrink)
|
||||||
(define-key map (kbd "<C-kp-subtract>")
|
|
||||||
(lambda () (interactive) (mu4e-headers-split-view-resize -1)))
|
|
||||||
|
|
||||||
;; intra-message navigation
|
;; intra-message navigation
|
||||||
(define-key map (kbd "SPC") 'mu4e-view-scroll-up-or-next)
|
(define-key map (kbd "SPC") 'mu4e-view-scroll-up-or-next)
|
||||||
|
|||||||
Reference in New Issue
Block a user