forked from NeogitOrg/neogit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9e8b55
commit ea74fda
Showing
4 changed files
with
43 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
local Buffer = require("neogit.lib.buffer") | ||
local ui = require("neogit.buffers.log_view.ui") | ||
local config = require("neogit.config") | ||
local popups = require("neogit.popups") | ||
local notification = require("neogit.lib.notification") | ||
local status_maps = require("neogit.config").get_reversed_status_maps() | ||
local CommitViewBuffer = require("neogit.buffers.commit_view") | ||
|
||
local M = {} | ||
|
||
function M.close() | ||
self.buffer:close() | ||
self.buffer = nil | ||
end | ||
|
||
function M.open() | ||
self.buffer = Buffer.create { | ||
name = "NeogitStashListView", | ||
filetype = "NeogitStashView", | ||
kind = config.values.stash.kind, | ||
context_higlight = true, | ||
mappings = { | ||
["q"] = function() | ||
self:close() | ||
end, | ||
["<esc>"] = function() | ||
self:close() | ||
end, | ||
["<enter>"] = function() | ||
-- Still looking for how to view a stash | ||
-- CommitViewBuffer.new(self.buffer.ui:get_commit_under_cursor(), self.files):open() | ||
end, | ||
} | ||
} | ||
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