diff --git a/src/files.c b/src/files.c index b9d894f3..d03f4a20 100644 --- a/src/files.c +++ b/src/files.c @@ -88,11 +88,19 @@ void make_new_buffer(void) openfile->filename = mallocstrcpy(NULL, ""); - initialize_buffer_text(); + openfile->filetop = make_new_node(NULL); + openfile->filetop->data = mallocstrcpy(NULL, ""); + openfile->filebot = openfile->filetop; + openfile->current = openfile->filetop; + openfile->current_x = 0; openfile->placewewant = 0; openfile->current_y = 0; + openfile->edittop = openfile->filetop; + openfile->firstcolumn = 0; + + openfile->totsize = 0; openfile->modified = FALSE; #ifdef ENABLE_WRAPPING openfile->spillage_line = NULL; @@ -116,21 +124,6 @@ void make_new_buffer(void) #endif } -/* Initialize the text and pointers of the current openfile struct. */ -void initialize_buffer_text(void) -{ - openfile->filetop = make_new_node(NULL); - openfile->filetop->data = mallocstrcpy(NULL, ""); - - openfile->filebot = openfile->filetop; - openfile->edittop = openfile->filetop; - openfile->current = openfile->filetop; - - openfile->firstcolumn = 0; - openfile->current_x = 0; - openfile->totsize = 0; -} - /* Mark the current file as modified if it isn't already, and then * update the titlebar to display the file's new status. */ void set_modified(void) diff --git a/src/proto.h b/src/proto.h index abb26b6f..3e6ece2a 100644 --- a/src/proto.h +++ b/src/proto.h @@ -263,7 +263,6 @@ void zap_text(void); void paste_text(void); /* Most functions in files.c. */ -void initialize_buffer_text(void); void set_modified(void); bool open_buffer(const char *filename, bool new_buffer); #ifdef ENABLE_SPELLER