Skip to content

Commit

Permalink
Do not deselect line when user clicked [-] button
Browse files Browse the repository at this point in the history
Clicking [-] (collapsed) and [+] (expand) buttons should always select
line
  • Loading branch information
elgopher committed Nov 30, 2024
1 parent d2ff34d commit 43e3124
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gui/tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 43e3124

Please sign in to comment.