mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:00:48 +00:00
(_insertionPointRectForCharacterIndex:textContainer:): Use
default font height for insertion point height if there is no characters. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24571 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
65f76b0d62
commit
91dc3d9b17
1 changed files with 3 additions and 3 deletions
|
@ -808,12 +808,12 @@ has the same y origin and height as the line frag rect it is in.
|
||||||
}
|
}
|
||||||
glyph_index = [self numberOfGlyphs] - 1;
|
glyph_index = [self numberOfGlyphs] - 1;
|
||||||
if (glyph_index == (unsigned int)-1)
|
if (glyph_index == (unsigned int)-1)
|
||||||
{
|
{ /* No information is available. Get default font height. */
|
||||||
/* No information is available. The best we can do is guess. */
|
NSFont *f = [_typingAttributes objectForKey:NSFontAttributeName];
|
||||||
|
|
||||||
/* will be -1 if there are no text containers */
|
/* will be -1 if there are no text containers */
|
||||||
*textContainer = num_textcontainers - 1;
|
*textContainer = num_textcontainers - 1;
|
||||||
return NSMakeRect(1, 1, 1, 15);
|
return NSMakeRect(0, 0, 1, [f boundingRectForFont].size.height);
|
||||||
}
|
}
|
||||||
fraction_through = 1.0;
|
fraction_through = 1.0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue