Apply cursor styles during paint

This makes the editor's cursor an IBeam and properly deals with nested cursor styles.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo
2022-04-22 10:54:18 -06:00
co-authored by Antonio Scandurra
parent 53bf7b61c0
commit 92f040df00
16 changed files with 124 additions and 96 deletions
+3 -1
View File
@@ -21,6 +21,7 @@ use anyhow::{anyhow, Result};
use async_task::Runnable;
pub use event::{Event, NavigationDirection};
use postage::oneshot;
use serde::Deserialize;
use std::{
any::Any,
path::{Path, PathBuf},
@@ -125,11 +126,12 @@ pub enum PromptLevel {
Critical,
}
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, Deserialize)]
pub enum CursorStyle {
Arrow,
ResizeLeftRight,
PointingHand,
IBeam,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]