mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-22 11:21:29 +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)insertSpaceFillAlignedAtTabsOfSize:(unsigned int)tabSize;
|
||||||
- (void)performIndentation;
|
- (void)performIndentation;
|
||||||
|
- (void)refreshHighlighting;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -328,6 +329,7 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
||||||
{
|
{
|
||||||
offset -= 2;
|
offset -= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get offset from BOL of previous line
|
// Get offset from BOL of previous line
|
||||||
// offset = ComputeIndentingOffset([self string], line_start-1);
|
// offset = ComputeIndentingOffset([self string], line_start-1);
|
||||||
|
@ -358,6 +360,15 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
||||||
[indentString release];
|
[indentString release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) refreshHighlighting
|
||||||
|
{
|
||||||
|
NSString *str = [self string];
|
||||||
|
NSRange wsRange = NSMakeRange(0, [str length]);
|
||||||
|
[[self textStorage]
|
||||||
|
replaceCharactersInRange: wsRange
|
||||||
|
withString: str];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation PCEditorView
|
@implementation PCEditorView
|
||||||
|
@ -580,9 +591,9 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
||||||
[self insertSpaceFillAlignedAtTabsOfSize: tabSize];
|
[self insertSpaceFillAlignedAtTabsOfSize: tabSize];
|
||||||
[super insertText: @"{"];
|
[super insertText: @"{"];
|
||||||
[super insertText: @"\n"];
|
[super insertText: @"\n"];
|
||||||
[super insertText: @"\n"];
|
|
||||||
[self insertSpaceFillAlignedAtTabsOfSize: tabSize];
|
[self insertSpaceFillAlignedAtTabsOfSize: tabSize];
|
||||||
[super insertText: @"}"];
|
[super insertText: @"}"];
|
||||||
|
[self refreshHighlighting];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue