diff options
31 files changed, 129 insertions, 128 deletions
@@ -328,7 +328,7 @@ static void get_message_lines(char * message, ll_t * message_lines_list, int * message_max_width, int * message_max_len); -static int +static void disp_message(ll_t * message_lines_list, int width, int max_len, term_t * term, win_t * win); @@ -627,6 +627,8 @@ struct win_s int real_max_width; /* max line length. In column, tab or line * * mode it can be greater than the * * terminal width */ + int message_lines; /* Number of lines taken by the messages * + * (updated by disp_message */ int max_width; /* max line length or the terminal width * * minus 2 if less */ int offset; /* window offset user when centered */ @@ -4978,12 +4980,6 @@ build_metadata(term_t * term, int count, win_t * win) line_nb_of_word_a[0] = 0; first_word_in_line_a[0] = 0; - /* Modify the max number of displayed lines if we do not have */ - /* enough place */ - /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ - if (win->max_lines > term->nlines - 1) - win->max_lines = term->nlines - 1; - /* In column mode we need to calculate win->max_width, first initialize */ /* it to 0 and increment it later in the loop */ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ @@ -5174,13 +5170,13 @@ disp_matching_word(int pos, win_t * win, term_t * term, int is_matching) /* Set the buffer display attribute */ /* """""""""""""""""""""""""""""""" */ tputs(TPARM1(exit_attribute_mode), 1, outch); + if (word_a[pos].is_tagged) + apply_attr(term, win->tag_attr); + if (is_matching) apply_attr(term, win->match_text_attr); else apply_attr(term, win->search_text_attr); - - if (word_a[pos].is_tagged) - apply_attr(term, win->tag_attr); } } else @@ -5192,13 +5188,13 @@ disp_matching_word(int pos, win_t * win, term_t * term, int is_matching) /* Set the search cursor attribute */ /* """"""""""""""""""""""""""""""" */ tputs(TPARM1(exit_attribute_mode), 1, outch); + if (word_a[pos].is_tagged) + apply_attr(term, win->tag_attr); + if (is_matching) apply_attr(term, win->match_field_attr); else apply_attr(term, win->search_field_attr); - - if (word_a[pos].is_tagged) - apply_attr(term, win->tag_attr); } } np = mb_next(p); @@ -5392,7 +5388,7 @@ disp_word(int pos, search_mode_t search_mode, search_data_t * search_data, /* ======================================= */ /* Display a message line above the window */ /* ======================================= */ -static int +static void disp_message(ll_t * message_lines_list, int message_max_width, int message_max_len, term_t * term, win_t * win) { @@ -5401,10 +5397,11 @@ disp_message(ll_t * message_lines_list, int message_max_width, char * buf; int len; int size; - int message_lines = 0; int offset; wchar_t * w; + win->message_lines = 0; + /* Disarm the periodic timer to prevent the interruptions to corrupt */ /* screen by altering the timing of the decoding of the terminfo */ /* capabilities de */ @@ -5418,7 +5415,7 @@ disp_message(ll_t * message_lines_list, int message_max_width, /* Do nothing if there is no message to display */ /* """""""""""""""""""""""""""""""""""""""""""" */ if (message_lines_list == NULL) - return 0; + return; node = message_lines_list->head; buf = xmalloc(message_max_len + 1); @@ -5458,7 +5455,7 @@ disp_message(ll_t * message_lines_list, int message_max_width, puts(buf); node = node->next; - message_lines++; + win->message_lines++; } tputs(TPARM1(exit_attribute_mode), 1, outch); @@ -5472,8 +5469,6 @@ disp_message(ll_t * message_lines_list, int message_max_width, periodic_itv.it_interval.tv_sec = 0; periodic_itv.it_interval.tv_usec = TICK; setitimer(ITIMER_REAL, &periodic_itv, NULL); - - return message_lines; } /* ============================ */ @@ -5509,6 +5504,12 @@ disp_lines(win_t * win, toggle_t * toggle, int current, int count, i = win->start; + /* Modify the max number of displayed lines if we do not have */ + /* enough place */ + /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ + if (win->max_lines > term->nlines - win->message_lines) + win->max_lines = term->nlines - win->message_lines; + if (last_line >= win->max_lines) display_bar = 1; else @@ -6389,6 +6390,7 @@ main(int argc, char * argv[]) /* Win fields initialization */ /* """"""""""""""""""""""""" */ win.max_lines = 5; + win.message_lines = 0; win.asked_max_lines = -1; win.center = 0; win.max_cols = 0; @@ -7564,7 +7566,7 @@ main(int argc, char * argv[]) if (!win.search_field_attr.is_set) { - win.search_field_attr.bg = 2; + win.search_field_attr.bg = 4; win.search_field_attr.is_set = SET; } @@ -7573,7 +7575,7 @@ main(int argc, char * argv[]) if (term.has_reverse) win.search_text_attr.reverse = 1; - win.search_text_attr.fg = 2; + win.search_text_attr.fg = 4; win.search_text_attr.is_set = SET; } @@ -7585,26 +7587,23 @@ main(int argc, char * argv[]) if (!win.match_text_attr.is_set) { - win.match_text_attr.fg = 2; + win.match_text_attr.fg = 4; win.match_text_attr.is_set = SET; } if (!win.exclude_attr.is_set) { - win.exclude_attr.fg = 2; + win.exclude_attr.fg = 4; win.exclude_attr.is_set = SET; } if (!win.tag_attr.is_set) { + win.tag_attr.fg = 5; if (term.has_underline) win.tag_attr.underline = 1; - else - { - win.tag_attr.fg = 0; - win.tag_attr.bg = 3; - } + win.tag_attr.is_set = SET; } @@ -9474,8 +9473,8 @@ main(int argc, char * argv[]) /* Display the words window and its title for the first time */ /* """"""""""""""""""""""""""""""""""""""""""""""""""""""""" */ - message_lines = disp_message(message_lines_list, message_max_width, - message_max_len, &term, &win); + disp_message(message_lines_list, message_max_width, message_max_len, &term, + &win); /* Before displaying the word windows for the first time when in column */ /* or line mode, we need to ensure that the word under the cursor will */ @@ -9605,14 +9604,14 @@ main(int argc, char * argv[]) /* Reset the number of lines if the terminal has enough lines */ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ - if (win.max_lines < term.nlines - message_lines) + if (win.max_lines < term.nlines - win.message_lines) win.max_lines = win.asked_max_lines; else - win.max_lines = term.nlines - message_lines; + win.max_lines = term.nlines - win.message_lines; /* Erase the visible part of the displayed window */ /* """""""""""""""""""""""""""""""""""""""""""""" */ - for (i = 0; i < message_lines; i++) + for (i = 0; i < win.message_lines; i++) { tputs(TPARM1(clr_bol), 1, outch); tputs(TPARM1(clr_eol), 1, outch); @@ -9625,7 +9624,7 @@ main(int argc, char * argv[]) get_cursor_position(&line, &column); - for (i = 1; i < nl + message_lines; i++) + for (i = 1; i < nl + win.message_lines; i++) { if (line + i >= nlines) break; /* We have reached the last terminal line */ @@ -9661,8 +9660,8 @@ main(int argc, char * argv[]) win.first_column = word_a[pos].start; } - message_lines = disp_message(message_lines_list, message_max_width, - message_max_len, &term, &win); + disp_message(message_lines_list, message_max_width, message_max_len, + &term, &win); nl = disp_lines(&win, &toggle, current, count, search_mode, &search_data, &term, last_line, tmp_word, &langinfo); @@ -9670,8 +9669,8 @@ main(int argc, char * argv[]) /* Determine the number of lines to move the cursor up if the window */ /* display needed a terminal scrolling */ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ - if (nl + message_lines + term.curs_line > term.nlines) - offset = term.curs_line + nl + message_lines - term.nlines; + if (nl + win.message_lines + term.curs_line > term.nlines) + offset = term.curs_line + nl + win.message_lines - term.nlines; else offset = 0; @@ -9712,7 +9711,7 @@ main(int argc, char * argv[]) /* Erase the current window */ /* """""""""""""""""""""""" */ - for (i = 0; i < message_lines; i++) + for (i = 0; i < win.message_lines; i++) { tputs(TPARM1(cursor_up), 1, outch); tputs(TPARM1(clr_bol), 1, outch); @@ -9724,8 +9723,8 @@ main(int argc, char * argv[]) /* Display the words window and its title for the first time */ /* """"""""""""""""""""""""""""""""""""""""""""""""""""""""" */ - message_lines = disp_message(message_lines_list, message_max_width, - message_max_len, &term, &win); + disp_message(message_lines_list, message_max_width, message_max_len, + &term, &win); } /* The timeout has expired */ /* """"""""""""""""""""""" */ @@ -9771,7 +9770,7 @@ main(int argc, char * argv[]) /* Clear the message */ /* """"""""""""""""" */ - for (i = 0; i < message_lines; i++) + for (i = 0; i < win.message_lines; i++) { tputs(TPARM1(cursor_up), 1, outch); tputs(TPARM1(clr_bol), 1, outch); @@ -9783,8 +9782,8 @@ main(int argc, char * argv[]) /* Display the words window and its title for the first time */ /* """"""""""""""""""""""""""""""""""""""""""""""""""""""""" */ - message_lines = disp_message(message_lines_list, message_max_width, - message_max_len, &term, &win); + disp_message(message_lines_list, message_max_width, message_max_len, + &term, &win); } setitimer(ITIMER_REAL, &periodic_itv, NULL); @@ -9803,6 +9802,7 @@ main(int argc, char * argv[]) /* An escape sequence or a multibyte character has been pressed */ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ if (memcmp("\x1bOH", buffer, 3) == 0 + || memcmp("\x1bk", buffer, 2) == 0 || memcmp("\x1b[H", buffer, 3) == 0 || memcmp("\x1b[1~", buffer, 4) == 0 || memcmp("\x1b[7~", buffer, 4) == 0) @@ -9840,6 +9840,7 @@ main(int argc, char * argv[]) goto kschome; if (memcmp("\x1bOF", buffer, 3) == 0 + || memcmp("\x1bj", buffer, 2) == 0 || memcmp("\x1b[F", buffer, 3) == 0 || memcmp("\x1b[4~", buffer, 4) == 0 || memcmp("\x1b[8~", buffer, 4) == 0) @@ -9996,7 +9997,7 @@ main(int argc, char * argv[]) { int i; /* generic index in this block */ - for (i = 0; i < message_lines; i++) + for (i = 0; i < win.message_lines; i++) tputs(TPARM1(cursor_up), 1, outch); if (toggle.del_line) @@ -10005,7 +10006,7 @@ main(int argc, char * argv[]) tputs(TPARM1(clr_bol), 1, outch); tputs(TPARM1(save_cursor), 1, outch); - for (i = 1; i < nl + message_lines; i++) + for (i = 1; i < nl + win.message_lines; i++) { tputs(TPARM1(cursor_down), 1, outch); tputs(TPARM1(clr_eol), 1, outch); @@ -10015,7 +10016,7 @@ main(int argc, char * argv[]) } else { - for (i = 1; i < nl + message_lines; i++) + for (i = 1; i < nl + win.message_lines; i++) tputs(TPARM1(cursor_down), 1, outch); puts(""); } @@ -10126,14 +10127,14 @@ main(int argc, char * argv[]) /* """""""""""""""""""""""""""""""""""""""""""""""""" */ if (toggle.del_line) { - for (i = 0; i < message_lines; i++) + for (i = 0; i < win.message_lines; i++) tputs(TPARM1(cursor_up), 1, outch); tputs(TPARM1(clr_eol), 1, outch); tputs(TPARM1(clr_bol), 1, outch); tputs(TPARM1(save_cursor), 1, outch); - for (i = 1; i < nl + message_lines; i++) + for (i = 1; i < nl + win.message_lines; i++) { tputs(TPARM1(cursor_down), 1, outch); tputs(TPARM1(clr_eol), 1, outch); diff --git a/tests/attributes/t0001.good b/tests/attributes/t0001.good index 3f23cc4..c9700be 100644 --- a/tests/attributes/t0001.good +++ b/tests/attributes/t0001.good @@ -1,7 +1,7 @@ $ OUT=$(smenu -a i:7/4,b -ia -- t0001.in) a b c aa bb cc aba -0:01252c 2:21 4:21 6:07 7:07 9:21 10:21 12:21 13:21 15:01252c 16:01252c 17:01252c +0:01252c 2:22 4:22 6:07 7:07 9:22 10:22 12:22 13:22 15:01252c 16:01252c 17:01252c $ $ echo ":$OUT:" diff --git a/tests/direct_access/t0002.good b/tests/direct_access/t0002.good index 72ab12f..9f75e7f 100644 --- a/tests/direct_access/t0002.good +++ b/tests/direct_access/t0002.good @@ -9,7 +9,7 @@ $ OUT=$(smenu -N. -n 15 -c -e 000 -- t0002.in) ← 985) 985 986) 986 987) 987 988) 988 989) 989 990) 990 │ 0:01 1:01 2:01 3:01 4:01 5:01 6:01 13:01 14:01 15:01 16:01 17:01 18:01 25:01 26:01 27:01 28:01 29:01 30:01 37:01 38:01 39:01 40:01 41:01 42:01 49:01 50:01 51:01 52:01 53:01 54:01 61:01 62:01 63:01 64:01 65:01 66:01 79:20 ← 995) 995 996) 996 997) 997 998) 998 999) 999 1000 │ -0:01 1:01 2:01 3:01 4:01 5:01 6:01 13:01 14:01 15:01 16:01 17:01 18:01 25:01 26:01 27:01 28:01 29:01 30:01 37:01 38:01 39:01 40:01 41:01 42:01 49:01 50:01 51:01 52:01 53:01 54:01 68:21 69:21 70:21 71:21 79:20 +0:01 1:01 2:01 3:01 4:01 5:01 6:01 13:01 14:01 15:01 16:01 17:01 18:01 25:01 26:01 27:01 28:01 29:01 30:01 37:01 38:01 39:01 40:01 41:01 42:01 49:01 50:01 51:01 52:01 53:01 54:01 68:22 69:22 70:22 71:22 79:20 ← 1004) 1005 1005) 1006 1006) 1007 1007) 1008 1008) 1009 1009) 1010 │ 0:01 1:01 2:01 3:01 4:01 5:01 6:01 13:01 14:01 15:01 16:01 17:01 18:01 25:01 26:01 27:01 28:01 29:01 30:01 37:01 38:01 39:01 40:01 41:01 42:01 49:01 50:01 51:01 52:01 53:01 54:01 61:01 62:01 63:01 64:01 65:01 66:01 79:20 ← 1014) 1015 1015) 1016 1016) 1017 1017) 1018 1018) 1019 1019) 1020 │ diff --git a/tests/in-ex-clusions/t0001.good b/tests/in-ex-clusions/t0001.good index dbba22c..d90d7d7 100644 --- a/tests/in-ex-clusions/t0001.good +++ b/tests/in-ex-clusions/t0001.good @@ -1,7 +1,7 @@ $ OUT=$(smenu -e2 t0001.in) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -2:21 14:07 24:21 25:21 48:21 49:21 +2:22 14:07 24:22 25:22 48:22 49:22 $ $ echo ":$OUT:" diff --git a/tests/in-ex-clusions/t0002.good b/tests/in-ex-clusions/t0002.good index 989275c..bc88ef6 100644 --- a/tests/in-ex-clusions/t0002.good +++ b/tests/in-ex-clusions/t0002.good @@ -1,7 +1,7 @@ $ OUT=$(smenu -i[2-3] -e1 t0002.in) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -0:21 2:07 6:21 8:21 10:21 12:21 14:21 16:21 18:21 19:21 21:21 22:21 24:21 25:21 27:21 28:21 30:21 31:21 33:21 34:21 36:21 37:21 39:21 40:21 42:21 43:21 45:21 46:21 +0:22 2:07 6:22 8:22 10:22 12:22 14:22 16:22 18:22 19:22 21:22 22:22 24:22 25:22 27:22 28:22 30:22 31:22 33:22 34:22 36:22 37:22 39:22 40:22 42:22 43:22 45:22 46:22 $ $ echo ":$OUT:" diff --git a/tests/in-ex-clusions/t0003.good b/tests/in-ex-clusions/t0003.good index a2478e9..d48d388 100644 --- a/tests/in-ex-clusions/t0003.good +++ b/tests/in-ex-clusions/t0003.good @@ -1,7 +1,7 @@ $ OUT=$(smenu -i[2-3] -e3 -i5 t0003.in) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -0:21 4:21 6:21 8:07 10:21 12:21 14:21 16:21 18:21 19:21 21:21 22:21 27:21 28:21 30:21 31:21 36:21 37:21 39:21 40:21 42:21 43:21 45:21 46:21 +0:22 4:22 6:22 8:07 10:22 12:22 14:22 16:22 18:22 19:22 21:22 22:22 27:22 28:22 30:22 31:22 36:22 37:22 39:22 40:22 42:22 43:22 45:22 46:22 $ $ echo ":$OUT:" diff --git a/tests/in-ex-clusions/t0004.good b/tests/in-ex-clusions/t0004.good index 3960105..dc2a0b1 100644 --- a/tests/in-ex-clusions/t0004.good +++ b/tests/in-ex-clusions/t0004.good @@ -1,7 +1,7 @@ $ OUT=$(smenu -i[2-3] -e3 -i3 t0004.in) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -0:21 2:07 4:21 6:21 8:21 10:21 12:21 14:21 16:21 18:21 19:21 21:21 22:21 27:21 28:21 30:21 31:21 33:21 34:21 36:21 37:21 39:21 40:21 42:21 43:21 45:21 46:21 +0:22 2:07 4:22 6:22 8:22 10:22 12:22 14:22 16:22 18:22 19:22 21:22 22:22 27:22 28:22 30:22 31:22 33:22 34:22 36:22 37:22 39:22 40:22 42:22 43:22 45:22 46:22 $ $ echo ":$OUT:" diff --git a/tests/in-ex-clusions/t0005.good b/tests/in-ex-clusions/t0005.good index 4070c15..d97d3c1 100644 --- a/tests/in-ex-clusions/t0005.good +++ b/tests/in-ex-clusions/t0005.good @@ -1,9 +1,9 @@ $ OUT=$(smenu -i[2-3] -N '2|4' -e3 -i3 t0005.in) 1 1) 2 3 4 5 6 7 8 9 10 -5:21 7:01 8:01 9:01 10:01 12:07 19:21 26:21 33:21 40:21 47:21 54:21 61:21 68:21 69:21 +5:22 7:01 8:01 9:01 10:01 12:07 19:22 26:22 33:22 40:22 47:22 54:22 61:22 68:22 69:22 11 2) 12 13 14 15 16 17 18 19 -5:21 6:21 8:01 9:01 10:01 11:01 21:21 22:21 29:21 30:21 37:21 38:21 45:21 46:21 53:21 54:21 61:21 62:21 69:21 70:21 +5:22 6:22 8:01 9:01 10:01 11:01 21:22 22:22 29:22 30:22 37:22 38:22 45:22 46:22 53:22 54:22 61:22 62:22 69:22 70:22 3) 20 0:01 1:01 2:01 3:01 $ diff --git a/tests/initial_selection/t0007.good b/tests/initial_selection/t0007.good index b8ef2c4..094ec82 100644 --- a/tests/initial_selection/t0007.good +++ b/tests/initial_selection/t0007.good @@ -1,7 +1,7 @@ $ OUT=$(smenu -eb -saa t0007.in) aab abb aa ab ba bb aba bab aaa -0:21 1:21 2:21 4:21 5:21 6:21 8:07 9:07 11:21 12:21 14:21 15:21 17:21 18:21 20:21 21:21 22:21 24:21 25:21 26:21 28:01 29:01 30:01 +0:22 1:22 2:22 4:22 5:22 6:22 8:07 9:07 11:22 12:22 14:22 15:22 17:22 18:22 20:22 21:22 22:22 24:22 25:22 26:22 $ $ echo ":$OUT:" diff --git a/tests/initial_selection/t0009.good b/tests/initial_selection/t0009.good index b34e989..55706f1 100644 --- a/tests/initial_selection/t0009.good +++ b/tests/initial_selection/t0009.good @@ -1,7 +1,7 @@ $ OUT=$(smenu -iab -s /ba t0009.in) aab abb aa ab ba bb aba bab aaa -8:21 9:21 14:21 15:21 17:21 18:21 20:07 21:07 22:07 28:21 29:21 30:21 +8:22 9:22 14:22 15:22 17:22 18:22 20:07 21:07 22:07 28:22 29:22 30:22 $ $ echo ":$OUT:" diff --git a/tests/rows_cols_in-ex-clusions/t0001.good b/tests/rows_cols_in-ex-clusions/t0001.good index cd861eb..29e6d8e 100644 --- a/tests/rows_cols_in-ex-clusions/t0001.good +++ b/tests/rows_cols_in-ex-clusions/t0001.good @@ -1,17 +1,17 @@ $ OUT=$(smenu -n 6 -R2,3 -R5 t0001.in) 1 2 3 4 5 -0:21 2:21 4:21 6:21 8:21 +0:22 2:22 4:22 6:22 8:22 6 7 8 9 10 4:07 11 12 13 14 15 16 17 18 19 20 -0:21 1:21 3:21 4:21 6:21 7:21 9:21 10:21 12:21 13:21 +0:22 1:22 3:22 4:22 6:22 7:22 9:22 10:22 12:22 13:22 21 22 23 24 25 -0:21 1:21 3:21 4:21 +0:22 1:22 3:22 4:22 $ $ echo ":$OUT:" diff --git a/tests/rows_cols_in-ex-clusions/t0002.good b/tests/rows_cols_in-ex-clusions/t0002.good index 00ed627..760b275 100644 --- a/tests/rows_cols_in-ex-clusions/t0002.good +++ b/tests/rows_cols_in-ex-clusions/t0002.good @@ -3,7 +3,7 @@ $ OUT=$(smenu -n 6 -R3-5 -R1 t0002.in) 1 2 3 4 5 6 7 8 9 10 -0:21 2:21 4:21 6:21 8:21 9:21 +0:22 2:22 4:22 6:22 8:22 9:22 11 12 13 14 15 3:07 4:07 16 17 18 19 20 @@ -11,7 +11,7 @@ $ OUT=$(smenu -n 6 -R3-5 -R1 t0002.in) 21 22 23 24 25 -0:21 1:21 3:21 4:21 +0:22 1:22 3:22 4:22 $ $ echo ":$OUT:" diff --git a/tests/rows_cols_in-ex-clusions/t0003.good b/tests/rows_cols_in-ex-clusions/t0003.good index f6fd524..9abe369 100644 --- a/tests/rows_cols_in-ex-clusions/t0003.good +++ b/tests/rows_cols_in-ex-clusions/t0003.good @@ -3,7 +3,7 @@ $ OUT=$(smenu -n 6 -R3-5,1 t0003.in) 1 2 3 4 5 6 7 8 9 10 -0:21 2:21 4:21 6:21 8:21 9:21 +0:22 2:22 4:22 6:22 8:22 9:22 11 12 13 14 15 3:07 4:07 16 17 18 19 20 @@ -11,7 +11,7 @@ $ OUT=$(smenu -n 6 -R3-5,1 t0003.in) 21 22 23 24 25 -0:21 1:21 3:21 4:21 +0:22 1:22 3:22 4:22 $ $ echo ":$OUT:" diff --git a/tests/substitutions/t0012.good b/tests/substitutions/t0012.good index e242e4a..9cd64b4 100644 --- a/tests/substitutions/t0012.good +++ b/tests/substitutions/t0012.good @@ -3,19 +3,19 @@ $ OUT=$(LC_ALL=en_US.UTF-8 smenu -c -e 2 -I'/(1+)/(\1)/g' -n 15 \ > t0012.in) (1) 2 3 4 5 6 7 8 9 (1)0 (11) 12 → -0:01 1:07 2:07 3:07 4:07 5:07 6:07 7:07 9:21 10:21 11:21 12:21 13:21 71:21 72:21 73:21 74:21 75:21 76:01 +0:01 1:07 2:07 3:07 4:07 5:07 6:07 7:07 9:22 10:22 11:22 12:22 13:22 71:22 72:22 73:22 74:22 75:22 76:01 28 29 30 32 33 34 35 36 37 38 39 40 → -0:01 1:21 2:21 3:21 4:21 5:21 6:21 7:21 9:21 10:21 11:21 12:21 13:21 21:21 22:21 23:21 24:21 25:21 76:01 +0:01 1:22 2:22 3:22 4:22 5:22 6:22 7:22 9:22 10:22 11:22 12:22 13:22 21:22 22:22 23:22 24:22 25:22 76:01 53 54 55 56 57 58 59 60 6(1) 62 63 64 → -0:01 59:21 60:21 61:21 62:21 63:21 76:01 +0:01 59:22 60:22 61:22 62:22 63:22 76:01 77 78 79 80 8(1) 82 83 84 85 86 87 88 → -0:01 35:21 36:21 37:21 38:21 39:21 76:01 +0:01 35:22 36:22 37:22 38:22 39:22 76:01 (1)0(1) 102 (1)03 (1)04 (1)05 (1)06 (1)07 (1)08 (1)09 (11)0 (111) 112 → -0:01 9:21 10:21 11:21 12:21 13:21 71:21 72:21 73:21 74:21 75:21 76:01 +0:01 9:22 10:22 11:22 12:22 13:22 71:22 72:22 73:22 74:22 75:22 76:01 (11)9 120 121 122 123 124 125 126 127 128 129 (1)30→ -0:01 9:21 10:21 11:21 12:21 13:21 15:21 16:21 17:21 18:21 19:21 21:21 22:21 23:21 24:21 25:21 27:21 28:21 29:21 30:21 31:21 32:21 33:21 35:21 36:21 37:21 38:21 39:21 41:21 42:21 43:21 44:21 45:21 47:21 48:21 49:21 50:21 51:21 53:21 54:21 55:21 56:21 57:21 59:21 60:21 61:21 62:21 63:21 65:21 66:21 67:21 68:21 69:21 76:01 +0:01 9:22 10:22 11:22 12:22 13:22 15:22 16:22 17:22 18:22 19:22 21:22 22:22 23:22 24:22 25:22 27:22 28:22 29:22 30:22 31:22 32:22 33:22 35:22 36:22 37:22 38:22 39:22 41:22 42:22 43:22 44:22 45:22 47:22 48:22 49:22 50:22 51:22 53:22 54:22 55:22 56:22 57:22 59:22 60:22 61:22 62:22 63:22 65:22 66:22 67:22 68:22 69:22 76:01 (1)37 (1)38 (1)39 (1)40 (1)4(1) 142 (1)43 (1)44 (1)45 (1)46 (1)47 (1)48→ -0:01 35:21 36:21 37:21 38:21 39:21 76:01 +0:01 35:22 36:22 37:22 38:22 39:22 76:01 $ $ echo ":$OUT:" diff --git a/tests/substitutions/t0013.good b/tests/substitutions/t0013.good index a147c57..1677341 100644 --- a/tests/substitutions/t0013.good +++ b/tests/substitutions/t0013.good @@ -3,19 +3,19 @@ $ OUT=$(LC_ALL=en_US.UTF-8 smenu -c -i 2 -I'/(1+)/(\1)/g' -n 15 \ > t0013.in) 1 2 3 4 5 6 7 8 9 10 11 (1)2 13 → -0:01 1:21 2:21 3:21 5:07 6:07 7:07 8:07 9:07 11:21 12:21 13:21 14:21 15:21 16:21 17:21 19:21 20:21 21:21 22:21 23:21 25:21 26:21 27:21 28:21 29:21 31:21 32:21 33:21 34:21 35:21 37:21 38:21 39:21 40:21 41:21 43:21 44:21 45:21 46:21 47:21 49:21 50:21 51:21 52:21 53:21 55:21 56:21 57:21 58:21 59:21 61:21 62:21 63:21 64:21 65:21 73:21 74:21 75:21 76:01 +0:01 1:22 2:22 3:22 5:07 6:07 7:07 8:07 9:07 11:22 12:22 13:22 14:22 15:22 16:22 17:22 19:22 20:22 21:22 22:22 23:22 25:22 26:22 27:22 28:22 29:22 31:22 32:22 33:22 34:22 35:22 37:22 38:22 39:22 40:22 41:22 43:22 44:22 45:22 46:22 47:22 49:22 50:22 51:22 52:22 53:22 55:22 56:22 57:22 58:22 59:22 61:22 62:22 63:22 64:22 65:22 73:22 74:22 75:22 76:01 28 29 30 32 33 34 35 36 37 38 39 40 41 → -0:01 11:21 12:21 13:21 14:21 15:21 16:21 17:21 25:21 26:21 27:21 28:21 29:21 31:21 32:21 33:21 34:21 35:21 37:21 38:21 39:21 40:21 41:21 43:21 44:21 45:21 46:21 47:21 49:21 50:21 51:21 52:21 53:21 55:21 56:21 57:21 58:21 59:21 61:21 62:21 63:21 64:21 65:21 67:21 68:21 69:21 70:21 71:21 73:21 74:21 75:21 76:01 +0:01 11:22 12:22 13:22 14:22 15:22 16:22 17:22 25:22 26:22 27:22 28:22 29:22 31:22 32:22 33:22 34:22 35:22 37:22 38:22 39:22 40:22 41:22 43:22 44:22 45:22 46:22 47:22 49:22 50:22 51:22 52:22 53:22 55:22 56:22 57:22 58:22 59:22 61:22 62:22 63:22 64:22 65:22 67:22 68:22 69:22 70:22 71:22 73:22 74:22 75:22 76:01 53 54 55 56 57 58 59 60 61 62 63 64 65 → -0:01 1:21 2:21 3:21 5:21 6:21 7:21 8:21 9:21 11:21 12:21 13:21 14:21 15:21 16:21 17:21 19:21 20:21 21:21 22:21 23:21 25:21 26:21 27:21 28:21 29:21 31:21 32:21 33:21 34:21 35:21 37:21 38:21 39:21 40:21 41:21 43:21 44:21 45:21 46:21 47:21 49:21 50:21 51:21 52:21 53:21 61:21 62:21 63:21 64:21 65:21 67:21 68:21 69:21 70:21 71:21 73:21 74:21 75:21 76:01 +0:01 1:22 2:22 3:22 5:22 6:22 7:22 8:22 9:22 11:22 12:22 13:22 14:22 15:22 16:22 17:22 19:22 20:22 21:22 22:22 23:22 25:22 26:22 27:22 28:22 29:22 31:22 32:22 33:22 34:22 35:22 37:22 38:22 39:22 40:22 41:22 43:22 44:22 45:22 46:22 47:22 49:22 50:22 51:22 52:22 53:22 61:22 62:22 63:22 64:22 65:22 67:22 68:22 69:22 70:22 71:22 73:22 74:22 75:22 76:01 77 78 79 80 81 82 83 84 85 86 87 88 89 → -0:01 1:21 2:21 3:21 5:21 6:21 7:21 8:21 9:21 11:21 12:21 13:21 14:21 15:21 16:21 17:21 19:21 20:21 21:21 22:21 23:21 25:21 26:21 27:21 28:21 29:21 37:21 38:21 39:21 40:21 41:21 43:21 44:21 45:21 46:21 47:21 49:21 50:21 51:21 52:21 53:21 55:21 56:21 57:21 58:21 59:21 61:21 62:21 63:21 64:21 65:21 67:21 68:21 69:21 70:21 71:21 73:21 74:21 75:21 76:01 +0:01 1:22 2:22 3:22 5:22 6:22 7:22 8:22 9:22 11:22 12:22 13:22 14:22 15:22 16:22 17:22 19:22 20:22 21:22 22:22 23:22 25:22 26:22 27:22 28:22 29:22 37:22 38:22 39:22 40:22 41:22 43:22 44:22 45:22 46:22 47:22 49:22 50:22 51:22 52:22 53:22 55:22 56:22 57:22 58:22 59:22 61:22 62:22 63:22 64:22 65:22 67:22 68:22 69:22 70:22 71:22 73:22 74:22 75:22 76:01 101 (1)02 103 104 105 106 107 108 109 110 111 (11)2 113→ -0:01 1:21 2:21 3:21 11:21 12:21 13:21 14:21 15:21 16:21 17:21 19:21 20:21 21:21 22:21 23:21 25:21 26:21 27:21 28:21 29:21 31:21 32:21 33:21 34:21 35:21 37:21 38:21 39:21 40:21 41:21 43:21 44:21 45:21 46:21 47:21 49:21 50:21 51:21 52:21 53:21 55:21 56:21 57:21 58:21 59:21 61:21 62:21 63:21 64:21 65:21 73:21 74:21 75:21 76:01 +0:01 1:22 2:22 3:22 11:22 12:22 13:22 14:22 15:22 16:22 17:22 19:22 20:22 21:22 22:22 23:22 25:22 26:22 27:22 28:22 29:22 31:22 32:22 33:22 34:22 35:22 37:22 38:22 39:22 40:22 41:22 43:22 44:22 45:22 46:22 47:22 49:22 50:22 51:22 52:22 53:22 55:22 56:22 57:22 58:22 59:22 61:22 62:22 63:22 64:22 65:22 73:22 74:22 75:22 76:01 119 (1)20 (1)2(1) (1)22 (1)23 (1)24 (1)25 (1)26 (1)27 (1)28 (1)29 130 131→ -0:01 1:21 2:21 3:21 67:21 68:21 69:21 70:21 71:21 73:21 74:21 75:21 76:01 +0:01 1:22 2:22 3:22 67:22 68:22 69:22 70:22 71:22 73:22 74:22 75:22 76:01 137 138 139 140 141 (1)42 143 144 145 146 147 148 149→ -0:01 1:21 2:21 3:21 5:21 6:21 7:21 8:21 9:21 11:21 12:21 13:21 14:21 15:21 16:21 17:21 19:21 20:21 21:21 22:21 23:21 25:21 26:21 27:21 28:21 29:21 37:21 38:21 39:21 40:21 41:21 43:21 44:21 45:21 46:21 47:21 49:21 50:21 51:21 52:21 53:21 55:21 56:21 57:21 58:21 59:21 61:21 62:21 63:21 64:21 65:21 67:21 68:21 69:21 70:21 71:21 73:21 74:21 75:21 76:01 +0:01 1:22 2:22 3:22 5:22 6:22 7:22 8:22 9:22 11:22 12:22 13:22 14:22 15:22 16:22 17:22 19:22 20:22 21:22 22:22 23:22 25:22 26:22 27:22 28:22 29:22 37:22 38:22 39:22 40:22 41:22 43:22 44:22 45:22 46:22 47:22 49:22 50:22 51:22 52:22 53:22 55:22 56:22 57:22 58:22 59:22 61:22 62:22 63:22 64:22 65:22 67:22 68:22 69:22 70:22 71:22 73:22 74:22 75:22 76:01 $ $ echo ":$OUT:" diff --git a/tests/substitutions/t0014.good b/tests/substitutions/t0014.good index eeb15c2..2e3ce81 100644 --- a/tests/substitutions/t0014.good +++ b/tests/substitutions/t0014.good @@ -3,19 +3,19 @@ $ OUT=$(LC_ALL=en_US.UTF-8 smenu -c -i 2 -E'/(1+)/(\1)/g' -n 15 \ > t0014.in) (1) 2 3 4 5 6 7 8 9 (1)0 (11) 12 → -0:01 1:21 2:21 3:21 4:21 5:21 6:21 7:21 9:07 10:07 11:07 12:07 13:07 15:21 16:21 17:21 18:21 19:21 21:21 22:21 23:21 24:21 25:21 27:21 28:21 29:21 30:21 31:21 32:21 33:21 35:21 36:21 37:21 38:21 39:21 41:21 42:21 43:21 44:21 45:21 47:21 48:21 49:21 50:21 51:21 53:21 54:21 55:21 56:21 57:21 59:21 60:21 61:21 62:21 63:21 65:21 66:21 67:21 68:21 69:21 76:01 +0:01 1:22 2:22 3:22 4:22 5:22 6:22 7:22 9:07 10:07 11:07 12:07 13:07 15:22 16:22 17:22 18:22 19:22 21:22 22:22 23:22 24:22 25:22 27:22 28:22 29:22 30:22 31:22 32:22 33:22 35:22 36:22 37:22 38:22 39:22 41:22 42:22 43:22 44:22 45:22 47:22 48:22 49:22 50:22 51:22 53:22 54:22 55:22 56:22 57:22 59:22 60:22 61:22 62:22 63:22 65:22 66:22 67:22 68:22 69:22 76:01 28 29 30 32 33 34 35 36 37 38 39 40 → -0:01 15:21 16:21 17:21 18:21 19:21 27:21 28:21 29:21 30:21 31:21 32:21 33:21 35:21 36:21 37:21 38:21 39:21 41:21 42:21 43:21 44:21 45:21 47:21 48:21 49:21 50:21 51:21 53:21 54:21 55:21 56:21 57:21 59:21 60:21 61:21 62:21 63:21 65:21 66:21 67:21 68:21 69:21 71:21 72:21 73:21 74:21 75:21 76:01 +0:01 15:22 16:22 17:22 18:22 19:22 27:22 28:22 29:22 30:22 31:22 32:22 33:22 35:22 36:22 37:22 38:22 39:22 41:22 42:22 43:22 44:22 45:22 47:22 48:22 49:22 50:22 51:22 53:22 54:22 55:22 56:22 57:22 59:22 60:22 61:22 62:22 63:22 65:22 66:22 67:22 68:22 69:22 71:22 72:22 73:22 74:22 75:22 76:01 53 54 55 56 57 58 59 60 6(1) 62 63 64 → -0:01 1:21 2:21 3:21 4:21 5:21 6:21 7:21 9:21 10:21 11:21 12:21 13:21 15:21 16:21 17:21 18:21 19:21 21:21 22:21 23:21 24:21 25:21 27:21 28:21 29:21 30:21 31:21 32:21 33:21 35:21 36:21 37:21 38:21 39:21 41:21 42:21 43:21 44:21 45:21 47:21 48:21 49:21 50:21 51:21 53:21 54:21 55:21 56:21 57:21 65:21 66:21 67:21 68:21 69:21 71:21 72:21 73:21 74:21 75:21 76:01 +0:01 1:22 2:22 3:22 4:22 5:22 6:22 7:22 9:22 10:22 11:22 12:22 13:22 15:22 16:22 17:22 18:22 19:22 21:22 22:22 23:22 24:22 25:22 27:22 28:22 29:22 30:22 31:22 32:22 33:22 35:22 36:22 37:22 38:22 39:22 41:22 42:22 43:22 44:22 45:22 47:22 48:22 49:22 50:22 51 |