on master help sign in
Suggestions for infobox changes

Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>

commit4c190ec9d9da49adedf2e14cd813725d979b42e8 authorIvan Tham <pickfire@riseup.net> dateTue 29 Jun 2021, 15:13 (5 years ago) parent8985c58
2 files changed+12−12
helix-term/src/commands.rs+4−4 helix-term/src/keymap.rs+8−8
helix-term/src/commands.rs+4−4
@@ -3406,18 +3406,18 @@ macro_rules! mode_info {
34063406 // TODO: how to use one expr for both pat and expr?
34073407 // TODO: how to use replaced function name as str at compile time?
34083408 // TODO: extend to support multiple keys, but first solve the other two
3409− {$name:literal, $cx:expr, $($key:expr => $func:expr; $funcs:literal),+,} => {
3409+ {$name:literal, $cx:expr, $($key:expr => $func:expr; $desc:literal),+,} => {
34103410 mode_info! {
34113411 $name, $cx,
3412− $($key; $key => $func; $funcs,)+
3412+ $($key; $key => $func; $desc,)+
34133413 }
34143414 };
3415− {$name:literal, $cx:expr, $($key:expr; $keyp:pat => $func:expr; $funcs:literal),+,} => {
3415+ {$name:literal, $cx:expr, $($key:expr; $keyp:pat => $func:expr; $desc:literal),+,} => {
34163416 $cx.editor.autoinfo = Some(Info::key(
34173417 $name,
34183418 vec![
34193419 $(
3420− (vec![$key], $funcs),
3420+ (vec![$key], $desc),
34213421 )+
34223422 ],
34233423 ));
helix-term/src/keymap.rs+8−8
@@ -105,14 +105,14 @@ use std::{
105105macro_rules! key {
106106 ($key:ident) => {
107107 KeyEvent {
108− code: helix_view::keyboard::KeyCode::$key,
109− modifiers: helix_view::keyboard::KeyModifiers::NONE,
108+ code: ::helix_view::keyboard::KeyCode::$key,
109+ modifiers: ::helix_view::keyboard::KeyModifiers::NONE,
110110 }
111111 };
112112 ($($ch:tt)*) => {
113113 KeyEvent {
114− code: helix_view::keyboard::KeyCode::Char($($ch)*),
115− modifiers: helix_view::keyboard::KeyModifiers::NONE,
114+ code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
115+ modifiers: ::helix_view::keyboard::KeyModifiers::NONE,
116116 }
117117 };
118118}
@@ -120,8 +120,8 @@ macro_rules! key {
120120macro_rules! ctrl {
121121 ($($ch:tt)*) => {
122122 KeyEvent {
123− code: helix_view::keyboard::KeyCode::Char($($ch)*),
124− modifiers: helix_view::keyboard::KeyModifiers::CONTROL,
123+ code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
124+ modifiers: ::helix_view::keyboard::KeyModifiers::CONTROL,
125125 }
126126 };
127127}
@@ -129,8 +129,8 @@ macro_rules! ctrl {
129129macro_rules! alt {
130130 ($($ch:tt)*) => {
131131 KeyEvent {
132− code: helix_view::keyboard::KeyCode::Char($($ch)*),
133− modifiers: helix_view::keyboard::KeyModifiers::ALT,
132+ code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
133+ modifiers: ::helix_view::keyboard::KeyModifiers::ALT,
134134 }
135135 };
136136}