aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-06-06 18:13:13 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-06-06 18:13:13 -0700
commit76f1cd816b397427edc12fced6c95645b9df6e78 (patch)
treee422f4340fd5078c1c95c4d6ef2c5b66c7238547
parent069415a78b5b97cd0d0accf7a925f7f599f7458c (diff)
Removed some unnecessary +refreshes and just set the dirty bit to 1
whenever an external program runs so the screen redraws without necessarily refreshing the file listing.
-rw-r--r--bb.c3
-rw-r--r--config.def.h12
2 files changed, 7 insertions, 8 deletions
diff --git a/bb.c b/bb.c
index 20c2231..2900950 100644
--- a/bb.c
+++ b/bb.c
@@ -1313,8 +1313,7 @@ void bb_browse(bb_t *bb, const char *path)
run_cmd_on_selection(bb, binding->command);
init_term();
fputs(T_ON(T_ALT_SCREEN), tty_out);
- if (binding->flags & NORMAL_TERM)
- bb->dirty = 1;
+ bb->dirty = 1;
check_cmds = 1;
goto redraw;
}
diff --git a/config.def.h b/config.def.h
index ce823df..a642cc8 100644
--- a/config.def.h
+++ b/config.def.h
@@ -165,17 +165,17 @@ binding_t bindings[] = {
{{' ','v','V'}, "+toggle", B("Toggle")" selection"},
{{KEY_ESC}, "+deselect:*", B("Clear")" selection"},
{{'e'}, "$EDITOR \"$@\"", B("Edit")" file in $EDITOR", NORMAL_TERM},
- {{KEY_CTRL_F}, "bb \"+g:`find | "PICK("Find: ", "")"`\" +r", B("Search")" for file"},
- {{'/'}, "bb \"+g:`ls -a | "PICK("Pick: ", "")"`\" +r", B("Pick")" file"},
- {{'d', KEY_DELETE}, "rm -rfi \"$@\"; bb '+de:*' +r", B("Delete")" files"},
- {{'D'}, "rm -rf \"$@\"; bb '+de:*' +r", B("Delete")" files (without confirmation)"},
- {{'M'}, "mv -i \"$@\" .; bb '+de:*' +r; for f; do bb \"+sel:`pwd`/`basename \"$f\"`\"; done",
+ {{KEY_CTRL_F}, "bb \"+g:`find | "PICK("Find: ", "")"`\"", B("Search")" for file"},
+ {{'/'}, "bb \"+g:`ls -a | "PICK("Pick: ", "")"`\"", B("Pick")" file"},
+ {{'d', KEY_DELETE}, "rm -rfi \"$@\"; bb '+deselect:*' +r", B("Delete")" files"},
+ {{'D'}, "rm -rf \"$@\"; bb '+deselect:*' +r", B("Delete")" files (without confirmation)"},
+ {{'M'}, "mv -i \"$@\" .; bb '+deselect:*' +r; for f; do bb \"+sel:`pwd`/`basename \"$f\"`\"; done",
B("Move")" files to current directory"},
{{'c'}, "cp -i \"$@\" .; bb +r", B("Copy")" files to current directory"},
{{'C'}, "bb '+de:*'; for f; do cp \"$f\" \"$f.copy\" && bb \"+sel:$f.copy\"; done; bb +r", B("Clone")" files"},
{{'n'}, "bb +r; " ASK("name", "New file: ", "")" && touch \"$name\"; bb \"+goto:$name\"", B("New file")},
{{'N'}, "bb +r; " ASK("name", "New dir: ", "")" && mkdir \"$name\"; bb \"+goto:$name\"", B("New directory")},
- {{KEY_CTRL_G}, "bb \"+cd:`" ASKECHO("Go to directory: ", "") "`\" +r", B("Go to")" directory"},
+ {{KEY_CTRL_G}, "bb \"+cd:`" ASKECHO("Go to directory: ", "") "`\"", B("Go to")" directory"},
{{'|'}, ASK("cmd", "|", "") " && printf '%s\\n' \"$@\" | sh -c \"$cmd\"; " PAUSE "; bb +r",
B("Pipe")" selected files to a command"},
{{':'}, "sh -c \"`" ASKECHO(":", "") "`\" -- \"$@\"; " PAUSE "; bb +refresh",