summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@src.gnome.org>2002-08-30 22:35:58 +0000
committerNalin Dahyabhai <nalin@src.gnome.org>2002-08-30 22:35:58 +0000
commitd1948e0c98eca4162204c20dba98af2032510d22 (patch)
treee49d5eb143c0d56c97f34380fbc1c7022a4b3d63
parentfc877576767cde785d918dbf1e9025c76de3958d (diff)
downloadvte-d1948e0c98eca4162204c20dba98af2032510d22.tar.gz
Wrap correctly to avoid screwing up multicolumn characters.
* src/vte.c(vte_terminal_insert_char): Wrap correctly to avoid screwing up multicolumn characters.
-rw-r--r--ChangeLog4
-rw-r--r--src/vte.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d0a6498..c83164b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
2002-08-30 nalin
+ * src/vte.c(vte_terminal_insert_char): Wrap correctly to avoid screwing
+ up multicolumn characters.
+
+2002-08-30 nalin
* src/vte.c: Get smarter about when it's necessary to start messing
with our adjustments (Red Hat #73091). Change the way we clear the
screen so that all of the contents of the current screen become
diff --git a/src/vte.c b/src/vte.c
index d6b17ff1..a3d8eb65 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5514,14 +5514,15 @@ vte_terminal_insert_char(GtkWidget *widget, gunichar c,
/* If we're autowrapping here, do it. */
col = screen->cursor_current.col;
- if (col >= terminal->column_count) {
+ if (col + columns > terminal->column_count) {
if (terminal->pvt->flags.am) {
/* Wrap. */
screen->cursor_current.col = 0;
screen->cursor_current.row++;
} else {
/* Don't wrap, stay at the rightmost column. */
- screen->cursor_current.col = terminal->column_count - 1;
+ screen->cursor_current.col = terminal->column_count -
+ columns;
}
}