From 43e31248c73549a7d8ac751ef57b4a8804e66389 Mon Sep 17 00:00:00 2001 From: Jacek Olszak Date: Sat, 30 Nov 2024 14:48:40 +0100 Subject: [PATCH] Do not deselect line when user clicked [-] button Clicking [-] (collapsed) and [+] (expand) buttons should always select line --- gui/tree.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/tree.lua b/gui/tree.lua index 856e6da..85879aa 100644 --- a/gui/tree.lua +++ b/gui/tree.lua @@ -60,7 +60,12 @@ function attach_tree(parent_el, el) msg.mx >= indent(node) * char_width and msg.mx <= (indent(node) + 3) * char_width then provider:toggle_line(line_no) + + selected_line = line_no + el.select(node.id) + return end + if selected_line != line_no then selected_line = line_no el.select(node.id)