Fossil SCM
Do not try to use "notepad" as a text editor on non-windows systems.
Commit
9b263d87c15bd740ecd879bee6b8f7d99780f1aaa9178fa768c0a8862f77d735
Parent
2b2530dd077db1a…
1 file changed
+6
-3
+6
-3
| --- src/util.c | ||
| +++ src/util.c | ||
| @@ -671,20 +671,23 @@ | ||
| 671 | 671 | ** (1) The value of the --editor command-line argument |
| 672 | 672 | ** (2) The local "editor" setting |
| 673 | 673 | ** (3) The global "editor" setting |
| 674 | 674 | ** (4) The VISUAL environment variable |
| 675 | 675 | ** (5) The EDITOR environment variable |
| 676 | -** (6) Any of the following programs that are available: | |
| 677 | -** notepad, nano, pico, jove, edit, vi, vim, ed, | |
| 676 | +** (6) Any of several common editors that might be available, such as: | |
| 677 | +** notepad, nano, pico, jove, edit, vi, vim, ed | |
| 678 | 678 | ** |
| 679 | 679 | ** The search only occurs once, the first time this routine is called. |
| 680 | 680 | ** Second and subsequent invocations always return the same value. |
| 681 | 681 | */ |
| 682 | 682 | const char *fossil_text_editor(void){ |
| 683 | 683 | static const char *zEditor = 0; |
| 684 | 684 | const char *azStdEd[] = { |
| 685 | - "notepad", "nano", "pico", "jove", "edit", "vi", "vim", "ed" | |
| 685 | +#ifdef _WIN32 | |
| 686 | + "notepad", | |
| 687 | +#endif | |
| 688 | + "nano", "pico", "jove", "edit", "vi", "vim", "ed" | |
| 686 | 689 | }; |
| 687 | 690 | int i = 0; |
| 688 | 691 | if( zEditor==0 ){ |
| 689 | 692 | zEditor = find_option("editor",0,1); |
| 690 | 693 | } |
| 691 | 694 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -671,20 +671,23 @@ | |
| 671 | ** (1) The value of the --editor command-line argument |
| 672 | ** (2) The local "editor" setting |
| 673 | ** (3) The global "editor" setting |
| 674 | ** (4) The VISUAL environment variable |
| 675 | ** (5) The EDITOR environment variable |
| 676 | ** (6) Any of the following programs that are available: |
| 677 | ** notepad, nano, pico, jove, edit, vi, vim, ed, |
| 678 | ** |
| 679 | ** The search only occurs once, the first time this routine is called. |
| 680 | ** Second and subsequent invocations always return the same value. |
| 681 | */ |
| 682 | const char *fossil_text_editor(void){ |
| 683 | static const char *zEditor = 0; |
| 684 | const char *azStdEd[] = { |
| 685 | "notepad", "nano", "pico", "jove", "edit", "vi", "vim", "ed" |
| 686 | }; |
| 687 | int i = 0; |
| 688 | if( zEditor==0 ){ |
| 689 | zEditor = find_option("editor",0,1); |
| 690 | } |
| 691 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -671,20 +671,23 @@ | |
| 671 | ** (1) The value of the --editor command-line argument |
| 672 | ** (2) The local "editor" setting |
| 673 | ** (3) The global "editor" setting |
| 674 | ** (4) The VISUAL environment variable |
| 675 | ** (5) The EDITOR environment variable |
| 676 | ** (6) Any of several common editors that might be available, such as: |
| 677 | ** notepad, nano, pico, jove, edit, vi, vim, ed |
| 678 | ** |
| 679 | ** The search only occurs once, the first time this routine is called. |
| 680 | ** Second and subsequent invocations always return the same value. |
| 681 | */ |
| 682 | const char *fossil_text_editor(void){ |
| 683 | static const char *zEditor = 0; |
| 684 | const char *azStdEd[] = { |
| 685 | #ifdef _WIN32 |
| 686 | "notepad", |
| 687 | #endif |
| 688 | "nano", "pico", "jove", "edit", "vi", "vim", "ed" |
| 689 | }; |
| 690 | int i = 0; |
| 691 | if( zEditor==0 ){ |
| 692 | zEditor = find_option("editor",0,1); |
| 693 | } |
| 694 |