mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-08-24 15:16:42 +00:00
Remove scrollback lines through the index-aware buffer operation so deleted anchors are detached and retained lines are reindexed. Signed-off-by: fufesou <linlong1266@gmail.com>
15 lines
354 B
Dart
15 lines
354 B
Dart
import 'package:xterm/xterm.dart';
|
|
|
|
class RustDeskTerminal extends Terminal {
|
|
RustDeskTerminal({super.maxLines});
|
|
|
|
@override
|
|
void eraseScrollbackOnly() {
|
|
final scrollBack = buffer.scrollBack;
|
|
if (scrollBack == 0) return;
|
|
|
|
// Selection anchors require retained buffer lines to be reindexed.
|
|
buffer.lines.remove(0, scrollBack);
|
|
}
|
|
}
|