Commit Graph

14 Commits (fc97ecc3e3186b9dfe958869178bdb6b8cd7d8df)

Author SHA1 Message Date
Michael Davis baceb02a09 Use refactored Registers type
This is an unfortunately noisy change: we need to update virtually all
callsites that access the registers. For reads this means passing in the
Editor and for writes this means handling potential failure when we
can't write to a clipboard register.
1 year ago
gibbz00 3d0bc72099 Place `Info::from_keymap()` contents in `keymap.infobox()`:
This makes it easier later control the order in which the key events
are presented.
1 year ago
gibbz00 19326d23d1 Keymap infobox: Idiomatic body tuple.
Does not change any behavior other than making the tuple slightly
more idiomatic.  Keymap infobox shows key events, then the respective
description. This commit makes sure that order is used from the get go,
rather than flipping it midway.
1 year ago
Alexis (Poliorcetics) Bourget b58899bc8e fix: remove unneeded allocations when calling helix_view::Info::new 2 years ago
Gokul Soumya fa83426011 Handle newlines in register infobox 3 years ago
Gokul Soumya bf773db451 Show infobox with register contents 3 years ago
Blaž Hrastnik e7eab95b94 Update to rust 1.58, fix a bunch of optional lints 3 years ago
Daniel Ebert eb8745db09 Implement key ordering for info box 3 years ago
Gokul Soumya 14c08e855f
Refactor infobox rendering and parsing (#579) 3 years ago
Gokul Soumya 88d6f65239
Allow multi key remappings in config file (#454)
* Use tree like structure to store keymaps

* Allow multi key keymaps in config file

* Allow multi key keymaps in insert mode

* Make keymap state self contained

* Add keymap! macro for ergonomic declaration

* Add descriptions for editor commands

* Allow keymap! to take multiple keys

* Restore infobox display

* Fix keymap merging and add infobox titles

* Fix and add tests for keymaps

* Clean up comments and apply suggestions

* Allow trailing commas in keymap!

* Remove mode suffixes from keymaps

* Preserve order of keys when showing infobox

* Make command descriptions smaller

* Strip infobox title prefix from items

* Strip infobox title prefix from items
3 years ago
Ivan Tham 916362d3a9 Info box add horizontal padding 3 years ago
Ivan Tham 5977b07e19 Reduce calculation and improve pattern in infobox
- switch to use static OnceCell to calculate Info once
- pass Vec<(&[KeyEvent], &str)> rather than Vec<(Vec<KeyEvent>, &str)>
- expr -> tt to allow using | as separator, make it more like match
3 years ago
Ivan Tham 9effe71b7d Apply suggestions from blaz for infobox 3 years ago
Ivan Tham 8985c58fd3 Add infobox 3 years ago