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
{{ message }}
Repository navigation
Prediction Feature is broken for current line whenever the S command of vi EditMode is used (to clear line) #2408
Searched for anything related to S command of vi EditMode breaking Prediction but didn't find anything. Sorry it that's a duplicate even so.
Environment
I've reproduced the error on both environments below, both with the native PSReadline version (2.1, I believe) and after upgrading it to the beta version:
Write anything, then press ESC and S (to clear whole line)
Try to use prediction on the cleared line (such as typing Set-PSRead and pressing righ to accept suggestion)
Expected behavior
The suggestion is accepted just as it happens on a new line (without using the S to clear the line before)
Actual behavior
Instead of accepting the suggestion it appers to not do anything at all (visually) and if you stay on the edit mode it really does nothing. But if you press right (to accept the suggestion), then ESC to go to normal mode it skips to the end of the line (to where it would go if it had accepted the suggestion) without visually including the suggestion and if you press enter it will run the suggestion. If you type right then ESC then start typing again, eventually it updates visually as well (including the suggestion and what you just typed).
If you discard or run that line the next line works as expected as long as you don't run the "S" command again - so for now my workaround has been to use "S" followed by Enter to create new line (which is quite a pain).
Summary
The Prediction feature breaks whenever you clear the line (at least with the S command of vi EditMode). Creating new line whenever that happens seems to "fix" it.
Activity
Add one more test for PowerShell#2408