Skip to content

Commit

Permalink
Bug 372765 - Provide accessible way to discover current line
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Li committed Mar 2, 2012
1 parent 0c12037 commit 4c2a3c2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ exports.EditorCommandFactory = (function() {
this.commandService.registerCommandContribution("orion.save", 1, this.toolbarId, "orion.editorActions.unlabeled", false, new mCommands.CommandKeyBinding('s', true));

// page navigation commands (go to line)
var lineParameter = new mCommands.ParametersDescription([new mCommands.CommandParameter('line', 'number', 'Line:')], false);
var lineParameter = new mCommands.ParametersDescription([new mCommands.CommandParameter('line', 'number', 'Line:')], false,
function() {
var line = editor.getModel().getLineAtOffset(editor.getCaretOffset()) + 1;
return [new mCommands.CommandParameter('line', 'number', 'Line:', line.toString())];
});

var gotoLineCommand = new mCommands.Command({
name: "Go to Line",
Expand Down

0 comments on commit 4c2a3c2

Please sign in to comment.