Fix Terminal build.

This commit is contained in:
Rene Gollent
2013-05-10 23:21:51 -04:00
parent 09cbc86d0d
commit 7de99f8341
3 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -485,7 +485,7 @@ TermView::_LineOffset(int32 index)
// convert view coordinates to terminal text buffer position // convert view coordinates to terminal text buffer position
inline TermPos TermPos
TermView::_ConvertToTerminal(const BPoint &p) TermView::_ConvertToTerminal(const BPoint &p)
{ {
return TermPos(p.x >= 0 ? (int32)p.x / fFontWidth : -1, _LineAt(p.y)); return TermPos(p.x >= 0 ? (int32)p.x / fFontWidth : -1, _LineAt(p.y));
@@ -2626,14 +2626,14 @@ TermView::_CheckHighlightRegion(int32 row, int32 firstColumn,
} }
continue; continue;
} }
if (row == highlight->End().y && firstColumn < highlight->End().x if (row == highlight->End().y && firstColumn < highlight->End().x
&& lastColumn >= highlight->End().x) { && lastColumn >= highlight->End().x) {
// region starts in the highlight, but exceeds the end // region starts in the highlight, but exceeds the end
lastColumn = highlight->End().x - 1; lastColumn = highlight->End().x - 1;
return highlight; return highlight;
} }
TermPos pos(firstColumn, row); TermPos pos(firstColumn, row);
if (highlight->RangeContains(pos)) if (highlight->RangeContains(pos))
return highlight; return highlight;
+1 -1
View File
@@ -176,7 +176,7 @@ private:
// point and text offset conversion // point and text offset conversion
inline int32 _LineAt(float y); inline int32 _LineAt(float y);
inline float _LineOffset(int32 index); inline float _LineOffset(int32 index);
inline TermPos _ConvertToTerminal(const BPoint& point); TermPos _ConvertToTerminal(const BPoint& point);
inline BPoint _ConvertFromTerminal(const TermPos& pos); inline BPoint _ConvertFromTerminal(const TermPos& pos);
inline void _InvalidateTextRect(int32 x1, int32 y1, inline void _InvalidateTextRect(int32 x1, int32 y1,
+1
View File
@@ -17,6 +17,7 @@
#include "TermViewStates.h" #include "TermViewStates.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <Catalog.h> #include <Catalog.h>