summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-07-30 23:32:49 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-07-30 23:32:49 +0000
commit84b4d31a6a4729e5e80577d77a07bea705c10dc7 (patch)
treef8f9f002a4d0b76185aca588db7d8ae135c2f3cb
parent5a42042fd8b6a1ebf395b9b4a748118572e825bc (diff)
Bug 158200 – terminal backspace behavior not set to UTF-8 mode Based on
2006-07-30 Behdad Esfahbod <behdad@gnome.org> Bug 158200 – terminal backspace behavior not set to UTF-8 mode Based on patch from Egmont Koblinger * src/vte.c (_vte_terminal_setup_utf8), (vte_terminal_set_encoding), (_vte_terminal_fork_basic), (vte_terminal_set_pty): Make sure UTF-8 state is correctly set when pty changes.
-rw-r--r--ChangeLog10
-rw-r--r--src/vte.c12
2 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index eb147be..e465d55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-07-30 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 158200 – terminal backspace behavior not set to UTF-8 mode
+ Based on patch from Egmont Koblinger
+
+ * src/vte.c (_vte_terminal_setup_utf8),
+ (vte_terminal_set_encoding), (_vte_terminal_fork_basic),
+ (vte_terminal_set_pty): Make sure UTF-8 state is correctly set
+ when pty changes.
+
2006-07-27 Behdad Esfahbod <behdad@gnome.org>
Bug 348814 – crash on Terminal
diff --git a/src/vte.c b/src/vte.c
index e2af7ce..5dcd046 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -1510,6 +1510,13 @@ vte_terminal_maybe_scroll_to_bottom(VteTerminal *terminal)
}
}
+static void
+_vte_terminal_setup_utf8 (VteTerminal *terminal)
+{
+ _vte_pty_set_utf8(terminal->pvt->pty_master,
+ (strcmp(terminal->pvt->encoding, "UTF-8") == 0));
+}
+
/**
* vte_terminal_set_encoding:
* @terminal: a #VteTerminal
@@ -1554,8 +1561,6 @@ vte_terminal_set_encoding(VteTerminal *terminal, const char *codeset)
/* Set the terminal's encoding to the new value. */
encoding_quark = g_quark_from_string(codeset);
terminal->pvt->encoding = g_quark_to_string(encoding_quark);
- _vte_pty_set_utf8(terminal->pvt->pty_master,
- (strcmp(codeset, "UTF-8") == 0));
/* Convert any buffered output bytes. */
if ((_vte_buffer_length(terminal->pvt->outgoing) > 0) &&
@@ -2608,6 +2613,7 @@ _vte_terminal_fork_basic(VteTerminal *terminal, const char *command,
default:
if (pid != 0) {
terminal->pvt->pty_master = i;
+ _vte_terminal_setup_utf8(terminal);
}
}
@@ -11105,6 +11111,8 @@ vte_terminal_set_pty(VteTerminal *terminal, int pty_master)
terminal->column_count,
terminal->row_count);
+ _vte_terminal_setup_utf8(terminal);
+
/* Open channels to listen for input on. */
_vte_terminal_connect_pty_read(terminal);