summaryrefslogtreecommitdiff
path: root/src/ui/sidebarwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-10 08:56:14 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-10 08:56:14 +0200
commit1baf5cc13f08cffc3cfafa73369fd2b77ae31205 (patch)
tree603efa3dd87f8d6e4f09d5c13f0bf6cdd2140363 /src/ui/sidebarwidget.c
parentcb26d891e372cfc02e5da68af50543ed2e04e1fc (diff)
Feeds: Show entries in lookup results
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r--src/ui/sidebarwidget.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index a140718b..78b51a54 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28#include "documentwidget.h" 28#include "documentwidget.h"
29#include "feeds.h" 29#include "feeds.h"
30#include "gmcerts.h" 30#include "gmcerts.h"
31#include "gmutil.h"
31#include "gmdocument.h" 32#include "gmdocument.h"
32#include "inputwidget.h" 33#include "inputwidget.h"
33#include "labelwidget.h" 34#include "labelwidget.h"
@@ -503,24 +504,10 @@ static void itemClicked_SidebarWidget_(iSidebarWidget *d, const iSidebarItem *it
503 postCommandf_App("document.goto loc:%p", head->text.start); 504 postCommandf_App("document.goto loc:%p", head->text.start);
504 break; 505 break;
505 } 506 }
506 case feeds_SidebarMode: 507 case feeds_SidebarMode: {
507 if (!isEmpty_String(&item->url)) { 508 postCommandString_App(feedEntryOpenCommand_String(&item->url));
508 const size_t fragPos = indexOf_String(&item->url, '#');
509 if (fragPos != iInvalidPos) {
510 iString *head = collect_String(
511 newRange_String((iRangecc){ constBegin_String(&item->url) + fragPos + 1,
512 constEnd_String(&item->url) }));
513 postCommandf_App(
514 "open gotourlheading:%s url:%s",
515 cstr_String(head),
516 cstr_Rangecc((iRangecc){ constBegin_String(&item->url),
517 constBegin_String(&item->url) + fragPos }));
518 }
519 else {
520 postCommandf_App("open url:%s", cstr_String(&item->url));
521 }
522 }
523 break; 509 break;
510 }
524 case bookmarks_SidebarMode: 511 case bookmarks_SidebarMode:
525 case history_SidebarMode: { 512 case history_SidebarMode: {
526 if (!isEmpty_String(&item->url)) { 513 if (!isEmpty_String(&item->url)) {