diff --git a/src/main.tsx b/src/main.tsx index 051b7bdc..6e35ec2e 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -328,6 +328,13 @@ class CmdInput extends React.Component<{}, {}> { lastHistoryUpDown : boolean = false; lastTabCurLine : mobx.IObservableValue = mobx.observable.box(null); + componentDidMount() { + let input = document.getElementById("main-cmd-input"); + if (input != null) { + input.focus(); + } + } + isModKeyPress(e : any) { return e.code.match(/^(Control|Meta|Alt|Shift)(Left|Right)$/); } @@ -433,6 +440,9 @@ class CmdInput extends React.Component<{}, {}> { } getAfterSlash(s : string) : string { + if (s.startsWith("^/")) { + return s.substr(1); + } let slashIdx = s.lastIndexOf("/"); if (slashIdx == s.length-1) { slashIdx = s.lastIndexOf("/", slashIdx-1); @@ -489,14 +499,14 @@ class CmdInput extends React.Component<{}, {}> {
-
{line}
+
{line == "" ? " " : line}
0}>
-
+
{this.getAfterSlash(istr)}
diff --git a/src/sh2.less b/src/sh2.less index fb9267ba..c37521e8 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -571,6 +571,9 @@ body .xterm .xterm-viewport { .info-lines { color: #d3d7cf; font-size: 12px; + font-family: 'JetBrains Mono', monospace; + white-space: pre; + padding-bottom: 6px; } .info-comps { @@ -583,6 +586,10 @@ body .xterm .xterm-viewport { min-width: 200px; color: #d3d7cf; } + + .metacmd-comp { + color: #8ae234; + } } .info-error {