diff options
| author | Justin Burkett <justin@burkett.cc> | 2023-06-20 22:01:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-20 22:01:16 -0400 |
| commit | 170e968c6a46a572b30c52c1b038232d418734cc (patch) | |
| tree | 3062d62ff588b86d3dce2cf37cef70ac048f7ad6 | |
| parent | d5df45f84395f507aba555a54407b60e284b23cd (diff) | |
| parent | 1e6e39310479ba4fed69019ab933e9a01b212060 (diff) | |
Merge pull request #38 from wwade/masterexternals/vdiff
Fix diff opts handling (ignore case / whitespace)
| -rw-r--r-- | vdiff.el | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -296,6 +296,10 @@ because those are handled differently.") "Make ARGS into list and remove nils." (delq nil (apply #'list args))) +(defun vdiff--maybe-list (str) + "Return a list with STR as the sole element, or an empty list if STR is empty." + (if (string= str "") '() (list str))) + (defun vdiff--buffer-a-p () (when (and vdiff--session @@ -489,7 +493,7 @@ non-nil. Ignore folds if NO-FOLD is non-nil." vdiff--case-options) vdiff--case-options)))) (setf (vdiff-session-case-args vdiff--session) - command-line-arg) + (vdiff--maybe-list command-line-arg)) (when vdiff-mode (vdiff-refresh))) @@ -502,7 +506,7 @@ non-nil. Ignore folds if NO-FOLD is non-nil." vdiff--whitespace-options) vdiff--whitespace-options)))) (setf (vdiff-session-whitespace-args vdiff--session) - command-line-arg) + (vdiff--maybe-list command-line-arg)) (when vdiff-mode (vdiff-refresh))) @@ -1901,8 +1905,8 @@ with non-nil USE-FOLDS." :process-buffer (generate-new-buffer-name " *vdiff* ") :word-diff-output-buffer (generate-new-buffer-name " *vdiff-word* ") :folds (make-hash-table :test 'equal :weakness 'value) - :case-args "" - :whitespace-args "" + :case-args nil + :whitespace-args nil :prior-window-config prior-window-config :on-quit on-quit :kill-buffers-on-quit kill-buffers-on-quit)) @@ -2359,7 +2363,7 @@ enabled automatically if `vdiff-lock-scrolling' is non-nil." "on (-i)")) (defun vdiff--current-whitespace () - (pcase (vdiff-session-whitespace-args vdiff--session) + (pcase (car (vdiff-session-whitespace-args vdiff--session)) ("" "off") ("-w" "all (-w)") ("-b" "space changes (-b)") |
