diff options
author | nyamatongwe <devnull@localhost> | 2003-10-01 11:30:16 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2003-10-01 11:30:16 +0000 |
commit | 0529eb9c710b6c396da8dbd0c29417485927768a (patch) | |
tree | 0d3b9159780889bd96169650c82f755916ecf4ac /src | |
parent | e098d9e7420a8deec3db17df31d9d7bb4dbcf22b (diff) | |
download | scintilla-mirror-0529eb9c710b6c396da8dbd0c29417485927768a.tar.gz |
Remove image index for choose single.
Diffstat (limited to 'src')
-rw-r--r-- | src/ScintillaBase.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 039539ad3..ed391c846 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -198,16 +198,18 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { if (ac.chooseSingle && (listType == 0)) { if (list && !strchr(list, ac.GetSeparator())) { + const char *typeSep = strchr(list, ac.GetTypesep()); + size_t lenInsert = (typeSep) ? (typeSep-list) : strlen(list); if (ac.ignoreCase) { SetEmptySelection(currentPos - lenEntered); pdoc->DeleteChars(currentPos, lenEntered); SetEmptySelection(currentPos); - pdoc->InsertString(currentPos, list); - SetEmptySelection(currentPos + static_cast<int>(strlen(list))); + pdoc->InsertString(currentPos, list, lenInsert); + SetEmptySelection(currentPos + lenInsert); } else { SetEmptySelection(currentPos); - pdoc->InsertString(currentPos, list + lenEntered); - SetEmptySelection(currentPos + static_cast<int>(strlen(list + lenEntered))); + pdoc->InsertString(currentPos, list + lenEntered, lenInsert - lenEntered); + SetEmptySelection(currentPos + lenInsert - lenEntered); } return; } |