@@ -461,7 +461,7 @@ def draw_all_hints(panes, terminal_height, screen):
461461 char_width = get_char_width (char )
462462 if x + char_width < pane .start_x + pane .width :
463463 screen .addstr (y , x + char_width , hint [1 ], screen .A_HINT2 )
464- sys . stdout . flush ()
464+ screen . refresh ()
465465
466466
467467@perf_timer ("Total execution" )
@@ -471,15 +471,13 @@ def main(screen: Screen):
471471 panes , max_x , padding_cache = init_panes ()
472472
473473 draw_all_panes (panes , max_x , padding_cache , terminal_height , screen )
474- screen .refresh ()
475474 sh (['tmux' , 'select-window' , '-t' , '{end}' ])
476475
477476 hints = generate_hints (KEYS )
478477 search_ch = getch ()
479478 hint_positions = find_matches (panes , search_ch , hints )
480479
481480 draw_all_hints (panes , terminal_height , screen )
482- screen .refresh ()
483481
484482 ch1 = getch ()
485483 if ch1 not in KEYS :
@@ -488,16 +486,14 @@ def main(screen: Screen):
488486 # Update hints consistently using screen.addstr
489487 for pane in panes :
490488 for line_num , col , char , hint in pane .positions :
491- if not hint .startswith (ch1 ):
492- continue
493489 y = pane .start_y + line_num
494490 x = pane .start_x + col
495491 char_width = get_char_width (char )
496492 if (y < min (pane .start_y + pane .height , terminal_height ) and
497493 x + char_width <= pane .start_x + pane .width ):
498494 screen .addstr (y , x , hint [1 ], screen .A_HINT2 )
499495 if x + char_width + 1 < pane .start_x + pane .width :
500- screen .addstr (y , x , char )
496+ screen .addstr (y , x + char_width , char )
501497
502498 screen .refresh ()
503499
0 commit comments