aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r--Source/CMTextView.m4
1 files 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;