Fix for crash when setting tmux pane title

https://github.com/fish-shell/fish-shell/issues/846
This commit is contained in:
ridiculousfish 2013-06-02 01:50:22 -07:00
parent 464187491f
commit 220e1e8fb5
2 changed files with 1 additions and 2 deletions

View file

@ -1739,7 +1739,6 @@ bool string_prefixes_string(const wchar_t *proposed_prefix, const wcstring &valu
return prefix_size <= value.size() && value.compare(0, prefix_size, proposed_prefix) == 0;
}
bool string_prefixes_string(const wcstring &proposed_prefix, const wcstring &value)
{
size_t prefix_size = proposed_prefix.size();

View file

@ -289,7 +289,7 @@ static prompt_layout_t calc_prompt_layout(const wchar_t *prompt)
if (prompt[j+1] == L'k')
{
const env_var_t term_name = env_get_string(L"TERM");
if (!term_name.missing() && wcsstr(term_name.c_str(), L"screen") == term_name)
if (!term_name.missing() && string_prefixes_string(L"screen", term_name))
{
const wchar_t *end;
j+=2;