diff options
author | nyamatongwe <unknown> | 2003-10-01 11:30:16 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-10-01 11:30:16 +0000 |
commit | 46e5bc7b4a5a7176701c84d44687254a70395d67 (patch) | |
tree | 0d3b9159780889bd96169650c82f755916ecf4ac /src | |
parent | 3d3795bb0e3a9a7de8113a0354396f7b944730c4 (diff) | |
download | scintilla-mirror-46e5bc7b4a5a7176701c84d44687254a70395d67.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; } |