From 7ea4fb8db45058575157304c9f0292f06d88886b Mon Sep 17 00:00:00 2001 From: sawka Date: Thu, 30 Mar 2023 20:54:52 -0700 Subject: [PATCH] fix bug with null anchor --- src/model.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/model.ts b/src/model.ts index fee49999..71020872 100644 --- a/src/model.ts +++ b/src/model.ts @@ -249,9 +249,7 @@ class Screen { this.focusType = mobx.observable.box(sdata.focustype, {name: "focusType"}); this.selectedLine = mobx.observable.box(sdata.selectedline == 0 ? null : sdata.selectedline, {name: "selectedLine"}); this.setAnchor_debounced = debounce(1000, this.setAnchor.bind(this)); - if (sdata.selectedline != 0) { - this.anchor = mobx.observable.box({anchorLine: sdata.selectedline, anchorOffset: 0}, {name: "screen-anchor"}); - } + this.anchor = mobx.observable.box({anchorLine: sdata.selectedline, anchorOffset: 0}, {name: "screen-anchor"}); this.termLineNumFocus = mobx.observable.box(0, {name: "termLineNumFocus"}); this.curRemote = mobx.observable.box(sdata.curremote, {name: "screen-curRemote"}); this.shareMode = mobx.observable.box(sdata.sharemode, {name: "screen-shareMode"});