@@ -13,6 +13,7 @@ import { IEventEmitter } from 'common/EventEmitter';
|
|||||||
import { ICoreBrowserService, IThemeService } from 'browser/services/Services';
|
import { ICoreBrowserService, IThemeService } from 'browser/services/Services';
|
||||||
import { Terminal } from 'xterm';
|
import { Terminal } from 'xterm';
|
||||||
import { toDisposable } from 'common/Lifecycle';
|
import { toDisposable } from 'common/Lifecycle';
|
||||||
|
import { isFirefox } from 'common/Platform';
|
||||||
|
|
||||||
interface ICursorState {
|
interface ICursorState {
|
||||||
x: number;
|
x: number;
|
||||||
@@ -190,8 +191,9 @@ export class CursorRenderLayer extends BaseRenderLayer {
|
|||||||
|
|
||||||
private _clearCursor(): void {
|
private _clearCursor(): void {
|
||||||
if (this._state) {
|
if (this._state) {
|
||||||
// Avoid potential rounding errors when device pixel ratio is less than 1
|
// Avoid potential rounding errors when browser is Firefox (#4487) or device pixel ratio is
|
||||||
if (this._coreBrowserService.dpr < 1) {
|
// less than 1
|
||||||
|
if (isFirefox || this._coreBrowserService.dpr < 1) {
|
||||||
this._clearAll();
|
this._clearAll();
|
||||||
} else {
|
} else {
|
||||||
this._clearCells(this._state.x, this._state.y, this._state.width, 1);
|
this._clearCells(this._state.x, this._state.y, this._state.width, 1);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { IEventEmitter } from 'common/EventEmitter';
|
|||||||
import { ICoreBrowserService, IThemeService } from 'browser/services/Services';
|
import { ICoreBrowserService, IThemeService } from 'browser/services/Services';
|
||||||
import { ICoreService, IOptionsService } from 'common/services/Services';
|
import { ICoreService, IOptionsService } from 'common/services/Services';
|
||||||
import { toDisposable } from 'common/Lifecycle';
|
import { toDisposable } from 'common/Lifecycle';
|
||||||
|
import { isFirefox } from 'common/Platform';
|
||||||
|
|
||||||
interface ICursorState {
|
interface ICursorState {
|
||||||
x: number;
|
x: number;
|
||||||
@@ -190,8 +191,9 @@ export class CursorRenderLayer extends BaseRenderLayer {
|
|||||||
|
|
||||||
private _clearCursor(): void {
|
private _clearCursor(): void {
|
||||||
if (this._state) {
|
if (this._state) {
|
||||||
// Avoid potential rounding errors when device pixel ratio is less than 1
|
// Avoid potential rounding errors when browser is Firefox (#4487) or device pixel ratio is
|
||||||
if (this._coreBrowserService.dpr < 1) {
|
// less than 1
|
||||||
|
if (isFirefox || this._coreBrowserService.dpr < 1) {
|
||||||
this._clearAll();
|
this._clearAll();
|
||||||
} else {
|
} else {
|
||||||
this._clearCells(this._state.x, this._state.y, this._state.width, 1);
|
this._clearCells(this._state.x, this._state.y, this._state.width, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user