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
This is because RevertLine behaves differently when list view is active. When list view is active, RevertLine reverts back to the original user input, even if a different list item gets selected by UpArrow/DownArrow.
Maybe RevertLine should continue erase the whole line when no item is selected in the list view (meaning the user didn't select anything in the list, so no need to revert to the original user input.)
To work around it for now, your key handler needs to have 2 RevertLine calls in it.
This is because RevertLine behaves differently when list view is active.
Well, that's exactly the problem described here. This was surprising to me. 😅
The method's documentation is:
Reverts all of the input to the current input.
I didn't realize this was related to the list view. From its behavior, I thought this was an equivalent of a Clear() method, which doesn't exist. I guess I should have been more careful given the documentation I didn't understand.
In any case, I suppose this method requires a more precise documentation.
Activity
daxian-dbw commentedon Jan 5, 2026
This is because
RevertLinebehaves differently when list view is active. When list view is active,RevertLinereverts back to the original user input, even if a different list item gets selected by UpArrow/DownArrow.Maybe
RevertLineshould continue erase the whole line when no item is selected in the list view (meaning the user didn't select anything in the list, so no need to revert to the original user input.)To work around it for now, your key handler needs to have 2
RevertLinecalls in it.ltrzesniewski commentedon Jan 5, 2026
Thanks for the explanation!
Well, that's exactly the problem described here. This was surprising to me. 😅
The method's documentation is:
I didn't realize this was related to the list view. From its behavior, I thought this was an equivalent of a
Clear()method, which doesn't exist. I guess I should have been more careful given the documentation I didn't understand.In any case, I suppose this method requires a more precise documentation.
fix(powershell): add error safety and cleanup (#3040)
ltrzesniewski commentedon Jan 5, 2026
Maybe
RevertLineshould either be a no-op, or just remove the prediction inInlineViewmode?That would better match its description and behavior in
ListViewmode, but it would be a breaking change.