mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 12:05:31 +00:00
Fix vlf-ediff at the borders of hexl buffers.
This commit is contained in:
parent
673ae08848
commit
ce13609f14
12
vlf-base.el
12
vlf-base.el
@ -92,10 +92,7 @@ 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)
|
||||
(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? "))
|
||||
@ -107,8 +104,11 @@ bytes added to the end."
|
||||
(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)
|
||||
(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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user