Skip to content

πŸ” Implement text search/find functionality (Ctrl+F)Β #2

@kshivang

Description

@kshivang

Feature Description

Add text search/find functionality to compose-ui terminal, matching the capabilities of the legacy Swing UI.

Current Status

❌ NOT IMPLEMENTED - No search functionality exists in ProperTerminal.kt

Legacy UI Capabilities

The legacy ui/ module has:

  • JediTermSearchComponent - Full search UI component
  • SubstringFinder - Text search logic with highlighting
  • TerminalSearchUtil - Search utilities
  • Find next/previous navigation
  • Regex search support
  • Result highlighting with custom colors

Proposed Implementation

1. Search UI Component

  • Floating search bar overlay (similar to browser Ctrl+F)
  • Text input field for search query
  • "Find Next" / "Find Previous" buttons
  • "Match Case" toggle
  • "Regex" toggle (optional)
  • Close button (X)
  • Result counter (e.g., "3 of 12")

2. Core Search Logic

Port from legacy code:

  • SubstringFinder.kt logic from jediterm-core-mpp
  • Search through terminal text buffer
  • Handle wrapping (search from top when reaching bottom)
  • Support both history buffer and screen buffer

3. Visual Highlighting

  • Highlight all matches in yellow background
  • Current match in orange/different color
  • Scroll to current match automatically
  • Clear highlights when search closed

4. Keyboard Shortcuts

  • Ctrl+F / Cmd+F - Open search
  • Enter / F3 - Find next
  • Shift+Enter / Shift+F3 - Find previous
  • Escape - Close search

Priority

πŸ”΄ HIGH - This is the #1 most-used terminal feature after copy/paste

Files to Modify

  • compose-ui/src/desktopMain/kotlin/org/jetbrains/jediterm/compose/demo/ProperTerminal.kt
  • Create new: compose-ui/src/desktopMain/kotlin/org/jetbrains/jediterm/compose/SearchBar.kt
  • Create new: compose-ui/src/desktopMain/kotlin/org/jetbrains/jediterm/compose/SearchManager.kt

References

  • Legacy implementation: ui/src/com/jediterm/terminal/ui/JediTermSearchComponent.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions