emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vlf 0d9cc8e 245/310: Don't measure encoding of too smal


From: Stefan Monnier
Subject: [elpa] externals/vlf 0d9cc8e 245/310: Don't measure encoding of too small region when adjusting chunk start
Date: Sat, 28 Nov 2020 00:33:24 -0500 (EST)

branch: externals/vlf
commit 0d9cc8e488bc44845ccd3bc2f43fe2652f0f2101
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Don't measure encoding of too small region when adjusting chunk start
    and fix passing of elements to tune in vlf-occur.
---
 vlf-base.el  | 6 ++++--
 vlf-occur.el | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/vlf-base.el b/vlf-base.el
index 35bdd72..5b757c4 100644
--- a/vlf-base.el
+++ b/vlf-base.el
@@ -308,8 +308,10 @@ Return number of bytes moved back for proper decoding."
                        (not (zerop safe-start)))
                 (< shift 3)
                 (let ((diff (- chunk-size
-                               (vlf-tune-encode-length position
-                                                       (point-max)))))
+                               (length
+                                (encode-coding-region
+                                 position (point-max)
+                                 buffer-file-coding-system t)))))
                   (if strict
                       (not (zerop diff))
                     (or (< diff -3) (< 0 diff)))))
diff --git a/vlf-occur.el b/vlf-occur.el
index 610f5b0..aebe299 100644
--- a/vlf-occur.el
+++ b/vlf-occur.el
@@ -202,7 +202,7 @@ Prematurely ending indexing will still show what's found so 
far."
          (time (float-time))
          (tune-types (let ((base '(:insert :encode)))
                        (if is-hexl
-                           (nconc '(:hexl :dehexlify) base)
+                           (append '(:hexl :dehexlify) base)
                          base)))
          (reporter (make-progress-reporter
                     (concat "Building index for " regexp "...")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]