summaryrefslogtreecommitdiff
path: root/Terminal
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-08 00:21:02 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-08 00:21:02 +0100
commit04378d9063f3d9ea70dd3255761728bc2ceaa75d (patch)
treed206df14442a8f0713371d9ec9616565a6444be5 /Terminal
parent6d7f000ffc012b5837d4e2a8393abd81be534968 (diff)
downloadserenity-04378d9063f3d9ea70dd3255761728bc2ceaa75d.zip
Terminal: Use the same cursor rect for active/inactive windows.
Diffstat (limited to 'Terminal')
-rw-r--r--Terminal/Terminal.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Terminal/Terminal.cpp b/Terminal/Terminal.cpp
index d8c1800869..f5d1f09ef3 100644
--- a/Terminal/Terminal.cpp
+++ b/Terminal/Terminal.cpp
@@ -664,8 +664,7 @@ void Terminal::paint()
char ch = line.characters[column];
auto character_rect = glyph_rect(row, column);
if (!has_only_one_background_color || should_reverse_fill_for_cursor) {
- auto cell_rect = character_rect;
- cell_rect.inflate(0, m_line_spacing);
+ auto cell_rect = character_rect.inflated(0, m_line_spacing);
painter.fill_rect(cell_rect, lookup_color(should_reverse_fill_for_cursor ? attribute.foreground_color : attribute.background_color));
}
if (ch == ' ')
@@ -675,8 +674,8 @@ void Terminal::paint()
}
if (!m_in_active_window) {
- auto cursor_rect = glyph_rect(m_cursor_row, m_cursor_column);
- painter.draw_rect(cursor_rect, lookup_color(line(m_cursor_row).attributes[m_cursor_column].foreground_color));
+ auto cell_rect = glyph_rect(m_cursor_row, m_cursor_column).inflated(0, m_line_spacing);
+ painter.draw_rect(cell_rect, lookup_color(line(m_cursor_row).attributes[m_cursor_column].foreground_color));
}
line(m_cursor_row).did_paint = true;