diff options
author | 2012-11-22 01:09:07 -0800 | |
---|---|---|
committer | 2012-11-22 01:09:07 -0800 | |
commit | 90495f3ac544ba89a3f7063de6e1fb4cd74872a7 (patch) | |
tree | 1e403005b5a46e7e271339ddb4e856cec4a02b91 /builtin_commandline.cpp | |
parent | 6fc9e6f21ed8e6ebc2c6254426d1dc33f6bce636 (diff) |
Implement new newline-escaping behavior. Backslashes at the end of lines now essentially delete the newline, within normal text or double quotes. Backslashes are retained within single quotes.
Fixes https://github.com/fish-shell/fish-shell/issues/347
Fixes https://github.com/fish-shell/fish-shell/issues/52
Diffstat (limited to 'builtin_commandline.cpp')
-rw-r--r-- | builtin_commandline.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin_commandline.cpp b/builtin_commandline.cpp index 4b81dc6d..5c9e5aee 100644 --- a/builtin_commandline.cpp +++ b/builtin_commandline.cpp @@ -155,8 +155,7 @@ static void write_part(const wchar_t *begin, // fwprintf( stderr, L"Subshell: %ls, end char %lc\n", buff, *end ); out.clear(); tokenizer_t tok(buff, TOK_ACCEPT_UNFINISHED); - for (; tok_has_next(&tok); - tok_next(&tok)) + for (; tok_has_next(&tok); tok_next(&tok)) { if ((cut_at_cursor) && (tok_get_pos(&tok)+wcslen(tok_last(&tok)) >= pos)) |