vim-pad

minimal etherpad alternative - vim plugin
git clone https://git.ce9e.org/vim-pad.git

commit
b46c7765a3521cfb523fcaabcb3909288c7ca5e7
parent
8818475958cc64d8a7df17d9929ea3fe78c4917f
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-06-06 12:34
rename optimize() to consolidate()

Diffstat

M python/pad/__init__.py 4 ++--

1 files changed, 2 insertions, 2 deletions


diff --git a/python/pad/__init__.py b/python/pad/__init__.py

@@ -108,7 +108,7 @@ class Pad:
  108   108         mod = bool(self.local_changes or self.staged_changes)
  109   109         self.buffer.options['modified'] = mod
  110   110 
  111    -1     def optimize(self):
   -1   111     def consolidate(self):
  112   112         text = self.get_text()
  113   113         my_changes = [*self.staged_changes, *self.local_changes]
  114   114 
@@ -162,6 +162,6 @@ def on_channel(i, msg):
  162   162             pad.reset_modified()
  163   163 
  164   164             if (random.random() < 0.05):
  165    -1                 pad.optimize()
   -1   165                 pad.consolidate()
  166   166     elif msg.startswith('id: '):
  167   167         pad.last_event_id = msg.split(': ', 1)[1]