fix dropping lines above cursor line
This commit is contained in:
parent
b40a5e243b
commit
dce5e68941
@ -113,7 +113,7 @@ int BufferPane::screen_rows_below_line(const Buffer::Iterator & line)
|
||||
return rows;
|
||||
}
|
||||
|
||||
int BufferPane::screen_rows_above_line(const Buffer::Iterator & line, std::list<std::pair<int, Buffer::Iterator>> backward_lines)
|
||||
int BufferPane::screen_rows_above_line(const Buffer::Iterator & line, std::list<std::pair<int, Buffer::Iterator>> & backward_lines)
|
||||
{
|
||||
Buffer::Iterator i = line;
|
||||
int rows = 0;
|
||||
@ -126,7 +126,7 @@ int BufferPane::screen_rows_above_line(const Buffer::Iterator & line, std::list<
|
||||
return rows;
|
||||
}
|
||||
|
||||
int BufferPane::update_cursor_row(std::list<std::pair<int, Buffer::Iterator>> backward_lines)
|
||||
int BufferPane::update_cursor_row(std::list<std::pair<int, Buffer::Iterator>> & backward_lines)
|
||||
{
|
||||
Buffer::Iterator start_of_line = *m_iterator;
|
||||
start_of_line.go_start_of_line();
|
||||
|
@ -38,8 +38,8 @@ protected:
|
||||
int rows_in_line(const Buffer::Iterator & start_of_line);
|
||||
int rows_in_line_with_iterator_offset(const Buffer::Iterator & start_of_line, const Buffer::Iterator & reference, int * iterator_row_offset);
|
||||
int screen_rows_below_line(const Buffer::Iterator & line);
|
||||
int screen_rows_above_line(const Buffer::Iterator & line, std::list<std::pair<int, Buffer::Iterator>> backward_lines);
|
||||
int update_cursor_row(std::list<std::pair<int, Buffer::Iterator>> backward_lines);
|
||||
int screen_rows_above_line(const Buffer::Iterator & line, std::list<std::pair<int, Buffer::Iterator>> & backward_lines);
|
||||
int update_cursor_row(std::list<std::pair<int, Buffer::Iterator>> & backward_lines);
|
||||
void walk_line(const Buffer::Iterator & start_of_line, std::function<void(int, int, int, int, const Buffer::Iterator &)> callback);
|
||||
int col_x(int col)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user