diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-06-13 08:42:57 +0000 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-06-13 08:42:57 +0000 |
commit | feac62ab0f5ae7b5109e0c9c50396ab8c8c65547 (patch) | |
tree | a91db6b7c3e550e5dcebb1d103ab74e2d933d803 /scintilla/src | |
parent | 7278465c3252b603b0dc1df2634de4107b23175f (diff) | |
download | notepad2-mod-feac62ab0f5ae7b5109e0c9c50396ab8c8c65547.zip notepad2-mod-feac62ab0f5ae7b5109e0c9c50396ab8c8c65547.tar.gz notepad2-mod-feac62ab0f5ae7b5109e0c9c50396ab8c8c65547.tar.bz2 |
update scintilla
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@541 28bd50df-7adb-d945-0439-6e466c6a13cc
Diffstat (limited to 'scintilla/src')
-rw-r--r-- | scintilla/src/Editor.cxx | 12 | ||||
-rw-r--r-- | scintilla/src/Editor.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index a641025..01ff8d3 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/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;
@@ -6212,7 +6213,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) ? 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
@@ -6225,7 +6226,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) ? selSubLine : selWholeLine;
+ selectionType = ((wrapState != eWrapNone) && (marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine;
LineSelection(newPos.Position(), lineAnchorPos, selectionType == selWholeLine);
}
@@ -8814,6 +8815,13 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_MARGINGETSTYLEOFFSET:
return vs.marginStyleOffset;
+ case SCI_SETMARGINOPTIONS:
+ marginOptions = wParam;
+ break;
+
+ case SCI_GETMARGINOPTIONS:
+ return marginOptions;
+
case SCI_MARGINSETTEXT:
pdoc->MarginSetText(wParam, CharPtrFromSPtr(lParam));
break;
diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h index 40f4d42..9f2a056 100644 --- a/scintilla/src/Editor.h +++ b/scintilla/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;
|