Commit 43cd4e54 authored by Jjgod Jiang's avatar Jjgod Jiang

Fix for deleting the last uncommit character

parent 819cc951
......@@ -144,6 +144,8 @@
{
[_markedText release];
_markedText = nil;
SDL_SendEditingText("", 0, 0);
}
- (NSRect) firstRectForCharacterRange: (NSRange) theRange
......
......@@ -136,11 +136,13 @@ static void RenderText(SDL_Surface *sur,
int x, int y,
SDL_Color color)
{
if (text && strlen(text)) {
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_FreeSurface(textSur);
}
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment