diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-09 02:55:36 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-09 02:55:36 -0700 |
commit | 294fbc830918f49dd13500bdf0fb4f4933338023 (patch) | |
tree | 5530504dcc0d59f9a15c651b34be37095572eb34 /fish_indent.cpp | |
parent | 9bcc7df96f2e40e54fb1cebdb6df5de4139b0ed9 (diff) |
Replaced some calls to unescape with unescape_string
Diffstat (limited to 'fish_indent.cpp')
-rw-r--r-- | fish_indent.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fish_indent.cpp b/fish_indent.cpp index c99c7a9e..0ccaef44 100644 --- a/fish_indent.cpp +++ b/fish_indent.cpp @@ -107,23 +107,24 @@ static int indent( wcstring &out, const wcstring &in, int flags ) { int next_indent = indent; is_command = 0; - - wchar_t *unesc = unescape( last, UNESCAPE_SPECIAL ); + + wcstring unesc = last; + unescape_string(unesc, UNESCAPE_SPECIAL); - if( parser_keywords_is_block( unesc ) ) + if( parser_keywords_is_block(unesc)) { next_indent++; } - else if( wcscmp( unesc, L"else" ) == 0 ) + else if (unesc == L"else") { indent--; } /* case should have the same indent level as switch*/ - else if( wcscmp( unesc, L"case" ) == 0 ) + else if (unesc == L"case") { indent--; } - else if( wcscmp( unesc, L"end" ) == 0 ) + else if (unesc == L"end") { indent--; next_indent--; |