71 Commits

Author SHA1 Message Date
05d9eb4728 Bump minimum CMake version to 3.5 2025-05-07 10:57:31 -04:00
e82eric
1f08ed60ca fix: update license to include Junegunn (#148) 2025-03-12 08:36:49 +01:00
Simon Hauser
2a5ceff981 chore: remove -Werror from default build command (#145)
close #144
2025-02-11 22:09:31 +01:00
cgwkymt
dae2eac9d9 fix: makefile windows regression, detect MSYS2 (#136) 2024-12-12 17:55:36 +01:00
Simon Hauser
93be786888 fix: macos ci by upgrading to macos-15 (#137) 2024-12-12 17:48:45 +01:00
Simon Hauser
cf48d4dfce feat: make ci more modern (#131) 2024-07-02 15:50:46 +02:00
Tushar
935bedf39c docs(README): Fix cmake install instruction (#130)
Recent versions of cmake seem to affect how redundant installation
directives are handled, i.e. install source and destination are the
same. While previously they went through as a noop, they now seem
to fail as reproduced in #120.
2024-07-01 20:01:53 +02:00
Maximilian Schmidt
9ef21b2e6b fix: OS detection logic to allow compiling with MYSYS cmake on Windows (#121) 2024-03-05 15:00:47 +01:00
Simon Hauser
6c921ca123 fix: dont shadow var f (#110) 2023-09-10 17:21:06 +02:00
Simon Hauser
9bc8237565 chore: bump ci runner and actions (#104) 2023-05-25 12:17:02 +02:00
Julius Dockwarder
2f42ffe7c6 docs: update readme with lazy.nvim directions (#100) 2023-05-25 11:06:57 +02:00
Simon Hauser
8b79ebecc1 fix(health): remove deprecated api warnings in health check
fixes #103
2023-05-25 10:53:58 +02:00
adrian5
580b6c4865 feat: include environment CFLAGS for make (#97) 2023-02-05 11:11:04 +01:00
Luke Bakken
fab3e2212e fix: makefile windows regression, detect MSYS (#89)
Fixes #88
2022-12-18 09:41:01 +01:00
Simon Hauser
b5237ad434 fix(health): sorter init and destroy
fixes #91
2022-12-18 09:34:24 +01:00
Tom
ae9d95da9f fix: Makefile is having problems with creating *.dll (#87) 2022-12-02 11:54:30 +01:00
Simon Hauser
7447fe780f fix(ci): stylua check 2022-11-30 18:58:55 +01:00
Simon Hauser
8fff2b20b2 feat: health check (#84) 2022-11-30 10:54:32 +01:00
Isabella Muerte
65c0ee3d4b refactor: cleanup cmake + fix windows builds + add cmake presets (#78)
This change brings in several things

1. The `CMakeLists.txt` file has been reorganized and brought up to more
   "modern" CMake code (while still working with CMake 3.2 at a minimum)
2. A fix has been added for #77, to always set the suffix to `.dll`,
   regardless of toolchain
3. Warnings for _CRT_SECURE and _CRT_NONSTDC are now disabled.
4. This also adds the most minimal version of a cmake "preset" for CMake
   3.19 and later. This adds generators for unix makefiles and ninja,
   allowing users to simply execute their post-install step as:
   ```console
   $ cmake --preset <ninja|make>
   $ cmake --build build --target install
   ```
2022-09-06 07:39:20 +02:00
Guoan Tang
6791f74e9f fix: replace MKD command in windows (#81)
Co-authored-by: Guoan Tang <guoantang@microsoft.com>
2022-08-10 21:56:45 +02:00
Andrew Palmer
6a33ecefa9 fix: build .so rather than .dylib on MacOS (#73) 2022-06-09 15:26:14 +02:00
Simon Hauser
f0dba7df95 fix: double free (#72) 2022-06-01 16:18:55 +02:00
Carsten Kragelund Jørgensen
2330a7eac1 feat: CMake Windows Build Support (#68)
Co-authored-by: Arvid Gerstmann <dev@arvid-g.de>
Co-authored-by: Arvid Gerstmann <ag@arvid.io>
Co-authored-by: Carsten Kragelund <carsten@kraglelund.dev>
2022-05-15 20:33:25 +02:00
Simon Hauser
281b07a5cb chore: create funding 2022-04-30 18:59:24 +02:00
Simon Hauser
8ec164b541 refactor: fzf_position pointer needs to be passed in the base alg now (#62)
replacing with_pos

Leads to:
- more readable code
- less allocations

Breaks:
- fzf_get_positions can now return NULL if there isnt a match and
  pattern is longer > 0 none whitespace bytes
2022-02-19 21:18:11 +01:00
Simon Hauser
f29725979b chore: refactor code for better readability and some cleanup (#61)
This stuff has breaking changes in the c interface. And i most likely will change more things in the future. But in the end it should lead to a better result.

Take a look at the header for a detailed overview of the changes. Should be straight forward to adapt
2022-02-18 23:27:54 +01:00
Simon Hauser
f917416050 fix: memory leak in get_positions when using or (#59) 2022-02-18 21:36:29 +01:00
Simon Hauser
1b5d0cba81 break: streamlining of some function returns in the c library (#58)
breaking changes for c ABI. unrelated for lua users.

- `get_positions` can now return NULL for an empty pattern input
- `get_score` will now return 1 for an empty pattern input. previously handled in the telescope lua part of the code. Now its moved to c
2022-02-18 20:51:18 +01:00
Simon Hauser
cce2db6b13 fix: memory leak for empty pattern (#57) 2022-02-18 20:30:42 +01:00
xtrnc
b8662b0761 fix: compile warnings (cygwin gcc) (#44)
Compiling with cygwin (gcc 10.2.0) on win10 fails because of "array
subscript has type 'char'" warnings. If isspace is called with a
negative char value it would invoke undefined behavior.
2021-11-24 17:47:04 +01:00
matu3ba
59e38e1661 docs: fix readme (#38)
- add fzf search syntax taken from fzf project
- also includes OR operator description taken from fzf project
2021-09-15 20:34:10 +02:00
Simon Hauser
c507c54786 docs: fix readme (#37)
* docs: fix readme

* some ci adjustments
2021-09-12 17:04:46 +02:00
fredizzimo
66c8705414 Fixes and tests (#36)
* Test and fix the algorithm

The tests were ported from the go version. And when running them a
couple of issues were found and fixed.

* Fix position checks

The tests that were testing for returned positions did not check the
whole array. This fixes that, and also verifies that the length matches.

* Fix lua test

The correct score is 54
16 + 2 * 8 - 3 - 2 * 1 + 16 - 3 - 2 * 1 + 16 = 54
2021-08-27 09:10:07 +02:00
Tynan McAuley
90bb28dea2 Set language standard to GNU99 (#35)
This fixes building with older C compilers.

Using GNU99 rather than C99 so that calls to 'typeof()' in the
'examiner' library can work.
2021-08-26 17:45:11 +02:00
Simon Hauser
9fb0d2d229 fix #33 by making sure opts exists 2021-08-14 10:22:09 +02:00
Simon Hauser
2fd60ebe4c feat: opts can now override default conf (#31) 2021-08-03 14:52:34 +02:00
Simon Hauser
fe8c8d8cf7 chore: switch to examiner testing framework (#27) 2021-07-06 13:21:31 +02:00
Simon Hauser
f0379f50aa chore: build system windows support + stylua style checker (#25)
Windows users should do a `make clean && make` to cleanup previous things.
A dll file will be build and loaded on windows now (no longer a so file).

I hope that fixes most platform / build system related issues
2021-06-16 10:28:45 +02:00
Ryan Reno
43e391499e fix: changed Makefile to be portable to OpenBSD. (#22) 2021-06-09 09:34:54 +02:00
Simon Hauser
64efff7b8b perf: ffi performance improvements (#19) 2021-06-02 11:06:38 +02:00
Simon Hauser
8557aa8579 fix: regression from last commit. close #18 2021-05-23 23:19:51 +02:00
Simon Hauser
998e0e2958 feat: option to enable/disable fuzzy matching (#17) 2021-05-23 19:25:01 +02:00
Simon Hauser
6eadb53003 refactor: unique names for public interface + move more things from header in source file (#15)
Also use `-O3` over `-Ofast` because `-ffast-math` causes issues in combination with gitsigns.nvim
This needs to be investigated in more detail.
2021-05-15 12:47:06 +02:00
Simon Hauser
2c475f9cb9 fix: telescope prefiltering (used in lsp_workspace_symbols, etc) (#14) 2021-05-13 08:11:35 +02:00
Simon Hauser
c2abd338b8 fix: resize_pos was executed to often, which resulted in a segfault (#13) 2021-05-12 22:43:05 +02:00
Simon Hauser
b6765b49bc refactoring + fixes + more tests (#8)
This includes a lot of things:
- Making types more consistent
- Fixes for get_positions
- Small performance improvement for telescope lua

This will help with further development:
- More c integration tests
- lua tests to validate the bindings
- Small benchmark for c library

Also it turns out that the c library is around 25% faster, tested with the benchmark. (no idea why)
2021-05-02 08:05:40 +02:00
Simon Hauser
a5a0cfd9bd feat: pattern can be only inverse now + integration tests
Example this repo: !fzf !test

Close #7
2021-04-25 16:09:53 +02:00
Simon Hauser
f53375a66c Breaking change (for devs only): Rename lua module to fzf_lib
Close #5
2021-04-25 16:03:33 +02:00
Michał Nowotnik
6cacaf6184 fix: nil error (#6) 2021-04-24 15:56:32 +02:00
Simon Hauser
df97e1b1f7 fix small memory leak when using | 2021-04-20 15:18:56 +02:00