Mercurial > repos > public > matlab_path_manager
diff +mpm/MatlabPathManager.m @ 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 | d9f899b1dfd0 |
children | 3a28f6de13c2 |
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)