From 6c001cfbf64214eab2de92642e4b1b3e0cf2b197 Mon Sep 17 00:00:00 2001 From: Zachery Gyurkovitz Date: Thu, 5 Dec 2019 21:40:01 -0800 Subject: [PATCH] remove FEAT_BROWSE --- src/diff.c | 21 -------- src/evalfunc.c | 40 -------------- src/ex_cmds.c | 73 +------------------------ src/ex_cmds2.c | 18 +------ src/ex_docmd.c | 120 +++--------------------------------------- src/message.c | 110 -------------------------------------- src/option.c | 24 +-------- src/option.h | 3 -- src/proto/message.pro | 2 - src/quickfix.c | 15 +----- src/structs.h | 5 +- src/usercmd.c | 5 +- src/version.c | 4 -- src/vim.h | 31 ----------- 14 files changed, 14 insertions(+), 457 deletions(-) diff --git a/src/diff.c b/src/diff.c index 5b1841436..831eb05b4 100644 --- a/src/diff.c +++ b/src/diff.c @@ -1152,27 +1152,10 @@ void ex_diffpatch(exarg_T *eap) #ifdef UNIX char_u dirbuf[MAXPATHL]; char_u *fullname = NULL; -#endif -#ifdef FEAT_BROWSE - char_u *browseFile = NULL; - int browse_flag = cmdmod.browse; #endif stat_T st; char_u *esc_name = NULL; -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - browseFile = do_browse(0, (char_u *)_("Patch file"), - eap->arg, NULL, NULL, - (char_u *)_(BROWSE_FILTER_ALL_FILES), NULL); - if (browseFile == NULL) - return; /* operation cancelled */ - eap->arg = browseFile; - cmdmod.browse = FALSE; /* don't let do_ecmd() browse again */ - } -#endif - /* We need two temp file names. */ tmp_orig = vim_tempname('o', FALSE); tmp_new = vim_tempname('n', FALSE); @@ -1320,10 +1303,6 @@ void ex_diffpatch(exarg_T *eap) vim_free(fullname); #endif vim_free(esc_name); -#ifdef FEAT_BROWSE - vim_free(browseFile); - cmdmod.browse = browse_flag; -#endif } /* diff --git a/src/evalfunc.c b/src/evalfunc.c index 7f98d6744..b4ce79d0d 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1690,29 +1690,7 @@ f_atan2(typval_T *argvars, typval_T *rettv) static void f_browse(typval_T *argvars UNUSED, typval_T *rettv) { -#ifdef FEAT_BROWSE - int save; - char_u *title; - char_u *initdir; - char_u *defname; - char_u buf[NUMBUFLEN]; - char_u buf2[NUMBUFLEN]; - int error = FALSE; - - save = (int)tv_get_number_chk(&argvars[0], &error); - title = tv_get_string_chk(&argvars[1]); - initdir = tv_get_string_buf_chk(&argvars[2], buf); - defname = tv_get_string_buf_chk(&argvars[3], buf2); - - if (error || title == NULL || initdir == NULL || defname == NULL) - rettv->vval.v_string = NULL; - else - rettv->vval.v_string = - do_browse(save ? BROWSE_SAVE : 0, - title, defname, NULL, initdir, NULL, curbuf); -#else rettv->vval.v_string = NULL; -#endif rettv->v_type = VAR_STRING; } @@ -1722,22 +1700,7 @@ f_browse(typval_T *argvars UNUSED, typval_T *rettv) static void f_browsedir(typval_T *argvars UNUSED, typval_T *rettv) { -#ifdef FEAT_BROWSE - char_u *title; - char_u *initdir; - char_u buf[NUMBUFLEN]; - - title = tv_get_string_chk(&argvars[0]); - initdir = tv_get_string_buf_chk(&argvars[1], buf); - - if (title == NULL || initdir == NULL) - rettv->vval.v_string = NULL; - else - rettv->vval.v_string = do_browse(BROWSE_DIR, - title, NULL, NULL, initdir, NULL, curbuf); -#else rettv->vval.v_string = NULL; -#endif rettv->v_type = VAR_STRING; } @@ -5966,9 +5929,6 @@ f_has(typval_T *argvars, typval_T *rettv) "all_builtin_terms", #endif #endif -#if defined(FEAT_BROWSE) && defined(USE_FILE_CHOOSER) - "browsefilter", -#endif #ifdef FEAT_BYTEOFF "byte_offset", #endif diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 5b5ce804b..a8db85bd7 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3084,9 +3084,6 @@ int do_write(exarg_T *eap) char_u *ffname; int retval = FAIL; char_u *free_fname = NULL; -#ifdef FEAT_BROWSE - char_u *browse_file = NULL; -#endif buf_T *alt_buf = NULL; int name_was_missing; @@ -3094,16 +3091,7 @@ int do_write(exarg_T *eap) return FAIL; ffname = eap->arg; -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - browse_file = do_browse(BROWSE_SAVE, (char_u *)_("Save As"), ffname, - NULL, NULL, NULL, curbuf); - if (browse_file == NULL) - goto theend; - ffname = browse_file; - } -#endif + if (*ffname == NUL) { if (eap->cmdidx == CMD_saveas) @@ -3260,9 +3248,6 @@ int do_write(exarg_T *eap) } theend: -#ifdef FEAT_BROWSE - vim_free(browse_file); -#endif vim_free(free_fname); return retval; } @@ -3406,11 +3391,6 @@ void do_wqall(exarg_T *eap) ++error; break; } -#ifdef FEAT_BROWSE - /* ":browse wall": ask for file name if there isn't one */ - if (buf->b_ffname == NULL && cmdmod.browse) - browse_save_fname(buf); -#endif if (buf->b_ffname == NULL) { semsg(_("E141: No file name for buffer %ld"), (long)buf->b_fnum); @@ -3610,9 +3590,6 @@ int do_ecmd( bufref_T bufref; bufref_T old_curbuf; char_u *free_fname = NULL; -#ifdef FEAT_BROWSE - char_u *browse_file = NULL; -#endif int retval = FAIL; long n; pos_T orig_pos; @@ -3637,27 +3614,6 @@ int do_ecmd( } else { -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - if ( - au_has_group((char_u *)"FileExplorer")) - { - /* No browsing supported but we do have the file explorer: - * Edit the directory. */ - if (ffname == NULL || !mch_isdir(ffname)) - ffname = (char_u *)"."; - } - else - { - browse_file = do_browse(0, (char_u *)_("Edit File"), ffname, - NULL, NULL, NULL, curbuf); - if (browse_file == NULL) - goto theend; - ffname = browse_file; - } - } -#endif /* if no short name given, use ffname for short name */ if (sfname == NULL) sfname = ffname; @@ -4221,9 +4177,6 @@ int do_ecmd( #if defined(FEAT_EVAL) if (did_set_swapcommand) set_vim_var_string(VV_SWAPCOMMAND, NULL, -1); -#endif -#ifdef FEAT_BROWSE - vim_free(browse_file); #endif vim_free(free_fname); return retval; @@ -7351,30 +7304,6 @@ void ex_oldfiles(exarg_T *eap UNUSED) /* Assume "got_int" was set to truncate the listing. */ got_int = FALSE; - -#ifdef FEAT_BROWSE_CMD - if (cmdmod.browse) - { - quit_more = FALSE; - nr = prompt_for_number(FALSE); - msg_starthere(); - if (nr > 0) - { - char_u *p = list_find_str(get_vim_var_list(VV_OLDFILES), - (long)nr); - - if (p != NULL) - { - p = expand_env_save(p); - eap->arg = p; - eap->cmdidx = CMD_edit; - cmdmod.browse = FALSE; - do_exedit(eap, NULL); - vim_free(p); - } - } - } -#endif } } #endif diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 8cca869e3..42f6c1f82 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2850,23 +2850,7 @@ void ex_pyxdo(exarg_T *eap) */ void ex_source(exarg_T *eap) { -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - char_u *fname = NULL; - - fname = do_browse(0, (char_u *)_("Source Vim script"), eap->arg, - NULL, NULL, - (char_u *)_(BROWSE_FILTER_MACROS), NULL); - if (fname != NULL) - { - cmd_source(fname, eap); - vim_free(fname); - } - } - else -#endif - cmd_source(eap->arg, eap); + cmd_source(eap->arg, eap); } static void diff --git a/src/ex_docmd.c b/src/ex_docmd.c index bb25ed71c..54b5fa172 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2554,9 +2554,7 @@ int parse_command_modifiers(exarg_T *eap, char **errormsg, int skip_only) } if (checkforcmd(&eap->cmd, "browse", 3)) { -#ifdef FEAT_BROWSE_CMD - cmdmod.browse = TRUE; -#endif + /* noop - libvim */ continue; } if (!checkforcmd(&eap->cmd, "botright", 2)) @@ -6418,12 +6416,9 @@ ex_wrongmodifier(exarg_T *eap) void ex_splitview(exarg_T *eap) { win_T *old_curwin = curwin; -#if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE) +#ifdef FEAT_SEARCHPATH char_u *fname = NULL; #endif -#ifdef FEAT_BROWSE - int browse_flag = cmdmod.browse; -#endif int use_tab = eap->cmdidx == CMD_tabedit || eap->cmdidx == CMD_tabfind || eap->cmdidx == CMD_tabnew; @@ -6478,31 +6473,6 @@ void ex_splitview(exarg_T *eap) goto theend; eap->arg = fname; } -#ifdef FEAT_BROWSE - else -#endif -#endif -#ifdef FEAT_BROWSE - if (cmdmod.browse && eap->cmdidx != CMD_vnew && eap->cmdidx != CMD_new) - { - if ( - au_has_group((char_u *)"FileExplorer")) - { - /* No browsing supported but we do have the file explorer: - * Edit the directory. */ - if (*eap->arg == NUL || !mch_isdir(eap->arg)) - eap->arg = (char_u *)"."; - } - else - { - fname = do_browse(0, (char_u *)(use_tab ? _("Edit File in new tab page") : _("Edit File in new window")), - eap->arg, NULL, NULL, NULL, curbuf); - if (fname == NULL) - goto theend; - eap->arg = fname; - } - } - cmdmod.browse = FALSE; /* Don't browse again in do_ecmd(). */ #endif /* @@ -6526,22 +6496,14 @@ void ex_splitview(exarg_T *eap) { /* Reset 'scrollbind' when editing another file, but keep it when * doing ":split" without arguments. */ - if (*eap->arg != NUL -#ifdef FEAT_BROWSE - || cmdmod.browse -#endif - ) + if (*eap->arg != NUL) RESET_BINDING(curwin); else do_check_scrollbind(FALSE); do_exedit(eap, old_curwin); } -#ifdef FEAT_BROWSE - cmdmod.browse = browse_flag; -#endif - -#if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE) +#ifdef FEAT_SEARCHPATH theend: vim_free(fname); #endif @@ -6864,11 +6826,7 @@ void do_exedit( ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0), old_curwin == NULL ? curwin : NULL); } - else if ((eap->cmdidx != CMD_split && eap->cmdidx != CMD_vsplit) || *eap->arg != NUL -#ifdef FEAT_BROWSE - || cmdmod.browse -#endif - ) + else if ((eap->cmdidx != CMD_split && eap->cmdidx != CMD_vsplit) || *eap->arg != NUL) { /* Can't edit another file when "curbuf_lock" is set. Only ":edit" * can bring us here, others are stopped earlier. */ @@ -7052,25 +7010,7 @@ ex_read(exarg_T *eap) if (u_save(eap->line2, (linenr_T)(eap->line2 + 1)) == FAIL) return; -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - char_u *browseFile; - - browseFile = do_browse(0, (char_u *)_("Append File"), eap->arg, - NULL, NULL, NULL, curbuf); - if (browseFile != NULL) - { - i = readfile(browseFile, NULL, - eap->line2, (linenr_T)0, (linenr_T)MAXLNUM, eap, 0); - vim_free(browseFile); - } - else - i = OK; - } - else -#endif - if (*eap->arg == NUL) + if (*eap->arg == NUL) { if (check_fname() == FAIL) /* check for no file name */ return; @@ -7848,22 +7788,6 @@ ex_redir(exarg_T *eap) fname = expand_env_save(arg); if (fname == NULL) return; -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - char_u *browseFile; - - browseFile = do_browse(BROWSE_SAVE, - (char_u *)_("Save Redirection"), - fname, NULL, NULL, - (char_u *)_(BROWSE_FILTER_ALL_FILES), curbuf); - if (browseFile == NULL) - return; /* operation cancelled */ - vim_free(fname); - fname = browseFile; - eap->forceit = TRUE; /* since dialog already asked */ - } -#endif redir_fd = open_exfile(fname, eap->forceit, mode); vim_free(fname); @@ -8014,9 +7938,6 @@ ex_mkrc( FILE *fd; int failed = FALSE; char_u *fname; -#ifdef FEAT_BROWSE - char_u *browseFile = NULL; -#endif #ifdef FEAT_SESSION int view_session = FALSE; int using_vdir = FALSE; /* using 'viewdir'? */ @@ -8062,23 +7983,6 @@ ex_mkrc( else fname = (char_u *)EXRC_FILE; -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - browseFile = do_browse(BROWSE_SAVE, -#ifdef FEAT_SESSION - eap->cmdidx == CMD_mkview ? (char_u *)_("Save View") : eap->cmdidx == CMD_mksession ? (char_u *)_("Save Session") : -#endif - (char_u *)_("Save Setup"), - fname, (char_u *)"vim", NULL, - (char_u *)_(BROWSE_FILTER_MACROS), NULL); - if (browseFile == NULL) - goto theend; - fname = browseFile; - eap->forceit = TRUE; /* since dialog already asked */ - } -#endif - #if defined(FEAT_SESSION) && defined(vim_mkdir) /* When using 'viewdir' may have to create the directory. */ if (using_vdir && !mch_isdir(p_vdir)) @@ -8217,10 +8121,6 @@ ex_mkrc( #endif } -#ifdef FEAT_BROWSE -theend: - vim_free(browseFile); -#endif #ifdef FEAT_SESSION vim_free(viewFile); #endif @@ -10345,12 +10245,8 @@ ex_set(exarg_T *eap) flags = OPT_LOCAL; else if (eap->cmdidx == CMD_setglobal) flags = OPT_GLOBAL; -#if defined(FEAT_EVAL) && defined(FEAT_BROWSE) - if (cmdmod.browse && flags == 0) - ex_options(eap); - else -#endif - (void)do_set(eap->arg, flags); + + (void)do_set(eap->arg, flags); } #if defined(FEAT_SEARCH_EXTRA) || defined(PROTO) diff --git a/src/message.c b/src/message.c index f2028f409..beaf678ae 100644 --- a/src/message.c +++ b/src/message.c @@ -2517,116 +2517,6 @@ void display_confirm_msg(void) #endif -#if defined(FEAT_BROWSE) || defined(PROTO) -/* - * Generic browse function. Calls gui_mch_browse() when possible. - * Later this may pop-up a non-GUI file selector (external command?). - */ -char_u * -do_browse( - int flags, /* BROWSE_SAVE and BROWSE_DIR */ - char_u *title, /* title for the window */ - char_u *dflt, /* default file name (may include directory) */ - char_u *ext, /* extension added */ - char_u *initdir, /* initial directory, NULL for current dir or - when using path from "dflt" */ - char_u *filter, /* file name filter */ - buf_T *buf) /* buffer to read/write for */ -{ - char_u *fname; - static char_u *last_dir = NULL; /* last used directory */ - char_u *tofree = NULL; - int save_browse = cmdmod.browse; - - /* Must turn off browse to avoid that autocommands will get the - * flag too! */ - cmdmod.browse = FALSE; - - if (title == NULL || *title == NUL) - { - if (flags & BROWSE_DIR) - title = (char_u *)_("Select Directory dialog"); - else if (flags & BROWSE_SAVE) - title = (char_u *)_("Save File dialog"); - else - title = (char_u *)_("Open File dialog"); - } - - /* When no directory specified, use default file name, default dir, buffer - * dir, last dir or current dir */ - if ((initdir == NULL || *initdir == NUL) && dflt != NULL && *dflt != NUL) - { - if (mch_isdir(dflt)) /* default file name is a directory */ - { - initdir = dflt; - dflt = NULL; - } - else if (gettail(dflt) != dflt) /* default file name includes a path */ - { - tofree = vim_strsave(dflt); - if (tofree != NULL) - { - initdir = tofree; - *gettail(initdir) = NUL; - dflt = gettail(dflt); - } - } - } - - if (initdir == NULL || *initdir == NUL) - { - /* When 'browsedir' is a directory, use it */ - if (STRCMP(p_bsdir, "last") != 0 && STRCMP(p_bsdir, "buffer") != 0 && STRCMP(p_bsdir, "current") != 0 && mch_isdir(p_bsdir)) - initdir = p_bsdir; - /* When saving or 'browsedir' is "buffer", use buffer fname */ - else if (((flags & BROWSE_SAVE) || *p_bsdir == 'b') && buf != NULL && buf->b_ffname != NULL) - { - if (dflt == NULL || *dflt == NUL) - dflt = gettail(curbuf->b_ffname); - tofree = vim_strsave(curbuf->b_ffname); - if (tofree != NULL) - { - initdir = tofree; - *gettail(initdir) = NUL; - } - } - /* When 'browsedir' is "last", use dir from last browse */ - else if (*p_bsdir == 'l') - initdir = last_dir; - /* When 'browsedir is "current", use current directory. This is the - * default already, leave initdir empty. */ - } - - /* TODO: non-GUI file selector here */ - emsg(_("E338: Sorry, no file browser in console mode")); - fname = NULL; - - /* keep the directory for next time */ - if (fname != NULL) - { - vim_free(last_dir); - last_dir = vim_strsave(fname); - if (last_dir != NULL && !(flags & BROWSE_DIR)) - { - *gettail(last_dir) = NUL; - if (*last_dir == NUL) - { - /* filename only returned, must be in current dir */ - vim_free(last_dir); - last_dir = alloc(MAXPATHL); - if (last_dir != NULL) - mch_dirname(last_dir, MAXPATHL); - } - } - } - - vim_free(tofree); - cmdmod.browse = save_browse; - - return fname; -} -#endif - #if defined(FEAT_EVAL) static char *e_printf = N_("E766: Insufficient arguments for printf()"); diff --git a/src/option.c b/src/option.c index 037ec54a6..425283781 100644 --- a/src/option.c +++ b/src/option.c @@ -614,17 +614,7 @@ static struct vimoption options[] = {(char_u *)"", (char_u *)NULL} #endif SCTX_INIT}, - {"browsedir", "bsdir", P_STRING | P_VI_DEF, -#ifdef FEAT_BROWSE - (char_u *)&p_bsdir, - PV_NONE, - {(char_u *)"last", (char_u *)0L} -#else - (char_u *)NULL, - PV_NONE, - {(char_u *)0L, (char_u *)0L} -#endif - SCTX_INIT}, + {"browsedir", "bsdir", P_STRING | P_VI_DEF, (char_u *)NULL, PV_NONE, {(char_u *)0L, (char_u *)0L} SCTX_INIT}, {"bufhidden", "bh", P_STRING | P_ALLOCED | P_VI_DEF | P_NOGLOB, (char_u *)&p_bh, PV_BH, {(char_u *)"", (char_u *)0L} SCTX_INIT}, {"buflisted", "bl", P_BOOL | P_VI_DEF | P_NOGLOB, (char_u *)&p_bl, PV_BL, {(char_u *)1L, (char_u *)0L} SCTX_INIT}, {"buftype", "bt", P_STRING | P_ALLOCED | P_VI_DEF | P_NOGLOB, (char_u *)&p_bt, PV_BT, {(char_u *)"", (char_u *)0L} SCTX_INIT}, @@ -2211,9 +2201,6 @@ static char *(p_mousem_values[]) = {"extend", "popup", "popup_setpos", "mac", NU static char *(p_sel_values[]) = {"inclusive", "exclusive", "old", NULL}; static char *(p_slm_values[]) = {"mouse", "key", "cmd", NULL}; static char *(p_km_values[]) = {"startsel", "stopsel", NULL}; -#ifdef FEAT_BROWSE -static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL}; -#endif static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL}; static char *(p_debug_values[]) = {"msg", "throw", "beep", NULL}; static char *(p_ead_values[]) = {"both", "ver", "hor", NULL}; @@ -5522,15 +5509,6 @@ did_set_string_option( errmsg = e_invarg; } -#ifdef FEAT_BROWSE - /* 'browsedir' */ - else if (varp == &p_bsdir) - { - if (check_opt_strings(p_bsdir, p_bsdir_values, FALSE) != OK && !mch_isdir(p_bsdir)) - errmsg = e_invarg; - } -#endif - /* 'keymodel' */ else if (varp == &p_km) { diff --git a/src/option.h b/src/option.h index 114dd9bd1..a0238d33a 100644 --- a/src/option.h +++ b/src/option.h @@ -360,9 +360,6 @@ EXTERN char_u *p_bexpr; EXTERN int p_bevalterm; /* 'balloonevalterm' */ #endif #endif -#ifdef FEAT_BROWSE -EXTERN char_u *p_bsdir; /* 'browsedir' */ -#endif #ifdef FEAT_LINEBREAK EXTERN char_u *p_breakat; /* 'breakat' */ #endif diff --git a/src/proto/message.pro b/src/proto/message.pro index 0c6384ff5..67d1da363 100644 --- a/src/proto/message.pro +++ b/src/proto/message.pro @@ -81,6 +81,4 @@ int vim_dialog_yesno(int type, char_u *title, char_u *message, int dflt); int vim_dialog_yesnocancel(int type, char_u *title, char_u *message, int dflt); int vim_dialog_yesnoallcancel(int type, char_u *title, char_u *message, int dflt); -char_u *do_browse(int flags, char_u *title, char_u *dflt, char_u *ext, - char_u *initdir, char_u *filter, buf_T *buf); /* vim: set ft=c : */ diff --git a/src/quickfix.c b/src/quickfix.c index f16b48921..cd33076d3 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -5464,20 +5464,7 @@ void ex_cfile(exarg_T *eap) apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, NULL, FALSE, curbuf); enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc; -#ifdef FEAT_BROWSE - if (cmdmod.browse) - { - char_u *browse_file = do_browse(0, (char_u *)_("Error file"), eap->arg, - NULL, NULL, - (char_u *)_(BROWSE_FILTER_ALL_FILES), NULL); - if (browse_file == NULL) - return; - set_string_option_direct((char_u *)"ef", -1, browse_file, OPT_FREE, 0); - vim_free(browse_file); - } - else -#endif - if (*eap->arg != NUL) + if (*eap->arg != NUL) set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0); if (is_loclist_cmd(eap->cmdidx)) diff --git a/src/structs.h b/src/structs.h index eb23ee030..5691e7e4f 100644 --- a/src/structs.h +++ b/src/structs.h @@ -692,10 +692,7 @@ struct cmdline_info */ typedef struct { - int hide; /* TRUE when ":hide" was used */ -#ifdef FEAT_BROWSE_CMD - int browse; /* TRUE to invoke file dialog */ -#endif + int hide; /* TRUE when ":hide" was used */ int split; /* flags for win_split() */ int tab; /* > 0 when ":tab" was used */ int keepalt; /* TRUE when ":keepalt" was used */ diff --git a/src/usercmd.c b/src/usercmd.c index 91ccf9963..4a5cc8c94 100644 --- a/src/usercmd.c +++ b/src/usercmd.c @@ -950,7 +950,7 @@ uc_add_command( cmd->uc_rep = rep_buf; cmd->uc_argt = argt; cmd->uc_def = def; - cmd->uc_compl = compl ; + cmd->uc_compl = compl; #ifdef FEAT_EVAL cmd->uc_script_ctx = current_sctx; cmd->uc_script_ctx.sc_lnum += sourcing_lnum; @@ -1416,9 +1416,6 @@ uc_check_code( char *name; } mod_entry_T; static mod_entry_T mod_entries[] = { -#ifdef FEAT_BROWSE_CMD - {&cmdmod.browse, "browse"}, -#endif {&cmdmod.hide, "hide"}, {&cmdmod.keepalt, "keepalt"}, {&cmdmod.keepjumps, "keepjumps"}, diff --git a/src/version.c b/src/version.c index 776442e2d..eba12da3d 100644 --- a/src/version.c +++ b/src/version.c @@ -96,11 +96,7 @@ static char *(features[]) = #else "-balloon_eval_term", #endif -#ifdef FEAT_BROWSE - "+browse", -#else "-browse", -#endif #ifdef NO_BUILTIN_TCAPS "-builtin_terms", #endif diff --git a/src/vim.h b/src/vim.h index 1432a9d37..438227789 100644 --- a/src/vim.h +++ b/src/vim.h @@ -1870,31 +1870,6 @@ typedef enum #include "globals.h" /* global variables and messages */ -/* - * Default filters for gui_mch_browse(). - * The filters are almost system independent. Except for the difference - * between "*" and "*.*" for MSDOS-like systems. - * NOTE: Motif only uses the very first pattern. Therefore - * BROWSE_FILTER_DEFAULT should start with a "*" pattern. - */ -#ifdef FEAT_BROWSE -#ifdef BACKSLASH_IN_FILENAME -#define BROWSE_FILTER_MACROS \ - (char_u *)N_("Vim macro files (*.vim)\t*.vim\nAll Files (*.*)\t*.*\n") -#define BROWSE_FILTER_ALL_FILES (char_u *)N_("All Files (*.*)\t*.*\n") -#define BROWSE_FILTER_DEFAULT \ - (char_u *)N_("All Files (*.*)\t*.*\nC source (*.c, *.h)\t*.c;*.h\nC++ source (*.cpp, *.hpp)\t*.cpp;*.hpp\nVB code (*.bas, *.frm)\t*.bas;*.frm\nVim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n") -#else -#define BROWSE_FILTER_MACROS \ - (char_u *)N_("Vim macro files (*.vim)\t*.vim\nAll Files (*)\t*\n") -#define BROWSE_FILTER_ALL_FILES (char_u *)N_("All Files (*)\t*\n") -#define BROWSE_FILTER_DEFAULT \ - (char_u *)N_("All Files (*)\t*\nC source (*.c, *.h)\t*.c;*.h\nC++ source (*.cpp, *.hpp)\t*.cpp;*.hpp\nVim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n") -#endif -#define BROWSE_SAVE 1 /* flag for do_browse() */ -#define BROWSE_DIR 2 /* flag for do_browse() */ -#endif - #ifdef _MSC_VER /* Avoid useless warning "conversion from X to Y of greater size". */ #pragma warning(disable : 4312) @@ -1969,12 +1944,6 @@ typedef enum #define X_DISPLAY xterm_dpy -#if defined(FEAT_BROWSE) && defined(GTK_CHECK_VERSION) -#if GTK_CHECK_VERSION(2, 4, 0) -#define USE_FILE_CHOOSER -#endif -#endif - #undef NBDEBUG #define nbdebug(a)