aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx16
-rw-r--r--src/ViewStyle.cxx6
-rw-r--r--src/ViewStyle.h2
3 files changed, 24 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index c4c3a8179..0a619d9a6 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7610,6 +7610,22 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETCHARACTERPOINTER:
return reinterpret_cast<sptr_t>(pdoc->BufferPointer());
+ case SCI_SETEXTRAASCENT:
+ vs.extraAscent = wParam;
+ InvalidateStyleRedraw();
+ break;
+
+ case SCI_GETEXTRAASCENT:
+ return vs.extraAscent;
+
+ case SCI_SETEXTRADESCENT:
+ vs.extraDescent = wParam;
+ InvalidateStyleRedraw();
+ break;
+
+ case SCI_GETEXTRADESCENT:
+ return vs.extraDescent;
+
default:
return DefWndProc(iMessage, wParam, lParam);
}
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 811f79a6d..686862a2d 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -139,6 +139,8 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
viewEOL = source.viewEOL;
showMarkedLines = source.showMarkedLines;
extraFontFlag = source.extraFontFlag;
+ extraAscent = source.extraAscent;
+ extraDescent = source.extraDescent;
}
ViewStyle::~ViewStyle() {
@@ -233,6 +235,8 @@ void ViewStyle::Init(size_t stylesSize_) {
viewEOL = false;
showMarkedLines = true;
extraFontFlag = false;
+ extraAscent = 0;
+ extraDescent = 0;
}
void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {
@@ -284,6 +288,8 @@ void ViewStyle::Refresh(Surface &surface) {
someStylesProtected = true;
}
}
+ maxAscent += extraAscent;
+ maxDescent += extraDescent;
lineHeight = maxAscent + maxDescent;
aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth;
diff --git a/src/ViewStyle.h b/src/ViewStyle.h
index 2f2d52461..3f8b856b9 100644
--- a/src/ViewStyle.h
+++ b/src/ViewStyle.h
@@ -102,6 +102,8 @@ public:
int caretWidth;
bool someStylesProtected;
bool extraFontFlag;
+ int extraAscent;
+ int extraDescent;
ViewStyle();
ViewStyle(const ViewStyle &source);