LLDB mainline
lldb_private::Editline Class Reference

Instances of Editline provide an abstraction over libedit's EditLine facility. More...

#include <Editline.h>

Public Member Functions

 Editline (const char *editor_name, FILE *input_file, lldb::LockableStreamFileSP output_stream_sp, lldb::LockableStreamFileSP error_stream_sp, bool color)
 ~Editline ()
void UseColor (bool use_color)
 Sets if editline should use color.
void SetPrompt (const char *prompt)
 Sets a string to be used as a prompt, or combined with a line number to form a prompt.
void SetContinuationPrompt (const char *continuation_prompt)
 Sets an alternate string to be used as a prompt for the second line and beyond in multi-line editing scenarios.
void TerminalSizeChanged ()
 Call when the terminal size changes.
const char * GetPrompt ()
 Returns the prompt established by SetPrompt.
uint32_t GetCurrentLine ()
 Returns the index of the line currently being edited.
bool Interrupt ()
 Interrupt the current edit as if ^C was pressed.
bool Cancel ()
 Cancel this edit and obliterate all trace of it.
void SetSuggestionCallback (SuggestionCallbackType callback)
 Register a callback for autosuggestion.
void SetRedrawCallback (RedrawCallbackType callback)
 Register a callback for redrawing the statusline.
void SetAutoCompleteCallback (CompleteCallbackType callback)
 Register a callback for the tab key.
void SetIsInputCompleteCallback (IsInputCompleteCallbackType callback)
 Register a callback for testing whether multi-line input is complete.
void SetFixIndentationCallback (FixIndentationCallbackType callback, const char *indent_chars)
 Register a callback for determining the appropriate indentation for a line when creating a newline.
void SetPromptAnsiPrefix (std::string prefix)
void SetPromptAnsiSuffix (std::string suffix)
void SetSuggestionAnsiPrefix (std::string prefix)
void SetSuggestionAnsiSuffix (std::string suffix)
bool GetLine (std::string &line, bool &interrupted)
 Prompts for and reads a single line of user input.
bool GetLines (int first_line_number, StringList &lines, bool &interrupted)
 Prompts for and reads a multi-line batch of user input.
void PrintAsync (lldb::LockableStreamFileSP stream_sp, const char *s, size_t len)
StringList GetInputAsStringList (int line_count=UINT32_MAX)
 Convert the current input lines into a UTF8 StringList.
size_t GetTerminalWidth ()
size_t GetTerminalHeight ()
void Refresh ()

Static Public Member Functions

static EditlineInstanceFor (::EditLine *editline)
 Uses the user data storage of EditLine to retrieve an associated instance of Editline.
static void DisplayCompletions (Editline &editline, llvm::ArrayRef< CompletionResult::Completion > results)

Private Member Functions

void SetBaseLineNumber (int line_number)
 Sets the lowest line number for multi-line editing sessions.
std::string PromptForIndex (int line_index)
 Returns the complete prompt by combining the prompt or continuation prompt with line numbers as appropriate.
void SetCurrentLine (int line_index)
 Sets the current line index between line edits to allow free movement between lines.
size_t GetPromptWidth ()
 Determines the width of the prompt in characters.
bool IsEmacs ()
 Returns true if the underlying EditLine session's keybindings are Emacs-based, or false if they are VI-based.
bool IsOnlySpaces ()
 Returns true if the current EditLine buffer contains nothing but spaces, or is empty.
int GetLineIndexForLocation (CursorLocation location, int cursor_row)
 Helper method used by MoveCursor to determine relative line position.
void MoveCursor (CursorLocation from, CursorLocation to)
 Move the cursor from one well-established location to another using relative line positioning and absolute column positioning.
void DisplayInput (int firstIndex=0)
 Clear from cursor position to bottom of screen and print input lines including prompts, optionally starting from a specific line.
int CountRowsForLine (const EditLineStringType &content)
 Counts the number of rows a given line of content will end up occupying, taking into account both the preceding prompt and a single trailing space occupied by a cursor when at the end of the line.
void SaveEditedLine ()
 Save the line currently being edited.
unsigned char RecallHistory (HistoryOperation op)
 Replaces the current multi-line session with the next entry from history.
