Skip to content

Commit

Permalink
Thu 15 Apr 2021 09:53:13
Browse files Browse the repository at this point in the history
  • Loading branch information
mullikine committed Apr 14, 2021
1 parent 4d64743 commit b145072
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pen-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
(defun pen-surrounding-text (&optional window-line-size)
(if (not window-line-size)
(setq window-line-size 20))
(str (buffer-substring (- (point)
(save-excursion
(ntimes window-line-size (previous-line))
(point))
10) (max 1 (- (point) 1000)))))
(let ((window-line-radius (/ window-line-size 2)))
(str (buffer-substring (- (point)
(get-point-start-of-nth-previous-line window-line-radius)
10) (max 1 (- (point) 1000))))))

(ntimes 5 (message "hi"))

Expand Down

0 comments on commit b145072

Please sign in to comment.