changeset 36015:be7e6be5fa0c

runtime(netrw): Change line on `mx` if command output exists Commit: https://github.com/vim/vim/commit/c75dad017726ae78d6d2a68d1d6cfa12e7bd29f3 Author: yasuda <yasuda@kyoto-sr.co.jp> Date: Thu Aug 22 21:06:32 2024 +0200 runtime(netrw): Change line on `mx` if command output exists closes: https://github.com/vim/vim/issues/15550 Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 22 Aug 2024 21:15:02 +0200
parents 3c57a842bdc7
children d3d3de56faab
files runtime/autoload/netrw.vim
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -22,6 +22,7 @@
 "   2024 Aug 02 by Vim Project: honor g:netrw_alt{o,v} for :{S,H,V}explore (#15417)
 "   2024 Aug 15 by Vim Project: style changes, prevent E121 (#15501)
 "   2024 Aug 22 by Vim Project: fix mf-selection highlight (#15551)
+"   2024 Aug 22 by Vim Project: adjust echo output of mx command (#15550)
 "   }}}
 " Former Maintainer:	Charles E Campbell
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
@@ -7497,7 +7498,13 @@ fun! s:NetrwMarkFileExe(islocal,enbloc)
        NetrwKeepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54)
        break
       else
-       echo ret
+       if ret !=# ''
+        echo "\n"
+        " skip trailing new line
+        echo ret[0:-2]
+       else
+        echo ret
+       endif
       endif
      endfor