Merge #11340 'Factor out parse_one_cmd()'

This will allow us to reuse the parsing logic elsewhere, namely for
'inccommand' logic, so we don't need to duplicate it for changes such as the
repeated colon fix in #11319.
This commit is contained in:
Justin M. Keyes
2019-11-17 15:53:30 -08:00
committed by GitHub
2 changed files with 517 additions and 398 deletions

View File

@@ -296,17 +296,17 @@ pos_T *movechangelist(int count)
* - NULL if there is no mark called 'c'.
* - -1 if mark is in other file and jumped there (only if changefile is TRUE)
*/
pos_T *getmark_buf(buf_T *buf, int c, int changefile)
pos_T *getmark_buf(buf_T *buf, int c, bool changefile)
{
return getmark_buf_fnum(buf, c, changefile, NULL);
}
pos_T *getmark(int c, int changefile)
pos_T *getmark(int c, bool changefile)
{
return getmark_buf_fnum(curbuf, c, changefile, NULL);
}
pos_T *getmark_buf_fnum(buf_T *buf, int c, int changefile, int *fnum)
pos_T *getmark_buf_fnum(buf_T *buf, int c, bool changefile, int *fnum)
{
pos_T *posp;
pos_T *startp, *endp;