From 639c57612568acae901f268f45b4ac1c3e8cbff2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 3 Dec 2004 23:14:04 +0000 Subject: Patch from Regis Vaquette to allow compilation for Windows CE. --- src/Document.cxx | 4 ++-- src/Editor.cxx | 4 ++++ src/LexAVE.cxx | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index 76fa456cc..82f4c59bc 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -266,7 +266,7 @@ int Document::LenChar(int pos) { return 1; } } -#include + // Normalise a position so that it is not halfway through a two byte character. // This can occur in two situations - // When lines are terminated with \r\n pairs which should be treated as one character. @@ -280,7 +280,7 @@ int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { if (pos >= Length()) return Length(); - // assert pos > 0 && pos < Length() + // PLATFORM_ASSERT(pos > 0 && pos < Length()); if (checkLineEnd && IsCrLf(pos - 1)) { if (moveDir > 0) return pos + 1; diff --git a/src/Editor.cxx b/src/Editor.cxx index 399e65976..fbb0b694c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1065,11 +1065,15 @@ void Editor::ScrollTo(int line, bool moveThumb) { SetTopLine(topLineNew); ShowCaretAtCurrentPosition(); // Perform redraw rather than scroll if many lines would be redrawn anyway. +#ifndef UNDER_CE if (abs(linesToMove) <= 10) { ScrollText(linesToMove); } else { Redraw(); } +#else + Redraw(); +#endif if (moveThumb) { SetVerticalScrollPos(); } diff --git a/src/LexAVE.cxx b/src/LexAVE.cxx index 900aea317..96f43b39d 100644 --- a/src/LexAVE.cxx +++ b/src/LexAVE.cxx @@ -12,7 +12,6 @@ #include #include #include -#include #include "Platform.h" -- cgit v1.2.3