Fix for deleting the last uncommit character
This commit is contained in:
parent
819cc95139
commit
43cd4e54ac
2 changed files with 8 additions and 4 deletions
|
@ -144,6 +144,8 @@
|
||||||
{
|
{
|
||||||
[_markedText release];
|
[_markedText release];
|
||||||
_markedText = nil;
|
_markedText = nil;
|
||||||
|
|
||||||
|
SDL_SendEditingText("", 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSRect) firstRectForCharacterRange: (NSRange) theRange
|
- (NSRect) firstRectForCharacterRange: (NSRange) theRange
|
||||||
|
|
|
@ -136,11 +136,13 @@ static void RenderText(SDL_Surface *sur,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
SDL_Color color)
|
SDL_Color color)
|
||||||
{
|
{
|
||||||
SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, text, color);
|
if (text && strlen(text)) {
|
||||||
SDL_Rect dest = { x, y, textSur->w, textSur->h };
|
SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, text, color);
|
||||||
|
SDL_Rect dest = { x, y, textSur->w, textSur->h };
|
||||||
|
|
||||||
SDL_BlitSurface(textSur, NULL, sur, &dest);
|
SDL_BlitSurface(textSur, NULL, sur, &dest);
|
||||||
SDL_FreeSurface(textSur);
|
SDL_FreeSurface(textSur);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue