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
Under certain conditions, auto completion keyword lines containing white spaces collapse the white space character when the cursor reaches the white space. Or put another way, when the keyword is split into multiple span elements.
This is due to the white-space: nowrap; rule that presumably was to prevent new line characters from messing up the layout, so a fix would require accommodating both white spaces and new lines.
That white spaces do not collapse when split up into span elements
Current Behavior
pre-seeding white spaces collapse when the keyword is split into span elements
Reproduction Steps
Enable auto completion options for keyword suggestions.
Have keywords that contain white spaces.
Type a word containing a white space, ensuring all character before the white space is typed, or in other words when the cursor reaches the white space.
Possible Solution
Replace all white spaces with in the keyword text that end up in a span, so that nowrap can't collapse them.
Additional Information/Context
The solution needs to consider both white space and new lines.
Removing the nowrap rule would fix this as it goes back to pre from .ace_layer, however it would break the layout when new lines are present.
nowrap - removes pre-seeding white spaces and ignores new lines
pre - allows pre-seeding white spaces, but does not ignore new lines
Keeping nowrap and replacing white spaces with seems the best option to me.
Ace Version / Browser / OS / Keyboard layout
current, n/a
The text was updated successfully, but these errors were encountered:
Hey,
that looks indeed quite unfortunate, affecting basically all custom modes with spaces in the keyword or custom completers with spaces in captions.
Describe the bug
Under certain conditions, auto completion keyword lines containing white spaces collapse the white space character when the cursor reaches the white space. Or put another way, when the keyword is split into multiple span elements.
This is due to the white-space: nowrap; rule that presumably was to prevent new line characters from messing up the layout, so a fix would require accommodating both white spaces and new lines.
ace/src/autocomplete/popup.js
Line 455 in de4234b
Expected Behavior
That white spaces do not collapse when split up into span elements
Current Behavior
pre-seeding white spaces collapse when the keyword is split into span elements
Reproduction Steps
Enable auto completion options for keyword suggestions.
Have keywords that contain white spaces.
Type a word containing a white space, ensuring all character before the white space is typed, or in other words when the cursor reaches the white space.
Possible Solution
Replace all white spaces with in the keyword text that end up in a span, so that nowrap can't collapse them.
Additional Information/Context
The solution needs to consider both white space and new lines.
Removing the nowrap rule would fix this as it goes back to pre from .ace_layer, however it would break the layout when new lines are present.
nowrap - removes pre-seeding white spaces and ignores new lines
pre - allows pre-seeding white spaces, but does not ignore new lines
Keeping nowrap and replacing white spaces with seems the best option to me.
Ace Version / Browser / OS / Keyboard layout
current, n/a
The text was updated successfully, but these errors were encountered: