mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Fix debug output
Also add leak-watching to OakTextView.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#import <buffer/buffer.h>
|
||||
#import <theme/theme.h>
|
||||
#import <document/document.h>
|
||||
#import <oak/debug.h>
|
||||
|
||||
extern int32_t const NSWrapColumnWindowWidth;
|
||||
extern int32_t const NSWrapColumnAskUser;
|
||||
@@ -27,6 +28,8 @@ enum folding_state_t { kFoldingNone, kFoldingTop, kFoldingCollapsed, kFoldingBot
|
||||
|
||||
PUBLIC @interface OakTextView : OakView <NSTextInput, NSTextFieldDelegate>
|
||||
{
|
||||
OBJC_WATCH_LEAKS(OakTextView);
|
||||
|
||||
document::document_ptr document;
|
||||
theme_ptr theme;
|
||||
std::string fontName;
|
||||
|
||||
@@ -2226,7 +2226,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
D(DBF_OakTextView_Macros, bug("%s\n", BSTR(flag)););
|
||||
if(macroRecordingArray)
|
||||
{
|
||||
D(DBF_OakTextView_Macros, bug("%s\n", to_s(plist::convert(macroRecordingArray)).c_str()););
|
||||
D(DBF_OakTextView_Macros, bug("%s\n", to_s(plist::convert((__bridge CFDictionaryRef)macroRecordingArray)).c_str()););
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[macroRecordingArray copy] forKey:@"OakMacroManagerScratchMacro"];
|
||||
macroRecordingArray = nil;
|
||||
}
|
||||
@@ -2238,7 +2238,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
|
||||
- (IBAction)playScratchMacro:(id)anArgument
|
||||
{
|
||||
D(DBF_OakTextView_Macros, bug("%s\n", to_s(plist::convert([[NSUserDefaults standardUserDefaults] arrayForKey:@"OakMacroManagerScratchMacro"])).c_str()););
|
||||
D(DBF_OakTextView_Macros, bug("%s\n", to_s(plist::convert((__bridge CFDictionaryRef)[[NSUserDefaults standardUserDefaults] arrayForKey:@"OakMacroManagerScratchMacro"])).c_str()););
|
||||
AUTO_REFRESH;
|
||||
if(NSArray* scratchMacro = [[NSUserDefaults standardUserDefaults] arrayForKey:@"OakMacroManagerScratchMacro"])
|
||||
editor->macro_dispatch(plist::convert((__bridge CFDictionaryRef)@{ @"commands" : scratchMacro }), editor->variables(std::map<std::string, std::string>(), to_s([self scopeAttributes])));
|
||||
|
||||
Reference in New Issue
Block a user