Skip to main content

Module buffer

Module buffer 

Source
Expand description

Buffer extension utilities like line access, cursor‑based insertion, cursor position model, etc.

Structs§

CursorPosition
Represents the current cursor coordinates in the active Window.

Enums§

TextBoundary
Defines boundaries for text selection within lines.

Traits§

BufferExt
Extension trait for Buffer.

Functions§

create
Creates a new listed buffer.
get_absolute_path
Retrieves the absolute path of the specified buffer.
get_alternate_or_new
Retrieves the alternate buffer or creates a new one if none exists.
get_current_line
get_relative_path_to_cwd
Retrieves the relative path of the buffer from the current working directory.
open
Opens a file and positions the cursor at the specified line and column.
replace_text_and_notify_if_error
Replaces the text in the specified selection with the replacement lines.
set_current
Sets the specified buffer as the current buffer.