From a0d70703067f16bae80b6666156ee3ff66ff46f5 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 14 Aug 2003 11:16:20 +0000 Subject: Fixed bug where characters >= 128 were being displayed as down arrows. --- src/CallTip.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 314f9bfa7..2f299afff 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -48,6 +48,10 @@ void CallTip::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(colourLight, want); } +static bool IsArrowCharacter(char ch) { + return (ch >= 0) && (ch <= '\002'); +} + void CallTip::DrawChunk(Surface *surface, int &x, const char *s, int posStart, int posEnd, int ytext, PRectangle rcClient, bool highlight, bool draw) { @@ -56,7 +60,7 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s, int maxEnd = 0; int ends[10]; for (int i=0;i 0) ends[maxEnd++] = i; ends[maxEnd++] = i+1; @@ -68,7 +72,7 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s, for (int seg = 0; seg startSeg) { - if (s[startSeg] <= '\002') { + if (IsArrowCharacter(s[startSeg])) { xEnd = x + widthArrow; offsetMain = xEnd; if (draw) { -- cgit v1.2.3