fix expanding command buffer pane when cursor wraps to next line
This commit is contained in:
parent
8d6112ed32
commit
bb8dc6a6a4
@ -85,9 +85,11 @@ void BufferPane::walk_line(const Buffer::Iterator & start_of_line, std::function
|
||||
int BufferPane::calculate_rows_in_line(const Buffer::Iterator & start_of_line)
|
||||
{
|
||||
int saved_row_offset = 0;
|
||||
walk_line(start_of_line, [&saved_row_offset](int row_offset, int screen_column, int virtual_column, int character_width, const Buffer::Iterator & i) {
|
||||
walk_line(start_of_line, [this, &saved_row_offset](int row_offset, int screen_column, int virtual_column, int character_width, const Buffer::Iterator & i) {
|
||||
uint32_t code_point = *i;
|
||||
if ((code_point != '\n') && (code_point != Buffer::Iterator::INVALID_CODE_POINT))
|
||||
if (m_command_mode ||
|
||||
((code_point != '\n') &&
|
||||
(code_point != Buffer::Iterator::INVALID_CODE_POINT)))
|
||||
{
|
||||
saved_row_offset = row_offset;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user