Commit Graph

101 Commits (1e1967308dc191920c1188be8c7eecec3cb76224)

Author SHA1 Message Date
Leoi Hung Kin a6852fb88f
Picker: Don't panick at move_up/move_down when matches is empty (#818) 3 years ago
Dmitry Sharshakov bf53aff27d Merge branch 'master' into debug 3 years ago
Blaž Hrastnik c7d6e4461f fix: Wrap around the top of the picker menu when scrolling
Forgot to port the improvements in menu.rs

Fixes #734
3 years ago
Blaž Hrastnik 2ce87968cd ui: Be smarter about centering previews
Try centering the whole block. If the block is too big for the viewport,
then make sure that the first line is within the preview.
3 years ago
Dmitry Sharshakov 2d35b7b99c
Normalize line in picker preview to avoid crash 3 years ago
Dmitry Sharshakov 1befbd076c Add command for editing breakpoint condition 3 years ago
Blaž Hrastnik a3bd80a6fa ui: prompt: Avoid allocating a prompt name if it's a static string 3 years ago
Kirawi b99db7c687
Move path util functions from helix-term to helix-core (#650) 3 years ago
Blaž Hrastnik bf5b9a9f35 ui: Tone down the preview highlight by adding a new scope 3 years ago
Blaž Hrastnik e6cb183134 ui: Fix preview window padding: we want horizontal, not vertical 3 years ago
Blaž Hrastnik a5c3c6c6a9 ui: Highlight line ranges in the preview 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
Kirawi da8810809a use `ui.text.focus` for the picker (fix #622) 3 years ago
Blaž Hrastnik 4167201344 ui: picker: Position count according to input bar 3 years ago
Blaž Hrastnik eb9ac0a743 ui: picker: Use ui.selection instead of ui.selection.primary 3 years ago
Blaž Hrastnik f20dc1283d ui: picker: Render matches/total counts 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 63e54e30a7 Implement in-memory prompt history
Implementation is similar to kakoune: we store the entries into
a register.
3 years ago
Ivan Tham eba0bbda2e Resume last picker
Inspired by space ' in doom emacs.
3 years ago
Nathan Vegdahl efa3389b6a Fix unused variable, parameter, and `mut` warnings in helix-term. 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
Gokul Soumya 18beda38ac Add … when chars are truncated in picker 3 years ago
Gokul Soumya fb8e7dc25b Fix picker item width overflow
Fixes #352
3 years ago
Joe Neeman fd1ae35051 Make the prompt callback take a Context. 3 years ago
Blaž Hrastnik 20f33ead67 minor: Remove old TODOs 3 years ago
Ivan Tham 124514aa70 Add cursor kind to separate hidden cursor from pos
Now IME cursor position should be correct since we can still set cursor
position without drawing the cursor.
3 years ago
Ivan Tham 002f1ad397 Add filter ability to picker
Inspired by doom emacs. Able to filter picker options multiple times.
3 years ago
Ivan Tham 1953588873 Change picker horizontal split to h
Follow window mode and vim behavior, x seemed weird.
3 years ago
Kevin Sjöberg 1bb9977faf Match keybindings of menu 3 years ago
Kevin Sjöberg aa8a8baeeb Calculate offset when moving picker cursor 3 years ago
Kevin Sjöberg 2ac496f919 Do not move past number of matches 3 years ago
Blaž Hrastnik d54ae09d3b ESC should exit both completion and insert mode 3 years ago
Blaž Hrastnik d708efe275 Fix cursor positioning for prompts 3 years ago
Blaž Hrastnik ccdebb99b5 Drop some useless imports. 3 years ago
Blaž Hrastnik ff4c1d05de Replace the Clear widget with buffer.clear/clear_with. 3 years ago
Blaž Hrastnik 1255bcb8a3 Simplify the compositor callback. 3 years ago
Blaž Hrastnik f0712479cb Define text color (mostly) in theme.toml. 3 years ago
Blaž Hrastnik 8b33ba2284 Correct the naming issue with vsplit and hsplit being swapped. 3 years ago
Blaž Hrastnik 95d0bba81a ui: Improve completion state handling. 3 years ago
Blaž Hrastnik 5c2d2fda21 Wire up opening in splits via pickers. 3 years ago
Blaž Hrastnik cbcacb1063 Merge some imports. 3 years ago
Blaž Hrastnik d4b85ce18d popup: wip work on completion popups 3 years ago
Blaž Hrastnik 777a80917d Address clippy lints. 4 years ago
Blaž Hrastnik 56f2193811 Retrieve completion options on ctrl-x. 4 years ago
Blaž Hrastnik d61b4854b8 Make sure to clear the whole screen with the background color. 4 years ago
Blaž Hrastnik 47e282804d buffer picker: Mark current view with (*) 4 years ago
Blaž Hrastnik 3d3295bb75 ui: buffer picker on ctrl-b 4 years ago
Blaž Hrastnik 25aa45e76c picker: Factor out file picker, we want to reuse code for other pickers. 4 years ago
Blaž Hrastnik 8b263ef04b picker: open file on Enter. 4 years ago
Blaž Hrastnik edfd3933db picker: Implement fuzzy search. 4 years ago
Blaž Hrastnik 7c75ec04e8 File picker mockup, reuses the line editor work done on Prompt. 4 years ago