Enum nvimpam_lib::event::Event[][src]

pub enum Event {
    LinesEvent {
        buf: Buffer,
        changedtick: u64,
        firstline: i64,
        lastline: i64,
        linedata: Vec<String>,
        more: bool,
    },
    ChangedTickEvent {
        buf: Buffer,
        changedtick: u64,
    },
    DetachEvent {
        buf: Buffer,
    },
    RefreshFolds,
    Quit,
}

The event list the main loop reacts to

Variants

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

Update notification for a new changedtick without a buffer change. Used by undo/redo.

Fields of ChangedTickEvent

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

Recreate and resend the folds

This plugin should quit. Currently only sent by the user directly.

Methods

impl Event
[src]

Run the event loop. The receiver receives the events from the handler.

The loop starts by enabling buffer events. It creates lines 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

impl Debug for Event
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Event

impl Sync for Event