fix: Left-align commit message in status bar instead of centering
This commit is contained in:
parent
4053001591
commit
43fa1dc529
5
gtm2.py
5
gtm2.py
|
|
@ -405,15 +405,14 @@ def draw_status_bars(stdscr, state):
|
|||
except curses.error:
|
||||
pass
|
||||
|
||||
# Add commit message centered in the commit message bar
|
||||
# Add commit message in the commit message bar
|
||||
if commit_message:
|
||||
max_msg_width = state.width - 4 # Leave a small margin
|
||||
if len(commit_message) > max_msg_width:
|
||||
commit_message = commit_message[:max_msg_width-3] + "..."
|
||||
|
||||
msg_x = (state.width - len(commit_message)) // 2
|
||||
try:
|
||||
stdscr.addstr(state.height - 1, msg_x, commit_message, status_attr)
|
||||
stdscr.addstr(state.height - 1, 0, commit_message, status_attr)
|
||||
except curses.error:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue