@@ -363,10 +363,11 @@ def render(tries)
363363
364364 def render_entry_line ( screen , entry , is_selected , width )
365365 is_marked = @marked_for_deletion . include? ( entry [ :path ] )
366- background = if is_selected
367- Tui ::Palette ::SELECTED_BG
368- elsif is_marked
366+ # Marked items always show red; selection shows via arrow only
367+ background = if is_marked
369368 Tui ::Palette ::DANGER_BG
369+ elsif is_selected
370+ Tui ::Palette ::SELECTED_BG
370371 end
371372
372373 line = screen . body . add_line ( background : background )
@@ -559,7 +560,13 @@ def render_rename_dialog(current_name, rename_buffer, rename_cursor, rename_erro
559560 prefix = "New name: "
560561 line . center . write_dim ( prefix )
561562 line . center << screen . input ( "" , value : rename_buffer , cursor : rename_cursor ) . to_s
562- line . mark_has_input ( ( screen . width - Tui ::Metrics . visible_width ( prefix ) - rename_buffer . length ) / 2 + Tui ::Metrics . visible_width ( prefix ) )
563+ # Input displays buffer + trailing space when cursor at end
564+ # Use (width - 1) to match Line.render's max_content calculation
565+ input_width = [ rename_buffer . length , rename_cursor + 1 ] . max
566+ prefix_width = Tui ::Metrics . visible_width ( prefix )
567+ max_content = screen . width - 1
568+ center_start = ( max_content - prefix_width - input_width ) / 2
569+ line . mark_has_input ( center_start + prefix_width )
563570 end
564571
565572 if rename_error
@@ -710,7 +717,13 @@ def render_delete_dialog(marked_items, confirmation_buffer, confirmation_cursor)
710717 prefix = "Type YES to confirm: "
711718 line . center . write_dim ( prefix )
712719 line . center << screen . input ( "" , value : confirmation_buffer , cursor : confirmation_cursor ) . to_s
713- line . mark_has_input ( ( screen . width - Tui ::Metrics . visible_width ( prefix ) - confirmation_buffer . length ) / 2 + Tui ::Metrics . visible_width ( prefix ) )
720+ # Input displays buffer + trailing space when cursor at end
721+ # Use (width - 1) to match Line.render's max_content calculation
722+ input_width = [ confirmation_buffer . length , confirmation_cursor + 1 ] . max
723+ prefix_width = Tui ::Metrics . visible_width ( prefix )
724+ max_content = screen . width - 1
725+ center_start = ( max_content - prefix_width - input_width ) / 2
726+ line . mark_has_input ( center_start + prefix_width )
714727 end
715728
716729 screen . footer . add_line { |line | line . write . write_dim ( fill ( "─" ) ) }
@@ -756,7 +769,7 @@ def process_delete_confirmation(marked_items, confirmation)
756769# Main execution with OptionParser subcommands
757770if __FILE__ == $0
758771
759- VERSION = "1.7.0 "
772+ VERSION = "1.7.1 "
760773
761774 def print_global_help
762775 text = <<~HELP
@@ -1120,10 +1133,12 @@ def script_delete(paths, base_path)
11201133 end
11211134
11221135 def script_rename ( base_path , old_name , new_name )
1136+ new_path = File . join ( base_path , new_name )
11231137 [
11241138 "cd #{ q ( base_path ) } " ,
11251139 "mv #{ q ( old_name ) } #{ q ( new_name ) } " ,
1126- "cd #{ q ( File . join ( base_path , new_name ) ) } "
1140+ "echo #{ q ( new_path ) } " ,
1141+ "cd #{ q ( new_path ) } "
11271142 ]
11281143 end
11291144
0 commit comments