File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1146,6 +1146,15 @@ set_one_cmd_context(
11461146 arg = skipwhite (arg );
11471147 }
11481148
1149+ // Skip over ++argopt argument
1150+ if ((ea .argt & EX_ARGOPT ) && * arg != NUL && STRNCMP (arg , "++" , 2 ) == 0 )
1151+ {
1152+ p = arg ;
1153+ while (* p && !vim_isspace (* p ))
1154+ MB_PTR_ADV (p );
1155+ arg = skipwhite (p );
1156+ }
1157+
11491158 // Check for '|' to separate commands and '"' to start comments.
11501159 // Don't do this for ":read !cmd" and ":write !cmd".
11511160 if ((ea .argt & EX_TRLBAR ) && !usefilter )
Original file line number Diff line number Diff line change @@ -1568,5 +1568,20 @@ func Test_zero_line_search()
15681568 q !
15691569endfunc
15701570
1571+ func Test_read_shellcmd ()
1572+ CheckUnix
1573+ if executable (' ls' )
1574+ " There should be ls in the $PATH
1575+ call feedkeys (" :r! l\<c-a>\<c-b> \" \<cr> " , ' tx' )
1576+ call assert_match (' ^"r! .*\<ls\>' , @: )
1577+ endif
1578+
1579+ if executable (' rm' )
1580+ call feedkeys (" :r! ++enc=utf-8 r\<c-a>\<c-b> \" \<cr> " , ' tx' )
1581+ call assert_notmatch (' ^"r!.*\<runtest.vim\>' , @: )
1582+ call assert_match (' ^"r!.*\<rm\>' , @: )
1583+ endif
1584+ endfunc
1585+
15711586
15721587" vim: shiftwidth = 2 sts = 2 expandtab
Original file line number Diff line number Diff line change @@ -754,6 +754,8 @@ static char *(features[]) =
754754
755755static int included_patches [] =
756756{ /* Add new patch number below this line */
757+ /**/
758+ 1007 ,
757759/**/
758760 1006 ,
759761/**/
You can’t perform that action at this time.
0 commit comments