Re: SynEdit AutoCompete, prepare ItemList before Execute
Original Reporter info from Mantis: zaher
-
Reporter name: Zaher Dirkey
Original Reporter info from Mantis: zaher
- Reporter name: Zaher Dirkey
Description:
TSynBaseCompletion.Execute procedure(s: string; x, y: integer), Lines 1397 In file
components\synedit\syncompletion.pas
CurrentString := s;
if Assigned(OnExecute) then
OnExecute(Self);
CurrentString is sets before OnExecute, while we need to refill ItemList on OnExecute, that makes it lost the position of current item.
http://forum.lazarus.freepascal.org/index.php?topic=34850
Steps to reproduce:
open example
lazarus\examples\SynEdit\Completion\
Run program, remove all checks, go to "co" word and press ctrl+space, first time it will show wrong position in item list.
Additional information:
Patch for my solution attached
By adding SetInternalCurrentString method
SetInternalCurrentString(s);
if Assigned(OnExecute) then
OnExecute(Self);
CurrentString := s;
Mantis conversion info:
- Mantis ID: 30965
- Monitored by: » zaher (Zaher Dirkey)