diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-09 15:00:52 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-09 15:00:52 +0000 |
commit | 6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe (patch) | |
tree | f119d516608ff96e9abf00beff15ab83930a65ed /Source/SPNarrowDownCompletion.m | |
parent | 2006cf37271812027cdf5659308eec6ff095ed09 (diff) | |
download | sequelpro-6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe.tar.gz sequelpro-6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe.tar.bz2 sequelpro-6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe.zip |
• added $SP_ASLIST_ALL_FIELDS_FROM_SELECTED_TABLE as pre-defined snippet list
• added Show Completion List submenu to the Custom Query Editor gear menu with the items all dbs ^1, all tables ^2, all fields ^3
• if dbStructure is available show these pre-defined completion lists with all info like the completion it does, otherwise fall back to plain style
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index d7ac8048..a17c3aac 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -535,7 +535,7 @@ closeMe = YES; return; } else { - [newFiltered addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"No completions found", @"no completions found message"), @"display", @"", @"noCompletion", nil]]; + [newFiltered addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"No item found", @"no item found message"), @"display", @"", @"noCompletion", nil]]; } } } @@ -751,7 +751,12 @@ - (void)insert_text:(NSString* )aString { - [theView setSelectedRange:theCharRange]; + NSRange r = [theView selectedRange]; + if(r.length) + [theView setSelectedRange:r]; + else + [theView setSelectedRange:theCharRange]; + [theView insertText:aString]; // If completion string contains backticks move caret out of the backticks |