aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-12-06 09:13:12 +1100
committerNeil <nyamatongwe@gmail.com>2014-12-06 09:13:12 +1100
commitec7244be5ceb336e1a7abb90a943f9cbd74b5af5 (patch)
tree8e30f5583a73c6be260ec35b754fac11307153fd /src/ScintillaBase.cxx
parent7bf090a49ac35fd92c22b6a6409d08d8b7a08554 (diff)
downloadscintilla-mirror-ec7244be5ceb336e1a7abb90a943f9cbd74b5af5.tar.gz
Prevent overlapping text with calltip.
From Mitchell Foral.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r--src/ScintillaBase.cxx4
1 files changed, 2 insertions, 2 deletions
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<int>(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;
}