change cursor width to highlight full character for multi-column characters

This commit is contained in:
Josh Holtrop 2016-12-29 19:42:46 -05:00
parent 027e42da5d
commit 8181d8343b

View File

@ -223,8 +223,20 @@ int BufferPane::draw_buffer_line(int screen_row, const Buffer::Iterator & start_
{
if (i == *m_iterator)
{
/* TODO: highlight multi-column characters */
draw_cursor(x, y);
bool wrap = (code_point == '\t');
int row = draw_row;
int col = screen_column;
int w = character_width;
while (w--)
{
draw_cursor(col_x(col), row_y(row));
col++;
if (wrap && (col >= m_columns))
{
row++;
col = 0;
}
}
}
if ((code_point == '\n') || (code_point == Buffer::Iterator::INVALID_CODE_POINT))
{