From ae1701df0b25a38157c2adaca91b090aebbbcc3c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 24 Oct 2004 01:50:09 +0000 Subject: Patch from Stephan Deibel to handle autocompletion for words longer than 1000 characters. --- src/ScintillaBase.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3