From b009b50e81b6c1d0d691505b5f5c0418f559bfc0 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Thu, 14 Mar 2019 23:19:58 +0100 Subject: Remove Atom config --- atom/packages/ex-mode/lib/ex-view-model.coffee | 35 -------------------------- 1 file changed, 35 deletions(-) delete mode 100644 atom/packages/ex-mode/lib/ex-view-model.coffee (limited to 'atom/packages/ex-mode/lib/ex-view-model.coffee') diff --git a/atom/packages/ex-mode/lib/ex-view-model.coffee b/atom/packages/ex-mode/lib/ex-view-model.coffee deleted file mode 100644 index 0c99be9..0000000 --- a/atom/packages/ex-mode/lib/ex-view-model.coffee +++ /dev/null @@ -1,35 +0,0 @@ -{ViewModel, Input} = require './view-model' - -module.exports = -class ExViewModel extends ViewModel - constructor: (@exCommand) -> - super(@exCommand, class: 'command') - @historyIndex = -1 - - atom.commands.add(@view.editorElement, 'core:move-up', @increaseHistoryEx) - atom.commands.add(@view.editorElement, 'core:move-down', @decreaseHistoryEx) - - restoreHistory: (index) -> - @view.editorElement.getModel().setText(@history(index).value) - - history: (index) -> - @exState.getExHistoryItem(index) - - increaseHistoryEx: => - if @history(@historyIndex + 1)? - @historyIndex += 1 - @restoreHistory(@historyIndex) - - decreaseHistoryEx: => - if @historyIndex <= 0 - # get us back to a clean slate - @historyIndex = -1 - @view.editorElement.getModel().setText('') - else - @historyIndex -= 1 - @restoreHistory(@historyIndex) - - confirm: (view) => - @value = @view.value - @exState.pushExHistory(@) - super(view) -- cgit