From: Samir Benmendil Date: Thu, 15 Nov 2018 11:35:01 +0000 (+0000) Subject: vim/ycm: reverse sort order to actually select newest db X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/0be900cd7987548d3e307bffec2b21ab5c372c33 vim/ycm: reverse sort order to actually select newest db --- diff --git a/vim/ycm_extra_conf.py b/vim/ycm_extra_conf.py index 190cabd..f19fa08 100644 --- a/vim/ycm_extra_conf.py +++ b/vim/ycm_extra_conf.py @@ -91,7 +91,7 @@ def find_nearest_compilation_database(root='.'): elif len(dirs) > 1: logging.info("Multiple compilation databases found!") logging.info(dirs) - dirs.sort(key=lambda x: os.stat(x).st_mtime) + dirs.sort(key=lambda x: os.stat(x).st_mtime, reverse=True) logging.info("Selecting newest: %s" % (dirs[0])) return dirs[0]