branch: externals/objed
commit be2c78c42036f028105c5458e282cda982587bc2
Author: Clemens Radermacher <[email protected]>
Commit: Clemens Radermacher <[email protected]>
Fix word object for subword-mode
---
objed-objects.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/objed-objects.el b/objed-objects.el
index 6521826..7b1c460 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -1524,7 +1524,12 @@ comments."
(bounds-of-thing-at-point 'symbol))
'identifier)
:get-obj
- (bounds-of-thing-at-point 'word)
+ (if (and (bound-and-true-p subword-mode)
+ (eq this-command 'forward-word))
+ (save-excursion
+ (forward-word -1)
+ (bounds-of-thing-at-point 'word))
+ (bounds-of-thing-at-point 'word))
:try-next
(re-search-forward "\\<." nil t)
:try-prev