mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
vim-patch:9.1.0126: Internal error when using upper-case mark in getregion()
Problem: Internal error when passing mark in another buffer to
getregion().
Solution: Don't allow marks in another buffer (zeertzjq)
closes: vim/vim#14076
Internal error when passing mark in another buffer to getregion()
421b597470
This commit is contained in:
@@ -4387,6 +4387,8 @@ M.funcs = {
|
||||
|visual-mode|, an empty list is returned.
|
||||
- If {pos1}, {pos2} or {type} is an invalid string, an empty
|
||||
list is returned.
|
||||
- If {pos1} or {pos2} is a mark in different buffer, an empty
|
||||
list is returned.
|
||||
|
||||
Examples: >
|
||||
:xnoremap <CR>
|
||||
|
@@ -2831,13 +2831,13 @@ static void f_getregion(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
int fnum = -1;
|
||||
// NOTE: var2fpos() returns static pointer.
|
||||
pos_T *fp = var2fpos(&argvars[0], true, &fnum, false);
|
||||
if (fp == NULL) {
|
||||
if (fp == NULL || (fnum >= 0 && fnum != curbuf->b_fnum)) {
|
||||
return;
|
||||
}
|
||||
pos_T p1 = *fp;
|
||||
|
||||
fp = var2fpos(&argvars[1], true, &fnum, false);
|
||||
if (fp == NULL) {
|
||||
if (fp == NULL || (fnum >= 0 && fnum != curbuf->b_fnum)) {
|
||||
return;
|
||||
}
|
||||
pos_T p2 = *fp;
|
||||
|
Reference in New Issue
Block a user