From be178a5a9f2cd578d665cb6ee3868fe937f61edc Mon Sep 17 00:00:00 2001 From: Jerome Reybert <jerome.reybert@kalray.eu> Date: Tue, 20 Oct 2015 00:08:05 +0200 Subject: [PATCH] plugin/magit.vim: sort file display --- plugin/magit.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/magit.vim b/plugin/magit.vim index aa81dbb..65a5d81 100644 --- a/plugin/magit.vim +++ b/plugin/magit.vim @@ -143,7 +143,8 @@ endfunction function! s:mg_display_files(mode, curdir, depth) " FIXME: ouch, must store subdirs in more efficient way - for [ filename, file_props ] in items(s:state.get_files(a:mode)) + for filename in sort(keys(s:state.get_files(a:mode))) + let file_props = s:state.get_file(a:mode, filename, 0) if ( file_props.depth != a:depth || filename !~ a:curdir . '.*' ) continue endif -- GitLab