aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/prompt.rs
Commit message (Collapse)AuthorAge
* Add shift-backspace keybind alias for backspace (#4937)lesleyrs2023-02-28
| | | | | | | | | | | When the Kitty Keyboard Protocol is enabled, S-backspace is distinguished from backspace with no modifiers. This is awkward when typing because it's very easy to accidentally hold shift and press backspace temporarily when typing capital letters. Kakoune (which is also a Kitty Keyboard Protocol application) treats S-backspace as backspace too: https://github.com/mawww/kakoune/blob/3150e9b3cd8e61d9bc68245d67822614d4376cf4/src/input_handler.cc#L1275
* bump msrv to 1.63 (#5570)Pascal Kuthe2023-02-09
| | | | | * bump msrv to 1.63 * resolve new complex type clippy lints
* Make prompt suggestions greyed outJonathan LEI2022-12-17
|
* Refactor blackhole register (#4504)ath32022-11-15
|
* Escape filenames in command completionMichael Davis2022-11-07
| | | | | | This changes the completion items to be rendered with shellword escaping, so a file `a b.txt` is rendered as `a\ b.txt` which matches how it should be inputted.
* Resolve a bunch of upcoming clippy lintsBlaž Hrastnik2022-11-04
|
* Correctly handle escaping in completion (#4316)Armin Ronacher2022-11-01
| | | | | * Correctly handle escaping in completion * Added escaping tests
* Fix preview bug (#3644)Joe2022-09-20
| | | | | * Fix preview bug * Add comment to empty case
* Fix cargo doc warnings, and add GitHub action to ensure it (#3650)A-Walrus2022-09-03
|
* fix: prevents storing last prompt if is top of stack (#3609)Saber Haj Rabiee2022-09-01
|
* Fix Prompt::handle_event compilationMichael Davis2022-08-31
|
* fix: Recalculate completion when going through prompt history (#3193)Frojdholm2022-08-31
| | | | | | | | | | | | | | | | | | | | | | | | * fix: Recalculate completion when going through prompt history * Update completion when the prompt line is changed It should not be possible to update the line without also updating the completion since the completion holds an index into the line. * Fix Prompt::with_line recalculate completion with_line was the last function where recalculate completion had to be done manually. This function now also recalculates the completion so that it's impossible to forget. * Exit selection when recalculating completion Keeping the selection index when the completion has been recalculated doesn't make sense. This clears the selection automatically, removing most needs to manually clear it. * Remove &mut on save_filter Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* fix: Recalculate completion after pasting into promptBlaž Hrastnik2022-08-30
|
* Add bracketed paste (#3233)Charlie Groves2022-08-29
|
* Add custom event type replacing crossterm's Event (#3169)Gokul Soumya2022-08-09
| | | | | | | | | | Ported over from 61365dfbf3 in the `gui` branch. This will allow adding our own events, most notably an idle timer event (useful for adding debounced input in [dynamic pickers][1] used by interactive global search and workspace symbols). [1]: https://github.com/helix-editor/helix/pull/3110 Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Don't add empty prompt input to history (#3259)A-Walrus2022-07-30
|
* support prefilling prompt (#2459)Bob2022-07-18
| | | | | | | | | * support prefilling prompt * introduce with_line builder method in Prompt * extract show_prompt * use textobject_word as fallback input
* feat(term): uniformize word-wise movement and deletion (#2500)Benoît Cortier2022-07-15
| | | | | | | | | | | | Ctrl-based shortcuts are common in numerous applications. This change: - Adds Ctrl+{Left/Right/Backspace/Delete} for word-wise movement/deletion in prompt, picker, … - Removes Alt-Left and Alt-Right in prompt, picker, … - Adds Alt-Delete in insert mode for forward word deletion In some terminals, Alt-Backspace might not work because it is ambigous. See: https://github.com/helix-editor/helix/pull/2193#issuecomment-1105042501 Hence, Alt alternative is not removed.
* fixes showing the last prompt on empty input (#2870)Saber Haj Rabiee2022-06-24
|
* Remove a couple more unwrapsBlaž Hrastnik2022-06-21
|
* Refactor Margin for fine grained control (#2727)Gokul Soumya2022-06-21
|
* prompt: If submitting empty prompt, use default (last used)Blaž Hrastnik2022-06-06
|
* use ui.menu instead of ui.statusline for command completion menu themeChristoph Horn2022-05-20
|
* support insert register in prompt (#2458)Bob2022-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | * support insert register in prompt * use next_char_handler instead of a flag * Fix clippy issue * show autoinfo when inserting register * Revert "show autoinfo when inserting register" This reverts commit 5488344de1c607d44bdf8693287a85b92cb32518. * use completion instead of autoinfo autoinfo is overlapped when using prompt * recalculate_completion after inserting register * Update helix-term/src/ui/prompt.rs Co-authored-by: Ivan Tham <pickfire@riseup.net> Co-authored-by: Ivan Tham <pickfire@riseup.net>
* Auto-complete directory members (#1801) (#1907)Roland Kovacs2022-05-02
| | | | | | Allow tab-completion to continue when there is only a single, unambigous completion target which is a directory. This allows e.g. nested directories to be quickly drilled down just by hitting <tab> instead of first selecting the completion then hitting <enter>.
* feat(ui): treat slashes as word separators in prompt (#2315)unrelentingtech2022-04-30
| | | | When fiddling with paths in a :o prompt, one usually would want Ctrl-W to erase a path segment rather than the whole path. This is how Ctrl-W works in e.g. (neo)vim out of the box.
* fix: prompt: pass through unmapped keys regardless of modifiersBlaž Hrastnik2022-04-13
| | | | | | | | Ctrl + Alt is apparently another common sequence for AltGr: https://devblogs.microsoft.com/oldnewthing/20040329-00/?p=40003 Fixes #595 Fixes #2080
* Make line a private propertyBlaž Hrastnik2022-03-28
|
* Close some popups automatically (#1285)Bram2022-02-23
| | | | | | | | | | | | | | | | | | | * Add Event::Used to use event callback without consuming * Close popup if contents ignored event * collect event results before executing callbacks * don't add new result variant, use Ignored(..) instead * break in match cases * Make auto_close configurable * fix merge * auto close hover popups * fix formatting
* ui: prompt: Render aliases + border on the docBlaž Hrastnik2022-02-20
|
* fix: Allow multi-line prompt documentationBlaž Hrastnik2022-02-20
|
* Pass through Editor instead of ContextBlaž Hrastnik2022-02-17
|
* helix-term: implement buffer completerCole Helbling2022-02-17
| | | | | | In order to implement this completer, the completion function needs to be able to access the compositor's context (to allow it to get the list of buffers currently open in the context's editor).
* Fix panics when resizing (#1408)Mathis Brossier2022-01-16
| | | | | | | | | | | * Change buffer.get & buffer.get_mut to return Option, Implement Trait Index & IndexMut to panic * Prevent FilePicker from drawing outside buffer (rust panics) * apply suggestion * add function in_bounds to avoid useless calculations Co-authored-by: mathis <mathis.brossier@universite-paris-saclay.fr>
* fix: Use std::path::MAIN_SEPARATOR to determine completionBlaž Hrastnik2022-01-06
| | | | Refs #1439
* Apply recent nightly suggestions (#1286)Kirawi2021-12-18
| | | array iterators are now implicit
* Macros (#1234)Omnikar2021-12-12
| | | | | | | | | | | | | | | | | | | | | | | | * Macros WIP `helix_term::compositor::Callback` changed to take a `&mut Context` as a parameter for use by `play_macro` * Default to `@` register for macros * Import `KeyEvent` * Special-case shift-tab -> backtab in `KeyEvent` conversion * Move key recording to the compositor * Add comment * Add persistent display of macro recording status When macro recording is active, the pending keys display will be shifted 3 characters left, and the register being recorded to will be displayed between brackets — e.g., `[@]` — right of the pending keys display. * Fix/add documentation
* fix: Normalize backtab into shift-tabBlaž Hrastnik2021-12-06
| | | | Fixes #1150
* Readline style insert mode (#1039)Bob2021-11-15
| | | | | | | | | | | | | | | | | | | | | * readline style insert mode * update keymap.md * don't save change history in insert mode * Revert "don't save change history in insert mode" This reverts commit cb47f946d7fb62ceda68e7d1692a3914d0be7762. * don't affect register and history in insert mode * add insert_register * don't call exit_select_mode in insert mode * avoid set_selection * avoid duplicated current!
* fix: shift-tab mappings broken after efc2b4c7Blaž Hrastnik2021-11-12
|
* Fix moving with arrow keys in prompt (#1070)ath32021-11-11
|
* Refactor keyevent handling using key, ctrl macros (#1058)Gokul Soumya2021-11-10
| | | | | | Adds ctrl! and alt! macros (which existed before the big keymap refactor) and uses them in event handling of Components. Note that this converts crossterm's KeyEvent to our own KeyEvent on each invocation of handle_event in Components.
* add <C-h>, <C-u>, <C-d>, Delete in prompt mode (#1034)Bob2021-11-09
|
* Add WORD textobject (#991)Omnikar2021-11-08
| | | | | * Add WORD textobject * Document WORD textobject
* Add c-s to pick word under doc cursor to prompt line & search completion (#831)CossonLeo2021-11-04
| | | | | | | | | | | | | | | * Add prompt shourtcut to book Add completions to search Add c-s to pick word under doc cursor to prompt line * limit 20 last items of search completion, update book * Update book/src/keymap.md Co-authored-by: Ivan Tham <pickfire@riseup.net> * limit search completions 200 Co-authored-by: Ivan Tham <pickfire@riseup.net>
* fix: When cycling through prompt history, update event needs to triggerBlaž Hrastnik2021-10-27
|
* ui: prompt: Avoid allocating a prompt name if it's a static stringBlaž Hrastnik2021-08-31
|
* ui: prompt: Fix typing with altBlaž Hrastnik2021-08-27
|
* ui: Refactor styling a bit, ensure infobox is stylableBlaž Hrastnik2021-08-20
|
* Show file preview in split pane in fuzzy finder (#534)Gokul Soumya2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add preview pane for fuzzy finder * Fix picker preview lag by caching * Add picker preview for document symbols * Cache picker preview per document instead of view * Use line instead of range for preview doc * Add picker preview for buffer picker * Fix render bug and refactor picker * Refactor picker preview rendering * Split picker and preview and compose The current selected item is cloned on every event, which is undesirable * Refactor out clones in previewed picker * Retrieve doc from editor if possible in filepicker * Disable syntax highlight for picker preview Files already loaded in memory have syntax highlighting enabled * Ignore directory symlinks in file picker * Cleanup unnecessary pubs and derives * Remove unnecessary highlight from file picker * Reorganize buffer rendering * Use normal picker for code actions * Remove unnecessary generics and trait impls * Remove prepare_for_render and make render mutable * Skip picker preview if screen small, less padding