From 089818825c9caef18259a4a0b075d06dcf1c56a4 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 20 Jan 2005 04:58:21 +0000 Subject: fix bug in revision 2413 git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2416 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'mbbsd/edit.c') diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 34ab3488..9efa6a27 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -133,32 +133,20 @@ indigestion(int i) fprintf(stderr, "ÄY­«¤º¶Ë %d\n", i); } -void init_edit_buffer(editor_internal_t *buf) +static void init_edit_buffer(editor_internal_t *buf) { - buf->firstline = NULL; - buf->lastline = NULL; - buf->currline = NULL; - buf->blockline = NULL; - buf->top_of_win = NULL; - buf->deleted_lines = NULL; - - buf->insert_character = 1; - buf->redraw_everything = 1; - buf->indent_mode = 0; - buf->line_dirty = 0; - buf->currpnt = 0; - buf->totaln = 0; - buf->my_ansimode = 0; - buf->phone_mode = 0; - buf->phone_mode0 = 0; + /* all unspecified columns are 0 */ buf->blockln = -1; buf->insert_c = ' '; + buf->insert_character = 1; + buf->redraw_everything = 1; } static void enter_edit_buffer(void) { editor_internal_t *p = curr_buf; curr_buf = (editor_internal_t *)malloc(sizeof(editor_internal_t)); + memset(curr_buf, 0, sizeof(editor_internal_t)); curr_buf->prev = p; } @@ -1806,6 +1794,8 @@ vedit(char *fpath, int saveheader, int *islocal) if (quote_file[79] == 'L') local_article = 1; } + + // No matter you quote or not, just start from (0,0) curr_buf->currline = curr_buf->firstline; curr_buf->currpnt = curr_buf->currln = curr_buf->curr_window_line = curr_buf->edit_margin = last_margin = 0; -- cgit v1.2.3