nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 14c5f03e389c3a5ee469a6a58faadb91b305aa89
parent 1e2d9a697a5dac99bca159efb263c269c6461aa4
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 14 Jul 2017 16:18:41 +0200

tweaks: rename another constant, to be more precise

Diffstat:
Msrc/cut.c | 4++--
Msrc/nano.h | 2+-
Msrc/text.c | 10+++++-----
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/cut.c b/src/cut.c @@ -248,9 +248,9 @@ void do_copy_text(void) /* Cut from the current cursor position to the end of the file. */ void do_cut_till_eof(void) { - add_undo(CUT_EOF); + add_undo(CUT_TO_EOF); do_cut_text(FALSE, TRUE); - update_undo(CUT_EOF); + update_undo(CUT_TO_EOF); } #endif /* !NANO_TINY */ diff --git a/src/nano.h b/src/nano.h @@ -158,7 +158,7 @@ typedef enum { } update_type; typedef enum { - ADD, DEL, BACK, CUT, CUT_EOF, REPLACE, + ADD, DEL, BACK, CUT, CUT_TO_EOF, REPLACE, #ifndef DISABLE_WRAPPING SPLIT_BEGIN, SPLIT_END, #endif diff --git a/src/text.c b/src/text.c @@ -748,7 +748,7 @@ void do_undo(void) splice_node(f, t); goto_line_posx(u->lineno, u->begin); break; - case CUT_EOF: + case CUT_TO_EOF: case CUT: undidmsg = _("text cut"); undo_cut(u); @@ -926,7 +926,7 @@ void do_redo(void) renumber(f); goto_line_posx(u->mark_begin_lineno, u->mark_begin_x); break; - case CUT_EOF: + case CUT_TO_EOF: case CUT: redidmsg = _("text cut"); redo_cut(u); @@ -1261,7 +1261,7 @@ void add_undo(undo_type action) case REPLACE: u->strdata = mallocstrcpy(NULL, openfile->current->data); break; - case CUT_EOF: + case CUT_TO_EOF: cutbuffer_reset(); break; case CUT: @@ -1395,7 +1395,7 @@ fprintf(stderr, " >> Updating... action = %d, openfile->last_action = %d, openf #endif break; } - case CUT_EOF: + case CUT_TO_EOF: case CUT: if (!cutbuffer) break; @@ -1423,7 +1423,7 @@ fprintf(stderr, " >> Updating... action = %d, openfile->last_action = %d, openf u->cutbottom = u->cutbottom->next; u->lineno = u->mark_begin_lineno + u->cutbottom->lineno - u->cutbuffer->lineno; - if (ISSET(CUT_FROM_CURSOR) || u->type == CUT_EOF) { + if (ISSET(CUT_FROM_CURSOR) || u->type == CUT_TO_EOF) { u->begin = strlen(u->cutbottom->data); if (u->lineno == u->mark_begin_lineno) u->begin += u->mark_begin_x;