aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/textadept.c
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-08-20 23:32:53 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-08-20 23:32:53 -0400
commit3dbcac857858af49883d782f7d39f5394d8ea1f0 (patch)
treeef35f34f24ccbb9ef51a3ab19d77afbbb067135a /src/textadept.c
parent1b35a0de0f05d2db27fa3af211e3098c8a20caec (diff)
Fixed keypress handler regression when compiling with modern MinGW-w64.
For some reason, modern MinGW-w64 GCC always returns boolean true unless compiling with debug symbols. Most typing into Scintilla widgets was not working at all. This does not occur on older versions of MinGW GCC.
Diffstat (limited to 'src/textadept.c')
-rw-r--r--src/textadept.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/textadept.c b/src/textadept.c
index 2d9c06a8..aee6d173 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1899,8 +1899,11 @@ static void notified(Scintilla *view, int _, SCNotification *n, void *L) {
}
#if GTK
-/** Signal for a Scintilla keypress. */
-static bool keypress(GtkWidget *_, GdkEventKey *event, void *L) {
+/**
+ * Signal for a Scintilla keypress.
+ * Note: cannot use bool return value due to modern i686-w64-mingw32-gcc issue.
+ */
+static int keypress(GtkWidget *_, GdkEventKey *event, void *L) {
return emit(
L, "keypress", LUA_TNUMBER, event->keyval,
LUA_TBOOLEAN, event->state & GDK_SHIFT_MASK,