summaryrefslogtreecommitdiff
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-22 21:34:09 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-22 21:34:09 +0200
commitb26e6327e69ed57c897d59183a4171c5eb979c19 (patch)
tree523c56a73826b7917ebe46580ce7936f86556aae /src/gui_w32.c
parent67c53844343011089e1b847200b5c5257a83e1c4 (diff)
downloadvim-git-b26e6327e69ed57c897d59183a4171c5eb979c19.tar.gz
Add :nbstart and :nbclose.
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 3331d54dd..af84f729a 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1278,24 +1278,12 @@ gui_mch_prepare(int *argc, char **argv)
for (arg = 1; arg < *argc; arg++)
if (strncmp("-nb", argv[arg], 3) == 0)
{
- usingNetbeans++;
netbeansArg = argv[arg];
mch_memmove(&argv[arg], &argv[arg + 1],
(--*argc - arg) * sizeof(char *));
argv[*argc] = NULL;
break; /* enough? */
}
-
- if (usingNetbeans)
- {
- WSADATA wsaData;
- int wsaerr;
-
- /* Init WinSock */
- wsaerr = WSAStartup(MAKEWORD(2, 2), &wsaData);
- if (wsaerr == 0)
- WSInitialized = TRUE;
- }
}
#endif
@@ -4840,6 +4828,9 @@ netbeans_draw_multisign_indicator(int row)
int y;
int x;
+ if (!netbeans_active())
+ return;
+
x = 0;
y = TEXT_Y(row);
@@ -4854,4 +4845,21 @@ netbeans_draw_multisign_indicator(int row)
SetPixel(s_hdc, x+3, y++, gui.currFgColor);
SetPixel(s_hdc, x+2, y, gui.currFgColor);
}
+
+/*
+ * Initialize the Winsock dll.
+ */
+ void
+netbeans_init_winsock()
+{
+ WSADATA wsaData;
+ int wsaerr;
+
+ if (WSInitialized)
+ return;
+
+ wsaerr = WSAStartup(MAKEWORD(2, 2), &wsaData);
+ if (wsaerr == 0)
+ WSInitialized = TRUE;
+}
#endif