Commit Graph
11032 Commits
Author SHA1 Message Date
Daniel Imms 1f3ebe1b91 Add element back to benchmark common case 2026-05-25 21:02:19 -07:00
Daniel Imms dc01e4e97b Add test around viewport scrolling behavior 2026-05-25 21:00:49 -07:00
Daniel ImmsandCursor 9bd72abc59 Optimize SearchAddon hot paths and skip headless decoration work.
Reduce repeated search overhead with faster cache/index paths and avoid creating decorations when no terminal DOM is attached, significantly cutting benchmark runtime in decoration-heavy scenarios.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 20:54:42 -07:00
Daniel ImmsandCursor d179d586e9 Optimize addon-search search hot paths with reusable match and logical-line caches.
Avoid recomputing full-buffer scans on repeated queries and defer expensive offset mapping work until matches are found, reducing navigation and refresh benchmark runtimes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 20:37:49 -07:00
Daniel Imms 3b56138d0a Re-implement addon-search 2026-05-25 20:18:14 -07:00
Daniel Imms 950f1be20d Stub SearchAddon.ts 2026-05-25 20:06:08 -07:00
Daniel Imms 41841d0aa8 Remove old search impl 2026-05-25 19:58:20 -07:00
Daniel ImmsandCursor 3bebe6c18e chore(addon-search): ignore generated benchmark output
Exclude out-benchmark from version control to avoid accidental commits
of compiled benchmark artifacts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:15:29 -07:00
Daniel ImmsandCursor a344c36940 docs(addon-search): align README and public typings
Clarify decorations usage, result event semantics, whole-word boundaries,
and export ISearchDecorationOptions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:15:29 -07:00
Daniel ImmsandCursor fedf29e870 test(addon-search): add wholeWord and reverse-regex benchmarks
Add benchmark coverage for whole-word navigation and reverse regex
whole-word searches to guard optimization regressions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:15:29 -07:00
Daniel ImmsandCursor 7fbe5a27fa fix(addon-search): harden search state and lifecycle
Normalize and snapshot search options, clear stale decorations when
decorations are disabled, use try/finally for search events, and refresh
highlights without re-entering public navigation APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:15:28 -07:00
Daniel ImmsandCursor d4a8e5f50e perf(addon-search): O(1) tracked result index lookup
Rebuild a result key map on updateResults and manage selected decoration
lifecycle with MutableDisposable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:15:28 -07:00
Daniel ImmsandCursor 8405d584d8 perf(addon-search): streamline decoration creation
Create highlight decorations in a single pass, dispose markers when
registration fails, and reduce per-decoration allocation overhead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:15:28 -07:00
Daniel ImmsandCursor 3ee7df2596 perf(addon-search): SearchEngine micro-optimizations
Hoist buffer bounds, reuse prepared plain terms, fast-path non-wholeWord
indexOf, and use match size for highlight collection wrap checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:15:28 -07:00
Daniel ImmsandCursor 0440861b84 perf(addon-search): memoize repeated no-match searches
Track buffer cache generation and skip full-buffer scans when the same
term, options, and start position previously produced no match until the
line cache is invalidated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:12:47 -07:00
Daniel ImmsandCursor 73c99a8412 perf(addon-search): collect highlight matches in one search session
Add SearchEngine.collectMatches to initialize cache and regex once while
gathering matches, and use it from _highlightAllMatches instead of
repeated find() calls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:06:23 -07:00
Daniel ImmsandCursor e5ffbe315a perf(addon-search): optimize regex search hot path
Unify regex and whole-word matching into a single scan pass and avoid
per-line substring allocations by searching the full logical line with
lastIndex. Forward non-whole-word regex keeps a single-exec fast path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 19:04:22 -07:00
Daniel ImmsandCursor 510a1b0d75 test(addon-search): remove debugger from integration tests
Drop accidental debugger statement and unnecessary delay in
onDidChangeResults coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 18:02:22 -07:00
Daniel ImmsandCursor 74bec251e6 docs(addon-search): align API docs with runtime behavior
Clarify incremental search, result event semantics, highlightLimit, and
optional decoration overview ruler fields.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 18:02:22 -07:00
Daniel ImmsandCursor 6d08f5938d test(addon-search): add regression tests for search state and edge cases
Add SearchState and SearchResultTracker unit tests plus whole-word,
reverse-regex, and lowercase cache coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 18:02:22 -07:00
Daniel ImmsandCursor ee322c811f fix(addon-search): skip overview ruler when colors are omitted
Support optional overview ruler colors from decoration options without
passing undefined into terminal decoration registration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 18:02:22 -07:00
Daniel ImmsandCursor 811be7b1ac fix(addon-search): prevent infinite loop on empty reverse regex matches
Advance regex lastIndex when skipping zero-length matches during reverse
search to avoid hanging on patterns like .*?

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 18:02:22 -07:00
Daniel ImmsandCursor 17dd1ede33 chore(addon-search): improve benchmark coverage and eval thresholds
Add no-match and case-insensitive benchmark cases, validate found counts,
tighten SearchAddon runtime tolerances, and use 10-run baseline/eval passes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:43:19 -07:00
Daniel ImmsandCursor 2146e4940d fix(addon-search): normalize invalid highlightLimit values
Clamp highlightLimit to a positive finite integer, falling back to the
default when the option is missing or invalid.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:42:22 -07:00
Daniel ImmsandCursor d99803293e fix(addon-search): cancel pending highlight refresh on clear
Clear the debounced highlight timeout when decorations are cleared to
avoid stale delayed searches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:42:22 -07:00
Daniel ImmsandCursor f28bfb7142 perf(addon-search): avoid redundant result array copy in tracker
Skip slicing when the caller already respects the highlight limit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:42:17 -07:00
Daniel ImmsandCursor e4ebd082ce perf(addon-search): cache lowercased line text in line cache
Lazily store a lowercased line variant in the line cache entry to avoid
repeated toLowerCase calls during case-insensitive searches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:41:58 -07:00
Daniel ImmsandCursor a7467a901d perf(addon-search): reuse compiled regex across line scans
Compile the line search RegExp once per find/findNext/findPrevious call
and pass it into _findInLine to avoid per-line recompilation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:41:28 -07:00
Daniel ImmsandCursor 9902f54c93 perf(addon-search): avoid repeated substring allocation in reverse regex
Hoist searchStringLine.slice(0, offset) outside the reverse regex exec loop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:40:31 -07:00
Daniel ImmsandCursor c7baa96f97 fix(addon-search): ignore zero-length matches in reverse regex search
Skip empty regex matches in the reverse path to match forward behavior and
avoid unstable result selection.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:39:23 -07:00
Daniel ImmsandCursor 11720c9dc3 fix(addon-search): continue whole-word search within same line
Scan for additional matches when the first candidate fails whole-word
checks instead of returning early.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:38:35 -07:00
Daniel ImmsandCursor 0b1cacd1a5 fix(addon-search): apply active result decoration CSS class
Pass isActiveResult through to _applyStyles in onRender so active matches
receive xterm-find-active-result-decoration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:37:45 -07:00
Daniel ImmsandCursor 865f835a5e fix(addon-search): refresh highlights when decoration options change
Compare decoration style fields in didOptionsChange so same-term searches
with updated colors or rulers trigger highlight recomputation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:36:56 -07:00
Daniel ImmsandCursor bf055dd5fc fix(addon-search): rehighlight when search options change
Evaluate shouldUpdateHighlighting before updating lastSearchOptions so
option-only changes trigger highlight refresh for the same term.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 17:36:06 -07:00
Daniel Imms 255859606c Add search benchmark 2026-05-25 16:34:58 -07:00
Daniel Imms e749cb6125 Merge pull request #5891 from Tyriar/cross-env
Remove cross-env dep
2026-05-21 03:17:50 -07:00
Daniel Imms 8df996f9e7 Merge pull request #5892 from Tyriar/tyriar/deps
Remove @types/debug and trusted-types
2026-05-21 03:17:24 -07:00
Daniel Imms 51f6186352 Remove @types/debug and trusted-types 2026-05-21 03:09:41 -07:00
Daniel Imms ae5c41c518 Merge pull request #5890 from Tyriar/utf8
Remove utf8 dep
2026-05-21 03:09:04 -07:00
Daniel Imms df9fb7e473 Remove cross-env dep 2026-05-21 03:06:53 -07:00
Daniel Imms f100e93ba5 Remove utf8 dep 2026-05-21 03:04:16 -07:00
Daniel Imms 1d3825d341 Merge pull request #5889 from Tyriar/deepEqual
Remove deep-equal/types packages
2026-05-21 03:03:37 -07:00
Daniel Imms 57315e6cc9 Remove deep-equal/types packages 2026-05-21 02:58:43 -07:00
Daniel Imms 2be4fc68e5 Merge pull request #5884 from sotasan/addon-image-kitty-q2-suppresses-ok
addon-image: Kitty graphics q=2 should suppress OK responses too
2026-05-21 02:37:53 -07:00
Daniel Imms 66fabfc232 Merge pull request #5878 from PerBothner/demo-size-style
demo - indicate screen area size when non-auto
2026-05-21 02:36:24 -07:00
Daniel Imms 3e2a42eb29 Merge pull request #5883 from vsych/fix-webgl-atlas-merge-stale-vertices
Fix webgl rendering corruption from atlas page merges
2026-05-21 02:26:03 -07:00
Daniel Imms 6a47d09b4c Merge pull request #5888 from Tyriar/tyriar/nal-trace
Git ignore cursor nal-traces
2026-05-21 02:18:06 -07:00
Daniel Imms b36001ee7b Git ignore cursor nal-traces 2026-05-21 02:17:43 -07:00
Daniel Imms e64f25a0dd Merge pull request #5880 from ciembor/master
Add 4bit to the Real-world uses section.
2026-05-21 02:13:34 -07:00
Victor Sych 3bcb57545e Re-upload atlas textures after page merges 2026-05-21 04:59:37 +02:00