mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 15:53:07 +02:00
CallbackSplitMixin: Clear LineStore before pickling, as SREMatch objects cannot be pickled
This commit is contained in:
parent
9d4df3bba2
commit
5552623d2e
2 changed files with 6 additions and 0 deletions
|
@ -81,6 +81,9 @@ class NoNoneStore(object):
|
||||||
def iteritems(self):
|
def iteritems(self):
|
||||||
return self.store.iteritems()
|
return self.store.iteritems()
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
return self.store.clear()
|
||||||
|
|
||||||
|
|
||||||
class TaskStore(NoNoneStore):
|
class TaskStore(NoNoneStore):
|
||||||
|
|
||||||
|
|
|
@ -370,6 +370,9 @@ class CallbackSplitMixin(object):
|
||||||
# Close the split if the user leaves it
|
# Close the split if the user leaves it
|
||||||
vim.command('au BufLeave <buffer> :bwipe')
|
vim.command('au BufLeave <buffer> :bwipe')
|
||||||
|
|
||||||
|
# SREMatch objecets cannot be pickled
|
||||||
|
cache.line.clear()
|
||||||
|
|
||||||
# We can't save the current instance in vim variable
|
# We can't save the current instance in vim variable
|
||||||
# so save the pickled version
|
# so save the pickled version
|
||||||
vim.current.buffer.vars['taskwiki_callback'] = pickle.dumps(self)
|
vim.current.buffer.vars['taskwiki_callback'] = pickle.dumps(self)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue