Do I need to call SetSel?
Andrew Truckle <[email protected]> Mon, 20 Jan 2025 02:28:43 -0800 (PST)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
I am using OnAutoCCompleted to detect that the user has selected <!-- from
the drop list. Then, I add the trailing --> and adjust the caret position:
if (strSelectedText == L"!--") {
// Get the current caret position
const auto currentPos = m_edit.GetCurrentPos();
// Insert the closing part -->
m_edit.InsertText(currentPos, L"-->");
// Move the caret between <!-- and -->
m_edit.SetCurrentPos(currentPos);
m_edit.SetSel(currentPos, currentPos); // Clear selection to place caret
}
Is it obligatory that I need to call SetSel?
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/ec428705-227e-46cd-a175-5174ad62464fn%40googlegroups.com.