Fixed text not refreshing when prompt closes.
This commit is contained in:
parent
44e09d1662
commit
e7e5431c3b
14
README.md
14
README.md
@ -7,12 +7,16 @@ so I don't plan on working on it anymore.
|
|||||||
|
|
||||||
Probably the most well-developed program I made this summer.
|
Probably the most well-developed program I made this summer.
|
||||||
|
|
||||||
How to use:
|
##How to use:
|
||||||
|
|
||||||
F4 quits (no prompt)
|
usage: text [file ]
|
||||||
F5 saves the current file as save.txt
|
|
||||||
|
|
||||||
Current issues:
|
* F4 quits (no prompt)
|
||||||
|
* F5 saves the current file (untitled.txt is the default name)
|
||||||
|
* F6 saves the current file and allows you to specify the filename.
|
||||||
|
(WARNING: no confirmation screen or error checking yet).
|
||||||
|
|
||||||
|
##Current issues:
|
||||||
|
|
||||||
x-y coordinates in ncurses correspond to rows and columns in
|
x-y coordinates in ncurses correspond to rows and columns in
|
||||||
the text document. This means tabs are an issue and text
|
the text document. This means tabs are an issue and text
|
||||||
@ -21,4 +25,4 @@ from document logic.
|
|||||||
|
|
||||||
Can only save files under the name save.txt. Solution: create
|
Can only save files under the name save.txt. Solution: create
|
||||||
a prompt window (from scratch...) that retuns a string to the
|
a prompt window (from scratch...) that retuns a string to the
|
||||||
caller.
|
caller. (Done!)
|
||||||
|
2
makefile
2
makefile
@ -6,7 +6,7 @@ OBJS=text.o page.o line.o prompt.o
|
|||||||
LIBS=-lncurses
|
LIBS=-lncurses
|
||||||
|
|
||||||
text: $(OBJS)
|
text: $(OBJS)
|
||||||
$(CC) $(CFLAGS) -o text.exe $(OBJS) $(LIBS)
|
$(CC) $(CFLAGS) -o text $(OBJS) $(LIBS)
|
||||||
|
|
||||||
text.o: text.c text.h page.h line.h prompt.h
|
text.o: text.c text.h page.h line.h prompt.h
|
||||||
$(CC) $(CFLAGS) -c text.c
|
$(CC) $(CFLAGS) -c text.c
|
||||||
|
1
text.c
1
text.c
@ -74,6 +74,7 @@ int main(int argc, char *argv[])
|
|||||||
prompt_string("Save As:", page.filename);
|
prompt_string("Save As:", page.filename);
|
||||||
save_file(argc, argv, &page);
|
save_file(argc, argv, &page);
|
||||||
sprintf(status, "Saved as \'%s\'", page.filename);
|
sprintf(status, "Saved as \'%s\'", page.filename);
|
||||||
|
print_page(&page, beg, end);
|
||||||
update_status(status);
|
update_status(status);
|
||||||
break;
|
break;
|
||||||
case KEY_UP:
|
case KEY_UP:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user