-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flexible AcceptLine, fix bug in multi-line accept
* This commit allows keybinding for forcing accept line (even if validator fails). This is useful if you have a separate keybinding for accepting, such as `Alt-Enter`. It makes sense to show an error to user rather than insert an unexpected newline. * Forcing `Newline` is also accepted * `AcceptLine` meaning is changed (not it forces accept), but default `Enter` keybinding is not * `AcceptOrInsertLine` not has a flag that modifies it's behavior in the middle of the line (at the end it always submits, when validator returned false it's always a newline) * Fixed bug with exiting readline (both on success and error) when cursor is not on the last line
- Loading branch information
Showing
2 changed files
with
52 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters