vim-pad

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

commit
7b48a168713b6bae69545f3aaf828aa2c8431dbb
parent
47b60d28bbb90aebebe7f97bf6ced773b81fe090
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-05-29 14:21
fixup aiohttp -> requests

Diffstat

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

1 files changed, 4 insertions, 4 deletions


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

@@ -40,7 +40,7 @@ class Pad:
   40    40 		diff.push_change(self.local_changes, change)
   41    41 		self.old = text
   42    42 
   43    -1 	async def send_changes(self):
   -1    43 	def send_changes(self):
   44    44 		if False:  # self.staged_changes:
   45    45 			print('abort because of staged changes')
   46    46 			return  # TODO: retry later
@@ -49,8 +49,8 @@ class Pad:
   49    49 			self.local_changes = []
   50    50 			data = [CLIENT_ID, 'changes', self.staged_changes]
   51    51 			try:
   52    -1 				requests.post(self.url, json=data)
   53    -1 				requests.raise_for_status()
   -1    52 				r = requests.post(self.url, json=data)
   -1    53 				r.raise_for_status()
   54    54 				vim.command('setl nomodified')
   55    55 			except Exception as e:
   56    56 				print(e)
@@ -107,7 +107,7 @@ def on_input():
  107   107 
  108   108 def on_write():
  109   109 	pad = pads[vim.current.buffer]
  110    -1 	asyncio.run(pad.send_changes())
   -1   110 	pad.send_changes()
  111   111 
  112   112 
  113   113 def on_close():