Conversation
| // TODO: Move this into `block_end()` and run it whenever the block is a `focus_well`. | ||
| // It makes no sense otherwise that all input handling occurs in the controls, except for this. |
There was a problem hiding this comment.
Essentially, this PR implements this TODO.
| // End the root node. | ||
| ctx.block_end(); |
There was a problem hiding this comment.
Ensures that tab handling works inside the root node (the main window, so to speak). I modified the tree handling code to accommodate for that.
src/tui.rs
Outdated
| let Some(input) = self.input_keyboard else { | ||
| return; | ||
| }; | ||
| if !matches!(input, vk::LEFT | vk::RIGHT) { |
There was a problem hiding this comment.
Does this mean that tables cannot be navigated through with Tab?
This seems correct, but: are we using tables anywhere we shouldn't? Where we do want Tab navigation?
There was a problem hiding this comment.
Everything's built on top of block_begin and block_end, the latter of which implements tabbing, so it'll still work in tables.
src/tui.rs
Outdated
| self.needs_rerender(); | ||
| } | ||
|
|
||
| fn table_end_move_focus(&mut self) { |
There was a problem hiding this comment.
These two functions seem so similar that I can't immediately tell the difference except Left/Right vs Up/Down
There was a problem hiding this comment.
I did consider abstracting it away... Let me see if I can.
There was a problem hiding this comment.
Done. It feels quite nice now IMO.
Closes #36