pub struct Store<I: ApplicationInfo> {
pub buffers: BufferStore<I>,
pub completions: CompletionStore,
pub digraphs: DigraphStore,
pub registers: RegisterStore,
pub cursors: CursorStore<I>,
pub commands: HistoryList<EditRope>,
pub searches: HistoryList<EditRope>,
pub application: I::Store,
}
Expand description
Global editing context
Fields§
§buffers: BufferStore<I>
Tracks what buffers have been created.
completions: CompletionStore
Tracks information used for text completions.
digraphs: DigraphStore
Tracks mapped digraphs.
registers: RegisterStore
Tracks the current value of each Register.
cursors: CursorStore<I>
Tracks globally-relevant cursors and cursor groups.
commands: HistoryList<EditRope>
Tracks previous commands.
searches: HistoryList<EditRope>
Tracks previous search expressions.
application: I::Store
Application-specific storage.
Implementations§
source§impl<I> Store<I>where
I: ApplicationInfo,
impl<I> Store<I>where
I: ApplicationInfo,
sourcepub fn new(application: I::Store) -> Self
pub fn new(application: I::Store) -> Self
Create a new Store using an already initialized application store.
Wrap this store so that it can be shared between threads.
sourcepub fn load_buffer(&mut self, id: I::ContentId) -> SharedBuffer<I>
pub fn load_buffer(&mut self, id: I::ContentId) -> SharedBuffer<I>
Get a buffer via its identifier.
sourcepub fn set_aborted_cmd<T: Into<EditRope>>(&mut self, text: T)
pub fn set_aborted_cmd<T: Into<EditRope>>(&mut self, text: T)
Add a command to the command history after the prompt has been aborted.
This will not update Register::LastCommand.
sourcepub fn set_aborted_search<T: Into<EditRope>>(&mut self, text: T)
pub fn set_aborted_search<T: Into<EditRope>>(&mut self, text: T)
Add a search query to the search history after the prompt has been aborted.
This will not update Register::LastSearch.
sourcepub fn set_last_cmd<T: Into<EditRope>>(&mut self, text: T)
pub fn set_last_cmd<T: Into<EditRope>>(&mut self, text: T)
Add a command to the command history, and set Register::LastCommand.
sourcepub fn set_last_search<T: Into<EditRope>>(&mut self, text: T)
pub fn set_last_search<T: Into<EditRope>>(&mut self, text: T)
Add a search query to the search history, and set Register::LastSearch.