From 3de4a8513b3d88f587faa361b8a1f29af102fe8b Mon Sep 17 00:00:00 2001 From: Greg Sexton Date: Mon, 11 Aug 2014 21:58:46 +0100 Subject: [PATCH] Refactor, but not fix, origami-next-fold --- origami.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/origami.el b/origami.el index ee391af..1bcbefc 100644 --- a/origami.el +++ b/origami.el @@ -449,8 +449,7 @@ a fold, move to the end of the fold that point is in." (-> tree (origami-fold-postorder-reduce (lambda (state n) (cons (origami-fold-end n) state)) nil) - (->> (-reduce (lambda (state pos) - (if (<= pos point) state pos)))) + (->> (-last (lambda (pos) (> pos point)))) goto-char))) (defun origami-reset (buffer)