summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgmont Koblinger <egmont@gmail.com>2015-10-02 19:38:38 +0200
committerEgmont Koblinger <egmont@gmail.com>2015-10-02 19:38:38 +0200
commitd69645413f35ba6ebff9359a89bd121733a2e475 (patch)
tree83d96ff5a8bd7bc9bf0ae288163768eaa9c1e73b
parentd4ac47aa0bad6fb6a5c2b12b69631bf57a306b1f (diff)
downloadvte-d69645413f35ba6ebff9359a89bd121733a2e475.tar.gz
widget: Fix painting the preedit text near the right margin
https://bugzilla.gnome.org/show_bug.cgi?id=755668
-rw-r--r--src/vte.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vte.cc b/src/vte.cc
index 2643d1e8..40a19360 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -776,9 +776,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,