3 4ths instead of 2 3rds

This commit is contained in:
Felix Pankratz 2023-08-30 18:54:16 +02:00
parent 82c16051db
commit f6b7a4cd8c

2
hn.py
View File

@ -57,7 +57,7 @@ class Client:
# calculate length of line
text = f'{prefix} ()\n'
chars_available = self.cols - len(text)
max_title_len = min((chars_available//3)*2, len(story.title))
max_title_len = min((chars_available//4)*3, len(story.title))
max_url_len = chars_available - max_title_len
title = story.title[:max_title_len-1] + "" if len(story.title) > max_title_len else story.title