From c960863c145ab775cc745ccb6b526d5bffcdd11e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 4 Mar 2002 09:24:20 +0000 Subject: Fixed problem in wrapped mode where cursor up would not move because for a position that was at the end of a subline, and thus also the beginning of the next subline LocationFromPosition was favoring the end of subline. Treat a cached wrapping as invalid if the current wrap width is different to when the wrapping was done. --- src/Editor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Editor.h') diff --git a/src/Editor.h b/src/Editor.h index 8f47819b5..35aea3fc3 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -42,6 +42,7 @@ private: int lineNumber; bool inCache; public: + enum { wrapWidthInfinite = 0x7ffffff }; int maxLineLength; int numCharsInLine; enum validLevel { llInvalid, llPositions, llLines } validity; @@ -271,7 +272,6 @@ protected: // ScintillaBase subclass needs access to much of Editor // Wrapping support enum { eWrapNone, eWrapWord } wrapState; - enum { wrapWidthInfinite = 0x7ffffff }; int wrapWidth; int docLineLastWrapped; @@ -337,7 +337,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void PaintSelMargin(Surface *surface, PRectangle &rc); LineLayout *RetrieveLineLayout(int lineNumber); void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, - int width=wrapWidthInfinite); + int width=LineLayout::wrapWidthInfinite); void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout *ll, int subLine=0); void Paint(Surface *surfaceWindow, PRectangle rcArea); -- cgit v1.2.3