On Sat, Aug 6, 2022 at 4:30 PM Fernando Ramos <greenfoo@xxxxxx> wrote: > > + # Add an extra "-c" option to move to the first tab (notice that we > + # can't simply append the command to the previous "-c" string as > + # explained here: https://github.com/vim/vim/issues/9076 > > - # Add an extra "-c" option to move to the first tab (notice that we > - # can't simply append the command to the previous "-c" string as > - # explained here: https://github.com/vim/vim/issues/9076 > + FINAL_CMD="-c \"$CMD\" -c \"tabfirst\"" > + else > + CMD="$CMD | set hidden | let tmp=bufnr('%') | silent bufdo diffthis | exe 'buffer '.tmp" NAK: This runs `exe 'buffer #'` in every buffer. While switching to the desired buffer 3 extra times isn't a problem, it's also not correct. You need something like: silent exe 'bufdo diffthis' | exe 'buffer '.tmp" But at this point it seems like we are working around the current organization of the code, when we could simply reorganize it. Cheers. -- Felipe Contreras