aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xC.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xC.c b/xC.c
index 2b81e79..c610199 100644
--- a/xC.c
+++ b/xC.c
@@ -2443,7 +2443,8 @@ static struct config_schema g_config_behaviour[] =
.default_ = "on",
.on_change = on_config_word_wrapping_change },
{ .name = "editor_command",
- .comment = "VIM: \"vim +%Bgo %F\", Emacs: \"emacs -nw +%L:%C %F\"",
+ .comment = "VIM: \"vim +%Bgo %F\", Emacs: \"emacs -nw +%L:%C %F\", "
+ "nano/micro/kakoune: \"nano/micro/kak +%L:%C %F\"",
.type = CONFIG_ITEM_STRING },
{ .name = "process_pasted_text",
.comment = "Normalize newlines and quote the command prefix in pastes",
@@ -13214,6 +13215,13 @@ build_editor_command (struct app_context *ctx, const char *filename)
&& !(command = getenv ("EDITOR")))
command = "vi";
+ // Although most visual editors support a "+LINE" argument (every
+ // editor mentioned in the default value of behaviour.editor_command,
+ // plus vi, mcedit, vis, ...), it isn't particularly useful by itself.
+ // We need to be able to specify the column number.
+ //
+ // Seeing as less popular software may try to process this as a filename
+ // and fail, do not bother with this "undocumented standard feature".
strv_append (&argv, command);
strv_append (&argv, filename);
return argv;