MCPcopy
hub / github.com/jisaacks/GitGutter / _plain_replace

Function _plain_replace

modules/popup/differ.py:37–49  ·  view source on GitHub ↗
(a, alo, ahi, b, blo, bhi)

Source from the content-addressed store, hash-verified

35
36
37def _plain_replace(a, alo, ahi, b, blo, bhi):
38 assert alo < ahi and blo < bhi
39 # dump the shorter block first -- reduces the burden on short-term
40 # memory if the blocks are of very different sizes
41 if bhi - blo < ahi - alo:
42 first = _dump_lines('chg-ins', b, blo, bhi)
43 second = _dump_lines('chg-del', a, alo, ahi)
44 else:
45 first = _dump_lines('chg-del', a, alo, ahi)
46 second = _dump_lines('chg-ins', b, blo, bhi)
47
48 for g in first, second:
49 yield from g
50
51
52def _fancy_replace(a, alo, ahi, b, blo, bhi):

Callers 1

_fancy_replaceFunction · 0.85

Calls 1

_dump_linesFunction · 0.85

Tested by

no test coverage detected