diff --git a/src/webshare-elems.tsx b/src/webshare-elems.tsx index 2b7da130c..a321e4c75 100644 --- a/src/webshare-elems.tsx +++ b/src/webshare-elems.tsx @@ -25,6 +25,8 @@ let foo = LinesView; // TODO scroll screen when new cmds arrive (selection) // TODO archived should delete line // TODO implement linedel +// TODO reshare +// TODO contentheight function makeFullRemoteRef(ownerName : string, remoteRef : string, name : string) : string { if (isBlank(ownerName) && isBlank(name)) { @@ -347,6 +349,9 @@ class TerminalRenderer extends React.Component<{line : T.WebLine, cmd : T.WebCmd if (termWrap != null) { termWrap.giveFocus(); } + mobx.action(() => { + WebShareModel.setSelectedLine(line.linenum); + })(); } render() { @@ -355,8 +360,12 @@ class TerminalRenderer extends React.Component<{line : T.WebLine, cmd : T.WebCmd let usedRows = WebShareModel.getUsedRows(lineutil.getWebRendererContext(line), line, cmd, width); let termHeight = termHeightFromRows(usedRows, WebShareModel.getTermFontSize()); let termLoaded = this.termLoaded.get(); + let isFocused = (WebShareModel.getSelectedLine() == line.linenum); return (