diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-20 12:58:21 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-20 12:58:21 +0800 |
commit | 089818825c9caef18259a4a0b075d06dcf1c56a4 (patch) | |
tree | 1d951274528816b434f08ba1e8157ce0242b7119 /mbbsd | |
parent | 97fd82c36e60e09d8c0d624d01ef33b86705eae0 (diff) | |
download | pttbbs-089818825c9caef18259a4a0b075d06dcf1c56a4.tar pttbbs-089818825c9caef18259a4a0b075d06dcf1c56a4.tar.gz pttbbs-089818825c9caef18259a4a0b075d06dcf1c56a4.tar.bz2 pttbbs-089818825c9caef18259a4a0b075d06dcf1c56a4.tar.lz pttbbs-089818825c9caef18259a4a0b075d06dcf1c56a4.tar.xz pttbbs-089818825c9caef18259a4a0b075d06dcf1c56a4.tar.zst pttbbs-089818825c9caef18259a4a0b075d06dcf1c56a4.zip |
fix bug in revision 2413
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2416 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/edit.c | 24 |
1 files changed, 7 insertions, 17 deletions
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; |