From 79aa91bf498d5eb2176754890d722b4b742a4a92 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 23 Sep 2017 10:34:00 -0400 Subject: [PATCH] draw crosshair below cursor for wrapped cursor lines --- src/gui/BufferPane.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/BufferPane.cc b/src/gui/BufferPane.cc index 0207a00..6273d7c 100644 --- a/src/gui/BufferPane.cc +++ b/src/gui/BufferPane.cc @@ -125,10 +125,17 @@ void BufferPane::draw_buffer_line(int screen_row, std::shared_ptr= m_columns)) + if (wrap && (col >= m_columns) && (i < (cwidth - 1))) { row++; col = 0; + /* We draw another crosshair row here so that it can be + * drawn before drawing the cursor over top of it. If we + * did not do this then the draw_crosshair for the next + * character on the new row would overwrite the wrapped + * part of the cursor. */ + draw_crosshair(0, row_y(row), col_x(m_columns)); + last_drawn_crosshair_row = row; } } }