diff options
author | nyamatongwe <devnull@localhost> | 2000-04-10 13:52:17 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2000-04-10 13:52:17 +0000 |
commit | 0deaa9b95af06c01fa0e6714ad73b41ed22ae5c7 (patch) | |
tree | b8af678dd9e189e517668330c92aeab3ff5f0115 /src/AutoComplete.cxx | |
parent | dba48e020c0a68a84f4f5f11d5600bba90598da3 (diff) | |
download | scintilla-mirror-0deaa9b95af06c01fa0e6714ad73b41ed22ae5c7.tar.gz |
Added get/set of separator character used when setting auto-completion list.
Message for selecting an element of the autocompletion list.
Diffstat (limited to 'src/AutoComplete.cxx')
-rw-r--r-- | src/AutoComplete.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index c3ec29c3c..75e26fe28 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -15,6 +15,7 @@ AutoComplete::AutoComplete() { active = false; posStart = 0; strcpy(stopChars, ""); + separator = ' '; } AutoComplete::~AutoComplete() { @@ -44,6 +45,14 @@ bool AutoComplete::IsStopChar(char ch) { return ch && strchr(stopChars, ch); } +void AutoComplete::SetSeparator(char separator_) { + separator = separator_; +} + +char AutoComplete::GetSeparator() { + return separator; +} + int AutoComplete::SetList(const char *list) { int maxStrLen = 12; lb.Clear(); @@ -53,7 +62,7 @@ int AutoComplete::SetList(const char *list) { char *startword = words; int i = 0; for (; words && words[i]; i++) { - if (words[i] == ' ') { + if (words[i] == separator) { words[i] = '\0'; lb.Append(startword); maxStrLen = Platform::Maximum(maxStrLen, strlen(startword)); |