int GetCharacter (EditLineGetCharType *c)
 Character reading implementation for EditLine that supports our multi-line editing trickery.
const char * Prompt ()
 Prompt implementation for EditLine.
unsigned char BreakLineCommand (int ch)
 Line break command used when meta+return is pressed in multi-line mode.
unsigned char EndOrAddLineCommand (int ch)
 Command used when return is pressed in multi-line mode.
unsigned char DeleteNextCharCommand (int ch)
 Delete command used when delete is pressed in multi-line mode.
unsigned char DeletePreviousCharCommand (int ch)
 Delete command used when backspace is pressed in multi-line mode.
unsigned char PreviousLineCommand (int ch)
 Line navigation command used when ^P or up arrow are pressed in multi-line mode.
unsigned char NextLineCommand (int ch)
 Line navigation command used when ^N or down arrow are pressed in multi-line mode.
unsigned char PreviousHistoryCommand (int ch)
 History navigation command used when Alt + up arrow is pressed in multi-line mode.
unsigned char NextHistoryCommand (int ch)
 History navigation command used when Alt + down arrow is pressed in multi-line mode.
unsigned char BufferStartCommand (int ch)
 Buffer start command used when Esc < is typed in multi-line emacs mode.
unsigned char BufferEndCommand (int ch)
 Buffer end command used when Esc > is typed in multi-line emacs mode.
unsigned char TabCommand (int ch)
 Context-sensitive tab insertion or code completion command used when the tab key is typed.
unsigned char ApplyAutosuggestCommand (int ch)
 Apply autosuggestion part in gray as editline.
unsigned char TypedCharacter (int ch)
 Command used when a character is typed.
unsigned char FixIndentationCommand (int ch)
 Respond to normal character insertion by fixing line indentation.
unsigned char RevertLineCommand (int ch)
 Revert line command used when moving between lines.
void ConfigureEditor (bool multiline)
 Ensures that the current EditLine instance is properly configured for single or multi-line editing.
bool CompleteCharacter (char ch, EditLineGetCharType &out)
void ApplyTerminalSizeChange ()
void AddFunctionToEditLine (const EditLineCharType *command, const EditLineCharType *helptext, EditlineCommandCallbackType callbackFn)
void SetEditLinePromptCallback (EditlinePromptCallbackType callbackFn)
void SetGetCharacterFunction (EditlineGetCharCallbackType callbackFn)

Private Attributes

::EditLine * m_editline = nullptr
EditlineHistorySP m_history_sp
bool m_in_history = false
std::vector< EditLineStringTypem_live_history_lines
bool m_multiline_enabled = false
std::vector< EditLineStringTypem_input_lines
EditorStatus m_editor_status
int m_terminal_width = 0
int m_terminal_height = 0
int m_base_line_number = 0
unsigned m_current_line_index = 0
int m_current_line_rows = -1
int m_revert_cursor_index = 0
int m_line_number_digits = 3
std::string m_set_prompt
std::string m_set_continuation_prompt
std::string m_current_prompt
bool m_needs_prompt_repaint = false
volatile std::sig_atomic_t m_terminal_size_has_changed = 0
std::string m_editor_name
FILE * m_input_file
lldb::LockableStreamFileSP m_output_stream_sp
lldb::LockableStreamFileSP m_error_stream_sp
std::optional< LockedStreamFilem_locked_output
ConnectionFileDescriptor m_input_connection
IsInputCompleteCallbackType m_is_input_complete_callback
FixIndentationCallbackType m_fix_indentation_callback
const char * m_fix_indentation_callback_chars = nullptr
CompleteCallbackType m_completion_callback
SuggestionCallbackType m_suggestion_callback
RedrawCallbackType m_redraw_callback
bool m_color
std::string m_prompt_ansi_prefix
std::string m_prompt_ansi_suffix
std::string m_suggestion_ansi_prefix
std::string m_suggestion_ansi_suffix
std::size_t m_previous_autosuggestion_size = 0

Detailed Description

Instances of Editline provide an abstraction over libedit's EditLine facility.

Both single- and multi-line editing are supported.

Definition at line 155 of file Editline.h.

Constructor & Destructor Documentation

◆ Editline()

◆ ~Editline()

Editline::~Editline ( )

Definition at line 1520 of file Editline.cpp.

