Fossil SCM

Do not show the search entry boxes on the /help page if help-search is disabled.

drh 2025-02-26 12:55 help-search
Commit 4efa569a75ded316cc6c44b5d5c731e95c47237ebfea726df1e1d769bd251c93
1 file changed +4 -2
+4 -2
--- src/dispatch.c
+++ src/dispatch.c
@@ -832,11 +832,13 @@
832832
833833
style_set_current_feature("tkt");
834834
style_header("Help: %s", zCmd);
835835
836836
style_submenu_element("Command-List", "%R/help");
837
- style_submenu_element("Search","%R/search?y=h");
837
+ if( search_restrict(SRCH_HELP)!=0 ){
838
+ style_submenu_element("Search","%R/search?y=h");
839
+ }
838840
rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
839841
if( *zCmd=='/' ){
840842
/* Some of the webpages require query parameters in order to work.
841843
** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
842844
@ <h1>The "%h(zCmd)" page:</h1>
@@ -874,11 +876,11 @@
874876
int i;
875877
const char *zWidth = "28ex";
876878
unsigned char occHelp[FOSSIL_MX_CMDIDX] = {0}; /* Help str occurrences */
877879
int bktHelp[FOSSIL_MX_CMDIDX][MX_HELP_DUP] = {{0}};/* Help str->commands */
878880
style_header("Help");
879
- search_screen(SRCH_HELP, 0);
881
+ search_screen(SRCH_HELP, 0x02);
880882
881883
@ <a name='commands'></a>
882884
@ <h1>Available commands:</h1>
883885
@ <div class="columns" style="column-width: %s(zWidth);">
884886
@ <ul>
885887
--- src/dispatch.c
+++ src/dispatch.c
@@ -832,11 +832,13 @@
832
833 style_set_current_feature("tkt");
834 style_header("Help: %s", zCmd);
835
836 style_submenu_element("Command-List", "%R/help");
837 style_submenu_element("Search","%R/search?y=h");
 
 
838 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
839 if( *zCmd=='/' ){
840 /* Some of the webpages require query parameters in order to work.
841 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
842 @ <h1>The "%h(zCmd)" page:</h1>
@@ -874,11 +876,11 @@
874 int i;
875 const char *zWidth = "28ex";
876 unsigned char occHelp[FOSSIL_MX_CMDIDX] = {0}; /* Help str occurrences */
877 int bktHelp[FOSSIL_MX_CMDIDX][MX_HELP_DUP] = {{0}};/* Help str->commands */
878 style_header("Help");
879 search_screen(SRCH_HELP, 0);
880
881 @ <a name='commands'></a>
882 @ <h1>Available commands:</h1>
883 @ <div class="columns" style="column-width: %s(zWidth);">
884 @ <ul>
885
--- src/dispatch.c
+++ src/dispatch.c
@@ -832,11 +832,13 @@
832
833 style_set_current_feature("tkt");
834 style_header("Help: %s", zCmd);
835
836 style_submenu_element("Command-List", "%R/help");
837 if( search_restrict(SRCH_HELP)!=0 ){
838 style_submenu_element("Search","%R/search?y=h");
839 }
840 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
841 if( *zCmd=='/' ){
842 /* Some of the webpages require query parameters in order to work.
843 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
844 @ <h1>The "%h(zCmd)" page:</h1>
@@ -874,11 +876,11 @@
876 int i;
877 const char *zWidth = "28ex";
878 unsigned char occHelp[FOSSIL_MX_CMDIDX] = {0}; /* Help str occurrences */
879 int bktHelp[FOSSIL_MX_CMDIDX][MX_HELP_DUP] = {{0}};/* Help str->commands */
880 style_header("Help");
881 search_screen(SRCH_HELP, 0x02);
882
883 @ <a name='commands'></a>
884 @ <h1>Available commands:</h1>
885 @ <div class="columns" style="column-width: %s(zWidth);">
886 @ <ul>
887

Keyboard Shortcuts

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