Skip to content

Instantly share code, notes, and snippets.

@jviereck
Created March 16, 2010 15:36
Show Gist options
  • Select an option

  • Save jviereck/334106 to your computer and use it in GitHub Desktop.

Select an option

Save jviereck/334106 to your computer and use it in GitHub Desktop.
From: Julian Viereck <julian.viereck@gmail.com>
Fix goto command.
diff --git a/plugins/supported/Editor/commands/editor.js b/plugins/supported/Editor/commands/editor.js
--- a/plugins/supported/Editor/commands/editor.js
+++ b/plugins/supported/Editor/commands/editor.js
@@ -37,25 +37,24 @@
var util = require("bespin:util/util");
var settings = require("Settings").settings;
/**
* 'goto' command
*/
exports.gotoCommand = function(env, args, request) {
- if (args.value) {
- var textView = env.get("view");
- textView._moveCursorTo({
- row: args.value - 1,
- column: 0
- });
- textView.focus();
- }
-
+ if (args.value) {
+ var textView = env.get("view");
+ textView.moveCursorTo({
+ row: args.value - 1,
+ column: 0
+ });
+ textView.focus();
+ }
};
/**
* 'replace' command
*/
exports.replaceCommand = function(env, args, request) {
editor.replace(args);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment