branch: externals/cm-mode
commit b1cac225f8867aeec0fa1814584edde796c8dff3
Author: Joost Kremers <[email protected]>
Commit: Joost Kremers <[email protected]>
Adjust substrings in cm-substitution-string
After the changes in acb4807, the string returned by thing-at-point does
not include the curly braces anymore.
---
cm-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cm-mode.el b/cm-mode.el
index 263ed800b7..5411ecf295 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -487,10 +487,10 @@ substitutions, `d' for comments and highlights."
(text (delete ?\n (second change)))) ; delete newlines because they
mess up string-match below.
(cond
((eq type 'cm-addition)
- (if action (substring text 3 -3)
+ (if action (substring text 2 -2)
""))
((eq type 'cm-deletion)
- (if action "" (substring text 3 -3)))
+ (if action "" (substring text 2 -2)))
((eq type 'cm-substitution)
(string-match "{~~\\(.*?\\)~>\\(.*?\\)~~}" text)
(match-string (if action 2 1) text))