vim: Fix some problems with visual mode testing (#8461)
Release Notes: - N/A
This commit is contained in:
parent
079c31fcac
commit
8cf36ae603
6 changed files with 43 additions and 25 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::{ops::Range, sync::Arc};
|
||||
use std::{fmt::Display, ops::Range, sync::Arc};
|
||||
|
||||
use collections::HashMap;
|
||||
use gpui::{Action, KeyContext};
|
||||
|
@ -17,6 +17,18 @@ pub enum Mode {
|
|||
VisualBlock,
|
||||
}
|
||||
|
||||
impl Display for Mode {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Mode::Normal => write!(f, "NORMAL"),
|
||||
Mode::Insert => write!(f, "INSERT"),
|
||||
Mode::Visual => write!(f, "VISUAL"),
|
||||
Mode::VisualLine => write!(f, "VISUAL LINE"),
|
||||
Mode::VisualBlock => write!(f, "VISUAL BLOCK"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Mode {
|
||||
pub fn is_visual(&self) -> bool {
|
||||
match self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue