daeyun / vim-matlab

Neovim plugin for MATLAB
Mozilla Public License 2.0
104 stars 19 forks source link

Fix 'last_written' KeyError #10

Closed tdy closed 8 years ago

tdy commented 8 years ago

Possible fix for #9.

It sets buffer_state[path]['last_written'] on BufEnter. Not sure if it's the ideal fix (mainly because I don't fully understand refresh_buffer).

daeyun commented 8 years ago

Thanks, looks like this would work. 👍 refresh_buffer was a hack to auto-load when a file was modified simultaneously in a different editor. It checks if the file modification time is newer than when it was last known to have fresh content, e.g. when the file was last written; or read. So perhaps last_written can now be renamed to something like last_seen. Thanks for the PR, very helpful ⭐