summaryrefslogtreecommitdiffstats
path: root/mbbsd/pfterm.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-15 11:52:36 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-15 11:52:36 +0800
commit0db25e13fc53548ab531de8a3cb8e0a2e6138c01 (patch)
tree4f3de494be615e4487601652bdafeb9085e9ccd2 /mbbsd/pfterm.c
parentaeebad5422aaaf5a3c2d430dad11809d2200ae5f (diff)
downloadpttbbs-0db25e13fc53548ab531de8a3cb8e0a2e6138c01.tar
pttbbs-0db25e13fc53548ab531de8a3cb8e0a2e6138c01.tar.gz
pttbbs-0db25e13fc53548ab531de8a3cb8e0a2e6138c01.tar.bz2
pttbbs-0db25e13fc53548ab531de8a3cb8e0a2e6138c01.tar.lz
pttbbs-0db25e13fc53548ab531de8a3cb8e0a2e6138c01.tar.xz
pttbbs-0db25e13fc53548ab531de8a3cb8e0a2e6138c01.tar.zst
pttbbs-0db25e13fc53548ab531de8a3cb8e0a2e6138c01.zip
pfterm: don't use bs to optimize when there's wrap concern.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4452 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/pfterm.c')
-rw-r--r--mbbsd/pfterm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c
index 27c27bff..caedce88 100644
--- a/mbbsd/pfterm.c
+++ b/mbbsd/pfterm.c
@@ -2080,7 +2080,8 @@ fterm_rawmove_opt(int y, int x)
#endif // !DBG_TEXT_FD
// x--: compare with FTMV_COST: ESC[m;nH costs 5-8 bytes
- if (x < ft.rx && y >= ft.ry && (adx+ady) < FTMV_COST)
+ // in order to prevent wrap, don't use bs when rx exceed boundary (ft.cols)
+ if (x < ft.rx && y >= ft.ry && (adx+ady) < FTMV_COST && ft.rx < ft.cols)
{
while (adx > 0)
fterm_rawc('\b'), adx--;