From 252b064d6a52648a8218fac7c5fe533377a48188 Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Wed, 22 Dec 2010 22:41:34 +0100 Subject: [PATCH] Add missing "times" to Editor.navigateLeft|Right() --- lib/ace/commands/default_commands.js | 4 ++-- lib/ace/editor.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ace/commands/default_commands.js b/lib/ace/commands/default_commands.js index 43e31aa3..1cd5c1b0 100644 --- a/lib/ace/commands/default_commands.js +++ b/lib/ace/commands/default_commands.js @@ -167,7 +167,7 @@ canon.addCommand({ }); canon.addCommand({ name: "gotoleft", - exec: function(env, args, request) { env.editor.navigateLeft(); } + exec: function(env, args, request) { env.editor.navigateLeft(args.times); } }); canon.addCommand({ name: "selectwordright", @@ -191,7 +191,7 @@ canon.addCommand({ }); canon.addCommand({ name: "gotoright", - exec: function(env, args, request) { env.editor.navigateRight(); } + exec: function(env, args, request) { env.editor.navigateRight(args.times); } }); canon.addCommand({ name: "selectpagedown", diff --git a/lib/ace/editor.js b/lib/ace/editor.js index eb46cf96..00e7e30a 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -890,7 +890,7 @@ var Editor =function(renderer, doc) { this.moveCursorToPosition(selectionStart); } else { - times = times | 1; + times = times || 1; while (times--) { this.selection.moveCursorLeft(); } @@ -904,7 +904,7 @@ var Editor =function(renderer, doc) { this.moveCursorToPosition(selectionEnd); } else { - times = times | 1; + times = times || 1; while (times--) { this.selection.moveCursorRight(); }