[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vlf ce13609 278/310: Fix vlf-ediff at the borders of he
From: |
Stefan Monnier |
Subject: |
[elpa] externals/vlf ce13609 278/310: Fix vlf-ediff at the borders of hexl buffers. |
Date: |
Sat, 28 Nov 2020 00:33:31 -0500 (EST) |
branch: externals/vlf
commit ce13609f14033b94669cbb07cbad51857bfaac9e
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>
Fix vlf-ediff at the borders of hexl buffers.
---
vlf-base.el | 44 ++++++++++++++++++++++----------------------
vlf-ediff.el | 4 ++--
2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/vlf-base.el b/vlf-base.el
index 268dcaa..f040f0f 100644
--- a/vlf-base.el
+++ b/vlf-base.el
@@ -92,28 +92,28 @@ If same as current chunk is requested, do nothing.
Return number of bytes moved back for proper decoding and number of
bytes added to the end."
(vlf-verify-size)
- (if (derived-mode-p 'hexl-mode)
- (setq start (- start (mod start hexl-bits))
- end (+ end (- hexl-bits (mod end hexl-bits)))))
- (cond ((or (<= end start) (<= end 0)
- (<= vlf-file-size start))
- (when (or (not (buffer-modified-p))
- (y-or-n-p "Chunk modified, are you sure? "))
- (erase-buffer)
- (set-buffer-modified-p nil)
- (let ((place (if (<= vlf-file-size start)
- vlf-file-size
- 0)))
- (setq vlf-start-pos place
- vlf-end-pos place)
- (or minimal (vlf-update-buffer-name))
- (cons (- start place) (- place end)))))
- ((or (/= start vlf-start-pos)
- (/= end vlf-end-pos))
- (let ((shifts (vlf-move-to-chunk-1 start end)))
- (and shifts (not minimal)
- (vlf-update-buffer-name))
- shifts))))
+ (if (or (<= end start) (<= end 0)
+ (<= vlf-file-size start))
+ (when (or (not (buffer-modified-p))
+ (y-or-n-p "Chunk modified, are you sure? "))
+ (erase-buffer)
+ (set-buffer-modified-p nil)
+ (let ((place (if (<= vlf-file-size start)
+ vlf-file-size
+ 0)))
+ (setq vlf-start-pos place
+ vlf-end-pos place)
+ (or minimal (vlf-update-buffer-name))
+ (cons (- start place) (- place end))))
+ (if (derived-mode-p 'hexl-mode)
+ (setq start (- start (mod start hexl-bits))
+ end (+ end (- hexl-bits (mod end hexl-bits)))))
+ (if (or (/= start vlf-start-pos)
+ (/= end vlf-end-pos))
+ (let ((shifts (vlf-move-to-chunk-1 start end)))
+ (and shifts (not minimal)
+ (vlf-update-buffer-name))
+ shifts))))
(defun vlf-move-to-chunk-1 (start end)
"Move to chunk enclosed by START END keeping as much edits if any.
diff --git a/vlf-ediff.el b/vlf-ediff.el
index 27f1b05..5c4c161 100644
--- a/vlf-ediff.el
+++ b/vlf-ediff.el
@@ -217,9 +217,9 @@ logical chunks in case there is no difference at the
current ones."
(vlf-move-to-chunk (- max-file-size
vlf-batch-size)
max-file-size))
- (vlf-beginning-of-file)
+ (vlf-move-to-batch 0)
(set-buffer buffer-A)
- (vlf-beginning-of-file))
+ (vlf-move-to-batch 0))
(set-buffer ediff-buffer)
(ediff-update-diffs)
(or is-hexl
- [elpa] externals/vlf 069b2f5 240/310: Replace operations with respective vlf-tune wrappers., (continued)
- [elpa] externals/vlf 069b2f5 240/310: Replace operations with respective vlf-tune wrappers., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf fb05030 241/310: Add basic tune strategies., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf e18a05b 247/310: Add linear search for tuning and prefer smaller batches., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 48a014f 250/310: Fix write measuring and endless loop in nearby approximation., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ee7409b 254/310: Tune batch size in more cases., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 5651ee3 252/310: Rename vlf-tune-optimal to vlf-tune-batch., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 06b4f85 262/310: Respect disabled tune settings and move custom options., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 199209f 263/310: Fix vlf-tune-optimal-load with no optional arguments supplied., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 023ee70 267/310: Declare hexl functions to please byte compiler., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf c3a308c 271/310: Optimize save performance over the temp file if such is used. Add, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ce13609 278/310: Fix vlf-ediff at the borders of hexl buffers.,
Stefan Monnier <=
- [elpa] externals/vlf f43ada1 282/310: Fix byte compilation warnings., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 305d802 280/310: Use shared profiling info for encode, write and hexl operations., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 5dd9e2c 281/310: Adjust address parts of hexlified buffer according to vlf-start-pos., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 68d6c1b 289/310: vlf-occur changes:, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 0fa6248 288/310: Optimize unconditional chunk loading and prefer it in more cases of, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf bd5f9ca 286/310: Back to using per buffer profiling for encode speed., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf 726f50b 294/310: Fix byte-compilation warnings on install., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf eaa3629 299/310: Fix cursor position after search, Stefan Monnier, 2020/11/28
- [elpa] externals/vlf ac1aa16 296/310: Standard naming for chunk update hooks., Stefan Monnier, 2020/11/28
- [elpa] externals/vlf cc02f25 306/310: Fix typos, Stefan Monnier, 2020/11/28