From a36ab1aecfdf62d7d3763cff2490c61cf63d4930 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 15 Jan 2015 14:10:55 -0200 Subject: sx--find-in-buffer moves over end of line --- sx.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sx.el b/sx.el index 8ae7a65..950bbf0 100644 --- a/sx.el +++ b/sx.el @@ -278,7 +278,7 @@ If DIRECTION is negative, move backwards instead." "Move point to an object of TYPE and ID. That is, move forward from beginning of buffer until `sx--data-here' is an object of type TYPE with the respective id -ID. +ID. If point is left at the of a line, move over the line break. TYPE is either question, answer, or comment. ID is an integer." @@ -297,7 +297,9 @@ ID is an integer." (point)))) (if (equal pos (point-max)) (sx-message "Can't find the specified %s" type) - (goto-char pos)))) + (goto-char pos) + (when (looking-at-p "$") + (forward-char 1))))) ;;; Printing request data -- cgit v1.2.3