add fastCSR option.
This commit is contained in:
parent
fc92dca39c
commit
66dc2118e7
|
@ -153,6 +153,9 @@ The screen on which every other node renders.
|
|||
(not just full-width ones, elements with uniform cells to their sides).
|
||||
this is known to cause flickering with elements that are not full-width,
|
||||
however, it is more optimal for terminal rendering.
|
||||
- **fastCSR** - do CSR on any element within 20 cols of the screen edge on
|
||||
either side. faster than smartCSR, but may cause flickering depending on
|
||||
what is on each side of the element.
|
||||
- **useBCE** - attempt to perform `back_color_erase` optimizations for terminals
|
||||
that support it. it will also work with terminals that don't support it, but
|
||||
only on lines with the default background color. as it stands with the current
|
||||
|
|
|
@ -769,6 +769,14 @@ Screen.prototype.cleanSides = function(el) {
|
|||
return pos._cleanSides = true;
|
||||
}
|
||||
|
||||
if (this.options.fastCSR) {
|
||||
// Maybe just do this instead of parsing.
|
||||
if (this.width - (pos.xl - pos.xi) < 40) {
|
||||
return pos._cleanSides = true;
|
||||
}
|
||||
return pos._cleanSides = false;
|
||||
}
|
||||
|
||||
if (!this.options.smartCSR) {
|
||||
return false;
|
||||
}
|
||||
|
@ -777,7 +785,7 @@ Screen.prototype.cleanSides = function(el) {
|
|||
// chance that the scrollbar may get moved around senselessly.
|
||||
// NOTE: In pratice, this doesn't seem to be the case.
|
||||
// if (this.scrollbar) {
|
||||
// return false;
|
||||
// return pos._cleanSides = false;
|
||||
// }
|
||||
|
||||
// Doesn't matter if we're only a height of 1.
|
||||
|
|
Loading…
Reference in New Issue