diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-07-17 15:29:06 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-07-17 15:29:06 +1000 |
| commit | 5d2ed951076535f28ba68fbb9968dad911fffaa5 (patch) | |
| tree | 6bad0b61bdb3419c1e8d2c6a480db18324a2e9cf | |
| parent | 91d2e95542ee6a908b0adf46d420c1696ae31a9d (diff) | |
| download | scintilla-mirror-5d2ed951076535f28ba68fbb9968dad911fffaa5.tar.gz | |
Backport: Bug [#2120]. Avoid candidate window obscuring text when near bottom of screen.
Feature [feature-requests:#1300] part 1.
Backport of changeset 7683:b99264d451e3.
| -rw-r--r-- | doc/ScintillaHistory.html | 14 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 10 |
2 files changed, 22 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 81134127c..0cfde5bc8 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -546,6 +546,20 @@ </li> </ul> <h3> + <a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.11.1/scintilla3111.zip/download">Release 3.11.1</a> + </h3> + <ul> + <li> + Released 30 Aug 2019. + </li> + <li> + On Win32, stop the IME candidate window moving unnecessarily and position it better.<br /> + Stop candidate window overlapping composition text and taskbar.<br /> + <a href="https://sourceforge.net/p/scintilla/bugs/2120/">Bug #2120</a>. + <a href="https://sourceforge.net/p/scintilla/feature-requests/1300/">Feature #1300</a>. + </li> + </ul> + <h3> <a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.11.0/scintilla3110.zip/download">Release 3.11.0</a> </h3> <ul> diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index ebfe89ad4..232d00442 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -943,11 +943,17 @@ void ScintillaWin::SetCandidateWindowPos() { IMContext imc(MainHWND()); if (imc.hIMC) { const Point pos = PointMainCaret(); - CANDIDATEFORM CandForm; + const PRectangle rcClient = GetTextRectangle(); + CANDIDATEFORM CandForm{}; CandForm.dwIndex = 0; - CandForm.dwStyle = CFS_CANDIDATEPOS; + CandForm.dwStyle = CFS_EXCLUDE; CandForm.ptCurrentPos.x = static_cast<int>(pos.x); CandForm.ptCurrentPos.y = static_cast<int>(pos.y + vs.lineHeight); + // Exclude the area of the whole caret line + CandForm.rcArea.top = static_cast<int>(pos.y); + CandForm.rcArea.bottom = static_cast<int>(pos.y + vs.lineHeight); + CandForm.rcArea.left = static_cast<int>(rcClient.left); + CandForm.rcArea.right = static_cast<int>(rcClient.right); ::ImmSetCandidateWindow(imc.hIMC, &CandForm); } } |