References m_editline, and m_history_sp.

Member Function Documentation

◆ AddFunctionToEditLine()

void Editline::AddFunctionToEditLine ( const EditLineCharType * command,
const EditLineCharType * helptext,
EditlineCommandCallbackType callbackFn )
private

Definition at line 1240 of file Editline.cpp.

References el_wset, and m_editline.

Referenced by ConfigureEditor().

◆ ApplyAutosuggestCommand()

unsigned char Editline::ApplyAutosuggestCommand ( int ch)
private

Apply autosuggestion part in gray as editline.

Definition at line 1185 of file Editline.cpp.

References m_editline, and m_suggestion_callback.

Referenced by ConfigureEditor().

◆ ApplyTerminalSizeChange()

void Editline::ApplyTerminalSizeChange ( )
private

◆ BreakLineCommand()

◆ BufferEndCommand()

unsigned char Editline::BufferEndCommand ( int ch)
private

Buffer end command used when Esc > is typed in multi-line emacs mode.

Definition at line 942 of file Editline.cpp.

References lldb_private::line_editor::BlockEnd, lldb_private::line_editor::EditingCursor, lldb_private::line_editor::EditingPrompt, m_input_lines, MoveCursor(), SaveEditedLine(), and SetCurrentLine().

Referenced by ConfigureEditor().

◆ BufferStartCommand()

unsigned char Editline::BufferStartCommand ( int ch)
private

Buffer start command used when Esc < is typed in multi-line emacs mode.

Definition at line 934 of file Editline.cpp.

References lldb_private::line_editor::BlockStart, lldb_private::line_editor::EditingCursor, m_revert_cursor_index, MoveCursor(), SaveEditedLine(), and SetCurrentLine().

Referenced by ConfigureEditor().

◆ Cancel()

◆ CompleteCharacter()

bool Editline::CompleteCharacter ( char ch,
EditLineGetCharType & out )
private

Definition at line 1713 of file Editline.cpp.

References m_input_connection.

Referenced by GetCharacter().

◆ ConfigureEditor()

◆ CountRowsForLine()

int Editline::CountRowsForLine ( const EditLineStringType & content)
private

Counts the number of rows a given line of content will end up occupying, taking into account both the preceding prompt and a single trailing space occupied by a cursor when at the end of the line.

Definition at line 442 of file Editline.cpp.

References lldb_private::ansi::ColumnWidth(), m_terminal_width, and PromptForIndex().

Referenced by DeletePreviousCharCommand(), GetLineIndexForLocation(), and PreviousLineCommand().

◆ DeleteNextCharCommand()

◆ DeletePreviousCharCommand()

◆ DisplayCompletions()

void Editline::DisplayCompletions ( Editline & editline,
llvm::ArrayRef< CompletionResult::Completion > results )
static

Account for the current line, the line showing "Available completions" before and the line saying "More" after.

Definition at line 1053 of file Editline.cpp.

References ANSI_CLEAR_BELOW, lldb_private::line_editor::Editing, Editline(), el_wgetc, lldb_private::StreamFile::GetFile(), lldb_private::File::GetStream(), GetTerminalHeight(), GetTerminalWidth(), lldb_private::line_editor::Interrupted, m_editline, m_editor_status, m_output_stream_sp, and PrintCompletion().

Referenced by TabCommand().

◆ DisplayInput()

void Editline::DisplayInput ( int firstIndex = 0)
private

Clear from cursor position to bottom of screen and print input lines including prompts, optionally starting from a specific line.

Lines are drawn with an extra space at the end to reserve room for the rightmost cursor position.

Definition at line 425 of file Editline.cpp.

References ANSI_CLEAR_BELOW, ANSI_SET_COLUMN_N, EditLineStringFormatSpec, lldb_private::StreamFile::GetFile(), lldb_private::File::GetStream(), m_input_lines, m_output_stream_sp, m_prompt_ansi_prefix, m_prompt_ansi_suffix, and PromptForIndex().

Referenced by BreakLineCommand(), DeleteNextCharCommand(), DeletePreviousCharCommand(), FixIndentationCommand(), GetCharacter(), GetLines(), PrintAsync(), RecallHistory(), and TabCommand().

◆ EndOrAddLineCommand()

◆ FixIndentationCommand()

