diff options
author | XhmikosR <xhmikosr@gmail.com> | 2016-12-04 18:20:31 +0200 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2016-12-04 18:24:16 +0200 |
commit | 4b604e07bbbf07d3d5ad04e65f0cef56959e3807 (patch) | |
tree | 44a5924e0ef508167b285c8016e6394992153817 /scintilla/src/ViewStyle.cxx | |
parent | a3ee58329361322b321ee2a708e793b1a5e5729a (diff) | |
download | notepad2-mod-master.zip notepad2-mod-master.tar.gz notepad2-mod-master.tar.bz2 |
Update Scintilla to v3.7.1.HEADorigin/masterorigin/HEADmaster
Diffstat (limited to 'scintilla/src/ViewStyle.cxx')
-rw-r--r-- | scintilla/src/ViewStyle.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scintilla/src/ViewStyle.cxx b/scintilla/src/ViewStyle.cxx index 0f026c4..292c888 100644 --- a/scintilla/src/ViewStyle.cxx +++ b/scintilla/src/ViewStyle.cxx @@ -153,6 +153,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) { textStart = source.textStart;
zoomLevel = source.zoomLevel;
viewWhitespace = source.viewWhitespace;
+ tabDrawMode = source.tabDrawMode;
whitespaceSize = source.whitespaceSize;
viewIndentationGuides = source.viewIndentationGuides;
viewEOL = source.viewEOL;
@@ -293,6 +294,7 @@ void ViewStyle::Init(size_t stylesSize_) { textStart = marginInside ? fixedColumnWidth : leftMarginWidth;
zoomLevel = 0;
viewWhitespace = wsInvisible;
+ tabDrawMode = tdLongArrow;
whitespaceSize = 1;
viewIndentationGuides = ivNone;
viewEOL = false;
@@ -445,6 +447,17 @@ int ViewStyle::ExternalMarginWidth() const { return marginInside ? 0 : fixedColumnWidth;
}
+int ViewStyle::MarginFromLocation(Point pt) const {
+ int margin = -1;
+ int x = textStart - fixedColumnWidth;
+ for (size_t i = 0; i < ms.size(); i++) {
+ if ((pt.x >= x) && (pt.x < x + ms[i].width))
+ margin = static_cast<int>(i);
+ x += ms[i].width;
+ }
+ return margin;
+}
+
bool ViewStyle::ValidStyle(size_t styleIndex) const {
return styleIndex < styles.size();
}
|