fix some typos

Change-Id: I4f2c2089a79c1e97760b789e54b18d1cda00c193
Reviewed-on: https://chromium-review.googlesource.com/455238
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/hterm/js/hterm.js b/hterm/js/hterm.js
index 65db3b3..e5f2f84 100644
--- a/hterm/js/hterm.js
+++ b/hterm/js/hterm.js
@@ -232,7 +232,7 @@
  *
  * Instances of this class have public read/write members for row and column.
  *
- * This class includes an 'overflow' bit which is use to indicate that the an
+ * This class includes an 'overflow' bit which is use to indicate that an
  * attempt has been made to move the cursor column passed the end of the
  * screen.  When this happens we leave the cursor column set to the last column
  * of the screen but set the overflow bit.  In this state cursor movement
diff --git a/hterm/js/hterm_keyboard.js b/hterm/js/hterm_keyboard.js
index 8264849..bdf08be 100644
--- a/hterm/js/hterm_keyboard.js
+++ b/hterm/js/hterm_keyboard.js
@@ -302,7 +302,7 @@
   var lowerKey = key.toLowerCase();
   if ((e.ctrlKey || e.metaKey) && (lowerKey == 'c' || lowerKey == 'v')) {
     // On FF the key press (not key down) event gets fired for copy/paste.
-    // Let it fall through for the default browser behaviour.
+    // Let it fall through for the default browser behavior.
     return;
   }
 
@@ -394,7 +394,7 @@
   }
 
   // Note that we use the triple-equals ('===') operator to test equality for
-  // these constants, in order to distingush usage of the constant from usage
+  // these constants, in order to distinguish usage of the constant from usage
   // of a literal string that happens to contain the same bytes.
   var CANCEL = hterm.Keyboard.KeyActions.CANCEL;
   var DEFAULT = hterm.Keyboard.KeyActions.DEFAULT;