◆ GetCharacter()

◆ GetCurrentLine()

uint32_t Editline::GetCurrentLine ( )

Returns the index of the line currently being edited.

Definition at line 1584 of file Editline.cpp.

References m_current_line_index.

◆ GetInputAsStringList()

StringList Editline::GetInputAsStringList ( int line_count = UINT32_MAX)

Convert the current input lines into a UTF8 StringList.

Definition at line 455 of file Editline.cpp.

References lldb_private::StringList::AppendString(), and m_input_lines.

Referenced by BreakLineCommand(), EndOrAddLineCommand(), FixIndentationCommand(), GetLines(), and NextLineCommand().

◆ GetLine()

◆ GetLineIndexForLocation()

int Editline::GetLineIndexForLocation ( CursorLocation location,
int cursor_row )
private

Helper method used by MoveCursor to determine relative line position.

Definition at line 373 of file Editline.cpp.

References lldb_private::line_editor::BlockEnd, CountRowsForLine(), lldb_private::line_editor::EditingCursor, lldb_private::line_editor::EditingPrompt, m_current_line_index, and m_input_lines.

Referenced by MoveCursor().

◆ GetLines()

◆ GetPrompt()

const char * Editline::GetPrompt ( )

Returns the prompt established by SetPrompt.

Definition at line 1582 of file Editline.cpp.

References m_set_prompt.

◆ GetPromptWidth()

size_t Editline::GetPromptWidth ( )
private

Determines the width of the prompt in characters.

The width is guaranteed to be the same for all lines of the current multi-line session.

Definition at line 353 of file Editline.cpp.

References lldb_private::ansi::ColumnWidth(), and PromptForIndex().

Referenced by ApplyTerminalSizeChange(), GetCharacter(), MoveCursor(), NextLineCommand(), and TypedCharacter().

◆ GetTerminalHeight()

size_t lldb_private::Editline::GetTerminalHeight ( )
inline

Definition at line 268 of file Editline.h.

References m_terminal_height.

Referenced by DisplayCompletions().

◆ GetTerminalWidth()

size_t lldb_private::Editline::GetTerminalWidth ( )
inline

Definition at line 266 of file Editline.h.

References m_terminal_width.

Referenced by DisplayCompletions().

◆ InstanceFor()

Editline * Editline::InstanceFor ( ::EditLine * editline)
static

Uses the user data storage of EditLine to retrieve an associated instance of Editline.

Definition at line 1502 of file Editline.cpp.

References Editline().

Referenced by ConfigureEditor().

◆ Interrupt()

◆ IsEmacs()

bool Editline::IsEmacs ( )
private

Returns true if the underlying EditLine session's keybindings are Emacs-based, or false if they are VI-based.

Definition at line 357 of file Editline.cpp.

References m_editline.

Referenced by ConfigureEditor().

◆ IsOnlySpaces()

bool Editline::IsOnlySpaces ( )
private

Returns true if the current EditLine buffer contains nothing but spaces, or is empty.

Definition at line 363 of file Editline.cpp.

References el_wline, LineInfoW, and m_editline.

Referenced by BreakLineCommand(), NextLineCommand(), and PreviousLineCommand().

◆ MoveCursor()

◆ NextHistoryCommand()

unsigned char Editline::NextHistoryCommand ( int ch)
private

History navigation command used when Alt + down arrow is pressed in multi-line mode.

Definition at line 868 of file Editline.cpp.

References lldb_private::line_editor::Newer, RecallHistory(), and SaveEditedLine().

Referenced by ConfigureEditor().

◆ NextLineCommand()

◆ PreviousHistoryCommand()

unsigned char Editline::PreviousHistoryCommand ( int ch)
private

History navigation command used when Alt + up arrow is pressed in multi-line mode.

Definition at line 862 of file Editline.cpp.

References lldb_private::line_editor::Older, RecallHistory(), and SaveEditedLine().

Referenced by ConfigureEditor().

◆ PreviousLineCommand()

◆ PrintAsync()

◆ Prompt()

const char * Editline::Prompt ( )
private

Prompt implementation for EditLine.

Definition at line 630 of file Editline.cpp.

References m_color, m_current_prompt, and m_needs_prompt_repaint.

