vim-pad

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

commit
94fc8efaacaf8af0e34c5d36889dfa4bf06c7958
parent
4ec02cfdbcb5fe4389b0bf18af0c9140838be91f
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-05-29 14:31
fix job collisions

Diffstat

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

1 files changed, 2 insertions, 3 deletions


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

@@ -28,11 +28,10 @@ class Pad:
   28    28 		return '\n'.join(self.buffer[:])
   29    29 
   30    30 	def start_listen(self):
   31    -1 		# FIXME jobs for different pads collide
   32    -1 		vim.command(f'let g:pad_curl = job_start(["curl", "-N", "{self.url}"], {{"out_cb": "pad#on_channel"}})')
   -1    31 		vim.command(f'let g:pad_curl_{self.id} = job_start(["curl", "-N", "{self.url}"], {{"out_cb": "pad#on_channel"}})')
   33    32 
   34    33 	def stop_listen(self):
   35    -1 		vim.command('call job_stop(g:pad_curl)')
   -1    34 		vim.command(f'call job_stop(g:pad_curl_{self.id})')
   36    35 
   37    36 	def on_input(self):
   38    37 		text = self.get_text()