чување 1b0bbd358704e6e956649f1f93844cc817936deb
родитељ a2f93483f125d6c56488f899ce83f64bb2e0b521
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Sat, 25 Sep 2021 19:37:26 +0200
Fix: properly trigger warning prompt when overwrite is attempted
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 1, додавања: 5(+), брисања: 4(-)
diff --git a/poe.c b/poe.c
@@ -30,6 +30,9 @@ void format_filename(char* result, size_t result_size, const char* format,
const struct DrawState* state);
void format_msgs(char* result, size_t result_size, const char* format,
const struct DrawState* state);
+void overwrite_copy_msgid_callback(struct DrawState* state, struct tb_event* ev);
+void overwrite_paste_callback(struct DrawState* state, struct tb_event* ev);
+void cancel_callback(struct DrawState* state, struct tb_event* ev);
void quit_callback(struct DrawState* state, struct tb_event* ev);
struct BufferLine* load_info(struct DrawState* state);
struct BufferLine* load_msgstr(struct DrawState* state);
@@ -842,8 +845,7 @@ copy_msgid_to_input(struct DrawState* state)
if (state->edit_info_focused)
return state;
- if (!state->in_prompt && state->input_rows_count > 1
- && *state->input_buffer->text)
+ if (!state->in_prompt && *state->input_buffer->text)
{
state->in_prompt = 1;
strcpy(state->prompt, prompt_overwrite);
@@ -994,8 +996,7 @@ paste_paste_buffer_to_input(struct DrawState* state)
if (state->edit_info_focused)
return state;
- if (!state->in_prompt && state->input_rows_count > 1
- && *state->input_buffer->text)
+ if (!state->in_prompt && *state->input_buffer->text)
{
state->in_prompt = 1;
strcpy(state->prompt, prompt_overwrite);