Fossil SCM
Enable the search in the built-in help text even without a repository.
Commit
3db304c755a41f35b53866833a91e039e9cdc8db8a4524f8369fc4182497341b
Parent
33c1cfde9c6e8d5…
1 file changed
+3
-2
+3
-2
| --- src/search.c | ||
| +++ src/search.c | ||
| @@ -618,10 +618,11 @@ | ||
| 618 | 618 | int bDebug = find_option("debug",0,0)!=0; /* Undocumented */ |
| 619 | 619 | int nLimit = zLimit ? atoi(zLimit) : -1000; |
| 620 | 620 | int width; |
| 621 | 621 | int nTty = 0; /* VT100 highlight color for matching text */ |
| 622 | 622 | const char *zHighlight = 0; |
| 623 | + int bFlags = 0; /* DB open flags */ | |
| 623 | 624 | |
| 624 | 625 | nTty = terminal_is_vt100(); |
| 625 | 626 | |
| 626 | 627 | /* Undocumented option to change highlight color */ |
| 627 | 628 | zHighlight = find_option("highlight",0,1); |
| @@ -666,12 +667,12 @@ | ||
| 666 | 667 | if( find_option("wiki",0,0) ){ srchFlags |= SRCH_WIKI; bFts = 1; } |
| 667 | 668 | |
| 668 | 669 | /* If no search objects are specified, default to "check-in comments" */ |
| 669 | 670 | if( srchFlags==0 ) srchFlags = SRCH_CKIN; |
| 670 | 671 | |
| 671 | - | |
| 672 | - db_find_and_open_repository(0, 0); | |
| 672 | + if( srchFlags==SRCH_HELP ) bFlags = OPEN_OK_NOT_FOUND|OPEN_SUBSTITUTE; | |
| 673 | + db_find_and_open_repository(bFlags, 0); | |
| 673 | 674 | verify_all_options(); |
| 674 | 675 | if( g.argc<3 ) return; |
| 675 | 676 | login_set_capabilities("s", 0); |
| 676 | 677 | if( search_restrict(srchFlags)==0 && (srchFlags & SRCH_HELP)==0 ){ |
| 677 | 678 | const char *zC1 = 0, *zPlural = "s"; |
| 678 | 679 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -618,10 +618,11 @@ | |
| 618 | int bDebug = find_option("debug",0,0)!=0; /* Undocumented */ |
| 619 | int nLimit = zLimit ? atoi(zLimit) : -1000; |
| 620 | int width; |
| 621 | int nTty = 0; /* VT100 highlight color for matching text */ |
| 622 | const char *zHighlight = 0; |
| 623 | |
| 624 | nTty = terminal_is_vt100(); |
| 625 | |
| 626 | /* Undocumented option to change highlight color */ |
| 627 | zHighlight = find_option("highlight",0,1); |
| @@ -666,12 +667,12 @@ | |
| 666 | if( find_option("wiki",0,0) ){ srchFlags |= SRCH_WIKI; bFts = 1; } |
| 667 | |
| 668 | /* If no search objects are specified, default to "check-in comments" */ |
| 669 | if( srchFlags==0 ) srchFlags = SRCH_CKIN; |
| 670 | |
| 671 | |
| 672 | db_find_and_open_repository(0, 0); |
| 673 | verify_all_options(); |
| 674 | if( g.argc<3 ) return; |
| 675 | login_set_capabilities("s", 0); |
| 676 | if( search_restrict(srchFlags)==0 && (srchFlags & SRCH_HELP)==0 ){ |
| 677 | const char *zC1 = 0, *zPlural = "s"; |
| 678 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -618,10 +618,11 @@ | |
| 618 | int bDebug = find_option("debug",0,0)!=0; /* Undocumented */ |
| 619 | int nLimit = zLimit ? atoi(zLimit) : -1000; |
| 620 | int width; |
| 621 | int nTty = 0; /* VT100 highlight color for matching text */ |
| 622 | const char *zHighlight = 0; |
| 623 | int bFlags = 0; /* DB open flags */ |
| 624 | |
| 625 | nTty = terminal_is_vt100(); |
| 626 | |
| 627 | /* Undocumented option to change highlight color */ |
| 628 | zHighlight = find_option("highlight",0,1); |
| @@ -666,12 +667,12 @@ | |
| 667 | if( find_option("wiki",0,0) ){ srchFlags |= SRCH_WIKI; bFts = 1; } |
| 668 | |
| 669 | /* If no search objects are specified, default to "check-in comments" */ |
| 670 | if( srchFlags==0 ) srchFlags = SRCH_CKIN; |
| 671 | |
| 672 | if( srchFlags==SRCH_HELP ) bFlags = OPEN_OK_NOT_FOUND|OPEN_SUBSTITUTE; |
| 673 | db_find_and_open_repository(bFlags, 0); |
| 674 | verify_all_options(); |
| 675 | if( g.argc<3 ) return; |
| 676 | login_set_capabilities("s", 0); |
| 677 | if( search_restrict(srchFlags)==0 && (srchFlags & SRCH_HELP)==0 ){ |
| 678 | const char *zC1 = 0, *zPlural = "s"; |
| 679 |