aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorMarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com>2022-02-27 21:21:18 +0200
committerMichael Vetter <jubalh@iodoru.org>2022-03-03 12:55:57 +0100
commit0fdaad7cbf9b080a6908cd7164977b7a29eab354 (patch)
tree0eeafad368c76d3ae0b87c94f970e85765070821 /src/command
parent990232394322b51dc450b46b447173d9c0b10144 (diff)
downloadprofani-tty-0fdaad7cbf9b080a6908cd7164977b7a29eab354.tar.gz
Add hotkey for sending readline text to editor
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_funcs.c9
-rw-r--r--src/command/cmd_funcs.h1
2 files changed, 5 insertions, 5 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index b18fd6a2..f28610a7 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -122,7 +122,6 @@ static void _who_roster(ProfWin* window, const char* const command, gchar** args
static gboolean _cmd_execute(ProfWin* window, const char* const command, const char* const inp);
static gboolean _cmd_execute_default(ProfWin* window, const char* inp);
static gboolean _cmd_execute_alias(ProfWin* window, const char* const inp, gboolean* ran);
-gboolean _get_message_from_editor(gchar* message, gchar** returned_message);
/*
* Take a line of input and process it, return TRUE if profanity is to
@@ -4099,7 +4098,7 @@ cmd_subject(ProfWin* window, const char* const command, gchar** args)
gchar* message = NULL;
char* subject = muc_subject(mucwin->roomjid);
- if (_get_message_from_editor(subject, &message)) {
+ if (get_message_from_editor(subject, &message)) {
return TRUE;
}
@@ -9455,7 +9454,7 @@ cmd_change_password(ProfWin* window, const char* const command, gchar** args)
// Returns true if an error occurred
gboolean
-_get_message_from_editor(gchar* message, gchar** returned_message)
+get_message_from_editor(gchar* message, gchar** returned_message)
{
// create editor dir if not present
char* jid = connection_get_barejid();
@@ -9548,7 +9547,7 @@ cmd_editor(ProfWin* window, const char* const command, gchar** args)
gchar* message = NULL;
- if (_get_message_from_editor(NULL, &message)) {
+ if (get_message_from_editor(NULL, &message)) {
return TRUE;
}
@@ -9571,7 +9570,7 @@ cmd_correct_editor(ProfWin* window, const char* const command, gchar** args)
gchar* initial_message = win_get_last_sent_message(window);
gchar* message = NULL;
- if (_get_message_from_editor(initial_message, &message)) {
+ if (get_message_from_editor(initial_message, &message)) {
return TRUE;
}
diff --git a/src/command/cmd_funcs.h b/src/command/cmd_funcs.h
index f4cbe0bf..e1d5c4f7 100644
--- a/src/command/cmd_funcs.h
+++ b/src/command/cmd_funcs.h
@@ -250,5 +250,6 @@ gboolean cmd_correct_editor(ProfWin* window, const char* const command, gchar**
gboolean cmd_silence(ProfWin* window, const char* const command, gchar** args);
gboolean cmd_register(ProfWin* window, const char* const command, gchar** args);
gboolean cmd_mood(ProfWin* window, const char* const command, gchar** args);
+gboolean get_message_from_editor(gchar* message, gchar** returned_message);
#endif