From ec7244be5ceb336e1a7abb90a943f9cbd74b5af5 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 6 Dec 2014 09:13:12 +1100 Subject: Prevent overlapping text with calltip. From Mitchell Foral. --- src/ScintillaBase.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index f9d70ce53..43284f177 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -449,12 +449,12 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) { PRectangle rcClient = GetClientRectangle(); int offset = vs.lineHeight + static_cast(rc.Height()); // adjust so it displays above the text. - if (rc.bottom > rcClient.bottom) { + if (rc.bottom > rcClient.bottom && rc.Height() < rcClient.Height()) { rc.top -= offset; rc.bottom -= offset; } // adjust so it displays below the text. - if (rc.top < rcClient.top) { + if (rc.top < rcClient.top && rc.Height() < rcClient.Height()) { rc.top += offset; rc.bottom += offset; } -- cgit v1.2.3