Skip to content

Commit

Permalink
shell:vi enable undo
Browse files Browse the repository at this point in the history
  • Loading branch information
linvinus committed Mar 12, 2015
1 parent 490117e commit e187729
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/shell/vi.c
Expand Up @@ -287,6 +287,8 @@ struct globals *ptr_to_globals;
//#define IF_FEATURE_VI_READONLY(...) __VA_ARGS__
#define IF_FEATURE_VI_READONLY(...)

#define ENABLE_FEATURE_VI_UNDO 1

/* Version Number */
#define BB_VER "1.00"
#define BB_BT "2004.12.21-09:59+0000"
Expand Down Expand Up @@ -326,6 +328,8 @@ static void bb_putchar( u8 data )

static void fflush_all() {
fflush(stdin);
fflush(stdout);
fflush(stderr);
}
/*******************elua end*******************************************/

Expand Down Expand Up @@ -1051,6 +1055,9 @@ static void edit_file(char *fn)
//free(mark[i]);
}
free(current_filename);
#if ENABLE_FEATURE_VI_UNDO
flush_undo_data();
# endif

go_bottom_and_clear_to_eol();
cookmode();
Expand Down

0 comments on commit e187729

Please sign in to comment.