tweaks: rename to the same name two variables that have the same role
parent
76d7fbd5ee
commit
474a1f0447
20
src/text.c
20
src/text.c
|
@ -513,7 +513,7 @@ void redo_cut(undostruct *u)
|
||||||
void do_undo(void)
|
void do_undo(void)
|
||||||
{
|
{
|
||||||
undostruct *u = openfile->current_undo;
|
undostruct *u = openfile->current_undo;
|
||||||
linestruct *line = NULL, *t = NULL;
|
linestruct *line = NULL, *intruder;
|
||||||
linestruct *oldcutbuffer;
|
linestruct *oldcutbuffer;
|
||||||
char *data, *undidmsg = NULL;
|
char *data, *undidmsg = NULL;
|
||||||
|
|
||||||
|
@ -570,13 +570,13 @@ void do_undo(void)
|
||||||
goto_line_posx(openfile->filebot->lineno, 0);
|
goto_line_posx(openfile->filebot->lineno, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
t = make_new_node(line);
|
intruder = make_new_node(line);
|
||||||
t->data = copy_of(u->strdata);
|
intruder->data = copy_of(u->strdata);
|
||||||
data = measured_copy(line->data, u->tail_x);
|
data = measured_copy(line->data, u->tail_x);
|
||||||
free(line->data);
|
free(line->data);
|
||||||
line->data = data;
|
line->data = data;
|
||||||
splice_node(line, t);
|
splice_node(line, intruder);
|
||||||
renumber_from(t);
|
renumber_from(intruder);
|
||||||
goto_line_posx(u->head_lineno, u->head_x);
|
goto_line_posx(u->head_lineno, u->head_x);
|
||||||
break;
|
break;
|
||||||
case REPLACE:
|
case REPLACE:
|
||||||
|
@ -684,7 +684,7 @@ void do_undo(void)
|
||||||
/* Redo the last thing(s) we undid. */
|
/* Redo the last thing(s) we undid. */
|
||||||
void do_redo(void)
|
void do_redo(void)
|
||||||
{
|
{
|
||||||
linestruct *line = NULL, *shoveline;
|
linestruct *line = NULL, *intruder;
|
||||||
char *data, *redidmsg = NULL;
|
char *data, *redidmsg = NULL;
|
||||||
undostruct *u = openfile->undotop;
|
undostruct *u = openfile->undotop;
|
||||||
|
|
||||||
|
@ -716,10 +716,10 @@ void do_redo(void)
|
||||||
case ENTER:
|
case ENTER:
|
||||||
redidmsg = _("line break");
|
redidmsg = _("line break");
|
||||||
line->data[u->head_x] = '\0';
|
line->data[u->head_x] = '\0';
|
||||||
shoveline = make_new_node(line);
|
intruder = make_new_node(line);
|
||||||
shoveline->data = copy_of(u->strdata);
|
intruder->data = copy_of(u->strdata);
|
||||||
splice_node(line, shoveline);
|
splice_node(line, intruder);
|
||||||
renumber_from(shoveline);
|
renumber_from(intruder);
|
||||||
goto_line_posx(u->head_lineno + 1, u->tail_x);
|
goto_line_posx(u->head_lineno + 1, u->tail_x);
|
||||||
break;
|
break;
|
||||||
case BACK:
|
case BACK:
|
||||||
|
|
Loading…
Reference in New Issue