aboutsummaryrefslogtreecommitdiff
path: root/vis-menu.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-10vis-menu: use distinct error code upon cancelling selectionMarc André Tanner1-5/+5
The following exit statuses are used: 0 an item was successfully selected 1 the selection was cancelled >1 failure, some error occured
2020-01-12vis-menu: fix sign-compare compiler warningszsugabubus1-11/+15
2017-02-08vis-menu: check read(2) return valueMarc André Tanner1-1/+2
Fixes CID 137371
2016-11-25vis-menu: also re-open /dev/tty as stderrMarc André Tanner1-1/+3
This means vis-menu will also work when stderr is used for other purposes. This will be used by the vis editor: - stdin is used for the initial completion candidates - stdout is used to return the selected entry - stderr is used for error reporting
2016-10-06use EXIT_FAILURE for exit statusChristian Hesse1-1/+1
2016-10-05Fix various issues reported by coverity scanMarc André Tanner1-1/+1
2016-05-29vis-menu: improve empty prompt handling (vis-menu -p '')Marc André Tanner1-0/+2
The textw{,n} functions should probably be changed to not accomodate for leading and trailing spaces. They should also be changed to properly calculate the display width of an UTF-8 encoded string. Currently they will just return the number of codepoints which is obviously wrong.
2016-05-29vis-menu: reduce indentation level of switch statementsMarc André Tanner1-74/+78
2016-05-29vis-menu: more cleanupMarc André Tanner1-219/+195
2016-05-28[vis-menu] Remove unused keybinding.Tim Allen1-4/+0
I'm guessing at some point slmenu's author wanted to make the various deletion commands move text to a kill-buffer, and then Insert and Control-Y could yank from it back into the text field. That clearly never happened, though, so this is dead code.
2016-05-22vis-menu: do not segfault if an option lacks an argumentTim Allen1-4/+16
2016-05-20implement xread() and wrap read() + die()Christian Hesse1-9/+16
2016-05-19vis-menu: remove unused codeMarc André Tanner1-4/+0
2016-05-19vis-menu: fix matching order, exact matches should come firstMarc André Tanner1-1/+1
This reverts 09d0a36e0370f7ca9bdb171bf93c5ac3131c5a92 from the dmenu repository, although dmenu itself seems to work correctly. $ printf "foobar\nfoo\n" | ./vis-menu Typing foo should select foo not foobar.
2016-05-19vis-menu: import token based match function from dmenuMarc André Tanner1-30/+43
2016-05-19vis-menu: interpret non-option argument as an initial prompt valueMarc André Tanner1-1/+5
2016-05-19vis-menu: change version outputMarc André Tanner1-1/+1
2016-05-19vis-menu: remove X clipboard supportMarc André Tanner1-6/+0
2016-05-19Import slmenu 7e74fa5 as vis-menuMarc André Tanner1-0/+598