Raxol.Terminal.Buffer.Eraser (Raxol v0.3.0)

View Source

Handles erasing parts of the Raxol.Terminal.ScreenBuffer. Includes functions for erasing lines, screen regions, and characters.

Summary

Functions

Clears the entire line using the provided default_style. Returns the updated buffer state.

Clears from the given position to the end of the line using the provided default_style. Returns the updated buffer state.

Clears from the beginning of the line to the given position using the provided default_style. Returns the updated buffer state.

Clears a rectangular region of the buffer by replacing cells with blank cells using the provided default_style. Returns the updated buffer state.

Clears the entire screen (main buffer grid) using the provided default_style. Returns the updated buffer state.

Clears the screen from the given position down using the provided default_style. Returns the updated buffer state.

Clears the screen from the beginning up to the given position using the provided default_style. Returns the updated buffer state.

Erases parts of the display based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_screen* functions. Does not handle type 3 (scrollback) - that should be handled by the Emulator.

Erases parts of the current line based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_line* functions.

Functions

clear_line(buffer, row, default_style)

Clears the entire line using the provided default_style. Returns the updated buffer state.

clear_line_from(buffer, row, col, default_style)

Clears from the given position to the end of the line using the provided default_style. Returns the updated buffer state.

clear_line_to(buffer, row, col, default_style)

Clears from the beginning of the line to the given position using the provided default_style. Returns the updated buffer state.

clear_region(buffer, top, left, bottom, right, default_style)

Clears a rectangular region of the buffer by replacing cells with blank cells using the provided default_style. Returns the updated buffer state.

clear_screen(buffer, default_style)

Clears the entire screen (main buffer grid) using the provided default_style. Returns the updated buffer state.

clear_screen_from(buffer, row, col, default_style)

Clears the screen from the given position down using the provided default_style. Returns the updated buffer state.

clear_screen_to(buffer, row, col, default_style)

Clears the screen from the beginning up to the given position using the provided default_style. Returns the updated buffer state.

erase_in_display(buffer, arg, type, default_style)

Erases parts of the display based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_screen* functions. Does not handle type 3 (scrollback) - that should be handled by the Emulator.

erase_in_line(buffer, arg, type, default_style)

Erases parts of the current line based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_line* functions.