summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-20 10:12:55 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-20 10:12:55 +0800
commit97fd82c36e60e09d8c0d624d01ef33b86705eae0 (patch)
treef7f040f8226930b0afda5828eac928a94f77f5d6
parentccac6983bd25c68d046c82f9168be448d12da721 (diff)
downloadpttbbs-97fd82c36e60e09d8c0d624d01ef33b86705eae0.tar
pttbbs-97fd82c36e60e09d8c0d624d01ef33b86705eae0.tar.gz
pttbbs-97fd82c36e60e09d8c0d624d01ef33b86705eae0.tar.bz2
pttbbs-97fd82c36e60e09d8c0d624d01ef33b86705eae0.tar.lz
pttbbs-97fd82c36e60e09d8c0d624d01ef33b86705eae0.tar.xz
pttbbs-97fd82c36e60e09d8c0d624d01ef33b86705eae0.tar.zst
pttbbs-97fd82c36e60e09d8c0d624d01ef33b86705eae0.zip
revert to 2410. wrong output when reposting.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2415 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/edit.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 9dfcaae6..34ab3488 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -135,12 +135,24 @@ indigestion(int i)
void init_edit_buffer(editor_internal_t *buf)
{
- memset(buf, 0, sizeof(editor_internal_t));
+ buf->firstline = NULL;
+ buf->lastline = NULL;
+ buf->currline = NULL;
+ buf->blockline = NULL;
+ buf->top_of_win = NULL;
+ buf->deleted_lines = NULL;
- buf->blockln = -1;
- buf->insert_c = ' ';
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;
+ buf->blockln = -1;
+ buf->insert_c = ' ';
}
static void enter_edit_buffer(void)
@@ -1795,7 +1807,7 @@ vedit(char *fpath, int saveheader, int *islocal)
local_article = 1;
}
curr_buf->currline = curr_buf->firstline;
- last_margin = 0;
+ curr_buf->currpnt = curr_buf->currln = curr_buf->curr_window_line = curr_buf->edit_margin = last_margin = 0;
while (1) {
if (curr_buf->redraw_everything || curr_buf->blockln >= 0) {