Commit Graph

36 Commits (fa0cb010e16c6a7d95b8849f073f472b0bd710be)

Author SHA1 Message Date
Gokul Soumya efc2b4c77b
Refactor keyevent handling using key, ctrl macros (#1058)
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.
3 years ago
CossonLeo b142fd4080
move_up will select last item, when no item selected (#907) 3 years ago
CossonLeo bca98b5bed
Add c-j c-k to menu keymap for move_up move_down (#908) 3 years ago
Blaž Hrastnik 182a59b552 Update to rust 1.56 + 2021 edition 3 years ago
Blaž Hrastnik 2c0468ffd1 fix: If backspacing past the start offset, cancel completion
Refs #822
3 years ago
Blaž Hrastnik 32977ed341 ui: Trigger recalculate_size per popup render so contents can readjust 3 years ago
CossonLeo d6a9c2c0f6
Add ui.menu text style (#664)
* add menu text style

* add ui.menu.text ui.info ui.info.text to book

* change ui.menu.text to ui.menu

* fix book's ui.menu
3 years ago
Gokul Soumya f9375f449c
Refactor new Rect construction (#575)
* Refactor new Rect construction

Introduces methods that can be chained to construct new Rects
out of pre-existing ones

* Clamp x and y to edges in Rect chop methods

* Rename Rect clipping functions
3 years ago
Gokul Soumya d84f8b5fde
Show file preview in split pane in fuzzy finder (#534)
* 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
3 years ago
Blaž Hrastnik f917b5a441 ui: completion: Use sort_text to sort the completions 3 years ago
Blaž Hrastnik b20a5c4c0e ui: menu: Allow wrapping around on ctrl-p/shift tab 3 years ago
Blaž Hrastnik 1789dfabfe fix: ui/menu: Don't allow scrolling past the end of completion
Fixes #472
3 years ago
Blaž Hrastnik 58d08d36ae Simplify ui/menu.rs 3 years ago
Blaž Hrastnik 5292fe0f7d Calculate completion popup sizing
Fixes #220
3 years ago
Nathan Vegdahl efa3389b6a Fix unused variable, parameter, and `mut` warnings in helix-term. 3 years ago
Nathan Vegdahl 702a0491db Remove #[allow(unused)] from helix-term, and fix unused imports.
Lots of other warning still left.  Will address in subsequent commits.
3 years ago
Blaž Hrastnik cad14c6b46 Address nightly clippy warnings 3 years ago
Keith Simmons 4418e17547
reverse the dependency between helix-tui and helix-view (#366)
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view

* fix tests

* clippy and format fixes

Co-authored-by: Keith Simmons <keithsim@microsoft.com>
3 years ago
Kevin Sjöberg 29962a5bd9 Fix Shift-Tab for moving upwards in menu 3 years ago
Blaž Hrastnik 3336023614 ui: Menu rendering adjustments 4 years ago
Blaž Hrastnik b114cfa119 Display more data in completion popups. 4 years ago
Blaž Hrastnik ccdebb99b5 Drop some useless imports. 4 years ago
Blaž Hrastnik 1255bcb8a3 Simplify the compositor callback. 4 years ago
Blaž Hrastnik f0712479cb Define text color (mostly) in theme.toml. 4 years ago
Blaž Hrastnik fd4fd12fa3 clippy lint 4 years ago
Blaž Hrastnik 95d0bba81a ui: Improve completion state handling. 4 years ago
Blaž Hrastnik ceea5eacd8 clippy lint 4 years ago
Blaž Hrastnik a24c3fff54 Filter the completion menu based on text entered. 4 years ago
Blaž Hrastnik 350081a3af Fix crash if pressing enter when nothing selected in completion. 4 years ago
Blaž Hrastnik cbcacb1063 Merge some imports. 4 years ago
Blaž Hrastnik b7dd7310c4 syntax: Reuse parser instances. highlight_iter() no longer needs &mut. 4 years ago
Blaž Hrastnik ddcf5156c0 ui: menu: Adjust scroll via required_size area caching. 4 years ago
Blaž Hrastnik 5ea610c41d ui: Move terminal into compositor, redo required_size hints. 4 years ago
Blaž Hrastnik a21d96e729 ui: Scrollable popup menu, with scrollbar indicator. 4 years ago
Blaž Hrastnik 0b85c16be9 ui: Share popup code with menu.
Menu is now just wrapped in a popup.
4 years ago
Blaž Hrastnik d4b85ce18d popup: wip work on completion popups 4 years ago