refactor: Simplify commit details drawing by removing unnecessary try-except block
This commit is contained in:
parent
ecb59fa6c4
commit
328f0de01d
5
gtm
5
gtm
|
|
@ -931,7 +931,6 @@ def draw_commit_details(stdscr, state: AppState, layout: StatusBarLayout):
|
|||
if not message_lines:
|
||||
message_lines = [""]
|
||||
|
||||
try:
|
||||
# Draw on the second line of the status bar (layout.commit_detail_start_y)
|
||||
second_line = layout.commit_detail_start_y
|
||||
|
||||
|
|
@ -964,8 +963,6 @@ def draw_commit_details(stdscr, state: AppState, layout: StatusBarLayout):
|
|||
line = line[:line_available_width-3] + "..."
|
||||
|
||||
stdscr.addstr(line_y, 4, line, curses.A_REVERSE)
|
||||
except curses.error:
|
||||
pass
|
||||
|
||||
def draw_search_mode(stdscr, state: AppState, layout: StatusBarLayout):
|
||||
"""Draw search input interface"""
|
||||
|
|
@ -1206,7 +1203,7 @@ def handle_mouse_input(stdscr, state: AppState) -> AppState:
|
|||
# or very close to the same position (within 1-2 pixels)
|
||||
if (state.click_position and
|
||||
abs(state.click_position[0] - mx) <= 2 and
|
||||
abs(state.click_position[1] - my) <= 2):
|
||||
abs(state.click_position[1] - my) <= 2): # TODO don't do this <= 2 thing
|
||||
# This was a click, so switch panes (only if sidebar is visible)
|
||||
focus = "right"
|
||||
if state.show_sidebar:
|
||||
|
|
|
|||
Loading…
Reference in New Issue