Avoiding a compiler warning with --disable-wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4947 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
9ac910e9d3
Коммит
c35eb5a16e
@ -1,5 +1,7 @@
|
|||||||
2014-06-09 Benno Schulenberg <bensberg@justemail.net>
|
2014-06-09 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/nano.c (do_input): Remove two superfluous false conditions.
|
* src/nano.c (do_input): Remove two superfluous false conditions.
|
||||||
|
* src/nano.h, src/text.c (add_undo): Avoid a compiler warning with
|
||||||
|
--disable-wrapping.
|
||||||
|
|
||||||
2014-06-09 Mark Majeres <mark@engine12.com>
|
2014-06-09 Mark Majeres <mark@engine12.com>
|
||||||
* src/text.c (do_undo, do_redo, add_undo, update_undo, do-wrap):
|
* src/text.c (do_undo, do_redo, add_undo, update_undo, do-wrap):
|
||||||
|
@ -187,7 +187,11 @@ typedef enum {
|
|||||||
} function_type;
|
} function_type;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ADD, DEL, BACK, REPLACE, SPLIT_BEGIN, SPLIT_END, UNSPLIT, CUT, CUT_EOF, PASTE, ENTER, INSERT, OTHER
|
ADD, DEL, BACK, CUT, CUT_EOF, REPLACE,
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
|
SPLIT_BEGIN, SPLIT_END,
|
||||||
|
#endif
|
||||||
|
UNSPLIT, PASTE, INSERT, ENTER, OTHER
|
||||||
} undo_type;
|
} undo_type;
|
||||||
|
|
||||||
typedef struct color_pair {
|
typedef struct color_pair {
|
||||||
|
@ -876,13 +876,16 @@ void add_undo(undo_type current_action)
|
|||||||
u->type = current_action;
|
u->type = current_action;
|
||||||
u->lineno = fs->current->lineno;
|
u->lineno = fs->current->lineno;
|
||||||
u->begin = fs->current_x;
|
u->begin = fs->current_x;
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
if (u->type == SPLIT_BEGIN) {
|
if (u->type == SPLIT_BEGIN) {
|
||||||
/* Some action, most likely an ADD, was performed that invoked
|
/* Some action, most likely an ADD, was performed that invoked
|
||||||
* do_wrap(). Rearrange the undo order so that this previous
|
* do_wrap(). Rearrange the undo order so that this previous
|
||||||
* action is after the SPLIT_BEGIN undo. */
|
* action is after the SPLIT_BEGIN undo. */
|
||||||
u->next = fs->undotop->next ;
|
u->next = fs->undotop->next ;
|
||||||
fs->undotop->next = u;
|
fs->undotop->next = u;
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
u->next = fs->undotop;
|
u->next = fs->undotop;
|
||||||
fs->undotop = u;
|
fs->undotop = u;
|
||||||
fs->current_undo = u;
|
fs->current_undo = u;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user