mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 06:31:31 +00:00
Fix range to use characters and not glyphs, sicne highlighting is based on chars.
This commit is contained in:
parent
8b48d77cbb
commit
75785db7e4
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-04-16 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Modules/Editors/ProjectCenter/PCEditorView.m:(drawRect:)
|
||||
Fix range to use characters and not glyphs, sicne highlighting is based on chars.
|
||||
|
||||
2020-03-24 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Framework/PCProjectLauncher.m
|
||||
|
|
|
@ -455,12 +455,14 @@ static int ComputeIndentingOffset(NSString * string, unsigned int start)
|
|||
|
||||
- (void)drawRect:(NSRect)r
|
||||
{
|
||||
NSRange drawnRange;
|
||||
|
||||
if (highlighter)
|
||||
{
|
||||
NSRange drawnRange;
|
||||
|
||||
drawnRange = [[self layoutManager]
|
||||
glyphRangeForBoundingRect:r inTextContainer:[self textContainer]];
|
||||
drawnRange = [[self layoutManager] characterRangeForGlyphRange:drawnRange
|
||||
actualGlyphRange:NULL];
|
||||
[highlighter highlightRange:drawnRange];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue