Ticket #2986: mc.2986.diff

File mc.2986.diff, 1.9 KB (added by szaszg, 9 years ago)

[Find All] flush only "found" bookmark, and user check if she/he want to flush bookmarks

  • src/editor/edit-impl.h

    diff --git a/src/editor/edit-impl.h b/src/editor/edit-impl.h
    index 0cf7e52..bca7e25 100644
    a b typedef struct edit_search_options_t 
    132132    gboolean only_in_selection; 
    133133    gboolean whole_words; 
    134134    gboolean all_codepages; 
     135    gboolean flush_bookmarks; 
    135136} edit_search_options_t; 
    136137 
    137138typedef struct edit_stack_type 
  • src/editor/editcmd.c

    diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c
    index 61e141c..08e903a 100644
    a b edit_do_search (WEdit * edit) 
    966966        long q = 0; 
    967967 
    968968        search_create_bookmark = FALSE; 
    969         book_mark_flush (edit, -1); 
     969        if (edit_search_options.flush_bookmarks) 
     970            book_mark_flush (edit, BOOK_MARK_FOUND_COLOR); 
    970971 
    971972        while (mc_search_run (edit->search, (void *) edit, q, edit->last_byte, &len)) 
    972973        { 
  • src/editor/editcmd_dialogs.c

    diff --git a/src/editor/editcmd_dialogs.c b/src/editor/editcmd_dialogs.c
    index 1443c07..d61e228 100644
    a b edit_search_options_t edit_search_options = { 
    5555    .backwards = FALSE, 
    5656    .only_in_selection = FALSE, 
    5757    .whole_words = FALSE, 
    58     .all_codepages = FALSE 
     58    .all_codepages = FALSE, 
     59    .flush_bookmarks = TRUE, 
    5960}; 
    6061 
    6162/*** file scope macro definitions ****************************************************************/ 
    editcmd_dialog_search_show (WEdit * edit) 
    117118                QUICK_CHECKBOX (N_("&All charsets"), &edit_search_options.all_codepages, NULL), 
    118119#endif 
    119120            QUICK_STOP_COLUMNS, 
     121            QUICK_CHECKBOX (N_("Fl&ush bookmarks before find all"), &edit_search_options.flush_bookmarks, NULL), 
    120122            QUICK_START_BUTTONS (TRUE, TRUE), 
    121123                QUICK_BUTTON (N_("&OK"), B_ENTER, NULL, NULL), 
    122124                QUICK_BUTTON (N_("&Find all"), B_USER, NULL, NULL),