[Pinfo-devel] r188 - pinfo/branches/cxx/src
Nathanael Nerode
neroden-guest at costa.debian.org
Wed Sep 7 02:28:53 UTC 2005
Author: neroden-guest
Date: 2005-09-07 02:28:53 +0000 (Wed, 07 Sep 2005)
New Revision: 188
Modified:
pinfo/branches/cxx/src/mainfunction.cxx
Log:
Fix a signed/unsigned bug and an (old) off-by-one bug which affect display
when moving up and down. Whee.
Modified: pinfo/branches/cxx/src/mainfunction.cxx
===================================================================
--- pinfo/branches/cxx/src/mainfunction.cxx 2005-09-07 02:08:44 UTC (rev 187)
+++ pinfo/branches/cxx/src/mainfunction.cxx 2005-09-07 02:28:53 UTC (rev 188)
@@ -864,7 +864,7 @@
cursorchanged = 0;
if (cursor != (typeof(hyperobjects.size()))-1) {
/* if we must handle cursor... */
- if ((cursor > 0) &&(hyperobjects.size()))
+ if ((cursor > 0) && (hyperobjects.size()))
/* if we really must handle it ;) */
/*
* look if there's a cursor(link) pos available above,
@@ -887,7 +887,7 @@
}
if (!cursorchanged) /* if the cursor wasn't changed */
{
- if (pos > 2) /* lower the nodepos */
+ if (pos > 1) /* lower the nodepos */
pos--;
/* and scan for a hyperlink in the new line */
for (typeof(hyperobjects.size()) i = 0;
@@ -970,8 +970,7 @@
cursorchanged = 0; /* works similar to keys.up */
if (cursor < hyperobjects.size())
for (typeof(hyperobjects.size()) i = cursor + 1;
- i < hyperobjects.size(); i++)
- {
+ i < hyperobjects.size(); i++) {
if ((hyperobjects[i].line >= pos) &&
(hyperobjects[i].line < pos +(maxy - 2)))
{
@@ -985,7 +984,8 @@
}
if (!cursorchanged)
{
- if (pos <= my_message.size() -(maxy - 2))
+ /* FIXME: signed/unsigned issues */
+ if (pos <= (signed)my_message.size() -(maxy - 2))
pos++;
for (typeof(hyperobjects.size()) i = cursor + 1;
i < hyperobjects.size(); i++)
More information about the Pinfo-devel
mailing list