aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAbhi Beckert <abhi@abhibeckert.com>2014-09-06 14:21:51 +1000
committerAbhi Beckert <abhi@abhibeckert.com>2014-09-06 14:21:51 +1000
commit29be07630c2a965d01bb61fa2cc9d9f14dd4a8b5 (patch)
tree4bb0d46f01edd077262dc17bc631b61cf1ef1abb /Source
parent310fb079c75d551bf2a129b69c897905ca83e061 (diff)
parentc49bbd2c8e35b39a8c7262f2671c3ad3c8bb2cea (diff)
downloadsequelpro-29be07630c2a965d01bb61fa2cc9d9f14dd4a8b5.tar.gz
sequelpro-29be07630c2a965d01bb61fa2cc9d9f14dd4a8b5.tar.bz2
sequelpro-29be07630c2a965d01bb61fa2cc9d9f14dd4a8b5.zip
Merge pull request #1981 from abhibeckert/master
Resolve #1974: Allow un-mapping of Ctrl-H
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTextView.m17
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index a608a6d0..8edbb6d0 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -2235,16 +2235,7 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS
}
#endif
}
-
-#ifndef SP_CODA
- // Note: switch(insertedCharacter) {} does not work instead use charactersIgnoringModifiers
- if([charactersIgnMod isEqualToString:@"h"]) // ^H show MySQL Help
- if(curFlags==(NSControlKeyMask))
- {
- [self showMySQLHelpForCurrentWord:self];
- return;
- }
-#endif
+
if([charactersIgnMod isEqualToString:@"y"]) // ^Y select current query
if(curFlags==(NSControlKeyMask))
{
@@ -3211,6 +3202,12 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS
// Enable or disable the search in the MySQL help menu item depending on whether there is a
// selection and whether it is a reasonable length.
if ([menuItem action] == @selector(showMySQLHelpForCurrentWord:)) {
+ if ([self selectedRange].length > 0) {
+ [menuItem setTitle:NSLocalizedString(@"MySQL Help for Selection", @"MySQL Help for Selection")];
+ } else {
+ [menuItem setTitle: NSLocalizedString(@"MySQL Help for Word", @"MySQL Help for Word")];
+ }
+
NSUInteger stringSize = [self getRangeForCurrentWord].length;
return (stringSize || stringSize > 64);
}