branch: externals/objed
commit 7930c68c191f371bf23e428ec29440f048191879
Author: Clemens Radermacher <[email protected]>
Commit: Clemens Radermacher <[email protected]>
Make word movement aware of object state
---
objed-objects.el | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index d24c0ad..87c94bf 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -1549,9 +1549,22 @@ comments."
(bounds-of-thing-at-point 'word))
(bounds-of-thing-at-point 'word))))
:try-next
- (re-search-forward "\\<." nil t)
+ (if (objed--inner-p)
+ (let* ((subword-mode t)
+ (superword-mode nil)
+ (find-word-boundary-function-table
+ subword-find-word-boundary-function-table))
+ (forward-word 1)
+ (forward-word -1))
+ (re-search-forward "\\<." nil t))
:try-prev
- (re-search-backward ".\\>" nil t))
+ (if (objed--inner-p)
+ (let* ((subword-mode t)
+ (superword-mode nil)
+ (find-word-boundary-function-table
+ subword-find-word-boundary-function-table))
+ (forward-word -1))
+ (re-search-backward ".\\>" nil t)))
(defun objed--next-symbol ()