Make directory index output sorted lines
parent
4a561537d1
commit
52f7ba7c5d
|
@ -41,6 +41,7 @@ function M.get_directory_index(vimwiki_index, directory)
|
||||||
index[noext] = filename
|
index[noext] = filename
|
||||||
end
|
end
|
||||||
|
|
||||||
|
table.sort(index)
|
||||||
return index
|
return index
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -72,7 +73,7 @@ function M.open_subdirectory_index_file(vimwiki_index, subdirectory)
|
||||||
|
|
||||||
local buf = vim.api.nvim_get_current_buf()
|
local buf = vim.api.nvim_get_current_buf()
|
||||||
vim.api.nvim_buf_set_lines(buf, 0, -1, false, {}) -- Clear out
|
vim.api.nvim_buf_set_lines(buf, 0, -1, false, {}) -- Clear out
|
||||||
vim.api.nvim_buf_set_lines(buf, 0, 0, false, lines) -- Put new contents
|
vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) -- Put new contents
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
Loading…
Reference in New Issue