nassh: improve startup display
When loading the app, the screen flashes white for a bit before loading
hterm (which defaults to black). The default cursor location is also at
0,0 which causes it to render early too. Lets move the cursor off screen
and set the default background to black. This should make the startup a
bit nicer.
Change-Id: I31817dbd44cd9b68024fbe2e5c990afe41caf4b7
Reviewed-on: https://chromium-review.googlesource.com/633784
Reviewed-by: Brandon Gilmore <varz@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/hterm/js/hterm_terminal.js b/hterm/js/hterm_terminal.js
index 84fec07..5e93085 100644
--- a/hterm/js/hterm_terminal.js
+++ b/hterm/js/hterm_terminal.js
@@ -1393,8 +1393,9 @@
':root {' +
' --hterm-charsize-width: ' + this.scrollPort_.characterSize.width + 'px;' +
' --hterm-charsize-height: ' + this.scrollPort_.characterSize.height + 'px;' +
- ' --hterm-cursor-offset-col: 0;' +
- ' --hterm-cursor-offset-row: 0;' +
+ // Default position hides the cursor for when the window is initializing.
+ ' --hterm-cursor-offset-col: -1;' +
+ ' --hterm-cursor-offset-row: -1;' +
' --hterm-blink-node-duration: 0.7s;' +
' --hterm-mouse-cursor-text: text;' +
' --hterm-mouse-cursor-pointer: default;' +