mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-21 19:01:18 +00:00
Fix indentation issues.
This commit is contained in:
parent
b5b4a5632a
commit
e0458a60e9
1 changed files with 12 additions and 1 deletions
|
@ -123,6 +123,7 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
|||
|
||||
- (void)insertSpaceFillAlignedAtTabsOfSize:(unsigned int)tabSize;
|
||||
- (void)performIndentation;
|
||||
- (void)refreshHighlighting;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -328,6 +329,7 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
|||
{
|
||||
offset -= 2;
|
||||
}
|
||||
|
||||
|
||||
// Get offset from BOL of previous line
|
||||
// offset = ComputeIndentingOffset([self string], line_start-1);
|
||||
|
@ -358,6 +360,15 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
|||
[indentString release];
|
||||
}
|
||||
|
||||
- (void) refreshHighlighting
|
||||
{
|
||||
NSString *str = [self string];
|
||||
NSRange wsRange = NSMakeRange(0, [str length]);
|
||||
[[self textStorage]
|
||||
replaceCharactersInRange: wsRange
|
||||
withString: str];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCEditorView
|
||||
|
@ -580,9 +591,9 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
|||
[self insertSpaceFillAlignedAtTabsOfSize: tabSize];
|
||||
[super insertText: @"{"];
|
||||
[super insertText: @"\n"];
|
||||
[super insertText: @"\n"];
|
||||
[self insertSpaceFillAlignedAtTabsOfSize: tabSize];
|
||||
[super insertText: @"}"];
|
||||
[self refreshHighlighting];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue