mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Code cleanup
git-svn-id: http://macvim.googlecode.com/svn/trunk@188 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
@@ -17,10 +17,8 @@
|
||||
NSMutableData *drawData;
|
||||
NSConnection *connection;
|
||||
id frontendProxy;
|
||||
NSString *browseForFileString;
|
||||
NSDictionary *colorDict;
|
||||
BOOL inputReceived;
|
||||
BOOL receivedKillTaskMsg;
|
||||
BOOL tabBarVisible;
|
||||
int backgroundColor;
|
||||
int foregroundColor;
|
||||
|
||||
+1
-7
@@ -895,13 +895,7 @@ static int specialKeyToNSKey(int key);
|
||||
|
||||
- (void)handleMessage:(int)msgid data:(NSData *)data
|
||||
{
|
||||
if (KillTaskMsgID == msgid) {
|
||||
//NSLog(@"VimTask received kill message; exiting now.");
|
||||
// Set this flag here so that exit does not send TaskExitedMsgID back
|
||||
// to MMVimController.
|
||||
receivedKillTaskMsg = YES;
|
||||
getout(0);
|
||||
} else if (InsertTextMsgID == msgid) {
|
||||
if (InsertTextMsgID == msgid) {
|
||||
if (!data) return;
|
||||
NSString *key = [[NSString alloc] initWithData:data
|
||||
encoding:NSUTF8StringEncoding];
|
||||
|
||||
@@ -75,11 +75,7 @@
|
||||
extern char *MessageStrings[];
|
||||
|
||||
enum {
|
||||
CheckinMsgID = 1,
|
||||
ConnectedMsgID,
|
||||
KillTaskMsgID,
|
||||
TaskExitedMsgID,
|
||||
OpenVimWindowMsgID,
|
||||
OpenVimWindowMsgID = 1,
|
||||
InsertTextMsgID,
|
||||
KeyDownMsgID,
|
||||
CmdKeyMsgID,
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
char *MessageStrings[] =
|
||||
{
|
||||
"INVALID MESSAGE ID",
|
||||
"CheckinMsgID",
|
||||
"ConnectedMsgID",
|
||||
"KillTaskMsgID",
|
||||
"TaskExitedMsgID",
|
||||
"OpenVimWindowMsgID",
|
||||
"InsertTextMsgID",
|
||||
"KeyDownMsgID",
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@
|
||||
#import "vim.h"
|
||||
|
||||
|
||||
static BOOL gui_cocoa_is_valid_action(NSString *action);
|
||||
static BOOL gui_macvim_is_valid_action(NSString *action);
|
||||
|
||||
|
||||
// -- Initialization --------------------------------------------------------
|
||||
@@ -641,7 +641,7 @@ gui_mch_add_menu_item(vimmenu_T *menu, int idx)
|
||||
action = [parts objectAtIndex:1];
|
||||
action = [action stringByTrimmingCharactersInSet:
|
||||
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
if (!gui_cocoa_is_valid_action(action))
|
||||
if (!gui_macvim_is_valid_action(action))
|
||||
action = nil;
|
||||
}
|
||||
}
|
||||
@@ -925,7 +925,7 @@ ex_action(eap)
|
||||
|
||||
NSString *name = [NSString stringWithCString:(char*)eap->arg
|
||||
encoding:NSUTF8StringEncoding];
|
||||
if (gui_cocoa_is_valid_action(name)) {
|
||||
if (gui_macvim_is_valid_action(name)) {
|
||||
[[MMBackend sharedInstance] executeActionWithName:name];
|
||||
} else {
|
||||
EMSG2(_("E???: \"%s\" is not a valid action"), eap->arg);
|
||||
@@ -1301,7 +1301,7 @@ mch_set_mouse_shape(int shape)
|
||||
|
||||
|
||||
static BOOL
|
||||
gui_cocoa_is_valid_action(NSString *action)
|
||||
gui_macvim_is_valid_action(NSString *action)
|
||||
{
|
||||
static NSDictionary *actionDict = nil;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user