Added ctrl-e

This commit is contained in:
Rob Pearce 2009-07-28 01:31:55 +00:00
parent 6da969e0c7
commit f322115aa5
1 changed files with 4 additions and 1 deletions

View File

@ -1703,6 +1703,10 @@ int main (int argc, char **argv) {
// go to start of text
textpos = text;
updatetextcursor();
} else if ((c2 == 'e') && (mod & KMOD_CTRL)) {
// go to end of text
textpos = &text[strlen(text)];
updatetextcursor();
} else if ((c >= FIRSTLET) && (c <= LASTLET)) {
// add onto end of text
char temptext[2];
@ -9043,7 +9047,6 @@ int updatetextcursor(void) {
sprintf(tempbuf, text);
tempbuf[len] = '\0';
printf("len is %d, tempbuf is [%s]\n",len, tempbuf);
TTF_SizeText(font[updateheight], tempbuf, &sw, &sh);
// find width of next char