summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-14 14:20:13 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-14 14:24:00 +0200
commitf81dcd10b9c09524a00b3b819679eca1d7ad6bf5 (patch)
treec315f7dd51908a9564e0081528d67cf11cb8a799 /src/ui/window.c
parentb18205c60ee2c4549cf521e02f0223aec46e90b5 (diff)
SidebarWidget: Handling feed entry URLs with spaces
The sidebar failed to realize that an entry was the current one and/or already read, because URL encoding is not consistently applied. This needs addressing soon — internally, all URLs should have a consistent format (fully encoded or decoded, NFC normalized).
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 39e43340..998f5681 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -432,7 +432,7 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {
432 iInputWidget *url = findWidget_App("url"); 432 iInputWidget *url = findWidget_App("url");
433 const iString *urlStr = collect_String(suffix_Command(cmd, "url")); 433 const iString *urlStr = collect_String(suffix_Command(cmd, "url"));
434 trimCache_App(); 434 trimCache_App();
435 visitUrl_Visited(visited_App(), urlStr, 0); 435 visitUrl_Visited(visited_App(), withSpacesEncoded_String(urlStr), 0); /* TODO: internal URI normalization */
436 postCommand_App("visited.changed"); /* sidebar will update */ 436 postCommand_App("visited.changed"); /* sidebar will update */
437 setText_InputWidget(url, urlStr); 437 setText_InputWidget(url, urlStr);
438 checkLoadAnimation_Window_(get_Window()); 438 checkLoadAnimation_Window_(get_Window());
@@ -902,6 +902,7 @@ static SDL_Surface *loadAppIconSurface_(int resized) {
902 902
903void init_Window(iWindow *d, iRect rect) { 903void init_Window(iWindow *d, iRect rect) {
904 theWindow_ = d; 904 theWindow_ = d;
905 d->win = NULL;
905 iZap(d->cursors); 906 iZap(d->cursors);
906 d->place.initialPos = rect.pos; 907 d->place.initialPos = rect.pos;
907 d->place.normalRect = rect; 908 d->place.normalRect = rect;