mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ upd: Scintilla current version
This commit is contained in:
parent
2d00787b8c
commit
e2f5e07266
@ -556,6 +556,27 @@
|
||||
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="https://www.scintilla.org/scite421.zip">Release 4.2.1</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Released 5 July 2019.
|
||||
</li>
|
||||
<li>
|
||||
SciTE enables use of SCI_ commands in user.context.menu.
|
||||
</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 />
|
||||
Position candidate window closer to composition text.<br />
|
||||
Stop candidate window moving while typing.<br />
|
||||
Align candidate window to target part of composition text.<br />
|
||||
Stop Google IME on Windows 7 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>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="https://www.scintilla.org/scite420.zip">Release 4.2.0</a>
|
||||
</h3>
|
||||
|
||||
@ -1063,11 +1063,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<LONG>(pos.x);
|
||||
CandForm.ptCurrentPos.y = static_cast<LONG>(pos.y + vs.lineHeight);
|
||||
CandForm.ptCurrentPos.y = static_cast<int>(pos.y + std::max(4, vs.lineHeight/4));
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
@ -1217,8 +1223,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());
|
||||
@ -1242,6 +1252,11 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) {
|
||||
|
||||
MoveImeCarets(-CurrentPosition() + imeCaretPosDoc);
|
||||
|
||||
if (std::find(imeIndicator.begin(), imeIndicator.end(), SC_INDICATOR_TARGET) != imeIndicator.end()) {
|
||||
// set candidate window left aligned to beginning of target string.
|
||||
SetCandidateWindowPos();
|
||||
}
|
||||
|
||||
if (KoreanIME()) {
|
||||
view.imeCaretBlockOverride = true;
|
||||
}
|
||||
@ -1249,7 +1264,6 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) {
|
||||
AddWString(imc.GetCompositionString(GCS_RESULTSTR), CharacterSource::imeResult);
|
||||
}
|
||||
EnsureCaretVisible();
|
||||
SetCandidateWindowPos();
|
||||
ShowCaretAtCurrentPosition();
|
||||
return 0;
|
||||
}
|
||||
@ -2032,6 +2046,11 @@ void ScintillaWin::NotifyCaretMove() noexcept {
|
||||
|
||||
void ScintillaWin::UpdateSystemCaret() {
|
||||
if (hasFocus) {
|
||||
if (pdoc->TentativeActive()) {
|
||||
// ongoing inline mode IME composition, don't inform IME of system caret position.
|
||||
// fix candidate window for Google Japanese IME moved on typing on Win7.
|
||||
return;
|
||||
}
|
||||
if (HasCaretSizeChanged()) {
|
||||
DestroySystemCaret();
|
||||
CreateSystemCaret();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user