You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: tap-to-open truncates URLs wrapped across lines #5368
With terminal-onclick-url-open = true, tapping a URL longer than the terminal width only opens the first visual line. The tap detector matches per visual line and doesn't join wrapped lines, so the browser opens a truncated link.
Steps to reproduce the behavior.
Set terminal-onclick-url-open = true, run termux-reload-settings.
On a narrow terminal (~80 cols), print this URL on its own line:
I reproduced the tap path on JVM (TerminalEmulator → getWordAtLocation → TermuxUrlUtils.extractUrls) with your exact URL on an 80-column screen. Result on current master: tapping either visual line already returns and extracts the full 107-char URL — the fresh-print case works, so I could not reproduce the truncation as stated.
What I did find and reproduce: a wrapped word across the transcript boundary still truncates. If the head of the URL has scrolled into the transcript, tapping its visible tail returns only the on-screen part (27 chars in my repro — no URL detected at all). Root cause: the upward row expansion in TerminalBuffer.getWordAtLocation stops at screen row 0 (while (y1 > 0 ...)) and never looks into transcript rows, while the downward expansion has no such floor.
PR #5378 fixes that (1 line + regression test), which covers the scrolled case of this issue.
If you still see truncation with freshly printed output and no scrollback above, please share the exact bytes (e.g. does the line contain a real newline, wide chars, or trailing spaces?) and your columns/font size — there may be a second trigger I haven't found.
changed the title [-][Bug]: tap-to-open truncates URLs wrapped across lines[/-][+][Bug]: tap-to-open truncates URLs wrapped across lines [/+]on Oct 15, 2026
Activity
Soupboy006 commentedon Oct 13, 2026
I reproduced the tap path on JVM (
TerminalEmulator→getWordAtLocation→TermuxUrlUtils.extractUrls) with your exact URL on an 80-column screen. Result on current master: tapping either visual line already returns and extracts the full 107-char URL — the fresh-print case works, so I could not reproduce the truncation as stated.What I did find and reproduce: a wrapped word across the transcript boundary still truncates. If the head of the URL has scrolled into the transcript, tapping its visible tail returns only the on-screen part (27 chars in my repro — no URL detected at all). Root cause: the upward row expansion in
TerminalBuffer.getWordAtLocationstops at screen row 0 (while (y1 > 0 ...)) and never looks into transcript rows, while the downward expansion has no such floor.PR #5378 fixes that (1 line + regression test), which covers the scrolled case of this issue.
If you still see truncation with freshly printed output and no scrollback above, please share the exact bytes (e.g. does the line contain a real newline, wide chars, or trailing spaces?) and your columns/font size — there may be a second trigger I haven't found.
[-][Bug]: tap-to-open truncates URLs wrapped across lines[/-][+][Bug]: tap-to-open truncates URLs wrapped across lines [/+]DEAD1nsane commentedon Oct 15, 2026
it works now
Fix URL schemes, Print Screen key, wrapped-word taps and DEL handling
Fix URL schemes, Print Screen key, wrapped-word taps and DEL handling