From 5d2ed951076535f28ba68fbb9968dad911fffaa5 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Jul 2019 15:29:06 +1000 Subject: Backport: Bug [#2120]. Avoid candidate window obscuring text when near bottom of screen. Feature [feature-requests:#1300] part 1. Backport of changeset 7683:b99264d451e3. --- doc/ScintillaHistory.html | 14 ++++++++++++++ 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 @@ -545,6 +545,20 @@ Icons Copyright(C) 1998 by Dean S. Jones
+

+ Release 3.11.1 +

+

Release 3.11.0

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(pos.x); CandForm.ptCurrentPos.y = static_cast(pos.y + vs.lineHeight); + // Exclude the area of the whole caret line + CandForm.rcArea.top = static_cast(pos.y); + CandForm.rcArea.bottom = static_cast(pos.y + vs.lineHeight); + CandForm.rcArea.left = static_cast(rcClient.left); + CandForm.rcArea.right = static_cast(rcClient.right); ::ImmSetCandidateWindow(imc.hIMC, &CandForm); } } -- cgit v1.2.3