aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 748560a10..c1b330e61 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1113,8 +1113,7 @@ void ScintillaWin::MoveImeCarets(Sci::Position offset) noexcept {
// Move carets relatively by bytes.
for (size_t r=0; r<sel.Count(); r++) {
const Sci::Position positionInsert = sel.Range(r).Start().Position();
- sel.Range(r).caret.SetPosition(positionInsert + offset);
- sel.Range(r).anchor.SetPosition(positionInsert + offset);
+ sel.Range(r) = SelectionRange(positionInsert + offset);
}
}
@@ -3172,8 +3171,7 @@ LRESULT ScintillaWin::ImeOnReconvert(LPARAM lParam) {
const Sci::Position docCompStart = rBase + adjust;
if (inOverstrike) { // the docCompLen of bytes will be overstriked.
- sel.Range(r).caret.SetPosition(docCompStart);
- sel.Range(r).anchor.SetPosition(docCompStart);
+ sel.Range(r) = SelectionRange(docCompStart);
} else {
// Ensure docCompStart+docCompLen be not beyond lineEnd.
// since docCompLen by byte might break eol.