diff options
-rw-r--r-- | frontends/riscos/gui/url_bar.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c index 6e76490a3..15aab3ea5 100644 --- a/frontends/riscos/gui/url_bar.c +++ b/frontends/riscos/gui/url_bar.c @@ -1190,28 +1190,24 @@ ro_gui_url_bar_set_url(struct url_bar *url_bar, local_url = url; } - /* Copy the text into the icon buffer. If the text is too long, blank - * the buffer and warn the user. + /* Copy the text into the icon buffer. If the text is too long, truncate + * for URL bar and log the full URL. */ if (strlen(local_url) >= url_bar->text.size) { - url_bar->text.buffer[0] = '\0'; - ro_warn_user("LongURL", NULL); - NSLOG(netsurf, INFO, - "Long URL (%zu chars): %s", + NSLOG(netsurf, WARNING, + "URL too long to show in URL bar (%zu chars): %s", strlen(url), url); - } else { - strncpy(url_bar->text.buffer, - local_url, - url_bar->text.size - 1); - url_bar->text.buffer[url_bar->text.size - 1] = '\0'; } + strncpy(url_bar->text.buffer, local_url, url_bar->text.size - 1); + url_bar->text.buffer[url_bar->text.size - 1] = '\0'; + if (local_text != NULL) { free(local_text); } /* Set the hotlist flag. */ - if (nsurl_create(url_bar->text.buffer, &n) == NSERROR_OK) { + if (nsurl_create(url, &n) == NSERROR_OK) { ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n)); nsurl_unref(n); } |