Commit 4cf39e41 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Renaming 'undidmsg' to 'redidmsg', to be apt.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 13 additions and 12 deletions
+13 -12
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
needs to be refreshed, not the entire screen. needs to be refreshed, not the entire screen.
* src/browser.c (do_browser): Remove superfluous abortion variable, * src/browser.c (do_browser): Remove superfluous abortion variable,
and place two comments better. and place two comments better.
* src/text.c (do_redo): Rename 'undidmsg' to 'redidmsg', to be apt.
2014-06-22 Mark Majeres <mark@engine12.com> 2014-06-22 Mark Majeres <mark@engine12.com>
* src/text.c (do_redo): When redoing a line join at the tail * src/text.c (do_redo): When redoing a line join at the tail
......
...@@ -555,7 +555,7 @@ void do_redo(void) ...@@ -555,7 +555,7 @@ void do_redo(void)
{ {
undo *u = openfile->undotop; undo *u = openfile->undotop;
size_t len = 0; size_t len = 0;
char *undidmsg, *data; char *redidmsg, *data;
for (; u != NULL && u->next != openfile->current_undo; u = u->next) for (; u != NULL && u->next != openfile->current_undo; u = u->next)
; ;
...@@ -580,7 +580,7 @@ void do_redo(void) ...@@ -580,7 +580,7 @@ void do_redo(void)
switch (u->type) { switch (u->type) {
case ADD: case ADD:
undidmsg = _("text add"); redidmsg = _("text add");
len = strlen(f->data) + strlen(u->strdata) + 1; len = strlen(f->data) + strlen(u->strdata) + 1;
data = charalloc(len); data = charalloc(len);
strncpy(data, f->data, u->begin); strncpy(data, f->data, u->begin);
...@@ -592,7 +592,7 @@ void do_redo(void) ...@@ -592,7 +592,7 @@ void do_redo(void)
break; break;
case BACK: case BACK:
case DEL: case DEL:
undidmsg = _("text delete"); redidmsg = _("text delete");
len = strlen(f->data) + strlen(u->strdata) + 1; len = strlen(f->data) + strlen(u->strdata) + 1;
data = charalloc(len); data = charalloc(len);
strncpy(data, f->data, u->begin); strncpy(data, f->data, u->begin);
...@@ -603,13 +603,13 @@ void do_redo(void) ...@@ -603,13 +603,13 @@ void do_redo(void)
goto_line_posx(u->lineno, u->begin); goto_line_posx(u->lineno, u->begin);
break; break;
case ENTER: case ENTER:
undidmsg = _("line break"); redidmsg = _("line break");
goto_line_posx(u->lineno, u->begin); goto_line_posx(u->lineno, u->begin);
do_enter(TRUE); do_enter(TRUE);
break; break;
#ifndef DISABLE_WRAPPING #ifndef DISABLE_WRAPPING
case SPLIT_BEGIN: case SPLIT_BEGIN:
undidmsg = _("line wrap"); redidmsg = _("line wrap");
goto_line_posx(u->lineno, u->begin); goto_line_posx(u->lineno, u->begin);
openfile->current_undo = u; openfile->current_undo = u;
openfile->last_action = OTHER; openfile->last_action = OTHER;
...@@ -620,7 +620,7 @@ void do_redo(void) ...@@ -620,7 +620,7 @@ void do_redo(void)
break; break;
#endif /* !DISABLE_WRAPPING */ #endif /* !DISABLE_WRAPPING */
case JOIN: case JOIN:
undidmsg = _("line join"); redidmsg = _("line join");
len = strlen(f->data) + strlen(u->strdata) + 1; len = strlen(f->data) + strlen(u->strdata) + 1;
f->data = charealloc(f->data, len); f->data = charealloc(f->data, len);
strcat(f->data, u->strdata); strcat(f->data, u->strdata);
...@@ -636,31 +636,31 @@ void do_redo(void) ...@@ -636,31 +636,31 @@ void do_redo(void)
break; break;
case CUT_EOF: case CUT_EOF:
case CUT: case CUT:
undidmsg = _("text cut"); redidmsg = _("text cut");
redo_cut(u); redo_cut(u);
break; break;
case PASTE: case PASTE:
undidmsg = _("text uncut"); redidmsg = _("text uncut");
redo_paste(u); redo_paste(u);
break; break;
case REPLACE: case REPLACE:
undidmsg = _("text replace"); redidmsg = _("text replace");
data = u->strdata; data = u->strdata;
u->strdata = f->data; u->strdata = f->data;
f->data = data; f->data = data;
goto_line_posx(u->lineno, u->begin); goto_line_posx(u->lineno, u->begin);
break; break;
case INSERT: case INSERT:
undidmsg = _("text insert"); redidmsg = _("text insert");
goto_line_posx(u->lineno, u->begin); goto_line_posx(u->lineno, u->begin);
copy_from_filestruct(u->cutbuffer); copy_from_filestruct(u->cutbuffer);
break; break;
default: default:
undidmsg = _("Internal error: unknown type. Please save your work."); redidmsg = _("Internal error: unknown type. Please save your work.");
break; break;
} }
statusbar(_("Redid action (%s)"), undidmsg); statusbar(_("Redid action (%s)"), redidmsg);
openfile->current_undo = u; openfile->current_undo = u;
openfile->last_action = OTHER; openfile->last_action = OTHER;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment