mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 20:10:47 +00:00
Don't change encoding for edited chunk, leave it to the user in case
of problem characters.
This commit is contained in:
parent
8637ce5ceb
commit
b52ca6c044
4
vlfi.el
4
vlfi.el
@ -475,7 +475,6 @@ Save anyway? ")))
|
||||
(defun vlfi-file-shift-back (size-change)
|
||||
"Shift file contents SIZE-CHANGE bytes back."
|
||||
(let ((coding-system buffer-file-coding-system))
|
||||
(set-buffer-file-coding-system 'raw-text t)
|
||||
(write-region nil nil buffer-file-name vlfi-start-pos t)
|
||||
(setq buffer-file-coding-system nil)
|
||||
(let ((read-start-pos vlfi-end-pos)
|
||||
@ -490,7 +489,7 @@ Save anyway? ")))
|
||||
(erase-buffer)
|
||||
(insert-char 32 size-change)
|
||||
(write-region nil nil buffer-file-name (- vlfi-file-size
|
||||
size-change))
|
||||
size-change) t)
|
||||
(progress-reporter-done reporter))
|
||||
(setq buffer-file-coding-system coding-system)))
|
||||
|
||||
@ -517,7 +516,6 @@ Done by saving content up front and then writing previous batch."
|
||||
(set-buffer temp-buffer)
|
||||
(setq buffer-file-name file))
|
||||
(set-buffer vlfi-buffer)
|
||||
(set-buffer-file-coding-system 'raw-text t)
|
||||
(let ((read-buffer temp-buffer)
|
||||
(write-buffer vlfi-buffer)
|
||||
(size (+ vlfi-batch-size size-change))
|
||||
|
Loading…
x
Reference in New Issue
Block a user