diff options
Diffstat (limited to 'plugin/fileregister.lua')
| -rw-r--r-- | plugin/fileregister.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/fileregister.lua b/plugin/fileregister.lua index a2b5621..856149a 100644 --- a/plugin/fileregister.lua +++ b/plugin/fileregister.lua @@ -9,7 +9,6 @@ -- requires 'json-lua' local userreg = require("vim.userreg") -local json = require('JSON') local api = vim.api local handler = {} @@ -23,6 +22,7 @@ end -- Stores the yanked text into the fileregister as JSON. function handler.do_yank(self, content) + local json = require('JSON') local file = self.get_file_name(); string = json:encode(content) @@ -34,6 +34,7 @@ end -- Reads the text from the file register and returns it. function handler.do_put(self) local file = self.get_file_name(); + local json = require('JSON') file = io.open(file, "r") |