-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: global event structure, and refactoring.
- Loading branch information
Showing
43 changed files
with
604 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
local api = require('vfiler/actions/api') | ||
local utils = require('vfiler/actions/utilities') | ||
|
||
local M = {} | ||
|
||
function M.open(vfiler, context, view) | ||
local path = view:get_item().path | ||
api.open_file(vfiler, context, view, path) | ||
utils.open_file(vfiler, context, view, path) | ||
end | ||
|
||
function M.open_by_choose(vfiler, context, view) | ||
local path = view:get_item().path | ||
api.open_file(vfiler, context, view, path, 'choose') | ||
utils.open_file(vfiler, context, view, path, 'choose') | ||
end | ||
|
||
function M.open_by_choose_or_cd(vfiler, context, view) | ||
local item = view:get_item() | ||
if item.type == 'directory' then | ||
api.cd(vfiler, context, view, item.path) | ||
utils.cd(vfiler, context, view, item.path) | ||
else | ||
api.open_file(vfiler, context, view, item.path, 'choose') | ||
utils.open_file(vfiler, context, view, item.path, 'choose') | ||
end | ||
end | ||
|
||
function M.open_by_split(vfiler, context, view) | ||
local path = view:get_item().path | ||
api.open_file(vfiler, context, view, path, 'bottom') | ||
utils.open_file(vfiler, context, view, path, 'bottom') | ||
end | ||
|
||
function M.open_by_tabpage(vfiler, context, view) | ||
local path = view:get_item().path | ||
api.open_file(vfiler, context, view, path, 'tab') | ||
utils.open_file(vfiler, context, view, path, 'tab') | ||
end | ||
|
||
function M.open_by_vsplit(vfiler, context, view) | ||
local path = view:get_item().path | ||
api.open_file(vfiler, context, view, path, 'right') | ||
utils.open_file(vfiler, context, view, path, 'right') | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.