Fossil SCM

Add documentation, thanks @ams for help with wording. An alternative (but not less redundant) approach may be to create a new documentation-only web page to list available keyboard shortcuts for all pages (there's also the global ESC shortcut to close the Hamburger Menu) linked to from the individual command help screens.

florian 2022-09-30 11:16 diff-keyboard-navigation
Commit 8773bb88a48ced06d2fa10daaa887b63e27bc3b01b2be9a21c116568e75011b6
2 files changed +1 -5 +19
--- src/fossil.diff.js
+++ src/fossil.diff.js
@@ -31,18 +31,14 @@
3131
});
3232
3333
/*
3434
** Diff keyboard navigation shortcuts:
3535
**
36
-** SHIFT+I - Show all diffs.
37
-** I - Hide all diffs.
38
-** P - Show only next diff, hide all others.
39
-** O - Show only previous diff, hide all others.
36
+** ### NOTE: The keyboard shortcuts are listed in the /vdiff help screen. ###
4037
**
4138
** Ideas and TODOs:
4239
**
43
-** o Documentation.
4440
** o The `timeline-keyboard-navigation' branch removes the unload handler from
4541
** pages containing timeline snippets, so it's no longer necessary to reset
4642
** the diff toggles on back/forward navigation in case the mentioned branch
4743
** is merged with `diff-keyboard-navigation'.
4844
** o The `diff-toggle' class was renamed to `toggle-diff' in my private Fossil
4945
--- src/fossil.diff.js
+++ src/fossil.diff.js
@@ -31,18 +31,14 @@
31 });
32
33 /*
34 ** Diff keyboard navigation shortcuts:
35 **
36 ** SHIFT+I - Show all diffs.
37 ** I - Hide all diffs.
38 ** P - Show only next diff, hide all others.
39 ** O - Show only previous diff, hide all others.
40 **
41 ** Ideas and TODOs:
42 **
43 ** o Documentation.
44 ** o The `timeline-keyboard-navigation' branch removes the unload handler from
45 ** pages containing timeline snippets, so it's no longer necessary to reset
46 ** the diff toggles on back/forward navigation in case the mentioned branch
47 ** is merged with `diff-keyboard-navigation'.
48 ** o The `diff-toggle' class was renamed to `toggle-diff' in my private Fossil
49
--- src/fossil.diff.js
+++ src/fossil.diff.js
@@ -31,18 +31,14 @@
31 });
32
33 /*
34 ** Diff keyboard navigation shortcuts:
35 **
36 ** ### NOTE: The keyboard shortcuts are listed in the /vdiff help screen. ###
 
 
 
37 **
38 ** Ideas and TODOs:
39 **
 
40 ** o The `timeline-keyboard-navigation' branch removes the unload handler from
41 ** pages containing timeline snippets, so it's no longer necessary to reset
42 ** the diff toggles on back/forward navigation in case the mentioned branch
43 ** is merged with `diff-keyboard-navigation'.
44 ** o The `diff-toggle' class was renamed to `toggle-diff' in my private Fossil
45
+19
--- src/info.c
+++ src/info.c
@@ -603,10 +603,13 @@
603603
** same information is shown on the /info page if the name query
604604
** parameter to /info describes a check-in.
605605
**
606606
** The ARTIFACTID can be a unique prefix for the HASH of the check-in,
607607
** or a tag or branch name that identifies the check-in.
608
+**
609
+** See the help screen for the /vdiff web page for a list of available
610
+** keyboard shortcuts.
608611
*/
609612
void ci_page(void){
610613
Stmt q1, q2, q3;
611614
int rid;
612615
int isLeaf;
@@ -1167,10 +1170,20 @@
11671170
** nohdr omit the description at the top of the page
11681171
** nc omit branch coloration from the header graph
11691172
** inv "Invert". Exchange the roles of from= and to=
11701173
**
11711174
** Show all differences between two check-ins.
1175
+**
1176
+** Keyboard navigation shortcuts:
1177
+**
1178
+** I Show all file changes.
1179
+** i Hide all file changes.
1180
+** p Show only next file change.
1181
+** o Show only previous file change.
1182
+**
1183
+** The keyboard shortcuts also apply to /vinfo, /ci and /fdiff pages,
1184
+** and to /info pages describing check-in information.
11721185
*/
11731186
void vdiff_page(void){
11741187
int ridFrom, ridTo;
11751188
int diffType = 0; /* 0: none, 1: unified, 2: side-by-side */
11761189
Manifest *pFrom, *pTo;
@@ -1714,10 +1727,13 @@
17141727
** patch Use the patch diff format
17151728
** regex=REGEX Only show differences that match REGEX
17161729
** sbs=BOOLEAN Turn side-by-side diffs on and off (default: on)
17171730
** verbose=BOOLEAN Show more detail when describing artifacts
17181731
** w=BOOLEAN Ignore whitespace
1732
+**
1733
+** See the help screen for the /vdiff web page for a list of available
1734
+** keyboard shortcuts.
17191735
*/
17201736
void diff_page(void){
17211737
int v1, v2;
17221738
int isPatch = P("patch")!=0;
17231739
int diffType; /* 0: none, 1: unified, 2: side-by-side */
@@ -2844,10 +2860,13 @@
28442860
** a timestamp, a tag name, etc.
28452861
**
28462862
** Because NAME can match so many different things (commit artifacts,
28472863
** wiki pages, ticket comments, forum posts...) the format of the output
28482864
** page depends on the type of artifact that NAME matches.
2865
+**
2866
+** See the help screen for the /vdiff web page for a list of available
2867
+** keyboard shortcuts (if the NAME argument refers to a check-in).
28492868
*/
28502869
void info_page(void){
28512870
const char *zName;
28522871
Blob uuid;
28532872
int rid;
28542873
--- src/info.c
+++ src/info.c
@@ -603,10 +603,13 @@
603 ** same information is shown on the /info page if the name query
604 ** parameter to /info describes a check-in.
605 **
606 ** The ARTIFACTID can be a unique prefix for the HASH of the check-in,
607 ** or a tag or branch name that identifies the check-in.
 
 
 
608 */
609 void ci_page(void){
610 Stmt q1, q2, q3;
611 int rid;
612 int isLeaf;
@@ -1167,10 +1170,20 @@
1167 ** nohdr omit the description at the top of the page
1168 ** nc omit branch coloration from the header graph
1169 ** inv "Invert". Exchange the roles of from= and to=
1170 **
1171 ** Show all differences between two check-ins.
 
 
 
 
 
 
 
 
 
 
1172 */
1173 void vdiff_page(void){
1174 int ridFrom, ridTo;
1175 int diffType = 0; /* 0: none, 1: unified, 2: side-by-side */
1176 Manifest *pFrom, *pTo;
@@ -1714,10 +1727,13 @@
1714 ** patch Use the patch diff format
1715 ** regex=REGEX Only show differences that match REGEX
1716 ** sbs=BOOLEAN Turn side-by-side diffs on and off (default: on)
1717 ** verbose=BOOLEAN Show more detail when describing artifacts
1718 ** w=BOOLEAN Ignore whitespace
 
 
 
1719 */
1720 void diff_page(void){
1721 int v1, v2;
1722 int isPatch = P("patch")!=0;
1723 int diffType; /* 0: none, 1: unified, 2: side-by-side */
@@ -2844,10 +2860,13 @@
2844 ** a timestamp, a tag name, etc.
2845 **
2846 ** Because NAME can match so many different things (commit artifacts,
2847 ** wiki pages, ticket comments, forum posts...) the format of the output
2848 ** page depends on the type of artifact that NAME matches.
 
 
 
2849 */
2850 void info_page(void){
2851 const char *zName;
2852 Blob uuid;
2853 int rid;
2854
--- src/info.c
+++ src/info.c
@@ -603,10 +603,13 @@
603 ** same information is shown on the /info page if the name query
604 ** parameter to /info describes a check-in.
605 **
606 ** The ARTIFACTID can be a unique prefix for the HASH of the check-in,
607 ** or a tag or branch name that identifies the check-in.
608 **
609 ** See the help screen for the /vdiff web page for a list of available
610 ** keyboard shortcuts.
611 */
612 void ci_page(void){
613 Stmt q1, q2, q3;
614 int rid;
615 int isLeaf;
@@ -1167,10 +1170,20 @@
1170 ** nohdr omit the description at the top of the page
1171 ** nc omit branch coloration from the header graph
1172 ** inv "Invert". Exchange the roles of from= and to=
1173 **
1174 ** Show all differences between two check-ins.
1175 **
1176 ** Keyboard navigation shortcuts:
1177 **
1178 ** I Show all file changes.
1179 ** i Hide all file changes.
1180 ** p Show only next file change.
1181 ** o Show only previous file change.
1182 **
1183 ** The keyboard shortcuts also apply to /vinfo, /ci and /fdiff pages,
1184 ** and to /info pages describing check-in information.
1185 */
1186 void vdiff_page(void){
1187 int ridFrom, ridTo;
1188 int diffType = 0; /* 0: none, 1: unified, 2: side-by-side */
1189 Manifest *pFrom, *pTo;
@@ -1714,10 +1727,13 @@
1727 ** patch Use the patch diff format
1728 ** regex=REGEX Only show differences that match REGEX
1729 ** sbs=BOOLEAN Turn side-by-side diffs on and off (default: on)
1730 ** verbose=BOOLEAN Show more detail when describing artifacts
1731 ** w=BOOLEAN Ignore whitespace
1732 **
1733 ** See the help screen for the /vdiff web page for a list of available
1734 ** keyboard shortcuts.
1735 */
1736 void diff_page(void){
1737 int v1, v2;
1738 int isPatch = P("patch")!=0;
1739 int diffType; /* 0: none, 1: unified, 2: side-by-side */
@@ -2844,10 +2860,13 @@
2860 ** a timestamp, a tag name, etc.
2861 **
2862 ** Because NAME can match so many different things (commit artifacts,
2863 ** wiki pages, ticket comments, forum posts...) the format of the output
2864 ** page depends on the type of artifact that NAME matches.
2865 **
2866 ** See the help screen for the /vdiff web page for a list of available
2867 ** keyboard shortcuts (if the NAME argument refers to a check-in).
2868 */
2869 void info_page(void){
2870 const char *zName;
2871 Blob uuid;
2872 int rid;
2873

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button