LLDB mainline
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
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, FILE *output_file, FILE *error_file, std::recursive_mutex &output_mutex)
 
 ~Editline ()
 
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 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 (Stream *stream, 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 ()
 

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
 
FILE * m_output_file
 
FILE * m_error_file
 
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
 
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
 
std::recursive_mutex & m_output_mutex
 

Detailed Description

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

Both single- and multi-line editing are supported.

Definition at line 152 of file Editline.h.

Constructor & Destructor Documentation

◆ Editline()

Editline::Editline ( const char *  editor_name,
FILE *  input_file,
FILE *  output_file,
FILE *  error_file,
std::recursive_mutex &  output_mutex 
)

◆ ~Editline()

Editline::~Editline ( )

Definition at line 1485 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 1209 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 1155 of file Editline.cpp.

References m_editline, and m_suggestion_callback.

Referenced by ConfigureEditor().

◆ ApplyTerminalSizeChange()

void Editline::ApplyTerminalSizeChange ( )
private

◆ BreakLineCommand()

unsigned char Editline::BreakLineCommand ( int  ch)
private

◆ BufferEndCommand()

unsigned char Editline::BufferEndCommand ( int  ch)
private

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

Definition at line 917 of file Editline.cpp.

References 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 909 of file Editline.cpp.

References m_revert_cursor_index, MoveCursor(), SaveEditedLine(), and SetCurrentLine().

Referenced by ConfigureEditor().

◆ Cancel()

bool Editline::Cancel ( )

Cancel this edit and obliterate all trace of it.

Definition at line 1562 of file Editline.cpp.

References ANSI_CLEAR_BELOW, lldb_private::ConnectionFileDescriptor::InterruptRead(), m_editor_status, m_input_connection, m_output_file, m_output_mutex, and MoveCursor().

◆ CompleteCharacter()

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

Definition at line 1668 of file Editline.cpp.

References m_input_connection, and lldb_private::ConnectionFileDescriptor::Read().

Referenced by GetCharacter().

◆ ConfigureEditor()

void Editline::ConfigureEditor ( bool  multiline)
private

◆ 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 428 of file Editline.cpp.

References ColumnWidth(), m_terminal_width, and PromptForIndex().

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

◆ DeleteNextCharCommand()

unsigned char Editline::DeleteNextCharCommand ( int  ch)
private

Delete command used when delete is pressed in multi-line mode.

Definition at line 706 of file Editline.cpp.

References DisplayInput(), el_winsertstr, el_wline, LineInfoW, m_current_line_index, m_editline, m_editor_status, m_input_lines, m_output_file, MoveCursor(), and SaveEditedLine().

Referenced by ConfigureEditor().

◆ DeletePreviousCharCommand()

unsigned char Editline::DeletePreviousCharCommand ( int  ch)
private

Delete command used when backspace is pressed in multi-line mode.

Definition at line 745 of file Editline.cpp.

References ANSI_SET_COLUMN_N, ANSI_UP_N_ROWS, CountRowsForLine(), DisplayInput(), el_winsertstr, el_wline, LineInfoW, m_current_line_index, m_editline, m_input_lines, m_output_file, MoveCursor(), SaveEditedLine(), and SetCurrentLine().

Referenced by ConfigureEditor().

◆ 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 1028 of file Editline.cpp.

References ANSI_CLEAR_BELOW, el_wgetc, GetTerminalHeight(), GetTerminalWidth(), m_editline, m_editor_status, m_output_file, 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 413 of file Editline.cpp.

References ANSI_CLEAR_BELOW, ANSI_SET_COLUMN_N, EditLineStringFormatSpec, m_input_lines, m_output_file, m_prompt_ansi_prefix, m_prompt_ansi_suffix, and PromptForIndex().

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

◆ EndOrAddLineCommand()

unsigned char Editline::EndOrAddLineCommand ( int  ch)
private

◆ FixIndentationCommand()

unsigned char Editline::FixIndentationCommand ( int  ch)
private

◆ GetCharacter()

int Editline::GetCharacter ( EditLineGetCharType c)
private

◆ GetCurrentLine()

uint32_t Editline::GetCurrentLine ( )

Returns the index of the line currently being edited.

Definition at line 1549 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 441 of file Editline.cpp.

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

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

◆ GetLine()

bool Editline::GetLine ( std::string &  line,
bool &  interrupted 
)

◆ GetLineIndexForLocation()

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

Helper method used by MoveCursor to determine relative line position.

Definition at line 363 of file Editline.cpp.

References CountRowsForLine(), m_current_line_index, and m_input_lines.

Referenced by MoveCursor().

◆ GetLines()

bool Editline::GetLines ( int  first_line_number,
StringList lines,
bool &  interrupted 
)

◆ GetPrompt()

const char * Editline::GetPrompt ( )

Returns the prompt established by SetPrompt.

Definition at line 1547 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 345 of file Editline.cpp.

References ColumnWidth(), and PromptForIndex().

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

◆ GetTerminalHeight()

size_t lldb_private::Editline::GetTerminalHeight ( )
inline

Definition at line 243 of file Editline.h.

References m_terminal_height.

Referenced by DisplayCompletions().

◆ GetTerminalWidth()

size_t lldb_private::Editline::GetTerminalWidth ( )
inline

Definition at line 241 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 1467 of file Editline.cpp.

Referenced by ConfigureEditor().

◆ Interrupt()

bool Editline::Interrupt ( )

Interrupt the current edit as if ^C was pressed.

Definition at line 1551 of file Editline.cpp.

References lldb_private::ConnectionFileDescriptor::InterruptRead(), m_editor_status, m_input_connection, m_output_file, and m_output_mutex.

◆ 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 347 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 353 of file Editline.cpp.

References el_wline, LineInfoW, and m_editline.

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

◆ MoveCursor()

void Editline::MoveCursor ( CursorLocation  from,
CursorLocation  to 
)
private

◆ 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 843 of file Editline.cpp.

References RecallHistory(), and SaveEditedLine().

Referenced by ConfigureEditor().

◆ NextLineCommand()

unsigned char Editline::NextLineCommand ( int  ch)
private

◆ 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 837 of file Editline.cpp.

References RecallHistory(), and SaveEditedLine().

Referenced by ConfigureEditor().

◆ PreviousLineCommand()

unsigned char Editline::PreviousLineCommand ( int  ch)
private

Line navigation command used when ^P or up arrow are pressed in multi-line mode.

Definition at line 779 of file Editline.cpp.

References ANSI_CLEAR_BELOW, ANSI_SET_COLUMN_N, ANSI_UP_N_ROWS, CountRowsForLine(), IsOnlySpaces(), m_current_line_index, m_input_lines, m_output_file, MoveCursor(), RecallHistory(), SaveEditedLine(), and SetCurrentLine().

Referenced by ConfigureEditor().

◆ PrintAsync()

void Editline::PrintAsync ( Stream stream,
const char *  s,
size_t  len 
)

◆ Prompt()

const char * Editline::Prompt ( )
private

Prompt implementation for EditLine.

Definition at line 612 of file Editline.cpp.

References m_current_prompt, m_needs_prompt_repaint, m_prompt_ansi_prefix, and m_prompt_ansi_suffix.

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 310 of file Editline.cpp.

References 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()

unsigned char Editline::RecallHistory ( HistoryOperation  op)
private

◆ RevertLineCommand()

unsigned char Editline::RevertLineCommand ( int  ch)
private

Revert line command used when moving between lines.

Definition at line 896 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()

void Editline::SaveEditedLine ( )
private

◆ SetAutoCompleteCallback()

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

Register a callback for the tab key.

Definition at line 196 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 304 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 1506 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 340 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 1215 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 208 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 1220 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 201 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 1502 of file Editline.cpp.

References m_set_prompt.

◆ SetPromptAnsiPrefix()

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

Definition at line 214 of file Editline.h.

References m_prompt_ansi_prefix.

◆ SetPromptAnsiSuffix()

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

Definition at line 218 of file Editline.h.

References m_prompt_ansi_suffix.

◆ SetSuggestionAnsiPrefix()

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

Definition at line 222 of file Editline.h.

References m_suggestion_ansi_prefix.

◆ SetSuggestionAnsiSuffix()

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

Definition at line 226 of file Editline.h.

References m_suggestion_ansi_suffix.

◆ SetSuggestionCallback()

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

Register a callback for autosuggestion.

Definition at line 191 of file Editline.h.

References m_suggestion_callback.

◆ TabCommand()

unsigned char Editline::TabCommand ( int  ch)
private

◆ TerminalSizeChanged()

void Editline::TerminalSizeChanged ( )

Call when the terminal size changes.

Definition at line 1511 of file Editline.cpp.

References m_terminal_size_has_changed.

◆ TypedCharacter()

unsigned char Editline::TypedCharacter ( int  ch)
private

Member Data Documentation

◆ m_base_line_number

int lldb_private::Editline::m_base_line_number = 0
private

Definition at line 379 of file Editline.h.

Referenced by PromptForIndex(), and SetBaseLineNumber().

◆ m_completion_callback

CompleteCallbackType lldb_private::Editline::m_completion_callback
private

Definition at line 400 of file Editline.h.

Referenced by SetAutoCompleteCallback(), and TabCommand().

◆ m_current_line_index

unsigned lldb_private::Editline::m_current_line_index = 0
private

◆ m_current_line_rows

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

Definition at line 381 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 386 of file Editline.h.

Referenced by Prompt(), and SetCurrentLine().

◆ m_editline

::EditLine* lldb_private::Editline::m_editline = nullptr
private

◆ m_editor_name

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

Definition at line 389 of file Editline.h.

Referenced by ConfigureEditor(), and Editline().

◆ m_editor_status

EditorStatus lldb_private::Editline::m_editor_status
private

◆ m_error_file

FILE* lldb_private::Editline::m_error_file
private

Definition at line 392 of file Editline.h.

Referenced by ConfigureEditor().

◆ 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 398 of file Editline.h.

Referenced by ConfigureEditor(), and SetFixIndentationCallback().

◆ m_history_sp

EditlineHistorySP lldb_private::Editline::m_history_sp
private

Definition at line 371 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 372 of file Editline.h.

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

◆ m_input_connection

ConnectionFileDescriptor lldb_private::Editline::m_input_connection
private

Definition at line 393 of file Editline.h.

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

◆ m_input_file

FILE* lldb_private::Editline::m_input_file
private

Definition at line 390 of file Editline.h.

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

◆ m_input_lines

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

◆ m_is_input_complete_callback

IsInputCompleteCallbackType lldb_private::Editline::m_is_input_complete_callback
private

Definition at line 395 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 383 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 373 of file Editline.h.

Referenced by RecallHistory().

◆ m_multiline_enabled

bool lldb_private::Editline::m_multiline_enabled = false
private

Definition at line 374 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 387 of file Editline.h.

Referenced by GetCharacter(), and Prompt().

◆ m_output_file

FILE* lldb_private::Editline::m_output_file
private

◆ m_output_mutex

std::recursive_mutex& lldb_private::Editline::m_output_mutex
private

Definition at line 409 of file Editline.h.

Referenced by Cancel(), GetCharacter(), GetLine(), GetLines(), Interrupt(), and PrintAsync().

◆ m_previous_autosuggestion_size

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

Definition at line 408 of file Editline.h.

Referenced by TypedCharacter().

◆ m_prompt_ansi_prefix

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

Definition at line 403 of file Editline.h.

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

◆ m_prompt_ansi_suffix

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

Definition at line 404 of file Editline.h.

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

◆ 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 385 of file Editline.h.

Referenced by PromptForIndex(), and SetContinuationPrompt().

◆ m_set_prompt

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

Definition at line 384 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 405 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 406 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 378 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 388 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: