Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 19 Oct 2023 14:31:30 UTC Commit: 5f992d07ec4d8319b8f55f72181cb6cb28afcfee https://github.com/geany/geany/commit/5f992d07ec4d8319b8f55f72181cb6cb28afcf...
Log Message: ----------- Merge pull request #3616 from b4n/asciidoc-crash
Fix crash opening an AsciiDoc document
Modified Paths: -------------- scintilla/lexilla/src/Lexilla.cxx scintilla/scintilla_changes.patch src/sciwrappers.c
Modified: scintilla/lexilla/src/Lexilla.cxx 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -172,6 +172,7 @@ static void AddGeanyLexers() catalogueLexilla.AddLexerModules({ &lmAbaqus, &lmAda, + &lmAsciidoc, &lmAsm, &lmAU3, &lmBash,
Modified: scintilla/scintilla_changes.patch 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -62,7 +62,7 @@ diff --git scintilla/lexilla/src/Lexilla.cxx scintilla/lexilla/src/Lexilla.cxx index cd4b23617..af4a73db4 100644 --- scintilla/lexilla/src/Lexilla.cxx +++ scintilla/lexilla/src/Lexilla.cxx -@@ -167,8 +167,67 @@ +@@ -167,8 +167,68 @@
CatalogueModules catalogueLexilla;
@@ -71,6 +71,7 @@ index cd4b23617..af4a73db4 100644 + catalogueLexilla.AddLexerModules({ + &lmAbaqus, + &lmAda, ++ &lmAsciidoc, + &lmAsm, + &lmAU3, + &lmBash,
Modified: src/sciwrappers.c 9 lines changed, 8 insertions(+), 1 deletions(-) =================================================================== @@ -701,7 +701,14 @@ void sci_set_lexer(ScintillaObject *sci, guint lexer_id) gint old = sci_get_lexer(sci);
/* TODO, LexerNameFromID() is already deprecated */ - ILexer5 *lexer = CreateLexer(LexerNameFromID(lexer_id)); + const char *lexer_name = LexerNameFromID(lexer_id); + if (! lexer_name) + { + g_warning("Failed to find lexer for ID %u", lexer_id); + return; + } + + ILexer5 *lexer = CreateLexer(lexer_name);
SSM(sci, SCI_SETILEXER, 0, (uintptr_t) lexer);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).