diff options
Diffstat (limited to 'alacritty_terminal/src/grid/mod.rs')
-rw-r--r-- | alacritty_terminal/src/grid/mod.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index 232201ec..8fdde0a4 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -3,11 +3,12 @@ use std::cmp::{max, min}; use std::ops::{Bound, Deref, Index, IndexMut, Range, RangeBounds}; +#[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; -use crate::ansi::{CharsetIndex, StandardCharset}; use crate::index::{Column, Line, Point}; use crate::term::cell::{Flags, ResetDiscriminant}; +use crate::vte::ansi::{CharsetIndex, StandardCharset}; pub mod resize; mod row; @@ -104,14 +105,15 @@ pub enum Scroll { /// ^ /// columns /// ``` -#[derive(Serialize, Deserialize, Clone, Debug)] +#[derive(Clone, Debug)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Grid<T> { /// Current cursor for writing data. - #[serde(skip)] + #[cfg_attr(feature = "serde", serde(skip))] pub cursor: Cursor<T>, /// Last saved cursor. - #[serde(skip)] + #[cfg_attr(feature = "serde", serde(skip))] pub saved_cursor: Cursor<T>, /// Lines in the grid. Each row holds a list of cells corresponding to the |