vim-pad

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

commit
f62572845d68e85faafcae2c68406389b41fcdc0
parent
c05222381665688cb33511e13774642cb51cf8b9
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-11-17 13:54
lint

Diffstat

M python/pad/diff.py 6 +++---

1 files changed, 3 insertions, 3 deletions


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

@@ -27,14 +27,14 @@ def apply(text, change, selection=None):
   27    27 
   28    28 	# try exact match in similar position
   29    29 	best = -1
   30    -1 	bestDist = len(text)
   -1    30 	best_dist = len(text)
   31    31 	for i in range(len(text)):
   32    32 		if not text[i:].startswith(before):
   33    33 			continue
   34    34 		dist = abs(i - start)
   35    -1 		if dist < bestDist:
   -1    35 		if dist < best_dist:
   36    36 			best = i
   37    -1 			bestDist = dist
   -1    37 			best_dist = dist
   38    38 		else:
   39    39 			break
   40    40