summaryrefslogtreecommitdiff
path: root/src/ui/linkinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/linkinfo.c')
-rw-r--r--src/ui/linkinfo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/linkinfo.c b/src/ui/linkinfo.c
index e800d6a3..36ab00c8 100644
--- a/src/ui/linkinfo.c
+++ b/src/ui/linkinfo.c
@@ -92,8 +92,12 @@ void infoText_LinkInfo(const iGmDocument *doc, iGmLinkId linkId, iString *text_o
92 appendRange_String(text_out, (iRangecc){ parts.path.start, constEnd_String(url) }); 92 appendRange_String(text_out, (iRangecc){ parts.path.start, constEnd_String(url) });
93 } 93 }
94 else if (scheme != gemini_GmLinkScheme) { 94 else if (scheme != gemini_GmLinkScheme) {
95 const size_t maxDispLen = 300;
95 appendCStr_String(text_out, scheme == file_GmLinkScheme ? "" : globe_Icon " "); 96 appendCStr_String(text_out, scheme == file_GmLinkScheme ? "" : globe_Icon " ");
96 appendCStrN_String(text_out, cstr_String(url), iMin(500, size_String(url))); 97 appendCStrN_String(text_out, cstr_String(url), iMin(maxDispLen, size_String(url)));
98 if (size_String(url) > maxDispLen) {
99 appendCStr_String(text_out, "...");
100 }
97 } 101 }
98 else { 102 else {
99 appendCStr_String(text_out, "\x1b[1m"); 103 appendCStr_String(text_out, "\x1b[1m");