summaryrefslogtreecommitdiff
path: root/typr.sh
diff options
context:
space:
mode:
Diffstat (limited to 'typr.sh')
-rwxr-xr-xtypr.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/typr.sh b/typr.sh
index f54464e..61f29c3 100755
--- a/typr.sh
+++ b/typr.sh
@@ -57,10 +57,13 @@ typr_draw_text () {
[ ! "$ce" ] && newcolor="" \
- [ "$i" -gt "$startcol" ] && [ "$lt" = " " ] && {
- line=$((line+1))
- draw="${draw}[${line};${startcol}H"
- i=0
+ [ "$lt" = " " ] && {
+ next_word=${t%% *}
+ [ "$i" -gt "$((startcol - ${#next_word}))" ] && {
+ line=$((line+1))
+ draw="${draw}[${line};${startcol}H"
+ i=0
+ }
}
[ "$color" != "$newcolor" ] && {