radline
radline copied to clipboard
Add CancelCommand and Bind it to EscapeKey.
Add CancelCommand and Bind it to EscapeKey.
The cancel command finishes the edit process and resets the buffer to the initial text and state. To the response of the prompt will be the original text if there is any or empty if there was nothing.
Also added unit tests for that.
@microsoft-github-policy-service agree
resolves https://github.com/spectreconsole/radline/issues/9
Sorry about the bunch of commits in the end. My VS was resetting the EOL and EOF automatically on save, So I had to change the setting to be sure the PR only shows my changes.