[REG,SYNEDIT] TSynCompletion problem dut to use of highlighter property IdentChars
Original Reporter info from Mantis: BBaz @basile.b
-
Reporter name:
Original Reporter info from Mantis: BBaz @basile.b
- Reporter name:
Description:
The following commit:
https://github.com/alrieckert/lazarus/commit/ed747e55fb894735ca2e8c33731d580b7d5f7e69
Changed 'TSynCompletion' so that if the current editor has an highlither, its 'IdentChars' property is used to lex the previous word.
This patch seemed OK with Laz IDE but actually it breaks any code editor made with synedit because by default 'IdentChars' returns all characters from the ansi charset expected the whites.
The consequence is that on completion, all the previous text can be replaced, instead of the last identifier. This happens if the current highlighter IdentChars getter function is overriden or not.
More detailed report then analysis of the issue:
- http://forum.lazarus.freepascal.org/index.php/topic,30663.msg196451.html#msg196451
- http://forum.lazarus.freepascal.org/index.php/topic,30663.msg196486.html#msg196486
As suggested in the forum I propose to change the default implementation of the IdentChars getter.