From 97fd82c36e60e09d8c0d624d01ef33b86705eae0 Mon Sep 17 00:00:00 2001
From: in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>
Date: Thu, 20 Jan 2005 02:12:55 +0000
Subject: revert to 2410. wrong output when reposting.

git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2415 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
---
 mbbsd/edit.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

(limited to 'mbbsd')

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) {
-- 
cgit v1.2.3