Delete characters with backspace
This commit is contained in:
parent
38ab48d6f8
commit
704ff9b3d1
3 changed files with 20 additions and 14 deletions
|
|
@ -43,7 +43,9 @@ class ChunkDiff():
|
|||
self._chars[x+y*CHUNK_WIDTH] = character
|
||||
|
||||
def delete(self, x, y):
|
||||
del self._chars[x+y*CHUNK_WIDTH]
|
||||
pos = x + y*CHUNK_WIDTH
|
||||
if pos in self._chars:
|
||||
del self._chars[x+y*CHUNK_WIDTH]
|
||||
|
||||
def apply(self, diff):
|
||||
for i, c in diff._chars.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue