Skip to content
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.

Commit

Permalink
Merge pull request #39 from zschuessler/master
Browse files Browse the repository at this point in the history
Fix: Return Statement Prevents Load Of Backspace Plugin
  • Loading branch information
Craig Jefferds committed Sep 1, 2014
2 parents cb39f0f + a109644 commit 8955f8e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/plugins/backspace.js 100755 → 100644
@@ -1,23 +1,17 @@
exports.require = ["command.route"];
exports.plugin = function(commandRoute, cli) {

return;

cli.onCommand('backspace', function() {
var pos = cli.cursor();
// console.log(pos)
if(pos == cli.inputPrefix().length) return;

cli.spliceLine(pos-1, 1, pos-1);
// cli.backspace();
//cli.replaceLine(buffer.substr(0, pos-1) + buffer.substr(pos, buffer.length-pos), pos-1);

});

cli.onCommand('delete', function() {
var pos = cli.cursor();

cli.spliceLine(pos, 1, pos);
});
});

}

0 comments on commit 8955f8e

Please sign in to comment.