branch: externals/diff-hl commit a942b2383db0dc16df389611b84031c29d5c17ed Merge: 11f3113e79 570ad8caf2 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: GitHub <nore...@github.com>
Merge pull request #221 from tarsiiformes/shorten Shorten long lines in docstrings --- diff-hl-inline-popup.el | 12 ++++++++---- diff-hl-show-hunk.el | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/diff-hl-inline-popup.el b/diff-hl-inline-popup.el index bee6ce10e3..48a6f991d4 100644 --- a/diff-hl-inline-popup.el +++ b/diff-hl-inline-popup.el @@ -53,7 +53,8 @@ (- (length list) length offset))) (defun diff-hl-inline-popup--ensure-enough-lines (pos content-height) - "Ensure there is enough lines below POS to show the inline popup with CONTENT-HEIGHT height." + "Ensure there is enough lines below POS to show the inline popup. +CONTENT-HEIGHT specifies the height of the popup." (let* ((line (line-number-at-pos pos)) (end (line-number-at-pos (window-end nil t))) (height (+ 6 content-height)) @@ -69,14 +70,16 @@ Default for CONTENT-SIZE is the size of the current lines" (min content-size max-size))) (defun diff-hl-inline-popup--compute-content-lines (lines index window-size) - "Compute the lines to show in the popup, from LINES starting at INDEX with a WINDOW-SIZE." + "Compute the lines to show in the popup. +Compute it from LINES starting at INDEX with a WINDOW-SIZE." (let* ((len (length lines)) (window-size (min window-size len)) (index (min index (- len window-size)))) (diff-hl-inline-popup--splice lines index window-size))) (defun diff-hl-inline-popup--compute-header (width &optional header) - "Compute the header of the popup, with some WIDTH, and some optional HEADER text." + "Compute the header of the popup. +Compute it from some WIDTH, and some optional HEADER text." (let* ((scroll-indicator (if (eq diff-hl-inline-popup--current-index 0) " " " ⬆ ")) (header (or header "")) (new-width (- width (length header) (length scroll-indicator))) @@ -88,7 +91,8 @@ Default for CONTENT-SIZE is the size of the current lines" (concat line "\n") )) (defun diff-hl-inline-popup--compute-footer (width &optional footer) - "Compute the header of the popup, with some WIDTH, and some optional FOOTER text." + "Compute the header of the popup. +Compute it from some WIDTH, and some optional FOOTER text." (let* ((scroll-indicator (if (>= diff-hl-inline-popup--current-index (- (length diff-hl-inline-popup--current-lines) diff-hl-inline-popup--height)) diff --git a/diff-hl-show-hunk.el b/diff-hl-show-hunk.el index 3e083f4cb5..3e82e10233 100644 --- a/diff-hl-show-hunk.el +++ b/diff-hl-show-hunk.el @@ -400,7 +400,7 @@ The backend is determined by `diff-hl-show-hunk-function'." ;;;###autoload (define-minor-mode diff-hl-show-hunk-mouse-mode - "Enables the margin and fringe to show a posframe/popup with vc diffs when clicked. + "Enable margin and fringe to show a posframe/popup with vc diffs when clicked. By default, the popup shows only the current hunk, and the line of the hunk that matches the current position is highlighted. The face, border and other visual preferences are