diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-02 15:51:45 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-02 15:51:45 +0200 |
| commit | d1492a10cdaf714074d29ad3366ab9c169d95b75 (patch) | |
| tree | 4192aa6825479f56332b3cd40d56913e48b95222 /src/state/view/mode.rs | |
| parent | c920f258f6c9b0623a841b7c27561fa1d09cef72 (diff) | |
add bartheme and barstate to sheetview
Diffstat (limited to 'src/state/view/mode.rs')
| -rw-r--r-- | src/state/view/mode.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/state/view/mode.rs b/src/state/view/mode.rs index 3fa9c63..63e6e5b 100644 --- a/src/state/view/mode.rs +++ b/src/state/view/mode.rs @@ -18,15 +18,15 @@ impl<'lua> FromLua<'lua> for Mode { match value.as_str().unwrap().to_lowercase().as_ref() { "normal" => Ok(Mode::Normal), "visual" => Ok(Mode::Visual), - "insert" => Ok(Mode::Visual), - "command" => Ok(Mode::Visual), + "insert" => Ok(Mode::Insert), + "command" => Ok(Mode::Command), _ => Err(mlua::Error::runtime( - "mode needs to be 'normal', 'visual' or 'insert'", + "mode needs to be 'normal', 'visual', 'insert' or 'command'", )), } } else { Err(mlua::Error::runtime( - "mode needs to be 'normal', 'visual' or 'insert'", + "mode needs to be 'normal', 'visual' 'insert', or 'command'", )) } } @@ -39,8 +39,8 @@ impl<'lua> IntoLua<'lua> for Mode { ) -> mlua::prelude::LuaResult<mlua::prelude::LuaValue<'lua>> { match self { Mode::Normal => "normal", - Mode::Visual => "insert", - Mode::Insert => "visual", + Mode::Visual => "visual", + Mode::Insert => "insert", Mode::Command => "command", } .into_lua(lua) |