blob: b4a3f2f07c26610ebf504249889c1605f7fed947 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
use crate::{Buffer, Selection};
/// A state represents the current editor state of a single buffer.
pub struct State {
// TODO: maybe doc: ?
buffer: Buffer,
selection: Selection,
}
impl State {
#[must_use]
pub fn new(buffer: Buffer) -> Self {
Self {
buffer,
selection: Selection::single(0, 0),
}
}
// TODO: buf/selection accessors
// update/transact
// replaceSelection (transaction that replaces selection)
// changeByRange
// changes
// slice
//
// getters:
// tabSize
// indentUnit
// languageDataAt()
//
// config:
// indentation
// tabSize
// lineUnit
// syntax
// foldable
// changeFilter/transactionFilter
}
|