From f0d9a01bccdaeb466c12c92057914bbfef59526c Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Thu, 15 Dec 2011 09:35:47 +0100 Subject: Imported Upstream version 2.0.2 --- shell/dbshell.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shell/dbshell.cpp') diff --git a/shell/dbshell.cpp b/shell/dbshell.cpp index f3122c7..443973f 100644 --- a/shell/dbshell.cpp +++ b/shell/dbshell.cpp @@ -398,13 +398,14 @@ string finishCode( string code ) { while ( ! isBalanced( code ) ) { inMultiLine = 1; code += "\n"; + // cancel multiline if two blank lines are entered + if ( code.find("\n\n\n") != string::npos ) + return ";"; char * line = shellReadline("... " , 1 ); if ( gotInterrupted ) return ""; if ( ! line ) return ""; - if ( code.find("\n\n") != string::npos ) // cancel multiline if two blank lines are entered - return ";"; while (startsWith(line, "... ")) line += 4; -- cgit v1.2.3