Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
updating code based on pull request feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
samdmarshall committed Nov 28, 2016
1 parent 4b28260 commit 888247d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
17 changes: 8 additions & 9 deletions fzf.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "1.0.4"
VERSION = "1.0.5"

MakeCommand("fzf", "fzf.fzf", 0)

Expand All @@ -16,14 +16,13 @@ function reportedExitCode(string_value)
end

function fzf()
CurView():Save(false)
local fzf_output = HandleShellCommand("fzf", true, false)
if not reportedExitCode(fzf_output) then
local desired_path = removeNewlines(fzf_output)
local working_path = removeNewlines(HandleShellCommand("pwd", false, false))
local selected_path = working_path .. desired_path
CurView():Open(selected_path)
messenger:Message("Opened "..selected_path)
if CurView():CanClose() then
local fzf_output = HandleShellCommand("fzf", true, false)
if not reportedExitCode(fzf_output) then
local desired_path = removeNewlines(fzf_output)
CurView():Open(desired_path)
messenger:Message("Opened "..desired_path)
end
end
end

Expand Down
4 changes: 2 additions & 2 deletions repo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Tags": ["fzf"],
"Versions": [
{
"Version": "1.0.4",
"Url": "https://github.com/samdmarshall/micro-fzf-plugin/archive/v1.0.4.zip",
"Version": "1.0.5",
"Url": "https://github.com/samdmarshall/micro-fzf-plugin/archive/v1.0.5.zip",
"Require": {
"micro": ">=1.1.2"
}
Expand Down

0 comments on commit 888247d

Please sign in to comment.