This commit is contained in:
Eugene Pankov 2019-09-05 12:08:43 +02:00
parent 7f7c10b775
commit 17065f4cee
3 changed files with 10 additions and 5 deletions

View File

@ -86,3 +86,8 @@ rules:
- as-needed - as-needed
- keywords: true - keywords: true
numbers: true numbers: true
quotes: off
'@typescript-eslint/quotes':
- error
- single
- allowTemplateLiterals: true

View File

@ -87,11 +87,11 @@ export class XTermFrontend extends Frontend {
try { try {
if (this.xtermCore.element && getComputedStyle(this.xtermCore.element).getPropertyValue('height') !== 'auto') { if (this.xtermCore.element && getComputedStyle(this.xtermCore.element).getPropertyValue('height') !== 'auto') {
let t = window.getComputedStyle(this.xtermCore.element.parentElement) let t = window.getComputedStyle(this.xtermCore.element.parentElement)
let r = parseInt(t.getPropertyValue("height")) let r = parseInt(t.getPropertyValue('height'))
let n = Math.max(0, parseInt(t.getPropertyValue("width"))) let n = Math.max(0, parseInt(t.getPropertyValue('width')))
let o = window.getComputedStyle(this.xtermCore.element) let o = window.getComputedStyle(this.xtermCore.element)
let i = r - (parseInt(o.getPropertyValue("padding-top")) + parseInt(o.getPropertyValue("padding-bottom"))) let i = r - (parseInt(o.getPropertyValue('padding-top')) + parseInt(o.getPropertyValue('padding-bottom')))
let l = n - (parseInt(o.getPropertyValue("padding-right")) + parseInt(o.getPropertyValue("padding-left"))) - this.xtermCore.viewport.scrollBarWidth let l = n - (parseInt(o.getPropertyValue('padding-right')) + parseInt(o.getPropertyValue('padding-left'))) - this.xtermCore.viewport.scrollBarWidth
let actualCellWidth = this.xtermCore._renderService.dimensions.actualCellWidth || 9 let actualCellWidth = this.xtermCore._renderService.dimensions.actualCellWidth || 9
let actualCellHeight = this.xtermCore._renderService.dimensions.actualCellHeight || 17 let actualCellHeight = this.xtermCore._renderService.dimensions.actualCellHeight || 17
let cols = Math.floor(l / actualCellWidth) let cols = Math.floor(l / actualCellWidth)

View File

@ -162,7 +162,7 @@ export default class TerminalModule { // eslint-disable-line @typescript-eslint/
argv = argv.slice(1) argv = argv.slice(1)
} }
if(require('yargs').parse(argv.slice(1))._[0] !== "open"){ if(require('yargs').parse(argv.slice(1))._[0] !== 'open'){
app.ready$.subscribe(() => { app.ready$.subscribe(() => {
terminal.openTab() terminal.openTab()
}) })