diff --git a/hterm/js/hterm_keyboard_keymap.js b/hterm/js/hterm_keyboard_keymap.js
index 4bb8885..aaf7cd1 100644
--- a/hterm/js/hterm_keyboard_keymap.js
+++ b/hterm/js/hterm_keyboard_keymap.js
@@ -74,7 +74,7 @@
 };
 
 /**
- * Add mutiple key definitions in a single call.
+ * Add multiple key definitions in a single call.
  *
  * This function takes the key definitions as variable argument list.  Each
  * argument is the key definition specified as an array.
diff --git a/hterm/js/hterm_options.js b/hterm/js/hterm_options.js
index e647f3e..0afadc6 100644
--- a/hterm/js/hterm_options.js
+++ b/hterm/js/hterm_options.js
@@ -19,7 +19,7 @@
  * constructor.
  *
  * The defaults are as defined in http://www.vt100.net/docs/vt510-rm/DECSTR
- * except that we enable autowrap (wraparound) by defaut since that seems to
+ * except that we enable autowrap (wraparound) by default since that seems to
  * be what xterm does.
  *
  * @param {hterm.Options=} opt_copy Optional instance to copy.
diff --git a/hterm/js/hterm_preference_manager.js b/hterm/js/hterm_preference_manager.js
index 1e98f2b..3ed926c 100644
--- a/hterm/js/hterm_preference_manager.js
+++ b/hterm/js/hterm_preference_manager.js
@@ -176,7 +176,7 @@
    'that are also part of the stock X11 rgb.txt file.\n' +
    '\n' +
    'You can use \'null\' to specify that the default value should be not ' +
-   'be changed.  This is useful for skipping a small number of indicies ' +
+   'be changed.  This is useful for skipping a small number of indices ' +
    'when the value is specified as an array.'],
 
   'copy-on-select':
@@ -185,7 +185,7 @@
 
   'use-default-window-copy':
   [hterm.PreferenceManager.categories.CopyPaste, false, 'bool',
-   'Whether to use the default window copy behaviour'],
+   'Whether to use the default window copy behavior'],
 
   'clear-selection-after-copy':
   [hterm.PreferenceManager.categories.CopyPaste, true, 'bool',
diff --git a/hterm/js/hterm_pubsub_tests.js b/hterm/js/hterm_pubsub_tests.js
index 5e027a4..36f955c 100644
--- a/hterm/js/hterm_pubsub_tests.js
+++ b/hterm/js/hterm_pubsub_tests.js
@@ -47,7 +47,7 @@
   });
 
 /**
- * Test that a published parameter is haneded off to all subscribers.
+ * Test that a published parameter is handed off to all subscribers.
  */
 hterm.PubSub.Tests.addTest('parameter', function(result, cx) {
     var expected = {};
diff --git a/hterm/js/hterm_screen.js b/hterm/js/hterm_screen.js
index ccdc7cb..f7a12f8 100644
--- a/hterm/js/hterm_screen.js
+++ b/hterm/js/hterm_screen.js
@@ -262,8 +262,8 @@
     text = lib.f.getWhitespace(this.columnCount_);
   }
 
-  // We shouldn't honour inverse colors when clearing an area, to match
-  // xterm's back color erase behaviour.
+  // We shouldn't honor inverse colors when clearing an area, to match
+  // xterm's back color erase behavior.
   var inverse = this.textAttributes.inverse;
   this.textAttributes.inverse = false;
   this.textAttributes.syncColors();
@@ -375,7 +375,7 @@
  *
  * For example:
  * Given the DOM fragment '<div><span>Hello World</span></div>', call splitNode_
- * passing the span and an offset of 6.  This would modifiy the fragment to
+ * passing the span and an offset of 6.  This would modify the fragment to
  * become: '<div><span>Hello </span><span>World</span></div>'.  If the span
  * had any attributes they would have been copied to the new span as well.
  *
diff --git a/hterm/js/hterm_screen_tests.js b/hterm/js/hterm_screen_tests.js
index bf8f35b..484df49 100644
--- a/hterm/js/hterm_screen_tests.js
+++ b/hterm/js/hterm_screen_tests.js
@@ -364,7 +364,7 @@
 
     result.assertEQ(ary[1].innerHTML, 'XXXXX');
 
-    // Test overwritting widechar string.
+    // Test overwriting widechar string.
     var wideCharString = '\u4E2D\u6587\u5B57\u4E32';
     this.screen.setCursorPosition(2, 0);
     this.screen.textAttributes.wcNode = true;
diff --git a/hterm/js/hterm_scrollport.js b/hterm/js/hterm_scrollport.js
index 09df9c7..4e19cab 100644
--- a/hterm/js/hterm_scrollport.js
+++ b/hterm/js/hterm_scrollport.js
@@ -64,7 +64,7 @@
   // syncScrollHeight().
   this.lastRowCount_ = 0;
 
-  // The scroll wheel pixel delta multiplier to increase/descrease
+  // The scroll wheel pixel delta multiplier to increase/decrease
   // the scroll speed of mouse wheel events. See: http://goo.gl/sXelnq
   this.scrollWheelMultiplier_ = 1;
 
diff --git a/hterm/js/hterm_terminal.js b/hterm/js/hterm_terminal.js
index 2a3a84b..08e3d42 100644
--- a/hterm/js/hterm_terminal.js
+++ b/hterm/js/hterm_terminal.js
@@ -124,7 +124,7 @@
   // The VT escape sequence interpreter.
   this.vt = new hterm.VT(this);
 
-  // The keyboard hander.
+  // The keyboard handler.
   this.keyboard = new hterm.Keyboard(this);
 
   // General IO interface that can be given to third parties without exposing
@@ -137,7 +137,7 @@
   this.copyOnSelect = null;
   this.mousePasteButton = null;
 
-  // Whether to use the default window copy behaviour.
+  // Whether to use the default window copy behavior.
   this.useDefaultWindowCopy = false;
 
   this.clearSelectionAfterCopy = true;
@@ -1391,7 +1391,7 @@
  *
  * @param {integer} index The zero-based row index, measured relative to the
  *     start of the scrollback buffer.  On-screen rows will always have the
- *     largest indicies.
+ *     largest indices.
  * @return {HTMLElement} The 'x-row' element containing for the requested row.
  */
 hterm.Terminal.prototype.getRowNode = function(index) {
@@ -1411,7 +1411,7 @@
  *
  * @param {integer} start The zero-based row index to start from, measured
  *     relative to the start of the scrollback buffer.  On-screen rows will
- *     always have the largest indicies.
+ *     always have the largest indices.
  * @param {integer} end The zero-based row index to end on, measured
  *     relative to the start of the scrollback buffer.
  * @return {string} A single string containing the text value of the range of
@@ -1438,7 +1438,7 @@
  *
  * @param {integer} index The zero-based row index to return, measured
  *     relative to the start of the scrollback buffer.  On-screen rows will
- *     always have the largest indicies.
+ *     always have the largest indices.
  * @return {string} A string containing the text value of the selected row.
  */
 hterm.Terminal.prototype.getRowText = function(index) {
@@ -1534,7 +1534,7 @@
 /**
  * Renumber the rowIndex property of the given range of rows.
  *
- * The start and end indicies are relative to the screen, not the scrollback.
+ * The start and end indices are relative to the screen, not the scrollback.
  * Rows in the scrollback buffer cannot be renumbered.  Since they are not
  * addressable (you can't delete them, scroll them, etc), you should have
  * no need to renumber scrollback rows.
@@ -1667,7 +1667,7 @@
  * restrict scrolling to some higher row.  It is used for some VT cursor
  * positioning and scrolling commands.
  *
- * @return {integer} The bottommost row in the terminal's scroll region.
+ * @return {integer} The bottom most row in the terminal's scroll region.
  */
 hterm.Terminal.prototype.getVTScrollBottom = function() {
   if (this.vtScrollBottom_ != null)
diff --git a/hterm/js/hterm_terminal_tests.js b/hterm/js/hterm_terminal_tests.js
index 193d3a7..072ad72 100644
--- a/hterm/js/hterm_terminal_tests.js
+++ b/hterm/js/hterm_terminal_tests.js
@@ -58,7 +58,7 @@
  * Overridden addTest method.
  *
  * Every test in this suite needs to wait for the terminal initialization to
- * complete asynchronously.  Rather than stick a bunch of biolerplate into each
+ * complete asynchronously.  Rather than stick a bunch of boilerplate into each
  * test case, we use this overridden addTest method to add a proxy around the
  * actual test.
  */
diff --git a/hterm/js/hterm_vt.js b/hterm/js/hterm_vt.js
index 07d77ac..2c757be 100644
--- a/hterm/js/hterm_vt.js
+++ b/hterm/js/hterm_vt.js
@@ -229,7 +229,7 @@
 /**
  * Get an argument as an integer.
  *
- * @param {number} argnum The argument number to retreive.
+ * @param {number} argnum The argument number to retrieve.
  */
 hterm.VT.ParseState.prototype.iarg = function(argnum, defaultValue) {
   var str = this.args[argnum];
@@ -244,7 +244,7 @@
 };
 
 /**
- * Advance the parse postion.
+ * Advance the parse position.
  *
  * @param {integer} count The number of bytes to advance.
  */
@@ -526,7 +526,7 @@
     parseState.resetParseFunction();
 
   } else if (ch == ';') {
-    // Parameter delimeter.
+    // Parameter delimiter.
     if (this.trailingModifier_) {
       // Parameter delimiter after the trailing modifier.  That's a paddlin'.
       parseState.resetParseFunction();
diff --git a/hterm/js/hterm_vt_tests.js b/hterm/js/hterm_vt_tests.js
index 7b869c4..5781d0d 100644
--- a/hterm/js/hterm_vt_tests.js
+++ b/hterm/js/hterm_vt_tests.js
@@ -62,7 +62,7 @@
  * Overridden addTest method.
  *
  * Every test in this suite needs to wait for the terminal initialization to
- * complete asynchronously.  Rather than stick a bunch of biolerplate into each
+ * complete asynchronously.  Rather than stick a bunch of boilerplate into each
  * test case, we use this overridden addTest method to add a proxy around the
  * actual test.
  */
@@ -1428,7 +1428,7 @@
     text = this.terminal.getRowsText(0, 10);
     result.assertEQ(text, '1\n2\n3\n4\n5\n6\n7 XX\n8\n9\n10');
 
-    // Aand back to alternate screen.
+    // And back to alternate screen.
     this.terminal.interpret('\x1b[?1049h');
     text = this.terminal.getRowsText(0, 10);
     result.assertEQ(text, '1\n2\n3\n4\n\n\n\n\n\n');