aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-10-30 15:06:22 +1100
committerNeil <nyamatongwe@gmail.com>2021-10-30 15:06:22 +1100
commit87151521974e24af545a877c3a004769c8533246 (patch)
tree7c472b5ba977c9df8e167ca1639457ce1d27e275 /src/ViewStyle.h
parentd0e3010d187e074f378f85b9cfcf68f944e1ab45 (diff)
downloadscintilla-mirror-87151521974e24af545a877c3a004769c8533246.tar.gz
Ensure all ViewStyle fields are initialized.
Diffstat (limited to 'src/ViewStyle.h')
-rw-r--r--src/ViewStyle.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ViewStyle.h b/src/ViewStyle.h
index f799c4943..ce6bd5642 100644
--- a/src/ViewStyle.h
+++ b/src/ViewStyle.h
@@ -47,40 +47,40 @@ inline std::optional<ColourRGBA> OptionalColour(Scintilla::uptr_t wParam, Scinti
struct SelectionAppearance {
// Whether to draw on base layer or over text
- Scintilla::Layer layer;
+ Scintilla::Layer layer = Layer::Base;
// Draw selection past line end characters up to right border
- bool eolFilled;
+ bool eolFilled = false;
};
struct CaretLineAppearance {
// Whether to draw on base layer or over text
- Scintilla::Layer layer;
+ Scintilla::Layer layer = Layer::Base;
// Also show when non-focused
- bool alwaysShow;
+ bool alwaysShow = false;
// highlight sub line instead of whole line
- bool subLine;
+ bool subLine = false;
// Non-0: draw a rectangle around line instead of filling line. Value is pixel width of frame
- int frame;
+ int frame = 0;
};
struct CaretAppearance {
// Line, block, over-strike bar ...
- Scintilla::CaretStyle style;
+ Scintilla::CaretStyle style = CaretStyle::Line;
// Width in pixels
- int width;
+ int width = 1;
};
struct WrapAppearance {
// No wrapping, word, character, whitespace appearance
- Scintilla::Wrap state;
+ Scintilla::Wrap state = Wrap::None;
// Show indication of wrap at line end, line start, or in margin
- Scintilla::WrapVisualFlag visualFlags;
+ Scintilla::WrapVisualFlag visualFlags = WrapVisualFlag::None;
// Show indication near margin or near text
- Scintilla::WrapVisualLocation visualFlagsLocation;
+ Scintilla::WrapVisualLocation visualFlagsLocation = WrapVisualLocation::Default;
// How much indentation to show wrapping
- int visualStartIndent;
- // WrapIndentMode::Fixed, _SAME, _INDENT, _DEEPINDENT
- Scintilla::WrapIndentMode indentMode;
+ int visualStartIndent = 0;
+ // WrapIndentMode::Fixed, Same, Indent, DeepIndent
+ Scintilla::WrapIndentMode indentMode = WrapIndentMode::Fixed;
};
struct EdgeProperties {
@@ -137,10 +137,10 @@ public:
/// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
int leftMarginWidth; ///< Spacing margin on left of text
int rightMarginWidth; ///< Spacing margin on right of text
- int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
- int maskDrawInText; ///< Mask for markers that always draw in text
+ int maskInLine = 0; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
+ int maskDrawInText = 0; ///< Mask for markers that always draw in text
std::vector<MarginStyle> ms;
- int fixedColumnWidth; ///< Total width of margins
+ int fixedColumnWidth = 0; ///< Total width of margins
bool marginInside; ///< true: margin included in text view, false: separate views
int textStart; ///< Starting x position of text within the view
int zoomLevel;