#21 render comments#34
Open
Bakhomious wants to merge 6 commits into
Open
Conversation
0782e3f to
fd4f987
Compare
0fdb500 to
9483654
Compare
9483654 to
a3ffaa4
Compare
Bakhomious
commented
May 18, 2026
Contributor
Author
There was a problem hiding this comment.
Perhaps it's time to refactor this
Bakhomious
commented
May 18, 2026
2f0db3f to
167f7bf
Compare
Bakhomious
commented
May 19, 2026
Comment on lines
+129
to
+150
| func (m *CommentInputModel) handleKey(msg tea.KeyPressMsg) (*CommentInputModel, tea.Cmd) { | ||
| // Handle suggestion navigation | ||
| if m.showSuggest && len(m.suggestions) > 0 { | ||
| switch { | ||
| case key.Matches(msg, keyDown): | ||
| m.selectedIdx = (m.selectedIdx + 1) % len(m.suggestions) | ||
| return m, nil | ||
| case key.Matches(msg, keyUp): | ||
| m.selectedIdx-- | ||
| if m.selectedIdx < 0 { | ||
| m.selectedIdx = len(m.suggestions) - 1 | ||
| } | ||
| return m, nil | ||
| case key.Matches(msg, keyTab): | ||
| m.acceptSuggestion() | ||
| return m, nil | ||
| case key.Matches(msg, keyEsc): | ||
| m.showSuggest = false | ||
| m.suggestions = nil | ||
| return m, nil | ||
| } | ||
| } |
167f7bf to
0a6c486
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.