Skip to content

Commit

Permalink
Fix try/catch in iconstring
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed Apr 10, 2016
1 parent a14c1d9 commit b2f6a61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3451,19 +3451,19 @@ maketitle(void)
if (stl_syntax & STL_IN_ICON)
{
int use_sandbox = FALSE;
int save_called_emsg = called_emsg;
int saved_did_emsg = did_emsg;

# ifdef FEAT_EVAL
use_sandbox = was_set_insecurely((char_u *)"iconstring", 0);
# endif
called_emsg = FALSE;
did_emsg = FALSE;
build_stl_str_hl(curwin, i_str, sizeof(buf),
p_iconstring, use_sandbox,
0, 0, NULL, NULL);
if (called_emsg)
if (did_emsg)
set_string_option_direct((char_u *)"iconstring", -1,
(char_u *)"", OPT_FREE, SID_ERROR);
called_emsg |= save_called_emsg;
did_emsg |= saved_did_emsg;
}
else
#endif
Expand Down

0 comments on commit b2f6a61

Please sign in to comment.