summaryrefslogtreecommitdiff
path: root/src/vte.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/vte.cc')
-rw-r--r--src/vte.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vte.cc b/src/vte.cc
index 24d8b2b6..2b4619cd 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -760,9 +760,9 @@ _vte_invalidate_cursor_once(VteTerminal *terminal, gboolean periodic)
columns++;
}
}
- if (preedit_width > 0) {
- columns += preedit_width;
- columns++; /* one more for the preedit cursor */
+ columns = MAX(columns, preedit_width);
+ if (column + columns > terminal->pvt->column_count) {
+ column = MAX(0, terminal->pvt->column_count - columns);
}
_vte_debug_print(VTE_DEBUG_UPDATES,