ncdu: added a "refresh" key - for #2174

Added Control+L key to refresh screen. Not sure if this is the
best choice, but it appears to be somewhat common.
This commit is contained in:
Keith Goldfarb 2018-03-24 10:55:20 -07:00 committed by Nick Craig-Wood
parent e5aa5fe7d8
commit 6c10312c75
2 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,7 @@ var helpText = []string{
" c toggle counts",
" g toggle graph",
" n,s,C sort by name,size,count",
" ^L refresh screen",
" ? to toggle help on and off",
" q/ESC/c-C to quit",
}
@ -539,6 +540,14 @@ outer:
u.toggleSort(&u.sortByCount)
case '?':
u.togglePopupBox(helpText)
// Refresh the screen. Not obvious what key to map
// this onto, but ^L is a common choice.
case termbox.KeyCtrlL:
err := termbox.Sync()
if err != nil {
fs.Errorf(nil, "termbox sync returned error: %v", err)
}
}
}
}

View File

@ -30,6 +30,7 @@ Here are the keys - press '?' to toggle the help on and off
c toggle counts
g toggle graph
n,s,C sort by name,size,count
^L refresh screen
? to toggle help on and off
q/ESC/c-C to quit