MCPcopy Index your code
hub / github.com/RustPython/RustPython / kill_range

Method kill_range

Lib/_pyrepl/commands.py:60–75  ·  view source on GitHub ↗
(self, start: int, end: int)

Source from the content-addressed store, hash-verified

58
59class KillCommand(Command):
60 def kill_range(self, start: int, end: int) -> None:
61 if start == end:
62 return
63 r = self.reader
64 b = r.buffer
65 text = b[start:end]
66 del b[start:end]
67 if is_kill(r.last_command):
68 if start < r.pos:
69 r.kill_ring[-1] = text + r.kill_ring[-1]
70 else:
71 r.kill_ring[-1] = r.kill_ring[-1] + text
72 else:
73 r.kill_ring.append(text)
74 r.pos = start
75 r.dirty = True
76
77
78class YankCommand(Command):

Callers 5

doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80
doMethod · 0.80

Calls 2

is_killFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected