aboutsummaryrefslogtreecommitdiff
path: root/sdn.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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`.
* Fix the help in absence of a bindings filePřemysl Eric Janouch2020-10-081-4/+4
|
* Fix showing DEL in the helpPřemysl Eric Janouch2020-10-081-14/+14
| | | | And in general fix all CTRL processing to handle the DEL character.
* Revisit zsh integrationPřemysl Eric Janouch2020-10-041-1/+2
| | | | | | | | | zsh's antisocial behaviour was fairly promptly fixed (thanks to Stephane Chazelas and his patience). zle-line-init and zle-line-reset seem to be user-defined widgets and the order inverted. Put zle-line-init before reset-prompt because some people do weird things in there.
* Survive a removed CWD, as well as an empty rootPřemysl Eric Janouch2020-10-021-14/+22
| | | | | All the omitted error checking sometimes sucks a lot, and I need to include it later anyway.
* Make the outer prompt look more normalPřemysl Eric Janouch2020-10-011-7/+9
| | | | | | | | There's a slight issue with the inverted cell representing the cursor standing out a bit too much amongst the rest of the characters. The resulting experience is a lot more consistent, though.
* Show external command line if appropriatePřemysl Eric Janouch2020-10-011-6/+21
| | | | | | | | | | | | | | Since I'm already dealing with the fish shell. All of our supported shells seem to handle cursor position in Unicode (wide character) codepoints. It was easiest and most straight-forward to pass the data through yet-unused program arguments. The cursor position is marked by a Unicode glyph equivalent to ACS_DIAMOND, although ncurses doesn't get a chance to make any ACS translation.
* Set cursor to child when going to parent dirPřemysl Eric Janouch2020-09-291-18/+26
| | | | | | | | | | | That is, if it's missing from our history. This makes for a more consistent experience when traversing the filesystem. Arguably, it's only good for when 'h' is bound to the 'parent' action. Also make sure that the offset and cursor are reset when the path is changed.
* CleanupPřemysl Eric Janouch2020-09-291-3/+2
|
* Add ability to run helpers externallyPřemysl Eric Janouch2020-09-291-3/+21
| | | | So far experimental and essentially undocumented.