From 8d6112ed32c7fe7cff8bce5fe576b3d0caa0af8c Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 21 Jan 2017 12:31:50 -0500 Subject: [PATCH] fix drawing highlight when in insert mode at the end of a line --- src/gui/BufferPane.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/BufferPane.cc b/src/gui/BufferPane.cc index 7959ba5..d127d0c 100644 --- a/src/gui/BufferPane.cc +++ b/src/gui/BufferPane.cc @@ -314,7 +314,12 @@ int BufferPane::draw_buffer_line(int screen_row, const Buffer::Iterator & start_ { int row = draw_row; int col = screen_column; - for (int i = 0; i < character_width; i++) + int c_w = character_width; + if (insert_mode() && (code_point == '\n')) + { + c_w = 1; + } + for (int i = 0; i < c_w; i++) { draw_crosshair(col_x(col), row_y(row)); col++;