mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2303: Vim9: backtick expansion doesn't work for :foldopen
Problem: Vim9: backtick expansion doesn't work for :foldopen. Solution: Do recognize backtick expansion. (closes #7621)
This commit is contained in:
@@ -81,6 +81,23 @@ def Test_global_backtick_expansion()
|
|||||||
bwipe!
|
bwipe!
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_folddo_backtick_expansion()
|
||||||
|
new
|
||||||
|
var name = 'xxx'
|
||||||
|
folddoopen edit `=name`
|
||||||
|
assert_equal('xxx', bufname())
|
||||||
|
bwipe!
|
||||||
|
|
||||||
|
new
|
||||||
|
setline(1, ['one', 'two'])
|
||||||
|
set nomodified
|
||||||
|
:1,2fold
|
||||||
|
foldclose
|
||||||
|
folddoclose edit `=name`
|
||||||
|
assert_equal('xxx', bufname())
|
||||||
|
bwipe!
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_hardcopy_wildcards()
|
def Test_hardcopy_wildcards()
|
||||||
CheckUnix
|
CheckUnix
|
||||||
CheckFeature postscript
|
CheckFeature postscript
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2303,
|
||||||
/**/
|
/**/
|
||||||
2302,
|
2302,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -7505,6 +7505,13 @@ compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (eap->cmdidx == CMD_folddoopen || eap->cmdidx == CMD_folddoclosed)
|
||||||
|
{
|
||||||
|
// TODO: should only expand when appropriate for the command
|
||||||
|
eap->arg = skiptowhite(eap->arg);
|
||||||
|
has_expr = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (has_expr && (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL)
|
if (has_expr && (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
Reference in New Issue
Block a user