Hi Christian, On Fri, Apr 26, 2024 at 9:02 AM Christian Brabandt < vim-dev-git...@256bit.org> wrote:
> Hm, even the mentioned > <https://github.com/vim/vim/issues/2955#issuecomment-392202171> > '<,'>cgetbuffer does no longer work. It seems at least the following two > commands would need to use ADDR_LINES instead of ADDR_OTHER. > > Something like this: > > diff --git a/src/ex_cmds.h b/src/ex_cmds.h > index 70e57708f..bd195a72f 100644--- a/src/ex_cmds.h+++ b/src/ex_cmds.h@@ > -271,7 +271,7 @@ EXCMD(CMD_cabove, "cabove", ex_cbelow, > ADDR_UNSIGNED), > EXCMD(CMD_caddbuffer, "caddbuffer", ex_cbuffer, > EX_RANGE|EX_WORD1|EX_TRLBAR,- ADDR_OTHER),+ ADDR_LINES), > EXCMD(CMD_caddexpr, "caddexpr", ex_cexpr, > EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG, > ADDR_NONE),@@ -331,7 +331,7 @@ EXCMD(CMD_cgetfile, "cgetfile", > ex_cfile, > ADDR_NONE), > EXCMD(CMD_cgetbuffer, "cgetbuffer", ex_cbuffer, > EX_RANGE|EX_WORD1|EX_TRLBAR,- ADDR_OTHER),+ ADDR_LINES), > EXCMD(CMD_cgetexpr, "cgetexpr", ex_cexpr, > EX_NEEDARG|EX_WORD1|EX_NOTRLCOM|EX_EXPR_ARG, > ADDR_NONE), > > It seems ADDR_OTHER doesn't make sense here. @yegappan > <https://github.com/yegappan> what do you think? > > > Yes. The above change looks good to me. The change to ADDR_OTHER was introduced by Patch 8.1.1241 (b731689e85b4153af7edc8f0a6b9f99d36d8b011). Currently there is no test for using a range with the caddbuffer and cgetbuffer commands. That is why this regression was not caught earlier. We should add a few tests for using a range with these commands. Regards, Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7k23YVKCNrvvsySMscO7dYV2sgqgfCX_OFEADbZthyO-w%40mail.gmail.com.