macro_rules! delete_lines {
($n:literal) => { ... };
($n:expr) => { ... };
}Expand description
Delete n lines at the cursor, moving the remaining from bottom.
Equivalent to CSI Pn M.
If used with literal, produces &'static str, otherwise produces String.
§Example
ⓘ
let mut buf = formatc!("{'clear}");
buf += "line 1\n";
buf += "line 2\n";
buf += "line 3\n";
buf += "line 4";
buf += codes::move_up!(2);
buf += codes::delete_lines!(2);
println!("{buf}");§Result in terminal
