From 369014fd92e44f4cec54a78fa9be11d35b44f277 Mon Sep 17 00:00:00 2001 From: Udayvir Singh <97400310+udayvir-singh@users.noreply.github.com> Date: Fri, 12 Jul 2024 22:21:47 +0000 Subject: [PATCH] meow-command: fix behavior of meow-next-thing (#615) Fixes regression from #596. Picks between a bound and the mark correctly when the mark is within bounds of the thing being selected. --- meow-command.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meow-command.el b/meow-command.el index 32ff5be..b9b6054 100644 --- a/meow-command.el +++ b/meow-command.el @@ -807,8 +807,8 @@ This will shrink the word selection only contains (1- pos))) (let ((bounds (bounds-of-thing-at-point thing))) (if (> mark pos) - (cdr bounds) - (car bounds))))) + (min mark (cdr bounds)) + (max mark (car bounds)))))) (defun meow-next-thing (thing type n) "Create non-expandable selection of TYPE to the end of the next Nth THING.