diff options
author | Joe | 2022-03-25 09:05:20 +0000 |
---|---|---|
committer | GitHub | 2022-03-25 09:05:20 +0000 |
commit | bee05dd32a685b58015514492525673b1b568b0d (patch) | |
tree | 4d141ece2ff029b881013f7ef4e89bfb9b064919 /helix-term/src/ui/mod.rs | |
parent | 309f2c2c8e64f8be2123a0232c5f9761496b6514 (diff) |
Add refresh-config and open-config command (#1803)
* Add refresh-config and open-config command
* clippy
* Use dynamic dispatch for editor config
* Refactor Result::Ok to Ok
* Remove unused import
* cargo fmt
* Modify config error handling
* cargo xtask docgen
* impl display for ConfigLoadError
* cargo fmt
* Put keymaps behind dyn access, refactor config.load()
* Update command names
* Update helix-term/src/application.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Switch to unbounded_channel
* Remove --edit-config command
* Update configuration docs
* Revert "Put keymaps behind dyn access", too hard
This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79.
* Add refresh for keys
* Refactor default_keymaps, fix config default, add test
* swap -> store, remove unneeded clone
* cargo fmt
* Rename default_keymaps to default
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r-- | helix-term/src/ui/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 2273477f..6242ea2e 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -37,6 +37,7 @@ pub fn regex_prompt( let doc_id = view.doc; let snapshot = doc.selection(view.id).clone(); let offset_snapshot = view.offset; + let config = cx.editor.config(); let mut prompt = Prompt::new( prompt, @@ -65,7 +66,7 @@ pub fn regex_prompt( return; } - let case_insensitive = if cx.editor.config.search.smart_case { + let case_insensitive = if config.search.smart_case { !input.chars().any(char::is_uppercase) } else { false @@ -84,7 +85,7 @@ pub fn regex_prompt( fun(view, doc, regex, event); - view.ensure_cursor_in_view(doc, cx.editor.config.scrolloff); + view.ensure_cursor_in_view(doc, config.scrolloff); } Err(_err) => (), // TODO: mark command line as error } |