SynCompletion: Fixed exception on empty list

git-svn-id: trunk@28016 -
This commit is contained in:
martin 2010-11-01 01:05:24 +00:00
parent b344e702ad
commit ff529fcb58

View File

@ -758,7 +758,7 @@ begin
Scroll.Enabled := ItemList.Count > NbLinesInWindow;
Scroll.Visible := (ItemList.Count > NbLinesInWindow) or ShowSizeDrag;
if Scroll.Visible then
if Scroll.Visible and Scroll.Enabled then
begin
Scroll.Max := ItemList.Count - 1;
Scroll.LargeChange := NbLinesInWindow;
@ -766,7 +766,7 @@ begin
end
else
begin
Scroll.PageSize := 0;
Scroll.PageSize := 1;
Scroll.Max := 0;
end;