From 4eefbc39519d93c5c2857ccd61299909d021c640 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 20 Dec 2001 02:29:36 +0000 Subject: Added changeable attribute to styles that defaults to true. When it is false, text in this style is read only. --- src/Editor.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 1f7588a28..439e1388d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -549,11 +549,11 @@ int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { int mask = pdoc->stylingBitsMask; if (moveDir > 0) { while ((pos < pdoc->Length()) && - (!vs.styles[pdoc->StyleAt(pos - 1) & mask].visible)) + (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) pos++; } else { while ((pos > 0) && - (!vs.styles[pdoc->StyleAt(pos - 1) & mask].visible)) + (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) pos--; } return pos; @@ -4542,6 +4542,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { InvalidateStyleRedraw(); } break; + case SCI_STYLESETCHANGEABLE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].changeable = lParam; + InvalidateStyleRedraw(); + } + break; case SCI_STYLERESETDEFAULT: vs.ResetDefaultStyle(); -- cgit v1.2.3