Browse Source

Do approximate matching for prototype hints against the last known identifier if the identifier to match comes after it in alphabetical order.

git-svn-id: file:///var/svn/tigccpp/trunk@1082 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 17 years ago
parent
commit
acaf7487b2
1 changed files with 9 additions and 2 deletions
  1. 9 2
      tigcc/ide/CodeCompletion/CompletionForm.pas

+ 9 - 2
tigcc/ide/CodeCompletion/CompletionForm.pas

@@ -3,7 +3,7 @@
 
   Copyright (C) 2004 Fréderic Bour
   Copyright (C) 2004 Sebastian Reichelt
-  Copyright (C) 2006 Kevin Kofler
+  Copyright (C) 2006-2007 Kevin Kofler
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -329,7 +329,7 @@ begin
 		// Find Symbol
 		if List.Find(Symbol, i) then
 			T := ''
-		else if (i >= 0) and (i < List.Count) then
+		else if (i >= 0) and (i <= List.Count) then
 		begin
 			if i = 0 then
 			begin
@@ -338,6 +338,13 @@ begin
 				else
 					Exit;
 			end
+			else if i = List.Count then
+			begin
+				if Similar(Symbol, List[i - 1]) then
+					T := List[i - 1] + ' ?'#13#10
+				else
+					Exit;
+			end
 			else
 			begin
 				if SimilarityDistance(Symbol, List[i - 1]) < SimilarityDistance(Symbol, List[i]) then