Skip to content

Commit af61254

Browse files
wasamasajosteink
authored andcommitted
Fix off-by-one error for region directive comments
Closes #109
1 parent cef0d90 commit af61254

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

csharp-mode.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,9 @@ Currently handled:
11571157
(goto-char beg)
11581158
(while (re-search-forward "^\\s-*#\\(region\\|pragma\\) " end t)
11591159
(when (looking-at "\\w")
1160-
(put-text-property (point) (1+ (point))
1160+
;; mark the space separating the directive from the comment
1161+
;; text as comment starter to allow correct word movement
1162+
(put-text-property (1- (point)) (point)
11611163
'syntax-table (string-to-syntax "< b"))))))
11621164

11631165
;; C# does generics. Setting this to t tells the parser to put

0 commit comments

Comments
 (0)