add overviewRuler to addDecoration

This commit is contained in:
meganrogge
2022-03-15 20:50:13 -04:00
parent 7f8592282f
commit c277fb742d
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -545,13 +545,15 @@ function loadTest() {
}
function addDecoration() {
term.options['overviewRulerWidth'] = 15;
const marker = term.addMarker(1);
const decoration = term.registerDecoration({ marker });
decoration.onRender((e) => {
if (e.classList.value === 'xterm-decoration') {
e.style.backgroundColor = 'red';
e.style.backgroundColor = '#ef2929';
}
});
term.registerDecoration({marker, overviewRulerOptions: { color: '#ef2929'}})
}
function addOverviewRuler() {