From 874c43657e38f1acbef41241c06fcd19cc81b1c2 Mon Sep 17 00:00:00 2001 From: yoshida_teruhisa Date: Mon, 20 Oct 2008 06:57:57 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=AB=E3=83=BC=E3=82=BD=E3=83=AB=E3=82=AD?= =?UTF-8?q?=E3=83=BC=E4=B8=8A=E3=81=A7=E3=83=AD=E3=82=B0=E3=82=92=E6=88=BB?= =?UTF-8?q?=E3=81=97=E3=81=99=E3=81=8E=E3=82=8B=E3=81=A8=E3=80=81=E4=B8=8B?= =?UTF-8?q?=E3=81=AB=E6=88=BB=E3=81=99=E3=81=BE=E3=81=A7=E3=81=AB=E6=99=82?= =?UTF-8?q?=E9=96=93=E3=81=8C=E3=81=8B=E3=81=8B=E3=81=A3=E3=81=A6=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=86=E5=95=8F=E9=A1=8C=E3=82=92=E3=81=AA=E3=82=93?= =?UTF-8?q?=E3=81=A8=E3=81=8B=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@12 7061adef-622a-194b-ae81-725974e89856 --- build/tools/sctools/common/src/text.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/tools/sctools/common/src/text.c b/build/tools/sctools/common/src/text.c index 0aeee17..5b3e893 100644 --- a/build/tools/sctools/common/src/text.c +++ b/build/tools/sctools/common/src/text.c @@ -174,7 +174,13 @@ int m_get_display_offset_x(TEXT_CTRL *tc) void m_set_display_offset_y(TEXT_CTRL *tc, int offset) { TEXT_BUF *tb = &(tc->text_buf); - if( ( offset >= 0 ) && (offset < tb->virtual_y) ) { + LINE_BUF *lb = tb->cur; + int line_count = 0; + while( lb != NULL ) { + line_count++; + lb = lb->prev; + } + if( ( offset >= 0 ) && (offset < line_count - Y_LINE_MAX ) ) { tb->display_offset_y = offset; } }