release 2.0.1 - fix ctrl backspace

This commit is contained in:
Doman 2022-03-07 11:54:54 +01:00
parent 3e16303009
commit 43a2b86fd3
5 changed files with 21 additions and 2 deletions

View file

@ -3,3 +3,6 @@ build: fasttyper
push:
twine upload dist/*
clean:
rm dist/*

View file

@ -75,10 +75,18 @@ class Buffer:
def _del_word(self):
try:
if self.user_words[self.current_word] == "":
self.current_word = max(0, self.current_word - 1)
self.user_words[self.current_word] = ""
self.current_char = 0
except IndexError:
self.current_word = max(0, self.current_word - 1)
try:
self.user_words[self.current_word] = ""
except IndexError:
pass
self.current_char = 0
def handle_action(self, action, char):
if action == Action.add_char:

View file

@ -247,6 +247,10 @@ class BufferDependentComponent(BorderedBox):
self.current_word_idx += 1
self.lines[self.current_line][self.word_index] = self.buffer.get_word(
self.current_word_idx
)
while word_index < self.current_word_idx:
self.word_index -= 1
@ -256,6 +260,10 @@ class BufferDependentComponent(BorderedBox):
self.current_word_idx -= 1
self.lines[self.current_line][self.word_index] = self.buffer.get_word(
self.current_word_idx
)
while (
self.current_line > self.prefered_line or self.current_line == self.height
):

View file

@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.0.0
current_version = 2.0.1
[wheel]
universal = 1

View file

@ -9,7 +9,7 @@ with open("requirements.txt", "r", encoding="utf-8") as fh:
setup(
name="fasttyper",
version="2.0.0",
version="2.0.1",
author="Piotr Domanski",
author_email="pi.domanski@gmail.com",
description="Minimalistic typing exercise",