Fixes Watcher/Autorunner for some editors (ex: TextMate)
Fixes Watcher/Autorunner for some editors (ex: TextMate)
This commit is contained in:
@@ -12,7 +12,8 @@ defmodule Watcher do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def handle_info({:file_event, watcher_pid, {path, events}}, %{watcher_pid: watcher_pid} = state) do
|
def handle_info({:file_event, watcher_pid, {path, events}}, %{watcher_pid: watcher_pid} = state) do
|
||||||
if Enum.member?(events, :modified) do
|
# respond to renamed as well due to that some editors use temporary files for atomic writes (ex: TextMate)
|
||||||
|
if Enum.member?(events, :modified) || Enum.member?(events, :renamed) do
|
||||||
path |> normalize |> reload
|
path |> normalize |> reload
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user