aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2004-10-24 01:50:09 +0000
committernyamatongwe <unknown>2004-10-24 01:50:09 +0000
commite8e0cb9f31ed9469bcda51282851c391a6688152 (patch)
tree359f24e5c2c86c8a5bd496f315b6df2cb4ece788 /src
parentb4681b9f58c3e54331b53c75c6a3923d13f65e83 (diff)
downloadscintilla-mirror-e8e0cb9f31ed9469bcda51282851c391a6688152.tar.gz
Patch from Stephan Deibel to handle autocompletion for words
longer than 1000 characters.
Diffstat (limited to 'src')
-rw-r--r--src/ScintillaBase.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index e67c03ac5..1d3867b7f 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -280,9 +280,9 @@ void ScintillaBase::AutoCompleteMoveToCurrentWord() {
char wordCurrent[1000];
int i;
int startWord = ac.posStart - ac.startLen;
- for (i = startWord; i < currentPos; i++)
+ for (i = startWord; i < currentPos && i - startWord < 1000; i++)
wordCurrent[i - startWord] = pdoc->CharAt(i);
- wordCurrent[i - startWord] = '\0';
+ wordCurrent[Platform::Minimum(i - startWord, 999)] = '\0';
ac.Select(wordCurrent);
}