fix cursor being hidden in command mode on empty lines

This commit is contained in:
Josh Holtrop 2016-12-31 12:15:48 -05:00
parent 46f5059a0b
commit a2e5f7428c

View File

@ -226,7 +226,7 @@ int BufferPane::draw_buffer_line(int screen_row, const Buffer::Iterator & start_
bool wrap = (code_point == '\t'); bool wrap = (code_point == '\t');
int row = draw_row; int row = draw_row;
int col = screen_column; int col = screen_column;
int w = insert_mode() ? 1 : character_width; int w = insert_mode() ? 1 : std::max(1, character_width);
while (w--) while (w--)
{ {
draw_cursor(col_x(col), row_y(row)); draw_cursor(col_x(col), row_y(row));