aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-12-20 02:29:36 +0000
committernyamatongwe <devnull@localhost>2001-12-20 02:29:36 +0000
commit0833380d77939a98c98a22060f8904efd393b86e (patch)
tree88d99ad316492def0de5e7a72da7916842bebb09 /src/Editor.cxx
parenteebc3a79d1d131f8a47703163ca83710d079fcf9 (diff)
downloadscintilla-mirror-0833380d77939a98c98a22060f8904efd393b86e.tar.gz
Added changeable attribute to styles that defaults to true. When it is
false, text in this style is read only.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx10
1 files changed, 8 insertions, 2 deletions
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();