aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-08-14 11:16:20 +0000
committernyamatongwe <unknown>2003-08-14 11:16:20 +0000
commit61250c1cd4e9acf949fd053c7cdf4a490c9bf0e3 (patch)
treea93e176f8d418a860c114b6643b8b42e8e58790a /src
parent5bc8714b95e9e8ced35988e7fcd6c7c1ffab5d77 (diff)
downloadscintilla-mirror-61250c1cd4e9acf949fd053c7cdf4a490c9bf0e3.tar.gz
Fixed bug where characters >= 128 were being displayed as
down arrows.
Diffstat (limited to 'src')
-rw-r--r--src/CallTip.cxx8
1 files changed, 6 insertions, 2 deletions
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<len;i++) {
- if (s[i] <= '\002') {
+ if (IsArrowCharacter(s[i])) {
if (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<maxEnd; seg++) {
int endSeg = ends[seg];
if (endSeg > startSeg) {
- if (s[startSeg] <= '\002') {
+ if (IsArrowCharacter(s[startSeg])) {
xEnd = x + widthArrow;
offsetMain = xEnd;
if (draw) {