aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-01-01 14:38:17 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-01-01 14:38:17 -0500
commitf1344bc2198c4e433dedbc8b0662ba90cb5eaf1c (patch)
treef5d48caeb217459f82332555e852216569d30ecb /src/nvim/buffer.c
parentdf4ac79761162313de4e27a265044125062013cf (diff)
parent3fd62f961294d11fff5754a3c597e982b54ca74a (diff)
downloadrneovim-f1344bc2198c4e433dedbc8b0662ba90cb5eaf1c.tar.gz
rneovim-f1344bc2198c4e433dedbc8b0662ba90cb5eaf1c.tar.bz2
rneovim-f1344bc2198c4e433dedbc8b0662ba90cb5eaf1c.zip
Merge pull request #3903 from justinmk/vim-7.4.605
vim-patch:7.4.605
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 762cd3efd3..a6e3fedd3f 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -918,13 +918,15 @@ do_buffer (
if (buf == NULL) { /* could not find it */
if (start == DOBUF_FIRST) {
- /* don't warn when deleting */
- if (!unload)
- EMSGN(_("E86: Buffer %" PRId64 " does not exist"), count);
- } else if (dir == FORWARD)
+ // don't warn when deleting
+ if (!unload) {
+ EMSGN(_(e_nobufnr), count);
+ }
+ } else if (dir == FORWARD) {
EMSG(_("E87: Cannot go beyond last buffer"));
- else
+ } else {
EMSG(_("E88: Cannot go before first buffer"));
+ }
return FAIL;
}
@@ -1711,18 +1713,15 @@ static buf_T *buflist_findname_file_id(char_u *ffname, FileID *file_id,
return NULL;
}
-/*
- * Find file in buffer list by a regexp pattern.
- * Return fnum of the found buffer.
- * Return < 0 for error.
- */
-int
-buflist_findpat (
- char_u *pattern,
- char_u *pattern_end, /* pointer to first char after pattern */
- int unlisted, /* find unlisted buffers */
- int diffmode, /* find diff-mode buffers only */
- int curtab_only /* find buffers in current tab only */
+/// Find file in buffer list by a regexp pattern.
+/// Return fnum of the found buffer.
+/// Return < 0 for error.
+int buflist_findpat(
+ const char_u *pattern,
+ const char_u *pattern_end, // pointer to first char after pattern
+ int unlisted, // find unlisted buffers
+ int diffmode, // find diff-mode buffers only
+ int curtab_only // find buffers in current tab only
)
{
int match = -1;