aboutsummaryrefslogtreecommitdiff
path: root/sdn.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix OpenBSD buildPřemysl Eric Janouch35 hours1-5/+5
|
* Add support for BSD derivatives, fix macOSPřemysl Eric Janouch35 hours1-21/+72
|
* Improve filename passingPřemysl Eric Janouch2024-04-171-5/+7
| | | | | | | c9662f1 forgot about internal helpers. Moreover, it is annoying to see the -- in shell history for every single external helper call.
* Use more precise filesizesPřemysl Eric Janouch2024-04-071-5/+25
| | | | | | The behaviour differs from GNU `ls -lh` in that we use binary units, meaning we get 1023 before 1.0K rather than 999 before 1.0K, which is nonetheless still four characters wide.
* Fix passing filenames starting with -Přemysl Eric Janouch2024-01-201-2/+2
| | | | We don't want to pass them as program options.
* Fix code formatting, bump copyright yearsPřemysl Eric Janouch2023-06-121-4/+4
|
* Do not beep on window resizesPřemysl Eric Janouch2023-06-111-1/+2
|
* Implement ^W in the editorPřemysl Eric Janouch2023-06-111-2/+15
|
* Support wildcards in interactive searchPřemysl Eric Janouch2022-09-031-15/+30
| | | | | | | The previous search for the longest match is functionally duplicated by typing individual characters on the input line, and wildcards can be escaped, so there shouldn't be regressions in terms of capability.
* Add a missing case breakPřemysl Eric Janouch2022-01-081-0/+1
|
* Add and bind an action to center the cursorPřemysl Eric Janouch2022-01-081-1/+4
| | | | "z" stands for VIM's "zz".
* Do not crash on opendir() failuresPřemysl Eric Janouch2021-11-091-5/+16
| | | | Show an error message, and a way out.
* Fix build with recent ncursesPřemysl Eric Janouch2021-11-091-0/+3
| | | | Easily gained, easily lost. No more ^S binding.
* Add clang-format configuration, clean upPřemysl Eric Janouch2021-11-051-40/+40
|
* Move the cursor to just created directoriesPřemysl Eric Janouch2021-10-301-3/+9
|
* Clean upPřemysl Eric Janouch2021-10-301-11/+9
|
* Bind ^S to search, as in Emacs, with a trickPřemysl Eric Janouch2021-10-181-1/+10
| | | | We heavily depend on ncurses anyway, so no worries about portability.
* Slightly optimize very large directoriesPřemysl Eric Janouch2021-10-051-16/+17
| | | | | | | | Cumulatively 10% of user time, give or take. These are mainly pointless multibyte to wide string conversions. The hit to source code readibility is minimal.
* Measured stat performance, io_uring not worth itPřemysl Eric Janouch2021-10-051-3/+2
| | | | Large directories are slow for different reasons.
* Don't reload on sort changesPřemysl Eric Janouch2021-09-261-10/+15
| | | | It is unexpected behaviour, and likes to take too long.
* Add a comment about libaclPřemysl Eric Janouch2021-09-261-1/+3
| | | | So that I don't repeat my actions in the future.
* Ignore empty XDG_CONFIG_DIRSPřemysl Eric Janouch2021-09-261-1/+1
| | | | | | | | As the specification says we should. GLib does this as well. It is still possible to achieve an empty set by using ":", which are two non-absolute paths that should be ignored. GLib doesn't implement this. Thus, we're now better than GLib.
* Fix a signedness compiler warningPřemysl Eric Janouch2021-07-191-5/+5
|
* Bind F6 to a rename promptPřemysl Eric Janouch2021-07-171-1/+1
| | | | | | Mostly just so that the F7 binding isn't completely alone. Since Shift-F6 isn't something we can just bind to, use a prefill.
* Bind F7 to an mkdir promptPřemysl Eric Janouch2021-07-171-2/+12
| | | | This might have needed more thought, but we'll see.
* Implement search iterationPřemysl Eric Janouch2021-07-171-17/+37
| | | | | | The interactive search now has its own keymap, overriding "input". Closes #5
* Add a right-side prompt to the searchPřemysl Eric Janouch2021-07-171-7/+24
|
* Enable pushing the search in a certain directionPřemysl Eric Janouch2021-07-171-6/+7
| | | | We want to make it possible to iterate all current matches.
* Make search() return the number of matchesPřemysl Eric Janouch2021-07-171-2/+4
|
* Make removing characters invoke g.editor_on_changePřemysl Eric Janouch2021-07-171-3/+4
|
* Improve C-char parsingPřemysl Eric Janouch2021-07-091-4/+4
| | | | | | | | | I was hoping that a superoptimiser would help me find a miraculous branchless equation to cover it, but in the end the branching doesn't hurt at all in our case. It's more readable than `(((char >> 2) - 0x38) & 0x60) ^ char` or `(char ^ 0x40) & (((char >> 1) ^ 0x20) | 0x5f)`.
* Allow binding to custom key sequencesPřemysl Eric Janouch2021-07-071-6/+18
| | | | And document this feature in the manual page.
* Include a header required for kill()Přemysl Eric Janouch2020-10-291-0/+1
| | | | Yet, this program remains fairly unportable.
* Implement the --version optionPřemysl Eric Janouch2020-10-261-0/+5
| | | | Since we have a version number at all, even if it's meaningless.
* Bind F1 to show the helpPřemysl Eric Janouch2020-10-251-1/+2
|
* Mark a minor issue for later resolutionPřemysl Eric Janouch2020-10-241-0/+1
|
* CleanupPřemysl Eric Janouch2020-10-231-7/+0
| | | | | | The wchar_t variant of compute_width() is no longer needed. So all in all the better help has saved code.
* Group help message by actionPřemysl Eric Janouch2020-10-231-5/+7
| | | | Considerably more useful and concise.
* Bind M-Up to the "parent" actionPřemysl Eric Janouch2020-10-231-1/+2
| | | | | | Taken from Windows Explorer, which previously used Backspace. We might want to use h/l for parent/choose by default.
* Bind C-d in the editorPřemysl Eric Janouch2020-10-231-1/+1
| | | | | | We do get these as a key, after all. Closes #4
* Implement C-v in the editorPřemysl Eric Janouch2020-10-231-2/+14
| | | | | | Not completely happy with the explicit `halfdelay (1)`. Updates #4
* Implement C-u C-k in the editorPřemysl Eric Janouch2020-10-231-0/+10
| | | | Updates #4
* CleanupPřemysl Eric Janouch2020-10-221-16/+17
|
* Implement Delete in the editorPřemysl Eric Janouch2020-10-221-2/+11
| | | | | | | Not caring about C-d right now, we might have to convince the tty to send it to us--I'm not sure if it does, or returns EOF. Updates #4
* Implement C-a C-e C-b C-f in the editorPřemysl Eric Janouch2020-10-211-1/+26
| | | | Updates #4
* Make backspace erase combining charactersPřemysl Eric Janouch2020-10-211-2/+7
| | | | | | They might not be even printed correctly, though. Updates #4
* Track cursor position in the editorPřemysl Eric Janouch2020-10-211-6/+13
| | | | Updates #4
* Add an installation scriptPřemysl Eric Janouch2020-10-211-0/+1
| | | | | | | | Copying snippets from the README was uncomfortable and laborious, and wasted a lot of space in the document, especially after the recent additions. Closes #3
* Let the caller decide how to launch helpersPřemysl Eric Janouch2020-10-081-2/+1
| | | | | In the end, we don't need to impose any policy on it, and it removes a level of quoting, as well as an `eval`.
* When resuming a child, resume the whole groupPřemysl Eric Janouch2020-10-081-1/+1
| | | | | | | | | | | | SIGTSTP is sent to the entire foreground process group, so do the some with our SIGCONT. Debian's default sh (dash) doesn't replace itself with the command, even if it's the last one in the -c option. Of course, we do not need to use /bin/sh for the helpers at all, though it doesn't cost us much. We could also issue an explicit `exec`.