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.
This commit is contained in:
parent
069415a78b
commit
76f1cd816b
3
bb.c
3
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;
|
||||
}
|
||||
|
12
config.def.h
12
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",
|
||||
|
Loading…
Reference in New Issue
Block a user