aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/goto-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/goto-commands.c')
-rw-r--r--src/goto-commands.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/goto-commands.c b/src/goto-commands.c
index 6fdaffc..aad3668 100644
--- a/src/goto-commands.c
+++ b/src/goto-commands.c
@@ -75,7 +75,7 @@ teco_state_label_input(teco_machine_main_t *ctx, gunichar chr, GError **error)
teco_goto_table_undo_remove(&ctx->goto_table, ctx->goto_label.data, ctx->goto_label.len);
if (teco_goto_skip_label.len > 0 &&
- !teco_string_cmp(&ctx->goto_label, teco_goto_skip_label.data, teco_goto_skip_label.len)) {
+ !teco_string_cmp(ctx->goto_label, teco_goto_skip_label.data, teco_goto_skip_label.len)) {
teco_undo_string_own(teco_goto_skip_label);
memset(&teco_goto_skip_label, 0, sizeof(teco_goto_skip_label));
teco_undo_gssize(teco_goto_backup_pc) = -1;
@@ -118,12 +118,12 @@ TECO_DEFINE_STATE(teco_state_label,
);
static teco_state_t *
-teco_state_goto_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error)
+teco_state_goto_done(teco_machine_main_t *ctx, teco_string_t str, GError **error)
{
if (ctx->flags.mode > TECO_MODE_NORMAL)
return &teco_state_start;
- if (!str->len) {
+ if (!str.len) {
/* you can still write @O/,/, though... */
g_set_error_literal(error, TECO_ERROR, TECO_ERROR_FAILED,
"No labels given for <O>");
@@ -141,9 +141,9 @@ teco_state_goto_done(teco_machine_main_t *ctx, const teco_string_t *str, GError
*/
teco_string_t label = {NULL, 0};
while (value >= 0) {
- label.data = label.data ? label.data+label.len+1 : str->data;
- const gchar *p = label.data ? memchr(label.data, ',', str->len - (label.data - str->data)) : NULL;
- label.len = p ? p - label.data : str->len - (label.data - str->data);
+ label.data = label.data ? label.data+label.len+1 : str.data;
+ const gchar *p = label.data ? memchr(label.data, ',', str.len - (label.data - str.data)) : NULL;
+ label.len = p ? p - label.data : str.len - (label.data - str.data);
value--;
@@ -178,7 +178,7 @@ teco_state_goto_done(teco_machine_main_t *ctx, const teco_string_t *str, GError
/* in cmdline.c */
gboolean teco_state_goto_process_edit_cmd(teco_machine_main_t *ctx, teco_machine_t *parent_ctx,
gunichar chr, GError **error);
-gboolean teco_state_goto_insert_completion(teco_machine_main_t *ctx, const teco_string_t *str,
+gboolean teco_state_goto_insert_completion(teco_machine_main_t *ctx, teco_string_t str,
GError **error);
/*$ "O" ":O" goto