util  Diff

Differences From Artifact [3480abaab0]:

To Artifact [1d69115b49]:


   102    102   end
   103    103   local function mergeD(dest, tbl, ...)
   104    104   	if tbl == nil then return dest end
   105    105   	for k,v in pairs(tbl) do dest[k] = v end
   106    106   	return mergeD(dest, ...)
   107    107   end
   108    108   local function merge(...)
   109         -	local t = {}
   110         -	return mergeD(t, ...)
          109  +	return mergeD({}, ...)
   111    110   end
   112    111   local function copy(t,...)
   113    112   	return merge(t), copy(...)
   114    113   end
   115    114   local function fastDelete(table,idx)
   116    115   -- delete without preserving table order
   117    116   	local l = #table
................................................................................
  1464   1463   					local obj = pathRef(ctx,m)
  1465   1464   					table.insert(obj.rels,newstruct.uid)
  1466   1465   				end
  1467   1466   
  1468   1467   				rebuildRelationCache(ctx.dict)
  1469   1468   			else -- assemble a list of groups
  1470   1469   				local tgtw = ...
         1470  +				if tgtw == nil then id10t 'missing path' end
  1471   1471   				local wp = pathParse(tgtw)
  1472   1472   				local o = pathResolve(ctx, wp)
  1473   1473   
  1474   1474   				for i,rs in pairs(ctx.dict.relsets) do
  1475   1475   					local allMembers = ctx.dict._relCache[rs.uid].mems
  1476   1476   					for j,s in ipairs(allMembers) do
  1477   1477   						if pathSub(s.path, wp) then
................................................................................
  1530   1530   							end
  1531   1531   						end
  1532   1532   						local kls = {
  1533   1533   							syn = fo.color('synonyms',2,true)..' of';
  1534   1534   							ant = fo.color('antonyms',1,true)..' of';
  1535   1535   							met = fo.color('metonyms',4,true)..' of';
  1536   1536   						}
  1537         -						io.stdout:write(string.format("% 4u) %s\n%s", i, fo.ul(kls[g.set.kind] .. ' ' .. llab), table.concat(others,'\n')) .. '\n')
         1537  +						io.stdout:write(string.format("% 4d) %s\n%s", i, fo.ul(kls[g.set.kind] .. ' ' .. llab), table.concat(others,'\n')) .. '\n')
  1538   1538   					end
  1539   1539   					return false -- no changes made
  1540   1540   				elseif op == 'link' or op == 'drop' then
  1541   1541   					local tgtn, paths = (select(2,...)), { select(3, ...) }
  1542   1542   					rebuildRelationCache(ctx.dict)
  1543   1543   				elseif op == 'destroy' then
  1544   1544   					local tgtw, tgtn = ...