diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2022-08-14 20:26:38 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2022-08-14 20:27:30 +0200 |
commit | 0750096827713a090fe8099aaca469c408bf36b9 (patch) | |
tree | 4c7612a96fac4ba7502d4b1362c6e2e0fcd06569 | |
parent | 49d9980662b123824dea607db0e764220ba5f7a5 (diff) | |
download | xK-0750096827713a090fe8099aaca469c408bf36b9.tar.gz xK-0750096827713a090fe8099aaca469c408bf36b9.tar.xz xK-0750096827713a090fe8099aaca469c408bf36b9.zip |
xC: expand behaviour.editor_command examples
-rw-r--r-- | xC.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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; |