aboutsummaryrefslogtreecommitdiff
path: root/sx.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-15 14:10:55 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-15 14:10:55 -0200
commita36ab1aecfdf62d7d3763cff2490c61cf63d4930 (patch)
tree28e4acaa3e4b0c59a790d550c5079a7b5eb50d03 /sx.el
parentacd7a66c79878275e7bda307ee07825877b85bbf (diff)
sx--find-in-buffer moves over end of line
Diffstat (limited to 'sx.el')
-rw-r--r--sx.el6
1 files 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