Referenced by ConfigureEditor(), and GetCharacter().

◆ PromptForIndex()

std::string Editline::PromptForIndex ( int line_index)
private

Returns the complete prompt by combining the prompt or continuation prompt with line numbers as appropriate.

The line index is a zero-based index into the current multi-line session.

Definition at line 318 of file Editline.cpp.

References lldb_private::ansi::ColumnWidth(), lldb_private::StreamString::GetString(), m_base_line_number, m_line_number_digits, m_multiline_enabled, m_set_continuation_prompt, m_set_prompt, and lldb_private::Stream::Printf().

Referenced by CountRowsForLine(), DisplayInput(), GetPromptWidth(), and SetCurrentLine().

◆ RecallHistory()

◆ Refresh()

void Editline::Refresh ( )

Definition at line 1706 of file Editline.cpp.

References m_editline, and m_output_stream_sp.

◆ RevertLineCommand()

unsigned char Editline::RevertLineCommand ( int ch)
private

Revert line command used when moving between lines.

Definition at line 921 of file Editline.cpp.

References el_winsertstr, el_wline, LineInfoW, m_current_line_index, m_editline, m_input_lines, and m_revert_cursor_index.

Referenced by ConfigureEditor().

◆ SaveEditedLine()

◆ SetAutoCompleteCallback()

void lldb_private::Editline::SetAutoCompleteCallback ( CompleteCallbackType callback)
inline

Register a callback for the tab key.

Definition at line 208 of file Editline.h.

References m_completion_callback.

◆ SetBaseLineNumber()

void Editline::SetBaseLineNumber ( int line_number)
private

Sets the lowest line number for multi-line editing sessions.

A value of zero suppresses line number printing in the prompt.

Definition at line 312 of file Editline.cpp.

References m_base_line_number, and m_line_number_digits.

Referenced by GetLines().

◆ SetContinuationPrompt()

void Editline::SetContinuationPrompt ( const char * continuation_prompt)

Sets an alternate string to be used as a prompt for the second line and beyond in multi-line editing scenarios.

Definition at line 1541 of file Editline.cpp.

References m_set_continuation_prompt.

◆ SetCurrentLine()

void Editline::SetCurrentLine ( int line_index)
private

Sets the current line index between line edits to allow free movement between lines.

Updates the prompt to match.

Definition at line 348 of file Editline.cpp.

References m_current_line_index, m_current_prompt, and PromptForIndex().

Referenced by BreakLineCommand(), BufferEndCommand(), BufferStartCommand(), DeletePreviousCharCommand(), FixIndentationCommand(), GetLine(), GetLines(), NextLineCommand(), PreviousLineCommand(), and RecallHistory().

◆ SetEditLinePromptCallback()

void Editline::SetEditLinePromptCallback ( EditlinePromptCallbackType callbackFn)
private

Definition at line 1246 of file Editline.cpp.

References m_editline.

Referenced by ConfigureEditor().

◆ SetFixIndentationCallback()

void lldb_private::Editline::SetFixIndentationCallback ( FixIndentationCallbackType callback,
const char * indent_chars )
inline

Register a callback for determining the appropriate indentation for a line when creating a newline.

An optional set of insertable characters can also trigger the callback.

Definition at line 220 of file Editline.h.

References m_fix_indentation_callback, and m_fix_indentation_callback_chars.

◆ SetGetCharacterFunction()

void Editline::SetGetCharacterFunction ( EditlineGetCharCallbackType callbackFn)
private

Definition at line 1251 of file Editline.cpp.

References el_wset, and m_editline.

Referenced by ConfigureEditor().

◆ SetIsInputCompleteCallback()

void lldb_private::Editline::SetIsInputCompleteCallback ( IsInputCompleteCallbackType callback)
inline

Register a callback for testing whether multi-line input is complete.

Definition at line 213 of file Editline.h.

References m_is_input_complete_callback.

◆ SetPrompt()

void Editline::SetPrompt ( const char * prompt)

Sets a string to be used as a prompt, or combined with a line number to form a prompt.

Definition at line 1537 of file Editline.cpp.

References m_set_prompt.

◆ SetPromptAnsiPrefix()

void lldb_private::Editline::SetPromptAnsiPrefix ( std::string prefix)
inline

