Compare commits
4 Commits
56efe9c6a9
...
v1.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
ba86961ba5
|
|||
|
0cdb4989e5
|
|||
|
6de940fe96
|
|||
|
6bd8c1db2f
|
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required (VERSION 3.0)
|
||||
project (nncmpp VERSION 1.1.0 LANGUAGES C)
|
||||
project (nncmpp VERSION 1.1.1 LANGUAGES C)
|
||||
|
||||
# Moar warnings
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
||||
@@ -58,6 +58,8 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
|
||||
# Need this for SIGWINCH in FreeBSD and OpenBSD respectively;
|
||||
# our POSIX version macros make it undefined
|
||||
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
|
||||
elseif (APPLE)
|
||||
add_definitions (-D_DARWIN_C_SOURCE)
|
||||
endif ()
|
||||
|
||||
include (CheckFunctionExists)
|
||||
|
||||
7
NEWS
7
NEWS
@@ -1,3 +1,10 @@
|
||||
1.1.1 (2021-11-04)
|
||||
|
||||
* Terminal focus in/out events no longer ring the terminall bell
|
||||
|
||||
* Made mouse work in non-rxvt terminals with recent xterm terminfo
|
||||
|
||||
|
||||
1.1.0 (2021-10-21)
|
||||
|
||||
* Now requesting and processing terminal de/focus events,
|
||||
|
||||
10
nncmpp.c
10
nncmpp.c
@@ -78,9 +78,7 @@ enum
|
||||
#include <math.h>
|
||||
#include <locale.h>
|
||||
#include <termios.h>
|
||||
#ifndef TIOCGWINSZ
|
||||
#include <sys/ioctl.h>
|
||||
#endif // ! TIOCGWINSZ
|
||||
|
||||
// ncurses is notoriously retarded for input handling, we need something
|
||||
// different if only to receive mouse events reliably.
|
||||
@@ -2588,10 +2586,12 @@ app_init_bindings (const char *keymap,
|
||||
static bool
|
||||
app_process_termo_event (termo_key_t *event)
|
||||
{
|
||||
if (event->type == TERMO_TYPE_FOCUS)
|
||||
bool handled = false;
|
||||
if ((handled = event->type == TERMO_TYPE_FOCUS))
|
||||
{
|
||||
g.focused = !!event->code.focused;
|
||||
app_invalidate ();
|
||||
// Senseless fall-through
|
||||
}
|
||||
|
||||
struct binding dummy = { *event, 0, 0 }, *binding;
|
||||
@@ -2601,7 +2601,7 @@ app_process_termo_event (termo_key_t *event)
|
||||
sizeof *binding, app_binding_cmp)))
|
||||
return app_editor_process_action (binding->action);
|
||||
if (event->type != TERMO_TYPE_KEY || event->modifiers != 0)
|
||||
return false;
|
||||
return handled;
|
||||
|
||||
line_editor_insert (&g.editor, event->code.codepoint);
|
||||
app_invalidate ();
|
||||
@@ -2620,7 +2620,7 @@ app_process_termo_event (termo_key_t *event)
|
||||
if (app_goto_tab ((n == 0 ? 10 : n) - 1))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return handled;
|
||||
}
|
||||
|
||||
// --- Current tab -------------------------------------------------------------
|
||||
|
||||
2
termo
2
termo
Submodule termo updated: 94a77a10d8...8265f075b1
Reference in New Issue
Block a user