about summary refs log tree commit diff stats
path: root/src/ips/editor.nim
Commit message (Collapse)AuthorAgeFilesLines
* add extern, refactor some term functionsbptato2023-09-091-73/+0
| | | | | | | | | | | * Add an extern() call. Maybe it should be defined on client. It certainly should accept a dictionary instead of the enum type we use now. Perhaps it should return the error code? I'll leave it undocumented until I figure this out. * Refactor enableRawMode, unblockStdin, etc. so that they operate on the term object instead of global state. * Move editor to a separate folder, and factor out runprocess into a different module.
* Add mailcap, mime.types & misc refactoringsbptato2023-08-131-8/+2
| | | | | | | | * add mailcap: works with copiousoutput, needsterminal, etc. * add mime.types (only works with mailcap) * refactor pipeBuffer * remove "dispatcher" * fix bug in directory display where baseurl would not be used
* openEditor: check for errorbptato2023-06-261-8/+11
|
* Fix crash in openEditor if SIGINT was deliveredbptato2023-06-261-1/+13
| | | | | | | | | | | nvi for example sets ISIG and traps SIGINT. Without this patch, this would propagate to all processes in the same process group and kill them. (It still does, but we set a signalHandler to ignore that.) Still not perfect, because for some reason we receive WIFSIGNALED even if the signal did not actually kill the editor. For now, we just treat this as a success.
* Refactor config, add charset optsbptato2023-05-161-2/+2
| | | | Only document-charset supported for now.
* ips/editor: don't write file for empty input, check for conflicting filesbptato2022-12-251-7/+12
|
* ips/editor: make default line 1bptato2022-12-251-1/+1
|
* Add textareabptato2022-11-281-0/+59
Editing is implemented using an external editor (like vi).