We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3ecb7d commit bf33cc9Copy full SHA for bf33cc9
src/term.rs
@@ -449,6 +449,10 @@ impl Term {
449
/// Clear the last `n` lines before the current line.
450
///
451
/// Position the cursor at the beginning of the first line that was cleared.
452
+ ///
453
+ /// **Caution.** When `n` is larger than the number of lines above the
454
+ /// current cursor, the top `n` lines are cleared --- including some lines
455
+ /// below the cursor.
456
pub fn clear_last_lines(&self, n: usize) -> io::Result<()> {
457
self.move_cursor_up(n)?;
458
for _ in 0..n {
0 commit comments