Ticket #1484: mc-4.7.0-pre1.bookmark.patch

File mc-4.7.0-pre1.bookmark.patch, 3.0 KB (added by angel_il, 15 years ago)
  • edit/editdraw.c

    diff -Naur mc-4.7.0-pre1~/edit/editdraw.c mc-4.7.0-pre1/edit/editdraw.c
    old new  
    375375    int utf8lag = 0; 
    376376    unsigned int cur_line = 0; 
    377377    char line_stat[LINE_STATE_WIDTH + 1]; 
     378    int book_mark = 0; 
     379 
     380    if (book_mark_query_color(edit, edit->start_line + row, BOOK_MARK_COLOR)) { 
     381        book_mark = BOOK_MARK_COLOR; 
     382    } else if (book_mark_query_color(edit, edit->start_line + row, BOOK_MARK_FOUND_COLOR)) { 
     383        book_mark = BOOK_MARK_FOUND_COLOR; 
     384    } 
    378385 
    379386    edit_get_syntax_color (edit, b - 1, &color); 
    380387    q = edit_move_forward3 (edit, b, start_col - edit->start_col, 0); 
     
    432439                    c = edit_get_utf (edit, q, &cw); 
    433440                } 
    434441                /* we don't use bg for mc - fg contains both */ 
    435                 edit_get_syntax_color (edit, q, &color); 
    436                 p->style |= color << 16; 
     442                if (book_mark) { 
     443                    p->style |= book_mark << 16; 
     444                } else { 
     445                    edit_get_syntax_color (edit, q, &color); 
     446                    p->style |= color << 16; 
     447                } 
    437448                switch (c) { 
    438449                case '\n': 
    439450                    col = (end_col + utf8lag) - edit->start_col + 1;    /* quit */ 
  • edit/editkeys.c

    diff -Naur mc-4.7.0-pre1~/edit/editkeys.c mc-4.7.0-pre1/edit/editkeys.c
    old new  
    120120    { ALT ('n'), CK_Toggle_Line_State }, 
    121121    { ALT ('_'), CK_Toggle_Tab_TWS }, 
    122122 
     123    { ALT ('k'), CK_Toggle_Bookmark }, 
     124    { ALT ('i'), CK_Prev_Bookmark }, 
     125    { ALT ('j'), CK_Next_Bookmark }, 
     126    { ALT ('o'), CK_Flush_Bookmarks }, 
     127 
    123128    { XCTRL ('k'), CK_Delete_To_Line_End }, 
    124129    { XCTRL ('l'), CK_Refresh }, 
    125130    { XCTRL ('o'), CK_Shell }, 
  • edit/editmenu.c

    diff -Naur mc-4.7.0-pre1~/edit/editmenu.c mc-4.7.0-pre1/edit/editmenu.c
    old new  
    422422    {' ', N_("C&ut to clipfile          S-Del"), NULL_HOTKEY, menu_xcut_cmd}, 
    423423    {' ', N_("&Paste from clipfile      S-Ins"), NULL_HOTKEY, menu_xpaste_cmd}, 
    424424    {' ', "", NULL_HOTKEY, 0}, 
    425     {' ', N_("Toggle bookmar&k               "), NULL_HOTKEY, menu_toggle_bookmark_cmd}, 
    426     {' ', N_("&Next bookmark                 "), NULL_HOTKEY, menu_next_bookmark_cmd}, 
    427     {' ', N_("Pre&v bookmark                 "), NULL_HOTKEY, menu_prev_bookmark_cmd}, 
    428     {' ', N_("&Flush bookmark                "), NULL_HOTKEY, menu_flush_bookmark_cmd}, 
     425    {' ', N_("Toggle bookmar&k            M-k"), NULL_HOTKEY, menu_toggle_bookmark_cmd}, 
     426    {' ', N_("&Next bookmark              M-j"), NULL_HOTKEY, menu_next_bookmark_cmd}, 
     427    {' ', N_("Pre&v bookmark              M-i"), NULL_HOTKEY, menu_prev_bookmark_cmd}, 
     428    {' ', N_("&Flush bookmark             M-o"), NULL_HOTKEY, menu_flush_bookmark_cmd}, 
    429429    {' ', "", NULL_HOTKEY, 0}, 
    430430    {' ', N_("&Undo                       C-u"), NULL_HOTKEY, menu_undo_cmd}, 
    431431    {' ', "", NULL_HOTKEY, 0},