vim-pad

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

commit
5b5f4ce01ee47211dc8f571ed747bbb6ffbd80b9
parent
0d7858148421c5e4cf4ef0b9dedd9d03a1fb73c1
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-05-29 15:08
use buffer.number for job uniqueness

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

@@ -29,14 +29,14 @@ class Pad:
   29    29 
   30    30 	def start_listen(self):
   31    31 		vim.command(
   32    -1 			f'let g:pad_curl_{self.id} = job_start('
   -1    32 			f'let g:pad_curl_{self.buffer.number} = job_start('
   33    33 				f'["curl", "-N", "{self.url}"], '
   34    34 				'{"out_cb": "pad#on_channel"}'
   35    35 			')'
   36    36 		)
   37    37 
   38    38 	def stop_listen(self):
   39    -1 		vim.command(f'call job_stop(g:pad_curl_{self.id})')
   -1    39 		vim.command(f'call job_stop(g:pad_curl_{self.buffer.number})')
   40    40 
   41    41 	def on_input(self):
   42    42 		text = self.get_text()