[−][src]Enum nvimpam_lib::event::Event
The event list the main loop reacts to
Variants
LinesEvent
The update notification for a buffer change. Full lines only. Firstline
is zero-indexed (i.e. a change on the first line will have firstline = 0
). The range from firstline to lastline is end-exclusive. more
indicates if we need to expect another event of this type with more
lines, in case Neovim decided to split up the buffer (not yet
implemented).
Fields of LinesEvent
buf: Buffer | |
changedtick: u64 | |
firstline: i64 | |
lastline: i64 | |
linedata: Vec<String> | |
more: bool |
ChangedTickEvent
Update notification for a new changedtick
without a buffer change.
Used by undo/redo.
Fields of ChangedTickEvent
buf: Buffer | |
changedtick: u64 |
DetachEvent
Notification the liveupdates are ending. Possible causes:
- Closing all a buffer's windows (unless 'hidden' is enabled).
- Using |:edit| to reload the buffer
- reloading the buffer after it is changed from outside neovim.
Fields of DetachEvent
buf: Buffer |
RefreshFolds
Recreate and resend the folds
Quit
This plugin should quit. Currently only sent by the user directly.
Methods
impl Event
[src]
impl Event
pub fn event_loop(
receiver: &Receiver<Event>,
nvim: Neovim,
file: Option<OsString>
) -> Result<(), Error>
[src]
pub fn event_loop(
receiver: &Receiver<Event>,
nvim: Neovim,
file: Option<OsString>
) -> Result<(), Error>
Run the event loop. The receiver receives the events from the handler.
The loop starts by enabling
buffer events.
It creates lines
,
keywords
and a
foldlist
and updates them from the events
received. It calls resend_all
when the
foldlist
was created, or the
RefreshFolds
event was
sent.
Sending the Quit
event will
exit the loop and return from the function.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more