summaryrefslogtreecommitdiffstats
path: root/mbbsd/edit.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-09-11 15:16:49 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-09-11 15:16:49 +0800
commit3e667e8bf274223b49012acc74707b3651668fe3 (patch)
tree3a89166476349056e32a285c3054b9704f95d5f9 /mbbsd/edit.c
parentf190a09af728c61ad2118cf908c6d831e8a594cf (diff)
downloadpttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.gz
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.bz2
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.lz
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.xz
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.zst
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.zip
not only long screen, but also width screen
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@518 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r--mbbsd/edit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index c74dd2b2..5073d10a 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.18 2002/08/25 07:37:47 in2 Exp $ */
+/* $Id: edit.c,v 1.19 2002/09/11 07:16:49 kcwu Exp $ */
#include "bbs.h"
typedef struct textline_t {
struct textline_t *prev;
@@ -9,7 +9,6 @@ typedef struct textline_t {
#define KEEP_EDITING -2
#define BACKUP_LIMIT 100
-#define SCR_WIDTH 80
enum {
NOBODY, MANAGER, SYSOP
@@ -2263,7 +2262,10 @@ vedit(char *fpath, int saveheader, int *islocal)
}
}
}
- edit_margin = currpnt < SCR_WIDTH - 1 ? 0 : currpnt / 72 * 72;
+ if (currpnt < t_columns - 1)
+ edit_margin = 0;
+ else
+ edit_margin = currpnt / (t_columns - 8) * (t_columns - 8);
if (!redraw_everything) {
if (edit_margin != last_margin) {