]> ruderich.org/simon Gitweb - fcscs/fcscs.git/blobdiff - bin/fcscs
search mode: fix prompt drawing when aborting selection mode
[fcscs/fcscs.git] / bin / fcscs
index 9f58c36d8e40f4bd5fe4f26f92684e7385d632bb..8194f9410c580991a4a8b08ab047ed1b1a44007a 100755 (executable)
--- a/bin/fcscs
+++ b/bin/fcscs
@@ -102,8 +102,7 @@ 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 (underlined by default). To abort without selecting any match either use
-"q".
+match (underlined by default). To abort without selecting any match 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
@@ -501,8 +500,8 @@ sub run_in_background {
         # closes the window (because the parent process has exited).
         local $SIG{HUP} = 'IGNORE';
 
-        # Necessary for GNU screen or it'll keep the window open until the
-        # paste command has run.
+        # Necessary for GNU screen or it'll keep the window open until an
+        # external command has run.
         close STDIN  or die $!;
         close STDOUT or die $!;
         close STDERR or die $!;
@@ -831,6 +830,9 @@ sub mapping_mode_search {
 
     $screen->cursor(0);
 
+    $screen->prompt(name => undef, value => undef); # clear prompt
+    $screen->draw_prompt($config);
+
     return {
         select  => 'search',
         matches => \@last_matches,
@@ -1099,23 +1101,23 @@ Defaults in parentheses.
 
 =over
 
-=item B<debug>          enable debug mode, writes to I<~/.config/fcscs/log> (C<0>)
+=item B<debug>              enable debug mode, writes to I<~/.config/fcscs/log> (C<0>)
 
-=item B<initial_mode>   start in this mode, must be a valid mode mapping (C<\&mapping_mode_url>)
+=item B<initial_mode>       start in this mode, must be a valid mode mapping (C<\&mapping_mode_url>)
 
-=item B<multiplexer>    set multiplexer ("screen" or "tmux") if not autodetected (C<undef>)
+=item B<multiplexer>        set multiplexer ("screen" or "tmux") if not autodetected (C<undef>)
 
-=item B<ignorecase>     ignore case when searching (C<0>)
+=item B<ignorecase>         ignore case when searching (C<0>)
 
-=item B<smartcase>      ignore case unless one uppercase character is searched (C<1>)
+=item B<smartcase>          ignore case unless one uppercase character is searched (C<1>)
 
-=item B<paste_sleep>    sleep x us before running paste command (C<100_000>)
+=item B<paste_sleep>        sleep x us before running paste command (C<100_000>)
 
-=item B<screen_msgwait> GNU Screen's msgwait variable, used when yanking (C<5>)
+=item B<screen_msgwait>     GNU Screen's msgwait variable, used when yanking (C<5>)
 
 =item B<alternative_return> additional accept key like return, set to C<\n> to disable (C<s>)
 
-=item B<browser>        browser command as array reference (C<['x-www-browser']>)
+=item B<browser>            browser command as array reference (C<['x-www-browser']>)
 
 =back
 
@@ -1127,17 +1129,17 @@ Example:
 =cut
 my %setting = (
     # options
-    debug          => 0,
-    initial_mode   => \&mapping_mode_url,
-    multiplexer    => undef,
-    ignorecase     => 0,
-    smartcase      => 1,
-    paste_sleep    => 100_000,
-    screen_msgwait => 5,
+    debug              => 0,
+    initial_mode       => \&mapping_mode_url,
+    multiplexer        => undef,
+    ignorecase         => 0,
+    smartcase          => 1,
+    paste_sleep        => 100_000,
+    screen_msgwait     => 5,
     # global mappings
     alternative_return => 's',
     # commands
-    browser        => ['x-www-browser'],
+    browser            => ['x-www-browser'],
 );
 
 =head2 REGEXPS