summaryrefslogtreecommitdiff
path: root/Libraries/LibLine
AgeCommit message (Collapse)Author
2020-05-02LibLine: Handle ^L while in search modeAnotherTest
This commit fixes the following misbehaviour: ``` > <- search prompt moves here > > ^R^L <- actual prompt stays here ```
2020-04-30LibLine: Reset inline_search_cursor along with cursorAnotherTest
This fixes the issue where the editor would only scroll up one command and then 'search' for it
2020-04-30Shell+LibLine: Handle escaped characters correctlyAnotherTest
This patchset fixes incorrect handling of escaped tokens (`a\ b`) in Shell autocompletion and LibLine. The users of LibLine can now choose between two token splitting modes, either taking into account escapes, or ignoring them.
2020-04-29LibLine: Actually fix build :^)Andreas Kling
2020-04-28LibLine: Properly mark the result of read() as ignoredAnotherTest
Unbreaks the build.
2020-04-28LibLine: Drop stray input before doing vt_dsrAnotherTest
This patch fixes the issue where some data would be buffered while the editor is not editing, and vt_dsr would read them, resulting in the cursor to jump to (1,1)
2020-04-28LibLine: Handle initialize() internallyAnotherTest
This patch makes initialize() transparent to the users, but exposes it publicly, as the users might need a copy of the default termios (i.e. Shell)
2020-04-28LibLine: Ignore interrupts unless actively editingAnotherTest
It does not make much sense to receive an interrupt and process it *much later*. Also patches Userland/js to only create exceptions while some code is actually running.
2020-04-22LibLine: Do not ignore ^C and do not finish() after interruptAnotherTest
2020-04-22LibLine: Avoid OOB access when one of the suggestions is the prefixAnotherTest
2020-04-20LibLine: Autocomplete already-complete suggestionsAnotherTest
Suggesting whatever the user has input is not quite sane :^)
2020-04-20LibLine: Handle ctrl-{left,right}_arrow by jumping between wordsAnotherTest
Words are delimited by spaces. Perhaps this should be a configurable behaviour?
2020-04-20LibLine: Properly handle ^C and do not return after being interruptedAnotherTest
this commit fixes a...surprisingly long-standing ^C bug, where it would return the buffer instead of voiding it and starting over :^)
2020-04-20LibLine: Implement searching via up/down arrow keysAnotherTest
2020-04-20LibLine: Implement ^R searchingAnotherTest
This commit adds searching in the editor history with ^R. It does so by instantiating...another Line::Editor inside the current Line::Editor :^)
2020-04-19LibLine: Clear trailing trivia when cycling if the suggestion has anyAnotherTest
2020-04-19LibLine: Allow suggestions to have trailing trivia stringsAnotherTest
These strings would be applied when inserted into the buffer, but are not shown as part of the suggestion. This commit also patches up Userland/js and Shell to use this functionality
2020-04-19LibLine: Complete only common prefixes, and tweak suggestion logicAnotherTest
On the first tab, only complete the token without suggesting extra stuff, and on further tabs, show suggestions. Except in one case where the completion is all in the buffer, then we show the suggestions, but do no completion.
2020-04-15LibLine: Avoid crashing if given empty suggestionsAnotherTest
2020-04-15LibLine: Properly handle multiline suggestionsAnotherTest
2020-04-13LibLine: Update display when deleting forwardAnotherTest
2020-04-13LibLine: Remove unused cut_mismatching_chars() functionAnotherTest
This is superceded by the suggest() mechanism
2020-04-13LibLine: Autocomplete single suggestionsAnotherTest
`cd /h<tab>` -> `cd /home/`, pressing tab after that would descend into `/home/' and show `/home/anon/`
2020-04-11LibLine: Cycle backward through suggestions using Shift+TabLinus Groh
2020-04-11LibLine: Display suggestions and cycle between themAnotherTest
With extra color (tm) This commit also patches the users of LibLine to properly use the new API
2020-04-11LibLine: Ask for cursor position once and handle the rest internallyAnotherTest
Prior to this, writing to stdin while a display refresh was happening corrupted the input and displayed garbage.
2020-04-11LibLine: Properly handle window resize by not spamming DSRsAnotherTest
We have all the information necessary to find our new origin when a window size change occurs.
2020-04-11LibLine: Properly show and cleanup suggestionsAnotherTest
Prior to this, we would display them and never clean then up.
2020-04-10Kernel+LibC: Remove ESUCCESSAndreas Kling
There's no official ESUCCESS==0 errno code, and it keeps breaking the Lagom build when we use it, so let's just say 0 instead.
2020-04-10LibLine: Appropriately react to window size changesAnotherTest
2020-04-10LibLine: Fix regression with moving around in history misplacing cursorAnotherTest
This commit fixes a regression where the prompt would not be cleared upon substitution of lines from the history
2020-04-10LibLine: Implement multiline editingAnotherTest
This commit also adds the ability to change the prompt mid-edit :^)
2020-04-05LibLine: Add live styling supportAnotherTest
This patchset adds an stylization interface to LibLine, and breaks multiline editing. With the most adorable Style constructor I've ever seen :^)
2020-04-02LibLine: Restore previous state only if initializedAnotherTest
This makes the library safe to construct/destruct without actually using it.
2020-04-01LibLine: Fix Shell crashing (due to write() EFAULT) on <tab><tab>Andreas Kling
Use a StringBuilder instead of blindly passing a bunch of potentially empty/null strings to the kernel. StringBuilder is more lenient and generally more pleasant to use anyway.
2020-03-31LibLine: Fix build in Linux environmentAndreas Kling
My host compiler was complaining about "%b" in format strings and about ignoring the return value from a bunch of write() calls.
2020-03-31LibLine: Rename on_char_input() => register_character_input_callback()Andreas Kling
The "on_foo" format is our convention for public callback members.
2020-03-31LibLine: Rename LineEditor.{cpp,h} => Editor.{cpp,h}Andreas Kling
2020-03-31LibLine: Rename LineEditor to Line::EditorAndreas Kling
2020-03-31LibLine: Rename from LibLineEditAndreas Kling