Fossil SCM

Do not try to use "notepad" as a text editor on non-windows systems.

drh 2026-01-10 11:52 trunk
Commit 9b263d87c15bd740ecd879bee6b8f7d99780f1aaa9178fa768c0a8862f77d735
1 file changed +6 -3
+6 -3
--- src/util.c
+++ src/util.c
@@ -671,20 +671,23 @@
671671
** (1) The value of the --editor command-line argument
672672
** (2) The local "editor" setting
673673
** (3) The global "editor" setting
674674
** (4) The VISUAL environment variable
675675
** (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
678678
**
679679
** The search only occurs once, the first time this routine is called.
680680
** Second and subsequent invocations always return the same value.
681681
*/
682682
const char *fossil_text_editor(void){
683683
static const char *zEditor = 0;
684684
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"
686689
};
687690
int i = 0;
688691
if( zEditor==0 ){
689692
zEditor = find_option("editor",0,1);
690693
}
691694
--- 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

Keyboard Shortcuts

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