diff options
Diffstat (limited to 'shell/dbshell.cpp')
-rw-r--r-- | shell/dbshell.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |