diff --git a/src/apps/terminal/BasicTerminalBuffer.cpp b/src/apps/terminal/BasicTerminalBuffer.cpp index 0969f1f12c..e54bc4bdc1 100644 --- a/src/apps/terminal/BasicTerminalBuffer.cpp +++ b/src/apps/terminal/BasicTerminalBuffer.cpp @@ -510,8 +510,8 @@ BasicTerminalBuffer::Find(const char* _pattern, const TermPos& start, // check word match if (matchWord) { TermPos tempPos(matchStart); - if (_PreviousChar(tempPos, c) && !c.IsSpace() - || _NextChar(tempPos = matchEnd, c) && !c.IsSpace()) { + if ((_PreviousChar(tempPos, c) && !c.IsSpace()) + || (_NextChar(tempPos = matchEnd, c) && !c.IsSpace())) { //debug_printf(" but no word match!\n"); continue; } @@ -1079,8 +1079,8 @@ BasicTerminalBuffer::_ResizeRewrap(int32 width, int32 height, if (fCursor.y + historySize == sourceIndex && fCursor.x >= sourceX && (fCursor.x < sourceX + toCopy - || destLeft >= sourceLeft - && sourceX + sourceLeft <= fCursor.x)) { + || (destLeft >= sourceLeft + && sourceX + sourceLeft <= fCursor.x))) { cursor.x = destLine->length + fCursor.x - sourceX; cursor.y = destTotalLines; diff --git a/src/apps/terminal/TermPos.h b/src/apps/terminal/TermPos.h index 505d9332b9..e2bc18c6ed 100644 --- a/src/apps/terminal/TermPos.h +++ b/src/apps/terminal/TermPos.h @@ -35,7 +35,7 @@ public: inline bool operator<=(const TermPos& other) const { - return y < other.y || y == other.y && x <= other.x; + return y < other.y || (y == other.y && x <= other.x); } inline bool operator>=(const TermPos& other) const diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index 9c4cb39229..c8e7a60861 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -1341,7 +1341,7 @@ void TermView::MessageReceived(BMessage *msg) { entry_ref ref; - char *ctrl_l = "\x0c"; + const char *ctrl_l = "\x0c"; // first check for any dropped message if (msg->WasDropped()) {