From 0be900cd7987548d3e307bffec2b21ab5c372c33 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Thu, 15 Nov 2018 11:35:01 +0000 Subject: [PATCH] vim/ycm: reverse sort order to actually select newest db --- vim/ycm_extra_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- 2.48.1