emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/csharp-mode af61254 244/459: Fix off-by-one error for r


From: ELPA Syncer
Subject: [elpa] externals/csharp-mode af61254 244/459: Fix off-by-one error for region directive comments
Date: Sun, 22 Aug 2021 13:59:36 -0400 (EDT)

branch: externals/csharp-mode
commit af612545e7a332b2728678c899a51cec9c433991
Author: Vasilij Schneidermann <mail@vasilij.de>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Fix off-by-one error for region directive comments
    
    Closes #109
---
 csharp-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/csharp-mode.el b/csharp-mode.el
index 7cdae41..4ccee25 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -1157,7 +1157,9 @@ Currently handled:
     (goto-char beg)
     (while (re-search-forward "^\\s-*#\\(region\\|pragma\\) " end t)
       (when (looking-at "\\w")
-        (put-text-property (point) (1+ (point))
+        ;; mark the space separating the directive from the comment
+        ;; text as comment starter to allow correct word movement
+        (put-text-property (1- (point)) (point)
                            'syntax-table (string-to-syntax "< b"))))))
 
 ;; C# does generics.  Setting this to t tells the parser to put



reply via email to

[Prev in Thread] Current Thread [Next in Thread]