[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/darkroom 4953ee6 1/2: Fix #13: correctly calculate sear
From: |
João Távora |
Subject: |
[elpa] externals/darkroom 4953ee6 1/2: Fix #13: correctly calculate search bound for narrowed buffers |
Date: |
Thu, 7 May 2020 13:38:21 -0400 (EDT) |
branch: externals/darkroom
commit 4953ee6f7de4ead0fced02e0da823eafaf5797e0
Author: Ilya Ostapyshyn <address@hidden>
Commit: GitHub <address@hidden>
Fix #13: correctly calculate search bound for narrowed buffers
The search-forward function does not take narrowing into account, so we must
do that ourselves.
Co-authored-by: João Távora <address@hidden>
Copyright-paperwork-exempt: yes
* darkroom.el (darkroom-guess-margins): Add (point-min) to the 20000
---
darkroom.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/darkroom.el b/darkroom.el
index 8dcfbba..b3f2be8 100644
--- a/darkroom.el
+++ b/darkroom.el
@@ -171,7 +171,7 @@ window's geometry."
(goto-char (point-min))
(cl-loop for start = (point)
while (search-forward "\n"
- 20000
+ (+ 20000 (point-min))
'no-error)
for width = (truncate
(car