Ticket #3531: mc-3531-nroff-bold-underlined.patch

File mc-3531-nroff-bold-underlined.patch, 25.6 KB (added by egmont, 5 years ago)

Fix

  • lib/skin.h

    commit 3e3c0f259cc515ba99a4a9551caae8fab0749121
    Author: Egmont Koblinger <egmont@gmail.com>
    Date:   Thu Oct 1 23:50:13 2015 +0200
    
        3531
    
    diff --git a/lib/skin.h b/lib/skin.h
    index 8d32180..6c0ad33 100644
    a b  
    1313   See color-slang.h (A_*) */ 
    1414 
    1515/* cache often used colors */ 
    16 #define DEFAULT_COLOR             mc_skin_color__cache[0] 
    17 #define NORMAL_COLOR              mc_skin_color__cache[1] 
    18 #define MARKED_COLOR              mc_skin_color__cache[2] 
    19 #define SELECTED_COLOR            mc_skin_color__cache[3] 
    20 #define MARKED_SELECTED_COLOR     mc_skin_color__cache[4] 
    21 #define DISABLED_COLOR            mc_skin_color__cache[5] 
    22 #define REVERSE_COLOR             mc_skin_color__cache[6] 
    23 #define COMMAND_MARK_COLOR        mc_skin_color__cache[7] 
    24 #define HEADER_COLOR              mc_skin_color__cache[8] 
     16#define DEFAULT_COLOR                   mc_skin_color__cache[0] 
     17#define NORMAL_COLOR                    mc_skin_color__cache[1] 
     18#define MARKED_COLOR                    mc_skin_color__cache[2] 
     19#define SELECTED_COLOR                  mc_skin_color__cache[3] 
     20#define MARKED_SELECTED_COLOR           mc_skin_color__cache[4] 
     21#define DISABLED_COLOR                  mc_skin_color__cache[5] 
     22#define REVERSE_COLOR                   mc_skin_color__cache[6] 
     23#define COMMAND_MARK_COLOR              mc_skin_color__cache[7] 
     24#define HEADER_COLOR                    mc_skin_color__cache[8] 
    2525 
    2626/* Dialog colors */ 
    27 #define COLOR_NORMAL              mc_skin_color__cache[9] 
    28 #define COLOR_FOCUS               mc_skin_color__cache[10] 
    29 #define COLOR_HOT_NORMAL          mc_skin_color__cache[11] 
    30 #define COLOR_HOT_FOCUS           mc_skin_color__cache[12] 
    31 #define COLOR_TITLE               mc_skin_color__cache[13] 
     27#define COLOR_NORMAL                    mc_skin_color__cache[9] 
     28#define COLOR_FOCUS                     mc_skin_color__cache[10] 
     29#define COLOR_HOT_NORMAL                mc_skin_color__cache[11] 
     30#define COLOR_HOT_FOCUS                 mc_skin_color__cache[12] 
     31#define COLOR_TITLE                     mc_skin_color__cache[13] 
    3232 
    3333/* Error dialog colors */ 
    34 #define ERROR_COLOR               mc_skin_color__cache[14] 
    35 #define ERROR_FOCUS               mc_skin_color__cache[15] 
    36 #define ERROR_HOT_NORMAL          mc_skin_color__cache[16] 
    37 #define ERROR_HOT_FOCUS           mc_skin_color__cache[17] 
    38 #define ERROR_TITLE               mc_skin_color__cache[18] 
     34#define ERROR_COLOR                     mc_skin_color__cache[14] 
     35#define ERROR_FOCUS                     mc_skin_color__cache[15] 
     36#define ERROR_HOT_NORMAL                mc_skin_color__cache[16] 
     37#define ERROR_HOT_FOCUS                 mc_skin_color__cache[17] 
     38#define ERROR_TITLE                     mc_skin_color__cache[18] 
    3939 
    4040/* Menu colors */ 
    41 #define MENU_ENTRY_COLOR          mc_skin_color__cache[19] 
    42 #define MENU_SELECTED_COLOR       mc_skin_color__cache[20] 
    43 #define MENU_HOT_COLOR            mc_skin_color__cache[21] 
    44 #define MENU_HOTSEL_COLOR         mc_skin_color__cache[22] 
    45 #define MENU_INACTIVE_COLOR       mc_skin_color__cache[23] 
     41#define MENU_ENTRY_COLOR                mc_skin_color__cache[19] 
     42#define MENU_SELECTED_COLOR             mc_skin_color__cache[20] 
     43#define MENU_HOT_COLOR                  mc_skin_color__cache[21] 
     44#define MENU_HOTSEL_COLOR               mc_skin_color__cache[22] 
     45#define MENU_INACTIVE_COLOR             mc_skin_color__cache[23] 
    4646 
    4747/* Popup menu colors */ 
    48 #define PMENU_ENTRY_COLOR         mc_skin_color__cache[24] 
    49 #define PMENU_SELECTED_COLOR      mc_skin_color__cache[25] 
    50 #define PMENU_HOT_COLOR           mc_skin_color__cache[26]      /* unused: not implemented yet */ 
    51 #define PMENU_HOTSEL_COLOR        mc_skin_color__cache[27]      /* unused: not implemented yet */ 
    52 #define PMENU_TITLE_COLOR         mc_skin_color__cache[28] 
     48#define PMENU_ENTRY_COLOR               mc_skin_color__cache[24] 
     49#define PMENU_SELECTED_COLOR            mc_skin_color__cache[25] 
     50#define PMENU_HOT_COLOR                 mc_skin_color__cache[26]        /* unused: not implemented yet */ 
     51#define PMENU_HOTSEL_COLOR              mc_skin_color__cache[27]        /* unused: not implemented yet */ 
     52#define PMENU_TITLE_COLOR               mc_skin_color__cache[28] 
    5353 
    54 #define BUTTONBAR_HOTKEY_COLOR    mc_skin_color__cache[29] 
    55 #define BUTTONBAR_BUTTON_COLOR    mc_skin_color__cache[30] 
     54#define BUTTONBAR_HOTKEY_COLOR          mc_skin_color__cache[29] 
     55#define BUTTONBAR_BUTTON_COLOR          mc_skin_color__cache[30] 
    5656 
    57 #define STATUSBAR_COLOR           mc_skin_color__cache[31] 
     57#define STATUSBAR_COLOR                 mc_skin_color__cache[31] 
    5858 
    5959/* 
    6060 * This should be selectable independently. Default has to be black background 
    6161 * foreground does not matter at all. 
    6262 */ 
    63 #define GAUGE_COLOR               mc_skin_color__cache[32] 
    64 #define INPUT_COLOR               mc_skin_color__cache[33] 
    65 #define INPUT_UNCHANGED_COLOR     mc_skin_color__cache[34] 
    66 #define INPUT_MARK_COLOR          mc_skin_color__cache[35] 
    67 #define INPUT_HISTORY_COLOR       mc_skin_color__cache[36] 
    68 #define COMMAND_HISTORY_COLOR     mc_skin_color__cache[37] 
    69  
    70 #define HELP_NORMAL_COLOR         mc_skin_color__cache[38] 
    71 #define HELP_ITALIC_COLOR         mc_skin_color__cache[39] 
    72 #define HELP_BOLD_COLOR           mc_skin_color__cache[40] 
    73 #define HELP_LINK_COLOR           mc_skin_color__cache[41] 
    74 #define HELP_SLINK_COLOR          mc_skin_color__cache[42] 
    75 #define HELP_TITLE_COLOR          mc_skin_color__cache[43] 
    76  
    77  
    78 #define VIEW_NORMAL_COLOR         mc_skin_color__cache[44] 
    79 #define VIEW_BOLD_COLOR           mc_skin_color__cache[45] 
    80 #define VIEW_UNDERLINED_COLOR     mc_skin_color__cache[46] 
    81 #define VIEW_SELECTED_COLOR       mc_skin_color__cache[47] 
     63#define GAUGE_COLOR                     mc_skin_color__cache[32] 
     64#define INPUT_COLOR                     mc_skin_color__cache[33] 
     65#define INPUT_UNCHANGED_COLOR           mc_skin_color__cache[34] 
     66#define INPUT_MARK_COLOR                mc_skin_color__cache[35] 
     67#define INPUT_HISTORY_COLOR             mc_skin_color__cache[36] 
     68#define COMMAND_HISTORY_COLOR           mc_skin_color__cache[37] 
     69 
     70#define HELP_NORMAL_COLOR               mc_skin_color__cache[38] 
     71#define HELP_ITALIC_COLOR               mc_skin_color__cache[39] 
     72#define HELP_BOLD_COLOR                 mc_skin_color__cache[40] 
     73#define HELP_LINK_COLOR                 mc_skin_color__cache[41] 
     74#define HELP_SLINK_COLOR                mc_skin_color__cache[42] 
     75#define HELP_TITLE_COLOR                mc_skin_color__cache[43] 
     76 
     77 
     78#define VIEW_NORMAL_COLOR               mc_skin_color__cache[44] 
     79#define VIEW_BOLD_COLOR                 mc_skin_color__cache[45] 
     80#define VIEW_UNDERLINED_COLOR           mc_skin_color__cache[46] 
     81#define VIEW_BOLD_UNDERLINED_COLOR      mc_skin_color__cache[47] 
     82#define VIEW_SELECTED_COLOR             mc_skin_color__cache[48] 
    8283 
    8384/* 
    8485 * editor colors - only 4 for normal, search->found, select, and whitespace 
    8586 * respectively 
    8687 * Last is defined to view color. 
    8788 */ 
    88 #define EDITOR_NORMAL_COLOR       mc_skin_color__cache[48] 
    89 #define EDITOR_BOLD_COLOR         mc_skin_color__cache[49] 
    90 #define EDITOR_MARKED_COLOR       mc_skin_color__cache[50] 
    91 #define EDITOR_WHITESPACE_COLOR   mc_skin_color__cache[51] 
    92 #define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[52] 
    93 #define EDITOR_BACKGROUND         mc_skin_color__cache[53] 
    94 #define EDITOR_FRAME              mc_skin_color__cache[54] 
    95 #define EDITOR_FRAME_ACTIVE       mc_skin_color__cache[55] 
    96 #define EDITOR_FRAME_DRAG         mc_skin_color__cache[56] 
     89#define EDITOR_NORMAL_COLOR             mc_skin_color__cache[49] 
     90#define EDITOR_BOLD_COLOR               mc_skin_color__cache[50] 
     91#define EDITOR_MARKED_COLOR             mc_skin_color__cache[51] 
     92#define EDITOR_WHITESPACE_COLOR         mc_skin_color__cache[52] 
     93#define EDITOR_RIGHT_MARGIN_COLOR       mc_skin_color__cache[53] 
     94#define EDITOR_BACKGROUND               mc_skin_color__cache[54] 
     95#define EDITOR_FRAME                    mc_skin_color__cache[55] 
     96#define EDITOR_FRAME_ACTIVE             mc_skin_color__cache[56] 
     97#define EDITOR_FRAME_DRAG               mc_skin_color__cache[57] 
    9798/* color of left 8 char status per line */ 
    98 #define LINE_STATE_COLOR          mc_skin_color__cache[57] 
    99 #define BOOK_MARK_COLOR           mc_skin_color__cache[58] 
    100 #define BOOK_MARK_FOUND_COLOR     mc_skin_color__cache[59] 
     99#define LINE_STATE_COLOR                mc_skin_color__cache[58] 
     100#define BOOK_MARK_COLOR                 mc_skin_color__cache[59] 
     101#define BOOK_MARK_FOUND_COLOR           mc_skin_color__cache[60] 
    101102 
    102103/* Diff colors */ 
    103 #define DFF_ADD_COLOR             mc_skin_color__cache[60] 
    104 #define DFF_CHG_COLOR             mc_skin_color__cache[61] 
    105 #define DFF_CHH_COLOR             mc_skin_color__cache[62] 
    106 #define DFF_CHD_COLOR             mc_skin_color__cache[63] 
    107 #define DFF_DEL_COLOR             mc_skin_color__cache[64] 
    108 #define DFF_ERROR_COLOR           mc_skin_color__cache[65] 
    109  
    110 #define MC_SKIN_COLOR_CACHE_COUNT 66 
     104#define DFF_ADD_COLOR                   mc_skin_color__cache[61] 
     105#define DFF_CHG_COLOR                   mc_skin_color__cache[62] 
     106#define DFF_CHH_COLOR                   mc_skin_color__cache[63] 
     107#define DFF_CHD_COLOR                   mc_skin_color__cache[64] 
     108#define DFF_DEL_COLOR                   mc_skin_color__cache[65] 
     109#define DFF_ERROR_COLOR                 mc_skin_color__cache[66] 
     110 
     111#define MC_SKIN_COLOR_CACHE_COUNT 67 
    111112 
    112113/*** enums ***************************************************************************************/ 
    113114 
  • lib/skin/colors-old.c

    diff --git a/lib/skin/colors-old.c b/lib/skin/colors-old.c
    index 5294b20..9f09baf 100644
    a b static const mc_skin_colors_old_t old_colors[] = { 
    9999    {"viewbold", "viewer", "viewbold"}, 
    100100    {"viewnormal", "viewer", "_default_"}, 
    101101    {"viewselected", "viewer", "viewselected"}, 
    102     {"viewunderline", "viewer", "viewunderline"} 
     102    {"viewunderline", "viewer", "viewunderline"}, 
     103    {"viewboldunderline", "viewer", "viewboldunderline"}, 
    103104}; 
    104105 
    105106static const size_t num_old_colors = G_N_ELEMENTS (old_colors); 
  • lib/skin/colors.c

    diff --git a/lib/skin/colors.c b/lib/skin/colors.c
    index 61e3a80..e7bbe2f 100644
    a b mc_skin_color_cache_init (void) 
    236236    VIEW_NORMAL_COLOR = mc_skin_color_get ("viewer", "_default_"); 
    237237    VIEW_BOLD_COLOR = mc_skin_color_get ("viewer", "viewbold"); 
    238238    VIEW_UNDERLINED_COLOR = mc_skin_color_get ("viewer", "viewunderline"); 
     239    VIEW_BOLD_UNDERLINED_COLOR = mc_skin_color_get ("viewer", "viewboldunderline"); 
    239240    VIEW_SELECTED_COLOR = mc_skin_color_get ("viewer", "viewselected"); 
    240241 
    241242    EDITOR_NORMAL_COLOR = mc_skin_color_get ("editor", "_default_"); 
  • misc/skins/dark.ini

    diff --git a/misc/skins/dark.ini b/misc/skins/dark.ini
    index d3717d5..9e3fc81 100644
    a b  
    118118    _default_ = lightgray;black 
    119119    viewbold = yellow;black 
    120120    viewunderline = brightred;black 
     121    viewboldunderline = yellow;black 
    121122    viewselected = yellow;cyan 
    122123 
    123124[diffviewer] 
  • misc/skins/darkfar.ini

    diff --git a/misc/skins/darkfar.ini b/misc/skins/darkfar.ini
    index a34de67..410b8a1 100644
    a b  
    118118    _default_ = lightgray;black 
    119119    viewbold = yellow;black 
    120120    viewunderline = brightred;black 
     121    viewboldunderline = yellow;black 
    121122    viewselected = yellow;cyan 
    122123 
    123124[diffviewer] 
  • misc/skins/default.ini

    diff --git a/misc/skins/default.ini b/misc/skins/default.ini
    index 625188e..9504c52 100644
    a b  
    118118    _default_ = lightgray;blue 
    119119    viewbold = yellow;blue 
    120120    viewunderline = brightred;blue 
     121    viewboldunderline = yellow;blue 
    121122    viewselected = yellow;cyan 
    122123 
    123124[diffviewer] 
  • misc/skins/double-lines.ini

    diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini
    index 172442e..d924ecc 100644
    a b  
    118118    _default_ = lightgray;blue 
    119119    viewbold = yellow;blue 
    120120    viewunderline = brightred;blue 
     121    viewboldunderline = yellow;blue 
    121122    viewselected = yellow;cyan 
    122123 
    123124[diffviewer] 
  • misc/skins/featured.ini

    diff --git a/misc/skins/featured.ini b/misc/skins/featured.ini
    index 47a1a23..b53f566 100644
    a b  
    120120    _default_ = lightgray;blue 
    121121    viewbold = yellow;blue 
    122122    viewunderline = brightred;blue 
     123    viewboldunderline = yellow;blue 
    123124    viewselected = yellow;cyan 
    124125 
    125126[diffviewer] 
  • misc/skins/gotar.ini

    diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini
    index fc65bb2..1291da7 100644
    a b  
    115115    _default_ = lightgray;black 
    116116    viewbold = brightred;black 
    117117    viewunderline = brightgreen;black 
     118    viewboldunderline = brightred;black 
    118119    viewselected = yellow;black 
    119120 
    120121[diffviewer] 
  • misc/skins/gray-green-purple256.ini

    diff --git a/misc/skins/gray-green-purple256.ini b/misc/skins/gray-green-purple256.ini
    index 964b26f..fd89a0c 100644
    a b  
    119119    # "black" might change color when going bold, so use "rgb000" instead 
    120120    viewbold = rgb000;;bold 
    121121    viewunderline = ;;underline 
     122    viewboldunderline = rgb000;;bold+underline 
    122123    viewselected = rgb303;rgb141;bold 
    123124 
    124125[diffviewer] 
  • misc/skins/gray-orange-blue256.ini

    diff --git a/misc/skins/gray-orange-blue256.ini b/misc/skins/gray-orange-blue256.ini
    index f8426f1..7ddc5e9 100644
    a b  
    119119    # "black" might change color when going bold, so use "rgb000" instead 
    120120    viewbold = rgb000;;bold 
    121121    viewunderline = ;;underline 
     122    viewboldunderline = rgb000;;bold+underline 
    122123    viewselected = rgb004;rgb530;bold 
    123124 
    124125[diffviewer] 
  • misc/skins/mc46.ini

    diff --git a/misc/skins/mc46.ini b/misc/skins/mc46.ini
    index 39e4363..c120921 100644
    a b  
    109109    _default_ = lightgray;blue 
    110110    viewbold = yellow;blue 
    111111    viewunderline = brightred;blue 
     112    viewboldunderline = yellow;blue 
    112113    viewselected = yellow;cyan 
    113114 
    114115[diffviewer] 
  • misc/skins/modarcon16-defbg.ini

    diff --git a/misc/skins/modarcon16-defbg.ini b/misc/skins/modarcon16-defbg.ini
    index b4b5b43..5475db4 100644
    a b  
    154154    _default_ = color7;default 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color11;color2;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/modarcon16.ini

    diff --git a/misc/skins/modarcon16.ini b/misc/skins/modarcon16.ini
    index 9381d37..a86d2d8 100644
    a b  
    154154    _default_ = color7;color0 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color11;color2;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/modarcon16root-defbg.ini

    diff --git a/misc/skins/modarcon16root-defbg.ini b/misc/skins/modarcon16root-defbg.ini
    index b910c81..dd13f8e 100644
    a b  
    154154    _default_ = color7;default 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color11;color1;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/modarcon16root.ini

    diff --git a/misc/skins/modarcon16root.ini b/misc/skins/modarcon16root.ini
    index 498a40c..fdf32ef 100644
    a b  
    154154    _default_ = color7;color0 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color11;color1;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/modarin256-defbg.ini

    diff --git a/misc/skins/modarin256-defbg.ini b/misc/skins/modarin256-defbg.ini
    index 4e86e62..4cb69f5 100644
    a b  
    154154    _default_ = color250;default 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color228;color23;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/modarin256.ini

    diff --git a/misc/skins/modarin256.ini b/misc/skins/modarin256.ini
    index 6d3415e..100998f 100644
    a b  
    154154    _default_ = color252;color237 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color228;color23;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/modarin256root-defbg.ini

    diff --git a/misc/skins/modarin256root-defbg.ini b/misc/skins/modarin256root-defbg.ini
    index 6f32ca4..8d6ad70 100644
    a b  
    154154    _default_ = color250;default 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color228;color88;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/modarin256root.ini

    diff --git a/misc/skins/modarin256root.ini b/misc/skins/modarin256root.ini
    index ef36965..743f52c 100644
    a b  
    154154    _default_ = color252;color237 
    155155    viewbold = ;;bold 
    156156    viewunderline = ;;underline 
     157    viewboldunderline = ;;bold+underline 
    157158    viewselected = color228;color88;bold 
    158159 
    159160[diffviewer] 
  • misc/skins/nicedark.ini

    diff --git a/misc/skins/nicedark.ini b/misc/skins/nicedark.ini
    index a40e561..76439c3 100644
    a b  
    118118    _default_ = lightgray;black 
    119119    viewbold = brown;blue 
    120120    viewunderline = brightred;blue 
     121    viewboldunderline = brown;blue 
    121122    viewselected = brown;cyan 
    122123 
    123124[diffviewer] 
  • misc/skins/sand256.ini

    diff --git a/misc/skins/sand256.ini b/misc/skins/sand256.ini
    index 83af5d1..08bf6e2 100644
    a b  
    176176    # "black" might change color when going bold, so use "rgb000" instead 
    177177    viewbold = rgb000;;bold 
    178178    viewunderline = ;;underline 
     179    viewboldunderline = rgb000;;bold+underline 
    179180    viewselected = rgb400;rgb452 
    180181 
    181182[diffviewer] 
  • misc/skins/xoria256.ini

    diff --git a/misc/skins/xoria256.ini b/misc/skins/xoria256.ini
    index 9a41a39..352fd38 100644
    a b  
    160160    _default_ = color250;color234 
    161161    viewbold = ;;bold 
    162162    viewunderline = ;;underline 
     163    viewboldunderline = ;;bold+underline 
    163164    viewselected = color228;color60 
    164165 
    165166[diffviewer] 
  • src/viewer/ascii.c

    diff --git a/src/viewer/ascii.c b/src/viewer/ascii.c
    index d04a544..39268ca 100644
    a b static gboolean 
    397397mcview_get_next_maybe_nroff_char (mcview_t * view, mcview_state_machine_t * state, int *c, 
    398398                                  int *color) 
    399399{ 
    400     mcview_state_machine_t state_after_nroff; 
    401     int c2, c3; 
     400    mcview_state_machine_t state_after_three_chars; 
     401    mcview_state_machine_t state_after_five_chars; 
     402    int c2, c3, c4, c5; 
    402403 
    403404    if (color != NULL) 
    404405        *color = VIEW_NORMAL_COLOR; 
    mcview_get_next_maybe_nroff_char (mcview_t * view, mcview_state_machine_t * stat 
    412413    if (!mcview_isprint (view, *c)) 
    413414        return TRUE; 
    414415 
    415     state_after_nroff = *state; 
     416    state_after_three_chars = *state; 
    416417 
    417     if (!mcview_get_next_char (view, &state_after_nroff, &c2)) 
     418    if (!mcview_get_next_char (view, &state_after_three_chars, &c2)) 
    418419        return TRUE; 
    419420    if (c2 != '\b') 
    420421        return TRUE; 
    421422 
    422     if (!mcview_get_next_char (view, &state_after_nroff, &c3)) 
     423    if (!mcview_get_next_char (view, &state_after_three_chars, &c3)) 
    423424        return TRUE; 
    424425    if (!mcview_isprint (view, c3)) 
    425426        return TRUE; 
    426427 
    427     if (*c == '_' && c3 == '_') 
     428    state_after_five_chars = state_after_three_chars; 
     429 
     430    /* Bold underlined is denoted by _ ^H x ^H x */ 
     431    if (*c == '_' && 
     432        mcview_get_next_char (view, &state_after_five_chars, &c4) && 
     433        c4 == '\b' && mcview_get_next_char (view, &state_after_five_chars, &c5) && c3 == c5) 
     434    { 
     435        *c = c3; 
     436        *state = state_after_five_chars; 
     437        if (color != NULL) 
     438            *color = VIEW_BOLD_UNDERLINED_COLOR; 
     439    } 
     440    else if (*c == '_' && c3 == '_') 
    428441    { 
    429         *state = state_after_nroff; 
     442        *state = state_after_three_chars; 
    430443        if (color != NULL) 
    431444            *color = 
    432445                state->nroff_underscore_is_underlined ? VIEW_UNDERLINED_COLOR : VIEW_BOLD_COLOR; 
    433446    } 
    434447    else if (*c == c3) 
    435448    { 
    436         *state = state_after_nroff; 
     449        *state = state_after_three_chars; 
    437450        state->nroff_underscore_is_underlined = FALSE; 
    438451        if (color != NULL) 
    439452            *color = VIEW_BOLD_COLOR; 
    mcview_get_next_maybe_nroff_char (mcview_t * view, mcview_state_machine_t * stat 
    441454    else if (*c == '_') 
    442455    { 
    443456        *c = c3; 
    444         *state = state_after_nroff; 
     457        *state = state_after_three_chars; 
    445458        state->nroff_underscore_is_underlined = TRUE; 
    446459        if (color != NULL) 
    447460            *color = VIEW_UNDERLINED_COLOR; 
  • src/viewer/internal.h

    diff --git a/src/viewer/internal.h b/src/viewer/internal.h
    index 9a507ad..1352d77 100644
    a b typedef enum 
    4848{ 
    4949    NROFF_TYPE_NONE = 0, 
    5050    NROFF_TYPE_BOLD = 1, 
    51     NROFF_TYPE_UNDERLINE = 2 
     51    NROFF_TYPE_UNDERLINE = 2, 
     52    NROFF_TYPE_BOLD_UNDERLINE = 3, 
    5253} nroff_type_t; 
    5354 
    5455/*** structures declarations (and typedefs of structures)*****************************************/ 
  • src/viewer/nroff.c

    diff --git a/src/viewer/nroff.c b/src/viewer/nroff.c
    index 1f9b80d..ab06f78 100644
    a b mcview__get_nroff_real_len (mcview_t * view, off_t start, off_t length) 
    114114        case NROFF_TYPE_UNDERLINE: 
    115115            ret += 2;           /* underline symbol and ox8 */ 
    116116            break; 
     117        case NROFF_TYPE_BOLD_UNDERLINE: 
     118            ret += 3 + nroff->char_length;      /* underline, 0x8, real char, 0x8 */ 
     119            break; 
    117120        default: 
    118121            break; 
    119122        } 
    mcview_nroff_seq_free (mcview_nroff_t ** nroff) 
    166169nroff_type_t 
    167170mcview_nroff_seq_info (mcview_nroff_t * nroff) 
    168171{ 
    169     int next, next2; 
     172    int next, next2, next3, next4; 
    170173 
    171174    if (nroff == NULL) 
    172175        return NROFF_TYPE_NONE; 
    mcview_nroff_seq_info (mcview_nroff_t * nroff) 
    181184    if (!mcview_nroff_get_char (nroff, &next2, nroff->index + 1 + nroff->char_length)) 
    182185        return nroff->type; 
    183186 
    184     if (nroff->current_char == '_' && next2 == '_') 
     187    if (nroff->current_char == '_' && 
     188        mcview_get_byte (nroff->view, nroff->index + 2 + nroff->char_length, &next3) && 
     189        next3 == '\b' && 
     190        mcview_nroff_get_char (nroff, &next4, nroff->index + 3 + nroff->char_length) && 
     191        next2 == next4) 
     192    { 
     193        nroff->current_char = next2; 
     194        nroff->type = NROFF_TYPE_BOLD_UNDERLINE; 
     195    } 
     196    else if (nroff->current_char == '_' && next2 == '_') 
    185197    { 
    186198        nroff->type = (nroff->prev_type == NROFF_TYPE_BOLD) 
    187199            ? NROFF_TYPE_BOLD : NROFF_TYPE_UNDERLINE; 
    mcview_nroff_seq_info (mcview_nroff_t * nroff) 
    196208        nroff->current_char = next2; 
    197209        nroff->type = NROFF_TYPE_UNDERLINE; 
    198210    } 
    199     else if (nroff->current_char == '+' && next2 == 'o') 
    200     { 
    201         /* ??? */ 
    202     } 
    203211    return nroff->type; 
    204212} 
    205213 
    mcview_nroff_seq_next (mcview_nroff_t * nroff) 
    221229    case NROFF_TYPE_UNDERLINE: 
    222230        nroff->index += 2; 
    223231        break; 
     232    case NROFF_TYPE_BOLD_UNDERLINE: 
     233        nroff->index += 3 + nroff->char_length; 
     234        break; 
    224235    default: 
    225236        break; 
    226237    } 
  • src/viewer/search.c

    diff --git a/src/viewer/search.c b/src/viewer/search.c
    index 50255d2..e68775e 100644
    a b mcview_search_cmd_callback (const void *user_data, gsize char_offset, int *curre 
    223223            case NROFF_TYPE_UNDERLINE: 
    224224                view->search_numNeedSkipChar = 2;       /* underline symbol and ox8 */ 
    225225                break; 
     226            case NROFF_TYPE_BOLD_UNDERLINE: 
     227                view->search_numNeedSkipChar = 3 + view->search_nroff_seq->char_length; /* underline, 0x8, real char, 0x8 */ 
     228                break; 
    226229            default: 
    227230                break; 
    228231            } 
  • tests/src/viewer/viewertest.txt

    diff --git a/tests/src/viewer/viewertest.txt b/tests/src/viewer/viewertest.txt
    index add6284..ecb94fd 100644
    a b c:x̀ ccccc:x̀́̂̃̄ s:xो sssss:xोोोोो sssccc:xोोो̀́ 
    6060c:の̀  ccccc:の̀́̂̃̄  s:のो  sssss:のोोोोो  sssccc:のोोो̀́̂  cccsss:の̀́̂ोोो  scscsc:のो̀ो́ो̂  cscscs:の̀ो́ो̂ो| 
    6161 
    6262* Nroff 
    63 ---------------  一一一一  - - - -  一 一 一 一  -----------------| 
    64 _Hello,_World!_  のイプサ  à́ b̀́ c̀́ d̀́  हो हि हो हि  __b___u___b___u__| 
    65 __HHeelllloo,,___W_o_r_l_d_!__  ののイイ_プ_サ  aà̀́́ bb̀̀́́ _c_̀_́ _d_̀_́  हहोो हहिि _ह_ो _ह_ि  ____bb_______u______bb_______u____| 
     63--------------------  一一一一一一  - - - - - -  一 一 一 一 一 一  ----------------------| 
     64_Hello,_Nice_World!_  のイプサム嘆  à́ b̀́ c̀́ d̀́ è́ f̀́  हो हि हो हि हो हि  __b___u___bu___b___u__| 
     65__HHeelllloo,,___N_i_c_e____WW_oo_rr_ll_dd_!!___  ののイイ_プ_サ_ムム_嘆嘆  aà̀́́ bb̀̀́́ _c_̀_́ _d_̀_́ _ee_̀̀_́́ _ff_̀̀_́́  हहोो हहिि _ह_ो _ह_ि _हह_ोो _हह_िि  ____bb_______u_______bb_uu_________bb_______u____| 
    6666______ <- should be bold again 
    6767 
    68 * Invalid nroff (a backspace b tab backspace tab underscore backspace newline, 
    69   reference rendering in the first row) 
    70 a.b     .       _. 
    71 ab            _ 
     68* Invalid nroff (a ^H b (tab) ^H (tab) _ ^H a ^H b (tab) a ^H a ^H a (tab) _ ^H EOL, 
     69  reference rendering (including some valid nroff) in the first row) 
     70a.b     .       _a.b     aa.a     _. 
     71ab            _ab   aaa   _ 
    7272 
    7373* Control characters (00-1F except tab/lf/cr, 7F, 80-9F), should all be replaced by dots 
    7474@ABCDEFGH--KL-NOPQRSTUVWXYZ[\]^_|?|@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_|