diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lua_interface.c | 4 | ||||
-rw-r--r-- | src/textadept.c | 10 | ||||
-rw-r--r-- | src/textadept.h | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index cc9103f3..2e9c3f5f 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -1296,6 +1296,8 @@ static int l_find_mt_index(lua_State *lua) { lua_pushboolean(lua, toggled(whole_word_opt)); else if (streq(key, "lua")) lua_pushboolean(lua, toggled(lua_opt)); + else if (streq(key, "in_files")) + lua_pushboolean(lua, toggled(in_files_opt)); else lua_rawget(lua, 1); return 1; @@ -1314,6 +1316,8 @@ static int l_find_mt_newindex(lua_State *lua) { toggle(whole_word_opt, lua_toboolean(lua, -1) ? TRUE : FALSE); else if (streq(key, "lua")) toggle(lua_opt, lua_toboolean(lua, -1) ? TRUE : FALSE); + else if (streq(key, "in_files")) + toggle(in_files_opt, lua_toboolean(lua, -1) ? TRUE : FALSE); else lua_rawset(lua, 1); return 0; diff --git a/src/textadept.c b/src/textadept.c index a76717e8..4fc36e83 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -60,8 +60,8 @@ static void pm_menu_activate(GtkWidget *menu_item, gpointer menu_id); // Find/Replace GtkWidget *findbox, *find_entry, *replace_entry, *fnext_button, *fprev_button, - *r_button, *ra_button, *match_case_opt, *whole_word_opt, - /**incremental_opt,*/ *lua_opt; + *r_button, *ra_button, *match_case_opt, *whole_word_opt, *lua_opt, + *in_files_opt; GtkAttachOptions ao_normal = static_cast<GtkAttachOptions>(GTK_SHRINK | GTK_FILL), ao_expand = static_cast<GtkAttachOptions>(GTK_EXPAND | GTK_FILL); @@ -920,8 +920,8 @@ GtkWidget *find_create_ui() { ra_button = gtk_button_new_with_mnemonic("Replace _All"); match_case_opt = gtk_check_button_new_with_mnemonic("_Match case"); whole_word_opt = gtk_check_button_new_with_mnemonic("_Whole word"); - //incremental_opt = gtk_check_button_new_with_mnemonic("_Incremental"); lua_opt = gtk_check_button_new_with_mnemonic("_Lua pattern"); + in_files_opt = gtk_check_button_new_with_mnemonic("_In Files"); gtk_label_set_mnemonic_widget(GTK_LABEL(flabel), find_entry); gtk_label_set_mnemonic_widget(GTK_LABEL(rlabel), replace_entry); @@ -937,8 +937,8 @@ GtkWidget *find_create_ui() { attach(ra_button, 3, 4, 1, 2, ao_normal, ao_normal, 0, 0); attach(match_case_opt, 4, 5, 0, 1, ao_normal, ao_normal, 5, 0); attach(whole_word_opt, 4, 5, 1, 2, ao_normal, ao_normal, 5, 0); - //attach(incremental_opt, 5, 6, 0, 1, ao_normal, ao_normal, 5, 0); attach(lua_opt, 5, 6, 0, 1, ao_normal, ao_normal, 5, 0); + attach(in_files_opt, 5, 6, 1, 2, ao_normal, ao_normal, 5, 0); signal(fnext_button, "clicked", button_clicked); signal(fprev_button, "clicked", button_clicked); @@ -952,8 +952,8 @@ GtkWidget *find_create_ui() { GTK_WIDGET_UNSET_FLAGS(ra_button, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(match_case_opt, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(whole_word_opt, GTK_CAN_FOCUS); - //GTK_WIDGET_UNSET_FLAGS(incremental_opt, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS(lua_opt, GTK_CAN_FOCUS); + GTK_WIDGET_UNSET_FLAGS(in_files_opt, GTK_CAN_FOCUS); return findbox; } diff --git a/src/textadept.h b/src/textadept.h index 5ccea139..c0677ae2 100644 --- a/src/textadept.h +++ b/src/textadept.h @@ -33,8 +33,7 @@ using namespace Scintilla; extern GtkWidget *window, *focused_editor, *command_entry, *pm_container, *pm_entry, *pm_view, *findbox, *find_entry, *replace_entry, *fnext_button, *fprev_button, *r_button, *ra_button, - *match_case_opt, *whole_word_opt, /**incremental_opt,*/ - *lua_opt; + *match_case_opt, *whole_word_opt, *lua_opt, *in_files_opt; extern GtkEntryCompletion *command_entry_completion; extern GtkTreeStore *cec_store, *pm_store; extern lua_State *lua; |