aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar sin <sin@2f30.org>2015-03-11 18:55:28 +0000
committerGravatar sin <sin@2f30.org>2015-03-11 18:56:53 +0000
commit3682c720ba1eb4ce05ea756c4b287b2b83fbae3e (patch)
tree5e2c438060c23cf2000ab97a5a9bacc9b3d14b4e
parentcdf8a429c5fe8efc176132aed266db2e6746aeee (diff)
downloadnnn-3682c720ba1eb4ce05ea756c4b287b2b83fbae3e.tar.gz
Add C-l to force a redraw
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.
-rw-r--r--config.def.h1
-rw-r--r--noice.12
-rw-r--r--noice.c3
3 files changed, 6 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index a7e5ffc..45e9d5b 100644
--- a/config.def.h
+++ b/config.def.h
@@ -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 1a353b3..2d940ad 100644
--- 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 31c0771..e56a5f9 100644
--- 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;
}
}