void-packages/srcpkgs/codelite/patches/92ed90e07.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

48 lines
1.5 KiB
Diff

From 92ed90e07774dfc8556bee02c66120eed4938a40 Mon Sep 17 00:00:00 2001
From: dghart <dghart david@4Pane.co.uk>
Date: Wed, 19 Jun 2019 11:23:38 +0100
Subject: [PATCH] Compilation fix for wx3.0 gtk+3 builds
---
codelite_terminal/TextView.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/codelite_terminal/TextView.cpp b/codelite_terminal/TextView.cpp
index 83d2e260c..5966f9972 100644
--- a/codelite_terminal/TextView.cpp
+++ b/codelite_terminal/TextView.cpp
@@ -12,7 +12,11 @@ TextView::TextView(wxWindow* parent, wxWindowID winid)
m_ctrl->SetCaretStyle(wxSTC_CARETSTYLE_BLOCK);
m_ctrl->SetYCaretPolicy(wxSTC_CARET_STRICT | wxSTC_CARET_SLOP, 4);
m_ctrl->SetLexer(wxSTC_LEX_CONTAINER);
+#if wxCHECK_VERSION(3, 1, 1)
m_ctrl->StartStyling(0);
+#else
+ m_ctrl->StartStyling(0, 0x1f);
+#endif
m_ctrl->SetWrapMode(wxSTC_WRAP_CHAR);
#else
m_ctrl = new TextCtrl_t(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize,
@@ -61,7 +65,11 @@ void TextView::SetDefaultStyle(const wxTextAttr& attr)
{
#if USE_STC
m_defaultAttr = attr;
+#if wxCHECK_VERSION(3, 1, 1)
m_ctrl->StartStyling(m_ctrl->GetLastPosition());
+#else
+ m_ctrl->StartStyling(m_ctrl->GetLastPosition(), 0x1f);
+#endif
#else
m_ctrl->SetDefaultStyle(attr);
#endif
@@ -210,6 +218,10 @@ void TextView::Clear()
#if USE_STC
m_ctrl->ClearAll();
m_ctrl->ClearDocumentStyle();
+#if wxCHECK_VERSION(3, 1, 1)
m_ctrl->StartStyling(0);
+#else
+ m_ctrl->StartStyling(0, 0x1f);
+#endif
#endif
}