branch: externals/darkroom commit 4953ee6f7de4ead0fced02e0da823eafaf5797e0 Author: Ilya Ostapyshyn <ilya.ostapys...@gmail.com> Commit: GitHub <nore...@github.com>
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 <joaotav...@gmail.com> 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