- Handle invalid history entries / history log corruption (#267).
- Better error messages on Linux when xsel is not installed (#264).
- Fix crash when Shift-Delete is pressed under certain conditions (#263).
- Add workaround for garbled utf-8 characters on Linux (#261).
- Fix AltGr handling in non-QWERTY keyboards (#259).
- Support viewport scrolling if input content is longer than console height
- Bugfix: if the control modifier is pressed, don't insert the character (#252).
- Add a new type that be returned by keybinding callbacks:
StreamingInputCallbackResult
. This allowsIAsyncEnumerable<string>
to be rendered into the prompt (#249).
- Improved completion item ordering + case sensitive filtering (#244).
- Fix of the problem where oveload pane could stay on screen after input submission (#239).
- Change of unexpected character
\r
to\n
inConsoleKeyInfo
when pressingEnter
(#242).
- Ignore errors formatting when error stream is redirected (#238).
- Fix of invalid behaviour when user used more lines than
Console.BufferHeight
(#228). - Fix of invalid positioning of completion pane for "scrolling inputs" (#229).
- Not drawing empty documentation box when no completion item is selected (#232).
PromptConfiguration.Prompt
is now editable (#235).
- Fix of not enough space for completion panes in multiline statements (#223).
- Support for writing of FormattedString to error stream.
IConsole.WriteError(FormattedString)
andIConsole.WriteErrorLine(FormattedString)
.
This release contains many new features, performance improvements, and bugfixes developed by contributor @kindermannhubert.
- Breaking change: Target .NET 6 instead of .NET 5 (#202).
- Breaking change: Correct awaiting of history saving (#201).
- Before, saving of history was fire-and-forget, which could mean that in certain race condition scenarios history would not be properly saved.
- To fix this, the prompt now implements
IAsyncDisposable
and should be disposed after use to guarantee that history is always saved.
- Overload help support! In addition to the existing intellisense-style autocompletions, PrettyPrompt now supports displaying "overload menus" that can be navigated with the arrow keys, similar to Visual Studio (#209).
- Fix of WordWrapping removing empty lines. (#204).
- Add a new configuration method:
IPromptCallbacks.ConfirmCompletionCommit
. This allows completions to be accepted / rejected when they are about to be inserted, based on the position of the caret in the text. It's useful if a completion would be automatically inserted while the user is typing (#212). - Support for automatic formatting of the input text as it's being typed. See
IPromptCallbacks.FormatInput
(#213). - Support for indentation changing of multiple selected lines via Tab and Shift+Tab (#214).
- Configurable Keybindings for history scrolling (#197)
- Persistent history deduplication (#189)
- Better history scrolling in multiline statements (#181, #193)
- Ensure scrolling forward/backwards through filtered history provides consistent results (#192)
- Smarter history filtering (#195, #196)
- When a ConsoleKey KeyPressPattern is provided in a keybinding, map the ConsoleKey to a char (#199)
- Performance improvement of IConsole.Write(FormattedString).
IPromptCallbacksShouldOpenCompletionWindowAsync
now accepts alsoKeyPress
argument.CompletionItem
has new propertyCommitCharacterRules
which modifies configured global commit characters.- Fix of incorrect rendering of description box in multiline statements (#149).
- Win/F1/F2/... keys do not deselect currently selected text (#156).
- Fix of Home press on empty line (#161).
- Fix of down arrow not working properly when last character is '\n' (#160).
- Improved selection formatting + it's configurable (#155).
- Ctrl+X when nothing is selected cuts the current line (#151).
- Current line can be deleted with Shift+Delete (#152).
- Fix of indentation removal inside of pasted text. It's removed only when there are multiple non-whitespace lines (#168).
- Fix of key-binding matching (#147).
- Fix of multiple '\r\n' pasting (#166).
- Fixes other minor bugs.
- Fix of insufficient formatting reseting in extension method
IConsole.Write(FormattedString)
.
- Fix of incorrect positioning of cursor while using 2-character symbols (#134).
- Fix of crash when repeating deleting selected text and Ctrl+Z (#139).
- Width fix of some emoji characters.
- Fixes of around text selection and undo/redo.
- Fix of completion pane that should not open when selection is active (#126).
- Upgrade of referenced NuGets.
- Minor enhancements.
IPromptCallbacks.InterpretKeyPressAsInputSubmitAsync
->IPromptCallbacks.TransformKeyPressAsync
This is a large release that greatly improves the usability, consistency, and reliability of PrettyPrompt. Special thanks to @kindermannhubert for an incredible amount of work to improve PrettyPrompt!
- Breaking Changes:
- Replace "Prompt Callback" delegates with virtual method overrides (see discussion and rationale here).
- For an example of how to adjust your configuration, see the CSharpRepl PR here. Specifically, the conversion from the PrettyPrompt 2.0 configuration to the PrettyPrompt 3.0 configuration.
- Move ANSI color properties to new
AnsiColor
struct. For example,AnsiEscapeCodes.Red
changes toAnsiColor.Red.GetEscapeSequence()
. CompletionItem
API:int StartIndex
- removed in favor ofPromptCallbacks.GetSpanToReplaceByCompletionkAsync
, which has default but overridable implementation.string DisplayText
->FormattedString DisplayTextFormatted
.string FilterText
- new and used for item matching.Lazy<Task<string>> ExtendedDescription
- changed to delegate of formTask<FormattedString> GetExtendedDescription(CancellationToken cancellationToken)
.
- More minor changes.
- Replace "Prompt Callback" delegates with virtual method overrides (see discussion and rationale here).
- Features and Fixes:
- Allow rich formatting in the completion suggestions and documentation.
- Rework cursor navigation and text selection to more closely match Visual Studio and other established applications.
- Undo/redo bugfixes and improvements.
- Fix crashes related to text selection, manipulation, and window resizing.
- Fixes related to reflowing and wrapping of text inside the window.
- Implement "smart home" which allows the home key to work better with leading indentation.
- Multiline paste improvements.
- Performance improvements and allocation reductions.
- Nullability annotations.
- Improved completion item matching and priority ordering.
- Completion list contains also non-matching items (bellow matching ones).
- Configurability:
- Prompt.
- Rendering colors.
- Selected completion item rendering (both the marker and highlighting).
- Tab size.
- Min/max number of items in completion list.
- Maximal proportion of window height for completion list.
- Key bindings (commit completion, trigger completion list, new line, submit prompt).
- Adds a new PromptCallback.OpenCompletionWindowCallback property for customizing completion window auto-open behavior.
- Breaking change: KeyPressCallbacks now return a Task instead of a Task. To maintain the old behavior from v1.0, return a null KeyPressCallbackResult (e.g. Task.FromResult(null) ).
- Feature: Allow keyboard shortcuts to submit the prompt on behalf of the user.
- First release of PrettyPrompt.