aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_defs.h
diff options
context:
space:
mode:
authorRob Pilling <robpilling@gmail.com>2020-04-19 19:24:41 +0100
committerRob Pilling <robpilling@gmail.com>2020-04-19 20:18:41 +0100
commitec2d45a8515399e3f23e0a552bcb222ae4836f7a (patch)
treed1f584fa4df4357d248402a66d8211858feb02b8 /src/nvim/buffer_defs.h
parentca02db1f9fac9fd91164af2c9e42e57913f08f9a (diff)
downloadrneovim-ec2d45a8515399e3f23e0a552bcb222ae4836f7a.tar.gz
rneovim-ec2d45a8515399e3f23e0a552bcb222ae4836f7a.tar.bz2
rneovim-ec2d45a8515399e3f23e0a552bcb222ae4836f7a.zip
vim-patch:7.4.1988
Problem: When updating viminfo with file marks there is no time order. Solution: Remember the time when a buffer was last used, store marks for the most recently used buffers. https://github.com/vim/vim/commit/ab9c89b68dcbdb3fbda8c5a50dd90caca64f1bfd As this is a viminfo fix, most of this is irrelevant - the patch has just been brought across for the creation and updating of buffer's `b_last_used` properties.
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r--src/nvim/buffer_defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index 2460159fc0..3dbd3ea121 100644
--- a/src/nvim/buffer_defs.h
+++ b/src/nvim/buffer_defs.h
@@ -543,6 +543,8 @@ struct file_buffer {
long b_mtime_read; // last change time when reading
uint64_t b_orig_size; // size of original file in bytes
int b_orig_mode; // mode of original file
+ time_t b_last_used; // time when the buffer was last used; used
+ // for viminfo
fmark_T b_namedm[NMARKS]; // current named marks (mark.c)