diff --git a/doc/json_schema.json b/doc/json_schema.json index eded507e5..c8a317aa3 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -576,7 +576,7 @@ }, "tsVersion": { "type": "boolean", - "description": "Whether to detect and display the version of terminal and shell. Mainly for benchmarking", + "description": "Whether to detect and display the version of terminal, shell and editor. Mainly for benchmarking", "default": true } } diff --git a/src/data/help.json b/src/data/help.json index e7fe60297..bdefdd8e2 100644 --- a/src/data/help.json +++ b/src/data/help.json @@ -728,7 +728,7 @@ }, { "long": "ts-version", - "desc": "Whether to detect and display the version of terminal and shell", + "desc": "Whether to detect and display the version of terminal, shell and editor", "remark": "Mainly for benchmarking", "arg": { "type": "bool", diff --git a/src/detection/editor/editor.c b/src/detection/editor/editor.c index c6a281c17..84b3b2632 100644 --- a/src/detection/editor/editor.c +++ b/src/detection/editor/editor.c @@ -26,6 +26,8 @@ const char* ffDetectEditor(FFEditorResult* result) return "$VISUAL or $EDITOR not set"; } + if (!instance.config.display.tsVersion) return NULL; + #ifndef _WIN32 if (result->name.chars[0] != '/') {