about summary refs log tree commit diff stats
path: root/src/tools/editor.c
Commit message (Collapse)AuthorAgeFilesLines
* Profani-tty has rebornDaniel Santos2023-07-011-4/+4
|
* Fix memleaks & more auto-freeSteffen Jaeckel2023-05-121-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | `data_dir` would have been leaked if directory creation failed. `editor_argv` was leaked at some point, no idea why. ``` ==1244734== 118 (32 direct, 86 indirect) bytes in 1 blocks are definitely lost in loss record 6,299 of 7,824 ==1244734== at 0x4846CC3: realloc (vg_replace_malloc.c:1451) ==1244734== by 0x5E85AD0: g_realloc (in /usr/lib/libglib-2.0.so.0.7600.1) ==1244734== by 0x5E4A004: ??? (in /usr/lib/libglib-2.0.so.0.7600.1) ==1244734== by 0x5E4A7B1: g_ptr_array_add (in /usr/lib/libglib-2.0.so.0.7600.1) ==1244734== by 0x5EA4235: g_strsplit (in /usr/lib/libglib-2.0.so.0.7600.1) ==1244734== by 0x1F143C: get_message_from_editor (editor.c:92) ==1244734== by 0x193F6B: _inp_rl_send_to_editor (inputwin.c:950) ==1244734== by 0x614642F: _rl_dispatch_subseq (readline.c:916) ==1244734== by 0x6146C85: _rl_dispatch_callback (readline.c:823) ==1244734== by 0x616739F: rl_callback_read_char (callback.c:241) ==1244734== by 0x1923DB: inp_readline (inputwin.c:188) ==1244734== by 0x149860: prof_run (profanity.c:117) ==1244734== by 0x2283E8: main (main.c:186) ``` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Editor executable support flagsDaniel Santos2023-03-301-1/+6
| | | | | | | | * Make editor executable into a string to be able to support (multiple) flags. * Change /help executable to suit this new feature Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* fix more memory leaksSteffen Jaeckel2023-01-181-1/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Update copyright yearMichael Vetter2023-01-101-1/+1
|
* Include common.h and xmpp.h in editor.cMichael Vetter2022-06-281-0/+2
| | | | That was pulled in through log.h
* Fix crash on /editorMarcoPolo-PasTonMolo2022-03-241-1/+5
|
* re-factor `get_message_from_editor()`Steffen Jaeckel2022-03-141-62/+50
| | | | | | | * use GLib functions to write&read compose file * trim trailing new-line characters from compose file Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* prevent segfaultSteffen Jaeckel2022-03-131-0/+3
| | | | | | | In case we're not connected yet and press Alt+c a segfault occurred since `conn.xmpp_conn` is dereferenced while it's still `NULL`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Add stat.h to editorMichael Vetter2022-03-041-0/+1
| | | | | | Fix on openbsd: `src/tools/editor.c:55:36: error: 'S_IRWXU' undeclared (first use in this function)`
* Include errno header in editor.cMichael Vetter2022-03-041-1/+2
|
* Move get_message_from_editor to appropriate file and change its keybindingMarcoPolo-PasTonMolo2022-03-031-0/+132