Definition at line 226 of file Editline.h.

References m_color, and m_prompt_ansi_prefix.

◆ SetPromptAnsiSuffix()

void lldb_private::Editline::SetPromptAnsiSuffix ( std::string suffix)
inline

Definition at line 233 of file Editline.h.

References m_color, and m_prompt_ansi_suffix.

◆ SetRedrawCallback()

void lldb_private::Editline::SetRedrawCallback ( RedrawCallbackType callback)
inline

Register a callback for redrawing the statusline.

Definition at line 203 of file Editline.h.

References m_redraw_callback.

◆ SetSuggestionAnsiPrefix()

void lldb_private::Editline::SetSuggestionAnsiPrefix ( std::string prefix)
inline

Definition at line 240 of file Editline.h.

References m_color, and m_suggestion_ansi_prefix.

◆ SetSuggestionAnsiSuffix()

void lldb_private::Editline::SetSuggestionAnsiSuffix ( std::string suffix)
inline

Definition at line 247 of file Editline.h.

References m_color, and m_suggestion_ansi_suffix.

◆ SetSuggestionCallback()

void lldb_private::Editline::SetSuggestionCallback ( SuggestionCallbackType callback)
inline

Register a callback for autosuggestion.

Definition at line 198 of file Editline.h.

References m_suggestion_callback.

◆ TabCommand()

◆ TerminalSizeChanged()

void Editline::TerminalSizeChanged ( )

Call when the terminal size changes.

Definition at line 1546 of file Editline.cpp.

References m_terminal_size_has_changed.

◆ TypedCharacter()

◆ UseColor()

void Editline::UseColor ( bool use_color)

Sets if editline should use color.

Definition at line 1109 of file Editline.cpp.

References m_color.

Member Data Documentation

◆ m_base_line_number

int lldb_private::Editline::m_base_line_number = 0
private

Definition at line 406 of file Editline.h.

Referenced by PromptForIndex(), and SetBaseLineNumber().

◆ m_color

bool lldb_private::Editline::m_color
private

◆ m_completion_callback

CompleteCallbackType lldb_private::Editline::m_completion_callback
private

Definition at line 430 of file Editline.h.

Referenced by SetAutoCompleteCallback(), and TabCommand().

◆ m_current_line_index

◆ m_current_line_rows

int lldb_private::Editline::m_current_line_rows = -1
private

Definition at line 408 of file Editline.h.

Referenced by ApplyTerminalSizeChange(), GetCharacter(), GetLines(), and NextLineCommand().

◆ m_current_prompt

std::string lldb_private::Editline::m_current_prompt
private

Definition at line 413 of file Editline.h.

Referenced by Prompt(), and SetCurrentLine().

◆ m_editline

◆ m_editor_name

std::string lldb_private::Editline::m_editor_name
private

Definition at line 416 of file Editline.h.

Referenced by ConfigureEditor(), and Editline().

◆ m_editor_status

EditorStatus lldb_private::Editline::m_editor_status
private

◆ m_error_stream_sp

lldb::LockableStreamFileSP lldb_private::Editline::m_error_stream_sp
private

Definition at line 419 of file Editline.h.

Referenced by Editline().

◆ m_fix_indentation_callback

FixIndentationCallbackType lldb_private::Editline::m_fix_indentation_callback
private

◆ m_fix_indentation_callback_chars

const char* lldb_private::Editline::m_fix_indentation_callback_chars = nullptr
private

Definition at line 428 of file Editline.h.

Referenced by ConfigureEditor(), and SetFixIndentationCallback().

◆ m_history_sp

EditlineHistorySP lldb_private::Editline::m_history_sp
private

Definition at line 398 of file Editline.h.

Referenced by ConfigureEditor(), Editline(), GetLine(), GetLines(), RecallHistory(), and ~Editline().

◆ m_in_history

bool lldb_private::Editline::m_in_history = false
private

Definition at line 399 of file Editline.h.

Referenced by GetLine(), GetLines(), and RecallHistory().

◆ m_input_connection

ConnectionFileDescriptor lldb_private::Editline::m_input_connection
private

Definition at line 423 of file Editline.h.

Referenced by Cancel(), CompleteCharacter(), Editline(), GetCharacter(), and Interrupt().

◆ m_input_file

