diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GvimExt/GvimExt.reg | 4 | ||||
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/buffer.c | 13 | ||||
-rw-r--r-- | src/diff.c | 2 | ||||
-rw-r--r-- | src/edit.c | 27 | ||||
-rw-r--r-- | src/ex_cmds.c | 11 | ||||
-rw-r--r-- | src/getchar.c | 4 | ||||
-rw-r--r-- | src/gui.c | 6 | ||||
-rw-r--r-- | src/option.c | 4 | ||||
-rw-r--r-- | src/popupmnu.c | 28 | ||||
-rw-r--r-- | src/proto/ex_cmds.pro | 114 | ||||
-rw-r--r-- | src/proto/ex_getln.pro | 104 | ||||
-rw-r--r-- | src/proto/gui_motif.pro | 88 | ||||
-rw-r--r-- | src/proto/misc1.pro | 186 | ||||
-rw-r--r-- | src/proto/option.pro | 108 | ||||
-rw-r--r-- | src/proto/syntax.pro | 90 | ||||
-rw-r--r-- | src/proto/undo.pro | 2 | ||||
-rw-r--r-- | src/proto/window.pro | 116 | ||||
-rw-r--r-- | src/spell.c | 10 | ||||
-rw-r--r-- | src/undo.c | 12 | ||||
-rw-r--r-- | src/version.h | 16 | ||||
-rw-r--r-- | src/window.c | 70 |
22 files changed, 554 insertions, 463 deletions
diff --git a/src/GvimExt/GvimExt.reg b/src/GvimExt/GvimExt.reg index b59234564f..0169fe10bd 100644 --- a/src/GvimExt/GvimExt.reg +++ b/src/GvimExt/GvimExt.reg @@ -15,6 +15,6 @@ REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Vim\Gvim] "path"="gvim.exe" -[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0c] - "DisplayName"="Vim 7.0c: Edit with Vim popup menu entry" +[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0d] + "DisplayName"="Vim 7.0d: Edit with Vim popup menu entry" "UninstallString"="uninstal.exe" diff --git a/src/Makefile b/src/Makefile index c79f96d24b..625271fec9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -880,7 +880,7 @@ MAN1DIR = /man1 ### Vim version (adjusted by a script) VIMMAJOR = 7 -VIMMINOR = 0c +VIMMINOR = 0d ### Location of Vim files (should not need to be changed, and {{{1 ### some things might not work when they are changed!) diff --git a/src/buffer.c b/src/buffer.c index fbad67c99c..64ed9711d0 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1212,7 +1212,11 @@ do_buffer(action, start, dir, count, forceit) { # ifdef FEAT_WINDOWS /* jump to first window containing buf if one exists ("useopen") */ - if (vim_strchr(p_swb, 'u') && buf_jump_open_win(buf)) + if (vim_strchr(p_swb, 'o') && buf_jump_open_win(buf)) + return OK; + /* jump to first window in any tab page containing buf if one exists + * ("usetab") */ + if (vim_strchr(p_swb, 'a') && buf_jump_open_tab(buf)) return OK; if (win_split(0, 0) == FAIL) # endif @@ -1316,7 +1320,7 @@ set_curbuf(buf, action) #endif { if (prevbuf == curbuf) - u_sync(); + u_sync(FALSE); close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf, unload ? action : (action == DOBUF_GOTO && !P_HID(prevbuf) @@ -1833,8 +1837,11 @@ buflist_getfile(n, lnum, options, forceit) if (options & GETF_SWITCH) { /* use existing open window for buffer if wanted */ - if (vim_strchr(p_swb, 'u')) /* useopen */ + if (vim_strchr(p_swb, 'o')) /* useopen */ wp = buf_jump_open_win(buf); + /* use existing open window in any tab page for buffer if wanted */ + if (vim_strchr(p_swb, 'a')) /* usetab */ + wp = buf_jump_open_tab(buf); /* split window if wanted ("split") */ if (wp == NULL && vim_strchr(p_swb, 't') && !bufempty()) { diff --git a/src/diff.c b/src/diff.c index f02aa5ef27..bc0364c77c 100644 --- a/src/diff.c +++ b/src/diff.c @@ -2233,7 +2233,7 @@ ex_diffgetput(eap) * another buffer. Sync undo if the command was typed. This isn't * 100% right when ":diffput" is used in a function or mapping. */ if (KeyTyped) - u_sync(); + u_sync(FALSE); aucmd_restbuf(&aco); } diff --git a/src/edit.c b/src/edit.c index e70a23575d..08a24d7e77 100644 --- a/src/edit.c +++ b/src/edit.c @@ -90,6 +90,10 @@ static compl_T *compl_first_match = NULL; static compl_T *compl_curr_match = NULL; static compl_T *compl_shown_match = NULL; +/* After using a cursor key <Enter> selects a match in the popup menu, + * otherwise it inserts a line break. */ +static int compl_enter_selects = FALSE; + /* When "compl_leader" is not NULL only matches that start with this string * are used. */ static char_u *compl_leader = NULL; @@ -726,8 +730,10 @@ edit(cmdchar, startln, count) continue; } - /* Pressing CTRL-Y selects the current match. */ - if (c == Ctrl_Y) + /* Pressing CTRL-Y selects the current match. Shen + * compl_enter_selects is set the Enter key does the same. */ + if (c == Ctrl_Y || (compl_enter_selects + && (c == CAR || c == K_KENTER || c == NL))) { ins_compl_delete(); ins_compl_insert(); @@ -2915,6 +2921,7 @@ ins_compl_clear() edit_submode_extra = NULL; vim_free(compl_orig_text); compl_orig_text = NULL; + compl_enter_selects = FALSE; } /* @@ -2976,6 +2983,7 @@ ins_compl_bs() /* Show the popup menu with a different set of matches. */ ins_compl_show_pum(); compl_used_match = FALSE; + compl_enter_selects = FALSE; return TRUE; } @@ -3014,6 +3022,7 @@ ins_compl_addleader(c) ins_compl_del_pum(); ins_compl_show_pum(); compl_used_match = FALSE; + compl_enter_selects = FALSE; ins_compl_set_original_text(compl_leader); } } @@ -3277,8 +3286,11 @@ ins_compl_prep(c) auto_format(FALSE, TRUE); /* If the popup menu is displayed pressing CTRL-Y means accepting - * the selection without inserting anything. */ - if (c == Ctrl_Y && pum_visible()) + * the selection without inserting anything. When + * compl_enter_selects is set the Enter key does the same. */ + if ((c == Ctrl_Y || (compl_enter_selects + && (c == CAR || c == K_KENTER || c == NL))) + && pum_visible()) retval = TRUE; /* CTRL-E means completion is Ended, go back to the typed text. */ @@ -3298,6 +3310,7 @@ ins_compl_prep(c) compl_matches = 0; msg_clr_cmdline(); /* necessary for "noshowmode" */ ctrl_x_mode = 0; + compl_enter_selects = FALSE; if (edit_submode != NULL) { edit_submode = NULL; @@ -4049,6 +4062,10 @@ ins_compl_next(allow_get_expansion, count, insert_match) ins_compl_delete(); } + /* Enter will select a match when the match wasn't inserted and the popup + * menu is visislbe. */ + compl_enter_selects = !insert_match && compl_match_array != NULL; + /* * Show the file name for the match (if any) * Truncate the file name to avoid a wait for return. @@ -7277,7 +7294,7 @@ ins_ctrl_g() break; /* CTRL-G u: start new undoable edit */ - case 'u': u_sync(); + case 'u': u_sync(TRUE); ins_need_undo = TRUE; /* Need to reset Insstart, esp. because a BS that joins diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 790b30ef1f..9206e02889 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3253,7 +3253,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags) buf_copy_options(buf, BCO_ENTER); /* close the link to the current buffer */ - u_sync(); + u_sync(FALSE); close_buffer(curwin, curbuf, (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD); @@ -4289,7 +4289,7 @@ do_sub(eap) if (!do_count && !curbuf->b_p_ma) { - /* Substitusion is not allowed in non-'modifiable' buffer */ + /* Substitution is not allowed in non-'modifiable' buffer */ EMSG(_(e_modifiable)); return; } @@ -6919,12 +6919,7 @@ ex_drop(eap) if (wp->w_buffer == buf) { # ifdef FEAT_WINDOWS - goto_tabpage_tp(tp); - win_enter(wp, TRUE); -# ifdef FEAT_GUI_TABLINE - if (gui_use_tabline()) - gui_mch_set_curtab(tabpage_index(curtab)); -# endif + goto_tabpage_win(tp, wp); # endif curwin->w_arg_idx = 0; return; diff --git a/src/getchar.c b/src/getchar.c index 60a2a9b420..4c38cd7589 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1201,8 +1201,8 @@ gotchars(s, len) may_sync_undo() { if ((!(State & (INSERT + CMDLINE)) || arrow_used) - && scriptin[curscript] == NULL && no_u_sync == 0) - u_sync(); + && scriptin[curscript] == NULL) + u_sync(FALSE); } /* @@ -4931,8 +4931,7 @@ gui_do_findrepl(flags, find_text, repl_text, down) if (u_save_cursor() == OK) { /* A button was pressed thus undo should be synced. */ - if (no_u_sync == 0) - u_sync(); + u_sync(FALSE); del_bytes((long)(regmatch.endp[0] - regmatch.startp[0]), FALSE, FALSE); @@ -4948,8 +4947,7 @@ gui_do_findrepl(flags, find_text, repl_text, down) if (type == FRD_REPLACEALL) { /* A button was pressed, thus undo should be synced. */ - if (no_u_sync == 0) - u_sync(); + u_sync(FALSE); do_cmdline_cmd(ga.ga_data); } else diff --git a/src/option.c b/src/option.c index 8ed4f3469f..0a4d9c7dd9 100644 --- a/src/option.c +++ b/src/option.c @@ -2811,7 +2811,7 @@ static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL}; #ifdef FEAT_SCROLLBIND static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL}; #endif -static char *(p_swb_values[]) = {"useopen", "split", NULL}; +static char *(p_swb_values[]) = {"useopen", "usetab", "split", NULL}; static char *(p_debug_values[]) = {"msg", "beep", NULL}; #ifdef FEAT_VERTSPLIT static char *(p_ead_values[]) = {"both", "ver", "hor", NULL}; @@ -7767,7 +7767,7 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags) { /* use the old value, otherwise u_sync() may not work properly */ p_ul = old_value; - u_sync(); + u_sync(TRUE); p_ul = value; } diff --git a/src/popupmnu.c b/src/popupmnu.c index 9f1fae4fb0..a3324772cb 100644 --- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -427,18 +427,24 @@ pum_set_selected(n) while (!bufempty()) ml_delete((linenr_T)1, FALSE); } - else if ((res = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, 0)) - == OK) + else { - /* Edit a new, empty buffer. Set options for a "wipeout" - * buffer. */ - set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); - set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", - OPT_LOCAL); - set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", - OPT_LOCAL); - set_option_value((char_u *)"diff", 0L, (char_u *)"", - OPT_LOCAL); + /* Don't want to sync undo in the current buffer. */ + ++no_u_sync; + res = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, 0); + --no_u_sync; + if (res == OK) + { + /* Edit a new, empty buffer. Set options for a "wipeout" + * buffer. */ + set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); + set_option_value((char_u *)"bt", 0L, + (char_u *)"nofile", OPT_LOCAL); + set_option_value((char_u *)"bh", 0L, + (char_u *)"wipe", OPT_LOCAL); + set_option_value((char_u *)"diff", 0L, + (char_u *)"", OPT_LOCAL); + } } if (res == OK) { diff --git a/src/proto/ex_cmds.pro b/src/proto/ex_cmds.pro index 4382e6530a..7582dffab1 100644 --- a/src/proto/ex_cmds.pro +++ b/src/proto/ex_cmds.pro @@ -1,59 +1,59 @@ /* ex_cmds.c */ -void do_ascii __ARGS((exarg_T *eap)); -void ex_align __ARGS((exarg_T *eap)); -void ex_sort __ARGS((exarg_T *eap)); -void ex_retab __ARGS((exarg_T *eap)); -int do_move __ARGS((linenr_T line1, linenr_T line2, linenr_T dest)); -void ex_copy __ARGS((linenr_T line1, linenr_T line2, linenr_T n)); -void free_prev_shellcmd __ARGS((void)); -void do_bang __ARGS((int addr_count, exarg_T *eap, int forceit, int do_in, int do_out)); -void do_shell __ARGS((char_u *cmd, int flags)); -char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp)); -void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname)); -int viminfo_error __ARGS((char *errnum, char *message, char_u *line)); -int read_viminfo __ARGS((char_u *file, int want_info, int want_marks, int forceit)); -void write_viminfo __ARGS((char_u *file, int forceit)); -int viminfo_readline __ARGS((vir_T *virp)); -char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert)); -void viminfo_writestring __ARGS((FILE *fd, char_u *p)); -void do_fixdel __ARGS((exarg_T *eap)); -void print_line_no_prefix __ARGS((linenr_T lnum, int use_number, int list)); -void print_line __ARGS((linenr_T lnum, int use_number, int list)); -void ex_file __ARGS((exarg_T *eap)); -void ex_update __ARGS((exarg_T *eap)); -void ex_write __ARGS((exarg_T *eap)); -int do_write __ARGS((exarg_T *eap)); -void ex_wnext __ARGS((exarg_T *eap)); -void do_wqall __ARGS((exarg_T *eap)); -int not_writing __ARGS((void)); -int getfile __ARGS((int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum, int forceit)); -int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags)); -void ex_append __ARGS((exarg_T *eap)); -void ex_change __ARGS((exarg_T *eap)); -void ex_z __ARGS((exarg_T *eap)); -int check_restricted __ARGS((void)); -int check_secure __ARGS((void)); -void do_sub __ARGS((exarg_T *eap)); -int do_sub_msg __ARGS((int count_only)); -void ex_global __ARGS((exarg_T *eap)); -void global_exe __ARGS((char_u *cmd)); -int read_viminfo_sub_string __ARGS((vir_T *virp, int force)); -void write_viminfo_sub_string __ARGS((FILE *fp)); -void free_old_sub __ARGS((void)); -int prepare_tagpreview __ARGS((int undo_sync)); -void ex_help __ARGS((exarg_T *eap)); -char_u *check_help_lang __ARGS((char_u *arg)); -int help_heuristic __ARGS((char_u *matched_string, int offset, int wrong_case)); -int find_help_tags __ARGS((char_u *arg, int *num_matches, char_u ***matches, int keep_lang)); -void fix_help_buffer __ARGS((void)); -void ex_exusage __ARGS((exarg_T *eap)); -void ex_viusage __ARGS((exarg_T *eap)); -void ex_helptags __ARGS((exarg_T *eap)); -void ex_sign __ARGS((exarg_T *eap)); -void sign_gui_started __ARGS((void)); -int sign_get_attr __ARGS((int typenr, int line)); -char_u *sign_get_text __ARGS((int typenr)); -void *sign_get_image __ARGS((int typenr)); -char_u *sign_typenr2name __ARGS((int typenr)); -void ex_drop __ARGS((exarg_T *eap)); +extern void do_ascii __ARGS((exarg_T *eap)); +extern void ex_align __ARGS((exarg_T *eap)); +extern void ex_sort __ARGS((exarg_T *eap)); +extern void ex_retab __ARGS((exarg_T *eap)); +extern int do_move __ARGS((linenr_T line1, linenr_T line2, linenr_T dest)); +extern void ex_copy __ARGS((linenr_T line1, linenr_T line2, linenr_T n)); +extern void free_prev_shellcmd __ARGS((void)); +extern void do_bang __ARGS((int addr_count, exarg_T *eap, int forceit, int do_in, int do_out)); +extern void do_shell __ARGS((char_u *cmd, int flags)); +extern char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp)); +extern void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname)); +extern int viminfo_error __ARGS((char *errnum, char *message, char_u *line)); +extern int read_viminfo __ARGS((char_u *file, int want_info, int want_marks, int forceit)); +extern void write_viminfo __ARGS((char_u *file, int forceit)); +extern int viminfo_readline __ARGS((vir_T *virp)); +extern char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert)); +extern void viminfo_writestring __ARGS((FILE *fd, char_u *p)); +extern void do_fixdel __ARGS((exarg_T *eap)); +extern void print_line_no_prefix __ARGS((linenr_T lnum, int use_number, int list)); +extern void print_line __ARGS((linenr_T lnum, int use_number, int list)); +extern void ex_file __ARGS((exarg_T *eap)); +extern void ex_update __ARGS((exarg_T *eap)); +extern void ex_write __ARGS((exarg_T *eap)); +extern int do_write __ARGS((exarg_T *eap)); +extern void ex_wnext __ARGS((exarg_T *eap)); +extern void do_wqall __ARGS((exarg_T *eap)); +extern int not_writing __ARGS((void)); +extern int getfile __ARGS((int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum, int forceit)); +extern int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags)); +extern void ex_append __ARGS((exarg_T *eap)); +extern void ex_change __ARGS((exarg_T *eap)); +extern void ex_z __ARGS((exarg_T *eap)); +extern int check_restricted __ARGS((void)); +extern int check_secure __ARGS((void)); +extern void do_sub __ARGS((exarg_T *eap)); +extern int do_sub_msg __ARGS((int count_only)); +extern void ex_global __ARGS((exarg_T *eap)); +extern void global_exe __ARGS((char_u *cmd)); +extern int read_viminfo_sub_string __ARGS((vir_T *virp, int force)); +extern void write_viminfo_sub_string __ARGS((FILE *fp)); +extern void free_old_sub __ARGS((void)); +extern int prepare_tagpreview __ARGS((int undo_sync)); +extern void ex_help __ARGS((exarg_T *eap)); +extern char_u *check_help_lang __ARGS((char_u *arg)); +extern int help_heuristic __ARGS((char_u *matched_string, int offset, int wrong_case)); +extern int find_help_tags __ARGS((char_u *arg, int *num_matches, char_u ***matches, int keep_lang)); +extern void fix_help_buffer __ARGS((void)); +extern void ex_exusage __ARGS((exarg_T *eap)); +extern void ex_viusage __ARGS((exarg_T *eap)); +extern void ex_helptags __ARGS((exarg_T *eap)); +extern void ex_sign __ARGS((exarg_T *eap)); +extern void sign_gui_started __ARGS((void)); +extern int sign_get_attr __ARGS((int typenr, int line)); +extern char_u *sign_get_text __ARGS((int typenr)); +extern void *sign_get_image __ARGS((int typenr)); +extern char_u *sign_typenr2name __ARGS((int typenr)); +extern void ex_drop __ARGS((exarg_T *eap)); /* vim: set ft=c : */ diff --git a/src/proto/ex_getln.pro b/src/proto/ex_getln.pro index 9ccb42fce6..e6b5b87bb5 100644 --- a/src/proto/ex_getln.pro +++ b/src/proto/ex_getln.pro @@ -1,54 +1,54 @@ /* ex_getln.c */ -char_u *getcmdline __ARGS((int firstc, long count, int indent)); -char_u *getcmdline_prompt __ARGS((int firstc, char_u *prompt, int attr, int xp_context, char_u *xp_arg)); -int text_locked __ARGS((void)); -void text_locked_msg __ARGS((void)); -int curbuf_locked __ARGS((void)); -char_u *getexline __ARGS((int c, void *dummy, int indent)); -char_u *getexmodeline __ARGS((int promptc, void *dummy, int indent)); -int cmdline_overstrike __ARGS((void)); -int cmdline_at_end __ARGS((void)); -colnr_T cmdline_getvcol_cursor __ARGS((void)); -void free_cmdline_buf __ARGS((void)); -void putcmdline __ARGS((int c, int shift)); -void unputcmdline __ARGS((void)); -int put_on_cmdline __ARGS((char_u *str, int len, int redraw)); -void cmdline_paste_str __ARGS((char_u *s, int literally)); -void redrawcmdline __ARGS((void)); -void redrawcmd __ARGS((void)); -void compute_cmdrow __ARGS((void)); -void gotocmdline __ARGS((int clr)); -char_u *ExpandOne __ARGS((expand_T *xp, char_u *str, char_u *orig, int options, int mode)); -void ExpandInit __ARGS((expand_T *xp)); -void ExpandCleanup __ARGS((expand_T *xp)); -void ExpandEscape __ARGS((expand_T *xp, char_u *str, int numfiles, char_u **files, int options)); -void tilde_replace __ARGS((char_u *orig_pat, int num_files, char_u **files)); -char_u *sm_gettail __ARGS((char_u *s)); -char_u *addstar __ARGS((char_u *fname, int len, int context)); -void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); -int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); -int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); -char_u *globpath __ARGS((char_u *path, char_u *file)); -void init_history __ARGS((void)); -int get_histtype __ARGS((char_u *name)); -void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep)); -int get_history_idx __ARGS((int histype)); -char_u *get_cmdline_str __ARGS((void)); -int get_cmdline_pos __ARGS((void)); -int set_cmdline_pos __ARGS((int pos)); -int get_cmdline_type __ARGS((void)); -char_u *get_history_entry __ARGS((int histype, int idx)); -int clr_history __ARGS((int histype)); -int del_history_entry __ARGS((int histype, char_u *str)); -int del_history_idx __ARGS((int histype, int idx)); -void remove_key_from_history __ARGS((void)); -int get_list_range __ARGS((char_u **str, int *num1, int *num2)); -void ex_history __ARGS((exarg_T *eap)); -void prepare_viminfo_history __ARGS((int asklen)); -int read_viminfo_history __ARGS((vir_T *virp)); -void finish_viminfo_history __ARGS((void)); -void write_viminfo_history __ARGS((FILE *fp)); -void cmd_pchar __ARGS((int c, int offset)); -int cmd_gchar __ARGS((int offset)); -char_u *script_get __ARGS((exarg_T *eap, char_u *cmd)); +extern char_u *getcmdline __ARGS((int firstc, long count, int indent)); +extern char_u *getcmdline_prompt __ARGS((int firstc, char_u *prompt, int attr, int xp_context, char_u *xp_arg)); +extern int text_locked __ARGS((void)); +extern void text_locked_msg __ARGS((void)); +extern int curbuf_locked __ARGS((void)); +extern char_u *getexline __ARGS((int c, void *dummy, int indent)); +extern char_u *getexmodeline __ARGS((int promptc, void *dummy, int indent)); +extern int cmdline_overstrike __ARGS((void)); +extern int cmdline_at_end __ARGS((void)); +extern colnr_T cmdline_getvcol_cursor __ARGS((void)); +extern void free_cmdline_buf __ARGS((void)); +extern void putcmdline __ARGS((int c, int shift)); +extern void unputcmdline __ARGS((void)); +extern int put_on_cmdline __ARGS((char_u *str, int len, int redraw)); +extern void cmdline_paste_str __ARGS((char_u *s, int literally)); +extern void redrawcmdline __ARGS((void)); +extern void redrawcmd __ARGS((void)); +extern void compute_cmdrow __ARGS((void)); +extern void gotocmdline __ARGS((int clr)); +extern char_u *ExpandOne __ARGS((expand_T *xp, char_u *str, char_u *orig, int options, int mode)); +extern void ExpandInit __ARGS((expand_T *xp)); +extern void ExpandCleanup __ARGS((expand_T *xp)); +extern void ExpandEscape __ARGS((expand_T *xp, char_u *str, int numfiles, char_u **files, int options)); +extern void tilde_replace __ARGS((char_u *orig_pat, int num_files, char_u **files)); +extern char_u *sm_gettail __ARGS((char_u *s)); +extern char_u *addstar __ARGS((char_u *fname, int len, int context)); +extern void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); +extern int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); +extern int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); +extern char_u *globpath __ARGS((char_u *path, char_u *file)); +extern void init_history __ARGS((void)); +extern int get_histtype __ARGS((char_u *name)); +extern void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep)); +extern int get_history_idx __ARGS((int histype)); +extern char_u *get_cmdline_str __ARGS((void)); +extern int get_cmdline_pos __ARGS((void)); +extern int set_cmdline_pos __ARGS((int pos)); +extern int get_cmdline_type __ARGS((void)); +extern char_u *get_history_entry __ARGS((int histype, int idx)); +extern int clr_history __ARGS((int histype)); +extern int del_history_entry __ARGS((int histype, char_u *str)); +extern int del_history_idx __ARGS((int histype, int idx)); +extern void remove_key_from_history __ARGS((void)); +extern int get_list_range __ARGS((char_u **str, int *num1, int *num2)); +extern void ex_history __ARGS((exarg_T *eap)); +extern void prepare_viminfo_history __ARGS((int asklen)); +extern int read_viminfo_history __ARGS((vir_T *virp)); +extern void finish_viminfo_history __ARGS((void)); +extern void write_viminfo_history __ARGS((FILE *fp)); +extern void cmd_pchar __ARGS((int c, int offset)); +extern int cmd_gchar __ARGS((int offset)); +extern char_u *script_get __ARGS((exarg_T *eap, char_u *cmd)); /* vim: set ft=c : */ diff --git a/src/proto/gui_motif.pro b/src/proto/gui_motif.pro index 3e08ec9dbd..57717b90ec 100644 --- a/src/proto/gui_motif.pro +++ b/src/proto/gui_motif.pro @@ -1,46 +1,46 @@ /* gui_motif.c */ -void gui_x11_create_widgets __ARGS((void)); -void gui_x11_destroy_widgets __ARGS((void)); -void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h)); -void gui_x11_set_back_color __ARGS((void)); -void manage_centered __ARGS((Widget dialog_child)); -XmFontList gui_motif_create_fontlist __ARGS((XFontStruct *font)); -XmFontList gui_motif_fontset2fontlist __ARGS((XFontSet *fontset)); -void gui_mch_enable_menu __ARGS((int flag)); -void gui_motif_set_mnemonics __ARGS((int enable)); -void gui_mch_add_menu __ARGS((vimmenu_T *menu, int idx)); -void gui_mch_toggle_tearoffs __ARGS((int enable)); -int gui_mch_text_area_extra_height __ARGS((void)); -void gui_mch_compute_menu_height __ARGS((Widget id)); -void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); -void gui_motif_update_mousemodel __ARGS((vimmenu_T *menu)); -void gui_mch_new_menu_colors __ARGS((void)); -void gui_mch_new_menu_font __ARGS((void)); -void gui_mch_new_tooltip_font __ARGS((void)); -void gui_mch_new_tooltip_colors __ARGS((void)); -void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); -void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); -void gui_mch_def_colors __ARGS((void)); -void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, long max)); -void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h)); -void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag)); -void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient)); -void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); -void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); -Window gui_x11_get_wid __ARGS((void)); -char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); -int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield)); -void gui_mch_enable_footer __ARGS((int showit)); -void gui_mch_set_footer __ARGS((char_u *s)); -void gui_mch_show_toolbar __ARGS((int showit)); -int gui_mch_compute_toolbar_height __ARGS((void)); -void motif_get_toolbar_colors __ARGS((Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp)); -void gui_mch_show_tabline __ARGS((int showit)); -int gui_mch_showing_tabline __ARGS((void)); -void gui_mch_update_tabline __ARGS((void)); -void gui_mch_set_curtab __ARGS((int nr)); -void gui_motif_menu_fontlist __ARGS((Widget id)); -void gui_mch_find_dialog __ARGS((exarg_T *eap)); -void gui_mch_replace_dialog __ARGS((exarg_T *eap)); -void gui_motif_synch_fonts __ARGS((void)); +extern void gui_x11_create_widgets __ARGS((void)); +extern void gui_x11_destroy_widgets __ARGS((void)); +extern void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h)); +extern void gui_x11_set_back_color __ARGS((void)); +extern void manage_centered __ARGS((Widget dialog_child)); +extern XmFontList gui_motif_create_fontlist __ARGS((XFontStruct *font)); +extern XmFontList gui_motif_fontset2fontlist __ARGS((XFontSet *fontset)); +extern void gui_mch_enable_menu __ARGS((int flag)); +extern void gui_motif_set_mnemonics __ARGS((int enable)); +extern void gui_mch_add_menu __ARGS((vimmenu_T *menu, int idx)); +extern void gui_mch_toggle_tearoffs __ARGS((int enable)); +extern int gui_mch_text_area_extra_height __ARGS((void)); +extern void gui_mch_compute_menu_height __ARGS((Widget id)); +extern void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); +extern void gui_motif_update_mousemodel __ARGS((vimmenu_T *menu)); +extern void gui_mch_new_menu_colors __ARGS((void)); +extern void gui_mch_new_menu_font __ARGS((void)); +extern void gui_mch_new_tooltip_font __ARGS((void)); +extern void gui_mch_new_tooltip_colors __ARGS((void)); +extern void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); +extern void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +extern void gui_mch_def_colors __ARGS((void)); +extern void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, long max)); +extern void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h)); +extern void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag)); +extern void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient)); +extern void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); +extern void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); +extern Window gui_x11_get_wid __ARGS((void)); +extern char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); +extern int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *button_names, int dfltbutton, char_u *textfield)); +extern void gui_mch_enable_footer __ARGS((int showit)); +extern void gui_mch_set_footer __ARGS((char_u *s)); +extern void gui_mch_show_toolbar __ARGS((int showit)); +extern int gui_mch_compute_toolbar_height __ARGS((void)); +extern void motif_get_toolbar_colors __ARGS((Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp)); +extern void gui_mch_show_tabline __ARGS((int showit)); +extern int gui_mch_showing_tabline __ARGS((void)); +extern void gui_mch_update_tabline __ARGS((void)); +extern void gui_mch_set_curtab __ARGS((int nr)); +extern void gui_motif_menu_fontlist __ARGS((Widget id)); +extern void gui_mch_find_dialog __ARGS((exarg_T *eap)); +extern void gui_mch_replace_dialog __ARGS((exarg_T *eap)); +extern void gui_motif_synch_fonts __ARGS((void)); /* vim: set ft=c : */ diff --git a/src/proto/misc1.pro b/src/proto/misc1.pro index e9bc32c559..7d804b99d9 100644 --- a/src/proto/misc1.pro +++ b/src/proto/misc1.pro @@ -1,95 +1,95 @@ /* misc1.c */ -int get_indent __ARGS((void)); -int get_indent_lnum __ARGS((linenr_T lnum)); -int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum)); -int get_indent_str __ARGS((char_u *ptr, int ts)); -int set_indent __ARGS((int size, int flags)); -int get_number_indent __ARGS((linenr_T lnum)); -int open_line __ARGS((int dir, int flags, int old_indent)); -int get_leader_len __ARGS((char_u *line, char_u **flags, int backward)); -int plines __ARGS((linenr_T lnum)); -int plines_win __ARGS((win_T *wp, linenr_T lnum, int winheight)); -int plines_nofill __ARGS((linenr_T lnum)); -int plines_win_nofill __ARGS((win_T *wp, linenr_T lnum, int winheight)); -int plines_win_nofold __ARGS((win_T *wp, linenr_T lnum)); -int plines_win_col __ARGS((win_T *wp, linenr_T lnum, long column)); -int plines_m_win __ARGS((win_T *wp, linenr_T first, linenr_T last)); -void ins_bytes __ARGS((char_u *p)); -void ins_bytes_len __ARGS((char_u *p, int len)); -void ins_char __ARGS((int c)); -void ins_char_bytes __ARGS((char_u *buf, int charlen)); -void ins_str __ARGS((char_u *s)); -int del_char __ARGS((int fixpos)); -int del_chars __ARGS((long count, int fixpos)); -int del_bytes __ARGS((long count, int fixpos_arg, int use_delcombine)); -int truncate_line __ARGS((int fixpos)); -void del_lines __ARGS((long nlines, int undo)); -int gchar_pos __ARGS((pos_T *pos)); -int gchar_cursor __ARGS((void)); -void pchar_cursor __ARGS((int c)); -int inindent __ARGS((int extra)); -char_u *skip_to_option_part __ARGS((char_u *p)); -void changed __ARGS((void)); -void changed_bytes __ARGS((linenr_T lnum, colnr_T col)); -void appended_lines __ARGS((linenr_T lnum, long count)); -void appended_lines_mark __ARGS((linenr_T lnum, long count)); -void deleted_lines __ARGS((linenr_T lnum, long count)); -void deleted_lines_mark __ARGS((linenr_T lnum, long count)); -void changed_lines __ARGS((linenr_T lnum, colnr_T col, linenr_T lnume, long xtra)); -void unchanged __ARGS((buf_T *buf, int ff)); -void check_status __ARGS((buf_T *buf)); -void change_warning __ARGS((int col)); -int ask_yesno __ARGS((char_u *str, int direct)); -int get_keystroke __ARGS((void)); -int get_number __ARGS((int colon, int *mouse_used)); -int prompt_for_number __ARGS((int *mouse_used)); -void msgmore __ARGS((long n)); -void beep_flush __ARGS((void)); -void vim_beep __ARGS((void)); -void init_homedir __ARGS((void)); -void free_homedir __ARGS((void)); -void expand_env __ARGS((char_u *src, char_u *dst, int dstlen)); -void expand_env_esc __ARGS((char_u *srcp, char_u *dst, int dstlen, int esc, char_u *startstr)); -char_u *vim_getenv __ARGS((char_u *name, int *mustfree)); -char_u *expand_env_save __ARGS((char_u *src)); -void vim_setenv __ARGS((char_u *name, char_u *val)); -char_u *get_env_name __ARGS((expand_T *xp, int idx)); -void home_replace __ARGS((buf_T *buf, char_u *src, char_u *dst, int dstlen, int one)); -char_u *home_replace_save __ARGS((buf_T *buf, char_u *src)); -int fullpathcmp __ARGS((char_u *s1, char_u *s2, int checkname)); -char_u *gettail __ARGS((char_u *fname)); -char_u *gettail_sep __ARGS((char_u *fname)); -char_u *getnextcomp __ARGS((char_u *fname)); -char_u *get_past_head __ARGS((char_u *path)); -int vim_ispathsep __ARGS((int c)); -int vim_ispathlistsep __ARGS((int c)); -void shorten_dir __ARGS((char_u *str)); -int dir_of_file_exists __ARGS((char_u *fname)); -int vim_fnamecmp __ARGS((char_u *x, char_u *y)); -int vim_fnamencmp __ARGS((char_u *x, char_u *y, size_t len)); -char_u *concat_fnames __ARGS((char_u *fname1, char_u *fname2, int sep)); -char_u *concat_str __ARGS((char_u *str1, char_u *str2)); -void add_pathsep __ARGS((char_u *p)); -char_u *FullName_save __ARGS((char_u *fname, int force)); -pos_T *find_start_comment __ARGS((int ind_maxcomment)); -void do_c_expr_indent __ARGS((void)); -int cin_islabel __ARGS((int ind_maxcomment)); -int cin_iscase __ARGS((char_u *s)); -int cin_isscopedecl __ARGS((char_u *s)); -int get_c_indent __ARGS((void)); -int get_expr_indent __ARGS((void)); -int get_lisp_indent __ARGS((void)); -void prepare_to_exit __ARGS((void)); -void preserve_exit __ARGS((void)); -int vim_fexists __ARGS((char_u *fname)); -void line_breakcheck __ARGS((void)); -void fast_breakcheck __ARGS((void)); -int expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); -int match_suffix __ARGS((char_u *fname)); -int unix_expandpath __ARGS((garray_T *gap, char_u *path, int wildoff, int flags, int didstar)); -int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); -void addfile __ARGS((garray_T *gap, char_u *f, int flags)); -char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags)); -void FreeWild __ARGS((int count, char_u **files)); -int goto_im __ARGS((void)); +extern int get_indent __ARGS((void)); +extern int get_indent_lnum __ARGS((linenr_T lnum)); +extern int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum)); +extern int get_indent_str __ARGS((char_u *ptr, int ts)); +extern int set_indent __ARGS((int size, int flags)); +extern int get_number_indent __ARGS((li |