You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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?
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://private-user-images.githubusercontent.com/36212516/341838715-89d251e8-c063-4590-ad4e-77ff8433f553.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNzUxMjAsIm5iZiI6MTcyMDA3NDgyMCwicGF0aCI6Ii8zNjIxMjUxNi8zNDE4Mzg3MTUtODlkMjUxZTgtYzA2My00NTkwLWFkNGUtNzdmZjg0MzNmNTUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA0VDA2MzM0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyMzhjOTU0M2IwNjNjMDVmMGMxYzBhOTc0ODdkZTlhZmQ0OTVhOGY0NmM0M2IxYWUzNTk1NTg5ZTIyODJhZjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cUksmmrCnJLR5DuUfdca6mVr_A96xGmYWq4P6NgEqoc)
Start typing new characters replacing the old characters until a code completion pop-up appears.
![image](https://private-user-images.githubusercontent.com/36212516/341839319-e074a0a0-c3dc-49c2-b0f0-4bff30746e75.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNzUxMjAsIm5iZiI6MTcyMDA3NDgyMCwicGF0aCI6Ii8zNjIxMjUxNi8zNDE4MzkzMTktZTA3NGEwYTAtYzNkYy00OWMyLWIwZjAtNGJmZjMwNzQ2ZTc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA0VDA2MzM0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwNThmZTZlZTlmZjZlMjA4YjYyN2NjNjI2MWE0MzY2Njk5OTAxMDVmZDBlMGZkODM4NWRkYjkxZTdjMmM3ZGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.EJkRO5CCPxBghK-wan-5uLj_C6vxmIXOHQmHUOvdD_w)
Choose the first code completion option.
Result is intermingled text
![image](https://private-user-images.githubusercontent.com/36212516/341839239-88bd92d4-e6e7-4e32-9acf-c1f59eabef3c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNzUxMjAsIm5iZiI6MTcyMDA3NDgyMCwicGF0aCI6Ii8zNjIxMjUxNi8zNDE4MzkyMzktODhiZDkyZDQtZTZlNy00ZTMyLTlhY2YtYzFmNTllYWJlZjNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA0VDA2MzM0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM2MjBkNGIzNGY2ODVlY2QyYWFlMzZjZTg2NjQyN2ZhNWYxNjliZmM1NDQ2YTdkZTM4ZDAzYjI2YzFkZDU0OGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2MrgnGqB_OgVG1Aj37uXjt_MCSJTyT-TD-Ze2KLc5c0)
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 exampleThere 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.
The text was updated successfully, but these errors were encountered: