diff options
author | Neil <nyamatongwe@gmail.com> | 2014-12-06 09:13:12 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-12-06 09:13:12 +1100 |
commit | bdc2c5dc5eb46760ccb22cae5a79484cde56487e (patch) | |
tree | a82218e9b10900c0b0f9128e8491609342da0a9e /src/ScintillaBase.cxx | |
parent | 9a715703f3957993d96cd9ac12d316f841cfede8 (diff) | |
download | scintilla-mirror-bdc2c5dc5eb46760ccb22cae5a79484cde56487e.tar.gz |
Prevent overlapping text with calltip.
From Mitchell Foral.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 4 |
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; } |