Open ericwinger opened 1 week ago
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.
Pharo 12.0.0
Build information: Pharo-12.0.0+SNAPSHOT.build.1516.sha.25ecf718d4a363b275862b4a093b1a240ec7e8d2 (64 Bit)
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.![image](https://github.com/pharo-project/pharo/assets/36212516/89d251e8-c063-4590-ad4e-77ff8433f553)
Start typing new characters replacing the old characters until a code completion pop-up appears.![image](https://github.com/pharo-project/pharo/assets/36212516/e074a0a0-c3dc-49c2-b0f0-4bff30746e75)
Choose the first code completion option.
Result is intermingled text![image](https://github.com/pharo-project/pharo/assets/36212516/88bd92d4-e6e7-4e32-9acf-c1f59eabef3c)
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
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 selectionold := self editor selection.
I didn't investigate further.