about summary refs log tree commit diff
path: root/predictor.sh
diff options
context:
space:
mode:
Diffstat (limited to 'predictor.sh')
-rwxr-xr-xpredictor.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/predictor.sh b/predictor.sh
index 0ce7b44..ccbb21f 100755
--- a/predictor.sh
+++ b/predictor.sh
@@ -42,7 +42,8 @@ while read -r swipe; do
 				rm -f "$lw"
 			fi
 		elif test "$swipe" = "$(echo -e "\x08")"; then
-			rm -f "$lw"
+			lastword="$(cat "$lw")"
+			printf %s "$lastword" | sed 's/.$//g' > "$lw"
 		elif test "$swipe" = "$(echo -e "\n")"; then
 			rm -f "$lw"
 		else