aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--INSTALL2
-rw-r--r--TODO3
-rw-r--r--src/interface-curses/interface.c20
3 files changed, 13 insertions, 12 deletions
diff --git a/INSTALL b/INSTALL
index b5aff56..2d3eb36 100644
--- a/INSTALL
+++ b/INSTALL
@@ -26,7 +26,7 @@ SciTECO Build and Runtime Dependencies
I recommend ncurses 6.0 or later.
* NetBSD Curses (https://github.com/sabotage-linux/netbsd-curses).
This is the default on NetBSD.
- * PDCursesMod v4.3.4 or later (https://github.com/Bill-Gray/PDCursesMod.git).
+ * PDCursesMod v4.5.1 or later (https://github.com/Bill-Gray/PDCursesMod.git).
This is the recommended flavor of PDCurses to use.
* PDCurses/EMCurses (https://github.com/rhaberkorn/emcurses).
* PDCurses/XCurses (http://pdcurses.sourceforge.net/).
diff --git a/TODO b/TODO
index ab0702e..ceb8524 100644
--- a/TODO
+++ b/TODO
@@ -3,9 +3,6 @@ Tasks:
* VEDIT and PMATE for MS-DOS
* Update to Scinterm 5.5.
Perhaps we can make use of the arbitrary RGB color feauture?
- * PDCurses 4.5.1 is in MSYS.
- Perhaps some workarounds can be removed now (8cc704b897f33d6150156c77202a29222b9ee667).
- https://github.com/Bill-Gray/PDCursesMod/issues/330
Known Bugs:
* Gtk: The control characters in tutorial.woman are still styled with
diff --git a/src/interface-curses/interface.c b/src/interface-curses/interface.c
index b653818..565001f 100644
--- a/src/interface-curses/interface.c
+++ b/src/interface-curses/interface.c
@@ -1915,15 +1915,23 @@ static gint
teco_interface_blocking_getch(void)
{
#if NCURSES_MOUSE_VERSION >= 2
+#ifdef __PDCURSES__
+ /*
+ * On PDCurses it's crucial NOT to mask for BUTTONX_CLICKED.
+ * Scroll events are not reported without the non-standard MOUSE_WHEEL_SCROLL.
+ */
+ static const mmask_t mmask = BUTTON_EVENT(PRESSED) | BUTTON_EVENT(RELEASED) |
+ MOUSE_WHEEL_SCROLL;
+#else
/*
- * FIXME: REPORT_MOUSE_POSITION is necessary at least on
+ * REPORT_MOUSE_POSITION is necessary at least on
* ncurses, so that BUTTONX_RELEASED events are reported.
* It does NOT report every cursor movement, though.
- * What does PDCurses do?
*/
- mousemask(teco_ed & TECO_ED_MOUSEKEY
- ? ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION : 0, NULL);
+ static const mmask_t mmask = ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION;
#endif
+ mousemask(teco_ed & TECO_ED_MOUSEKEY ? mmask : 0, NULL);
+#endif /* NCURSES_MOUSE_VERSION >= 2 */
/* no special <CTRL/C> handling */
raw();
@@ -1977,10 +1985,6 @@ teco_interface_event_loop_iter(void)
return;
#ifdef KEY_RESIZE
case KEY_RESIZE:
-#ifdef __PDCURSES__
- /* NOTE: No longer necessary since PDCursesMod v4.3.3. */
- resize_term(0, 0);
-#endif
teco_interface_resize_all_windows();
break;
#endif