[PR #431] [MERGED] Allow changing current node and changing focus in treeview handlers #947

Closed
opened 2026-03-04 01:08:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/431
Author: @millerlogic
Created: 4/17/2020
Status: Merged
Merged: 5/7/2020
Merged by: @rivo

Base: masterHead: treeview-handlers


📝 Commits (4)

  • 77ccc1f Allow changing current node during handler
  • 7b79cb6 Allow changing current node during handler
  • 089ac46 Allow changing focus in handler
  • 591e235 Also call node.selected on node click

📊 Changes

1 file changed (+12 additions, -7 deletions)

View changed files

📝 treeview.go (+12 -7)

📄 Description

Without this, SetCurrentNode(nil) in a handler is either ignored or panics on nil.
Also I'd like to change focus on selected.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/431 **Author:** [@millerlogic](https://github.com/millerlogic) **Created:** 4/17/2020 **Status:** ✅ Merged **Merged:** 5/7/2020 **Merged by:** [@rivo](https://github.com/rivo) **Base:** `master` ← **Head:** `treeview-handlers` --- ### 📝 Commits (4) - [`77ccc1f`](https://github.com/rivo/tview/commit/77ccc1ff41099c94ee1fbf6615bb1bf7e1524750) Allow changing current node during handler - [`7b79cb6`](https://github.com/rivo/tview/commit/7b79cb6347c8fdecad2d233f29eca9476614f773) Allow changing current node during handler - [`089ac46`](https://github.com/rivo/tview/commit/089ac467f881a0f21b0161b5aba54f5d1ee148a0) Allow changing focus in handler - [`591e235`](https://github.com/rivo/tview/commit/591e235272defa4e79ca28c54e07b94b48c39041) Also call node.selected on node click ### 📊 Changes **1 file changed** (+12 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `treeview.go` (+12 -7) </details> ### 📄 Description Without this, SetCurrentNode(nil) in a handler is either ignored or panics on nil. Also I'd like to change focus on selected. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#947
No description provided.