mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
Fix for crash when setting tmux pane title
https://github.com/fish-shell/fish-shell/issues/846
This commit is contained in:
@@ -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;
|
return prefix_size <= value.size() && value.compare(0, prefix_size, proposed_prefix) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool string_prefixes_string(const wcstring &proposed_prefix, const wcstring &value)
|
bool string_prefixes_string(const wcstring &proposed_prefix, const wcstring &value)
|
||||||
{
|
{
|
||||||
size_t prefix_size = proposed_prefix.size();
|
size_t prefix_size = proposed_prefix.size();
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ static prompt_layout_t calc_prompt_layout(const wchar_t *prompt)
|
|||||||
if (prompt[j+1] == L'k')
|
if (prompt[j+1] == L'k')
|
||||||
{
|
{
|
||||||
const env_var_t term_name = env_get_string(L"TERM");
|
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;
|
const wchar_t *end;
|
||||||
j+=2;
|
j+=2;
|
||||||
|
|||||||
Reference in New Issue
Block a user