Skip to content

Commit bc4e472

Browse files
unhappychoiceclaude
andcommitted
fix(sharing): prevent URL truncation in fallback display
- Display full URL on single line starting from left margin - Increase spacing between URL and tip message to prevent overlap - Ensure complete URL is copyable when browser fails to open 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 22b869e commit bc4e472

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/sharing.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ impl SharingService {
135135
execute!(stdout, Print(instruction))?;
136136
execute!(stdout, ResetColor)?;
137137

138-
// URL display box
138+
// URL display - show full URL on single line, let it overflow if needed
139139
let url_display = format!("📋 {}", url);
140-
let url_col = center_col.saturating_sub(url_display.len() as u16 / 2);
141-
execute!(stdout, MoveTo(url_col, center_row.saturating_sub(1)))?;
140+
execute!(stdout, MoveTo(2, center_row.saturating_sub(1)))?;
142141
execute!(
143142
stdout,
144143
SetAttribute(Attribute::Bold),
@@ -150,15 +149,15 @@ impl SharingService {
150149
// Additional info
151150
let info = "💡 Tip: Select and copy the URL with your mouse or keyboard";
152151
let info_col = center_col.saturating_sub(info.len() as u16 / 2);
153-
execute!(stdout, MoveTo(info_col, center_row + 2))?;
152+
execute!(stdout, MoveTo(info_col, center_row + 4))?;
154153
execute!(stdout, SetForegroundColor(Color::Grey))?;
155154
execute!(stdout, Print(info))?;
156155
execute!(stdout, ResetColor)?;
157156

158157
// Continue prompt
159158
let continue_text = "[ESC] Back";
160159
let continue_col = center_col.saturating_sub(continue_text.len() as u16 / 2);
161-
execute!(stdout, MoveTo(continue_col, center_row + 4))?;
160+
execute!(stdout, MoveTo(continue_col, center_row + 6))?;
162161
execute!(stdout, SetForegroundColor(Color::Green))?;
163162
execute!(stdout, Print(continue_text))?;
164163
execute!(stdout, ResetColor)?;

0 commit comments

Comments
 (0)