diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_docmd.c | 84 | ||||
-rw-r--r-- | src/ex_docmd.h | 1 |
2 files changed, 0 insertions, 85 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 83b9a08fef..6f20c3c60d 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -5664,90 +5664,6 @@ static void ex_goto(exarg_T *eap) goto_byte(eap->line2); } -#if (defined(FEAT_WINDOWS) && defined(HAVE_DROP_FILE)) \ - || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \ - || defined(FEAT_GUI_MSWIN) \ - || defined(FEAT_GUI_MAC) \ - || defined(PROTO) - -/* - * Handle a file drop. The code is here because a drop is *nearly* like an - * :args command, but not quite (we have a list of exact filenames, so we - * don't want to (a) parse a command line, or (b) expand wildcards. So the - * code is very similar to :args and hence needs access to a lot of the static - * functions in this file. - * - * The list should be allocated using xmalloc(), as should each item in the - * list. This function takes over responsibility for freeing the list. - * - * XXX The list is made into the argument list. This is freed using - * FreeWild(), which does a series of vim_free() calls. - */ -void -handle_drop ( - int filec, /* the number of files dropped */ - char_u **filev, /* the list of files dropped */ - int split /* force splitting the window */ -) -{ - exarg_T ea; - int save_msg_scroll = msg_scroll; - - /* Postpone this while editing the command line. */ - if (text_locked()) - return; - if (curbuf_locked()) - return; - /* When the screen is being updated we should not change buffers and - * windows structures, it may cause freed memory to be used. */ - if (updating_screen) - return; - - /* Check whether the current buffer is changed. If so, we will need - * to split the current window or data could be lost. - * We don't need to check if the 'hidden' option is set, as in this - * case the buffer won't be lost. - */ - if (!P_HID(curbuf) && !split) { - ++emsg_off; - split = check_changed(curbuf, CCGD_AW); - --emsg_off; - } - if (split) { - if (win_split(0, 0) == FAIL) - return; - RESET_BINDING(curwin); - - /* When splitting the window, create a new alist. Otherwise the - * existing one is overwritten. */ - alist_unlink(curwin->w_alist); - alist_new(); - } - - /* - * Set up the new argument list. - */ - alist_set(ALIST(curwin), filec, filev, FALSE, NULL, 0); - - /* - * Move to the first file. - */ - /* Fake up a minimal "next" command for do_argfile() */ - memset(&ea, 0, sizeof(ea)); - ea.cmd = (char_u *)"next"; - do_argfile(&ea, 0); - - /* do_ecmd() may set need_start_insertmode, but since we never left Insert - * mode that is not needed here. */ - need_start_insertmode = FALSE; - - /* Restore msg_scroll, otherwise a following command may cause scrolling - * unexpectedly. The screen will be redrawn by the caller, thus - * msg_scroll being set by displaying a message is irrelevant. */ - msg_scroll = save_msg_scroll; -} -#endif - /* * Clear an argument list: free all file names and reset it to zero entries. */ diff --git a/src/ex_docmd.h b/src/ex_docmd.h index a866023dbc..3cc134aab2 100644 --- a/src/ex_docmd.h +++ b/src/ex_docmd.h @@ -35,7 +35,6 @@ void not_exiting(void); void tabpage_close(int forceit); void tabpage_close_other(tabpage_T *tp, int forceit); void ex_all(exarg_T *eap); -void handle_drop(int filec, char_u **filev, int split); void alist_clear(alist_T *al); void alist_init(alist_T *al); void alist_unlink(alist_T *al); |