Push mark before jumping
This commit is contained in:
parent
b571187d68
commit
fdd8fc306f
@ -687,6 +687,7 @@ is in a fold, move to the beginning of the fold that POINT is
|
||||
in."
|
||||
(interactive (list (current-buffer) (point)))
|
||||
(-when-let (tree (origami-get-fold-tree buffer))
|
||||
(push-mark)
|
||||
(-> tree
|
||||
(origami-fold-preorder-reduce (lambda (state n)
|
||||
(cons (origami-fold-beg n) state)) nil)
|
||||
@ -699,6 +700,7 @@ in."
|
||||
a fold, move to the end of the fold that POINT is in."
|
||||
(interactive (list (current-buffer) (point)))
|
||||
(-when-let (tree (origami-get-fold-tree buffer))
|
||||
(push-mark)
|
||||
(-> tree
|
||||
(origami-fold-postorder-reduce (lambda (state n)
|
||||
(cons (origami-fold-end n) state)) nil)
|
||||
@ -710,6 +712,7 @@ a fold, move to the end of the fold that POINT is in."
|
||||
after POINT."
|
||||
(interactive (list (current-buffer) (point)))
|
||||
(-when-let (tree (origami-get-fold-tree buffer))
|
||||
(push-mark)
|
||||
(-> tree
|
||||
(origami-fold-preorder-reduce (lambda (state n)
|
||||
(cons (origami-fold-beg n) state)) nil)
|
||||
@ -722,6 +725,7 @@ that is a sibling of the fold the point is currently in."
|
||||
(interactive (list (current-buffer) (point)))
|
||||
(-when-let (tree (origami-get-fold-tree buffer))
|
||||
(-when-let (path (origami-fold-find-path-containing tree point))
|
||||
(push-mark)
|
||||
(-when-let (c (-> (origami-fold-next-sibling (origami-fold-children
|
||||
(origami-fold-parent path))
|
||||
(-last-item path))
|
||||
@ -734,6 +738,7 @@ that is a sibling of the fold the point is currently in."
|
||||
(interactive (list (current-buffer) (point)))
|
||||
(-when-let (tree (origami-get-fold-tree buffer))
|
||||
(-when-let (path (origami-fold-find-path-containing tree point))
|
||||
(push-mark)
|
||||
(-when-let (c (-> (origami-fold-prev-sibling (origami-fold-children
|
||||
(origami-fold-parent path))
|
||||
(-last-item path))
|
||||
|
Loading…
Reference in New Issue
Block a user