Merge branch 'master' into expression-parser

This commit is contained in:
ZyX
2017-10-30 00:49:12 +03:00
119 changed files with 2655 additions and 777 deletions

View File

@@ -9,6 +9,7 @@
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
#include "nvim/vim.h"
@@ -5996,7 +5997,7 @@ static void ex_quit(exarg_T *eap)
*/
static void ex_cquit(exarg_T *eap)
{
getout(1);
getout(eap->addr_count > 0 ? (int)eap->line2 : EXIT_FAILURE);
}
/*
@@ -9883,7 +9884,7 @@ static void ex_terminal(exarg_T *eap)
/// Checks if `cmd` is "previewable" (i.e. supported by 'inccommand').
///
/// @param[in] cmd Commandline to check. May start with a range.
/// @param[in] cmd Commandline to check. May start with a range or modifier.
///
/// @return true if `cmd` is previewable
bool cmd_can_preview(char_u *cmd)
@@ -9892,6 +9893,12 @@ bool cmd_can_preview(char_u *cmd)
return false;
}
// Ignore any leading modifiers (:keeppatterns, :verbose, etc.)
for (int len = modifier_len(cmd); len != 0; len = modifier_len(cmd)) {
cmd += len;
cmd = skipwhite(cmd);
}
exarg_T ea;
// parse the command line
ea.cmd = skip_range(cmd, NULL);