[geany/geany] 9b98d5: Update Scintilla to 3.5.6 pre-release
Colomban Wendling
git-noreply at xxxxx
Sun May 24 16:44:37 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 24 May 2015 16:44:37 UTC
Commit: 9b98d55defc918c951660f05e9ebdd30e9bfb184
https://github.com/geany/geany/commit/9b98d55defc918c951660f05e9ebdd30e9bfb184
Log Message:
-----------
Update Scintilla to 3.5.6 pre-release
Fixes broken auto-completion popup on Windows.
Modified Paths:
--------------
scintilla/gtk/PlatGTK.cxx
scintilla/gtk/ScintillaGTK.cxx
scintilla/lexers/LexCPP.cxx
scintilla/lexers/LexFortran.cxx
scintilla/lexers/LexVHDL.cxx
scintilla/lexers/LexVerilog.cxx
scintilla/src/Document.cxx
scintilla/src/EditModel.h
scintilla/src/Editor.h
scintilla/src/ScintillaBase.h
scintilla/version.txt
Modified: scintilla/gtk/PlatGTK.cxx
18 lines changed, 17 insertions(+), 1 deletions(-)
===================================================================
@@ -602,6 +602,7 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID
cairo_set_line_width(context, 1);
createdGC = true;
inited = true;
+ et = surfImpl->et;
}
void SurfaceImpl::PenColour(ColourDesired fore) {
@@ -1483,7 +1484,22 @@ ListBox *ListBox::Allocate() {
// SmallScroller, a GtkScrolledWindow that can shrink very small, as
// gtk_widget_set_size_request() cannot shrink widgets on GTK3
-typedef GtkScrolledWindow SmallScroller;
+typedef struct {
+ GtkScrolledWindow parent;
+ /* Workaround ABI issue with Windows GTK2 bundle and GCC > 3.
+ See http://lists.geany.org/pipermail/devel/2015-April/thread.html#9379
+
+ GtkScrolledWindow contains a bitfield, and GCC 3.4 and 4.8 don't agree
+ on the size of the structure (regardless of -mms-bitfields):
+ - GCC 3.4 has sizeof(GtkScrolledWindow)=88
+ - GCC 4.8 has sizeof(GtkScrolledWindow)=84
+ As Windows GTK2 bundle is built with GCC 3, it requires types derived
+ from GtkScrolledWindow to be at least 88 bytes, which means we need to
+ add some fake padding to fill in the extra 4 bytes.
+ There is however no other issue with the layout difference as we never
+ access any GtkScrolledWindow fields ourselves. */
+ int padding;
+} SmallScroller;
typedef GtkScrolledWindowClass SmallScrollerClass;
G_DEFINE_TYPE(SmallScroller, small_scroller, GTK_TYPE_SCROLLED_WINDOW)
Modified: scintilla/gtk/ScintillaGTK.cxx
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -657,7 +657,7 @@ class PreEditString {
gunichar *uniStr;
PangoScript pscript;
- PreEditString(GtkIMContext *im_context) {
+ explicit PreEditString(GtkIMContext *im_context) {
gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos);
validUTF8 = g_utf8_validate(str, strlen(str), NULL);
uniStr = g_utf8_to_ucs4_fast(str, strlen(str), &uniStrLen);
Modified: scintilla/lexers/LexCPP.cxx
6 lines changed, 2 insertions(+), 4 deletions(-)
===================================================================
@@ -1092,7 +1092,6 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle,
} else if (options.backQuotedStrings && sc.Match('`')) {
sc.SetState(SCE_C_STRINGRAW|activitySet);
rawStringTerminator = "`";
- sc.Forward();
} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
if (lastWordWasUUID) {
sc.SetState(SCE_C_UUID|activitySet);
@@ -1246,11 +1245,10 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle,
}
} else if (sc.Match("undef")) {
if (options.updatePreprocessor && !preproc.IsInactive()) {
- std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, true);
+ const std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, false);
std::vector<std::string> tokens = Tokenize(restOfLine);
- std::string key;
if (tokens.size() >= 1) {
- key = tokens[0];
+ const std::string key = tokens[0];
preprocessorDefinitions.erase(key);
ppDefineHistory.push_back(PPDefinition(lineCurrent, key, "", true));
definitionsChanged = true;
Modified: scintilla/lexers/LexFortran.cxx
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -260,6 +260,7 @@ static int classifyFoldPointFortran(const char* s, const char* prevWord, const c
lev = 0;
} else if (strcmp(s, "associate") == 0 || strcmp(s, "block") == 0
|| strcmp(s, "blockdata") == 0 || strcmp(s, "select") == 0
+ || strcmp(s, "selecttype") == 0 || strcmp(s, "selectcase") == 0
|| strcmp(s, "do") == 0 || strcmp(s, "enum") ==0
|| strcmp(s, "function") == 0 || strcmp(s, "interface") == 0
|| strcmp(s, "module") == 0 || strcmp(s, "program") == 0
Modified: scintilla/lexers/LexVHDL.cxx
7 lines changed, 4 insertions(+), 3 deletions(-)
===================================================================
@@ -216,7 +216,7 @@ static void FoldNoBoxVHDLDoc(
// don't check if the style for the keywords that I use to adjust the levels.
char words[] =
"architecture begin block case component else elsif end entity generate loop package process record then "
- "procedure function when";
+ "procedure function when units";
WordList keywords;
keywords.Set(words);
@@ -382,7 +382,8 @@ static void FoldNoBoxVHDLDoc(
strcmp(s, "package") ==0 ||
strcmp(s, "process") == 0 ||
strcmp(s, "record") == 0 ||
- strcmp(s, "then") == 0)
+ strcmp(s, "then") == 0 ||
+ strcmp(s, "units") == 0)
{
if (strcmp(prevWord, "end") != 0)
{
@@ -437,7 +438,7 @@ static void FoldNoBoxVHDLDoc(
(!IsCommentStyle(styleAtPos)) &&
(styleAtPos != SCE_VHDL_STRING) &&
!iswordchar(styler.SafeGetCharAt(pos-1)) &&
- styler.Match(pos, "is") &&
+ (chAtPos|' ')=='i' && (styler.SafeGetCharAt(pos+1)|' ')=='s' &&
!iswordchar(styler.SafeGetCharAt(pos+2)))
{
if (levelMinCurrentElse > levelNext) {
Modified: scintilla/lexers/LexVerilog.cxx
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -928,9 +928,10 @@ void SCI_METHOD LexerVerilog::Fold(unsigned int startPos, int length, int initSt
if (styler.Match(j, "case") ||
styler.Match(j, "casex") ||
styler.Match(j, "casez") ||
+ styler.Match(j, "covergroup") ||
styler.Match(j, "function") ||
styler.Match(j, "generate") ||
- styler.Match(j, "covergroup") ||
+ styler.Match(j, "interface") ||
styler.Match(j, "package") ||
styler.Match(j, "primitive") ||
styler.Match(j, "program") ||
@@ -962,6 +963,7 @@ void SCI_METHOD LexerVerilog::Fold(unsigned int startPos, int length, int initSt
styler.Match(j, "endfunction") ||
styler.Match(j, "endgenerate") ||
styler.Match(j, "endgroup") ||
+ styler.Match(j, "endinterface") ||
styler.Match(j, "endpackage") ||
styler.Match(j, "endprimitive") ||
styler.Match(j, "endprogram") ||
Modified: scintilla/src/Document.cxx
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -216,6 +216,8 @@ void Document::SetSavePoint() {
}
void Document::TentativeUndo() {
+ if (!TentativeActive())
+ return;
CheckReadOnly();
if (enteredModification == 0) {
enteredModification++;
Modified: scintilla/src/EditModel.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -25,7 +25,7 @@ class Caret {
class EditModel {
// Private so EditModel objects can not be copied
- EditModel(const EditModel &);
+ explicit EditModel(const EditModel &);
EditModel &operator=(const EditModel &);
public:
Modified: scintilla/src/Editor.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -153,7 +153,7 @@ struct WrapPending {
*/
class Editor : public EditModel, public DocWatcher {
// Private so Editor objects can not be copied
- Editor(const Editor &);
+ explicit Editor(const Editor &);
Editor &operator=(const Editor &);
protected: // ScintillaBase subclass needs access to much of Editor
Modified: scintilla/src/ScintillaBase.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -20,7 +20,7 @@ class LexState;
*/
class ScintillaBase : public Editor {
// Private so ScintillaBase objects can not be copied
- ScintillaBase(const ScintillaBase &);
+ explicit ScintillaBase(const ScintillaBase &);
ScintillaBase &operator=(const ScintillaBase &);
protected:
Modified: scintilla/version.txt
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1 +1 @@
-355
+356
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list