From 83a6c1a983cc791c494570d95ac19381bf7d92f8 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 25 Dec 2016 12:46:06 -0500 Subject: [PATCH] record screen layout when drawing --- src/gui/BufferPane.cc | 2 ++ src/gui/BufferPane.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/gui/BufferPane.cc b/src/gui/BufferPane.cc index 4a4519e..648977b 100644 --- a/src/gui/BufferPane.cc +++ b/src/gui/BufferPane.cc @@ -147,6 +147,7 @@ int BufferPane::update_cursor_row(std::list> & void BufferPane::draw() { + m_screen_lines.clear(); if (m_iterator->valid()) { std::list> backward_lines; @@ -168,6 +169,7 @@ void BufferPane::draw() } while (screen_row <= m_rows) { + m_screen_lines.push_back(std::pair(screen_row, i)); screen_row += draw_buffer_line(screen_row, i); if (!i.go_next_line()) { diff --git a/src/gui/BufferPane.h b/src/gui/BufferPane.h index 520ed1a..348b211 100644 --- a/src/gui/BufferPane.h +++ b/src/gui/BufferPane.h @@ -61,6 +61,7 @@ protected: int m_cursor_screen_row; int m_cursor_virtual_column; std::shared_ptr m_iterator; + std::list> m_screen_lines; }; #endif