Mercurial > hg > octave-lyh
changeset 6991:f20010b5dcf0
[project @ 2007-10-09 21:22:57 by dbateman]
author | dbateman |
---|---|
date | Tue, 09 Oct 2007 21:22:57 +0000 |
parents | 9dc99ab00c86 |
children | 980449b7e05c |
files | src/ChangeLog src/input.cc |
diffstat | 2 files changed, 7 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2007-10-09 David Bateman <dbateman@free.fr> + + * input.cc (accept_line): Drop this function and remove automatic + insertion of closing quotes as the transpose operator confuses it. + (initialize_command_input): Remove accept_line from here as well. + + 2007-10-09 John W. Eaton <jwe@octave.org> * ov-mapper.cc (octave_mapper::apply): If possible, use
--- a/src/input.cc +++ b/src/input.cc @@ -535,31 +535,6 @@ return (std::string ("'") + text); } -static void -accept_line (const std::string &text) -{ - // Close open strings if needed - bool sq = false; - bool dq = false; - bool pass_next = false; - - for (std::string::const_iterator it = text.begin(); it < text.end(); it++) - { - if (pass_next) - pass_next = false; - else if (*it == '\\') - pass_next = true; - else if (*it == '\'' && ! dq) - sq = !sq; - else if (*it == '"' && ! sq) - dq = !dq; - } - if (sq) - command_editor::insert_text("'"); - if (dq) - command_editor::insert_text("\""); -} - void initialize_command_input (void) { @@ -585,8 +560,6 @@ command_editor::set_completion_function (generate_completion); command_editor::set_quoting_function (quoting_filename); - - command_editor::set_user_accept_line_function (accept_line); } static bool