From 2c5453a01eae97bf03f16cfd088f2f069bb0594d Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 4 Feb 2010 12:34:50 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20undo=20behaviour=20of=20insertion?= =?UTF-8?q?=20of=20history/query=20favs=20=E2=80=A2=20improved=20text=20ma?= =?UTF-8?q?cro/query=20favs=20insertion=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CMTextView.m | 13 +++++++++++-- Source/CustomQuery.m | 9 ++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Source/CMTextView.m b/Source/CMTextView.m index d9ba59f4..33d56544 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -1112,6 +1112,11 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) - (void)insertFavoriteAsSnippet:(NSString*)theSnippet atRange:(NSRange)targetRange { + if(snippetControlCounter > -1) { + NSBeep(); + return; + } + NSInteger i; // reset snippet array @@ -1127,7 +1132,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) @try{ NSString *re = @"(? 6) { BOOL replaceContent = [prefs boolForKey:SPQueryHistoryReplacesContent]; - + [textView breakUndoCoalescing]; if([[NSApp currentEvent] modifierFlags] & (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask)) replaceContent = !replaceContent; if(replaceContent) -- cgit v1.2.3