Mercurial > repos > public > matlab_path_manager
changeset 32:cbeef8175d59
Make .loadedSubpath return paths in the order they appear on the matlab path
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 18 Sep 2018 14:27:54 +0200 |
parents | 769d1d252a3c |
children | 1fe5080cac46 |
files | +mpm/MatlabPathManager.m |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/+mpm/MatlabPathManager.m Tue Sep 18 14:17:13 2018 +0200 +++ b/+mpm/MatlabPathManager.m Tue Sep 18 14:27:54 2018 +0200 @@ -53,8 +53,11 @@ function s = loadedSubpaths(obj) state = mpm.PersistentState(obj.stateFilePath); - s = state.subpaths.keys(); - % TODO: Make it respect order from the matlab path + s_unordered = state.subpaths.keys(); + + mpath = obj.matlabPath(); + [ok, I] = ismember(s_unordered, mpath); + s = mpath(sort(I)); end function ps = matlabPath(obj)