micro-editor / micro-editor/micro
new splits don't invoke `onSetActive`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description of the problem or steps to reproduce
The callback function onSetActive is not called when creating a split, for example via hsplit or vsplit. In contrast, it is called when creating a new tab. I think it should also be called for new splits because the bufpane changes. When navigating between bufpanes with NextSplit, onSetActive is called.
For completeness, here is the function I used to check this:
function onSetActive(bp)
micro.TermMessage("onSetActive <", bp.Buf.Path, "> <", bp.Buf.AbsPath, "> <", bp:Name(), ">")
return true
end
ADDED: Also, when closing a tab (i.e., closing a bufpane in a tab without split), onSetActive is not called for the bufpane that is activated in the next tab.
Specifications
Commit hash: fb208180
OS: Ubuntu
Terminal: urxvt
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the code paths for creating splits via hsplit and vsplit, then compare them with new-tab creation and NextSplit, where onSetActive is already called. Also trace closing a tab and activating the next tab's bufpane. Done means onSetActive is invoked for newly active bufpanes in both split creation and tab closing cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100