branch: scratch/add-vdiff
commit 28c939f954da5d739aacb0ee7c52bb4df9710075
Author: justbur <[email protected]>
Commit: justbur <[email protected]>
Document new option
---
README.org | 3 +++
vdiff.el | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 3d68821..6768c2a 100644
--- a/README.org
+++ b/README.org
@@ -143,6 +143,9 @@ The current customization options and there defaults are
;; Minimum number of lines to fold
(setq vdiff-min-fold-size 4)
+ ;; If non-nil, avoid closing new folds around point.
+ (setq vdiff-may-close-fold-on-point t)
+
;; Function that returns the string printed for a closed fold. The arguments
;; passed are the number of lines folded, the text on the first line, and the
;; width of the buffer.
diff --git a/vdiff.el b/vdiff.el
index c925181..55608a1 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -94,6 +94,11 @@ break vdiff. It is empty by default."
:group 'vdiff
:type 'integer)
+(defcustom vdiff-may-close-fold-on-point t
+ "If non-nil, avoid closing new folds around point."
+ :group 'vdiff
+ :type 'boolean)
+
(defcustom vdiff-fold-string-function 'vdiff-fold-string-default
"Function that returns the string printed for a closed
fold. The arguments passed are the number of lines folded, the
@@ -118,11 +123,6 @@
https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Class-Table.htm
:group 'vdiff
:type 'boolean)
-(defcustom vdiff-may-close-fold-on-point t
- "If non-nil, avoid closing new folds around point."
- :group 'vdiff
- :type 'boolean)
-
(defcustom vdiff-subtraction-style 'full
"How to represent subtractions (i.e., deleted lines). The
default is full which means add the same number of (fake) lines