2 * Copyright (c) 2019 The xterm.js authors. All rights reserved.
6 import { IBufferService, IDirtyRowService } from 'common/services/Services';
8 export class DirtyRowService implements IDirtyRowService {
11 private _start!: number;
12 private _end!: number;
14 public get start(): number { return this._start; }
15 public get end(): number { return this._end; }
18 @IBufferService private readonly _bufferService: IBufferService
23 public clearRange(): void {
24 this._start = this._bufferService.buffer.y;
25 this._end = this._bufferService.buffer.y;
28 public markDirty(y: number): void {
29 if (y < this._start) {
31 } else if (y > this._end) {
36 public markRangeDirty(y1: number, y2: number): void {
42 if (y1 < this._start) {
50 public markAllDirty(): void {
51 this.markRangeDirty(0, this._bufferService.rows - 1);