1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
$NetBSD$
Add scroll-top action.
--- charproc.c.orig 2018-03-14 06:04:22.000000000 +0000
+++ charproc.c
@@ -259,7 +259,8 @@ static XtActionsRec actionsList[] = {
{ "quit", HandleQuit },
{ "redraw", HandleRedraw },
{ "scroll-back", HandleScrollBack },
{ "scroll-forw", HandleScrollForward },
+ { "scroll-top", HandleScrollTop },
{ "secure", HandleSecure },
{ "select-cursor-end", HandleKeyboardSelectEnd },
{ "select-cursor-extend", HandleKeyboardSelectExtend },
--- scrollbar.c.orig 2021-07-16 07:44:23.160211555 +0000
+++ scrollbar.c
@@ -757,6 +757,20 @@ HandleScrollBack(
}
}
+/*ARGSUSED*/
+void
+HandleScrollTop(
+ Widget xw,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *nparams)
+{
+ float topPercent;
+
+ topPercent = 0;
+ ScrollTextTo(xw, NULL, &topPercent);
+}
+
#if OPT_SCROLL_LOCK
#define SCROLL_LOCK_LED 3
--- xterm.h.orig 2019-07-11 08:08:47.000000000 +0000
+++ xterm.h
@@ -1346,7 +1346,8 @@ extern void deleteScrollback (TScreen *
/* scrollbar.c */
extern void DoResizeScreen (XtermWidget /* xw */);
extern void HandleScrollBack PROTO_XT_ACTIONS_ARGS;
extern void HandleScrollForward PROTO_XT_ACTIONS_ARGS;
+extern void HandleScrollTop PROTO_XT_ACTIONS_ARGS;
extern void ResizeScrollBar (XtermWidget /* xw */);
extern void ScrollBarDrawThumb (Widget /* scrollWidget */);
extern void ScrollBarOff (XtermWidget /* xw */);
|