aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadon Rosborough <radon.neon@gmail.com>2020-08-23 14:38:45 -0600
committerRadon Rosborough <radon.neon@gmail.com>2020-08-23 14:38:45 -0600
commit80e1b09dda032045062991fb7929badd22cb77eb (patch)
treef343f71e4f3e43ba63ebe44a7ed06da3c94cd1be
parentc77a781912fcb43cb3a93c94db071a3cc4039861 (diff)
Revert "Work around 2^16 buffer char limit"
Unfortunately, we need to address the problem more fundamentally. The previous fix causes the end of the buffer to be truncated under some circumstances. This reverts commit c77a781912fcb43cb3a93c94db071a3cc4039861.
-rw-r--r--CHANGELOG.md6
-rw-r--r--apheleia.el8
2 files changed, 2 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2e5b482..e56e028 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,12 +3,6 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog].
-## Unreleased
-### Bugs fixed
-* Apheleia experiences difficulty formatting buffers longer than 2^16
- characters. Previously, the formatting operation would fail entirely
- in this case. Now it works, albeit with degraded performance.
-
## 1.1.1 (released 2020-07-16)
### Formatters
* New: [OCamlFormat](https://github.com/ocaml-ppx/ocamlformat) for
diff --git a/apheleia.el b/apheleia.el
index 468609f..c616234 100644
--- a/apheleia.el
+++ b/apheleia.el
@@ -293,7 +293,7 @@ provided that its exit status is 0."
(if (funcall
(or exit-status
(lambda (status)
- (= 0 (logand 255 status))))
+ (= 0 status)))
(process-exit-status proc))
(when callback
(funcall callback stdout))
@@ -315,11 +315,7 @@ provided that its exit status is 0."
(with-current-buffer stdin
(buffer-string))))
(process-send-eof apheleia--current-process))
- (error
- (unless (string-match-p
- "process .+ no longer connected to pipe; closed it"
- (error-message-string e))
- (message "Failed to run %s: %s" name (error-message-string e)))))))
+ (error (message "Failed to run %s: %s" name (error-message-string e))))))
(defun apheleia--write-region-silently
(start end filename &optional