From a252c9efe5f22cbdc8dd8343c7e2a6c631add785 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sat, 9 Jan 2010 23:08:45 +0000 Subject: =?UTF-8?q?=E2=80=A2=20F5=20completion=20-=20fixed=20forgotten=20r?= =?UTF-8?q?ange=20checking=20to=20suppress=20Console=20warning=20-=20`|`?= =?UTF-8?q?=20[=20|=20:=3D=20caret=20]=20shows=20all=20field=20names=20-?= =?UTF-8?q?=20up=20to=20now=20only=20those=20from=20the=20current=20table?= =?UTF-8?q?=20-=20table/db/proc/func=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CMTextView.m | 4 +++- Source/SPNarrowDownCompletion.m | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/CMTextView.m b/Source/CMTextView.m index befce811..86e6955f 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -226,7 +226,9 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) // Check if the caret is inside quotes "" or ''; if so // return the normal word suggestion due to the spelling's settings // plus all unique words used in the textView - BOOL isDictMode = ([[[self textStorage] attribute:kQuote atIndex:[self getRangeForCurrentWord].location effectiveRange:nil] isEqualToString:kQuoteValue] ); + BOOL isDictMode = NO; + if([self getRangeForCurrentWord].length) + isDictMode = ([[[self textStorage] attribute:kQuote atIndex:[self getRangeForCurrentWord].location effectiveRange:nil] isEqualToString:kQuoteValue] ); // Refresh quote attributes [[self textStorage] removeAttribute:kQuote range:NSMakeRange(0,[[self string] length])]; diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 275142ca..a4daefa0 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -129,7 +129,7 @@ if(self = [self init]) { - if(aUserString) + if(aUserString && ![aUserString isEqualToString:@"`"]) [mutablePrefix appendString:aUserString]; if(aStaticPrefix) -- cgit v1.2.3