Skip to content

Commit

Permalink
improve divider
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Joynt committed Nov 8, 2023
1 parent 65dc026 commit 6d73ea4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ def reload(self):
if fnmatch.fnmatch(file, fileglob):
filelist.append(file)
# Add a visible divider to the style list
divider = f"{'-' * 20} {file.upper()} {'-' * 20}"
half_len = round(len(file) / 2)
divider = f"{'-' * (20 - half_len)} {file.upper()}"
divider = f"{divider} {'-' * (40 - len(divider))}"
self.styles[divider] = PromptStyle(
f"{divider}", None, None, "do_not_save"
)
Expand Down

0 comments on commit 6d73ea4

Please sign in to comment.