Commit graph

79 commits

Author SHA1 Message Date
LoricAndre 7375d30bf1
feat: add more info variants (closes #1042) (#1048)
* feat: add more info variants (closes #1042)

* chore: generate completions & manpage

* docs: update info docs

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-04-11 14:12:22 +02:00
LoricAndre 4997e2d253
feat: add border none (closes #1041) (#1044)
* feat: add border none (closes #1041)

* chore: generate completions & manpage

* fix: add BorderType::ForceOff to handle popup and no-border

* chore: generate completions & manpage

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-04-10 17:44:45 +02:00
LoricAndre e531182a2b
feat: allow negative sizes (closes #1040) (#1043)
* feat: allow negative sizes (closes #1040)

* chore: generate completions & manpage

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-04-10 16:17:07 +02:00
Xeonacid 40f0e29448
chore: deps: Only use frizbee on x86_64 and aarch64 (#1028)
* chore: deps: Only use frizbee on x86_64 and aarch64

* chore: update docs for frizbee support

* chore: docs [skip ci]

---------

Co-authored-by: LoricAndre <57358788+LoricAndre@users.noreply.github.com>
2026-04-04 14:32:57 +02:00
LoricAndre 6b355e144a
feat: rename tmux -> popup and add zellij (#1027)
* feat: rename tmux -> popup and add zellij

* chore: generate completions & manpage

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: fixes

* chore: generate completions & manpage

* chore: misc, windows todo

* chore: disable popup on windows for now

* chore: generate completions & manpage

* fix: always quote using sh

* chore: expect

* fix: avoid nested popup invocations

* fix: tests

* fix: correctly gate popup

* chore(docs): update ARCHITECTURE.md [skip ci]

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-03 13:46:12 +02:00
Loric ANDRE fb17c90704 feat: add scrollbar 2026-04-01 13:44:52 +02:00
Loric ANDRE 39b120fbd8 release: v4.3.0 2026-03-31 19:29:36 +02:00
LoricAndre 987d2a5ca7
feat: add multiline item rendering (#999)
* feat: add multiline item rendering

* chore: generate completions & manpage

* chore: use newline as default for multiline when read0 is set

* chore: generate completions & manpage

* chore: add `highlight-line'

* chore: generate completions & manpage

* feat: use multiline in history widgets

* feat: better snap tests

* feat(ci): show snap failures

* fix(ci): cross platform tests

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-03-30 13:57:09 +02:00
LoricAndre 9d12e9d420
feat: windows support (#1010)
* wip: windows support

* feat: windows support

* feat: add windows target to CI

* chore: generate completions & manpage

* Update src/util.rs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: cleanup & doc

* chore: generate completions & manpage

* chore: generate dist

* fix: reduplicate default test

* chore: regate tmux

* chore: remove useless test-utils feature

* fix(windows): ignore dirs in default_command

* docs: update shell docs for windows

* chore: generate completions & manpage

* chore(justfile): do not ignore failed tests

* fix: upload correct junit after profile change

* fix: always execute exit commands

* fix: windows-specific ctrl-c handling

* chore: misc docs & other updates

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: generate completions & manpage

* chore: include license in MSI installer

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
2026-03-29 21:46:42 +00:00
Loric ANDRE 5b0323a9fb feat!: use Arinae as default algorithm
=== Results: ./target/release/sk [baseline] ===
Completed runs: 50 / 50
Average items matched: 2895782 / 10000000  (min: 2895782, max: 2895782)
Average time: 3.827s  (min: 3.576s, max: 4.090s)
Average items/second: 2615767  (min: 2445033, max: 2796365)
Average peak memory usage: 1589.2 MB  (min: 1518.6 MB, max: 1661.2 MB)
Average peak CPU usage: 528.9%  (min: 457.0%, max: 740.0%)

=== Results: /home/loric/.local/share/cargo/bin/sk ===
Completed runs: 50 / 50
Average items matched: 2895782 / 10000000  (min: 2895782, max: 2895782)
+0.0%
Average time: 3.930s  (min: 3.565s, max: 4.226s)  +2.7%
Average items/second: 2548674  (min: 2366263, max: 2804816)  -2.6%
Average peak memory usage: 1618.8 MB  (min: 1539.1 MB, max: 1680.6 MB)
+1.9%
Average peak CPU usage: 696.8%  (min: 608.0%, max: 875.0%)  +31.7%

=== Results: /home/loric/.nix-profile/bin/fzf ===
Completed runs: 50 / 50
Average items matched: 2895782 / 10000000  (min: 2895782, max: 2895782)
+0.0%
Average time: 5.421s  (min: 4.814s, max: 6.111s)  +41.7%
Average items/second: 1848269  (min: 1636444, max: 2077385)  -29.3%
Average peak memory usage: 2015.3 MB  (min: 1860.7 MB, max: 2173.9 MB)
+26.8%
Average peak CPU usage: 1301.1%  (min: 1229.0%, max: 1431.0%)  +146.0%

=== Comparison Summary (vs baseline: ./target/release/sk) ===
Binary                                       Avg time     Δ time
Avg rate     Δ rate
------------------------------------------------------------------------------------------
./target/release/sk                            3.827s   baseline
2615767   baseline
/home/loric/.local/share/cargo/bin/sk          3.930s      +2.7%
2548674      -2.6%
/home/loric/.nix-profile/bin/fzf               5.421s     +41.7%
1848269     -29.3%
2026-03-10 15:59:59 +01:00
LoricAndre ab514a54c9
feat!: internally compute indexes at match time (removes get/set_index) (#1001)
* chore: remove skim::Item run_items wrapper

* fix: properly trigger re-render on custom previews

* feat: add AppendItems event

* feat!: internally compute indexes at match time (removes get/set_index)

* chore: generate completions & manpage

* chore: better benchmarks

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-03-10 14:12:10 +01:00
Loric ANDRE 7d2efaf87f chore: review snapshots 2026-03-08 18:57:55 +01:00
Loric ANDRE e891a49ebe fix: use sum of scores in And engine 2026-03-05 09:30:38 +01:00
Loric ANDRE 0bf6e8fb32 feat: add scheme for better filepath matching in Arinae 2026-03-05 09:30:38 +01:00
LoricAndre c65274441a
feat: add Arinae algorithm (#990)
* feat: initial work on skim v3

wip

* wip: SW

* chore: refactor SkimV3 to make it more maintainable

* chore: remove SIMD batch scores

* fix: fix Skim V3 tests

* feat: small optimizations

* feat: bigger optimizations

* chore: generate completions & manpage

* chore: remove unused wide dependency

* chore: update deps

* chore: generate completions & manpage

* fix: make sure all subsequences pass in non-typos mode

* chore: trade some performance against more precision with typos

* feat: gain the performance back using unchecked accesses

* chore: remove failing tests

* feat: use banding across whole upper triangle

* chore: remove useless DEAD_COL checks

* feat: make sure we match everything `frizbee` does while enforcing first char

* feat: minor optimizations

* feat: more minor optimizations

* chore: tweak parameters to find a good balance between performance and accuracy

* chore: accept snap

* chore: penalize consecutive typos

* chore: revert consecutive typos penalization as it seems useless in practice

* wip: optimizations

* feat: multiple optimizations

* perf(skim_v3): use 2-row rolling buffer for score-only DP path

When compute_indices=false (fuzzy_match), the full (n+1)×mcols matrix
was allocated and populated even though traceback was never performed.
Introduce score_only_dp() which maintains only two rows at a time,
reducing memory from O(n×m) to O(m) and improving cache utilization
for long choice strings.

* perf(skim_v3): add early termination when DP rows are all-zero

Track consecutive rows where no cell has a positive score. After 2
consecutive dead rows, return None immediately: gap penalties can only
decrease existing scores, so no downstream row can produce a positive
result. Applied to both score_only_dp and full_dp.

* perf(skim_v3): add range_dp for fuzzy_match_range, avoiding full index vec

fuzzy_match_range previously called fuzzy_indices (full traceback collecting
every matched index) just to extract the first and last. Introduce range_dp
which performs the same full-matrix DP but during traceback only records the
begin and end positions, avoiding the Vec allocation and index collection.
Add range_consistent_with_indices test to verify correctness.

* perf(skim_v3): remove redundant is_subsequence scan in exact mode

In non-typo mode, is_subsequence was called before compute_banding, but
compute_banding -> compute_first_match_cols already validates the same
subsequence property (returning None if any pattern char is absent).
Remove the redundant O(m) scan and delete the now-unused is_subsequence
function. Typo mode retains cheap_typo_prefilter as its guard.

* perf(skim_v3): avoid clone in traceback by using mem::take on thread-local buffer

Previously full_dp returned indices via indices_ref.to_vec() which copies
all n index values into a new allocation. Replace with std::mem::take which
moves ownership of the populated Vec out of the thread-local without copying,
trading the reuse-across-calls benefit for zero-copy return per call.

* perf(skim_v3): tighten typo-mode upper band bound in typo_vband_row

Previously the upper column bound in typo mode was always m (the full
choice length), even for early rows where the diagonal sits far from the
right edge. Compute hi = (j + bandwidth).min(m) symmetrically with the
existing lower bound, skipping cells that cannot contribute to a valid
alignment and reducing work for short patterns on long strings.

* perf(skim_v3): use memchr SIMD for first-char search in prefilter and banding

Add memchr as a direct dependency and implement Atom::find_first_in with
a u8-specialization that calls memchr() for case-sensitive search and a
two-call min-of-two approach for case-insensitive. Use this in:
- cheap_typo_prefilter: first-character existence check
- find_first_char: typo-mode banding anchor computation
This replaces scalar byte-by-byte loops with SIMD-vectorized searches for
ASCII inputs, the common case.

* revert(skim_v3): restore m upper bound in typo_vband_row

The tightened hi = (j + bandwidth).min(m) bound incorrectly rejected valid
typo-mode alignments where the optimal path takes many LEFT (gap) steps
past the bandwidth boundary. The snapshot test confirms 5 fewer matches vs
the expected 37. Revert to hi = m; the affine gap penalty alone prevents
poor alignments from winning.

* perf(skim_v3): add ASCII fast path to char::eq_ignore_case

Replace the to_lowercase() iterator comparison with eq_ignore_ascii_case()
for the common case where both chars are ASCII. This avoids creating two
ToLowercase iterators per comparison in the non-ASCII DP path, using a
single bitwise comparison instead.

* perf(skim_v3): replace RefCell with UnsafeCell (TLCell) in thread-locals

ThreadLocal<RefCell<T>> incurs a runtime borrow-check on every access.
Since ThreadLocal already guarantees per-thread isolation and we never
re-enter the same thread-local within a single call stack, the RefCell
check is redundant.

Replace with TLCell<T>, a Send newtype over UnsafeCell<T>, and a tl_get_mut
helper that returns &mut T directly. Document the safety invariant at each
call site. Also remove the now-unused SWMatrix::zero constructor.

* fix(skim_v3): fix precompute_bonuses reserve logic

The previous reserve(cho.len().saturating_sub(buf.len())) computed the
needed additional capacity relative to the current length, which could
be wrong if buf.len() was stale (e.g. after a set_len call on a longer
buffer). Replace with clear() + reserve(cho.len()) for a correct and
clear-intent O(1) reset followed by a single exact reservation.

* guard: return None for pat.len() > MAX_PAT_LEN in exact mode

Patterns longer than MAX_PAT_LEN (16) used the stack-allocated
[usize; MAX_PAT_LEN] banding arrays with out-of-bounds indices,
causing undefined behaviour in the exact (non-typo) DP path.

Add an early return of None in compute_first_match_cols and
compute_last_match_cols so callers gracefully skip overlong patterns
rather than reading past the end of a fixed-size array.  Typo mode
is unaffected: its dummy arrays are never indexed by the pattern
length.

* perf: re-encode Dir::None=0 so CELL_ZERO is all-zero bytes

Previously Dir::None=3 made Cell::new(0,Dir::None) encode as
0x00030000, preventing bulk-zeroing with write_bytes(0).

Re-assign discriminants to None=0, Diag=1, Up=2, Left=3 so that
CELL_ZERO is now all-zero.  Update:
- Dir discriminants in the enum
- Cell::is_diag() (checks tag==1 instead of 0)
- compute_cell branchless arithmetic (base is Left=3, subtract 2 for
  Diag wins, 1 for Up wins; None=0 so no OR needed)
- score_only_dp: replace init loop with write_bytes(0)
- full_dp / range_dp: replace row-0 init loop with write_bytes(0)

* perf: 128-bit ASCII bitset for cheap_typo_prefilter tail scan

Add Atom::count_tail_present with a u8 specialisation that builds a
two-u64 presence bitset from the choice in a single O(m) pass, making
each subsequent pattern-char lookup O(1) instead of O(m).

The char (non-ASCII) path delegates to count_tail_present_ordered, the
same ordered linear scan that was previously inlined in the function.
The change is observationally equivalent: the prefilter remains a
lenient superset of the old check (unordered vs. ordered presence),
and the snapshot test count is unchanged.

* perf: early exit in count_tail_present_ordered when match is impossible

Add a hopeless-state check at the top of each iteration: if matched
plus remaining pattern chars cannot reach min_needed, bail out
immediately rather than completing the full scan.

This prunes the non-ASCII (char) ordered-scan fallback inside
cheap_typo_prefilter when the pattern is long and many chars are
missing from the choice.

* cleanup: remove unused constants SEPARATOR_MASK_LO/HI and FIRST_CHAR_BONUS_MULTIPLIER

All three were suppressed with #[allow(dead_code)] and are not
referenced by any live code.  SEPARATOR_TABLE is the active lookup;
the mask constants were documentation remnants.

* refactor: replace unsafe transmute in Cell::dir() and compute_cell with safe match

Both usages converted a u8 (guaranteed 0..=3) to Dir via transmute.
Replace with an exhaustive match on the 2-bit tag value — no unsafe
required, and the compiler generates the same conditional-move
sequence.

* perf: Atom::is_sep() trait method avoids u8→char→u32 in separator check

Add is_sep() to the Atom trait with a u8 specialisation that indexes
SEPARATOR_TABLE directly with self as usize, skipping the into::<char>
conversion required by the generic default.

Remove the now-unnecessary is_separator free function; callers use
prev.is_sep() instead.

* refactor: precompute_bonuses rewritten as safe iterator chain

Replace the unsafe raw-pointer write loop with a safe iterator that
starts with START_OF_STRING_BONUS and maps windows-of-2 to the
separator/camelCase bonus formula.  buf.extend() dispatches through
ExactSizeIterator, so no extra allocation occurs.

The safe form exposes the element-independent structure to the
compiler, enabling auto-vectorisation on release builds.

* refactor: extract match_slices_range; simplify run_range

Add match_slices_range<C: Atom> that mirrors match_slices but calls
range_dp instead of dispatch_dp.  run_range now delegates the ASCII
path to match_slices_range and keeps only the non-ASCII char-buf
setup inline, eliminating the duplicated prefilter + bonus +
range_dp block.

* mem: SWMatrix::resize shrinks when buffer is 4× over-allocated

After a one-off large input, the full-DP matrix buffer could hold
significantly more memory than typical inputs require.  Add a
shrink-or-cap heuristic: if the current capacity exceeds 4× the
needed size, truncate and shrink_to(2×needed) to release excess
memory without thrashing on stable-sized inputs.

* Revert "mem: SWMatrix::resize shrinks when buffer is 4× over-allocated"

This reverts commit 9c8571ebe8.

* Revert "refactor: replace unsafe transmute in Cell::dir() and compute_cell with safe match"

This reverts commit 8805fa14ce.

* Revert "perf: Atom::is_sep() trait method avoids u8→char→u32 in separator check"

This reverts commit 175f26af81.

* Revert "perf: early exit in count_tail_present_ordered when match is impossible"

This reverts commit 29721558f0.

* Revert "perf: 128-bit ASCII bitset for cheap_typo_prefilter tail scan"

This reverts commit d79947fcb5.

* Revert "refactor: extract match_slices_range; simplify run_range"

This reverts commit 0fb7f05513.

* Revert "perf(skim_v3): replace RefCell with UnsafeCell (TLCell) in thread-locals"

This reverts commit 0806683251.

* Revert "perf(skim_v3): add ASCII fast path to char::eq_ignore_case"

This reverts commit 069710ad7c.

* Revert "revert(skim_v3): restore m upper bound in typo_vband_row"

This reverts commit 90ffc46633.

* Revert "perf(skim_v3): tighten typo-mode upper band bound in typo_vband_row"

This reverts commit f38ca3a10d.

* Revert "perf(skim_v3): avoid clone in traceback by using mem::take on thread-local buffer"

This reverts commit ffa9a21167.

* Revert "perf(skim_v3): add early termination when DP rows are all-zero"

This reverts commit 073195be58.

* Revert "perf(skim_v3): use 2-row rolling buffer for score-only DP path"

This reverts commit 3acacaad74.

* fix: reverse only order of frizbee indices

* chore: rename & refactor into multiple files

* chore: optimizations to the main flow

* fix: correct banding in non-typo path

* chore: generate completions & manpage

* docs: add algorithms section to the README [skip ci]

* fix(ari): correctly bound vband low

* chore(ari): specific pre-separator bonuses

* fix(ari): boost consec a bit more to beat start/sep

* chore: generate completions & manpage

* feat: run matcher over chunks

* chore: adjust penalties to keep typos under subsequences

* chore: accept snapshot

* fix: replace greedy ordered prefilter with looser unordered

* chore: finish up rename

* chore: review

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-03-01 18:50:28 +01:00
Loric ANDRE 5a56391190 feat: merge ranks in AndOr engine matcher 2026-02-23 14:45:09 +01:00
LoricAndre 5daf7823eb
feat: add fzy matcher and --typos/--no-typos flag (#987)
* feat: first reimplementation of Fzy's algo

* feat: typo resistance using the `--typos` flag

* chore: generate completions & manpage

* feat: enable typo-resistance by default for fzy and frizbee

* chore: generate completions & manpage

* fix: tests & feature

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-02-20 15:12:06 +01:00
LoricAndre c7da16f167
feat: back to stable rust (#980)
* wip: stable rust, but no match indices

* feat: use restored indices api

* chore: use crates.io pushed 0.8.0

* chore: generate completions & manpage

* fix: remove nightly-specific coverage annotations

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-02-19 20:53:05 +01:00
Loric ANDRE 003243a93a feat: add --ellipsis option 2026-02-19 13:37:10 +01:00
Loric ANDRE d7117fbbc2 feat: add --print-current, --output-format (closes #981) 2026-02-18 22:14:49 +01:00
Loric ANDRE 5c11314bb6 feat: add set-header action (closes #768) 2026-02-18 19:33:29 +01:00
Loric ANDRE 65ba8cffaa feat: event-driven re-render (#949) 2026-02-16 11:05:33 +01:00
kimono-koans ad91558749
feat: use a separate thread pool for Matcher runs (#961)
* Initial commit

* Disable Matcher when query is empty

* Revert

* Cleanup

* Use par_chunks for faster search

* Cleanup

* Skip updating atomic on every iter

* Item index unnecessary?

* Cleanup

* Build thread pool at App level

* Initial commit

* Disable Matcher when query is empty

* Revert

* Cleanup

* Use par_chunks for faster search

* Cleanup

* Skip updating atomic on every iter

* Item index unnecessary?

* Cleanup

* Build thread pool at App level

* Make suggested improvements

* chore: cleanup after rebase

* refactor: rewrite insta test harness to use fine-grained Skim:: methods

Split `impl Skim` into a generic `impl<Backend> Skim<Backend>` block so
that `Skim::init()`, `Skim::start()`, `Skim::tick()`, etc. work with
any backend, not just the default CrosstermBackend.

New public API on Skim<B>:
- `init_tui_with(tui)` – inject a caller-provided TUI (e.g. TestBackend)
- `app()` / `app_mut()` – access the application state
- `tui_ref()` / `tui_mut()` – access the TUI
- `app_and_tui()` – simultaneous mutable access to both (avoids borrow
  conflicts in render and handle_event calls)
- `final_event()` – inspect the quit event

TestHarness now wraps `Skim<TestBackend>` and initializes via
`Skim::init()` + `Skim::init_tui_with()`, sharing the production
init path (theme, reader, command expansion) instead of duplicating it.

https://claude.ai/code/session_016PtHKc9YVEpHftDxG5Nger

* chore: make insta harness more realistic

* Cleanup merge errors

* Remove duplicate check

* Cleanup

* No need to clone twice

* fix: fix thread pool race condition

---------

Co-authored-by: Loric ANDRE <loric.andre@pm.me>
Co-authored-by: Claude <noreply@anthropic.com>
2026-02-15 17:34:46 +01:00
kimono-koans 5d9743f198
feat: further reduce DefaultSkimItem size (#967)
* Initial commit

* Cleanup

* Prevent some double allocation behavior

* User the proper conversion method

* Further attempt to avoid alloc

* Actually avoid alloc

* Cleanup

* Remove an unnecessary alloc

* Cleanup

* Avoid another alloc

---------

Co-authored-by: LoricAndre <57358788+LoricAndre@users.noreply.github.com>
2026-02-13 15:18:26 +01:00
LoricAndre 98a9184055
feat: add set-preview-cmd action to change preview (#969)
* feat: add set-preview-cmd action to change preview

* chore: update manpage

* chore: generate completions & manpage

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-02-13 08:32:13 +00:00
LoricAndre de7eab7619
feat(cli): add SKIM_OPTIONS_FILE (#972)
* feat(cli): add SKIM_OPTIONS_FILE

* chore: generate completions & manpage

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-02-13 09:24:05 +01:00
Loric ANDRE 4c12048762 fix: restart_matcher race condition (closes #970) 2026-02-12 15:08:37 +01:00
LoricAndre e9fb1877c0
feat(lib): add fine-grained control over skim's event loop (#968)
* feat(lib): add fine-grained control over skim's event loop

* fix: do not panic on reload

* fix: cleaner handling of reload
2026-02-12 11:57:02 +01:00
Loric ANDRE d11e627ba6 feat!: use smarter setters, remove the need for Some(...) and String::from() in setters 2026-02-11 18:18:35 +01:00
dependabot[bot] d48f3f5e32
chore(deps): bump rand from 0.9.2 to 0.10.0 (#958)
Bumps [rand](https://github.com/rust-random/rand) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.2...0.10.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 21:51:42 +00:00
Loric ANDRE fdd93644b4 chore: test matchers 2026-02-09 23:31:43 +01:00
LoricAndre a08f6ac9b3
feat!: interactive pty preview & concurrency optimizations (#952)
This PR has grown beyond its initial scope due to me over-optimizing everything, but it leads to:

    Paving the way for future actually interactive previews
    Consistently better performance than fzf in our bench thanks to thread and concurrency optimizations as well as the use of kanal for the items channels

Given the scope, I'm marking this as breaking because:

    setting wrap in the preview window layout disables the pty since we don't want to manipulate the raw buffer to word-wrap it manually
    kanal channels work slightly differently and might break library usage, even though switching to them did not require any modifications of the examples so it's unlikely that users will see anything break


* fix: force cwd for preview

* fix: correctly set cwd & kill pty child in the right order

* fix: use std threads & reopen new pty for each preview

* feat: use tui-term for displaying

* feat: scroll in pty

* fix: make nested skim previews work

* fix: clippy mistake

* feat: reactive preview triggering

* chore: generate completions & manpage

* chore: optimizations & thread cleanup

* chore: use kanal for faster channels

* fix: tests

* fix: only send items if the matcher hasn't been killed in the meantime (#947)

* tests: add coverage

* tests: fix bin path with coverage

* tests: upload tests to codecov

* chore: make pty opt-in through preview-window

* chore: generate completions & manpage

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-02-09 21:43:04 +00:00
LoricAndre ee0d6dcd19
fix(linux): run preview in a PTY (closes #894) (#897)
* Reapply "fix: run preview in a PTY (closes #894)"

This reverts commit c5eb948500.

* chore: use pty only on linux

* chore: add test
2026-02-01 15:57:41 +01:00
Loric ANDRE d45f4c41fe fix: always make ctrl-d abort (closes #941) 2026-01-29 18:23:10 +01:00
LoricAndre 55b50cb3bf
feat: add --normalize to ignore accents etc. when matching (closes #453) (#914)
* feat: add `--normalize` to ignore accents etc. when matching (closes #453)

* chore: generate completions & manpage

* chore: merge master

* chore: generate completions & manpage

* chore: use a matcher engine for normalization

* chore: reset useless changes

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-01-27 14:04:51 +00:00
phanium a99cae3ca2
fix: clear screen when not in fullscreenon bash & fish (#936)
* fix: clear screen when not in fullscreen

`SKIM_DEFAULT_OPTIONS= sk --height=90%` don't clear screen on exit.

It don't use alt screen so we clear the screen manually on exit.

* fixup! fix: clear screen when not in fullscreen

* test: use explicit escape key and move to platform-specific

---------

Co-authored-by: Loric ANDRE <loric.andre@pm.me>
2026-01-27 09:51:20 +00:00
Loric ANDRE 5eb9703547 feat: parse ansi codes in prompt 2026-01-26 13:37:32 +01:00
LoricAndre 5d938b05fe
fix: make select-1 and exit-0 work again (closes #916) (#933) 2026-01-26 13:14:51 +01:00
Loric ANDRE 788eb81334 tests: review snapshots 2026-01-25 21:56:28 +01:00
Loric ANDRE 6a6fea3e3a fix: header and header-lines order in reverse layout 2026-01-25 21:40:30 +01:00
Loric ANDRE 94c4bd51fe fix: correct cursor position when using reverse and border (closes #928) 2026-01-25 19:25:42 +01:00
Loric ANDRE 7ff7b01031 fix: correctly compute character width for cursor display (closes #929) 2026-01-25 10:41:57 +01:00
LoricAndre ec0658a9d4
feat: add borders to all widgets (#930) 2026-01-25 10:36:28 +01:00
Loric ANDRE a6613e4559 fix: re-enable query/cmd-query distinction and switching 2026-01-24 16:47:55 +01:00
Loric ANDRE 505c5deae7 fix: correctly toggle prompt on ToggleInteractive (closes #925) 2026-01-24 11:06:00 +01:00
LoricAndre 1536eb9657
feat: add --remote flag to call remote (--listen) instances (#915)
* feat: add `--remote` flag to call remote (`--listen`) instances

* chore: generate completions & manpage

* docs: update docs

---------

Co-authored-by: Skim bot <skim-bot@skim-rs.github.io>
2026-01-23 18:19:43 +00:00
Loric ANDRE 47e547a9ad tests: remove insta_ prefixes after finalizing tests migration 2026-01-23 17:58:05 +01:00
Loric ANDRE 96a4c69646 fix: correctly merge styles & do not reset them by default (#918) 2026-01-23 11:50:44 +01:00
Loric ANDRE 16ef0f4a27 fix: do not override {} with {q} in interactive mode 2026-01-22 21:34:40 +01:00
Mathieu Lemay 554896db64
fix: Escape last ; in env var value before passing to tmux (#912)
* fix: Escape last ; in env var value before passing to tmux

* Use shell_quote for more robust quoting

* Use Sh quoting always

* Revert to original escaping, add test

---------

Co-authored-by: LoricAndre <57358788+LoricAndre@users.noreply.github.com>
2026-01-22 16:49:18 +00:00