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 465d9be commit c526c5cCopy full SHA for c526c5c
src/term.rs
@@ -436,8 +436,11 @@ impl Term {
436
437
/// Clear the last `n` lines before the current line.
438
///
439
- /// This positions the cursor at the beginning of the first line
440
- /// that was cleared.
+ /// Position the cursor at the beginning of the first line that was cleared.
+ ///
441
+ /// **Caution.** When `n` is larger than the number of lines above the
442
+ /// current cursor, the top `n` lines are cleared --- including some lines
443
+ /// below the cursor.
444
pub fn clear_last_lines(&self, n: usize) -> io::Result<()> {
445
self.move_cursor_up(n)?;
446
for _ in 0..n {
0 commit comments