From 1d772be5dea42ff8cd8632806589bbc92effec35 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 3 Jul 2009 06:36:25 +0000 Subject: Use screen point for caret that includes virtual spcace so that, for example, the IME appears near the caret when the caret is in virtual space. Changed LocationFromPosition to work on a SelectionPosition and added convenience method for finding screen point of main caret. --- src/ScintillaBase.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ScintillaBase.cxx') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index b47986ff0..0a8912c7b 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -226,7 +226,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { return; } } - ac.Start(wMain, idAutoComplete, sel.MainCaret(), LocationFromPosition(sel.MainCaret()), + ac.Start(wMain, idAutoComplete, sel.MainCaret(), PointMainCaret(), lenEntered, vs.lineHeight, IsUnicodeMode()); PRectangle rcClient = GetClientRectangle(); @@ -240,7 +240,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { if (pt.x >= rcClient.right - widthLB) { HorizontalScrollTo(xOffset + pt.x - rcClient.right + widthLB); Redraw(); - pt = LocationFromPosition(sel.MainCaret()); + pt = PointMainCaret(); } PRectangle rcac; rcac.left = pt.x - ac.lb->CaretFromEdge(); -- cgit v1.2.3