Commit graph

52 commits

Author SHA1 Message Date
Dave Davenport
4975704a05 Fix #244 Do not catch sigchld, let glib handle this internally
- TODO fix man page viewing.
2015-10-12 08:12:25 +02:00
QC
56e023dcee Remove unneeded check. 2015-10-11 14:13:08 +02:00
Tom Hinton
af6a4b83eb Make normal filtering of plain ASCII lines faster
This patch adds a field lines_not_ascii to the MenuState structure. The
nth entry is 0 unless the nth member of MenuState.lines has a non-ascii
codepoint in it.

All comparison functions (menu_match_cb type) take an additional
argument to tell them if the thing they are matching is not_ascii. They
can use this to determine whether to collate and case-fold the
input (for non-ascii strings), or whether to use strstr/strcasestr (for
ascii strings).

The change is not currently implemented for flex matching, due to my
laziness. However, it should be a simple enough matter to add.

For my large input of 400,000 lines, this reduces typical filtering time
to about ten microseconds from about 2 seconds.
2015-10-01 12:16:41 +01:00
Tom Hinton
574bf2da82 Make dmenu reading very marginally faster
A slight reduction in use of realloc and avoidance of 3 or 4 strlens for
a string we know the length of
2015-10-01 11:41:44 +01:00
QC
31fe5759b8 More line fixing. 2015-09-19 21:00:06 +02:00
QC
b18d68eff2 Adjust new editor width 2015-09-19 12:57:48 +02:00
QC
442e235c24 Some cleanups, tweak uncrustify. 2015-09-19 12:21:30 +02:00
Dave Davenport
d2aad68bce Keep the line matched (if possible) when filtering. 2015-09-08 22:23:03 +02:00
Dave Davenport
13203c9de7 Refactor to make dmenu use Switcher, and make menu func use this. 2015-09-08 21:41:54 +02:00
Dave Davenport
2c45c02c7f Small cleanup. 2015-09-03 08:20:08 +02:00
QC
c170eae8c8 Issue: #207 add generic -filter mode. 2015-08-20 21:42:53 +02:00
Dave Davenport
1ca7141621 Add quick solution for #202, expose line-margin setting. 2015-08-04 09:42:14 +02:00
QC
1590151c46 -row -t -selected-row 2015-08-02 21:25:02 +02:00
QC
dbf992d756 Fix -l as alias for -lines (in dmenu mode) rename -l to -row 2015-08-02 21:24:07 +02:00
QC
8ca3c276c9 Change -i mode to match dmenu. Bug #200 2015-08-02 16:44:03 +02:00
QC
c97d2979e5 Bug #200, add '-b' method. 2015-08-02 15:50:06 +02:00
QC
979a63d242 Fix not clearing of pointer after free-ing it. 2015-07-27 23:24:38 +02:00
Dave Davenport
fa5c36835d Allow escape to quit in no-custom mode 2015-07-23 18:19:20 +02:00
Dave Davenport
98b8e583cb Make fuzzy matching available everywhere: #133 (-fuzzy) 2015-07-01 09:12:22 +02:00
Dave Davenport
30743d1789 Move fuzzy_token_match to where it can be reused. 2015-06-28 13:53:37 +02:00
QC
67089677b5 Fix naming 2015-06-27 22:38:06 +02:00
Dave Davenport
9977d7ef69 Fix fuzzy match to continue at next character. #133 2015-06-25 02:54:00 +02:00
QC
bcbb64f615 Don't do unneeded compares 2015-06-24 21:28:13 +02:00
QC
db1331ed66 Test implementation for #133. 2015-06-23 21:22:38 +02:00
QC
ce73f468ca Possible fix for #179 2015-06-20 15:11:30 +02:00
QC
bd9f4ebf07 More dmenu fixes (shift -enter on custom) 2015-06-11 21:20:09 +02:00
QC
a811011a1d Fix dmenu mode. 2015-06-11 21:07:25 +02:00
QC
d11c61cef1 Fixes #176 add mode that user expects. 2015-06-11 20:38:48 +02:00
Qball Cow
00ffa9f148 Move comment to right place 2015-06-09 18:14:09 +02:00
Qball Cow
e5caaf9d1a Possible fix issue #175 2015-06-09 18:10:23 +02:00
QC
95beb58730 tiny cleanup 2015-06-05 23:08:02 +02:00
QC
a93aec02bd Add support for msg string with pango markup. 2015-05-23 20:06:06 +02:00
Qball Cow
09e4a64780 fix issue #165 2015-05-19 19:59:50 +02:00
QC
300234611d First fix for #164 2015-05-18 22:38:51 +02:00
QC
354ccdd94d Fix Issue #164 2015-05-16 13:58:09 +02:00
QC
652a6ed7d2 Fix clang-tidy warnings. 2015-05-14 19:39:30 +02:00
Dave Davenport
22f35983c0 Add quote and escape string option. 2015-05-13 18:36:16 +02:00
Dave Davenport
4d7b5a02d6 Cleanup and add d format 2015-05-11 23:20:34 +02:00
QC
9307a1668e Add -format option to dmenu. 2015-05-10 12:08:08 +02:00
QC
4d3b9e414d Small cleanup 2015-05-09 14:17:27 +02:00
Dave Davenport
89d2190f8e [#158] Patch implementing -only-match mode. 2015-05-07 21:07:15 +02:00
QC
13eee4571c Allow alt-1t/m9 be re-bound. 2015-05-05 19:30:43 +02:00
QC
a32bd61fea DMENU special return value starts at 10. Issue: #154 2015-05-04 10:37:50 +02:00
QC
8d4e1ee8fa Rasi patch, allowing special keys, modifying return value.
In dmenu pressing alt-[1-9 will return the selected entry and set the return value to the
        pressed number.
2015-05-03 13:04:03 +02:00
QC
99118420ea Support Levenshtein in dmenu.i #149 2015-04-16 21:13:45 +02:00
QC
a38ddb3b06 Fix space. 2015-04-14 22:12:21 +02:00
QC
d6ced176d4 Add ranges for urgent active in dmenu mode. 2015-04-05 11:53:08 +02:00
QC
71cfb6d553 Allow urgent/active color to be set, add dmenu option -u/-a to highlight row. 2015-04-04 11:10:41 +02:00
Dave Davenport
0d87cf12a3 Add combi viewer, where (selected) modi can be combined.
- Add active window highlighter.
2015-03-31 22:45:02 +02:00
QC
888260b06b Small cleanup 2015-03-27 20:50:48 +01:00