From 62aa504cc83c78f307e58f697f333f35ac3fe32a Mon Sep 17 00:00:00 2001 From: Shane Mulligan Date: Thu, 15 Apr 2021 09:40:22 +1200 Subject: [PATCH] Thu 15 Apr 2021 09:40:22 --- pen-core.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pen-core.el b/pen-core.el index ba2250b3f..845274216 100644 --- a/pen-core.el +++ b/pen-core.el @@ -9,8 +9,11 @@ (defun pen-surrounding-text (&optional window-line-size) (if (not window-line-size) (setq window-line-size 20)) - (str (buffer-substring (- (point) (save-excursion - (dotimes) 10)) (max 1 (- (point) 1000))))) + (str (buffer-substring (- (point) + (save-excursion + (ntimes window-line-size (previous-line)) + (point)) + 10) (max 1 (- (point) 1000))))) (ntimes 5 (message "hi"))