mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 20:25:12 -05:00
print controls
This commit is contained in:
parent
dcbc67a91c
commit
898a00fc39
1 changed files with 3 additions and 2 deletions
|
@ -79,6 +79,7 @@ impl State {
|
|||
MoveTo(0, self.start_row),
|
||||
terminal::Clear(terminal::ClearType::FromCursorDown),
|
||||
PrintStyledContent("?".blue()),
|
||||
Print(" Select which packages to update (<space> to select, ↑/↓/j/k to navigate, enter to accept, <Ctrl-c> to cancel)")
|
||||
)?;
|
||||
|
||||
let base = self.start_row + 1;
|
||||
|
@ -114,7 +115,7 @@ impl State {
|
|||
out,
|
||||
Print(format!(
|
||||
"{:<name_width$} {:<current_width$} -> {}",
|
||||
format_args!(
|
||||
format!(
|
||||
"{}{}{}",
|
||||
deno_terminal::colors::gray(package.kind.scheme()),
|
||||
deno_terminal::colors::gray(":"),
|
||||
|
@ -269,7 +270,7 @@ pub fn select_interactive(
|
|||
let mut stdout = io::stdout();
|
||||
let raw_mode = RawMode::enable()?;
|
||||
|
||||
let (_, rows) = terminal::size().unwrap();
|
||||
let (_, rows) = terminal::size()?;
|
||||
|
||||
let (_, start_row) = cursor::position().unwrap_or_default();
|
||||
if rows - start_row < (packages.len() + 2) as u16 {
|
||||
|
|
Loading…
Add table
Reference in a new issue