Skip to content

fix: hide grid cursor highlight when unfocused#40

Merged
fissible merged 2 commits intomainfrom
fix/grid-unfocused-cursor-ghost
Apr 4, 2026
Merged

fix: hide grid cursor highlight when unfocused#40
fissible merged 2 commits intomainfrom
fix/grid-unfocused-cursor-ghost

Conversation

@fissible
Copy link
Copy Markdown
Owner

@fissible fissible commented Apr 3, 2026

Summary

  • When the grid lost focus, the last-selected row kept a hardcoded dark-gray background (\033[48;5;236m), creating a visible ghost highlight that disrupted stripe row coloring.
  • Drop the elif (( _is_cursor )) branch in shellframe_grid_render so unfocused cursor rows fall through to normal stripe/grid-bg logic — identical to any non-cursor row.

Test plan

  • Open a data table, navigate to a row, then Tab to sidebar — cursor row should have no special highlight in the grid
  • Stripe coloring should appear consistent (no "wrong-color" starting row)
  • Re-focus the grid — cursor highlight should reappear on the correct row
  • Multi-select and inspector flows unaffected

🤖 Generated with Claude Code

fissible and others added 2 commits April 3, 2026 14:07
The unfocused-cursor branch applied a hardcoded dark-gray background
(color 236) to the last-selected row even when the grid had no focus.
This created a visible ghost highlight that disrupted stripe coloring
and confused users about which row was selected.

Drop the elif branch so unfocused cursor rows render with normal
stripe or grid-bg styling, identical to any other non-cursor row.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When _PREFIX_SCREEN_quit() activates a confirm overlay (marking dirty +
setting a focus request) without navigating screens, the global handler
fell through with no draw call. The overlay was dirty but invisible until
the *next* keypress, which was consumed by the stale focus owner before
the focus ring was rebuilt.

Add _shellframe_shell_draw_if_dirty in the else branch (quit fn ran but
no screen transition occurred) so overlays appear before the next read.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fissible fissible merged commit e764f61 into main Apr 4, 2026
1 of 2 checks passed
@fissible fissible deleted the fix/grid-unfocused-cursor-ghost branch April 4, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant