From 0574a0b340b92ff5038bc4340b283c13ce513c1c Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 31 Mar 2009 09:40:01 +0000 Subject: - Fix behaviour of the enter key to run the query again - broken in r451 --- Source/CMTextView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CMTextView.m b/Source/CMTextView.m index a09b3125..7779ba43 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -46,8 +46,8 @@ YY_BUFFER_STATE yy_scan_string (const char *); - (void) doCommandBySelector:(SEL)aSelector { - // Handle newlines, adding any indentation found on the current line to the new line. - if (aSelector == @selector(insertNewline:)) { + // Handle newlines, adding any indentation found on the current line to the new line - ignoring the enter key. + if (aSelector == @selector(insertNewline:) && [[NSApp currentEvent] keyCode] != 0x4C) { NSString *textViewString = [[self textStorage] string]; NSString *currentLine, *indentString = nil; NSScanner *whitespaceScanner; -- cgit v1.2.3