aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx9
-rw-r--r--src/Editor.h1
-rw-r--r--src/ViewStyle.cxx2
-rw-r--r--src/ViewStyle.h1
4 files changed, 6 insertions, 7 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 79c9f6c0f..160f94d7c 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -159,6 +159,7 @@ Editor::Editor() {
verticalScrollBarVisible = true;
endAtLastLine = true;
caretSticky = SC_CARETSTICKY_OFF;
+ marginOptions = SC_MARGINOPTION_NONE;
multipleSelection = false;
additionalSelectionTyping = false;
multiPasteMode = SC_MULTIPASTE_ONCE;
@@ -6195,7 +6196,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b
if (!shift) {
// Single click in margin: select whole line or only subline if word wrap is enabled
lineAnchorPos = newPos.Position();
- selectionType = ((wrapState != eWrapNone) && (vs.marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine;
+ selectionType = ((wrapState != eWrapNone) && (marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine;
LineSelection(lineAnchorPos, lineAnchorPos, selectionType == selWholeLine);
} else {
// Single shift+click in margin: select from line anchor to clicked line
@@ -6208,7 +6209,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b
// Otherwise, if there's a non empty selection, reset selection type only if it differs from selSubLine and selWholeLine.
// This ensures that we continue selecting in the same selection mode.
if (sel.Empty() || (selectionType != selSubLine && selectionType != selWholeLine))
- selectionType = ((wrapState != eWrapNone) && (vs.marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine;
+ selectionType = ((wrapState != eWrapNone) && (marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine;
LineSelection(newPos.Position(), lineAnchorPos, selectionType == selWholeLine);
}
@@ -8798,11 +8799,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return vs.marginStyleOffset;
case SCI_SETMARGINOPTIONS:
- vs.marginOptions = wParam;
+ marginOptions = wParam;
break;
case SCI_GETMARGINOPTIONS:
- return vs.marginOptions;
+ return marginOptions;
case SCI_MARGINSETTEXT:
pdoc->MarginSetText(wParam, CharPtrFromSPtr(lParam));
diff --git a/src/Editor.h b/src/Editor.h
index ca01bf6d3..48f4d1ccd 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -163,6 +163,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool verticalScrollBarVisible;
bool endAtLastLine;
int caretSticky;
+ int marginOptions;
bool multipleSelection;
bool additionalSelectionTyping;
int multiPasteMode;
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 78b13b8da..03a2fb42f 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -187,7 +187,6 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
someStylesForceCase = false;
leftMarginWidth = source.leftMarginWidth;
rightMarginWidth = source.rightMarginWidth;
- marginOptions = source.marginOptions;
for (int i=0; i < margins; i++) {
ms[i] = source.ms[i];
}
@@ -288,7 +287,6 @@ void ViewStyle::Init(size_t stylesSize_) {
leftMarginWidth = 1;
rightMarginWidth = 1;
- marginOptions = SC_MARGINOPTION_NONE;
ms[0].style = SC_MARGIN_NUMBER;
ms[0].width = 0;
ms[0].mask = 0;
diff --git a/src/ViewStyle.h b/src/ViewStyle.h
index f62529adf..b038a9b54 100644
--- a/src/ViewStyle.h
+++ b/src/ViewStyle.h
@@ -102,7 +102,6 @@ public:
enum { margins=5 };
int leftMarginWidth; ///< Spacing margin on left of text
int rightMarginWidth; ///< Spacing margin on left of text
- int marginOptions;
bool symbolMargin;
int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
MarginStyle ms[margins];