Skip to content

Commit

Permalink
Fix bug which broken cell repeat command
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Apr 14, 2024
1 parent d770e52 commit 969a0df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
3 changes: 0 additions & 3 deletions main/src/emulator/TextTerm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ export class TextEmulator implements TextEmulatorApi {
flags: FLAG_MASK_FG_CLUT | FLAG_MASK_BG_CLUT,
style: 0,
linkID: 0,
hyperlinkID: null,
hyperlinkURL: null,
fgClutIndex: 257,
bgClutIndex: 256,
Expand All @@ -370,7 +369,6 @@ export class TextEmulator implements TextEmulatorApi {
flags: FLAG_MASK_FG_CLUT | FLAG_MASK_BG_CLUT,
style: 0,
linkID: 0,
hyperlinkID: null,
hyperlinkURL: null,
fgClutIndex: 257,
bgClutIndex: 256,
Expand All @@ -386,7 +384,6 @@ export class TextEmulator implements TextEmulatorApi {
flags: 0,
style: 0,
linkID: 0,
hyperlinkID: null,
hyperlinkURL: null,
fgClutIndex: 257,
bgClutIndex: 256,
Expand Down
4 changes: 1 addition & 3 deletions main/src/terminal/TerminalBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { QPainter, QWidget, QPaintEvent, WidgetEventTypes, QMouseEvent, MouseBut
import { getLogger, log, Logger } from "extraterm-logging";
import { Disposable, Event } from "extraterm-event-emitter";
import { TextureFontAtlas, RGBAToQColor, FontSlice, CursorStyle, MonospaceFontMetrics,
CellPainter,
EmbeddedImage} from "extraterm-char-render-canvas";
CellPainter } from "extraterm-char-render-canvas";
import { STYLE_MASK_CURSOR } from "extraterm-char-cell-line";
import { Color } from "extraterm-color-utilities";
import { EventEmitter } from "extraterm-event-emitter";
Expand All @@ -25,7 +24,6 @@ import { ConfigCursorStyle } from "../config/Config.js";
import { FontAtlasCache } from "./FontAtlasCache.js";
import { BlobBulkFile } from "../bulk_file_handling/BlobBulkFile.js";
import { BulkFile } from "../bulk_file_handling/BulkFile.js";
import { TerminalEmbeddedImages } from "./TerminalEmbeddedImages.js";


enum SelectionMode {
Expand Down
9 changes: 4 additions & 5 deletions packages/text-term-api-lineimpl/src/TextLineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { CharCellLine, Cell } from "extraterm-char-cell-line";


export interface CellWithHyperlink extends Cell {
hyperlinkID: string;
hyperlinkURL: string;
}

Expand Down Expand Up @@ -125,14 +124,14 @@ export class TextLineImpl extends CharCellLine implements Line {

getCellAndLink(x: number, y: number): CellWithHyperlink {
const cellAttrs = this.getCell(x);
let hyperlinkURLGroupPair: URLGroupPair = null;
const hyperlinkID: string = null; // FIXME needed??

let hyperlinkURL: string = null;
if (cellAttrs.linkID !== 0) {
hyperlinkURLGroupPair = this._hyperlinkIDToURLMapping.get(cellAttrs.linkID);
const pair = this._hyperlinkIDToURLMapping.get(cellAttrs.linkID);
hyperlinkURL = pair.url;
}

return {hyperlinkURL: hyperlinkURLGroupPair.url, hyperlinkID, ...cellAttrs};
return {hyperlinkURL: hyperlinkURL, ...cellAttrs};
}

clone(): Line {
Expand Down

0 comments on commit 969a0df

Please sign in to comment.