Call dmon_unwatch when changing project
Fix a conspicuous omission to call the dmon_unwatch function when changing project directory. This uncovered a bug or a quirk of the dmon library where the watch_ids can change as a result of calling dmon_unwatch because they are just indexes on a contiguous array. Use a workaround to always unwatch the first valid watch_id N times.
This commit is contained in:
@@ -164,7 +164,10 @@ command.add(nil, {
|
||||
core.error("Cannot open folder %q", text)
|
||||
return
|
||||
end
|
||||
core.confirm_close_docs(core.docs, core.open_folder_project, text)
|
||||
core.confirm_close_docs(core.docs, function(dirpath)
|
||||
core.close_current_project()
|
||||
core.open_folder_project(dirpath)
|
||||
end, text)
|
||||
end, suggest_directory)
|
||||
end,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user