Commit 3a36e1da authored by Christian Persch's avatar Christian Persch

widget: Always return non-null from vte_terminal_get_encoding

Terminal recently changed to storing nullptr instead of "UTF-8".
Make the public accessor continue to return "UTF-8" instead.
parent 02768597
......@@ -3623,7 +3623,7 @@ const char *
vte_terminal_get_encoding(VteTerminal *terminal)
{
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL);
return IMPL(terminal)->m_encoding;
return WIDGET(terminal)->encoding();
}
/**
......
......@@ -97,6 +97,11 @@ public:
int hscroll_policy() const noexcept { return m_terminal->m_hscroll_policy; }
int vscroll_policy() const noexcept { return m_terminal->m_vscroll_policy; }
char const* encoding() const noexcept
{
return m_terminal->m_encoding ? m_terminal->m_encoding : "UTF-8";
}
void emit_child_exited(int status) noexcept;
protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment