File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ - (NSString *)singleLine:(NSString *)source range:(NSRange *)prange
137137 } else if (result == 0 || result == -2 ) {
138138 return nil ;
139139 } else {
140- return [NSString stringWithFormat: @" /*%@ */" , value];
140+ return [NSString stringWithFormat: @" /* %@ */" , value];
141141 }
142142}
143143
@@ -177,7 +177,7 @@ - (NSString *)multiLine:(NSString *)source range:(NSRange *)prange
177177 } else if (result == 0 || result == -2 ) {
178178 return nil ;
179179 } else {
180- return [NSString stringWithFormat: @" /*%@ */" , value];
180+ return [NSString stringWithFormat: @" /* %@ */" , value];
181181 }
182182}
183183
Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ + (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString
107107 [[document textStorage ] beginEditing ];
108108 [[document textStorage ] replaceCharactersInRange: range withString: aString withUndoManager: [document undoManager ]];
109109 [[document textStorage ] endEditing ];
110+
111+ NSInteger commentRightPartLength = 3 ; // " */"
112+ [[self textView ] setSelectedRange: NSMakeRange (range.location + aString.length - commentRightPartLength, 0 )];
110113}
111114
112115@end
You can’t perform that action at this time.
0 commit comments