summaryrefslogtreecommitdiff
path: root/src/evalbuffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-27 05:12:45 +0100
committerBram Moolenaar <Bram@vim.org>2019-10-27 05:12:45 +0100
commit52410575be50d5c40bbe6380159df48cfc382ceb (patch)
treef8a212edd951fa1df961da74870bc9c172dc0b01 /src/evalbuffer.c
parentdfded98f87601b11271ee88392c821ceb6390eda (diff)
downloadvim-git-52410575be50d5c40bbe6380159df48cfc382ceb.tar.gz
patch 8.1.2225: the "last used" info of a buffer is under usedv8.1.2225
Problem: The "last used" info of a buffer is under used. Solution: Add "lastused" to getbufinfo(). List buffers sorted by last-used field. (Andi Massimino, closes #4722)
Diffstat (limited to 'src/evalbuffer.c')
-rw-r--r--src/evalbuffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c
index 35c9ed245..a82b89727 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -595,6 +595,10 @@ get_buffer_info(buf_T *buf)
}
#endif
+#ifdef FEAT_VIMINFO
+ dict_add_number(dict, "lastused", buf->b_last_used);
+#endif
+
return dict;
}