X-Git-Url: https://ruderich.org/simon/gitweb/?p=fcscs%2Ffcscs.git;a=blobdiff_plain;f=bin%2Ffcscs;h=d6a5878a6dcf51e3e911bde3748bcd64a1fdcb52;hp=d45747123a55f60acf2ea913b3df6b03be906537;hb=f184689fefd13bc5d5837d35ad36d454228277fb;hpb=bcac0b8075b6cd11edc0ab4237d872f239a8ca67 diff --git a/bin/fcscs b/bin/fcscs index d457471..d6a5878 100755 --- a/bin/fcscs +++ b/bin/fcscs @@ -102,7 +102,8 @@ or another number to select the longer match. Use backspace to remove the last entered number. Press return before entering a number to select the last (lowest numbered) -match. To abort without selecting any match either use "q". +match (underlined by default). To abort without selecting any match either use +"q". To change the selection mode (e.g. paths, files, etc.) use one of the mappings explained below. Per default URLs are selected, see options for a way to @@ -307,9 +308,13 @@ package Screen { my $attr_id = $config->{attribute}{match_id}; my $attr_string = $config->{attribute}{match_string}; + my $attr_last = $config->{attribute}{match_last}; foreach (@{$matches_add}) { - $self->draw($_->{y}, $_->{x}, $attr_string, $_->{string}); + my $attr = (defined $_->{id} and $_->{id} == 1) + ? $attr_last + : $attr_string; + $self->draw($_->{y}, $_->{x}, $attr, $_->{string}); if (defined $_->{id}) { $self->draw($_->{y}, $_->{x}, $attr_id, $_->{id}); } @@ -611,6 +616,8 @@ sub extend_match { $screen->debug('extend_match', 'started'); + return if not defined $match; + $screen->prompt(name => 'extend', value => undef); $screen->draw_prompt($config); @@ -1048,6 +1055,8 @@ Defaults in parentheses (foreground, background, attribute). =item B attribute for matches (yellow, default, normal) +=item B attribute for the match selected by return (yellow, default, underline) + =item B attribute for prompt name (standout) =item B attribute for prompt flags (standout) @@ -1066,6 +1075,8 @@ my %attribute = ( match_id => $screen->color_pair(Curses::COLOR_RED, -1) | Curses::A_BOLD, match_string => $screen->color_pair(Curses::COLOR_YELLOW, -1), + match_last => $screen->color_pair(Curses::COLOR_YELLOW, -1) + | Curses::A_UNDERLINE, prompt_name => Curses::A_STANDOUT, prompt_flags => Curses::A_STANDOUT, ); @@ -1376,8 +1387,8 @@ RESULT: $screen->debug('input', 'selecting match'); my $tmp = $result; $result = select_match($result->{select}, - $screen, \%config, $input, - $result->{matches}); + $screen, \%config, $input, + $result->{matches}); $result->{handler} = $tmp->{handler}; $result->{extend} = $tmp->{extend}; goto RESULT; # reprocess special entries in result