added a parameter to _BTextGapBuffer_::GetString() so that the caller knows how many bytes are really returned. password mode looks better now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18965 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-09-28 12:27:31 +00:00
parent e0091c79d8
commit 25ba188a07
3 changed files with 27 additions and 26 deletions
+3 -5
View File
@@ -3661,11 +3661,9 @@ BTextView::DrawLines(int32 startLine, int32 endLine, int32 startOffset, bool era
view->PopState();
}
const char *string = fText->GetString(offset, tabChars);
// TODO: GetString() could return less or more bytes than requested
// Improve the backend api so it's more robust and pass back the returned
// bytes
view->DrawString(string, tabChars);
int32 returnedBytes = 0;
const char *string = fText->GetString(offset, tabChars, &returnedBytes);
view->DrawString(string, returnedBytes);
if (foundTab) {
float penPos = PenLocation().x - fTextRect.left;