]> 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 69f6f8595f176dd934ad6befeb4e7ee76a6f9413..8194f9410c580991a4a8b08ab047ed1b1a44007a 100755 (executable)
--- a/bin/fcscs
+++ b/bin/fcscs
@@ -500,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 $!;
@@ -830,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,
@@ -1098,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
 
@@ -1126,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