Code completion will intermingle code completion with following, non-selected characters if no blank
Bug description Code completion will complete with completion characters intermixed with following, non-selected characters if there is no blank before the existing characters.
To Reproduce Steps to reproduce the behavior:
-
In a virgin image, open a source editor or a playground, highlight some text with a non-blank character immediately trailing the selection.
-
Start typing new characters replacing the old characters until a code completion pop-up appears.
-
Choose the first code completion option.
-
Result is intermingled text
Expected behavior Code completion behavior should not intermingle the code completion and the existing characters.
Screenshots See above
Version information:
Pharo 11.0.0 Build information: Pharo-11.0.0+build.714.sha.0ead11d0b8573ff685db8a39fceeca2a8d528d3e (64 Bit)
Expected development cost
- It may be worth searching open code completion issues for a duplicate. I searched but couldn't find an exact match.
- Costs include duplicated effort retyping code often for the user.
- Other costs unknown.
Additional context
Code completion is pretty handy, but this bug slows down development.
NECPreferences spaceAfterCompletion = true in the above example
There seem to be some problems in this method: CompletionEngine>>#replaceTokenInEditorWith: such as:
-
self editor selectInvisiblyFrom: wordStart to: wordEnd - 1.does make a visible selection - which appears to impact the following statement:
old := self editor selection.
I didn't investigate further.
Hi, Pharo code completion has been improved in Pharo 12. I think what you reported has been fixed. Could you check if everything work right in P12 or 13?
Thanks for responding so quickly!
The behavior is different in Pharo 12, but it is still not correct. Now the following character(s?) are replaced. Here's an example.
- Select text up to colon
- Type until auto complete. See snazzy new behavior dialog. Choose selection.
- Replaces following colon
Pharo 12.0.0
Build information: Pharo-12.0.0+SNAPSHOT.build.1516.sha.25ecf718d4a363b275862b4a093b1a240ec7e8d2 (64 Bit)