aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjohnsonj <unknown>2019-07-17 15:37:49 +1000
committerjohnsonj <unknown>2019-07-17 15:37:49 +1000
commit1b6a730a1879de901b909ce2fbe5a3073b4144ad (patch)
tree37135626d6e859f42845277708445238aadd13e4
parent6634e57bbd6ffeca2630e186582e01e34bf1c1ae (diff)
downloadscintilla-mirror-1b6a730a1879de901b909ce2fbe5a3073b4144ad.tar.gz
Backport: Feature [feature-requests:#1300] part 3. Stop candidate window moving while
typing. Backport of changeset 7685:f03dcfdb449b.
-rw-r--r--doc/ScintillaHistory.html1
-rw-r--r--win32/ScintillaWin.cxx7
2 files changed, 6 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 284208b0e..e299e9c7a 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -556,6 +556,7 @@
On Win32, stop the IME candidate window moving unnecessarily and position it better.<br />
Stop candidate window overlapping composition text and taskbar.<br />
Position candidate window closer to composition text.<br />
+ Stop candidate window moving while typing.<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>
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index ace53f933..b70934a80 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1104,8 +1104,12 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) {
return 0;
}
- if (initialCompose)
+ if (initialCompose) {
ClearBeforeTentativeStart();
+ }
+
+ // Set candidate window left aligned to beginning of preedit string.
+ SetCandidateWindowPos();
pdoc->TentativeStart(); // TentativeActive from now on.
std::vector<int> imeIndicator = MapImeIndicators(imc.GetImeAttributes());
@@ -1135,7 +1139,6 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) {
AddWString(imc.GetCompositionString(GCS_RESULTSTR), CharacterSource::imeResult);
}
EnsureCaretVisible();
- SetCandidateWindowPos();
ShowCaretAtCurrentPosition();
return 0;
}