fix GUI I/O when Return is typed in the middle of the editor (merge into 4.1.4)

svn: r13211
This commit is contained in:
Matthew Flatt 2009-01-19 03:25:56 +00:00
parent 751dc50c24
commit 30b37f0cec

View File

@ -2466,10 +2466,12 @@ static Bool RecordInput(void *m, wxEvent *event, void *data)
media->Insert("\n");
start = media->GetStartPosition();
len = start - ioFrame->endpos;
s = media->GetTextUTF8(ioFrame->endpos, start);
ioFrame->endpos = start;
scheme_write_byte_string(s, len, stdin_pipe);
if (len > 0) {
s = media->GetTextUTF8(ioFrame->endpos, start);
ioFrame->endpos = start;
scheme_write_byte_string(s, len, stdin_pipe);
}
return TRUE;
}