on master help sign in
Suggestions for infobox changes
4c190ecIvan Tham
helix-term/src/commands.rs+4−4
@@ -3406,18 +3406,18 @@ macro_rules! mode_info {
3406 // TODO: how to use one expr for both pat and expr?
3406 // TODO: how to use one expr for both pat and expr?
3407 // TODO: how to use replaced function name as str at compile time?
3407 // TODO: how to use replaced function name as str at compile time?
3408 // TODO: extend to support multiple keys, but first solve the other two
3408 // 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),+,} => {
3410 mode_info! {
3410 mode_info! {
3411 $name, $cx,
3411 $name, $cx,
3412− $($key; $key => $func; $funcs,)+
3412+ $($key; $key => $func; $desc,)+
3413 }
3413 }
3414 };
3414 };
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),+,} => {
3416 $cx.editor.autoinfo = Some(Info::key(
3416 $cx.editor.autoinfo = Some(Info::key(
3417 $name,
3417 $name,
3418 vec![
3418 vec![
3419 $(
3419 $(
3420− (vec![$key], $funcs),
3420+ (vec![$key], $desc),
3421 )+
3421 )+
3422 ],
3422 ],
3423 ));
3423 ));
helix-term/src/keymap.rs+8−8
@@ -105,14 +105,14 @@ use std::{
105macro_rules! key {
105macro_rules! key {
106 ($key:ident) => {
106 ($key:ident) => {
107 KeyEvent {
107 KeyEvent {
108− code: helix_view::keyboard::KeyCode::$key,
108+ code: ::helix_view::keyboard::KeyCode::$key,
109− modifiers: helix_view::keyboard::KeyModifiers::NONE,
109+ modifiers: ::helix_view::keyboard::KeyModifiers::NONE,
110 }
110 }
111 };
111 };
112 ($($ch:tt)*) => {
112 ($($ch:tt)*) => {
113 KeyEvent {
113 KeyEvent {
114− code: helix_view::keyboard::KeyCode::Char($($ch)*),
114+ code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
115− modifiers: helix_view::keyboard::KeyModifiers::NONE,
115+ modifiers: ::helix_view::keyboard::KeyModifiers::NONE,
116 }
116 }
117 };
117 };
118}
118}
@@ -120,8 +120,8 @@ macro_rules! key {
120macro_rules! ctrl {
120macro_rules! ctrl {
121 ($($ch:tt)*) => {
121 ($($ch:tt)*) => {
122 KeyEvent {
122 KeyEvent {
123− code: helix_view::keyboard::KeyCode::Char($($ch)*),
123+ code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
124− modifiers: helix_view::keyboard::KeyModifiers::CONTROL,
124+ modifiers: ::helix_view::keyboard::KeyModifiers::CONTROL,
125 }
125 }
126 };
126 };
127}
127}
@@ -129,8 +129,8 @@ macro_rules! ctrl {
129macro_rules! alt {
129macro_rules! alt {
130 ($($ch:tt)*) => {
130 ($($ch:tt)*) => {
131 KeyEvent {
131 KeyEvent {
132− code: helix_view::keyboard::KeyCode::Char($($ch)*),
132+ code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
133− modifiers: helix_view::keyboard::KeyModifiers::ALT,
133+ modifiers: ::helix_view::keyboard::KeyModifiers::ALT,
134 }
134 }
135 };
135 };
136}
136}