Fix more drawing problems in terminal, and remove an useless variable.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38424 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2010-08-29 10:43:54 +00:00
parent 1216557e1b
commit 9b46a2b25d

View File

@ -1354,10 +1354,8 @@ TermView::Draw(BRect updateRect)
if (k < 0)
k = 0;
int32 terminalEnd = (int)updateRect.right / fFontWidth;
// physical limit of the terminal
for (int32 i = k; i < terminalEnd;) {
int32 lastColumn = terminalEnd;
for (int32 i = k; i <= x2;) {
int32 lastColumn = x2;
bool insideSelection = _CheckSelectedRegion(j, i, lastColumn);
// This will clip lastColumn to the selection start or end
// to ensure the selection is not drawn at the same time as
@ -1384,7 +1382,7 @@ TermView::Draw(BRect updateRect)
// guess the color for this line from the last char
// that was drawn in it.
int t = 1;
while (count == 0 && i - t > 0) {
while (count == 0 && i - t >= 0) {
count = fVisibleTextBuffer->GetString(
j - firstVisible,
i - t, lastColumn, buf, attr);