diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-20 21:55:45 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-20 21:55:45 +0000 |
commit | 9b2200acd6bd572eea00ea89eeb3b2c0764c8942 (patch) | |
tree | 2b51ab147338ddbae29d5586eb06ed85dd58ea00 /src | |
parent | 0126585dbb2a044ec2d72166dbc71cec33517194 (diff) |
updated for version 7.0230
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_cmds2.c | 32 | ||||
-rw-r--r-- | src/globals.h | 2 | ||||
-rw-r--r-- | src/gui_gtk.c | 17 | ||||
-rw-r--r-- | src/option.c | 23 | ||||
-rw-r--r-- | src/option.h | 1 | ||||
-rw-r--r-- | src/structs.h | 21 | ||||
-rw-r--r-- | src/version.h | 4 |
7 files changed, 82 insertions, 18 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index ad49d45340..c85f0b6a62 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1007,6 +1007,7 @@ profile_msg(tm) } static char_u *profile_fname = NULL; +static proftime_T pause_time; /* * ":profile cmd args" @@ -1026,12 +1027,27 @@ ex_profile(eap) { vim_free(profile_fname); profile_fname = vim_strsave(e); - do_profiling = TRUE; + do_profiling = PROF_YES; profile_zero(&prof_wait_time); set_vim_var_nr(VV_PROFILING, 1L); } - else if (!do_profiling) + else if (do_profiling == PROF_NONE) EMSG(_("E750: First use :profile start <fname>")); + else if (STRCMP(eap->arg, "pause") == 0) + { + if (do_profiling == PROF_YES) + profile_start(&pause_time); + do_profiling = PROF_PAUSED; + } + else if (STRCMP(eap->arg, "continue") == 0) + { + if (do_profiling == PROF_PAUSED) + { + profile_end(&pause_time); + profile_add(&prof_wait_time, &pause_time); + } + do_profiling = PROF_YES; + } else { /* The rest is similar to ":breakadd". */ @@ -2920,7 +2936,7 @@ do_source(fname, check_other, is_vimrc) #ifdef FEAT_EVAL # ifdef FEAT_PROFILE - if (do_profiling) + if (do_profiling == PROF_YES) prof_child_enter(&wait_start); /* entering a child now */ # endif @@ -2984,7 +3000,7 @@ do_source(fname, check_other, is_vimrc) } # ifdef FEAT_PROFILE - if (do_profiling) + if (do_profiling == PROF_YES) { int forceit; @@ -3013,7 +3029,7 @@ do_source(fname, check_other, is_vimrc) retval = OK; #ifdef FEAT_PROFILE - if (do_profiling) + if (do_profiling == PROF_YES) { /* Get "si" again, "script_items" may have been reallocated. */ si = &SCRIPT_ITEM(current_SID); @@ -3061,7 +3077,7 @@ almosttheend: current_SID = save_current_SID; restore_funccal(save_funccalp); # ifdef FEAT_PROFILE - if (do_profiling) + if (do_profiling == PROF_YES) prof_child_exit(&wait_start); /* leaving a child now */ # endif #endif @@ -3227,7 +3243,7 @@ getsourceline(c, cookie, indent) sp->dbg_tick = debug_tick; } # ifdef FEAT_PROFILE - if (do_profiling) + if (do_profiling == PROF_YES) script_line_end(); # endif #endif @@ -3246,7 +3262,7 @@ getsourceline(c, cookie, indent) ++sourcing_lnum; } #ifdef FEAT_PROFILE - if (line != NULL && do_profiling) + if (line != NULL && do_profiling == PROF_YES) script_line_start(); #endif diff --git a/src/globals.h b/src/globals.h index b0523fc2ec..765199b9d6 100644 --- a/src/globals.h +++ b/src/globals.h @@ -224,7 +224,7 @@ EXTERN int debug_break_level INIT(= -1); /* break below this level */ EXTERN int debug_did_msg INIT(= FALSE); /* did "debug mode" message */ EXTERN int debug_tick INIT(= 0); /* breakpoint change count */ # ifdef FEAT_PROFILE -EXTERN int do_profiling INIT(= 0); /* ":profile start" used */ +EXTERN int do_profiling INIT(= PROF_NONE); /* PROF_ values */ # endif /* diff --git a/src/gui_gtk.c b/src/gui_gtk.c index cdd645b659..a1c43751b4 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -320,6 +320,19 @@ create_menu_icon(vimmenu_T *menu, GtkIconSize icon_size) return image; } +/*ARGSUSED*/ + static gint +toolbar_button_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + /* When we're in a GtkPlug, we don't have window focus events, only widget focus. + * To emulate stand-alone gvim, if a button gets focus (e.g., <Tab> into GtkPlug) + * immediately pass it to mainwin. + */ + if (gtk_socket_id != 0) + gtk_widget_grab_focus(gui.drawarea); + + return TRUE; +} #endif /* FEAT_TOOLBAR && HAVE_GTK2 */ #if (defined(FEAT_TOOLBAR) && defined(HAVE_GTK2)) || defined(PROTO) @@ -767,6 +780,10 @@ gui_mch_add_menu_item(vimmenu_T *menu, int idx) menu, idx); + if (gtk_socket_id != 0) + gtk_signal_connect(GTK_OBJECT(menu->id), "focus_in_event", + GTK_SIGNAL_FUNC(toolbar_button_focus_in_event), NULL); + CONVERT_TO_UTF8_FREE(text); CONVERT_TO_UTF8_FREE(tooltip); diff --git a/src/option.c b/src/option.c index 8bfeb98f8d..73933b4dd1 100644 --- a/src/option.c +++ b/src/option.c @@ -101,6 +101,9 @@ #ifdef FEAT_MBYTE # define PV_FENC OPT_BUF(BV_FENC) #endif +#if defined(FEAT_BEVAL) && defined(FEAT_EVAL) +# define PV_BEXPR OPT_BOTH(OPT_BUF(BV_BEXPR)) +#endif #ifdef FEAT_EVAL # define PV_FEX OPT_BUF(BV_FEX) #endif @@ -250,7 +253,7 @@ typedef enum #define VAR_WIN ((char_u *)-1) /* - * These the global values for options which are also local to a buffer. + * These are the global values for options which are also local to a buffer. * Only to be used in option.c! */ static int p_ai; @@ -581,7 +584,7 @@ static struct vimoption {(char_u *)FALSE, (char_u *)0L}}, # ifdef FEAT_EVAL {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, - (char_u *)&p_bexpr, PV_NONE, + (char_u *)&p_bexpr, PV_BEXPR, {(char_u *)"", (char_u *)0L}}, # endif #endif @@ -4997,6 +5000,9 @@ check_buf_options(buf) check_string_option(&buf->b_p_inde); check_string_option(&buf->b_p_indk); #endif +#if defined(FEAT_BEVAL) && defined(FEAT_EVAL) + check_string_option(&buf->b_p_bexpr); +#endif #if defined(FEAT_EVAL) check_string_option(&buf->b_p_fex); #endif @@ -5157,6 +5163,9 @@ insecure_flag(opt_idx, opt_flags) #ifdef FEAT_EVAL case PV_FDE: return &curwin->w_p_fde_flags; case PV_FDT: return &curwin->w_p_fdt_flags; +# ifdef FEAT_BEVAL + case PV_BEXPR: return &curbuf->b_p_bexpr_flags; +# endif #endif #if defined(FEAT_EVAL) # if defined(FEAT_CINDENT) @@ -8784,6 +8793,9 @@ get_varp_scope(p, opt_flags) case PV_DICT: return (char_u *)&(curbuf->b_p_dict); case PV_TSR: return (char_u *)&(curbuf->b_p_tsr); #endif +#if defined(FEAT_BEVAL) && defined(FEAT_EVAL) + case PV_BEXPR: return (char_u *)&(curbuf->b_p_bexpr); +#endif #ifdef FEAT_STL_OPT case PV_STL: return (char_u *)&(curwin->w_p_stl); #endif @@ -8839,6 +8851,10 @@ get_varp(p) case PV_MP: return *curbuf->b_p_mp != NUL ? (char_u *)&(curbuf->b_p_mp) : p->var; #endif +#if defined(FEAT_BEVAL) && defined(FEAT_EVAL) + case PV_BEXPR: return *curbuf->b_p_bexpr != NUL + ? (char_u *)&(curbuf->b_p_bexpr) : p->var; +#endif #ifdef FEAT_STL_OPT case PV_STL: return *curwin->w_p_stl != NUL ? (char_u *)&(curwin->w_p_stl) : p->var; @@ -9368,6 +9384,9 @@ buf_copy_options(buf, flags) #ifdef FEAT_TEXTOBJ buf->b_p_qe = vim_strsave(p_qe); #endif +#if defined(FEAT_BEVAL) && defined(FEAT_EVAL) + buf->b_p_bexpr = empty_option; +#endif /* * Don't copy the options set by ex_help(), use the saved values, diff --git a/src/option.h b/src/option.h index b1e6f82410..1bd9d7d40a 100644 --- a/src/option.h +++ b/src/option.h @@ -910,6 +910,7 @@ enum , BV_ET , BV_FENC #ifdef FEAT_EVAL + , BV_BEXPR , BV_FEX #endif , BV_FF diff --git a/src/structs.h b/src/structs.h index 907b1cc277..1b7c826f35 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1458,6 +1458,11 @@ struct file_buffer dict_T b_vars; /* internal variables, local to buffer */ #endif +#if defined(FEAT_BEVAL) && defined(FEAT_EVAL) + char_u *b_p_bexpr; /* 'balloonexpr' local value */ + long_u b_p_bexpr_flags;/* flags for 'balloonexpr' */ +#endif + /* When a buffer is created, it starts without a swap file. b_may_swap is * then set to indicate that a swap file may be opened later. It is reset * if a swap file could not be opened. @@ -1618,6 +1623,10 @@ struct tabpage_S win_T *tp_lastwin; /* last window in this Tab page */ long tp_old_Rows; /* Rows when Tab page was left */ long tp_old_Columns; /* Columns when Tab page was left */ +#ifdef FEAT_GUI + int tp_prev_which_scrollbars[3]; + /* previous value of which_scrollbars */ +#endif #ifdef FEAT_DIFF diff_T *tp_first_diff; buf_T *(tp_diffbuf[DB_COUNT]); @@ -2092,15 +2101,17 @@ typedef struct cursor_entry #define MENU_INDEX_INVALID -1 #define MENU_INDEX_NORMAL 0 #define MENU_INDEX_VISUAL 1 -#define MENU_INDEX_OP_PENDING 2 -#define MENU_INDEX_INSERT 3 -#define MENU_INDEX_CMDLINE 4 -#define MENU_INDEX_TIP 5 -#define MENU_MODES 6 +#define MENU_INDEX_SELECT 2 +#define MENU_INDEX_OP_PENDING 3 +#define MENU_INDEX_INSERT 4 +#define MENU_INDEX_CMDLINE 5 +#define MENU_INDEX_TIP 6 +#define MENU_MODES 7 /* Menu modes */ #define MENU_NORMAL_MODE (1 << MENU_INDEX_NORMAL) #define MENU_VISUAL_MODE (1 << MENU_INDEX_VISUAL) +#define MENU_SELECT_MODE (1 << MENU_INDEX_SELECT) #define MENU_OP_PENDING_MODE (1 << MENU_INDEX_OP_PENDING) #define MENU_INSERT_MODE (1 << MENU_INDEX_INSERT) #define MENU_CMDLINE_MODE (1 << MENU_INDEX_CMDLINE) diff --git a/src/version.h b/src/version.h index 365d288686..ee1532b8c1 100644 --- a/src/version.h +++ b/src/version.h @@ -36,5 +36,5 @@ #define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_MEDIUM "7.0aa ALPHA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 19)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 19, compiled " +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 20)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 20, compiled " |