diff options
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | files.c | 8 | ||||
-rw-r--r-- | gramscii.1 | 4 | ||||
-rw-r--r-- | gramscii.h | 2 | ||||
-rw-r--r-- | screen.c | 1 |
5 files changed, 13 insertions, 4 deletions
@@ -1,9 +1,9 @@ + optimize redraws (redraw only the modified rectangle) - fix bug with 'g' commands in arrow mode +- fir bug in reading commands from files - add screen geometry option (-g 25x80?) - read file at point - read output of command (!) -- use [ENTER] to exit from text insert - maybe move "text" mode to "t" - implement ellipse - (?) filled box (B) @@ -50,8 +50,12 @@ void load_file(FILE *fc){ get_string(fc, "Load file: ", newfname, 255); if ((fin=fopen(newfname, "r")) != NULL){ i = 0; - while((fgets(screen.l[i].s, WIDTH+2, fin)) != NULL && i<HEIGHT) - screen.l[i++].s[WIDTH-1]='\0'; + while((fgets(screen.l[i].s, WIDTH+1, fin)) != NULL && i<HEIGHT){ + screen.l[i].lst = strlen(screen.l[i].s) - 1; + screen.l[i].n = i; + screen.l[i].s[strlen(screen.l[i].s)-1]='\0'; + i++; + } for(;i<HEIGHT; i++){ erase_line(i); } @@ -557,6 +557,10 @@ would automatically save the screen into "filename". gramscii currently manages only a fixed screen of the same size of the screen where it starts from. This will be changed in a future release to support scrolling and "virtual" screens of any (reasonable) size. +.PP +There is currently a bug with files read before accepting commands: the +result of the commands read from the files is not show immediately, and not +shown correctly. .SH AUTHORS gramscii is written and maintained by Vincenzo "KatolaZ" Nicosia <katolaz@freaknet.org>. You can use, copy, modify, and redistribute @@ -82,7 +82,7 @@ typedef struct{ #define progr_x(d) ((d) == DIR_L ? -1 : (d) == DIR_R ? 1 : 0) #define progr_y(d) ((d) == DIR_U ? -1 : (d) == DIR_D ? 1 : 0) -/** #define DEBUG 1 **/ +#define DEBUG 1 /** global variables **/ @@ -409,6 +409,7 @@ void init_screen(){ cutbuf.l = NULL; cutbuf.num = 0; + undo = NULL; undo_sz = 0; undo_cur = -2; undo_lst = -2; |