summaryrefslogtreecommitdiff
path: root/helix-view/src/graphics.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-01-23 07:35:22 +0000
committerGitHub2022-01-23 07:35:22 +0000
commite2d2f19fd02419b8d144ae7a8a359d31bd773af7 (patch)
tree3abc1acd8a8c7f370dcf98ff4d886c4a80938bbd /helix-view/src/graphics.rs
parenta8e69e12f414b77824af9db4b0631f83d665effd (diff)
parentb3b4e78585d6a458954b8cb5b2c2a271a78b730b (diff)
Merge pull request #1154 from sudormrfbin/cursor-shape-new
Change cursor shape on mode change
Diffstat (limited to 'helix-view/src/graphics.rs')
-rw-r--r--helix-view/src/graphics.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs
index 5fd54c8c..6d0a9292 100644
--- a/helix-view/src/graphics.rs
+++ b/helix-view/src/graphics.rs
@@ -1,10 +1,12 @@
use bitflags::bitflags;
+use serde::{Deserialize, Serialize};
use std::{
cmp::{max, min},
str::FromStr,
};
-#[derive(Debug, Clone, Copy, PartialEq)]
+#[derive(Debug, Clone, Copy, PartialEq, Deserialize, Serialize)]
+#[serde(rename_all = "lowercase")]
/// UNSTABLE
pub enum CursorKind {
/// █
@@ -17,6 +19,12 @@ pub enum CursorKind {
Hidden,
}
+impl Default for CursorKind {
+ fn default() -> Self {
+ Self::Block
+ }
+}
+
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Margin {
pub vertical: u16,