From 10e91e096d8bb07ac12d960a5bc6b473e30bb812 Mon Sep 17 00:00:00 2001 From: Joshua Murphy Date: Sat, 16 May 2026 13:35:23 -0400 Subject: [PATCH] Get selected item in newsticker list view * lisp/net/newst-treeview.el (newsticker--treeview-get-selected-item): If an item is already selected, use it. (Bug#80972) Copyright-paperwork-exempt: yes --- lisp/net/newst-treeview.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 04d796b0b90..8b5f8a8528f 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -1387,8 +1387,10 @@ Will move to previous feed until an item is found." (defun newsticker--treeview-get-selected-item () "Return item that is currently selected in list buffer." (with-current-buffer (newsticker--treeview-list-buffer) - (beginning-of-line) - (get-text-property (point) :nt-item))) + (goto-char (point-min)) + (if-let* ((selected (text-property-search-forward :nt-selected t t))) + (get-text-property (prop-match-beginning selected) :nt-item) + (get-text-property (point-min) :nt-item)))) (defun newsticker-treeview-mark-item-old (&optional dont-proceed) "Mark current item as old unless it is obsolete.