]> Sergey Matveev's repositories - nnn.git/commitdiff
Add C-l to force a redraw
authorsin <sin@2f30.org>
Wed, 11 Mar 2015 18:55:28 +0000 (18:55 +0000)
committersin <sin@2f30.org>
Wed, 11 Mar 2015 18:56:53 +0000 (18:56 +0000)
Often I am waiting for a file to download and be renamed from
.foo.part to .foo.  Forcing a redraw is a simple way to check if
the file has completed downloading.

config.def.h
noice.1
noice.c

index a7e5ffce93fd5487d216d3a0051031ef3f7d5178..45e9d5b06b6ade2b3e18b249e545408e2b89d546 100644 (file)
@@ -51,4 +51,5 @@ struct key bindings[] = {
        { 'c',            SEL_CD },
        /* Toggle sort by time */
        { 't',            SEL_MTIME },
+       { CONTROL('L'),   SEL_REDRAW },
 };
diff --git a/noice.1 b/noice.1
index 1a353b3d1f6adb04463b4a819d573bfafe7b73d9..2d940ad778b4b6f06f3dd29827cb89baa947e587 100644 (file)
--- a/noice.1
+++ b/noice.1
@@ -49,6 +49,8 @@ Enter filter-as-you-type mode.
 Change into the given directory.
 .It Ic t
 Toggle sort by time modified.
+.It Ic l
+Force a redraw.
 .It Ic !
 Spawn shell in current directory.
 .It Ic q
diff --git a/noice.c b/noice.c
index 31c0771e7c44b0572c1c43417490d67ba080ed34..e56a5f9ae785be078b673b1041958d562804bed2 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -57,6 +57,7 @@ enum action {
        SEL_SH,
        SEL_CD,
        SEL_MTIME,
+       SEL_REDRAW,
 };
 
 struct key {
@@ -817,6 +818,8 @@ moretyping:
                case SEL_MTIME:
                        mtimeorder = !mtimeorder;
                        goto out;
+               case SEL_REDRAW:
+                       goto out;
                }
        }