FILE* lldb_private::Editline::m_input_file
private

Definition at line 417 of file Editline.h.

Referenced by BreakLineCommand(), ConfigureEditor(), Editline(), and EndOrAddLineCommand().

◆ m_input_lines

◆ m_is_input_complete_callback

IsInputCompleteCallbackType lldb_private::Editline::m_is_input_complete_callback
private

Definition at line 425 of file Editline.h.

Referenced by EndOrAddLineCommand(), and SetIsInputCompleteCallback().

◆ m_line_number_digits

int lldb_private::Editline::m_line_number_digits = 3
private

Definition at line 410 of file Editline.h.

Referenced by PromptForIndex(), and SetBaseLineNumber().

◆ m_live_history_lines

std::vector<EditLineStringType> lldb_private::Editline::m_live_history_lines
private

Definition at line 400 of file Editline.h.

Referenced by RecallHistory().

◆ m_locked_output

std::optional<LockedStreamFile> lldb_private::Editline::m_locked_output
private

Definition at line 421 of file Editline.h.

Referenced by GetCharacter(), GetLine(), and GetLines().

◆ m_multiline_enabled

bool lldb_private::Editline::m_multiline_enabled = false
private

Definition at line 401 of file Editline.h.

Referenced by ConfigureEditor(), GetCharacter(), and PromptForIndex().

◆ m_needs_prompt_repaint

bool lldb_private::Editline::m_needs_prompt_repaint = false
private

Definition at line 414 of file Editline.h.

Referenced by GetCharacter(), and Prompt().

◆ m_output_stream_sp

◆ m_previous_autosuggestion_size

std::size_t lldb_private::Editline::m_previous_autosuggestion_size = 0
private

Definition at line 440 of file Editline.h.

Referenced by TypedCharacter().

◆ m_prompt_ansi_prefix

std::string lldb_private::Editline::m_prompt_ansi_prefix
private

Definition at line 435 of file Editline.h.

Referenced by DisplayInput(), GetCharacter(), and SetPromptAnsiPrefix().

◆ m_prompt_ansi_suffix

std::string lldb_private::Editline::m_prompt_ansi_suffix
private

Definition at line 436 of file Editline.h.

Referenced by DisplayInput(), GetCharacter(), and SetPromptAnsiSuffix().

◆ m_redraw_callback

RedrawCallbackType lldb_private::Editline::m_redraw_callback
private

Definition at line 432 of file Editline.h.

Referenced by GetCharacter(), and SetRedrawCallback().

◆ m_revert_cursor_index

int lldb_private::Editline::m_revert_cursor_index = 0
private

◆ m_set_continuation_prompt

std::string lldb_private::Editline::m_set_continuation_prompt
private

Definition at line 412 of file Editline.h.

Referenced by PromptForIndex(), and SetContinuationPrompt().

◆ m_set_prompt

std::string lldb_private::Editline::m_set_prompt
private

Definition at line 411 of file Editline.h.

Referenced by GetPrompt(), PromptForIndex(), and SetPrompt().

◆ m_suggestion_ansi_prefix

std::string lldb_private::Editline::m_suggestion_ansi_prefix
private

Definition at line 437 of file Editline.h.

Referenced by SetSuggestionAnsiPrefix(), and TypedCharacter().

◆ m_suggestion_ansi_suffix

std::string lldb_private::Editline::m_suggestion_ansi_suffix
private

Definition at line 438 of file Editline.h.

Referenced by SetSuggestionAnsiSuffix(), and TypedCharacter().

◆ m_suggestion_callback

SuggestionCallbackType lldb_private::Editline::m_suggestion_callback
private

◆ m_terminal_height

int lldb_private::Editline::m_terminal_height = 0
private

Definition at line 405 of file Editline.h.

Referenced by ApplyTerminalSizeChange(), and GetTerminalHeight().

◆ m_terminal_size_has_changed

volatile std::sig_atomic_t lldb_private::Editline::m_terminal_size_has_changed = 0
private

Definition at line 415 of file Editline.h.

Referenced by ApplyTerminalSizeChange(), GetCharacter(), and TerminalSizeChanged().

◆ m_terminal_width

int lldb_private::Editline::m_terminal_width = 0
private

The documentation for this class was generated from the following files: