File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -167,16 +167,17 @@ - (BOOL)tryExpandingSwitchStatement
167167 switchContentRange = NSMakeRange (openingBracketLocation + 1 , closingBracketLocation - openingBracketLocation - 1 );
168168 switchContent = [textView.string substringWithRange: switchContentRange];
169169
170- // Insert the default case if necessary
171- if ([switchContent rangeOfString: @" default" ].location == NSNotFound ) {
172- if ([[SCXcodeSwitchExpander sharedSwitchExpander ] isSwift ]) {
173- replacementString = [NSMutableString stringWithString: @" default: \n break\n\n " ];
174- } else {
175- replacementString = [NSMutableString stringWithString: @" default: {\n break;\n }\n " ];
176- }
177- [textView insertText: replacementString replacementRange: NSMakeRange (switchContentRange.location + switchContentRange.length, 0 )];
178- closingBracketLocation += replacementString.length ;
179- }
170+ // // Insert the default case if necessary
171+ // if([switchContent rangeOfString:@"default"].location == NSNotFound) {
172+ // if ([[SCXcodeSwitchExpander sharedSwitchExpander] isSwift]) {
173+ // replacementString = [NSMutableString stringWithString:@"default: \nbreak\n\n"];
174+ // } else {
175+ // replacementString = [NSMutableString stringWithString:@"default: {\nbreak;\n}\n"];
176+ // }
177+ // [textView insertText:replacementString replacementRange:NSMakeRange(switchContentRange.location + switchContentRange.length, 0)];
178+ // closingBracketLocation += replacementString.length;
179+ // }
180+
180181 // Re-indent everything
181182 NSRange reindentRange = NSMakeRange (openingBracketLocation, closingBracketLocation - openingBracketLocation + 2 );
182183 [textView _indentInsertedTextIfNecessaryAtRange: reindentRange];
You can’t perform that action at this time.
0 commit comments