mirror of
https://github.com/slap-editor/slap.git
synced 2024-09-11 04:45:47 +03:00
refactor(deps): no more text-buffer dep
This commit is contained in:
parent
679fb740a7
commit
52427caaf7
@ -5,7 +5,6 @@ var lodash = require('lodash');
|
||||
var util = require('slap-util');
|
||||
|
||||
var BaseWidget = require('base-widget');
|
||||
var Point = require('editor-widget/node_modules/text-buffer/lib/point');
|
||||
var Slap = require('./Slap');
|
||||
var BaseFindForm = require('./BaseFindForm');
|
||||
|
||||
|
@ -2,7 +2,6 @@ var blessed = require('blessed');
|
||||
var _ = require('lazy.js');
|
||||
|
||||
var BaseWidget = require('base-widget');
|
||||
var Point = require('editor-widget/node_modules/text-buffer/lib/point');
|
||||
|
||||
var Slap = require('./Slap');
|
||||
var BaseFindForm = require('./BaseFindForm');
|
||||
@ -43,7 +42,7 @@ GoLineForm.prototype._initHandlers = function () {
|
||||
lineNumber = Number(lineNumber) - 1;
|
||||
if (lineNumber !== lineNumber) return; // isNaN(lineNumber)
|
||||
var selection = self.pane.editor.selection;
|
||||
selection.setHeadPosition(new Point(lineNumber, 0));
|
||||
selection.setHeadPosition([lineNumber, 0]);
|
||||
selection.clearTail();
|
||||
if (direction) self.hide();
|
||||
return self;
|
||||
|
@ -3,7 +3,6 @@ var _ = require('lazy.js');
|
||||
|
||||
var BaseWidget = require('base-widget');
|
||||
var Field = require('editor-widget').Field;
|
||||
var Point = require('editor-widget/node_modules/text-buffer/lib/point');
|
||||
var Slap = require('./Slap');
|
||||
var BaseForm = require('./BaseForm');
|
||||
|
||||
@ -50,7 +49,7 @@ SaveAsForm.prototype._initHandlers = function () {
|
||||
var self = this;
|
||||
self.on('show', function () {
|
||||
self.pathField.textBuf.setText(self.pane.editor.textBuf.getPath() || '');
|
||||
self.pathField.selection.setHeadPosition(new Point(0, Infinity));
|
||||
self.pathField.selection.setHeadPosition([0, Infinity]);
|
||||
self.pathField.focus();
|
||||
});
|
||||
self.on('submit', function () {
|
||||
|
@ -33,7 +33,6 @@
|
||||
"rc": "^1.0.0",
|
||||
"slap-clipboard-plugin": "^0.0.10",
|
||||
"slap-util": "dbkaplun/slap-util",
|
||||
"text-buffer": "~6.1.3",
|
||||
"update-notifier": "^0.5.0",
|
||||
"winston": "^1.0.0"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user