Discussion:
[vim] 02/139: patch 7.4.1691 Problem: When switching to a new buffer and an autocommand applies syntax highlighting an ml_get error may occur. Solution: Check "syn_buf" against the buffer in the window. (Alexander von Buddenbrock, closes #676)
James McCoy
2016-05-06 03:59:54 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit b681be175b6991cdc2b8ddd49b0e97e3fe2b201e
Author: Bram Moolenaar <***@vim.org>
Date: Thu Mar 31 23:02:16 2016 +0200

patch 7.4.1691
Problem: When switching to a new buffer and an autocommand applies syntax
highlighting an ml_get error may occur.
Solution: Check "syn_buf" against the buffer in the window. (Alexander von
Buddenbrock, closes #676)
---
src/syntax.c | 4 +++-
src/version.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/syntax.c b/src/syntax.c
index 29b6888..a43f4a6 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -509,7 +509,9 @@ syntax_start(win_T *wp, linenr_T lnum)
* Also do this when a change was made, the current state may be invalid
* then.
*/
- if (syn_block != wp->w_s || changedtick != syn_buf->b_changedtick)
+ if (syn_block != wp->w_s
+ || syn_buf != wp->w_buffer
+ || changedtick != syn_buf->b_changedtick)
{
invalidate_current_state();
syn_buf = wp->w_buffer;
diff --git a/src/version.c b/src/version.c
index 3fa82ca..d08e730 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1691,
+/**/
1690,
/**/
1689,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:54 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 8e77bad3c18245f05a3db3acc566856d30667db8
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 15:32:45 2016 +0200

Add json_test to gitignore (Hirohito Higashi)
---
.gitignore | 1 +
1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index acd9fc8..97e6d2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -78,3 +78,4 @@ src/testdir/dostmp/*
src/testdir/messages
src/testdir/viminfo
src/memfile_test
+src/json_test
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:54 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 42356150badca33b4e42dc8172abbceff2e86cbe
Author: Bram Moolenaar <***@vim.org>
Date: Thu Mar 31 22:27:40 2016 +0200

patch 7.4.1690
Problem: Can't compile with the conceal feature but without multi-byte.
Solution: Adjust #ifdef. (Owen Leibman)
---
src/eval.c | 2 +-
src/version.c | 2 ++
src/window.c | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 9f6db31..b2f4462 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -12786,7 +12786,7 @@ f_getmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id));
dict_add_nr_str(dict, "priority", (long)cur->priority, NULL);
dict_add_nr_str(dict, "id", (long)cur->id, NULL);
-# ifdef FEAT_CONCEAL
+# if defined(FEAT_CONCEAL) && defined(FEAT_MBYTE)
if (cur->conceal_char)
{
char_u buf[MB_MAXBYTES + 1];
diff --git a/src/version.c b/src/version.c
index 8d32e2a..3fa82ca 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1690,
+/**/
1689,
/**/
1688,
diff --git a/src/window.c b/src/window.c
index 9530ef5..c7905ae 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6746,11 +6746,11 @@ match_add(
m->match.regprog = regprog;
m->match.rmm_ic = FALSE;
m->match.rmm_maxcol = 0;
-#ifdef FEAT_CONCEAL
+# if defined(FEAT_CONCEAL) && defined(FEAT_MBYTE)
m->conceal_char = 0;
if (conceal_char != NULL)
m->conceal_char = (*mb_ptr2char)(conceal_char);
-#endif
+# endif

/* Set up position matches */
if (pos_list != NULL)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:54 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 864733ad92e30cd603314604af73f25106db4c90
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 14:18:01 2016 +0200

patch 7.4.1693
Problem: Building the Perl interface gives compiler warnings.
Solution: Remove a pragma. Add noreturn attributes. (Damien)
---
src/if_perl.xs | 16 ++++++++++------
src/version.c | 2 ++
2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/if_perl.xs b/src/if_perl.xs
index 9ca5291..4fbc13e 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -52,7 +52,6 @@
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-variable"
-# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

#include <EXTERN.h>
@@ -307,16 +306,18 @@ static void (*perl_free)(PerlInterpreter*);
static int (*perl_run)(PerlInterpreter*);
static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
static void* (*Perl_get_context)(void);
-static void (*Perl_croak)(pTHX_ const char*, ...);
+static void (*Perl_croak)(pTHX_ const char*, ...) __attribute__noreturn__;
#ifdef PERL5101_OR_LATER
/* Perl-5.18 has a different Perl_croak_xs_usage signature. */
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
-static void (*Perl_croak_xs_usage)(const CV *const, const char *const params);
+static void (*Perl_croak_xs_usage)(const CV *const, const char *const params)
+ __attribute__noreturn__;
# else
-static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
+static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params)
+ __attribute__noreturn__;
# endif
#endif
-static void (*Perl_croak_nocontext)(const char*, ...);
+static void (*Perl_croak_nocontext)(const char*, ...) __attribute__noreturn__;
static I32 (*Perl_dowantarray)(pTHX);
static void (*Perl_free_tmps)(pTHX);
static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32);
@@ -591,7 +592,9 @@ static struct {
* "perl\lib\CORE\inline.h", after Perl_sv_free2 is defined.
* The linker won't complain about undefined __impl_Perl_sv_free2. */
#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
+# define PL_memory_wrap "panic: memory wrap" /* Dummy */
# include <inline.h>
+# undef PL_memory_wrap
#endif

/*
@@ -1516,7 +1519,8 @@ SetHeight(win, height)
curwin = savewin;

void
-Cursor(VIWIN win, ...)
+Cursor(win, ...)
+ VIWIN win

PPCODE:
if (items == 1)
diff --git a/src/version.c b/src/version.c
index c1e8fb7..cdf05e1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1693,
+/**/
1692,
/**/
1691,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:54 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 9bd547aca41799605c3a3f83444f6725c2d6eda9
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 1 21:00:48 2016 +0200

patch 7.4.1692
Problem: feedkeys('i', 'x') gets stuck, waits for a character to be typed.
Solution: Behave like ":normal". (Yasuhiro Matsumoto)
---
src/eval.c | 3 +++
src/testdir/test_feedkeys.vim | 4 ++++
src/version.c | 2 ++
3 files changed, 9 insertions(+)

diff --git a/src/eval.c b/src/eval.c
index b2f4462..e1d69d0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -11368,7 +11368,10 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)

/* Avoid a 1 second delay when the keys start Insert mode. */
msg_scroll = FALSE;
+
+ ++ex_normal_busy;
exec_normal(TRUE);
+ --ex_normal_busy;
msg_scroll |= save_msg_scroll;
}
}
diff --git a/src/testdir/test_feedkeys.vim b/src/testdir/test_feedkeys.vim
index 33cd589..70500f2 100644
--- a/src/testdir/test_feedkeys.vim
+++ b/src/testdir/test_feedkeys.vim
@@ -6,5 +6,9 @@ func Test_feedkeys_x_with_empty_string()
call assert_equal('', getline('.'))
call feedkeys('', 'x')
call assert_equal('foo', getline('.'))
+
+ " check it goes back to normal mode immediately.
+ call feedkeys('i', 'x')
+ call assert_equal('foo', getline('.'))
quit!
endfunc
diff --git a/src/version.c b/src/version.c
index d08e730..c1e8fb7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1692,
+/**/
1691,
/**/
1690,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:54 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit f28d87146544e3b5d70aaa6a2513019f6de043ad
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 15:59:40 2016 +0200

patch 7.4.1694
Problem: Win32 gvim doesn't work with "dvorakj" input method.
Solution: Wait for QS_ALLINPUT instead of QS_ALLEVENTS. (Yukihiro Nakadaira)
---
src/gui_w32.c | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gui_w32.c b/src/gui_w32.c
index b2ee9ca..0679ed2 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -2218,7 +2218,7 @@ gui_mch_wait_for_chars(int wtime)
parse_queued_messages();

if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
- || MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLEVENTS)
+ || MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
!= WAIT_TIMEOUT)
break;
}
diff --git a/src/version.c b/src/version.c
index cdf05e1..552bb6b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1694,
+/**/
1693,
/**/
1692,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:54 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 8bc189e81aa98ba4aebb03a9dc9527a210fce816
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 19:01:58 2016 +0200

patch 7.4.1695
Problem: ":syn reset" clears the effect ":syn iskeyword". (James McCoy)
Solution: Remove clearing the syntax keywords.
---
src/syntax.c | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/syntax.c b/src/syntax.c
index a43f4a6..31c1d0d 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3815,6 +3815,7 @@ syn_cmd_enable(exarg_T *eap, int syncing UNUSED)

/*
* Handle ":syntax reset" command.
+ * It actually resets highlighting, not syntax.
*/
static void
syn_cmd_reset(exarg_T *eap, int syncing UNUSED)
@@ -3822,7 +3823,6 @@ syn_cmd_reset(exarg_T *eap, int syncing UNUSED)
eap->nextcmd = check_nextcmd(eap->arg);
if (!eap->skip)
{
- clear_string_option(&curwin->w_s->b_syn_isk);
set_internal_string_var((char_u *)"syntax_cmd", (char_u *)"reset");
do_cmdline_cmd((char_u *)"runtime! syntax/syncolor.vim");
do_unlet((char_u *)"g:syntax_cmd", TRUE);
diff --git a/src/version.c b/src/version.c
index 552bb6b..e7235c1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1695,
+/**/
1694,
/**/
1693,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit fd773e9e88add7d1ffef890fb9f3a00d613b4326
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 19:39:16 2016 +0200

patch 7.4.1696
Problem: When using :stopinsert in a silent mapping the "INSERT" message
isn't cleared. (Coacher)
Solution: Always clear the message. (Christian Brabandt, closes #718)
---
src/ex_docmd.c | 1 +
src/proto/screen.pro | 1 +
src/screen.c | 19 +++++++++++++------
src/version.c | 2 ++
4 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 26f4219..e5de379 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10040,6 +10040,7 @@ ex_stopinsert(exarg_T *eap UNUSED)
{
restart_edit = 0;
stop_insert_mode = TRUE;
+ clearmode();
}

/*
diff --git a/src/proto/screen.pro b/src/proto/screen.pro
index aad8187..f8b14c4 100644
--- a/src/proto/screen.pro
+++ b/src/proto/screen.pro
@@ -47,6 +47,7 @@ int screen_ins_lines(int off, int row, int line_count, int end, win_T *wp);
int screen_del_lines(int off, int row, int line_count, int end, int force, win_T *wp);
int showmode(void);
void unshowmode(int force);
+void clearmode(void);
void get_trans_bufname(buf_T *buf);
int redrawing(void);
int messaging(void);
diff --git a/src/screen.c b/src/screen.c
index 9d854a2..77fb3b9 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -10184,12 +10184,19 @@ unshowmode(int force)
if (!redrawing() || (!force && char_avail() && !KeyTyped))
redraw_cmdline = TRUE; /* delete mode later */
else
- {
- msg_pos_mode();
- if (Recording)
- recording_mode(hl_attr(HLF_CM));
- msg_clr_eos();
- }
+ clearmode();
+}
+
+/*
+ * Clear the mode message.
+ */
+ void
+clearmode()
+{
+ msg_pos_mode();
+ if (Recording)
+ recording_mode(hl_attr(HLF_CM));
+ msg_clr_eos();
}

static void
diff --git a/src/version.c b/src/version.c
index e7235c1..ab2cc39 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1696,
+/**/
1695,
/**/
1694,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit cb0700844c1274fe8bc0ceaffaee0ad21c406f30
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 22:14:51 2016 +0200

patch 7.4.1697
Problem: Display problems when the 'ambiwidth' and 'emoji' options are not
set properly or the terminal doesn't behave as expected.
Solution: After drawing an ambiguous width character always position the
cursor.
---
src/mbyte.c | 597 ++++++++++++++++++++++++++--------------------------
src/proto/mbyte.pro | 1 +
src/screen.c | 4 +-
src/version.c | 2 +
4 files changed, 308 insertions(+), 296 deletions(-)

diff --git a/src/mbyte.c b/src/mbyte.c
index f38e63e..6d419b2 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -1210,6 +1210,185 @@ intable(struct interval *table, size_t size, int c)
return FALSE;
}

+/* Sorted list of non-overlapping intervals of East Asian Ambiguous
+ * characters, generated with ../runtime/tools/unicode.vim. */
+static struct interval ambiguous[] =
+{
+ {0x00a1, 0x00a1},
+ {0x00a4, 0x00a4},
+ {0x00a7, 0x00a8},
+ {0x00aa, 0x00aa},
+ {0x00ad, 0x00ae},
+ {0x00b0, 0x00b4},
+ {0x00b6, 0x00ba},
+ {0x00bc, 0x00bf},
+ {0x00c6, 0x00c6},
+ {0x00d0, 0x00d0},
+ {0x00d7, 0x00d8},
+ {0x00de, 0x00e1},
+ {0x00e6, 0x00e6},
+ {0x00e8, 0x00ea},
+ {0x00ec, 0x00ed},
+ {0x00f0, 0x00f0},
+ {0x00f2, 0x00f3},
+ {0x00f7, 0x00fa},
+ {0x00fc, 0x00fc},
+ {0x00fe, 0x00fe},
+ {0x0101, 0x0101},
+ {0x0111, 0x0111},
+ {0x0113, 0x0113},
+ {0x011b, 0x011b},
+ {0x0126, 0x0127},
+ {0x012b, 0x012b},
+ {0x0131, 0x0133},
+ {0x0138, 0x0138},
+ {0x013f, 0x0142},
+ {0x0144, 0x0144},
+ {0x0148, 0x014b},
+ {0x014d, 0x014d},
+ {0x0152, 0x0153},
+ {0x0166, 0x0167},
+ {0x016b, 0x016b},
+ {0x01ce, 0x01ce},
+ {0x01d0, 0x01d0},
+ {0x01d2, 0x01d2},
+ {0x01d4, 0x01d4},
+ {0x01d6, 0x01d6},
+ {0x01d8, 0x01d8},
+ {0x01da, 0x01da},
+ {0x01dc, 0x01dc},
+ {0x0251, 0x0251},
+ {0x0261, 0x0261},
+ {0x02c4, 0x02c4},
+ {0x02c7, 0x02c7},
+ {0x02c9, 0x02cb},
+ {0x02cd, 0x02cd},
+ {0x02d0, 0x02d0},
+ {0x02d8, 0x02db},
+ {0x02dd, 0x02dd},
+ {0x02df, 0x02df},
+ {0x0300, 0x036f},
+ {0x0391, 0x03a1},
+ {0x03a3, 0x03a9},
+ {0x03b1, 0x03c1},
+ {0x03c3, 0x03c9},
+ {0x0401, 0x0401},
+ {0x0410, 0x044f},
+ {0x0451, 0x0451},
+ {0x2010, 0x2010},
+ {0x2013, 0x2016},
+ {0x2018, 0x2019},
+ {0x201c, 0x201d},
+ {0x2020, 0x2022},
+ {0x2024, 0x2027},
+ {0x2030, 0x2030},
+ {0x2032, 0x2033},
+ {0x2035, 0x2035},
+ {0x203b, 0x203b},
+ {0x203e, 0x203e},
+ {0x2074, 0x2074},
+ {0x207f, 0x207f},
+ {0x2081, 0x2084},
+ {0x20ac, 0x20ac},
+ {0x2103, 0x2103},
+ {0x2105, 0x2105},
+ {0x2109, 0x2109},
+ {0x2113, 0x2113},
+ {0x2116, 0x2116},
+ {0x2121, 0x2122},
+ {0x2126, 0x2126},
+ {0x212b, 0x212b},
+ {0x2153, 0x2154},
+ {0x215b, 0x215e},
+ {0x2160, 0x216b},
+ {0x2170, 0x2179},
+ {0x2189, 0x2189},
+ {0x2190, 0x2199},
+ {0x21b8, 0x21b9},
+ {0x21d2, 0x21d2},
+ {0x21d4, 0x21d4},
+ {0x21e7, 0x21e7},
+ {0x2200, 0x2200},
+ {0x2202, 0x2203},
+ {0x2207, 0x2208},
+ {0x220b, 0x220b},
+ {0x220f, 0x220f},
+ {0x2211, 0x2211},
+ {0x2215, 0x2215},
+ {0x221a, 0x221a},
+ {0x221d, 0x2220},
+ {0x2223, 0x2223},
+ {0x2225, 0x2225},
+ {0x2227, 0x222c},
+ {0x222e, 0x222e},
+ {0x2234, 0x2237},
+ {0x223c, 0x223d},
+ {0x2248, 0x2248},
+ {0x224c, 0x224c},
+ {0x2252, 0x2252},
+ {0x2260, 0x2261},
+ {0x2264, 0x2267},
+ {0x226a, 0x226b},
+ {0x226e, 0x226f},
+ {0x2282, 0x2283},
+ {0x2286, 0x2287},
+ {0x2295, 0x2295},
+ {0x2299, 0x2299},
+ {0x22a5, 0x22a5},
+ {0x22bf, 0x22bf},
+ {0x2312, 0x2312},
+ {0x2460, 0x24e9},
+ {0x24eb, 0x254b},
+ {0x2550, 0x2573},
+ {0x2580, 0x258f},
+ {0x2592, 0x2595},
+ {0x25a0, 0x25a1},
+ {0x25a3, 0x25a9},
+ {0x25b2, 0x25b3},
+ {0x25b6, 0x25b7},
+ {0x25bc, 0x25bd},
+ {0x25c0, 0x25c1},
+ {0x25c6, 0x25c8},
+ {0x25cb, 0x25cb},
+ {0x25ce, 0x25d1},
+ {0x25e2, 0x25e5},
+ {0x25ef, 0x25ef},
+ {0x2605, 0x2606},
+ {0x2609, 0x2609},
+ {0x260e, 0x260f},
+ {0x2614, 0x2615},
+ {0x261c, 0x261c},
+ {0x261e, 0x261e},
+ {0x2640, 0x2640},
+ {0x2642, 0x2642},
+ {0x2660, 0x2661},
+ {0x2663, 0x2665},
+ {0x2667, 0x266a},
+ {0x266c, 0x266d},
+ {0x266f, 0x266f},
+ {0x269e, 0x269f},
+ {0x26be, 0x26bf},
+ {0x26c4, 0x26cd},
+ {0x26cf, 0x26e1},
+ {0x26e3, 0x26e3},
+ {0x26e8, 0x26ff},
+ {0x273d, 0x273d},
+ {0x2757, 0x2757},
+ {0x2776, 0x277f},
+ {0x2b55, 0x2b59},
+ {0x3248, 0x324f},
+ {0xe000, 0xf8ff},
+ {0xfe00, 0xfe0f},
+ {0xfffd, 0xfffd},
+ {0x1f100, 0x1f10a},
+ {0x1f110, 0x1f12d},
+ {0x1f130, 0x1f169},
+ {0x1f170, 0x1f19a},
+ {0xe0100, 0xe01ef},
+ {0xf0000, 0xffffd},
+ {0x100000, 0x10fffd}
+};
+
/*
* For UTF-8 character "c" return 2 for a double-width character, 1 for others.
* Returns 4 or 6 for an unprintable character.
@@ -1261,185 +1440,6 @@ utf_char2cells(int c)
{0x30000, 0x3fffd}
};

- /* Sorted list of non-overlapping intervals of East Asian Ambiguous
- * characters, generated with ../runtime/tools/unicode.vim. */
- static struct interval ambiguous[] =
- {
- {0x00a1, 0x00a1},
- {0x00a4, 0x00a4},
- {0x00a7, 0x00a8},
- {0x00aa, 0x00aa},
- {0x00ad, 0x00ae},
- {0x00b0, 0x00b4},
- {0x00b6, 0x00ba},
- {0x00bc, 0x00bf},
- {0x00c6, 0x00c6},
- {0x00d0, 0x00d0},
- {0x00d7, 0x00d8},
- {0x00de, 0x00e1},
- {0x00e6, 0x00e6},
- {0x00e8, 0x00ea},
- {0x00ec, 0x00ed},
- {0x00f0, 0x00f0},
- {0x00f2, 0x00f3},
- {0x00f7, 0x00fa},
- {0x00fc, 0x00fc},
- {0x00fe, 0x00fe},
- {0x0101, 0x0101},
- {0x0111, 0x0111},
- {0x0113, 0x0113},
- {0x011b, 0x011b},
- {0x0126, 0x0127},
- {0x012b, 0x012b},
- {0x0131, 0x0133},
- {0x0138, 0x0138},
- {0x013f, 0x0142},
- {0x0144, 0x0144},
- {0x0148, 0x014b},
- {0x014d, 0x014d},
- {0x0152, 0x0153},
- {0x0166, 0x0167},
- {0x016b, 0x016b},
- {0x01ce, 0x01ce},
- {0x01d0, 0x01d0},
- {0x01d2, 0x01d2},
- {0x01d4, 0x01d4},
- {0x01d6, 0x01d6},
- {0x01d8, 0x01d8},
- {0x01da, 0x01da},
- {0x01dc, 0x01dc},
- {0x0251, 0x0251},
- {0x0261, 0x0261},
- {0x02c4, 0x02c4},
- {0x02c7, 0x02c7},
- {0x02c9, 0x02cb},
- {0x02cd, 0x02cd},
- {0x02d0, 0x02d0},
- {0x02d8, 0x02db},
- {0x02dd, 0x02dd},
- {0x02df, 0x02df},
- {0x0300, 0x036f},
- {0x0391, 0x03a1},
- {0x03a3, 0x03a9},
- {0x03b1, 0x03c1},
- {0x03c3, 0x03c9},
- {0x0401, 0x0401},
- {0x0410, 0x044f},
- {0x0451, 0x0451},
- {0x2010, 0x2010},
- {0x2013, 0x2016},
- {0x2018, 0x2019},
- {0x201c, 0x201d},
- {0x2020, 0x2022},
- {0x2024, 0x2027},
- {0x2030, 0x2030},
- {0x2032, 0x2033},
- {0x2035, 0x2035},
- {0x203b, 0x203b},
- {0x203e, 0x203e},
- {0x2074, 0x2074},
- {0x207f, 0x207f},
- {0x2081, 0x2084},
- {0x20ac, 0x20ac},
- {0x2103, 0x2103},
- {0x2105, 0x2105},
- {0x2109, 0x2109},
- {0x2113, 0x2113},
- {0x2116, 0x2116},
- {0x2121, 0x2122},
- {0x2126, 0x2126},
- {0x212b, 0x212b},
- {0x2153, 0x2154},
- {0x215b, 0x215e},
- {0x2160, 0x216b},
- {0x2170, 0x2179},
- {0x2189, 0x2189},
- {0x2190, 0x2199},
- {0x21b8, 0x21b9},
- {0x21d2, 0x21d2},
- {0x21d4, 0x21d4},
- {0x21e7, 0x21e7},
- {0x2200, 0x2200},
- {0x2202, 0x2203},
- {0x2207, 0x2208},
- {0x220b, 0x220b},
- {0x220f, 0x220f},
- {0x2211, 0x2211},
- {0x2215, 0x2215},
- {0x221a, 0x221a},
- {0x221d, 0x2220},
- {0x2223, 0x2223},
- {0x2225, 0x2225},
- {0x2227, 0x222c},
- {0x222e, 0x222e},
- {0x2234, 0x2237},
- {0x223c, 0x223d},
- {0x2248, 0x2248},
- {0x224c, 0x224c},
- {0x2252, 0x2252},
- {0x2260, 0x2261},
- {0x2264, 0x2267},
- {0x226a, 0x226b},
- {0x226e, 0x226f},
- {0x2282, 0x2283},
- {0x2286, 0x2287},
- {0x2295, 0x2295},
- {0x2299, 0x2299},
- {0x22a5, 0x22a5},
- {0x22bf, 0x22bf},
- {0x2312, 0x2312},
- {0x2460, 0x24e9},
- {0x24eb, 0x254b},
- {0x2550, 0x2573},
- {0x2580, 0x258f},
- {0x2592, 0x2595},
- {0x25a0, 0x25a1},
- {0x25a3, 0x25a9},
- {0x25b2, 0x25b3},
- {0x25b6, 0x25b7},
- {0x25bc, 0x25bd},
- {0x25c0, 0x25c1},
- {0x25c6, 0x25c8},
- {0x25cb, 0x25cb},
- {0x25ce, 0x25d1},
- {0x25e2, 0x25e5},
- {0x25ef, 0x25ef},
- {0x2605, 0x2606},
- {0x2609, 0x2609},
- {0x260e, 0x260f},
- {0x2614, 0x2615},
- {0x261c, 0x261c},
- {0x261e, 0x261e},
- {0x2640, 0x2640},
- {0x2642, 0x2642},
- {0x2660, 0x2661},
- {0x2663, 0x2665},
- {0x2667, 0x266a},
- {0x266c, 0x266d},
- {0x266f, 0x266f},
- {0x269e, 0x269f},
- {0x26be, 0x26bf},
- {0x26c4, 0x26cd},
- {0x26cf, 0x26e1},
- {0x26e3, 0x26e3},
- {0x26e8, 0x26ff},
- {0x273d, 0x273d},
- {0x2757, 0x2757},
- {0x2776, 0x277f},
- {0x2b55, 0x2b59},
- {0x3248, 0x324f},
- {0xe000, 0xf8ff},
- {0xfe00, 0xfe0f},
- {0xfffd, 0xfffd},
- {0x1f100, 0x1f10a},
- {0x1f110, 0x1f12d},
- {0x1f130, 0x1f169},
- {0x1f170, 0x1f19a},
- {0xe0100, 0xe01ef},
- {0xf0000, 0xffffd},
- {0x100000, 0x10fffd}
- };
-
/* Sorted list of non-overlapping intervals of Emoji characters that don't
* have ambiguous or double width,
* based on http://unicode.org/emoji/charts/emoji-list.html */
@@ -2478,6 +2478,122 @@ utf_printable(int c)
#endif
}

+/* Sorted list of non-overlapping intervals of all Emoji characters,
+ * based on http://unicode.org/emoji/charts/emoji-list.html */
+static struct interval emoji_all[] =
+{
+ {0x203c, 0x203c},
+ {0x2049, 0x2049},
+ {0x2122, 0x2122},
+ {0x2139, 0x2139},
+ {0x2194, 0x2199},
+ {0x21a9, 0x21aa},
+ {0x231a, 0x231b},
+ {0x2328, 0x2328},
+ {0x23cf, 0x23cf},
+ {0x23e9, 0x23f3},
+ {0x24c2, 0x24c2},
+ {0x25aa, 0x25ab},
+ {0x25b6, 0x25b6},
+ {0x25c0, 0x25c0},
+ {0x25fb, 0x25fe},
+ {0x2600, 0x2604},
+ {0x260e, 0x260e},
+ {0x2611, 0x2611},
+ {0x2614, 0x2615},
+ {0x2618, 0x2618},
+ {0x261d, 0x261d},
+ {0x2620, 0x2620},
+ {0x2622, 0x2623},
+ {0x2626, 0x2626},
+ {0x262a, 0x262a},
+ {0x262e, 0x262f},
+ {0x2638, 0x263a},
+ {0x2648, 0x2653},
+ {0x2660, 0x2660},
+ {0x2663, 0x2663},
+ {0x2665, 0x2666},
+ {0x2668, 0x2668},
+ {0x267b, 0x267b},
+ {0x267f, 0x267f},
+ {0x2692, 0x2694},
+ {0x2696, 0x2697},
+ {0x2699, 0x2699},
+ {0x269b, 0x269c},
+ {0x26a0, 0x26a1},
+ {0x26aa, 0x26ab},
+ {0x26b0, 0x26b1},
+ {0x26bd, 0x26be},
+ {0x26c4, 0x26c5},
+ {0x26c8, 0x26c8},
+ {0x26ce, 0x26cf},
+ {0x26d1, 0x26d1},
+ {0x26d3, 0x26d4},
+ {0x26e9, 0x26ea},
+ {0x26f0, 0x26f5},
+ {0x26f7, 0x26fa},
+ {0x26fd, 0x26fd},
+ {0x2702, 0x2702},
+ {0x2705, 0x2705},
+ {0x2708, 0x270d},
+ {0x270f, 0x270f},
+ {0x2712, 0x2712},
+ {0x2714, 0x2714},
+ {0x2716, 0x2716},
+ {0x271d, 0x271d},
+ {0x2721, 0x2721},
+ {0x2728, 0x2728},
+ {0x2733, 0x2734},
+ {0x2744, 0x2744},
+ {0x2747, 0x2747},
+ {0x274c, 0x274c},
+ {0x274e, 0x274e},
+ {0x2753, 0x2755},
+ {0x2757, 0x2757},
+ {0x2763, 0x2764},
+ {0x2795, 0x2797},
+ {0x27a1, 0x27a1},
+ {0x27b0, 0x27b0},
+ {0x27bf, 0x27bf},
+ {0x2934, 0x2935},
+ {0x2b05, 0x2b07},
+ {0x2b1b, 0x2b1c},
+ {0x2b50, 0x2b50},
+ {0x2b55, 0x2b55},
+ {0x3030, 0x3030},
+ {0x303d, 0x303d},
+ {0x3297, 0x3297},
+ {0x3299, 0x3299},
+ {0x1f004, 0x1f004},
+ {0x1f0cf, 0x1f0cf},
+ {0x1f170, 0x1f171},
+ {0x1f17e, 0x1f17f},
+ {0x1f18e, 0x1f18e},
+ {0x1f191, 0x1f19a},
+ {0x1f1e6, 0x1f1ff},
+ {0x1f201, 0x1f202},
+ {0x1f21a, 0x1f21a},
+ {0x1f22f, 0x1f22f},
+ {0x1f232, 0x1f23a},
+ {0x1f250, 0x1f251},
+ {0x1f300, 0x1f320},
+ {0x1f330, 0x1f335},
+ {0x1f337, 0x1f37c},
+ {0x1f380, 0x1f393},
+ {0x1f3a0, 0x1f3c4},
+ {0x1f3c6, 0x1f3ca},
+ {0x1f3e0, 0x1f3f0},
+ {0x1f400, 0x1f43e},
+ {0x1f440, 0x1f440},
+ {0x1f442, 0x1f4f7},
+ {0x1f4f9, 0x1f4fc},
+ {0x1f500, 0x1f53d},
+ {0x1f550, 0x1f567},
+ {0x1f5fb, 0x1f640},
+ {0x1f645, 0x1f64f},
+ {0x1f680, 0x1f6c5}
+};
+
/*
* Get class of a Unicode character.
* 0: white space
@@ -2564,122 +2680,6 @@ utf_class(int c)
{0x2f800, 0x2fa1f, 0x4e00}, /* CJK Ideographs */
};

- /* Sorted list of non-overlapping intervals of all Emoji characters,
- * based on http://unicode.org/emoji/charts/emoji-list.html */
- static struct interval emoji_all[] =
- {
- {0x203c, 0x203c},
- {0x2049, 0x2049},
- {0x2122, 0x2122},
- {0x2139, 0x2139},
- {0x2194, 0x2199},
- {0x21a9, 0x21aa},
- {0x231a, 0x231b},
- {0x2328, 0x2328},
- {0x23cf, 0x23cf},
- {0x23e9, 0x23f3},
- {0x24c2, 0x24c2},
- {0x25aa, 0x25ab},
- {0x25b6, 0x25b6},
- {0x25c0, 0x25c0},
- {0x25fb, 0x25fe},
- {0x2600, 0x2604},
- {0x260e, 0x260e},
- {0x2611, 0x2611},
- {0x2614, 0x2615},
- {0x2618, 0x2618},
- {0x261d, 0x261d},
- {0x2620, 0x2620},
- {0x2622, 0x2623},
- {0x2626, 0x2626},
- {0x262a, 0x262a},
- {0x262e, 0x262f},
- {0x2638, 0x263a},
- {0x2648, 0x2653},
- {0x2660, 0x2660},
- {0x2663, 0x2663},
- {0x2665, 0x2666},
- {0x2668, 0x2668},
- {0x267b, 0x267b},
- {0x267f, 0x267f},
- {0x2692, 0x2694},
- {0x2696, 0x2697},
- {0x2699, 0x2699},
- {0x269b, 0x269c},
- {0x26a0, 0x26a1},
- {0x26aa, 0x26ab},
- {0x26b0, 0x26b1},
- {0x26bd, 0x26be},
- {0x26c4, 0x26c5},
- {0x26c8, 0x26c8},
- {0x26ce, 0x26cf},
- {0x26d1, 0x26d1},
- {0x26d3, 0x26d4},
- {0x26e9, 0x26ea},
- {0x26f0, 0x26f5},
- {0x26f7, 0x26fa},
- {0x26fd, 0x26fd},
- {0x2702, 0x2702},
- {0x2705, 0x2705},
- {0x2708, 0x270d},
- {0x270f, 0x270f},
- {0x2712, 0x2712},
- {0x2714, 0x2714},
- {0x2716, 0x2716},
- {0x271d, 0x271d},
- {0x2721, 0x2721},
- {0x2728, 0x2728},
- {0x2733, 0x2734},
- {0x2744, 0x2744},
- {0x2747, 0x2747},
- {0x274c, 0x274c},
- {0x274e, 0x274e},
- {0x2753, 0x2755},
- {0x2757, 0x2757},
- {0x2763, 0x2764},
- {0x2795, 0x2797},
- {0x27a1, 0x27a1},
- {0x27b0, 0x27b0},
- {0x27bf, 0x27bf},
- {0x2934, 0x2935},
- {0x2b05, 0x2b07},
- {0x2b1b, 0x2b1c},
- {0x2b50, 0x2b50},
- {0x2b55, 0x2b55},
- {0x3030, 0x3030},
- {0x303d, 0x303d},
- {0x3297, 0x3297},
- {0x3299, 0x3299},
- {0x1f004, 0x1f004},
- {0x1f0cf, 0x1f0cf},
- {0x1f170, 0x1f171},
- {0x1f17e, 0x1f17f},
- {0x1f18e, 0x1f18e},
- {0x1f191, 0x1f19a},
- {0x1f1e6, 0x1f1ff},
- {0x1f201, 0x1f202},
- {0x1f21a, 0x1f21a},
- {0x1f22f, 0x1f22f},
- {0x1f232, 0x1f23a},
- {0x1f250, 0x1f251},
- {0x1f300, 0x1f320},
- {0x1f330, 0x1f335},
- {0x1f337, 0x1f37c},
- {0x1f380, 0x1f393},
- {0x1f3a0, 0x1f3c4},
- {0x1f3c6, 0x1f3ca},
- {0x1f3e0, 0x1f3f0},
- {0x1f400, 0x1f43e},
- {0x1f440, 0x1f440},
- {0x1f442, 0x1f4f7},
- {0x1f4f9, 0x1f4fc},
- {0x1f500, 0x1f53d},
- {0x1f550, 0x1f567},
- {0x1f5fb, 0x1f640},
- {0x1f645, 0x1f64f},
- {0x1f680, 0x1f6c5}
- };
-
int bot = 0;
int top = sizeof(classes) / sizeof(struct clinterval) - 1;
int mid;
@@ -2714,6 +2714,13 @@ utf_class(int c)
return 2;
}

+ int
+utf_ambiguous_width(int c)
+{
+ return c >= 0x80 && (intable(ambiguous, sizeof(ambiguous), c)
+ || intable(emoji_all, sizeof(emoji_all), c));
+}
+
/*
* Code for Unicode case-dependent operations. Based on notes in
* http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
diff --git a/src/proto/mbyte.pro b/src/proto/mbyte.pro
index bb00a50..0e41a41 100644
--- a/src/proto/mbyte.pro
+++ b/src/proto/mbyte.pro
@@ -10,6 +10,7 @@ int latin_char2len(int c);
int latin_char2bytes(int c, char_u *buf);
int latin_ptr2len(char_u *p);
int latin_ptr2len_len(char_u *p, int size);
+int utf_ambiguous_width(int c);
int utf_char2cells(int c);
int latin_ptr2cells(char_u *p);
int utf_ptr2cells(char_u *p);
diff --git a/src/screen.c b/src/screen.c
index 77fb3b9..4c2b70c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -8052,7 +8052,9 @@ screen_char(unsigned off, int row, int col)
buf[utfc_char2bytes(off, buf)] = NUL;

out_str(buf);
- if (utf_char2cells(ScreenLinesUC[off]) > 1)
+ if (utf_ambiguous_width(ScreenLinesUC[off]))
+ screen_cur_col = 9999;
+ else if (utf_char2cells(ScreenLinesUC[off]) > 1)
++screen_cur_col;
}
else
diff --git a/src/version.c b/src/version.c
index ab2cc39..cfca22e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1697,
+/**/
1696,
/**/
1695,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 298c65971e884666d57c32bff6b730d517d9dc30
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 22:24:20 2016 +0200

patch 7.4.1698
Problem: Two tests fail when running tests with MinGW. (Michael Soyka)
Solution: Convert test_getcwd.ok test_wordcount.ok to unix fileformat.
---
src/testdir/Make_ming.mak | 4 +++-
src/version.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index 030d527..3c92d8c 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -65,9 +65,11 @@ win32: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32)
echo ALL DONE

fixff:
+ # TODO: find a way to avoid changing the distributed files.
-$(VIMPROG) -u dos.vim $(NO_PLUGIN) "+argdo set ff=dos|upd" +q *.in *.ok
-$(VIMPROG) -u dos.vim $(NO_PLUGIN) "+argdo set ff=unix|upd" +q \
- dotest.in test60.ok test71.ok test74.ok test_listchars.ok
+ dotest.in test60.ok test71.ok test74.ok test_listchars.ok \
+ test_getcwd.ok test_wordcount.ok

clean:
-$(DEL) *.out
diff --git a/src/version.c b/src/version.c
index cfca22e..19e44d8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1698,
+/**/
1697,
/**/
1696,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 71fb0c146bef08dc276fc5793bd47366e6e0f32a
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 2 22:44:16 2016 +0200

patch 7.4.1699
Problem: :packadd does not work the same when used early or late.
Solution: Always load plugins matching "plugin/**/*.vim".
---
src/ex_cmds2.c | 2 +-
src/testdir/test_packadd.vim | 7 ++++++-
src/version.c | 2 ++
3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index c03c240..9f74376 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3376,7 +3376,7 @@ add_pack_plugin(char_u *fname, void *cookie)

if (load_files)
{
- static char *plugpat = "%s/plugin/*.vim";
+ static char *plugpat = "%s/plugin/**/*.vim";
static char *ftpat = "%s/ftdetect/*.vim";
int len;
char_u *pat;
diff --git a/src/testdir/test_packadd.vim b/src/testdir/test_packadd.vim
index 44b733f..9e75c33 100644
--- a/src/testdir/test_packadd.vim
+++ b/src/testdir/test_packadd.vim
@@ -11,7 +11,7 @@ func TearDown()
endfunc

func Test_packadd()
- call mkdir(s:plugdir . '/plugin', 'p')
+ call mkdir(s:plugdir . '/plugin/also', 'p')
call mkdir(s:plugdir . '/ftdetect', 'p')
set rtp&
let rtp = &rtp
@@ -21,6 +21,10 @@ func Test_packadd()
call setline(1, 'let g:plugin_works = 42')
wq

+ exe 'split ' . s:plugdir . '/plugin/also/loaded.vim'
+ call setline(1, 'let g:plugin_also_works = 77')
+ wq
+
exe 'split ' . s:plugdir . '/ftdetect/test.vim'
call setline(1, 'let g:ftdetect_works = 17')
wq
@@ -28,6 +32,7 @@ func Test_packadd()
packadd mytest

call assert_equal(42, g:plugin_works)
+ call assert_equal(77, g:plugin_also_works)
call assert_equal(17, g:ftdetect_works)
call assert_true(len(&rtp) > len(rtp))
call assert_true(&rtp =~ 'testdir/Xdir/pack/mine/opt/mytest\($\|,\)')
diff --git a/src/version.c b/src/version.c
index 19e44d8..23d4acb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1699,
+/**/
1698,
/**/
1697,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 22e421549d54147d003f6444de007cb1d73f1d27
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 14:02:02 2016 +0200

patch 7.4.1700
Problem: Equivalence classes are not properly tested.
Solution: Add tests for multi-byte and latin1. Fix an error. (Owen Leibman)
---
src/regexp.c | 4 ++--
src/testdir/Make_all.mak | 2 ++
src/testdir/test_alot_latin.vim | 7 +++++++
src/testdir/test_alot_utf8.vim | 7 +++++++
src/testdir/test_regexp_latin.vim | 32 ++++++++++++++++++++++++++++++++
src/testdir/test_regexp_utf8.vim | 35 +++++++++++++++++++++++++++++++++++
src/version.c | 2 ++
7 files changed, 87 insertions(+), 2 deletions(-)

diff --git a/src/regexp.c b/src/regexp.c
index cd7dc3f..b20e9c5 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -791,7 +791,7 @@ char *EQUIVAL_CLASS_C[16] = {
"E\x71\x72\x73\x74",
"I\x75\x76\x77\x78",
"N\x69",
- "O\xEB\xEC\xED\xEE\xEF",
+ "O\xEB\xEC\xED\xEE\xEF\x80",
"U\xFB\xFC\xFD\xFE",
"Y\xBA",
"a\x42\x43\x44\x45\x46\x47",
@@ -799,7 +799,7 @@ char *EQUIVAL_CLASS_C[16] = {
"e\x51\x52\x53\x54",
"i\x55\x56\x57\x58",
"n\x49",
- "o\xCB\xCC\xCD\xCE\xCF",
+ "o\xCB\xCC\xCD\xCE\xCF\x70",
"u\xDB\xDC\xDD\xDE",
"y\x8D\xDF",
};
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 98cf985..2540abf 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -183,6 +183,8 @@ NEW_TESTS = test_arglist.res \
test_viml.res \
test_visual.res \
test_window_id.res \
+ test_alot_latin.res \
+ test_alot_utf8.res \
test_alot.res


diff --git a/src/testdir/test_alot_latin.vim b/src/testdir/test_alot_latin.vim
new file mode 100644
index 0000000..23a404c
--- /dev/null
+++ b/src/testdir/test_alot_latin.vim
@@ -0,0 +1,7 @@
+" A series of tests that can run in one Vim invocation.
+" This makes testing go faster, since Vim doesn't need to restart.
+
+" These tests use latin1 'encoding'. Setting 'encoding' is in the individual
+" files, so that they can be run by themselves.
+
+source test_regexp_latin.vim
diff --git a/src/testdir/test_alot_utf8.vim b/src/testdir/test_alot_utf8.vim
new file mode 100644
index 0000000..20d919c
--- /dev/null
+++ b/src/testdir/test_alot_utf8.vim
@@ -0,0 +1,7 @@
+" A series of tests that can run in one Vim invocation.
+" This makes testing go faster, since Vim doesn't need to restart.
+
+" These tests use utf8 'encoding'. Setting 'encoding' is in the individual
+" files, so that they can be run by themselves.
+
+source test_regexp_utf8.vim
diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim
new file mode 100644
index 0000000..8528412
--- /dev/null
+++ b/src/testdir/test_regexp_latin.vim
@@ -0,0 +1,32 @@
+" Tests for regexp in latin1 encoding
+set encoding=latin1
+scriptencoding latin1
+
+func s:equivalence_test()
+ let str = "A������ B C D E���� F G H I���� J K L M N� O������ P Q R S T U���� V W X Y� Z a������ b c d e���� f g h i���� j k l m n� o������ p q r s t u���� v w x y�� z"
+ let groups = split(str)
+ for group1 in groups
+ for c in split(group1, '\zs')
+ " next statement confirms that equivalence class matches every
+ " character in group
+ call assert_match('^[[=' . c . '=]]*$', group1)
+ for group2 in groups
+ if group2 != group1
+ " next statement converts that equivalence class doesn't match
+ " a character in any other group
+ call assert_equal(-1, match(group2, '[[=' . c . '=]]'))
+ endif
+ endfor
+ endfor
+ endfor
+endfunc
+
+func Test_equivalence_re1()
+ set re=1
+ call s:equivalence_test()
+endfunc
+
+func Test_equivalence_re2()
+ set re=2
+ call s:equivalence_test()
+endfunc
diff --git a/src/testdir/test_regexp_utf8.vim b/src/testdir/test_regexp_utf8.vim
new file mode 100644
index 0000000..f5d7ec9
--- /dev/null
+++ b/src/testdir/test_regexp_utf8.vim
@@ -0,0 +1,35 @@
+" Tests for regexp in utf8 encoding
+if !has('multi_byte')
+ finish
+endif
+set encoding=utf-8
+scriptencoding utf-8
+
+func s:equivalence_test()
+ let str = "AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ"
+ let groups = split(str)
+ for group1 in groups
+ for c in split(group1, '\zs')
+ " next statement confirms that equivalence class matches every
+ " character in group
+ call assert_match('^[[=' . c . '=]]*$', group1)
+ for group2 in groups
+ if group2 != group1
+ " next statement converts that equivalence class doesn't match
+ " character in any other group
+ call assert_equal(-1, match(group2, '[[=' . c . '=]]'))
+ endif
+ endfor
+ endfor
+ endfor
+endfunc
+
+func Test_equivalence_re1()
+ set re=1
+ call s:equivalence_test()
+endfunc
+
+func Test_equivalence_re2()
+ set re=2
+ call s:equivalence_test()
+endfunc
diff --git a/src/version.c b/src/version.c
index 23d4acb..5ecf9e0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1700,
+/**/
1699,
/**/
1698,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit f9f22dbe4f90673ecce601a9dee4bb750ce3cd8f
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 14:09:59 2016 +0200

patch 7.4.1701
Problem: Equivalence classes still tested in old style tests.
Solution: Remove the duplicate.
---
src/testdir/test44.in | 6 ------
src/testdir/test44.ok | 2 --
src/testdir/test99.in | 4 ----
src/testdir/test99.ok | 2 --
src/version.c | 2 ++
5 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/testdir/test44.in b/src/testdir/test44.in
index 44c3ea7..7126392 100644
--- a/src/testdir/test44.in
+++ b/src/testdir/test44.in
@@ -34,10 +34,6 @@ x:" f
/[\U1234abcd\u1234\uabcd]
x:" g
/\%d21879b
-x:" h
-/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e
-x:" i
-/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e
x:" j Test backwards search from a multi-byte char
/x
x?.
@@ -80,8 +76,6 @@ d 天使x
e ������y
f ������z
g a啷bb
-h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ
-i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ
j 0123❤x
k combinations
l äö üᾱ̆́
diff --git a/src/testdir/test44.ok b/src/testdir/test44.ok
index 42b46e9..45774d7 100644
--- a/src/testdir/test44.ok
+++ b/src/testdir/test44.ok
@@ -14,8 +14,6 @@ d 使x
e y
f z
g abb
-h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐ
-i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑ
j 012❤
k œ̄ṣ́m̥̄ᾱ̆́
l ä ö ü ᾱ̆́
diff --git a/src/testdir/test99.in b/src/testdir/test99.in
index d992d4d..3961244 100644
--- a/src/testdir/test99.in
+++ b/src/testdir/test99.in
@@ -29,8 +29,6 @@ x/[\u4f7f\u5929]\+
x/\%U12345678
x/[\U1234abcd\u1234\uabcd]
x/\%d21879b
-x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e
-x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e
x:" Test backwards search from a multi-byte char
/x
x?.
@@ -66,8 +64,6 @@ d 天使x
e ������y
f ������z
g a啷bb
-h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ
-i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ
j 0123❤x
k combinations
l äö üᾱ̆́
diff --git a/src/testdir/test99.ok b/src/testdir/test99.ok
index 330f455..dea3665 100644
--- a/src/testdir/test99.ok
+++ b/src/testdir/test99.ok
@@ -14,8 +14,6 @@ d 使x
e y
f z
g abb
-h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐ
-i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑ
j 012❤
k œ̄ṣ́m̥̄ᾱ̆́
l ä ö ü ᾱ̆́
diff --git a/src/version.c b/src/version.c
index 5ecf9e0..9d6deb6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1701,
+/**/
1700,
/**/
1699,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 4afc7c5d4a73340831077a02bfe1f74935e7f4a1
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 14:56:52 2016 +0200

patch 7.4.1702
Problem: Using freed memory when parsing 'printoptions' fails.
Solution: Save the old options and restore them in case of an error.
(Dominique)
---
src/hardcopy.c | 35 ++++++++++++++++++++++++++++++-----
src/testdir/test_hardcopy.vim | 4 ++++
src/version.c | 2 ++
3 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/src/hardcopy.c b/src/hardcopy.c
index 74fee2e..f65a6dd 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -189,6 +189,8 @@ parse_list_options(
option_table_T *table,
int table_size)
{
+ option_table_T *old_opts;
+ char_u *ret = NULL;
char_u *stringp;
char_u *colonp;
char_u *commap;
@@ -196,8 +198,16 @@ parse_list_options(
int idx = 0; /* init for GCC */
int len;

+ /* Save the old values, so that they can be restored in case of an error. */
+ old_opts = (option_table_T *)alloc(sizeof(option_table_T) * table_size);
+ if (old_opts == NULL)
+ return NULL;
+
for (idx = 0; idx < table_size; ++idx)
+ {
+ old_opts[idx] = table[idx];
table[idx].present = FALSE;
+ }

/*
* Repeat for all comma separated parts.
@@ -207,7 +217,10 @@ parse_list_options(
{
colonp = vim_strchr(stringp, ':');
if (colonp == NULL)
- return (char_u *)N_("E550: Missing colon");
+ {
+ ret = (char_u *)N_("E550: Missing colon");
+ break;
+ }
commap = vim_strchr(stringp, ',');
if (commap == NULL)
commap = option_str + STRLEN(option_str);
@@ -219,15 +232,20 @@ parse_list_options(
break;

if (idx == table_size)
- return (char_u *)N_("E551: Illegal component");
-
+ {
+ ret = (char_u *)N_("E551: Illegal component");
+ break;
+ }
p = colonp + 1;
table[idx].present = TRUE;

if (table[idx].hasnum)
{
if (!VIM_ISDIGIT(*p))
- return (char_u *)N_("E552: digit expected");
+ {
+ ret = (char_u *)N_("E552: digit expected");
+ break;
+ }

table[idx].number = getdigits(&p); /*advances p*/
}
@@ -240,7 +258,14 @@ parse_list_options(
++stringp;
}

- return NULL;
+ if (ret != NULL)
+ {
+ /* Restore old options in case of error */
+ for (idx = 0; idx < table_size; ++idx)
+ table[idx] = old_opts[idx];
+ }
+ vim_free(old_opts);
+ return ret;
}


diff --git a/src/testdir/test_hardcopy.vim b/src/testdir/test_hardcopy.vim
index 4629d17..ea9790d 100644
--- a/src/testdir/test_hardcopy.vim
+++ b/src/testdir/test_hardcopy.vim
@@ -23,6 +23,10 @@ func Test_printoptions_parsing()
set printoptions=formfeed:y
set printoptions=
set printoptions&
+
+ call assert_fails('set printoptions=paper', 'E550:')
+ call assert_fails('set printoptions=shredder:on', 'E551:')
+ call assert_fails('set printoptions=left:no', 'E552:')
endfunc

func Test_printmbfont_parsing()
diff --git a/src/version.c b/src/version.c
index 9d6deb6..5694466 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1702,
+/**/
1701,
/**/
1700,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:55 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit b50e5f56861deb867478997397f7c784a7043233
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 20:57:20 2016 +0200

patch 7.4.1703
Problem: Can't assert for not equal and not matching.
Solution: Add assert_notmatch() and assert_notequal().
---
runtime/doc/eval.txt | 14 +++++++-
src/eval.c | 86 +++++++++++++++++++++++++++++++++++----------
src/testdir/test_assert.vim | 25 +++++++++++++
src/version.c | 2 ++
4 files changed, 107 insertions(+), 20 deletions(-)

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f1425ba..b0b8479 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1801,11 +1801,13 @@ arglistid( [{winnr} [, {tabnr}]])
Number argument list id
argv( {nr}) String {nr} entry of the argument list
argv() List the argument list
-assert_equal( {exp}, {act} [, {msg}]) none assert {exp} equals {act}
+assert_equal( {exp}, {act} [, {msg}]) none assert {exp} is equal to {act}
assert_exception( {error} [, {msg}]) none assert {error} is in v:exception
assert_fails( {cmd} [, {error}]) none assert {cmd} fails
assert_false( {actual} [, {msg}]) none assert {actual} is false
assert_match( {pat}, {text} [, {msg}]) none assert {pat} matches {text}
+assert_notequal( {exp}, {act} [, {msg}]) none assert {exp} is not equal {act}
+assert_notmatch( {pat}, {text} [, {msg}]) none assert {pat} not matches {text}
assert_true( {actual} [, {msg}]) none assert {actual} is true
asin( {expr}) Float arc sine of {expr}
atan( {expr}) Float arc tangent of {expr}
@@ -2338,6 +2340,16 @@ assert_match({pattern}, {actual} [, {msg}])
< Will result in a string to be added to |v:errors|:
test.vim line 12: Pattern '^f.*o$' does not match 'foobar' ~

+ *assert_notequal()*
+assert_notequal({expected}, {actual} [, {msg}])
+ The opposite of `assert_equal()`: add an error message to
+ |v:errors| when {expected} and {actual} are equal.
+
+ *assert_notmatch()*
+assert_notmatch({pattern}, {actual} [, {msg}])
+ The opposite of `assert_match()`: add an error message to
+ |v:errors| when {pattern} matches {actual}.
+
assert_true({actual} [, {msg}]) *assert_true()*
When {actual} is not true an error message is added to
|v:errors|, like with |assert_equal()|.
diff --git a/src/eval.c b/src/eval.c
index e1d69d0..ab006b1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -476,6 +476,8 @@ static void f_assert_exception(typval_T *argvars, typval_T *rettv);
static void f_assert_fails(typval_T *argvars, typval_T *rettv);
static void f_assert_false(typval_T *argvars, typval_T *rettv);
static void f_assert_match(typval_T *argvars, typval_T *rettv);
+static void f_assert_notequal(typval_T *argvars, typval_T *rettv);
+static void f_assert_notmatch(typval_T *argvars, typval_T *rettv);
static void f_assert_true(typval_T *argvars, typval_T *rettv);
#ifdef FEAT_FLOAT
static void f_asin(typval_T *argvars, typval_T *rettv);
@@ -8182,6 +8184,8 @@ static struct fst
{"assert_fails", 1, 2, f_assert_fails},
{"assert_false", 1, 2, f_assert_false},
{"assert_match", 2, 3, f_assert_match},
+ {"assert_notequal", 2, 3, f_assert_notequal},
+ {"assert_notmatch", 2, 3, f_assert_notmatch},
{"assert_true", 1, 2, f_assert_true},
#ifdef FEAT_FLOAT
{"atan", 1, 1, f_atan},
@@ -9323,8 +9327,17 @@ f_argv(typval_T *argvars, typval_T *rettv)
alist_name(&ARGLIST[idx]), -1);
}

+typedef enum
+{
+ ASSERT_EQUAL,
+ ASSERT_NOTEQUAL,
+ ASSERT_MATCH,
+ ASSERT_NOTMATCH,
+ ASSERT_OTHER,
+} assert_type_T;
+
static void prepare_assert_error(garray_T*gap);
-static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv, char_u *exp_str, typval_T *exp_tv, typval_T *got_tv, int is_match);
+static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv, char_u *exp_str, typval_T *exp_tv, typval_T *got_tv, assert_type_T is_match);
static void assert_error(garray_T *gap);
static void assert_bool(typval_T *argvars, int isTrue);

@@ -9400,7 +9413,7 @@ fill_assert_error(
char_u *exp_str,
typval_T *exp_tv,
typval_T *got_tv,
- int is_match)
+ assert_type_T atype)
{
char_u numbuf[NUMBUFLEN];
char_u *tofree;
@@ -9412,7 +9425,7 @@ fill_assert_error(
}
else
{
- if (is_match)
+ if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH)
ga_concat(gap, (char_u *)"Pattern ");
else
ga_concat(gap, (char_u *)"Expected ");
@@ -9423,8 +9436,12 @@ fill_assert_error(
}
else
ga_concat_esc(gap, exp_str);
- if (is_match)
+ if (atype == ASSERT_MATCH)
ga_concat(gap, (char_u *)" does not match ");
+ else if (atype == ASSERT_NOTMATCH)
+ ga_concat(gap, (char_u *)" does match ");
+ else if (atype == ASSERT_NOTEQUAL)
+ ga_concat(gap, (char_u *)" differs from ");
else
ga_concat(gap, (char_u *)" but got ");
ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
@@ -9446,25 +9463,41 @@ assert_error(garray_T *gap)
list_append_string(vimvars[VV_ERRORS].vv_list, gap->ga_data, gap->ga_len);
}

-/*
- * "assert_equal(expected, actual[, msg])" function
- */
static void
-f_assert_equal(typval_T *argvars, typval_T *rettv UNUSED)
+assert_equal_common(typval_T *argvars, assert_type_T atype)
{
garray_T ga;

- if (!tv_equal(&argvars[0], &argvars[1], FALSE, FALSE))
+ if (tv_equal(&argvars[0], &argvars[1], FALSE, FALSE)
+ != (atype == ASSERT_EQUAL))
{
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1],
- FALSE);
+ atype);
assert_error(&ga);
ga_clear(&ga);
}
}

/*
+ * "assert_equal(expected, actual[, msg])" function
+ */
+ static void
+f_assert_equal(typval_T *argvars, typval_T *rettv UNUSED)
+{
+ assert_equal_common(argvars, ASSERT_EQUAL);
+}
+
+/*
+ * "assert_notequal(expected, actual[, msg])" function
+ */
+ static void
+f_assert_notequal(typval_T *argvars, typval_T *rettv UNUSED)
+{
+ assert_equal_common(argvars, ASSERT_NOTEQUAL);
+}
+
+/*
* "assert_exception(string[, msg])" function
*/
static void
@@ -9486,7 +9519,7 @@ f_assert_exception(typval_T *argvars, typval_T *rettv UNUSED)
{
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[1], NULL, &argvars[0],
- &vimvars[VV_EXCEPTION].vv_tv, FALSE);
+ &vimvars[VV_EXCEPTION].vv_tv, ASSERT_OTHER);
assert_error(&ga);
ga_clear(&ga);
}
@@ -9523,7 +9556,7 @@ f_assert_fails(typval_T *argvars, typval_T *rettv UNUSED)
{
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[2], NULL, &argvars[1],
- &vimvars[VV_ERRMSG].vv_tv, FALSE);
+ &vimvars[VV_ERRMSG].vv_tv, ASSERT_OTHER);
assert_error(&ga);
ga_clear(&ga);
}
@@ -9555,7 +9588,7 @@ assert_bool(typval_T *argvars, int isTrue)
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[1],
(char_u *)(isTrue ? "True" : "False"),
- NULL, &argvars[0], FALSE);
+ NULL, &argvars[0], ASSERT_OTHER);
assert_error(&ga);
ga_clear(&ga);
}
@@ -9570,11 +9603,8 @@ f_assert_false(typval_T *argvars, typval_T *rettv UNUSED)
assert_bool(argvars, FALSE);
}

-/*
- * "assert_match(pattern, actual[, msg])" function
- */
static void
-f_assert_match(typval_T *argvars, typval_T *rettv UNUSED)
+assert_match_common(typval_T *argvars, assert_type_T atype)
{
garray_T ga;
char_u buf1[NUMBUFLEN];
@@ -9584,17 +9614,35 @@ f_assert_match(typval_T *argvars, typval_T *rettv UNUSED)

if (pat == NULL || text == NULL)
EMSG(_(e_invarg));
- else if (!pattern_match(pat, text, FALSE))
+ else if (pattern_match(pat, text, FALSE) != (atype == ASSERT_MATCH))
{
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1],
- TRUE);
+ atype);
assert_error(&ga);
ga_clear(&ga);
}
}

/*
+ * "assert_match(pattern, actual[, msg])" function
+ */
+ static void
+f_assert_match(typval_T *argvars, typval_T *rettv UNUSED)
+{
+ assert_match_common(argvars, ASSERT_MATCH);
+}
+
+/*
+ * "assert_notmatch(pattern, actual[, msg])" function
+ */
+ static void
+f_assert_notmatch(typval_T *argvars, typval_T *rettv UNUSED)
+{
+ assert_match_common(argvars, ASSERT_NOTMATCH);
+}
+
+/*
* "assert_true(actual[, msg])" function
*/
static void
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim
index bc025b4..d7fb638 100644
--- a/src/testdir/test_assert.vim
+++ b/src/testdir/test_assert.vim
@@ -18,6 +18,22 @@ func Test_assert_equal()
call assert_equal(4, n)
let l = [1, 2, 3]
call assert_equal([1, 2, 3], l)
+
+ let s = 'foo'
+ call assert_equal('bar', s)
+ call assert_match("Expected 'bar' but got 'foo'", v:errors[0])
+ call remove(v:errors, 0)
+endfunc
+
+func Test_assert_notequal()
+ let n = 4
+ call assert_notequal('foo', n)
+ let s = 'foo'
+ call assert_notequal([1, 2, 3], s)
+
+ call assert_notequal('foo', s)
+ call assert_match("Expected 'foo' differs from 'foo'", v:errors[0])
+ call remove(v:errors, 0)
endfunc

func Test_assert_exception()
@@ -74,6 +90,15 @@ func Test_match()
call remove(v:errors, 0)
endfunc

+func Test_notmatch()
+ call assert_notmatch('foo', 'bar')
+ call assert_notmatch('^foobar$', 'foobars')
+
+ call assert_notmatch('foo', 'foobar')
+ call assert_match("Pattern 'foo' does match 'foobar'", v:errors[0])
+ call remove(v:errors, 0)
+endfunc
+
func Test_assert_fail_fails()
call assert_fails('xxx', {})
call assert_match("Expected {} but got 'E731:", v:errors[0])
diff --git a/src/version.c b/src/version.c
index 5694466..ea6d1c3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1703,
+/**/
1702,
/**/
1701,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 3dda7db4e1f7c4a8110a1f83001ec36b46693d27
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 21:22:58 2016 +0200

patch 7.4.1704
Problem: Using freed memory with "wincmd p". (Dominique Pelle)
Solution: Also clear "prevwin" in other tab pages.
---
src/version.c | 2 ++
src/window.c | 13 ++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/version.c b/src/version.c
index ea6d1c3..58377a4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1704,
+/**/
1703,
/**/
1702,
diff --git a/src/window.c b/src/window.c
index c7905ae..bbd0a52 100644
--- a/src/window.c
+++ b/src/window.c
@@ -340,7 +340,7 @@ newwindow:
/* cursor to last accessed (previous) window */
case 'p':
case Ctrl_P:
- if (prevwin == NULL)
+ if (!win_valid(prevwin))
beep_flush();
else
win_goto(prevwin);
@@ -4577,8 +4577,15 @@ win_free(
unref_var_dict(wp->w_vars);
#endif

- if (prevwin == wp)
- prevwin = NULL;
+ {
+ tabpage_T *ttp;
+
+ if (prevwin == wp)
+ prevwin = NULL;
+ for (ttp = first_tabpage; ttp != NULL; ttp = ttp->tp_next)
+ if (ttp->tp_prevwin == wp)
+ ttp->tp_prevwin = NULL;
+ }
win_free_lsize(wp);

for (i = 0; i < wp->w_tagstacklen; ++i)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 7c1c6dbb6817640fd3956a0d5417da23fde336d8
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 22:08:05 2016 +0200

patch 7.4.1705
Problem: The 'guifont' option does not allow for a quality setting.
Solution: Add the "q" item, supported on MS-Windows. (Yasuhiro Matsumoto)
---
runtime/doc/options.txt | 10 +++++---
src/gui_w32.c | 8 +++++++
src/os_mswin.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++
src/proto/os_mswin.pro | 1 +
src/version.c | 2 ++
5 files changed, 80 insertions(+), 3 deletions(-)

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index f71c4ad..6ddf076 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.4. Last change: 2016 Mar 24
+*options.txt* For Vim version 7.4. Last change: 2016 Apr 03


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1070,7 +1070,7 @@ A jump table for the options with a short description can be found at |Q_op|.

Note that environment variables are not expanded. If you want to use
$HOME you must expand it explicitly, e.g.: >
- :let backupskip = escape(expand('$HOME'), '\') . '/tmp/*'
+ :let &backupskip = escape(expand('$HOME'), '\') . '/tmp/*'

< Note that the default also makes sure that "crontab -e" works (when a
backup would be made by renaming the original file crontab won't see
@@ -1245,7 +1245,7 @@ A jump table for the options with a short description can be found at |Q_op|.
break if 'linebreak' is on. Only works for ASCII and also for 8-bit
characters when 'encoding' is an 8-bit encoding.

- *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'*
+ *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'*
'breakindent' 'bri' boolean (default off)
local to window
{not in Vi}
@@ -3634,6 +3634,10 @@ A jump table for the options with a short description can be found at |Q_op|.
HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.
Normally you would use "cDEFAULT".
+ qXX - quality XX. Valid charsets are: PROOF, DRAFT,
+ ANTIALIASED, UNANTIALIASED, CLEARTYPE, DEFAULT.
+ Normally you would use "qDEFAULT".
+ Some quality values isn't supported in legacy OSs.

Use a ':' to separate the options.
- A '_' can be used in the place of a space, so you don't need to use
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 0679ed2..543d5d5 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -3291,6 +3291,7 @@ logfont2name(LOGFONT lf)
char *p;
char *res;
char *charset_name;
+ char *quality_name;
char *font_name = lf.lfFaceName;

charset_name = charset_id2name((int)lf.lfCharSet);
@@ -3304,6 +3305,8 @@ logfont2name(LOGFONT lf)
(char_u **)&font_name, &len);
}
#endif
+ quality_name = quality_id2name((int)lf.lfQuality);
+
res = (char *)alloc((unsigned)(strlen(font_name) + 20
+ (charset_name == NULL ? 0 : strlen(charset_name) + 2)));
if (res != NULL)
@@ -3331,6 +3334,11 @@ logfont2name(LOGFONT lf)
STRCAT(p, ":c");
STRCAT(p, charset_name);
}
+ if (quality_name != NULL)
+ {
+ STRCAT(p, ":q");
+ STRCAT(p, quality_name);
+ }
}

#ifdef FEAT_MBYTE
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 607fd6a..77582cc 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2689,6 +2689,33 @@ charset_pairs[] =
{NULL, 0}
};

+struct quality_pair
+{
+ char *name;
+ DWORD quality;
+};
+
+static struct quality_pair
+quality_pairs[] = {
+#ifdef CLEARTYPE_QUALITY
+ {"CLEARTYPE", CLEARTYPE_QUALITY},
+#endif
+#ifdef ANTIALIASED_QUALITY
+ {"ANTIALIASED", ANTIALIASED_QUALITY},
+#endif
+#ifdef NOANTIALIASED_QUALITY
+ {"NOANTIALIASED", NOANTIALIASED_QUALITY},
+#endif
+#ifdef PROOF_QUALITY
+ {"PROOF", PROOF_QUALITY},
+#endif
+#ifdef PROOF_QUALITY
+ {"DRAFT", DRAFT_QUALITY},
+#endif
+ {"DEFAULT", DEFAULT_QUALITY},
+ {NULL, 0}
+};
+
/*
* Convert a charset ID to a name.
* Return NULL when not recognized.
@@ -2704,6 +2731,21 @@ charset_id2name(int id)
return cp->name;
}

+/*
+ * Convert a quality ID to a name.
+ * Return NULL when not recognized.
+ */
+ char *
+quality_id2name(DWORD id)
+{
+ struct quality_pair *qp;
+
+ for (qp = quality_pairs; qp->name != NULL; ++qp)
+ if (id == qp->quality)
+ break;
+ return qp->name;
+}
+
static const LOGFONT s_lfDefault =
{
-12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
@@ -2985,6 +3027,26 @@ get_logfont(
}
break;
}
+ case 'q':
+ {
+ struct quality_pair *qp;
+
+ for (qp = quality_pairs; qp->name != NULL; ++qp)
+ if (STRNCMP(p, qp->name, strlen(qp->name)) == 0)
+ {
+ lf->lfQuality = qp->quality;
+ p += strlen(qp->name);
+ break;
+ }
+ if (qp->name == NULL && verbose)
+ {
+ vim_snprintf((char *)IObuff, IOSIZE,
+ _("E244: Illegal quality name \"%s\" in font name \"%s\""), p, name);
+ EMSG(IObuff);
+ break;
+ }
+ break;
+ }
default:
if (verbose)
{
diff --git a/src/proto/os_mswin.pro b/src/proto/os_mswin.pro
index 333ba76..fb2da93 100644
--- a/src/proto/os_mswin.pro
+++ b/src/proto/os_mswin.pro
@@ -49,6 +49,7 @@ void serverForeground(char_u *name);
char_u *serverGetReply(HWND server, int *expr_res, int remove, int wait);
void serverProcessPendingMessages(void);
char *charset_id2name(int id);
+char *quality_id2name __ARGS((DWORD id));
int get_logfont(LOGFONT *lf, char_u *name, HDC printer_dc, int verbose);
void channel_init_winsock(void);
/* vim: set ft=c : */
diff --git a/src/version.c b/src/version.c
index 58377a4..aefcfae 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1705,
+/**/
1704,
/**/
1703,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit e185c1efba3cb2611ac303c39a08e908497cbac4
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 22:22:30 2016 +0200

patch 7.4.1706
Problem: Old style function declaration breaks build.
Solution: Remove __ARGS().
---
src/proto/os_mswin.pro | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/proto/os_mswin.pro b/src/proto/os_mswin.pro
index fb2da93..d25c174 100644
--- a/src/proto/os_mswin.pro
+++ b/src/proto/os_mswin.pro
@@ -49,7 +49,7 @@ void serverForeground(char_u *name);
char_u *serverGetReply(HWND server, int *expr_res, int remove, int wait);
void serverProcessPendingMessages(void);
char *charset_id2name(int id);
-char *quality_id2name __ARGS((DWORD id));
+char *quality_id2name(DWORD id);
int get_logfont(LOGFONT *lf, char_u *name, HDC printer_dc, int verbose);
void channel_init_winsock(void);
/* vim: set ft=c : */
diff --git a/src/version.c b/src/version.c
index aefcfae..4502f7f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1706,
+/**/
1705,
/**/
1704,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 0921ecff1c5a74541bad6c073e8ade32247403d8
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 3 22:44:36 2016 +0200

patch 7.4.1707
Problem: Cannot use empty dictionary key, even though it can be useful.
Solution: Allow using an empty dictionary key.
---
src/eval.c | 16 +++++-----------
src/hashtab.c | 3 +--
src/testdir/test_expr.vim | 14 ++++++++++++++
src/version.c | 2 ++
4 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index ab006b1..070485f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2782,11 +2782,9 @@ get_lval(
if (len == -1)
{
/* "[key]": get key from "var1" */
- key = get_tv_string(&var1); /* is number or string */
- if (*key == NUL)
+ key = get_tv_string_chk(&var1); /* is number or string */
+ if (key == NULL)
{
- if (!quiet)
- EMSG(_(e_emptykey));
clear_tv(&var1);
return NULL;
}
@@ -5623,11 +5621,9 @@ eval_index(

if (len == -1)
{
- key = get_tv_string(&var1);
- if (*key == NUL)
+ key = get_tv_string_chk(&var1);
+ if (key == NULL)
{
- if (verbose)
- EMSG(_(e_emptykey));
clear_tv(&var1);
return FAIL;
}
@@ -7754,11 +7750,9 @@ get_dict_tv(char_u **arg, typval_T *rettv, int evaluate)
if (evaluate)
{
key = get_tv_string_buf_chk(&tvkey, buf);
- if (key == NULL || *key == NUL)
+ if (key == NULL)
{
/* "key" is NULL when get_tv_string_buf_chk() gave an errmsg */
- if (key != NULL)
- EMSG(_(e_emptykey));
clear_tv(&tvkey);
goto failret;
}
diff --git a/src/hashtab.c b/src/hashtab.c
index d1ba2c9..f9c7c27 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -468,8 +468,7 @@ hash_hash(char_u *key)
char_u *p;

if ((hash = *key) == 0)
- return (hash_T)0; /* Empty keys are not allowed, but we don't
- want to crash if we get one. */
+ return (hash_T)0;
p = key + 1;

/* A simplistic algorithm that appears to do very well.
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index f5c9e26..33115c7 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -36,3 +36,17 @@ func Test_version()
call assert_false(has('patch-9.1.0'))
call assert_false(has('patch-9.9.1'))
endfunc
+
+func Test_dict()
+ let d = {'': 'empty', 'a': 'a', 0: 'zero'}
+ call assert_equal('empty', d[''])
+ call assert_equal('a', d['a'])
+ call assert_equal('zero', d[0])
+ call assert_true(has_key(d, ''))
+ call assert_true(has_key(d, 'a'))
+
+ let d[''] = 'none'
+ let d['a'] = 'aaa'
+ call assert_equal('none', d[''])
+ call assert_equal('aaa', d['a'])
+endfunc
diff --git a/src/version.c b/src/version.c
index 4502f7f..2f1e01b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1707,
+/**/
1706,
/**/
1705,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 2a6fa564a3b5061c14ff63b8b0f12801df0b0ac2
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 4 20:55:59 2016 +0200

patch 7.4.1708
Problem: New regexp engine does not work properly with EBCDIC.
Solution: Define equivalence class characters. (Owen Leibman)
---
src/regexp_nfa.c | 337 ++++++++++++++++++++++++++++++++++++++-----------------
src/version.c | 2 +
2 files changed, 239 insertions(+), 100 deletions(-)

diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 865d67f..6d06a12 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -750,14 +750,129 @@ nfa_emit_equi_class(int c)
|| STRCMP(p_enc, "iso-8859-15") == 0)
#endif
{
+#ifdef EBCDIC
+# define A_circumflex 0x62
+# define A_diaeresis 0x63
+# define A_grave 0x64
+# define A_acute 0x65
+# define A_virguilla 0x66
+# define A_ring 0x67
+# define C_cedilla 0x68
+# define E_acute 0x71
+# define E_circumflex 0x72
+# define E_diaeresis 0x73
+# define E_grave 0x74
+# define I_acute 0x75
+# define I_circumflex 0x76
+# define I_diaeresis 0x77
+# define I_grave 0x78
+# define N_virguilla 0x69
+# define O_circumflex 0xeb
+# define O_diaeresis 0xec
+# define O_grave 0xed
+# define O_acute 0xee
+# define O_virguilla 0xef
+# define O_slash 0x80
+# define U_circumflex 0xfb
+# define U_diaeresis 0xfc
+# define U_grave 0xfd
+# define U_acute 0xfe
+# define Y_acute 0xba
+# define a_grave 0x42
+# define a_acute 0x43
+# define a_circumflex 0x44
+# define a_virguilla 0x45
+# define a_diaeresis 0x46
+# define a_ring 0x47
+# define c_cedilla 0x48
+# define e_grave 0x51
+# define e_acute 0x52
+# define e_circumflex 0x53
+# define e_diaeresis 0x54
+# define i_grave 0x55
+# define i_acute 0x56
+# define i_circumflex 0x57
+# define i_diaeresis 0x58
+# define n_virguilla 0x49
+# define o_grave 0xcb
+# define o_acute 0xcc
+# define o_circumflex 0xcd
+# define o_virguilla 0xce
+# define o_diaeresis 0xcf
+# define o_slash 0x70
+# define u_grave 0xdb
+# define u_acute 0xdc
+# define u_circumflex 0xdd
+# define u_diaeresis 0xde
+# define y_acute 0x8d
+# define y_diaeresis 0xdf
+#else
+# define A_grave 0xc0
+# define A_acute 0xc1
+# define A_circumflex 0xc2
+# define A_virguilla 0xc3
+# define A_diaeresis 0xc4
+# define A_ring 0xc5
+# define C_cedilla 0xc7
+# define E_grave 0xc8
+# define E_acute 0xc9
+# define E_circumflex 0xca
+# define E_diaeresis 0xcb
+# define I_grave 0xcc
+# define I_acute 0xcd
+# define I_circumflex 0xce
+# define I_diaeresis 0xcf
+# define N_virguilla 0xd1
+# define O_grave 0xd2
+# define O_acute 0xd3
+# define O_circumflex 0xd4
+# define O_virguilla 0xd5
+# define O_diaeresis 0xd6
+# define O_slash 0xd8
+# define U_grave 0xd9
+# define U_acute 0xda
+# define U_circumflex 0xdb
+# define U_diaeresis 0xdc
+# define Y_acute 0xdd
+# define a_grave 0xe0
+# define a_acute 0xe1
+# define a_circumflex 0xe2
+# define a_virguilla 0xe3
+# define a_diaeresis 0xe4
+# define a_ring 0xe5
+# define c_cedilla 0xe7
+# define e_grave 0xe8
+# define e_acute 0xe9
+# define e_circumflex 0xea
+# define e_diaeresis 0xeb
+# define i_grave 0xec
+# define i_acute 0xed
+# define i_circumflex 0xee
+# define i_diaeresis 0xef
+# define n_virguilla 0xf1
+# define o_grave 0xf2
+# define o_acute 0xf3
+# define o_circumflex 0xf4
+# define o_virguilla 0xf5
+# define o_diaeresis 0xf6
+# define o_slash 0xf8
+# define u_grave 0xf9
+# define u_acute 0xfa
+# define u_circumflex 0xfb
+# define u_diaeresis 0xfc
+# define y_acute 0xfd
+# define y_diaeresis 0xff
+#endif
switch (c)
{
- case 'A': case 0300: case 0301: case 0302:
- case 0303: case 0304: case 0305:
- CASEMBC(0x100) CASEMBC(0x102) CASEMBC(0x104) CASEMBC(0x1cd)
- CASEMBC(0x1de) CASEMBC(0x1e0) CASEMBC(0x1ea2)
- EMIT2('A'); EMIT2(0300); EMIT2(0301); EMIT2(0302);
- EMIT2(0303); EMIT2(0304); EMIT2(0305);
+ case 'A': case A_grave: case A_acute: case A_circumflex:
+ case A_virguilla: case A_diaeresis: case A_ring:
+ CASEMBC(0x100) CASEMBC(0x102) CASEMBC(0x104)
+ CASEMBC(0x1cd) CASEMBC(0x1de) CASEMBC(0x1e0)
+ CASEMBC(0x1ea2)
+ EMIT2('A'); EMIT2(A_grave); EMIT2(A_acute);
+ EMIT2(A_circumflex); EMIT2(A_virguilla);
+ EMIT2(A_diaeresis); EMIT2(A_ring);
EMITMBC(0x100) EMITMBC(0x102) EMITMBC(0x104)
EMITMBC(0x1cd) EMITMBC(0x1de) EMITMBC(0x1e0)
EMITMBC(0x1ea2)
@@ -767,23 +882,25 @@ nfa_emit_equi_class(int c)
EMIT2('B'); EMITMBC(0x1e02) EMITMBC(0x1e06)
return OK;

- case 'C': case 0307:
- CASEMBC(0x106) CASEMBC(0x108) CASEMBC(0x10a) CASEMBC(0x10c)
- EMIT2('C'); EMIT2(0307); EMITMBC(0x106) EMITMBC(0x108)
+ case 'C': case C_cedilla: CASEMBC(0x106) CASEMBC(0x108)
+ CASEMBC(0x10a) CASEMBC(0x10c)
+ EMIT2('C'); EMIT2(C_cedilla);
+ EMITMBC(0x106) EMITMBC(0x108)
EMITMBC(0x10a) EMITMBC(0x10c)
return OK;

case 'D': CASEMBC(0x10e) CASEMBC(0x110) CASEMBC(0x1e0a)
- CASEMBC(0x1e0e) CASEMBC(0x1e10)
+ CASEMBC(0x1e0e) CASEMBC(0x1e10)
EMIT2('D'); EMITMBC(0x10e) EMITMBC(0x110) EMITMBC(0x1e0a)
EMITMBC(0x1e0e) EMITMBC(0x1e10)
return OK;

- case 'E': case 0310: case 0311: case 0312: case 0313:
- CASEMBC(0x112) CASEMBC(0x114) CASEMBC(0x116) CASEMBC(0x118)
- CASEMBC(0x11a) CASEMBC(0x1eba) CASEMBC(0x1ebc)
- EMIT2('E'); EMIT2(0310); EMIT2(0311); EMIT2(0312);
- EMIT2(0313);
+ case 'E': case E_grave: case E_acute: case E_circumflex:
+ case E_diaeresis: CASEMBC(0x112) CASEMBC(0x114)
+ CASEMBC(0x116) CASEMBC(0x118) CASEMBC(0x11a)
+ CASEMBC(0x1eba) CASEMBC(0x1ebc)
+ EMIT2('E'); EMIT2(E_grave); EMIT2(E_acute);
+ EMIT2(E_circumflex); EMIT2(E_diaeresis);
EMITMBC(0x112) EMITMBC(0x114) EMITMBC(0x116)
EMITMBC(0x118) EMITMBC(0x11a) EMITMBC(0x1eba)
EMITMBC(0x1ebc)
@@ -794,24 +911,26 @@ nfa_emit_equi_class(int c)
return OK;

case 'G': CASEMBC(0x11c) CASEMBC(0x11e) CASEMBC(0x120)
- CASEMBC(0x122) CASEMBC(0x1e4) CASEMBC(0x1e6) CASEMBC(0x1f4)
- CASEMBC(0x1e20)
+ CASEMBC(0x122) CASEMBC(0x1e4) CASEMBC(0x1e6)
+ CASEMBC(0x1f4) CASEMBC(0x1e20)
EMIT2('G'); EMITMBC(0x11c) EMITMBC(0x11e) EMITMBC(0x120)
EMITMBC(0x122) EMITMBC(0x1e4) EMITMBC(0x1e6)
EMITMBC(0x1f4) EMITMBC(0x1e20)
return OK;

case 'H': CASEMBC(0x124) CASEMBC(0x126) CASEMBC(0x1e22)
- CASEMBC(0x1e26) CASEMBC(0x1e28)
+ CASEMBC(0x1e26) CASEMBC(0x1e28)
EMIT2('H'); EMITMBC(0x124) EMITMBC(0x126) EMITMBC(0x1e22)
EMITMBC(0x1e26) EMITMBC(0x1e28)
return OK;

- case 'I': case 0314: case 0315: case 0316: case 0317:
- CASEMBC(0x128) CASEMBC(0x12a) CASEMBC(0x12c) CASEMBC(0x12e)
- CASEMBC(0x130) CASEMBC(0x1cf) CASEMBC(0x1ec8)
- EMIT2('I'); EMIT2(0314); EMIT2(0315); EMIT2(0316);
- EMIT2(0317); EMITMBC(0x128) EMITMBC(0x12a)
+ case 'I': case I_grave: case I_acute: case I_circumflex:
+ case I_diaeresis: CASEMBC(0x128) CASEMBC(0x12a)
+ CASEMBC(0x12c) CASEMBC(0x12e) CASEMBC(0x130)
+ CASEMBC(0x1cf) CASEMBC(0x1ec8)
+ EMIT2('I'); EMIT2(I_grave); EMIT2(I_acute);
+ EMIT2(I_circumflex); EMIT2(I_diaeresis);
+ EMITMBC(0x128) EMITMBC(0x12a)
EMITMBC(0x12c) EMITMBC(0x12e) EMITMBC(0x130)
EMITMBC(0x1cf) EMITMBC(0x1ec8)
return OK;
@@ -821,13 +940,13 @@ nfa_emit_equi_class(int c)
return OK;

case 'K': CASEMBC(0x136) CASEMBC(0x1e8) CASEMBC(0x1e30)
- CASEMBC(0x1e34)
+ CASEMBC(0x1e34)
EMIT2('K'); EMITMBC(0x136) EMITMBC(0x1e8) EMITMBC(0x1e30)
EMITMBC(0x1e34)
return OK;

case 'L': CASEMBC(0x139) CASEMBC(0x13b) CASEMBC(0x13d)
- CASEMBC(0x13f) CASEMBC(0x141) CASEMBC(0x1e3a)
+ CASEMBC(0x13f) CASEMBC(0x141) CASEMBC(0x1e3a)
EMIT2('L'); EMITMBC(0x139) EMITMBC(0x13b) EMITMBC(0x13d)
EMITMBC(0x13f) EMITMBC(0x141) EMITMBC(0x1e3a)
return OK;
@@ -836,19 +955,21 @@ nfa_emit_equi_class(int c)
EMIT2('M'); EMITMBC(0x1e3e) EMITMBC(0x1e40)
return OK;

- case 'N': case 0321:
- CASEMBC(0x143) CASEMBC(0x145) CASEMBC(0x147) CASEMBC(0x1e44)
- CASEMBC(0x1e48)
- EMIT2('N'); EMIT2(0321); EMITMBC(0x143) EMITMBC(0x145)
+ case 'N': case N_virguilla: CASEMBC(0x143) CASEMBC(0x145)
+ CASEMBC(0x147) CASEMBC(0x1e44) CASEMBC(0x1e48)
+ EMIT2('N'); EMIT2(N_virguilla);
+ EMITMBC(0x143) EMITMBC(0x145)
EMITMBC(0x147) EMITMBC(0x1e44) EMITMBC(0x1e48)
return OK;

- case 'O': case 0322: case 0323: case 0324: case 0325:
- case 0326: case 0330:
- CASEMBC(0x14c) CASEMBC(0x14e) CASEMBC(0x150) CASEMBC(0x1a0)
- CASEMBC(0x1d1) CASEMBC(0x1ea) CASEMBC(0x1ec) CASEMBC(0x1ece)
- EMIT2('O'); EMIT2(0322); EMIT2(0323); EMIT2(0324);
- EMIT2(0325); EMIT2(0326); EMIT2(0330);
+ case 'O': case O_grave: case O_acute: case O_circumflex:
+ case O_virguilla: case O_diaeresis: case O_slash:
+ CASEMBC(0x14c) CASEMBC(0x14e) CASEMBC(0x150)
+ CASEMBC(0x1a0) CASEMBC(0x1d1) CASEMBC(0x1ea)
+ CASEMBC(0x1ec) CASEMBC(0x1ece)
+ EMIT2('O'); EMIT2(O_grave); EMIT2(O_acute);
+ EMIT2(O_circumflex); EMIT2(O_virguilla);
+ EMIT2(O_diaeresis); EMIT2(O_slash);
EMITMBC(0x14c) EMITMBC(0x14e) EMITMBC(0x150)
EMITMBC(0x1a0) EMITMBC(0x1d1) EMITMBC(0x1ea)
EMITMBC(0x1ec) EMITMBC(0x1ece)
@@ -859,29 +980,31 @@ nfa_emit_equi_class(int c)
return OK;

case 'R': CASEMBC(0x154) CASEMBC(0x156) CASEMBC(0x158)
- CASEMBC(0x1e58) CASEMBC(0x1e5e)
+ CASEMBC(0x1e58) CASEMBC(0x1e5e)
EMIT2('R'); EMITMBC(0x154) EMITMBC(0x156) EMITMBC(0x158)
EMITMBC(0x1e58) EMITMBC(0x1e5e)
return OK;

case 'S': CASEMBC(0x15a) CASEMBC(0x15c) CASEMBC(0x15e)
- CASEMBC(0x160) CASEMBC(0x1e60)
+ CASEMBC(0x160) CASEMBC(0x1e60)
EMIT2('S'); EMITMBC(0x15a) EMITMBC(0x15c) EMITMBC(0x15e)
EMITMBC(0x160) EMITMBC(0x1e60)
return OK;

case 'T': CASEMBC(0x162) CASEMBC(0x164) CASEMBC(0x166)
- CASEMBC(0x1e6a) CASEMBC(0x1e6e)
+ CASEMBC(0x1e6a) CASEMBC(0x1e6e)
EMIT2('T'); EMITMBC(0x162) EMITMBC(0x164) EMITMBC(0x166)
EMITMBC(0x1e6a) EMITMBC(0x1e6e)
return OK;

- case 'U': case 0331: case 0332: case 0333: case 0334:
- CASEMBC(0x168) CASEMBC(0x16a) CASEMBC(0x16c) CASEMBC(0x16e)
- CASEMBC(0x170) CASEMBC(0x172) CASEMBC(0x1af) CASEMBC(0x1d3)
- CASEMBC(0x1ee6)
- EMIT2('U'); EMIT2(0331); EMIT2(0332); EMIT2(0333);
- EMIT2(0334); EMITMBC(0x168) EMITMBC(0x16a)
+ case 'U': case U_grave: case U_acute: case U_diaeresis:
+ case U_circumflex: CASEMBC(0x168) CASEMBC(0x16a)
+ CASEMBC(0x16c) CASEMBC(0x16e) CASEMBC(0x170)
+ CASEMBC(0x172) CASEMBC(0x1af) CASEMBC(0x1d3)
+ CASEMBC(0x1ee6)
+ EMIT2('U'); EMIT2(U_grave); EMIT2(U_acute);
+ EMIT2(U_diaeresis); EMIT2(U_circumflex);
+ EMITMBC(0x168) EMITMBC(0x16a)
EMITMBC(0x16c) EMITMBC(0x16e) EMITMBC(0x170)
EMITMBC(0x172) EMITMBC(0x1af) EMITMBC(0x1d3)
EMITMBC(0x1ee6)
@@ -892,7 +1015,7 @@ nfa_emit_equi_class(int c)
return OK;

case 'W': CASEMBC(0x174) CASEMBC(0x1e80) CASEMBC(0x1e82)
- CASEMBC(0x1e84) CASEMBC(0x1e86)
+ CASEMBC(0x1e84) CASEMBC(0x1e86)
EMIT2('W'); EMITMBC(0x174) EMITMBC(0x1e80) EMITMBC(0x1e82)
EMITMBC(0x1e84) EMITMBC(0x1e86)
return OK;
@@ -901,26 +1024,29 @@ nfa_emit_equi_class(int c)
EMIT2('X'); EMITMBC(0x1e8a) EMITMBC(0x1e8c)
return OK;

- case 'Y': case 0335:
- CASEMBC(0x176) CASEMBC(0x178) CASEMBC(0x1e8e) CASEMBC(0x1ef2)
- CASEMBC(0x1ef6) CASEMBC(0x1ef8)
- EMIT2('Y'); EMIT2(0335); EMITMBC(0x176) EMITMBC(0x178)
+ case 'Y': case Y_acute: CASEMBC(0x176) CASEMBC(0x178)
+ CASEMBC(0x1e8e) CASEMBC(0x1ef2) CASEMBC(0x1ef6)
+ CASEMBC(0x1ef8)
+ EMIT2('Y'); EMIT2(Y_acute);
+ EMITMBC(0x176) EMITMBC(0x178)
EMITMBC(0x1e8e) EMITMBC(0x1ef2) EMITMBC(0x1ef6)
EMITMBC(0x1ef8)
return OK;

case 'Z': CASEMBC(0x179) CASEMBC(0x17b) CASEMBC(0x17d)
- CASEMBC(0x1b5) CASEMBC(0x1e90) CASEMBC(0x1e94)
+ CASEMBC(0x1b5) CASEMBC(0x1e90) CASEMBC(0x1e94)
EMIT2('Z'); EMITMBC(0x179) EMITMBC(0x17b) EMITMBC(0x17d)
EMITMBC(0x1b5) EMITMBC(0x1e90) EMITMBC(0x1e94)
return OK;

- case 'a': case 0340: case 0341: case 0342:
- case 0343: case 0344: case 0345:
- CASEMBC(0x101) CASEMBC(0x103) CASEMBC(0x105) CASEMBC(0x1ce)
- CASEMBC(0x1df) CASEMBC(0x1e1) CASEMBC(0x1ea3)
- EMIT2('a'); EMIT2(0340); EMIT2(0341); EMIT2(0342);
- EMIT2(0343); EMIT2(0344); EMIT2(0345);
+ case 'a': case a_grave: case a_acute: case a_circumflex:
+ case a_virguilla: case a_diaeresis: case a_ring:
+ CASEMBC(0x101) CASEMBC(0x103) CASEMBC(0x105)
+ CASEMBC(0x1ce) CASEMBC(0x1df) CASEMBC(0x1e1)
+ CASEMBC(0x1ea3)
+ EMIT2('a'); EMIT2(a_grave); EMIT2(a_acute);
+ EMIT2(a_circumflex); EMIT2(a_virguilla);
+ EMIT2(a_diaeresis); EMIT2(a_ring);
EMITMBC(0x101) EMITMBC(0x103) EMITMBC(0x105)
EMITMBC(0x1ce) EMITMBC(0x1df) EMITMBC(0x1e1)
EMITMBC(0x1ea3)
@@ -930,23 +1056,26 @@ nfa_emit_equi_class(int c)
EMIT2('b'); EMITMBC(0x1e03) EMITMBC(0x1e07)
return OK;

- case 'c': case 0347:
- CASEMBC(0x107) CASEMBC(0x109) CASEMBC(0x10b) CASEMBC(0x10d)
- EMIT2('c'); EMIT2(0347); EMITMBC(0x107) EMITMBC(0x109)
+ case 'c': case c_cedilla: CASEMBC(0x107) CASEMBC(0x109)
+ CASEMBC(0x10b) CASEMBC(0x10d)
+ EMIT2('c'); EMIT2(c_cedilla);
+ EMITMBC(0x107) EMITMBC(0x109)
EMITMBC(0x10b) EMITMBC(0x10d)
return OK;

case 'd': CASEMBC(0x10f) CASEMBC(0x111) CASEMBC(0x1e0b)
- CASEMBC(0x1e0f) CASEMBC(0x1e11)
+ CASEMBC(0x1e0f) CASEMBC(0x1e11)
EMIT2('d'); EMITMBC(0x10f) EMITMBC(0x111)
EMITMBC(0x1e0b) EMITMBC(0x1e0f) EMITMBC(0x1e11)
return OK;

- case 'e': case 0350: case 0351: case 0352: case 0353:
- CASEMBC(0x113) CASEMBC(0x115) CASEMBC(0x117) CASEMBC(0x119)
- CASEMBC(0x11b) CASEMBC(0x1ebb) CASEMBC(0x1ebd)
- EMIT2('e'); EMIT2(0350); EMIT2(0351); EMIT2(0352);
- EMIT2(0353); EMITMBC(0x113) EMITMBC(0x115)
+ case 'e': case e_grave: case e_acute: case e_circumflex:
+ case e_diaeresis: CASEMBC(0x113) CASEMBC(0x115)
+ CASEMBC(0x117) CASEMBC(0x119) CASEMBC(0x11b)
+ CASEMBC(0x1ebb) CASEMBC(0x1ebd)
+ EMIT2('e'); EMIT2(e_grave); EMIT2(e_acute);
+ EMIT2(e_circumflex); EMIT2(e_diaeresis);
+ EMITMBC(0x113) EMITMBC(0x115)
EMITMBC(0x117) EMITMBC(0x119) EMITMBC(0x11b)
EMITMBC(0x1ebb) EMITMBC(0x1ebd)
return OK;
@@ -956,24 +1085,26 @@ nfa_emit_equi_class(int c)
return OK;

case 'g': CASEMBC(0x11d) CASEMBC(0x11f) CASEMBC(0x121)
- CASEMBC(0x123) CASEMBC(0x1e5) CASEMBC(0x1e7) CASEMBC(0x1f5)
- CASEMBC(0x1e21)
+ CASEMBC(0x123) CASEMBC(0x1e5) CASEMBC(0x1e7)
+ CASEMBC(0x1f5) CASEMBC(0x1e21)
EMIT2('g'); EMITMBC(0x11d) EMITMBC(0x11f) EMITMBC(0x121)
EMITMBC(0x123) EMITMBC(0x1e5) EMITMBC(0x1e7)
EMITMBC(0x1f5) EMITMBC(0x1e21)
return OK;

case 'h': CASEMBC(0x125) CASEMBC(0x127) CASEMBC(0x1e23)
- CASEMBC(0x1e27) CASEMBC(0x1e29) CASEMBC(0x1e96)
+ CASEMBC(0x1e27) CASEMBC(0x1e29) CASEMBC(0x1e96)
EMIT2('h'); EMITMBC(0x125) EMITMBC(0x127) EMITMBC(0x1e23)
EMITMBC(0x1e27) EMITMBC(0x1e29) EMITMBC(0x1e96)
return OK;

- case 'i': case 0354: case 0355: case 0356: case 0357:
- CASEMBC(0x129) CASEMBC(0x12b) CASEMBC(0x12d) CASEMBC(0x12f)
- CASEMBC(0x1d0) CASEMBC(0x1ec9)
- EMIT2('i'); EMIT2(0354); EMIT2(0355); EMIT2(0356);
- EMIT2(0357); EMITMBC(0x129) EMITMBC(0x12b)
+ case 'i': case i_grave: case i_acute: case i_circumflex:
+ case i_diaeresis: CASEMBC(0x129) CASEMBC(0x12b)
+ CASEMBC(0x12d) CASEMBC(0x12f) CASEMBC(0x1d0)
+ CASEMBC(0x1ec9)
+ EMIT2('i'); EMIT2(i_grave); EMIT2(i_acute);
+ EMIT2(i_circumflex); EMIT2(i_diaeresis);
+ EMITMBC(0x129) EMITMBC(0x12b)
EMITMBC(0x12d) EMITMBC(0x12f) EMITMBC(0x1d0)
EMITMBC(0x1ec9)
return OK;
@@ -983,13 +1114,13 @@ nfa_emit_equi_class(int c)
return OK;

case 'k': CASEMBC(0x137) CASEMBC(0x1e9) CASEMBC(0x1e31)
- CASEMBC(0x1e35)
+ CASEMBC(0x1e35)
EMIT2('k'); EMITMBC(0x137) EMITMBC(0x1e9) EMITMBC(0x1e31)
EMITMBC(0x1e35)
return OK;

case 'l': CASEMBC(0x13a) CASEMBC(0x13c) CASEMBC(0x13e)
- CASEMBC(0x140) CASEMBC(0x142) CASEMBC(0x1e3b)
+ CASEMBC(0x140) CASEMBC(0x142) CASEMBC(0x1e3b)
EMIT2('l'); EMITMBC(0x13a) EMITMBC(0x13c) EMITMBC(0x13e)
EMITMBC(0x140) EMITMBC(0x142) EMITMBC(0x1e3b)
return OK;
@@ -998,20 +1129,23 @@ nfa_emit_equi_class(int c)
EMIT2('m'); EMITMBC(0x1e3f) EMITMBC(0x1e41)
return OK;

- case 'n': case 0361:
- CASEMBC(0x144) CASEMBC(0x146) CASEMBC(0x148) CASEMBC(0x149)
- CASEMBC(0x1e45) CASEMBC(0x1e49)
- EMIT2('n'); EMIT2(0361); EMITMBC(0x144) EMITMBC(0x146)
+ case 'n': case n_virguilla: CASEMBC(0x144) CASEMBC(0x146)
+ CASEMBC(0x148) CASEMBC(0x149) CASEMBC(0x1e45)
+ CASEMBC(0x1e49)
+ EMIT2('n'); EMIT2(n_virguilla);
+ EMITMBC(0x144) EMITMBC(0x146)
EMITMBC(0x148) EMITMBC(0x149) EMITMBC(0x1e45)
EMITMBC(0x1e49)
return OK;

- case 'o': case 0362: case 0363: case 0364: case 0365:
- case 0366: case 0370:
- CASEMBC(0x14d) CASEMBC(0x14f) CASEMBC(0x151) CASEMBC(0x1a1)
- CASEMBC(0x1d2) CASEMBC(0x1eb) CASEMBC(0x1ed) CASEMBC(0x1ecf)
- EMIT2('o'); EMIT2(0362); EMIT2(0363); EMIT2(0364);
- EMIT2(0365); EMIT2(0366); EMIT2(0370);
+ case 'o': case o_grave: case o_acute: case o_circumflex:
+ case o_virguilla: case o_diaeresis: case o_slash:
+ CASEMBC(0x14d) CASEMBC(0x14f) CASEMBC(0x151)
+ CASEMBC(0x1a1) CASEMBC(0x1d2) CASEMBC(0x1eb)
+ CASEMBC(0x1ed) CASEMBC(0x1ecf)
+ EMIT2('o'); EMIT2(o_grave); EMIT2(o_acute);
+ EMIT2(o_circumflex); EMIT2(o_virguilla);
+ EMIT2(o_diaeresis); EMIT2(o_slash);
EMITMBC(0x14d) EMITMBC(0x14f) EMITMBC(0x151)
EMITMBC(0x1a1) EMITMBC(0x1d2) EMITMBC(0x1eb)
EMITMBC(0x1ed) EMITMBC(0x1ecf)
@@ -1022,29 +1156,31 @@ nfa_emit_equi_class(int c)
return OK;

case 'r': CASEMBC(0x155) CASEMBC(0x157) CASEMBC(0x159)
- CASEMBC(0x1e59) CASEMBC(0x1e5f)
+ CASEMBC(0x1e59) CASEMBC(0x1e5f)
EMIT2('r'); EMITMBC(0x155) EMITMBC(0x157) EMITMBC(0x159)
EMITMBC(0x1e59) EMITMBC(0x1e5f)
return OK;

case 's': CASEMBC(0x15b) CASEMBC(0x15d) CASEMBC(0x15f)
- CASEMBC(0x161) CASEMBC(0x1e61)
+ CASEMBC(0x161) CASEMBC(0x1e61)
EMIT2('s'); EMITMBC(0x15b) EMITMBC(0x15d) EMITMBC(0x15f)
EMITMBC(0x161) EMITMBC(0x1e61)
return OK;

case 't': CASEMBC(0x163) CASEMBC(0x165) CASEMBC(0x167)
- CASEMBC(0x1e6b) CASEMBC(0x1e6f) CASEMBC(0x1e97)
+ CASEMBC(0x1e6b) CASEMBC(0x1e6f) CASEMBC(0x1e97)
EMIT2('t'); EMITMBC(0x163) EMITMBC(0x165) EMITMBC(0x167)
EMITMBC(0x1e6b) EMITMBC(0x1e6f) EMITMBC(0x1e97)
return OK;

- case 'u': case 0371: case 0372: case 0373: case 0374:
- CASEMBC(0x169) CASEMBC(0x16b) CASEMBC(0x16d) CASEMBC(0x16f)
- CASEMBC(0x171) CASEMBC(0x173) CASEMBC(0x1b0) CASEMBC(0x1d4)
- CASEMBC(0x1ee7)
- EMIT2('u'); EMIT2(0371); EMIT2(0372); EMIT2(0373);
- EMIT2(0374); EMITMBC(0x169) EMITMBC(0x16b)
+ case 'u': case u_grave: case u_acute: case u_circumflex:
+ case u_diaeresis: CASEMBC(0x169) CASEMBC(0x16b)
+ CASEMBC(0x16d) CASEMBC(0x16f) CASEMBC(0x171)
+ CASEMBC(0x173) CASEMBC(0x1b0) CASEMBC(0x1d4)
+ CASEMBC(0x1ee7)
+ EMIT2('u'); EMIT2(u_grave); EMIT2(u_acute);
+ EMIT2(u_circumflex); EMIT2(u_diaeresis);
+ EMITMBC(0x169) EMITMBC(0x16b)
EMITMBC(0x16d) EMITMBC(0x16f) EMITMBC(0x171)
EMITMBC(0x173) EMITMBC(0x1b0) EMITMBC(0x1d4)
EMITMBC(0x1ee7)
@@ -1055,7 +1191,7 @@ nfa_emit_equi_class(int c)
return OK;

case 'w': CASEMBC(0x175) CASEMBC(0x1e81) CASEMBC(0x1e83)
- CASEMBC(0x1e85) CASEMBC(0x1e87) CASEMBC(0x1e98)
+ CASEMBC(0x1e85) CASEMBC(0x1e87) CASEMBC(0x1e98)
EMIT2('w'); EMITMBC(0x175) EMITMBC(0x1e81) EMITMBC(0x1e83)
EMITMBC(0x1e85) EMITMBC(0x1e87) EMITMBC(0x1e98)
return OK;
@@ -1064,16 +1200,17 @@ nfa_emit_equi_class(int c)
EMIT2('x'); EMITMBC(0x1e8b) EMITMBC(0x1e8d)
return OK;

- case 'y': case 0375: case 0377:
- CASEMBC(0x177) CASEMBC(0x1e8f) CASEMBC(0x1e99)
- CASEMBC(0x1ef3) CASEMBC(0x1ef7) CASEMBC(0x1ef9)
- EMIT2('y'); EMIT2(0375); EMIT2(0377); EMITMBC(0x177)
+ case 'y': case y_acute: case y_diaeresis: CASEMBC(0x177)
+ CASEMBC(0x1e8f) CASEMBC(0x1e99) CASEMBC(0x1ef3)
+ CASEMBC(0x1ef7) CASEMBC(0x1ef9)
+ EMIT2('y'); EMIT2(y_acute); EMIT2(y_diaeresis);
+ EMITMBC(0x177)
EMITMBC(0x1e8f) EMITMBC(0x1e99) EMITMBC(0x1ef3)
EMITMBC(0x1ef7) EMITMBC(0x1ef9)
return OK;

case 'z': CASEMBC(0x17a) CASEMBC(0x17c) CASEMBC(0x17e)
- CASEMBC(0x1b6) CASEMBC(0x1e91) CASEMBC(0x1e95)
+ CASEMBC(0x1b6) CASEMBC(0x1e91) CASEMBC(0x1e95)
EMIT2('z'); EMITMBC(0x17a) EMITMBC(0x17c) EMITMBC(0x17e)
EMITMBC(0x1b6) EMITMBC(0x1e91) EMITMBC(0x1e95)
return OK;
diff --git a/src/version.c b/src/version.c
index 2f1e01b..2f36539 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1708,
+/**/
1707,
/**/
1706,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 4c9ce053d9f2a94cd704342dd4c25670a5995cbd
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 4 21:06:19 2016 +0200

patch 7.4.1709
Problem: Mistake in #ifdef.
Solution: Change PROOF_QUALITY to DRAFT_QUALITY. (Ken Takata)
---
src/os_mswin.c | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/os_mswin.c b/src/os_mswin.c
index 77582cc..f96e0a5 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2709,7 +2709,7 @@ quality_pairs[] = {
#ifdef PROOF_QUALITY
{"PROOF", PROOF_QUALITY},
#endif
-#ifdef PROOF_QUALITY
+#ifdef DRAFT_QUALITY
{"DRAFT", DRAFT_QUALITY},
#endif
{"DEFAULT", DEFAULT_QUALITY},
diff --git a/src/version.c b/src/version.c
index 2f36539..18a89e4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1709,
+/**/
1708,
/**/
1707,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 17fe5e1aecbeff5ca4b2a821ede9badd5dddae59
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 4 22:03:08 2016 +0200

patch 7.4.1710
Problem: Not all output of an external command is read.
Solution: Avoid timing out when the process has exited. (closes #681)
---
src/os_unix.c | 12 +++++++++---
src/version.c | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/os_unix.c b/src/os_unix.c
index dc8e009..58a27da 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4845,6 +4845,7 @@ mch_call_shell(
break;

# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
+ if (wait_pid == 0)
{
struct timeval now_tv;
long msec;
@@ -4854,7 +4855,7 @@ mch_call_shell(
* break out too often to avoid losing typeahead. */
gettimeofday(&now_tv, NULL);
msec = (now_tv.tv_sec - start_tv.tv_sec) * 1000L
- + (now_tv.tv_usec - start_tv.tv_usec) / 1000L;
+ + (now_tv.tv_usec - start_tv.tv_usec) / 1000L;
if (msec > 2000)
{
noread_cnt = 5;
@@ -4864,10 +4865,15 @@ mch_call_shell(
# endif
}

- /* If we already detected the child has finished break the
- * loop now. */
+ /* If we already detected the child has finished, continue
+ * reading output for a short while. Some text may be
+ * buffered. */
if (wait_pid == pid)
+ {
+ if (noread_cnt < 5)
+ continue;
break;
+ }

/*
* Check if the child still exists, before checking for
diff --git a/src/version.c b/src/version.c
index 18a89e4..571db82 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1710,
+/**/
1709,
/**/
1708,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit a742e084b677f76c67e9e52c4f9fb9ab24002e20
Author: Bram Moolenaar <***@vim.org>
Date: Tue Apr 5 21:10:38 2016 +0200

patch 7.4.1711
Problem: When using try/catch in 'statusline' it is still considered an
error and the status line will be disabled.
Solution: Check did_emsg instead of called_emsg. (haya14busa, closes #729)
---
src/screen.c | 8 ++++----
src/testdir/test_alot.vim | 1 +
src/testdir/test_statusline.vim | 39 +++++++++++++++++++++++++++++++++++++++
src/version.c | 2 ++
4 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/src/screen.c b/src/screen.c
index 4c2b70c..dc5d175 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -6779,7 +6779,7 @@ win_redr_status(win_T *wp)
redraw_custom_statusline(win_T *wp)
{
static int entered = FALSE;
- int save_called_emsg = called_emsg;
+ int saved_did_emsg = did_emsg;

/* When called recursively return. This can happen when the statusline
* contains an expression that triggers a redraw. */
@@ -6787,9 +6787,9 @@ redraw_custom_statusline(win_T *wp)
return;
entered = TRUE;

- called_emsg = FALSE;
+ did_emsg = FALSE;
win_redr_custom(wp, FALSE);
- if (called_emsg)
+ if (did_emsg)
{
/* When there is an error disable the statusline, otherwise the
* display is messed up with errors and a redraw triggers the problem
@@ -6798,7 +6798,7 @@ redraw_custom_statusline(win_T *wp)
(char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL
? OPT_LOCAL : OPT_GLOBAL), SID_ERROR);
}
- called_emsg |= save_called_emsg;
+ did_emsg |= saved_did_emsg;
entered = FALSE;
}
#endif
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 4ee331f..1eb76a6 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -22,6 +22,7 @@ source test_reltime.vim
source test_searchpos.vim
source test_set.vim
source test_sort.vim
+source test_statusline.vim
source test_syn_attr.vim
source test_timers.vim
source test_undolevels.vim
diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim
new file mode 100644
index 0000000..82898df
--- /dev/null
+++ b/src/testdir/test_statusline.vim
@@ -0,0 +1,39 @@
+function! StatuslineWithCaughtError()
+ let s:func_in_statusline_called = 1
+ try
+ call eval('unknown expression')
+ catch
+ endtry
+ return ''
+endfunction
+
+function! StatuslineWithError()
+ let s:func_in_statusline_called = 1
+ call eval('unknown expression')
+ return ''
+endfunction
+
+function! Test_caught_error_in_statusline()
+ let s:func_in_statusline_called = 0
+ set laststatus=2
+ let statusline = '%{StatuslineWithCaughtError()}'
+ let &statusline = statusline
+ redrawstatus
+ call assert_true(s:func_in_statusline_called)
+ call assert_equal(statusline, &statusline)
+ set statusline=
+endfunction
+
+function! Test_statusline_will_be_disabled_with_error()
+ let s:func_in_statusline_called = 0
+ set laststatus=2
+ let statusline = '%{StatuslineWithError()}'
+ try
+ let &statusline = statusline
+ redrawstatus
+ catch
+ endtry
+ call assert_true(s:func_in_statusline_called)
+ call assert_equal('', &statusline)
+ set statusline=
+endfunction
diff --git a/src/version.c b/src/version.c
index 571db82..e254652 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1711,
+/**/
1710,
/**/
1709,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:56 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 49b27326447d0827c59c6cd201d58f65c1163086
Author: Bram Moolenaar <***@vim.org>
Date: Tue Apr 5 21:13:00 2016 +0200

patch 7.4.1712
Problem: For plugins in packages, plugin authors need to take care of all
dependencies.
Solution: When loading "start" packages and for :packloadall, first add all
directories to 'runtimepath' before sourcing plugins.
---
src/ex_cmds2.c | 20 +++++++++++++++-----
src/testdir/test_packadd.vim | 33 +++++++++++++++++++++++++++++----
src/version.c | 2 ++
3 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 9f74376..657c772 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3313,6 +3313,11 @@ source_all_matches(char_u *pat)
}
}

+/* used for "cookie" of add_pack_plugin() */
+static int APP_ADD_DIR;
+static int APP_LOAD;
+static int APP_BOTH;
+
static void
add_pack_plugin(char_u *fname, void *cookie)
{
@@ -3324,11 +3329,10 @@ add_pack_plugin(char_u *fname, void *cookie)
int oldlen;
int addlen;
char_u *ffname = fix_fname(fname);
- int load_files = cookie != NULL;

if (ffname == NULL)
return;
- if (strstr((char *)p_rtp, (char *)ffname) == NULL)
+ if (cookie != &APP_LOAD && strstr((char *)p_rtp, (char *)ffname) == NULL)
{
/* directory not in 'runtimepath', add it */
p4 = p3 = p2 = p1 = get_past_head(ffname);
@@ -3374,7 +3378,7 @@ add_pack_plugin(char_u *fname, void *cookie)
vim_free(new_rtp);
}

- if (load_files)
+ if (cookie != &APP_ADD_DIR)
{
static char *plugpat = "%s/plugin/**/*.vim";
static char *ftpat = "%s/ftdetect/*.vim";
@@ -3423,8 +3427,14 @@ ex_packloadall(exarg_T *eap)
if (!did_source_packages || (eap != NULL && eap->forceit))
{
did_source_packages = TRUE;
+
+ /* First do a round to add all directories to 'runtimepath', then load
+ * the plugins. This allows for plugins to use an autoload directory
+ * of another plugin. */
+ do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
+ add_pack_plugin, &APP_ADD_DIR);
do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
- add_pack_plugin, p_pp);
+ add_pack_plugin, &APP_LOAD);
}
}

@@ -3444,7 +3454,7 @@ ex_packadd(exarg_T *eap)
return;
vim_snprintf(pat, len, plugpat, eap->arg);
do_in_path(p_pp, (char_u *)pat, DIP_ALL + DIP_DIR + DIP_ERR,
- add_pack_plugin, eap->forceit ? NULL : p_pp);
+ add_pack_plugin, eap->forceit ? &APP_ADD_DIR : &APP_BOTH);
vim_free(pat);
}

diff --git a/src/testdir/test_packadd.vim b/src/testdir/test_packadd.vim
index 9e75c33..66a344b 100644
--- a/src/testdir/test_packadd.vim
+++ b/src/testdir/test_packadd.vim
@@ -87,14 +87,39 @@ func Test_packadd_completion()
endfunc

func Test_packloadall()
- let plugindir = &packpath . '/pack/mine/start/foo/plugin'
- call mkdir(plugindir, 'p')
- call writefile(['let g:plugin_foo_number = 1234'], plugindir . '/bar.vim')
+ " plugin foo with an autoload directory
+ let fooplugindir = &packpath . '/pack/mine/start/foo/plugin'
+ call mkdir(fooplugindir, 'p')
+ call writefile(['let g:plugin_foo_number = 1234',
+ \ 'let g:plugin_foo_auto = bbb#value',
+ \ 'let g:plugin_extra_auto = extra#value'], fooplugindir . '/bar.vim')
+ let fooautodir = &packpath . '/pack/mine/start/foo/autoload'
+ call mkdir(fooautodir, 'p')
+ call writefile(['let bar#value = 77'], fooautodir . '/bar.vim')
+
+ " plugin aaa with an autoload directory
+ let aaaplugindir = &packpath . '/pack/mine/start/aaa/plugin'
+ call mkdir(aaaplugindir, 'p')
+ call writefile(['let g:plugin_aaa_number = 333',
+ \ 'let g:plugin_aaa_auto = bar#value'], aaaplugindir . '/bbb.vim')
+ let aaaautodir = &packpath . '/pack/mine/start/aaa/autoload'
+ call mkdir(aaaautodir, 'p')
+ call writefile(['let bbb#value = 55'], aaaautodir . '/bbb.vim')
+
+ " plugin extra with only an autoload directory
+ let extraautodir = &packpath . '/pack/mine/start/extra/autoload'
+ call mkdir(extraautodir, 'p')
+ call writefile(['let extra#value = 99'], extraautodir . '/extra.vim')
+
packloadall
call assert_equal(1234, g:plugin_foo_number)
+ call assert_equal(55, g:plugin_foo_auto)
+ call assert_equal(99, g:plugin_extra_auto)
+ call assert_equal(333, g:plugin_aaa_number)
+ call assert_equal(77, g:plugin_aaa_auto)

" only works once
- call writefile(['let g:plugin_bar_number = 4321'], plugindir . '/bar2.vim')
+ call writefile(['let g:plugin_bar_number = 4321'], fooplugindir . '/bar2.vim')
packloadall
call assert_false(exists('g:plugin_bar_number'))

diff --git a/src/version.c b/src/version.c
index e254652..91f02a5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1712,
+/**/
1711,
/**/
1710,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:57 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit f80663f17b2f2499b45eb4467088704c8298c385
Author: Bram Moolenaar <***@vim.org>
Date: Tue Apr 5 21:56:06 2016 +0200

patch 7.4.1713
Problem: GTK GUI doesn't work on Wayland.
Solution: Specify that only the X11 backend is allowed. (Simon McVittie)
---
src/gui_gtk_x11.c | 6 ++++++
src/version.c | 2 ++
2 files changed, 8 insertions(+)

diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index aa4137a..00196eb 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -1679,6 +1679,12 @@ gui_mch_init_check(void)
}
#endif

+#if GTK_CHECK_VERSION(3,10,0)
+ /* Vim currently assumes that Gtk means X11, so it cannot use native Gtk
+ * support for other backends such as Wayland. */
+ gdk_set_allowed_backends ("x11");
+#endif
+
#ifdef FEAT_GUI_GNOME
if (gtk_socket_id == 0)
using_gnome = 1;
diff --git a/src/version.c b/src/version.c
index 91f02a5..f22af28 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1713,
+/**/
1712,
/**/
1711,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:57 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 54f1b7abf8c48b1dd997202258d1d0673ed4bd29
Author: Bram Moolenaar <***@vim.org>
Date: Tue Apr 5 22:07:04 2016 +0200

patch 7.4.1714
Problem: Non-GUI specific settings in the gvimrc_example file.
Solution: Move some settings to the vimrc_example file. Remove setting
'hlsearch' again. (suggested by Hirohito Higashi)
---
runtime/gvimrc_example.vim | 11 +++--------
runtime/vimrc_example.vim | 11 ++++++++---
src/version.c | 2 ++
3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/runtime/gvimrc_example.vim b/runtime/gvimrc_example.vim
index 5a5197e..fa0f685 100644
--- a/runtime/gvimrc_example.vim
+++ b/runtime/gvimrc_example.vim
@@ -1,8 +1,9 @@
" An example for a gvimrc file.
-" The commands in this are executed when the GUI is started.
+" The commands in this are executed when the GUI is started, after the vimrc
+" has been executed.
"
" Maintainer: Bram Moolenaar <***@vim.org>
-" Last change: 2001 Sep 02
+" Last change: 2016 Apr 05
"
" To use it, copy it to
" for Unix and OS/2: ~/.gvimrc
@@ -27,17 +28,11 @@ map! <S-Insert> <MiddleMouse>
" Only do this for Vim version 5.0 and later.
if version >= 500

- " I like highlighting strings inside C comments
- let c_comment_strings=1
-
" Switch on syntax highlighting if it wasn't on yet.
if !exists("syntax_on")
syntax on
endif

- " Switch on search pattern highlighting.
- set hlsearch
-
" For Win32 version, have "K" lookup the keyword in a help file
"if has("win32")
" let winhelpfile='windows.hlp'
diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim
index 9cb66ee..6d5eac4 100644
--- a/runtime/vimrc_example.vim
+++ b/runtime/vimrc_example.vim
@@ -1,7 +1,7 @@
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <***@vim.org>
-" Last change: 2016 Mar 25
+" Last change: 2016 Apr 05
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
@@ -47,11 +47,16 @@ if has('mouse')
set mouse=a
endif

-" Switch syntax highlighting on, when the terminal has colors
-" Also switch on highlighting the last used search pattern.
+" Switch syntax highlighting on when the terminal has colors or when using the
+" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
syntax on
+
+ " Also switch on highlighting the last used search pattern.
set hlsearch
+
+ " I like highlighting strings inside C comments.
+ let c_comment_strings=1
endif

" Only do this part when compiled with support for autocommands.
diff --git a/src/version.c b/src/version.c
index f22af28..d420eba 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1714,
+/**/
1713,
/**/
1712,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:57 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit ddecc25947dbdd689d5bcaed32f298a08abdd497
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 6 22:59:37 2016 +0200

patch 7.4.1715
Problem: Double free when a partial is in a cycle with a list or dict.
(Nikolai Pavlov)
Solution: Do not free a nested list or dict used by the partial.
---
src/eval.c | 110 ++++++++++++++++++++++++++-----------------
src/testdir/test_partial.vim | 18 +++++++
src/version.c | 2 +
3 files changed, 88 insertions(+), 42 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 070485f..e7fbeaa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -5929,6 +5929,57 @@ get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate)
return OK;
}

+ static void
+partial_free(partial_T *pt, int recursive)
+{
+ int i;
+
+ for (i = 0; i < pt->pt_argc; ++i)
+ {
+ typval_T *tv = &pt->pt_argv[i];
+
+ if (recursive || (tv->v_type != VAR_DICT && tv->v_type != VAR_LIST))
+ clear_tv(tv);
+ }
+ vim_free(pt->pt_argv);
+ if (recursive)
+ dict_unref(pt->pt_dict);
+ func_unref(pt->pt_name);
+ vim_free(pt->pt_name);
+ vim_free(pt);
+}
+
+/*
+ * Unreference a closure: decrement the reference count and free it when it
+ * becomes zero.
+ */
+ void
+partial_unref(partial_T *pt)
+{
+ if (pt != NULL && --pt->pt_refcount <= 0)
+ partial_free(pt, TRUE);
+}
+
+/*
+ * Like clear_tv(), but do not free lists or dictionaries.
+ * This is when called via free_unref_items().
+ */
+ static void
+clear_tv_no_recurse(typval_T *tv)
+{
+ if (tv->v_type == VAR_PARTIAL)
+ {
+ partial_T *pt = tv->vval.v_partial;
+
+ /* We unref the partial but not the dict or any list it
+ * refers to. */
+ if (pt != NULL && --pt->pt_refcount == 0)
+ partial_free(pt, FALSE);
+ }
+ else if (tv->v_type != VAR_LIST && tv->v_type != VAR_DICT)
+ clear_tv(tv);
+}
+
/*
* Allocate a variable for a List and fill it from "*arg".
* Return OK or FAIL.
@@ -6070,9 +6121,10 @@ list_free(
{
/* Remove the item before deleting it. */
l->lv_first = item->li_next;
- if (recurse || (item->li_tv.v_type != VAR_LIST
- && item->li_tv.v_type != VAR_DICT))
+ if (recurse)
clear_tv(&item->li_tv);
+ else
+ clear_tv_no_recurse(&item->li_tv);
vim_free(item);
}
vim_free(l);
@@ -7185,6 +7237,16 @@ set_ref_in_item(
}
}
}
+ if (tv->v_type == VAR_PARTIAL)
+ {
+ partial_T *pt = tv->vval.v_partial;
+ int i;
+
+ if (pt != NULL)
+ for (i = 0; i < pt->pt_argc; ++i)
+ set_ref_in_item(&pt->pt_argv[i], copyID,
+ ht_stack, list_stack);
+ }
}
else if (tv->v_type == VAR_LIST)
{
@@ -7215,32 +7277,6 @@ set_ref_in_item(
return abort;
}

- static void
-partial_free(partial_T *pt, int free_dict)
-{
- int i;
-
- for (i = 0; i < pt->pt_argc; ++i)
- clear_tv(&pt->pt_argv[i]);
- vim_free(pt->pt_argv);
- if (free_dict)
- dict_unref(pt->pt_dict);
- func_unref(pt->pt_name);
- vim_free(pt->pt_name);
- vim_free(pt);
-}
-
-/*
- * Unreference a closure: decrement the reference count and free it when it
- * becomes zero.
- */
- void
-partial_unref(partial_T *pt)
-{
- if (pt != NULL && --pt->pt_refcount <= 0)
- partial_free(pt, TRUE);
-}
-
/*
* Allocate an empty header for a dictionary.
*/
@@ -7331,20 +7367,10 @@ dict_free(
* something recursive causing trouble. */
di = HI2DI(hi);
hash_remove(&d->dv_hashtab, hi);
- if (recurse || (di->di_tv.v_type != VAR_LIST
- && di->di_tv.v_type != VAR_DICT))
- {
- if (!recurse && di->di_tv.v_type == VAR_PARTIAL)
- {
- partial_T *pt = di->di_tv.vval.v_partial;
-
- /* We unref the partial but not the dict it refers to. */
- if (pt != NULL && --pt->pt_refcount == 0)
- partial_free(pt, FALSE);
- }
- else
- clear_tv(&di->di_tv);
- }
+ if (recurse)
+ clear_tv(&di->di_tv);
+ else
+ clear_tv_no_recurse(&di->di_tv);
vim_free(di);
--todo;
}
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index 08958de..2d53e82 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -220,3 +220,21 @@ func Test_bind_in_python()
endtry
endif
endfunc
+
+" This causes double free on exit if EXITFREE is defined.
+func Test_cyclic_list_arg()
+ let l = []
+ let Pt = function('string', [l])
+ call add(l, Pt)
+ unlet l
+ unlet Pt
+endfunc
+
+" This causes double free on exit if EXITFREE is defined.
+func Test_cyclic_dict_arg()
+ let d = {}
+ let Pt = function('string', [d])
+ let d.Pt = Pt
+ unlet d
+ unlet Pt
+endfunc
diff --git a/src/version.c b/src/version.c
index d420eba..5c89d6b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1715,
+/**/
1714,
/**/
1713,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:57 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit baec5c1768098f9dd867b465aaabfdfb294f10c2
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 6 23:06:23 2016 +0200

patch 7.4.1716
Problem: 'autochdir' doesn't work for the first file. (Rob Hoelz)
Solution: Call DO_AUTOCHDIR after startup. (Christian Brabandt, closes #704)
---
src/main.c | 3 +++
src/version.c | 2 ++
2 files changed, 5 insertions(+)

diff --git a/src/main.c b/src/main.c
index 91ef66d..dc7b702 100644
--- a/src/main.c
+++ b/src/main.c
@@ -959,6 +959,9 @@ vim_main2(int argc UNUSED, char **argv UNUSED)
no_wait_return = FALSE;
starting = 0;

+ /* 'autochdir' has been postponed */
+ DO_AUTOCHDIR
+
#ifdef FEAT_TERMRESPONSE
/* Requesting the termresponse is postponed until here, so that a "-c q"
* argument doesn't make it appear in the shell Vim was started from. */
diff --git a/src/version.c b/src/version.c
index 5c89d6b..7106a39 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1716,
+/**/
1715,
/**/
1714,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:57 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 0e4c1de5560c7f8b4cae539ec8cff0949daba3fc
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 7 21:40:38 2016 +0200

patch 7.4.1717
Problem: Leaking memory when opening a channel fails.
Solution: Unreference partials in job options.
---
src/channel.c | 60 +++++++++++++++++++++++++++++++-------------
src/eval.c | 12 ++++-----
src/proto/channel.pro | 1 +
src/testdir/test_channel.vim | 12 +++++++++
src/version.c | 2 ++
5 files changed, 64 insertions(+), 23 deletions(-)

diff --git a/src/channel.c b/src/channel.c
index b21c443..7b811db 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -858,7 +858,7 @@ channel_open_func(typval_T *argvars)
char *rest;
int port;
jobopt_T opt;
- channel_T *channel;
+ channel_T *channel = NULL;

address = get_tv_string(&argvars[0]);
if (argvars[1].v_type != VAR_UNKNOWN
@@ -890,11 +890,11 @@ channel_open_func(typval_T *argvars)
opt.jo_timeout = 2000;
if (get_job_options(&argvars[1], &opt,
JO_MODE_ALL + JO_CB_ALL + JO_WAITTIME + JO_TIMEOUT_ALL) == FAIL)
- return NULL;
+ goto theend;
if (opt.jo_timeout < 0)
{
EMSG(_(e_invarg));
- return NULL;
+ goto theend;
}

channel = channel_open((char *)address, port, opt.jo_waittime, NULL);
@@ -903,6 +903,8 @@ channel_open_func(typval_T *argvars)
opt.jo_set = JO_ALL;
channel_set_options(channel, &opt);
}
+theend:
+ free_job_options(&opt);
return channel;
}

@@ -2897,7 +2899,7 @@ common_channel_read(typval_T *argvars, typval_T *rettv, int raw)
clear_job_options(&opt);
if (get_job_options(&argvars[1], &opt, JO_TIMEOUT + JO_PART + JO_ID)
== FAIL)
- return;
+ goto theend;

channel = get_channel_arg(&argvars[0], TRUE);
if (channel != NULL)
@@ -2930,6 +2932,9 @@ common_channel_read(typval_T *argvars, typval_T *rettv, int raw)
}
}
}
+
+theend:
+ free_job_options(&opt);
}

# if defined(WIN32) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) \
@@ -3056,13 +3061,13 @@ send_common(
channel_T *channel;
int part_send;

+ clear_job_options(opt);
channel = get_channel_arg(&argvars[0], TRUE);
if (channel == NULL)
return NULL;
part_send = channel_part_send(channel);
*part_read = channel_part_read(channel);

- clear_job_options(opt);
if (get_job_options(&argvars[2], opt, JO_CALLBACK + JO_TIMEOUT) == FAIL)
return NULL;

@@ -3145,6 +3150,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
free_tv(listtv);
}
}
+ free_job_options(&opt);
}

/*
@@ -3175,6 +3181,7 @@ ch_raw_common(typval_T *argvars, typval_T *rettv, int eval)
timeout = channel_get_timeout(channel, part_read);
rettv->vval.v_string = channel_read_block(channel, part_read, timeout);
}
+ free_job_options(&opt);
}

# if (defined(UNIX) && !defined(HAVE_SELECT)) || defined(PROTO)
@@ -3545,6 +3552,9 @@ handle_io(typval_T *item, int part, jobopt_T *opt)
return OK;
}

+/*
+ * Clear a jobopt_T before using it.
+ */
void
clear_job_options(jobopt_T *opt)
{
@@ -3552,6 +3562,22 @@ clear_job_options(jobopt_T *opt)
}

/*
+ * Free any members of a jobopt_T.
+ */
+ void
+free_job_options(jobopt_T *opt)
+{
+ if (opt->jo_partial != NULL)
+ partial_unref(opt->jo_partial);
+ if (opt->jo_out_partial != NULL)
+ partial_unref(opt->jo_out_partial);
+ if (opt->jo_err_partial != NULL)
+ partial_unref(opt->jo_err_partial);
+ if (opt->jo_close_partial != NULL)
+ partial_unref(opt->jo_close_partial);
+}
+
+/*
* Get the PART_ number from the first character of an option name.
*/
static int
@@ -4053,6 +4079,9 @@ job_start(typval_T *argvars)
return NULL;

job->jv_status = JOB_FAILED;
+#ifndef USE_ARGV
+ ga_init2(&ga, (int)sizeof(char*), 20);
+#endif

/* Default mode is NL. */
clear_job_options(&opt);
@@ -4060,7 +4089,7 @@ job_start(typval_T *argvars)
if (get_job_options(&argvars[1], &opt,
JO_MODE_ALL + JO_CB_ALL + JO_TIMEOUT_ALL + JO_STOPONEXIT
+ JO_EXIT_CB + JO_OUT_IO + JO_BLOCK_WRITE) == FAIL)
- return job;
+ goto theend;

/* Check that when io is "file" that there is a file name. */
for (part = PART_OUT; part <= PART_IN; ++part)
@@ -4070,7 +4099,7 @@ job_start(typval_T *argvars)
|| *opt.jo_io_name[part] == NUL))
{
EMSG(_("E920: _io file requires _name to be set"));
- return job;
+ goto theend;
}

if ((opt.jo_set & JO_IN_IO) && opt.jo_io[PART_IN] == JIO_BUFFER)
@@ -4091,7 +4120,7 @@ job_start(typval_T *argvars)
else
buf = buflist_find_by_name(opt.jo_io_name[PART_IN], FALSE);
if (buf == NULL)
- return job;
+ goto theend;
if (buf->b_ml.ml_mfp == NULL)
{
char_u numbuf[NUMBUFLEN];
@@ -4105,17 +4134,13 @@ job_start(typval_T *argvars)
else
s = opt.jo_io_name[PART_IN];
EMSG2(_("E918: buffer must be loaded: %s"), s);
- return job;
+ goto theend;
}
job->jv_in_buf = buf;
}

job_set_options(job, &opt);

-#ifndef USE_ARGV
- ga_init2(&ga, (int)sizeof(char*), 20);
-#endif
-
if (argvars[0].v_type == VAR_STRING)
{
/* Command is a string. */
@@ -4123,11 +4148,11 @@ job_start(typval_T *argvars)
if (cmd == NULL || *cmd == NUL)
{
EMSG(_(e_invarg));
- return job;
+ goto theend;
}
#ifdef USE_ARGV
if (mch_parse_cmd(cmd, FALSE, &argv, &argc) == FAIL)
- return job;
+ goto theend;
argv[argc] = NULL;
#endif
}
@@ -4136,7 +4161,7 @@ job_start(typval_T *argvars)
|| argvars[0].vval.v_list->lv_len < 1)
{
EMSG(_(e_invarg));
- return job;
+ goto theend;
}
else
{
@@ -4148,7 +4173,7 @@ job_start(typval_T *argvars)
/* Pass argv[] to mch_call_shell(). */
argv = (char **)alloc(sizeof(char *) * (l->lv_len + 1));
if (argv == NULL)
- return job;
+ goto theend;
#endif
for (li = l->lv_first; li != NULL; li = li->li_next)
{
@@ -4222,6 +4247,7 @@ theend:
#else
vim_free(ga.ga_data);
#endif
+ free_job_options(&opt);
return job;
}

diff --git a/src/eval.c b/src/eval.c
index e7fbeaa..b4e7166 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -10321,9 +10321,9 @@ f_ch_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
return;
clear_job_options(&opt);
if (get_job_options(&argvars[1], &opt,
- JO_CB_ALL + JO_TIMEOUT_ALL + JO_MODE_ALL) == FAIL)
- return;
- channel_set_options(channel, &opt);
+ JO_CB_ALL + JO_TIMEOUT_ALL + JO_MODE_ALL) == OK)
+ channel_set_options(channel, &opt);
+ free_job_options(&opt);
}

/*
@@ -14889,9 +14889,9 @@ f_job_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
if (job == NULL)
return;
clear_job_options(&opt);
- if (get_job_options(&argvars[1], &opt, JO_STOPONEXIT + JO_EXIT_CB) == FAIL)
- return;
- job_set_options(job, &opt);
+ if (get_job_options(&argvars[1], &opt, JO_STOPONEXIT + JO_EXIT_CB) == OK)
+ job_set_options(job, &opt);
+ free_job_options(&opt);
}

/*
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index b796d82..e4ef003 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -46,6 +46,7 @@ int channel_part_read(channel_T *channel);
ch_mode_T channel_get_mode(channel_T *channel, int part);
int channel_get_timeout(channel_T *channel, int part);
void clear_job_options(jobopt_T *opt);
+void free_job_options(jobopt_T *opt);
int get_job_options(typval_T *tv, jobopt_T *opt, int supported);
channel_T *get_channel_arg(typval_T *tv, int check_open);
void job_unref(job_T *job);
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 119f71a..e134527 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -1231,5 +1231,17 @@ func Test_job_start_invalid()
call assert_fails('call job_start("")', 'E474:')
endfunc

+" This leaking memory.
+func Test_partial_in_channel_cycle()
+ let d = {}
+ let d.a = function('string', [d])
+ try
+ let d.b = ch_open('nowhere:123', {'close_cb': d.a})
+ catch
+ call assert_exception('E901:')
+ endtry
+ unlet d
+endfunc
+
" Uncomment this to see what happens, output is in src/testdir/channellog.
" call ch_logfile('channellog', 'w')
diff --git a/src/version.c b/src/version.c
index 7106a39..e0c0888 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1717,
+/**/
1716,
/**/
1715,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:57 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit d56374e25df0b317b01423a01f158157faa647fa
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 7 22:16:30 2016 +0200

patch 7.4.1718
Problem: Coverity: not using return value of set_ref_in_item().
Solution: Use the return value.
---
src/eval.c | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/eval.c b/src/eval.c
index b4e7166..3dc3e21 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7244,7 +7244,7 @@ set_ref_in_item(

if (pt != NULL)
for (i = 0; i < pt->pt_argc; ++i)
- set_ref_in_item(&pt->pt_argv[i], copyID,
+ abort = abort || set_ref_in_item(&pt->pt_argv[i], copyID,
ht_stack, list_stack);
}
}
diff --git a/src/version.c b/src/version.c
index e0c0888..a808bb7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1718,
+/**/
1717,
/**/
1716,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:57 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 107e1eef1df3b786ad3ad49fbdb9e058649303b5
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 8 17:07:19 2016 +0200

patch 7.4.1719
Problem: Leaking memory when there is a cycle involving a job and a
partial.
Solution: Add a copyID to job and channel. Set references in items referred
by them. Go through all jobs and channels to find unreferenced
items. Also, decrement reference counts when garbage collecting.
---
src/channel.c | 138 ++++++++++++++++---
src/eval.c | 321 +++++++++++++++++++++++++++++--------------
src/globals.h | 2 +
src/ops.c | 4 +-
src/proto/channel.pro | 5 +-
src/proto/eval.pro | 8 +-
src/regexp.c | 2 +-
src/structs.h | 5 +-
src/tag.c | 4 +-
src/testdir/test_partial.vim | 19 ++-
src/version.c | 2 +
11 files changed, 377 insertions(+), 133 deletions(-)

diff --git a/src/channel.c b/src/channel.c
index 7b811db..83d057d 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -368,6 +368,39 @@ channel_still_useful(channel_T *channel)
}

/*
+ * Close a channel and free all its resources.
+ */
+ static void
+channel_free_contents(channel_T *channel)
+{
+ channel_close(channel, TRUE);
+ channel_clear(channel);
+ ch_log(channel, "Freeing channel");
+}
+
+ static void
+channel_free_channel(channel_T *channel)
+{
+ if (channel->ch_next != NULL)
+ channel->ch_next->ch_prev = channel->ch_prev;
+ if (channel->ch_prev == NULL)
+ first_channel = channel->ch_next;
+ else
+ channel->ch_prev->ch_next = channel->ch_next;
+ vim_free(channel);
+}
+
+ static void
+channel_free(channel_T *channel)
+{
+ if (!in_free_unref_items)
+ {
+ channel_free_contents(channel);
+ channel_free_channel(channel);
+ }
+}
+
+/*
* Close a channel and free all its resources if there is no further action
* possible, there is no callback to be invoked or the associated job was
* killed.
@@ -397,22 +430,39 @@ channel_unref(channel_T *channel)
return FALSE;
}

-/*
- * Close a channel and free all its resources.
- */
+ int
+free_unused_channels_contents(int copyID, int mask)
+{
+ int did_free = FALSE;
+ channel_T *ch;
+
+ for (ch = first_channel; ch != NULL; ch = ch->ch_next)
+ if ((ch->ch_copyID & mask) != (copyID & mask))
+ {
+ /* Free the channel and ordinary items it contains, but don't
+ * recurse into Lists, Dictionaries etc. */
+ channel_free_contents(ch);
+ did_free = TRUE;
+ }
+ return did_free;
+}
+
void
-channel_free(channel_T *channel)
+free_unused_channels(int copyID, int mask)
{
- channel_close(channel, TRUE);
- channel_clear(channel);
- ch_log(channel, "Freeing channel");
- if (channel->ch_next != NULL)
- channel->ch_next->ch_prev = channel->ch_prev;
- if (channel->ch_prev == NULL)
- first_channel = channel->ch_next;
- else
- channel->ch_prev->ch_next = channel->ch_next;
- vim_free(channel);
+ channel_T *ch;
+ channel_T *ch_next;
+
+ for (ch = first_channel; ch != NULL; ch = ch_next)
+ {
+ ch_next = ch->ch_next;
+ if ((ch->ch_copyID & mask) != (copyID & mask))
+ {
+ /* Free the channel and ordinary items it contains, but don't
+ * recurse into Lists, Dictionaries etc. */
+ channel_free_channel(ch);
+ }
+ }
}

#if defined(FEAT_GUI) || defined(PROTO)
@@ -2457,6 +2507,7 @@ channel_clear(channel_T *channel)
channel_clear_one(channel, PART_SOCK);
channel_clear_one(channel, PART_OUT);
channel_clear_one(channel, PART_ERR);
+ /* there is no callback or queue for PART_IN */
vim_free(channel->ch_callback);
channel->ch_callback = NULL;
partial_unref(channel->ch_partial);
@@ -3913,7 +3964,7 @@ get_channel_arg(typval_T *tv, int check_open)
static job_T *first_job = NULL;

static void
-job_free(job_T *job)
+job_free_contents(job_T *job)
{
ch_log(job->jv_channel, "Freeing job");
if (job->jv_channel != NULL)
@@ -3928,19 +3979,33 @@ job_free(job_T *job)
}
mch_clear_job(job);

+ vim_free(job->jv_stoponexit);
+ vim_free(job->jv_exit_cb);
+ partial_unref(job->jv_exit_partial);
+}
+
+ static void
+job_free_job(job_T *job)
+{
if (job->jv_next != NULL)
job->jv_next->jv_prev = job->jv_prev;
if (job->jv_prev == NULL)
first_job = job->jv_next;
else
job->jv_prev->jv_next = job->jv_next;
-
- vim_free(job->jv_stoponexit);
- vim_free(job->jv_exit_cb);
- partial_unref(job->jv_exit_partial);
vim_free(job);
}

+ static void
+job_free(job_T *job)
+{
+ if (!in_free_unref_items)
+ {
+ job_free_contents(job);
+ job_free_job(job);
+ }
+}
+
void
job_unref(job_T *job)
{
@@ -3964,6 +4029,41 @@ job_unref(job_T *job)
}
}

+ int
+free_unused_jobs_contents(int copyID, int mask)
+{
+ int did_free = FALSE;
+ job_T *job;
+
+ for (job = first_job; job != NULL; job = job->jv_next)
+ if ((job->jv_copyID & mask) != (copyID & mask))
+ {
+ /* Free the channel and ordinary items it contains, but don't
+ * recurse into Lists, Dictionaries etc. */
+ job_free_contents(job);
+ did_free = TRUE;
+ }
+ return did_free;
+}
+
+ void
+free_unused_jobs(int copyID, int mask)
+{
+ job_T *job;
+ job_T *job_next;
+
+ for (job = first_job; job != NULL; job = job_next)
+ {
+ job_next = job->jv_next;
+ if ((job->jv_copyID & mask) != (copyID & mask))
+ {
+ /* Free the channel and ordinary items it contains, but don't
+ * recurse into Lists, Dictionaries etc. */
+ job_free_job(job);
+ }
+ }
+}
+
/*
* Allocate a job. Sets the refcount to one and sets options default.
*/
diff --git a/src/eval.c b/src/eval.c
index 3dc3e21..1c5a316 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -430,6 +430,8 @@ static int get_option_tv(char_u **arg, typval_T *rettv, int evaluate);
static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate);
static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
static int get_list_tv(char_u **arg, typval_T *rettv, int evaluate);
+static void list_free_contents(list_T *l);
+static void list_free_list(list_T *l);
static long list_len(list_T *l);
static int list_equal(list_T *l1, list_T *l2, int ic, int recursive);
static int dict_equal(dict_T *d1, dict_T *d2, int ic, int recursive);
@@ -459,6 +461,9 @@ static int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, lin
static void emsg_funcname(char *ermsg, char_u *name);
static int non_zero_arg(typval_T *argvars);

+static void dict_free_contents(dict_T *d);
+static void dict_free_dict(dict_T *d);
+
#ifdef FEAT_FLOAT
static void f_abs(typval_T *argvars, typval_T *rettv);
static void f_acos(typval_T *argvars, typval_T *rettv);
@@ -5589,7 +5594,7 @@ eval_index(
{
if (list_append_tv(l, &item->li_tv) == FAIL)
{
- list_free(l, TRUE);
+ list_free(l);
return FAIL;
}
item = item->li_next;
@@ -5930,20 +5935,14 @@ get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate)
}

static void
-partial_free(partial_T *pt, int recursive)
+partial_free(partial_T *pt)
{
int i;

for (i = 0; i < pt->pt_argc; ++i)
- {
- typval_T *tv = &pt->pt_argv[i];
-
- if (recursive || (tv->v_type != VAR_DICT && tv->v_type != VAR_LIST))
- clear_tv(tv);
- }
+ clear_tv(&pt->pt_argv[i]);
vim_free(pt->pt_argv);
- if (recursive)
- dict_unref(pt->pt_dict);
+ dict_unref(pt->pt_dict);
func_unref(pt->pt_name);
vim_free(pt->pt_name);
vim_free(pt);
@@ -5957,27 +5956,7 @@ partial_free(partial_T *pt, int recursive)
partial_unref(partial_T *pt)
{
if (pt != NULL && --pt->pt_refcount <= 0)
- partial_free(pt, TRUE);
-}
-
-/*
- * Like clear_tv(), but do not free lists or dictionaries.
- * This is when called via free_unref_items().
- */
- static void
-clear_tv_no_recurse(typval_T *tv)
-{
- if (tv->v_type == VAR_PARTIAL)
- {
- partial_T *pt = tv->vval.v_partial;
-
- /* We unref the partial but not the dict or any list it
- * refers to. */
- if (pt != NULL && --pt->pt_refcount == 0)
- partial_free(pt, FALSE);
- }
- else if (tv->v_type != VAR_LIST && tv->v_type != VAR_DICT)
- clear_tv(tv);
+ partial_free(pt);
}

/*
@@ -6031,7 +6010,7 @@ get_list_tv(char_u **arg, typval_T *rettv, int evaluate)
EMSG2(_("E697: Missing end of List ']': %s"), *arg);
failret:
if (evaluate)
- list_free(l, TRUE);
+ list_free(l);
return FAIL;
}

@@ -6095,20 +6074,30 @@ rettv_list_alloc(typval_T *rettv)
list_unref(list_T *l)
{
if (l != NULL && --l->lv_refcount <= 0)
- list_free(l, TRUE);
+ list_free(l);
}

/*
* Free a list, including all non-container items it points to.
* Ignores the reference count.
*/
- void
-list_free(
- list_T *l,
- int recurse) /* Free Lists and Dictionaries recursively. */
+ static void
+list_free_contents(list_T *l)
{
listitem_T *item;

+ for (item = l->lv_first; item != NULL; item = l->lv_first)
+ {
+ /* Remove the item before deleting it. */
+ l->lv_first = item->li_next;
+ clear_tv(&item->li_tv);
+ vim_free(item);
+ }
+}
+
+ static void
+list_free_list(list_T *l)
+{
/* Remove the list from the list of lists for garbage collection. */
if (l->lv_used_prev == NULL)
first_list = l->lv_used_next;
@@ -6117,17 +6106,17 @@ list_free(
if (l->lv_used_next != NULL)
l->lv_used_next->lv_used_prev = l->lv_used_prev;

- for (item = l->lv_first; item != NULL; item = l->lv_first)
+ vim_free(l);
+}
+
+ void
+list_free(list_T *l)
+{
+ if (!in_free_unref_items)
{
- /* Remove the item before deleting it. */
- l->lv_first = item->li_next;
- if (recurse)
- clear_tv(&item->li_tv);
- else
- clear_tv_no_recurse(&item->li_tv);
- vim_free(item);
+ list_free_contents(l);
+ list_free_list(l);
}
- vim_free(l);
}

/*
@@ -7016,7 +7005,7 @@ garbage_collect(void)
#endif

#ifdef FEAT_JOB_CHANNEL
- abort = abort || set_ref_in_channel(copyID);
+// abort = abort || set_ref_in_channel(copyID);
#endif

if (!abort)
@@ -7056,7 +7045,7 @@ garbage_collect(void)
}

/*
- * Free lists, dictionaries and jobs that are no longer referenced.
+ * Free lists, dictionaries, channels and jobs that are no longer referenced.
*/
static int
free_unref_items(int copyID)
@@ -7065,29 +7054,66 @@ free_unref_items(int copyID)
list_T *ll, *ll_next;
int did_free = FALSE;

+ /* Let all "free" functions know that we are here. This means no
+ * dictionaries, lists, channels or jobs are to be freed, because we will
+ * do that here. */
+ in_free_unref_items = TRUE;
+
+ /*
+ * PASS 1: free the contents of the items. We don't free the items
+ * themselves yet, so that it is possible to decrement refcount counters
+ */
+
/*
* Go through the list of dicts and free items without the copyID.
*/
- for (dd = first_dict; dd != NULL; )
- {
- dd_next = dd->dv_used_next;
+ for (dd = first_dict; dd != NULL; dd = dd->dv_used_next)
if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
{
/* Free the Dictionary and ordinary items it contains, but don't
* recurse into Lists and Dictionaries, they will be in the list
* of dicts or list of lists. */
- dict_free(dd, FALSE);
+ dict_free_contents(dd);
did_free = TRUE;
}
- dd = dd_next;
- }

/*
* Go through the list of lists and free items without the copyID.
* But don't free a list that has a watcher (used in a for loop), these
* are not referenced anywhere.
*/
- for (ll = first_list; ll != NULL; )
+ for (ll = first_list; ll != NULL; ll = ll->lv_used_next)
+ if ((ll->lv_copyID & COPYID_MASK) != (copyID & COPYID_MASK)
+ && ll->lv_watch == NULL)
+ {
+ /* Free the List and ordinary items it contains, but don't recurse
+ * into Lists and Dictionaries, they will be in the list of dicts
+ * or list of lists. */
+ list_free_contents(ll);
+ did_free = TRUE;
+ }
+
+#ifdef FEAT_JOB_CHANNEL
+ /* Go through the list of jobs and free items without the copyID. This
+ * must happen before doing channels, because jobs refer to channels, but
+ * the reference from the channel to the job isn't tracked. */
+ did_free |= free_unused_jobs_contents(copyID, COPYID_MASK);
+
+ /* Go through the list of channels and free items without the copyID. */
+ did_free |= free_unused_channels_contents(copyID, COPYID_MASK);
+#endif
+
+ /*
+ * PASS 2: free the items themselves.
+ */
+ for (dd = first_dict; dd != NULL; dd = dd_next)
+ {
+ dd_next = dd->dv_used_next;
+ if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
+ dict_free_dict(dd);
+ }
+
+ for (ll = first_list; ll != NULL; ll = ll_next)
{
ll_next = ll->lv_used_next;
if ((ll->lv_copyID & COPYID_MASK) != (copyID & COPYID_MASK)
@@ -7096,12 +7122,22 @@ free_unref_items(int copyID)
/* Free the List and ordinary items it contains, but don't recurse
* into Lists and Dictionaries, they will be in the list of dicts
* or list of lists. */
- list_free(ll, FALSE);
- did_free = TRUE;
+ list_free_list(ll);
}
- ll = ll_next;
}

+#ifdef FEAT_JOB_CHANNEL
+ /* Go through the list of jobs and free items without the copyID. This
+ * must happen before doing channels, because jobs refer to channels, but
+ * the reference from the channel to the job isn't tracked. */
+ free_unused_jobs(copyID, COPYID_MASK);
+
+ /* Go through the list of channels and free items without the copyID. */
+ free_unused_channels(copyID, COPYID_MASK);
+#endif
+
+ in_free_unref_items = FALSE;
+
return did_free;
}

@@ -7204,18 +7240,12 @@ set_ref_in_item(
ht_stack_T **ht_stack,
list_stack_T **list_stack)
{
- dict_T *dd;
- list_T *ll;
int abort = FALSE;

- if (tv->v_type == VAR_DICT || tv->v_type == VAR_PARTIAL)
+ if (tv->v_type == VAR_DICT)
{
- if (tv->v_type == VAR_DICT)
- dd = tv->vval.v_dict;
- else if (tv->vval.v_partial != NULL)
- dd = tv->vval.v_partial->pt_dict;
- else
- dd = NULL;
+ dict_T *dd = tv->vval.v_dict;
+
if (dd != NULL && dd->dv_copyID != copyID)
{
/* Didn't see this dict yet. */
@@ -7237,20 +7267,11 @@ set_ref_in_item(
}
}
}
- if (tv->v_type == VAR_PARTIAL)
- {
- partial_T *pt = tv->vval.v_partial;
- int i;
-
- if (pt != NULL)
- for (i = 0; i < pt->pt_argc; ++i)
- abort = abort || set_ref_in_item(&pt->pt_argv[i], copyID,
- ht_stack, list_stack);
- }
}
else if (tv->v_type == VAR_LIST)
{
- ll = tv->vval.v_list;
+ list_T *ll = tv->vval.v_list;
+
if (ll != NULL && ll->lv_copyID != copyID)
{
/* Didn't see this list yet. */
@@ -7274,6 +7295,96 @@ set_ref_in_item(
}
}
}
+ else if (tv->v_type == VAR_PARTIAL)
+ {
+ partial_T *pt = tv->vval.v_partial;
+ int i;
+
+ /* A partial does not have a copyID, because it cannot contain itself.
+ */
+ if (pt != NULL)
+ {
+ if (pt->pt_dict != NULL)
+ {
+ typval_T dtv;
+
+ dtv.v_type = VAR_DICT;
+ dtv.vval.v_dict = pt->pt_dict;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+
+ for (i = 0; i < pt->pt_argc; ++i)
+ abort = abort || set_ref_in_item(&pt->pt_argv[i], copyID,
+ ht_stack, list_stack);
+ }
+ }
+#ifdef FEAT_JOB_CHANNEL
+ else if (tv->v_type == VAR_JOB)
+ {
+ job_T *job = tv->vval.v_job;
+ typval_T dtv;
+
+ if (job != NULL && job->jv_copyID != copyID)
+ {
+ if (job->jv_channel != NULL)
+ {
+ dtv.v_type = VAR_CHANNEL;
+ dtv.vval.v_channel = job->jv_channel;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ if (job->jv_exit_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+ dtv.vval.v_partial = job->jv_exit_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+ }
+ else if (tv->v_type == VAR_CHANNEL)
+ {
+ channel_T *ch =tv->vval.v_channel;
+ int part;
+ typval_T dtv;
+ jsonq_T *jq;
+ cbq_T *cq;
+
+ if (ch != NULL && ch->ch_copyID != copyID)
+ {
+ for (part = PART_SOCK; part <= PART_IN; ++part)
+ {
+ for (jq = ch->ch_part[part].ch_json_head.jq_next; jq != NULL;
+ jq = jq->jq_next)
+ set_ref_in_item(jq->jq_value, copyID, ht_stack, list_stack);
+ for (cq = ch->ch_part[part].ch_cb_head.cq_next; cq != NULL;
+ cq = cq->cq_next)
+ if (cq->cq_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+ dtv.vval.v_partial = cq->cq_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ if (ch->ch_part[part].ch_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+ dtv.vval.v_partial = ch->ch_part[part].ch_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+ if (ch->ch_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+ dtv.vval.v_partial = ch->ch_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ if (ch->ch_close_partial != NULL)
+ {
+ dtv.v_type = VAR_PARTIAL;
+ dtv.vval.v_partial = ch->ch_close_partial;
+ set_ref_in_item(&dtv, copyID, ht_stack, list_stack);
+ }
+ }
+ }
+#endif
return abort;
}

@@ -7332,30 +7443,20 @@ rettv_dict_alloc(typval_T *rettv)
dict_unref(dict_T *d)
{
if (d != NULL && --d->dv_refcount <= 0)
- dict_free(d, TRUE);
+ dict_free(d);
}

/*
* Free a Dictionary, including all non-container items it contains.
* Ignores the reference count.
*/
- void
-dict_free(
- dict_T *d,
- int recurse) /* Free Lists and Dictionaries recursively. */
+ static void
+dict_free_contents(dict_T *d)
{
int todo;
hashitem_T *hi;
dictitem_T *di;

- /* Remove the dict from the list of dicts for garbage collection. */
- if (d->dv_used_prev == NULL)
- first_dict = d->dv_used_next;
- else
- d->dv_used_prev->dv_used_next = d->dv_used_next;
- if (d->dv_used_next != NULL)
- d->dv_used_next->dv_used_prev = d->dv_used_prev;
-
/* Lock the hashtab, we don't want it to resize while freeing items. */
hash_lock(&d->dv_hashtab);
todo = (int)d->dv_hashtab.ht_used;
@@ -7367,18 +7468,37 @@ dict_free(
* something recursive causing trouble. */
di = HI2DI(hi);
hash_remove(&d->dv_hashtab, hi);
- if (recurse)
- clear_tv(&di->di_tv);
- else
- clear_tv_no_recurse(&di->di_tv);
+ clear_tv(&di->di_tv);
vim_free(di);
--todo;
}
}
hash_clear(&d->dv_hashtab);
+}
+
+ static void
+dict_free_dict(dict_T *d)
+{
+ /* Remove the dict from the list of dicts for garbage collection. */
+ if (d->dv_used_prev == NULL)
+ first_dict = d->dv_used_next;
+ else
+ d->dv_used_prev->dv_used_next = d->dv_used_next;
+ if (d->dv_used_next != NULL)
+ d->dv_used_next->dv_used_prev = d->dv_used_prev;
vim_free(d);
}

+ void
+dict_free(dict_T *d)
+{
+ if (!in_free_unref_items)
+ {
+ dict_free_contents(d);
+ dict_free_dict(d);
+ }
+}
+
/*
* Allocate a Dictionary item.
* The "key" is copied to the new item.
@@ -7827,7 +7947,7 @@ get_dict_tv(char_u **arg, typval_T *rettv, int evaluate)
EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg);
failret:
if (evaluate)
- dict_free(d, TRUE);
+ dict_free(d);
return FAIL;
}

@@ -7842,9 +7962,6 @@ failret:
return OK;
}

-#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
-#endif
-
static char *
get_var_special_name(int nr)
{
@@ -15391,7 +15508,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|| list_append_number(rettv->vval.v_list,
(varnumber_T)-1) == FAIL))
{
- list_free(rettv->vval.v_list, TRUE);
+ list_free(rettv->vval.v_list);
rettv->vval.v_list = NULL;
goto theend;
}
@@ -16488,7 +16605,7 @@ f_readfile(typval_T *argvars, typval_T *rettv)

if (failed)
{
- list_free(rettv->vval.v_list, TRUE);
+ list_free(rettv->vval.v_list);
/* readfile doc says an empty list is returned on error */
rettv->vval.v_list = list_alloc();
}
@@ -20070,7 +20187,7 @@ errret:
if (res != NULL)
vim_free(res);
if (list != NULL)
- list_free(list, TRUE);
+ list_free(list);
}

/*
diff --git a/src/globals.h b/src/globals.h
index 05dec4a..3278ad9 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1619,6 +1619,8 @@ EXTERN int alloc_fail_countdown INIT(= -1);
EXTERN int alloc_fail_repeat INIT(= 0);

EXTERN int disable_char_avail_for_testing INIT(= 0);
+
+EXTERN int in_free_unref_items INIT(= FALSE);
#endif

/*
diff --git a/src/ops.c b/src/ops.c
index b1910d9..0584877 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -6391,7 +6391,7 @@ getreg_wrap_one_line(char_u *s, int flags)
{
if (list_append_string(list, NULL, -1) == FAIL)
{
- list_free(list, TRUE);
+ list_free(list);
return NULL;
}
list->lv_first->li_tv.vval.v_string = s;
@@ -6465,7 +6465,7 @@ get_reg_contents(int regname, int flags)
error = TRUE;
if (error)
{
- list_free(list, TRUE);
+ list_free(list);
return NULL;
}
return (char_u *)list;
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index e4ef003..d5114cb 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -5,7 +5,8 @@ void ch_log(channel_T *ch, char *msg);
void ch_logs(channel_T *ch, char *msg, char *name);
channel_T *add_channel(void);
int channel_unref(channel_T *channel);
-void channel_free(channel_T *channel);
+int free_unused_channels_contents(int copyID, int mask);
+void free_unused_channels(int copyID, int mask);
void channel_gui_register_all(void);
channel_T *channel_open(char *hostname, int port_in, int waittime, void (*nb_close_cb)(void));
channel_T *channel_open_func(typval_T *argvars);
@@ -50,6 +51,8 @@ void free_job_options(jobopt_T *opt);
int get_job_options(typval_T *tv, jobopt_T *opt, int supported);
channel_T *get_channel_arg(typval_T *tv, int check_open);
void job_unref(job_T *job);
+int free_unused_jobs_contents(int copyID, int mask);
+void free_unused_jobs(int copyID, int mask);
void job_set_options(job_T *job, jobopt_T *opt);
void job_stop_on_exit(void);
void job_check_ended(void);
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index 1de7a6d..38392b9 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -45,10 +45,12 @@ void ex_lockvar(exarg_T *eap);
int do_unlet(char_u *name, int forceit);
void del_menutrans_vars(void);
char_u *get_user_var_name(expand_T *xp, int idx);
+void partial_unref(partial_T *pt);
list_T *list_alloc(void);
int rettv_list_alloc(typval_T *rettv);
void list_unref(list_T *l);
-void list_free(list_T *l, int recurse);
+void list_free_internal(list_T *l);
+void list_free(list_T *l);
listitem_T *listitem_alloc(void);
void listitem_free(listitem_T *item);
void listitem_remove(list_T *l, listitem_T *item);
@@ -71,7 +73,8 @@ int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_
dict_T *dict_alloc(void);
int rettv_dict_alloc(typval_T *rettv);
void dict_unref(dict_T *d);
-void dict_free(dict_T *d, int recurse);
+void dict_free_internal(dict_T *d);
+void dict_free(dict_T *d);
dictitem_T *dictitem_alloc(char_u *key);
void dictitem_free(dictitem_T *item);
int dict_add(dict_T *d, dictitem_T *item);
@@ -87,7 +90,6 @@ int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typva
buf_T *buflist_find_by_name(char_u *name, int curtab_only);
int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
void dict_extend(dict_T *d1, dict_T *d2, char_u *action);
-void partial_unref(partial_T *pt);
void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv);
float_T vim_round(float_T f);
long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, char_u *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit);
diff --git a/src/regexp.c b/src/regexp.c
index b20e9c5..fada9fe 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -7910,7 +7910,7 @@ reg_submatch_list(int no)

if (error)
{
- list_free(list, TRUE);
+ list_free(list);
return NULL;
}
return list;
diff --git a/src/structs.h b/src/structs.h
index e753860..adee3e8 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1290,6 +1290,8 @@ struct jobvar_S
buf_T *jv_in_buf; /* buffer from "in-name" */

int jv_refcount; /* reference count */
+ int jv_copyID;
+
channel_T *jv_channel; /* channel for I/O, reference counted */
};

@@ -1425,11 +1427,12 @@ struct channel_S {

job_T *ch_job; /* Job that uses this channel; this does not
* count as a reference to avoid a circular
- * reference. */
+ * reference, the job refers to the channel. */
int ch_job_killed; /* TRUE when there was a job and it was killed
* or we know it died. */

int ch_refcount; /* reference count */
+ int ch_copyID;
};

#define JO_MODE 0x0001 /* channel mode */
diff --git a/src/tag.c b/src/tag.c
index 1541259..4224c6f 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -792,7 +792,7 @@ do_tag(
vim_free(cmd);
vim_free(fname);
if (list != NULL)
- list_free(list, TRUE);
+ list_free(list);
goto end_do_tag;
}

@@ -919,7 +919,7 @@ do_tag(
vim_snprintf((char *)IObuff, IOSIZE, "ltag %s", tag);
set_errorlist(curwin, list, ' ', IObuff);

- list_free(list, TRUE);
+ list_free(list);
vim_free(fname);
vim_free(cmd);

diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index 2d53e82..404bb74 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -221,7 +221,7 @@ func Test_bind_in_python()
endif
endfunc

-" This causes double free on exit if EXITFREE is defined.
+" This caused double free on exit if EXITFREE is defined.
func Test_cyclic_list_arg()
let l = []
let Pt = function('string', [l])
@@ -230,7 +230,7 @@ func Test_cyclic_list_arg()
unlet Pt
endfunc

-" This causes double free on exit if EXITFREE is defined.
+" This caused double free on exit if EXITFREE is defined.
func Test_cyclic_dict_arg()
let d = {}
let Pt = function('string', [d])
@@ -238,3 +238,18 @@ func Test_cyclic_dict_arg()
unlet d
unlet Pt
endfunc
+
+func Ignored(job1, job2, status)
+endfunc
+
+func Test_cycle_partial_job()
+ let job = job_start('echo')
+ call job_setoptions(job, {'exit_cb': function('Ignored', [job])})
+ unlet job
+endfunc
+
+func Test_ref_job_partial_dict()
+ let g:ref_job = job_start('echo')
+ let d = {'a': 'b'}
+ call job_setoptions(g:ref_job, {'exit_cb': function('string', [], d)})
+endfunc
diff --git a/src/version.c b/src/version.c
index a808bb7..dd50f98 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1719,
+/**/
1718,
/**/
1717,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 9e4043757cd2fc18d071fdd98abf297d74878943
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 8 17:25:19 2016 +0200

patch 7.4.1720
Problem: Tests fail without the job feature.
Solution: Skip tests when the job feature is not present.
---
src/testdir/test_partial.vim | 16 ++++++++++------
src/version.c | 2 ++
2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index 404bb74..5f4a48f 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -243,13 +243,17 @@ func Ignored(job1, job2, status)
endfunc

func Test_cycle_partial_job()
- let job = job_start('echo')
- call job_setoptions(job, {'exit_cb': function('Ignored', [job])})
- unlet job
+ if has('job')
+ let job = job_start('echo')
+ call job_setoptions(job, {'exit_cb': function('Ignored', [job])})
+ unlet job
+ endif
endfunc

func Test_ref_job_partial_dict()
- let g:ref_job = job_start('echo')
- let d = {'a': 'b'}
- call job_setoptions(g:ref_job, {'exit_cb': function('string', [], d)})
+ if has('job')
+ let g:ref_job = job_start('echo')
+ let d = {'a': 'b'}
+ call job_setoptions(g:ref_job, {'exit_cb': function('string', [], d)})
+ endif
endfunc
diff --git a/src/version.c b/src/version.c
index dd50f98..dc51874 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1720,
+/**/
1719,
/**/
1718,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit a4d13de8363abf4c12fe99a52b4e49e763de92fe
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 8 22:17:04 2016 +0200

patch 7.4.1721
Problem: The vimtbar files are unused.
Solution: Remove them. (Ken Takata)
---
Filelist | 3 -
src/version.c | 2 +
src/vimtbar.dll | Bin 35602 -> 0 bytes
src/vimtbar.h | 185 --------------------------------------------------------
src/vimtbar.lib | Bin 1024 -> 0 bytes
5 files changed, 2 insertions(+), 188 deletions(-)

diff --git a/Filelist b/Filelist
index 1af664d..b2b88ab 100644
--- a/Filelist
+++ b/Filelist
@@ -337,7 +337,6 @@ SRC_DOS = \
src/vimio.h \
src/gvim.exe.mnf \
src/vimrun.c \
- src/vimtbar.h \
src/xpm_w32.c \
src/xpm_w32.h \
src/xxd/Make_bc5.mak \
@@ -375,7 +374,6 @@ SRC_DOS_BIN = \
src/tools.bmp \
src/vim*.ico \
src/vim.tlb \
- src/vimtbar.lib \
src/xpm/COPYRIGHT \
src/xpm/README.txt \
src/xpm/include/*.h \
@@ -383,7 +381,6 @@ SRC_DOS_BIN = \
src/xpm/x64/lib/libXpm.lib \
src/xpm/x86/lib/libXpm.a \
src/xpm/x86/lib/libXpm.lib \
- src/vimtbar.dll \
nsis/icons/*.bmp \
nsis/icons/*.ico \

diff --git a/src/version.c b/src/version.c
index dc51874..ef777cf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1721,
+/**/
1720,
/**/
1719,
diff --git a/src/vimtbar.dll b/src/vimtbar.dll
deleted file mode 100755
index 6a8dfc9..0000000
Binary files a/src/vimtbar.dll and /dev/null differ
diff --git a/src/vimtbar.h b/src/vimtbar.h
deleted file mode 100644
index 7427f64..0000000
--- a/src/vimtbar.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/* vi:set ts=8 sts=4 sw=4:
- *
- * VIM - Vi IMproved by Bram Moolenaar
- * Win16 Toolbar by Vince Negri - External Header
- * (Based on MS Sample Code)
- *
- * Do ":help uganda" in Vim to read copying and usage conditions.
- * Do ":help credits" in Vim to see a list of people who contributed.
- */
-//
-// Button Structure
-//
-typedef struct tagTBBUTTON
-{
- int iBitmap; // index into bitmap of this button's picture
- int idCommand; // WM_COMMAND menu ID that this button sends
- BYTE fsState; // button's state
- BYTE fsStyle; // button's style
-} TBBUTTON;
-
-typedef TBBUTTON NEAR* PTBBUTTON;
-typedef TBBUTTON FAR* LPTBBUTTON;
-typedef const TBBUTTON FAR* LPCTBBUTTON;
-
-
-//
-// Styles
-//
-#define TBSTYLE_BUTTON 0x00 // this entry is button
-#define TBSTYLE_SEP 0x01 // this entry is a separator
-#define TBSTYLE_CHECK 0x02 // this is a check button (it stays down)
-#define TBSTYLE_GROUP 0x04 // this is a check button (it stays down)
-#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK) // this group is a member of a group radio group
-
-//
-// States
-//
-#define TBSTATE_CHECKED 0x01 // radio button is checked
-#define TBSTATE_PRESSED 0x02 // button is being depressed (any style)
-#define TBSTATE_ENABLED 0x04 // button is enabled
-#define TBSTATE_HIDDEN 0x08 // button is hidden
-#define TBSTATE_INDETERMINATE 0x10 // button is indeterminate
-#define TBSTATE_SELECTED 0x20 // mouse hovering over button (for coolbar look)
-
-
-
-typedef struct tagADJUSTINFO
-{
- TBBUTTON tbButton;
- char szDescription[1];
-} ADJUSTINFO;
-
-typedef ADJUSTINFO NEAR* PADJUSTINFO;
-typedef ADJUSTINFO FAR* LPADJUSTINFO;
-
-
-HWND WINAPI CreateToolbar(HWND hwnd, DWORD ws, WORD wID, int nBitmaps,
- HINSTANCE hBMInst, WORD wBMID,
- LPCTBBUTTON lpButtons, int iNumButtons);
-
-#define CMB_DISCARDABLE 0x01 // create bitmap as discardable
-#define CMB_MASKED 0x02 // create image/mask pair in bitmap
-
-
-#define TB_ENABLEBUTTON (WM_USER + 1)
-// wParam: UINT, button ID
-// lParam: BOOL LOWORD, enable if nonzero; HIWORD not used, 0
-// return: not used
-//
-
-#define TB_CHECKBUTTON (WM_USER + 2)
-// wParam: UINT, button ID
-// lParam: BOOL LOWORD, check if nonzero; HIWORD not used, 0
-// return: not used
-//
-
-#define TB_PRESSBUTTON (WM_USER + 3)
-// wParam: UINT, button ID
-// lParam: BOOL LOWORD, press if nonzero; HIWORD not used, 0
-// return: not used
-//
-
-#define TB_HIDEBUTTON (WM_USER + 4)
-// wParam: UINT, button ID
-// lParam: BOOL LOWORD, hide if nonzero; HIWORD not used, 0
-// return: not used
-//
-#define TB_INDETERMINATE (WM_USER + 5)
-// wParam: UINT, button ID
-// lParam: BOOL LOWORD, make indeterminate if nonzero; HIWORD not used, 0
-// return: not used
-//
-
-#define TB_ISBUTTONENABLED (WM_USER + 9)
-// wParam: UINT, button ID
-// lParam: not used, 0
-// return: BOOL LOWORD, enabled if nonzero; HIWORD not used
-//
-
-#define TB_ISBUTTONCHECKED (WM_USER + 10)
-// wParam: UINT, button ID
-// lParam: not used, 0
-// return: BOOL LOWORD, checked if nonzero; HIWORD not used
-//
-
-#define TB_ISBUTTONPRESSED (WM_USER + 11)
-// wParam: UINT, button ID
-// lParam: not used, 0
-// return: BOOL LOWORD, pressed if nonzero; HIWORD not used
-//
-
-#define TB_ISBUTTONHIDDEN (WM_USER + 12)
-// wParam: UINT, button ID
-// lParam: not used, 0
-// return: BOOL LOWORD, hidden if nonzero; HIWORD not used
-//
-
-#define TB_ISBUTTONINDETERMINATE (WM_USER + 13)
-// wParam: UINT, button ID
-// lParam: not used, 0
-// return: BOOL LOWORD, indeterminate if nonzero; HIWORD not used
-//
-
-#define TB_SETSTATE (WM_USER + 17)
-// wParam: UINT, button ID
-// lParam: UINT LOWORD, state bits; HIWORD not used, 0
-// return: not used
-//
-
-#define TB_GETSTATE (WM_USER + 18)
-// wParam: UINT, button ID
-// lParam: not used, 0
-// return: UINT LOWORD, state bits; HIWORD not used
-//
-
-#define TB_ADDBITMAP (WM_USER + 19)
-// wParam: UINT, number of button graphics in bitmap
-// lParam: one of:
-// HINSTANCE LOWORD, module handle; UINT HIWORD, resource id
-// HINSTANCE LOWORD, NULL; HBITMAP HIWORD, bitmap handle
-// return: one of:
-// int LOWORD, index for first new button; HIWORD not used
-// int LOWORD, -1 indicating error; HIWORD not used
-//
-
-#define TB_ADDBUTTONS (WM_USER + 20)
-// wParam: UINT, number of buttons to add
-// lParam: LPTBBUTTON, pointer to array of TBBUTTON structures
-// return: not used
-//
-
-#define TB_INSERTBUTTON (WM_USER + 21)
-// wParam: UINT, index for insertion (appended if index doesn't exist)
-// lParam: LPTBBUTTON, pointer to one TBBUTTON structure
-// return: not used
-//
-
-#define TB_DELETEBUTTON (WM_USER + 22)
-// wParam: UINT, index of button to delete
-// lParam: not used, 0
-// return: not used
-//
-
-#define TB_GETBUTTON (WM_USER + 23)
-// wParam: UINT, index of button to get
-// lParam: LPTBBUTTON, pointer to TBBUTTON buffer to receive button
-// return: not used
-//
-
-#define TB_BUTTONCOUNT (WM_USER + 24)
-// wParam: not used, 0
-// lParam: not used, 0
-// return: UINT LOWORD, number of buttons; HIWORD not used
-//
-
-#define TB_COMMANDTOINDEX (WM_USER + 25)
-// wParam: UINT, command id
-// lParam: not used, 0
-// return: UINT LOWORD, index of button (-1 if command not found);
-// HIWORD not used
-//
-
-
-#define TBN_BEGINDRAG 0x0201
-#define TBN_ENDDRAG 0x0203
diff --git a/src/vimtbar.lib b/src/vimtbar.lib
deleted file mode 100644
index 413b7da..0000000
Binary files a/src/vimtbar.lib and /dev/null differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 939a1abe935a539f2d4c90a56cb0682cbaf3bbb0
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 10 01:31:25 2016 +0200

Updated runtime files.
---
runtime/compiler/gcc.vim | 2 +
runtime/indent/html.vim | 12 +-
runtime/plugin/logiPat.vim | 26 ++--
runtime/syntax/c.vim | 4 +-
runtime/syntax/desktop.vim | 7 +-
runtime/syntax/diff.vim | 8 +-
runtime/syntax/help.vim | 3 +-
runtime/syntax/sshconfig.vim | 7 +-
runtime/syntax/vim.vim | 56 +++----
src/po/eo.po | 259 ++++++++++++------------------
src/po/fr.po | 364 +++++++++++++++++++++----------------------
11 files changed, 349 insertions(+), 399 deletions(-)

diff --git a/runtime/compiler/gcc.vim b/runtime/compiler/gcc.vim
index aee31d9..19ea2ed 100644
--- a/runtime/compiler/gcc.vim
+++ b/runtime/compiler/gcc.vim
@@ -2,6 +2,7 @@
" Compiler: GNU C Compiler
" Maintainer: Nikolai Weibull <***@bitwi.se>
" Latest Revision: 2010-10-14
+" added line suggested by Anton Lindqvist 2016 Mar 31

if exists("current_compiler")
finish
@@ -24,6 +25,7 @@ CompilerSet errorformat=
\%f:%l:\ %trror:\ %m,
\%f:%l:\ %tarning:\ %m,
\%f:%l:\ %m,
+ \%f:\\(%*[^\\)]\\):\ %m,
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f',
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim
index 8aaf82e..828bc31 100644
--- a/runtime/indent/html.vim
+++ b/runtime/indent/html.vim
@@ -2,7 +2,7 @@
" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <***@yahoo.de>
-" Last Change: 2015 Sep 25
+" Last Change: 2016 Mar 30
" Version: 1.0
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@@ -240,13 +240,13 @@ call s:AddITags(s:indent_tags, [
\ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td',
\ 'tr', 'tbody', 'tfoot', 'thead'])

-" Tags added 2011 Sep 09 (especially HTML5 tags):
+" New HTML5 elements:
call s:AddITags(s:indent_tags, [
\ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas',
- \ 'command', 'datalist', 'details', 'embed', 'figure', 'footer',
- \ 'header', 'group', 'keygen', 'mark', 'math', 'meter', 'nav', 'output',
- \ 'progress', 'ruby', 'section', 'svg', 'texture', 'time', 'video',
- \ 'wbr', 'text'])
+ \ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption',
+ \ 'figure', 'footer', 'header', 'keygen', 'mark', 'meter', 'nav', 'output',
+ \ 'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 'svg',
+ \ 'time', 'track', 'video', 'wbr'])

" Tags added for web components:
call s:AddITags(s:indent_tags, [
diff --git a/runtime/plugin/logiPat.vim b/runtime/plugin/logiPat.vim
index a75d0ee..47fabe9 100644
--- a/runtime/plugin/logiPat.vim
+++ b/runtime/plugin/logiPat.vim
@@ -1,7 +1,7 @@
-" LogiPat:
+" LogiPat: Boolean logical pattern matcher
" Author: Charles E. Campbell
-" Date: Mar 13, 2013
-" Version: 3
+" Date: Apr 04, 2016
+" Version: 4
" Purpose: to do Boolean-logic based regular expression pattern matching
" Copyright: Copyright (C) 1999-2011 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@@ -36,21 +36,22 @@

" ---------------------------------------------------------------------
" Load Once: {{{1
-if &cp || exists("loaded_logipat")
+if &cp || exists("loaded_logiPat")
finish
endif
-let g:loaded_LogiPat = "v3"
+let g:loaded_logiPat = "v4"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn

" ---------------------------------------------------------------------
" Public Interface: {{{1
-com! -nargs=* LogiPat call LogiPat(<q-args>,1)
-silent! com -nargs=* LP call LogiPat(<q-args>,1)
-com! -nargs=+ ELP echomsg LogiPat(<q-args>)
-com! -nargs=+ LogiPatFlags let s:LogiPatFlags="<args>"
-silent! com -nargs=+ LPF let s:LogiPatFlags="<args>"
+com! -nargs=* LogiPat call LogiPat(<q-args>,1)
+sil! com -nargs=* LP call LogiPat(<q-args>,1)
+sil! com -nargs=* LPR call LogiPat(<q-args>,1,"r")
+com! -nargs=+ LPE echomsg LogiPat(<q-args>)
+com! -nargs=+ LogiPatFlags let s:LogiPatFlags="<args>"
+sil! com -nargs=+ LPF let s:LogiPatFlags="<args>"

" =====================================================================
" Functions: {{{1
@@ -66,6 +67,9 @@ fun! LogiPat(pat,...)
else
let dosearch= 0
endif
+ if a:0 >= 3
+ let s:LogiPatFlags= a:3
+ endif

let s:npatstack = 0
let s:nopstack = 0
@@ -126,7 +130,7 @@ fun! LogiPat(pat,...)

" perform the indicated search
if dosearch
- if exists("s:LogiPatFlags")
+ if exists("s:LogiPatFlags") && s:LogiPatFlags != ""
" call Decho("search(result<".result."> LogiPatFlags<".s:LogiPatFlags.">)")
call search(result,s:LogiPatFlags)
else
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 32b63e0..bd63578 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <***@vim.org>
-" Last Change: 2016 Feb 08
+" Last Change: 2016 Apr 07

" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -248,6 +248,8 @@ if !exists("c_no_c99") " ISO C99
syn keyword cType _Bool bool _Complex complex _Imaginary imaginary
syn keyword cType int8_t int16_t int32_t int64_t
syn keyword cType uint8_t uint16_t uint32_t uint64_t
+ " These are BSD specific?
+ syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t
syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t
syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t
syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t
diff --git a/runtime/syntax/desktop.vim b/runtime/syntax/desktop.vim
index 5b71e51..27dac5c 100644
--- a/runtime/syntax/desktop.vim
+++ b/runtime/syntax/desktop.vim
@@ -3,7 +3,8 @@
" according to freedesktop.org specification 0.9.4
" http://pdx.freedesktop.org/Standards/desktop-entry-spec/desktop-entry-spec-0.9.4.html
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2004 May 16
+" Last Change: 2016 Apr 02
+" (added "Keywords")
" Version Info: desktop.vim 0.9.4-1.2

" For version 5.x: Clear all syntax items
@@ -53,8 +54,8 @@ syn keyword dtBooleanKey StartupNotify ReadOnly Terminal Hidden NoDisplay nextgr
syn keyword dtBooleanValue true false containedin=dtBoolean contained

" String
-syn match dtString /^\s*\<\(Encoding\|Icon\|Path\|Actions\|FSType\|MountPoint\|UnmountIcon\|URL\|Categories\|OnlyShowIn\|NotShowIn\|StartupWMClass\|FilePattern\|MimeType\)\>.*/ contains=dtStringKey,dtDelim transparent
-syn keyword dtStringKey Type Encoding TryExec Exec Path Actions FSType MountPoint URL Categories OnlyShowIn NotShowIn StartupWMClass FilePattern MimeType nextgroup=dtDelim containedin=dtString contained
+syn match dtString /^\s*\<\(Encoding\|Icon\|Path\|Actions\|FSType\|MountPoint\|UnmountIcon\|URL\|Keywords\|Categories\|OnlyShowIn\|NotShowIn\|StartupWMClass\|FilePattern\|MimeType\)\>.*/ contains=dtStringKey,dtDelim transparent
+syn keyword dtStringKey Type Encoding TryExec Exec Path Actions FSType MountPoint URL Keywords Categories OnlyShowIn NotShowIn StartupWMClass FilePattern MimeType nextgroup=dtDelim containedin=dtString contained

" Exec
syn match dtExec /^\s*\<\(Exec\|TryExec\|SwallowExec\)\>.*/ contains=dtExecKey,dtDelim,dtExecParam transparent
diff --git a/runtime/syntax/diff.vim b/runtime/syntax/diff.vim
index 885feae..b656cd9 100644
--- a/runtime/syntax/diff.vim
+++ b/runtime/syntax/diff.vim
@@ -2,7 +2,7 @@
" Language: Diff (context or unified)
" Maintainer: Bram Moolenaar <***@vim.org>
" Translations by Jakson Alves de Aquino.
-" Last Change: 2015 Feb 03
+" Last Change: 2016 Apr 02

" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -342,7 +342,7 @@ syn match diffLine "^\<\d\+\>.*"
syn match diffLine "^\*\*\*\*.*"
syn match diffLine "^---$"

-"Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
+" Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*"

syn match diffFile "^diff\>.*"
@@ -352,12 +352,16 @@ syn match diffFile "^==== .*"
syn match diffOldFile "^\*\*\* .*"
syn match diffNewFile "^--- .*"

+" Used by git
+syn match diffIndexLine "^index \x\x\x\x.*"
+
syn match diffComment "^#.*"

" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link diffOldFile diffFile
hi def link diffNewFile diffFile
+hi def link diffIndexLine PreProc
hi def link diffFile Type
hi def link diffOnly Constant
hi def link diffIdentical Constant
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim
index 3368b1d..d0c3fa8 100644
--- a/runtime/syntax/help.vim
+++ b/runtime/syntax/help.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (***@vim.org)
-" Last Change: 2014 Feb 12
+" Last Change: 2016 Apr 01

" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -45,6 +45,7 @@ syn match helpVim "VIM REFERENCE.*"
syn match helpOption "'[a-z]\{2,\}'"
syn match helpOption "'t_..'"
syn match helpCommand "`[^` \t]\+`"hs=s+1,he=e-1 contains=helpBacktick
+syn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|$\)"hs=s+1,he=e-1 contains=helpBacktick
syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore
if has("conceal")
diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim
index 44b3c67..bd9f0a3 100644
--- a/runtime/syntax/sshconfig.vim
+++ b/runtime/syntax/sshconfig.vim
@@ -4,8 +4,8 @@
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
" Contributor: Leonard Ehrenfried <***@web.de>
" Contributor: Karsten Hopp <***@redhat.com>
-" Last Change: 2016 Mar 1
-" SSH Version: 7.2
+" Last Change: 2016 Apr 7
+" SSH Version: 7.2p2
"

" Setup
@@ -36,7 +36,7 @@ syn keyword sshconfigTodo TODO FIXME NOTE contained


" Constants
-syn keyword sshconfigYesNo yes no ask
+syn keyword sshconfigYesNo yes no ask confirm
syn keyword sshconfigYesNo any auto
syn keyword sshconfigYesNo force autoask none

@@ -139,6 +139,7 @@ syn keyword sshconfigHostSect Host
syn keyword sshconfigMatch canonical exec host originalhost user localuser all

syn keyword sshconfigKeyword AddressFamily
+syn keyword sshconfigKeyword AddKeysToAgent
syn keyword sshconfigKeyword BatchMode
syn keyword sshconfigKeyword BindAddress
syn keyword sshconfigKeyword CanonicalDomains
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 0206a61..c809f70 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <***@PcampbellAfamily.Mbiz>
-" Last Change: February 17, 2016
-" Version: 7.4-44
+" Last Change: March 29, 2016
+" Version: 7.4-45
" Automatically generated keyword lists: {{{1

" Quit when a syntax file was already loaded {{{2
@@ -18,38 +18,39 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell

" regular vim commands {{{2
-syn keyword vimCommand contained a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cat[ch] ce[nter] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new noswap[file] o[pen] ped[it] pp[op] profd[el] ptf[irst] [...]
-syn keyword vimCommand contained ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad cb[uffer] cex[pr] cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nu[mber] opt[ions] pe[rl] pr pro [...]
-syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers caddb[uffer] cc cf cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] o ownsyntax perld[o] pre[se [...]
-syn keyword vimCommand contained abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] cad[dexpr] ccl[ose] cfdo c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa ol[dfiles] p po[p] [...]
-syn keyword vimCommand contained al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] caddf[ile] cd cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] re [...]
-syn keyword vimCommand contained ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cal[l] cdo cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] [...]
+syn keyword vimCommand contained a argd argu[ment] bf[irst] brea[k] buf cabc[lear] cc cfdo changes clo[se] cnf comc[lear] cpf[ile] cstag debugg[reedy] deletel dell diffg[et] dif[fupdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nore on[ly] packl perld[o] pre[serve] promptf[ind] ptl[ast] p [...]
+syn keyword vimCommand contained ab argd[elete] as[cii] bl[ast] breaka[dd] bufdo cad[dbuffer] ccl[ose] cf[ile] chd[ir] cmapc[lear] cNf comp[iler] cp[revious] cuna[bbrev] del deletep delm[arks] diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] nos[wapfile] o[pen] packloadall po[p] pr [...]
+syn keyword vimCommand contained abc[lear] argdo au bm[odified] breakd[el] b[uffer] cadde[xpr] cd cfir[st] che[ckpath] cn cnf[ile] con cq[uit] cw[indow] delc[ommand] deletl delp diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa nu[mber] opt[ions] pc[lose] popu p[rint] ps[earch] [...]
+syn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bn[ext] breakl[ist] buffers caddf[ile] cdo cgetb[uffer] checkt[ime] cN cNf[ile] conf[irm] cr[ewind] d delel deletp dep diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd o ownsyntax pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rubyd[o] [...]
+syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bN[ext] br[ewind] bun[load] cal[l] ce[nter] cgete[xpr] cl cnew[er] col[der] con[tinue] cs de delep delf di diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] ol[dfiles] p ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 r [...]
+syn keyword vimCommand contained ar argl[ocal] bd[elete] bo[tright] bro[wse] bw[ipeout] cat[ch] cex[pr] cg[etfile] cla[st] cn[ext] colo[rscheme] cope[n] cscope debug d[elete] delf[unction] dif difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nor omapc[lear] pa[ckadd] pe[rl] pr prof[ile] ptj[ [...]
+syn keyword vimCommand contained arga[dd] ar[gs] bel[owright] bp[revious] bu c cb[uffer] cf c[hange] cl[ist] cN[ext] com co[py]
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns

" vimOptions are caught only when contained in a vimSet {{{2
-syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmp comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pi previewwindow printmbfont pythondll r [...]
-syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cms commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste perldll pm printdevice printoptions pythonthre [...]
-syn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions co compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pex pmbcs printencoding prompt qe relativenumber rightleft rs runtimep [...]
-syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw cocu complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pexpr pmbfn printexpr pt quoteescape remap rightleftcmd rtp sb scrollbind secure [...]
-syn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cole completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode pfn popt printfont pumheig [...]
-syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard colorcolumn completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path ph preserveind [...]
-syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cmdheight columns concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pheader previewhei [...]
-syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdwinheight com
+syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmdwinheight com conceallevel cpoptions cscopetag csto debug dict dir eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime revins [...]
+syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cmp comments confirm cpt cscopetagorder csverb deco dictionary directory ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop [...]
+syn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions cms commentstring consk crb cscopeverbose cuc def diff display edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relat [...]
+syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw co compatible conskey cryptmethod cspc cul define diffexpr dy ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescape remap rig [...]
+syn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cocu complete copyindent cscopepathcomp csprg cursorbind delcombine diffopt ea efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph pp print [...]
+syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard cole completefunc cot cscopeprg csqf cursorcolumn dex digraph ead ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh [...]
+syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopequickfix csre cursorline dg dip eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly rest [...]
+syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdheight columns concealcursor cpo cscoperelative cst cwh

" vimOptions: These are the turn-off setting variants {{{2
-syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nogdefault nohidden nohkmapp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomous [...]
-syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable noguipty nohk nohkp noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly [...]
-syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nogd nohid nohkmap nohls
+syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobreakindent nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangnoremap nolbr nolisp nolnr nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nop [...]
+syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nobri noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolinebreak nolist noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopas [...]
+syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois

" vimOptions: These are the invertible variants {{{2
-syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invgdefault invhidden invhkmapp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invm [...]
-syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invguipty invhk invhkp invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu in [...]
-syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invgd invhid invhkmap invhls
+syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbreakindent invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangnoremap invlbr invlisp invlnr invlpl invma invmagic invml invmodeline invmodified invm [...]
+syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invbri invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlinebreak invlist invloadplugins invlz invmacatsui invmh invmod invmo [...]
+syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis

" termcap codes (which can also be set) {{{2
-syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve [...]
-syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da
+syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve [...]
+syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl
syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4"
@@ -75,9 +76,10 @@ syn match vimHLGroup contained "Conceal"
syn case match

" Function Names {{{2
-syn keyword vimFuncName contained abs alloc_fail argc argv assert_exception assert_true browse buflisted bufnr byteidx ceil cindent complete confirm cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked jsondecode len line localtim [...]
-syn keyword vimFuncName contained acos and argidx asin assert_fails atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add connect cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert items jsonencode libcall line2byte log map match matc [...]
-syn keyword vimFuncName contained add append arglistid assert_equal assert_false atan2 bufexists bufname byte2line call char2nr col complete_check copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory join keys libcallnr lispindent log10 mapar [...]
+syn keyword vimFuncName contained abs and arglistid assert_exception assert_true browsedir bufname byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype empty executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions j [...]
+syn keyword vimFuncName contained acos append argv assert_fails atan bufexists bufnr byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler escape exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join [...]
+syn keyword vimFuncName contained add argc asin assert_false atan2 buflisted bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte lo [...]
+syn keyword vimFuncName contained alloc_fail argidx assert_equal assert_match browse bufloaded byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete disable_char_avail_for_testing eventhandler

"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
diff --git a/src/po/eo.po b/src/po/eo.po
index b144155..05175f9 100644
--- a/src/po/eo.po
+++ b/src/po/eo.po
@@ -23,8 +23,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Vim(Esperanto)\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-13 23:42+0100\n"
-"PO-Revision-Date: 2016-02-13 23:45+0100\n"
+"POT-Creation-Date: 2016-03-29 23:03+0200\n"
+"PO-Revision-Date: 2016-03-29 23:05+0200\n"
"Last-Translator: Dominique PELLÉ <***@gmail.com>\n"
"Language-Team: \n"
"Language: eo\n"
@@ -215,17 +215,28 @@ msgstr "Emfazaj simbolaĵoj de %s:"
msgid " line=%ld id=%d name=%s"
msgstr " linio=%ld id=%d nomo=%s"

-msgid "E897: All channels are in use"
-msgstr "E897: Ĉiuj kanaloj estas uzataj"
-
msgid "E902: Cannot connect to port"
msgstr "E902: Ne eblas konekti al pordo"

-msgid "E899: Cannot connect to port after retry2"
-msgstr "E899: Ne eblas konekti al pordo post 2 reprovoj"
+#, c-format
+msgid "E917: Cannot use a callback with %s()"
+msgstr "E917: Ne eblas uzi reagfunkcion kun %s()"
+
+msgid "E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"
+msgstr "E912: ne eblas uzi ch_evalexpr()/ch_sendexpr() kun kruda aŭ nl kanalo"
+
+msgid "E906: not an open channel"
+msgstr "E906: ne estas malfermita kanalo"

-msgid "E896: read from channel"
-msgstr "E896: lego el kanalo"
+msgid "E920: _io file requires _name to be set"
+msgstr "E920: dosiero _io bezonas _name"
+
+msgid "E915: in_io buffer requires in_buf or in_name to be set"
+msgstr "E915: bufro in_io bezonas in_buf aŭ in_name"
+
+#, c-format
+msgid "E918: buffer must be loaded: %s"
+msgstr "E918: bufro devas esti ŝargita: %s"

msgid "E821: File is encrypted with unknown method"
msgstr "E821: Dosiero estas ĉifrata per nekonata metodo"
@@ -523,9 +534,6 @@ msgstr "E735: Eblas nur kompari Vortaron kun Vortaro"
msgid "E736: Invalid operation for Dictionary"
msgstr "E736: Nevalida operacio de Vortaro"

-msgid "E693: Can only compare Funcref with Funcref"
-msgstr "E693: Eblas nur kompari Funcref kun Funcref"
-
msgid "E694: Invalid operation for Funcrefs"
msgstr "E694: Nevalida operacio de Funcref-oj"

@@ -620,15 +628,6 @@ msgstr "argumento de add()"
msgid "E699: Too many arguments"
msgstr "E699: Tro da argumentoj"

-msgid "E906: not an open channel"
-msgstr "E906: ne estas malfermita kanalo"
-
-msgid "E999: Invalid callback argument"
-msgstr "E999: Nevalida argumento de reagfunctio"
-
-msgid "E912: cannot use ch_sendexpr() with a raw channel"
-msgstr "E912: ne eblas uzi ch_sendexpr() kun kruda kanalo"
-
msgid "E785: complete() can only be used in Insert mode"
msgstr "E785: complete() uzeblas nur en Enmeta reĝimo"

@@ -661,6 +660,12 @@ msgstr "+-%s%3ld linioj: "
msgid "E700: Unknown function: %s"
msgstr "E700: Nekonata funkcio: %s"

+msgid "E922: expected a dict"
+msgstr "E922: vortaro atendita"
+
+msgid "E923: Second argument of function() must be a list or a dict"
+msgstr "E923: Dua argumento de function() devas esti listo aŭ Vortaro"
+
msgid ""
"&OK\n"
"&Cancel"
@@ -677,6 +682,9 @@ msgstr "argumento de insert()"
msgid "E786: Range not allowed"
msgstr "E786: Amplekso nepermesebla"

+msgid "E916: not a valid job"
+msgstr "E916: nevalida tasko"
+
msgid "E701: Invalid type for len()"
msgstr "E701: Nevalida datumtipo de len()"

@@ -729,6 +737,9 @@ msgstr "(Nevalida)"
msgid "E677: Error writing temp file"
msgstr "E677: Eraro dum skribo de provizora dosiero"

+msgid "E921: Invalid callback argument"
+msgstr "E921: Nevalida argumento de reagfunctio"
+
msgid "E805: Using a Float as a Number"
msgstr "E805: Uzo de Glitpunktnombro kiel Nombro"

@@ -781,10 +792,6 @@ msgid "E908: using an invalid value as a String"
msgstr "E908: uzo de nevalida valoro kiel Ĉeno"

#, c-format
-msgid "E706: Variable type mismatch for: %s"
-msgstr "E706: Nekongrua datumtipo de variablo: %s"
-
-#, c-format
msgid "E795: Cannot delete variable %s"
msgstr "E795: Ne eblas forviŝi variablon %s"

@@ -1134,10 +1141,6 @@ msgid "Sorry, help file \"%s\" not found"
msgstr "Bedaŭrinde, la helpdosiero \"%s\" ne troveblas"

#, c-format
-msgid "E150: Not a directory: %s"
-msgstr "E150: Ne estas dosierujo: %s"
-
-#, c-format
msgid "E152: Cannot open %s for writing"
msgstr "E152: Ne eblas malfermi %s en skribreĝimo"

@@ -1154,6 +1157,10 @@ msgid "E154: Duplicate tag \"%s\" in file %s/%s"
msgstr "E154: Ripetita etikedo \"%s\" en dosiero %s/%s"

#, c-format
+msgid "E150: Not a directory: %s"
+msgstr "E150: Ne estas dosierujo: %s"
+
+#, c-format
msgid "E160: Unknown sign command: %s"
msgstr "E160: Nekonata simbola komando: %s"

@@ -1267,8 +1274,8 @@ msgid "Searching for \"%s\""
msgstr "Serĉado de \"%s\""

#, c-format
-msgid "not found in 'runtimepath': \"%s\""
-msgstr "ne trovita en 'runtimepath': \"%s\""
+msgid "not found in '%s': \"%s\""
+msgstr "ne trovita en '%s: \"%s\""

msgid "Source Vim script"
msgstr "Ruli Vim-skripton"
@@ -2211,6 +2218,18 @@ msgstr "Vim dialogo"
msgid "E232: Cannot create BalloonEval with both message and callback"
msgstr "E232: Ne eblas krei BalloonEval kun ambaŭ mesaĝo kaj reagfunkcio"

+msgid "_Cancel"
+msgstr "_Rezigni"
+
+msgid "_Save"
+msgstr "_Konservi"
+
+msgid "_Open"
+msgstr "_Malfermi"
+
+msgid "_OK"
+msgstr "_Bone"
+
msgid ""
"&Yes\n"
"&No\n"
@@ -2220,6 +2239,12 @@ msgstr ""
"&Ne\n"
"&Rezigni"

+msgid "Yes"
+msgstr "Jes"
+
+msgid "No"
+msgstr "Ne"
+
# todo '_' is for hotkey, i guess?
msgid "Input _Methods"
msgstr "Enigaj _metodoj"
@@ -2254,18 +2279,18 @@ msgstr "Supren"
msgid "Down"
msgstr "Suben"

-#. 'Find Next' button
msgid "Find Next"
msgstr "Trovi sekvantan"

-#. 'Replace' button
msgid "Replace"
msgstr "Anstataŭigi"

-#. 'Replace All' button
msgid "Replace All"
msgstr "Anstataŭigi ĉiujn"

+msgid "_Close"
+msgstr "_Fermi"
+
msgid "Vim: Received \"die\" request from session manager\n"
msgstr "Vim: Ricevis peton \"die\" (morti) el la seanca administrilo\n"

@@ -2317,17 +2342,6 @@ msgstr "Anstataŭigi ĉi&on"
msgid "&Undo"
msgstr "&Malfari"

-#, c-format
-msgid "E671: Cannot find window title \"%s\""
-msgstr "E671: Ne eblas trovi titolon de fenestro \"%s\""
-
-#, c-format
-msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
-msgstr "E243: Ne subtenata argumento: \"-%s\"; Uzu la version OLE."
-
-msgid "E672: Unable to open window inside MDI application"
-msgstr "E672: Ne eblas malfermi fenestron interne de aplikaĵo MDI"
-
msgid "Open tab..."
msgstr "Malfermi langeton..."

@@ -2345,6 +2359,17 @@ msgstr "Ne uzata"
msgid "Directory\t*.nothing\n"
msgstr "Dosierujo\t*.nenio\n"

+#, c-format
+msgid "E671: Cannot find window title \"%s\""
+msgstr "E671: Ne eblas trovi titolon de fenestro \"%s\""
+
+#, c-format
+msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
+msgstr "E243: Ne subtenata argumento: \"-%s\"; Uzu la version OLE."
+
+msgid "E672: Unable to open window inside MDI application"
+msgstr "E672: Ne eblas malfermi fenestron interne de aplikaĵo MDI"
+
msgid "Vim E458: Cannot allocate colormap entry, some colors may be incorrect"
msgstr ""
"Vim E458: Ne eblas disponigi rikordon de kolormapo, iuj koloroj estas eble "
@@ -2801,97 +2826,6 @@ msgstr "E272: netraktita escepto"
msgid "E273: unknown longjmp status %d"
msgstr "E273: nekonata stato de longjmp: %d"

-msgid "Toggle implementation/definition"
-msgstr "Baskuligi realigon/difinon"
-
-msgid "Show base class of"
-msgstr "Vidigi bazan klason de"
-
-msgid "Show overridden member function"
-msgstr "Montri anajn homonimigajn funkciojn"
-
-msgid "Retrieve from file"
-msgstr "Rekuperi el dosiero"
-
-msgid "Retrieve from project"
-msgstr "Rekuperi el projekto"
-
-msgid "Retrieve from all projects"
-msgstr "Rekuperi de ĉiuj projektoj"
-
-msgid "Retrieve"
-msgstr "Rekuperi"
-
-msgid "Show source of"
-msgstr "Vidigi fonton de"
-
-msgid "Find symbol"
-msgstr "Trovi simbolon"
-
-msgid "Browse class"
-msgstr "Foliumi klasojn"
-
-msgid "Show class in hierarchy"
-msgstr "Montri klason en hierarkio"
-
-msgid "Show class in restricted hierarchy"
-msgstr "Montri klason en hierarkio restriktita"
-
-# todo
-msgid "Xref refers to"
-msgstr "Xref ligas al"
-
-msgid "Xref referred by"
-msgstr "Xref ligiĝas de"
-
-msgid "Xref has a"
-msgstr "Xref havas"
-
-msgid "Xref used by"
-msgstr "Xref uzita de"
-
-# DP: mi ne certas pri kio temas
-msgid "Show docu of"
-msgstr "Vidigi dokumentaron de"
-
-msgid "Generate docu for"
-msgstr "Krei dokumentaron de"
-
-msgid ""
-"Cannot connect to SNiFF+. Check environment (sniffemacs must be found in "
-"$PATH).\n"
-msgstr ""
-"Konekto al SNiFF+ neeblas. Kontrolu medion (sniffemacs trovendas en $PATH).\n"
-
-msgid "E274: Sniff: Error during read. Disconnected"
-msgstr "E274: Sniff: Eraro dum lego. Malkonektita"
-
-# DP: Tiuj 3 mesaĝoj estas kune
-msgid "SNiFF+ is currently "
-msgstr "SNiFF+ estas aktuale "
-
-msgid "not "
-msgstr "ne "
-
-msgid "connected"
-msgstr "konektita"
-
-#, c-format
-msgid "E275: Unknown SNiFF+ request: %s"
-msgstr "E275: Nekonata peto de SNiFF+: %s"
-
-msgid "E276: Error connecting to SNiFF+"
-msgstr "E276: Eraro dum konekto al SNiFF+"
-
-msgid "E278: SNiFF+ not connected"
-msgstr "E278: SNiFF+ ne estas konektita"
-
-msgid "E279: Not a SNiFF+ buffer"
-msgstr "E279: Ne estas bufro SNiFF+"
-
-msgid "Sniff: Error during write. Disconnected"
-msgstr "Sniff: Eraro dum skribo. Malkonektita"
-
msgid "invalid buffer number"
msgstr "nevalida numero de bufro"

@@ -3188,6 +3122,10 @@ msgstr "-F\t\t\tKomenci en persa reĝimo"
msgid "-T <terminal>\tSet terminal type to <terminal>"
msgstr "-T <terminalo>\tAgordi terminalon al <terminalo>"

+msgid "--not-a-term\t\tSkip warning for input/output not being a terminal"
+msgstr ""
+"--not-a-term\t\tPreterpasi averton por enigo/eligo, kiu ne estas terminalo"
+
msgid "-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"
msgstr "-u <vimrc>\t\tUzi <vimrc> anstataŭ iun ajn .vimrc"

@@ -4267,7 +4205,7 @@ msgstr "E748: Neniu reĝistro antaŭe uzata"

#. must display the prompt
msgid "cannot yank; delete anyway"
-msgstr "ne eblas kopii; forviŝi tamene"
+msgstr "ne eblas kopii; tamen forviŝi"

msgid "1 line changed"
msgstr "1 linio ŝanĝita"
@@ -4730,10 +4668,6 @@ msgstr "Eraro de VIM"
msgid "Could not fix up function pointers to the DLL!"
msgstr "Ne eblis ripari referencojn de funkcioj al la DLL!"

-#, c-format
-msgid "shell returned %d"
-msgstr "la ŝelo liveris %d"
-
# DP: la eventoj estas tiuj, kiuj estas en la sekvantaj ĉenoj
#, c-format
msgid "Vim: Caught %s event\n"
@@ -4764,6 +4698,10 @@ msgid "Vim Warning"
msgstr "Averto de Vim"

#, c-format
+msgid "shell returned %d"
+msgstr "la ŝelo liveris %d"
+
+#, c-format
msgid "E372: Too many %%%c in format string"
msgstr "E372: Tro da %%%c en formata ĉeno"

@@ -4795,6 +4733,15 @@ msgstr "E379: Nomo de dosierujo mankas aŭ estas malplena"
msgid "E553: No more items"
msgstr "E553: Ne plu estas eroj"

+msgid "E924: Current window was closed"
+msgstr "E924: Aktuala vindozo fermiĝis"
+
+msgid "E925: Current quickfix was changed"
+msgstr "E925: Aktuala rapidriparo ŝanĝiĝis"
+
+msgid "E926: Current location list was changed"
+msgstr "E926: Aktuala listo de lokoj ŝanĝiĝis"
+
#, c-format
msgid "(%d of %d)%s%s: "
msgstr "(%d de %d)%s%s: "
@@ -6030,27 +5977,6 @@ msgstr ""

msgid ""
"\n"
-"MS-Windows 16-bit version"
-msgstr ""
-"\n"
-"Versio MS-Vindozo 16-bitoj"
-
-msgid ""
-"\n"
-"32-bit MS-DOS version"
-msgstr ""
-"\n"
-"Versio MS-DOS 32-bitoj"
-
-msgid ""
-"\n"
-"16-bit MS-DOS version"
-msgstr ""
-"\n"
-"Versio MS-DOS 16-bitoj"
-
-msgid ""
-"\n"
"MacOS X (unix) version"
msgstr ""
"\n"
@@ -6142,6 +6068,9 @@ msgstr ""
msgid "without GUI."
msgstr "sen grafika interfaco."

+msgid "with GTK3 GUI."
+msgstr "kun grafika interfaco GTK3."
+
msgid "with GTK2-GNOME GUI."
msgstr "kun grafika interfaco GTK2-GNOME."

@@ -6619,7 +6548,7 @@ msgid "E42: No Errors"
msgstr "E42: Neniu eraro"

msgid "E776: No location list"
-msgstr "E776: Neniu listo de loko"
+msgstr "E776: Neniu listo de lokoj"

msgid "E43: Damaged match string"
msgstr "E43: Difekta kongruenda ĉeno"
@@ -6740,6 +6669,10 @@ msgstr "E764: La opcio '%s' ne estas ŝaltita"
msgid "E850: Invalid register name"
msgstr "E850: Nevalida nomo de reĝistro"

+#, c-format
+msgid "E919: Directory not found in '%s': \"%s\""
+msgstr "E919: Dosierujo ne trovita en '%s': \"%s\""
+
msgid "search hit TOP, continuing at BOTTOM"
msgstr "serĉo atingis SUPRON, daŭrigonte al SUBO"

diff --git a/src/po/fr.po b/src/po/fr.po
index 755147b..b5c97db 100644
--- a/src/po/fr.po
+++ b/src/po/fr.po
@@ -6,7 +6,7 @@
# FIRST AUTHOR DindinX <***@bigfoot.com> 2000.
# SECOND AUTHOR Adrien Beau <***@free.fr> 2002, 2003.
# THIRD AUTHOR David Blanchet <***@free.fr> 2006, 2008.
-# FOURTH AUTHOR Dominique Pell� <***@gmail.com> 2008, 2015.
+# FOURTH AUTHOR Dominique Pell� <***@gmail.com> 2008, 2016.
#
# Latest translation available at:
# http://dominique.pelle.free.fr/vim-fr.php
@@ -15,8 +15,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Vim(Fran�ais)\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-30 17:54+0200\n"
-"PO-Revision-Date: 2015-07-30 18:00+0200\n"
+"POT-Creation-Date: 2016-03-29 23:03+0200\n"
+"PO-Revision-Date: 2016-03-29 23:05+0200\n"
"Last-Translator: Dominique Pell� <***@gmail.com>\n"
"Language-Team: \n"
"Language: fr\n"
@@ -229,6 +229,31 @@ msgstr "Symboles dans %s :"
msgid " line=%ld id=%d name=%s"
msgstr " ligne=%ld id=%d nom=%s"

+msgid "E902: Cannot connect to port"
+msgstr "E902: Impossible de se connecter au port"
+
+#, c-format
+msgid "E917: Cannot use a callback with %s()"
+msgstr "E917: Impossible d'utiliser un callback avec %s()"
+
+msgid "E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"
+msgstr ""
+"E912: Impossible d'utiliser ch_evalexpr()/ch_sendexpr() avec un canal brut ou "
+"nl"
+
+msgid "E906: not an open channel"
+msgstr "E906: pas un canal ouvert"
+
+msgid "E920: _io file requires _name to be set"
+msgstr "E920: fichier _io n�cessite _name"
+
+msgid "E915: in_io buffer requires in_buf or in_name to be set"
+msgstr "E915: tampon in_io n�cessite in_buf ou in_name "
+
+#, c-format
+msgid "E918: buffer must be loaded: %s"
+msgstr "E918: le tampon doit �tre charg� : %s"
+
msgid "E821: File is encrypted with unknown method"
msgstr "E821: Le fichier est chiffr� avec une m�thode inconnue"

@@ -466,9 +491,6 @@ msgstr "E686: L'argument de %s doit
msgid "E712: Argument of %s must be a List or Dictionary"
msgstr "E712: L'argument de %s doit �tre une Liste ou un Dictionnaire"

-msgid "E713: Cannot use empty key for Dictionary"
-msgstr "E713: Impossible d'utiliser une cl� vide dans un Dictionnaire"
-
msgid "E714: List required"
msgstr "E714: Liste requise"

@@ -534,7 +556,7 @@ msgid "E708: [:] must come last"
msgstr "E708: [:] ne peut �tre sp�cifi� qu'en dernier"

msgid "E709: [:] requires a List value"
-msgstr "E709: [:] requiert une Liste"
+msgstr "E709: [:] n�cessite une Liste"

msgid "E710: List value has more items than target"
msgstr "E710: La Liste a plus d'�l�ments que la destination"
@@ -573,10 +595,6 @@ msgstr "E735: Un Dictionnaire ne peut
msgid "E736: Invalid operation for Dictionary"
msgstr "E736: Op�ration invalide avec les Dictionnaires"

-# DB - todo : Traduction valable (et courte) pour Funcref ?
-msgid "E693: Can only compare Funcref with Funcref"
-msgstr "E693: Une Funcref ne peut �tre compar�e qu'� une Funcref"
-
msgid "E694: Invalid operation for Funcrefs"
msgstr "E694: Op�ration invalide avec les Funcrefs"

@@ -589,6 +607,9 @@ msgstr "E110: ')' manquant"
msgid "E695: Cannot index a Funcref"
msgstr "E695: Impossible d'indexer une Funcref"

+msgid "E909: Cannot index a special variable"
+msgstr "E909: Impossible d'indexer une variable sp�ciale"
+
# AB - La version fran�aise est meilleure que la version anglaise.
#, c-format
msgid "E112: Option name missing: %s"
@@ -708,6 +729,13 @@ msgstr "+-%s%3ld lignes : "
msgid "E700: Unknown function: %s"
msgstr "E700: Fonction inconnue : %s"

+msgid "E922: expected a dict"
+msgstr "E922: dictionnaire attendu"
+
+msgid "E923: Second argument of function() must be a list or a dict"
+msgstr ""
+"E923: Le second argument de function() doit �tre une liste ou un dictionnaire"
+
# AB - Textes des boutons de la bo�te de dialogue affich�e par inputdialog().
msgid ""
"&OK\n"
@@ -726,6 +754,9 @@ msgstr "argument de insert()"
msgid "E786: Range not allowed"
msgstr "E786: Les plages ne sont pas autoris�es"

+msgid "E916: not a valid job"
+msgstr "E916: t�che invalide"
+
msgid "E701: Invalid type for len()"
msgstr "E701: Type invalide avec len()"

@@ -782,6 +813,9 @@ msgstr "(Invalide)"
msgid "E677: Error writing temp file"
msgstr "E677: Erreur lors de l'�criture du fichier temporaire"

+msgid "E921: Invalid callback argument"
+msgstr "E921: Argument de callback invalide"
+
msgid "E805: Using a Float as a Number"
msgstr "E805: Utilisation d'un Flottant comme un Nombre"

@@ -794,6 +828,33 @@ msgstr "E745: Utilisation d'une Liste comme un Nombre"
msgid "E728: Using a Dictionary as a Number"
msgstr "E728: Utilisation d'un Dictionnaire comme un Nombre"

+msgid "E910: Using a Job as a Number"
+msgstr "E910: Utilisation d'une T�che comme un Nombre"
+
+msgid "E913: Using a Channel as a Number"
+msgstr "E913: Utilisation d'un Canal comme un Nombre"
+
+msgid "E891: Using a Funcref as a Float"
+msgstr "E891: Utilisation d'une Funcref comme un Flottant"
+
+msgid "E892: Using a String as a Float"
+msgstr "E892: Utilisation d'une Cha�ne comme un Flottant"
+
+msgid "E893: Using a List as a Float"
+msgstr "E893: Utilisation d'une Liste comme un Flottant"
+
+msgid "E894: Using a Dictionary as a Float"
+msgstr "E894: Utilisation d'un Dictionnaire comme un Flottant"
+
+msgid "E907: Using a special value as a Float"
+msgstr "E907: Utilisation d'une valeur sp�ciale comme un Flottant"
+
+msgid "E911: Using a Job as a Float"
+msgstr "E911: Utilisation d'une T�che comme un Flottant"
+
+msgid "E914: Using a Channel as a Float"
+msgstr "E914: Utilisation d'un Canal comme un Flottant"
+
msgid "E729: using Funcref as a String"
msgstr "E729: Utilisation d'une Funcref comme une Cha�ne"

@@ -803,10 +864,8 @@ msgstr "E730: Utilisation d'une Liste comme une Cha
msgid "E731: using Dictionary as a String"
msgstr "E731: Utilisation d'un Dictionnaire comme une Cha�ne"

-# DB : On doit pouvoir trouver nettement mieux que �a.
-#, c-format
-msgid "E706: Variable type mismatch for: %s"
-msgstr "E706: Type de variable incoh�rent pour %s"
+msgid "E908: using an invalid value as a String"
+msgstr "E908: Utilisation d'une valeur invalide comme une Cha�ne"

#, c-format
msgid "E795: Cannot delete variable %s"
@@ -1073,6 +1132,13 @@ msgstr "# 'encoding' dans lequel ce fichier a
msgid "Illegal starting char"
msgstr "Caract�re initial non valide"

+msgid ""
+"\n"
+"# Bar lines, copied verbatim:\n"
+msgstr ""
+"\n"
+"# Lignes commen�ant par |, copi�es litt�ralement :\n"
+
# AB - Ceci est un titre de bo�te de dialogue. V�rifier que la version
# fran�aise est correcte pour les trois r�f�rences ; j'ai un doute quant
# � la troisi�me.
@@ -1241,10 +1307,6 @@ msgstr "E149: D
msgid "Sorry, help file \"%s\" not found"
msgstr "D�sol�, le fichier d'aide \"%s\" est introuvable"

-#, c-format
-msgid "E150: Not a directory: %s"
-msgstr "E150: %s n'est pas un r�pertoire"
-
# AB - La version anglaise est plus pr�cise, mais trop technique.
#, c-format
msgid "E152: Cannot open %s for writing"
@@ -1268,6 +1330,10 @@ msgstr "E670: Encodages diff
msgid "E154: Duplicate tag \"%s\" in file %s/%s"
msgstr "E154: Marqueur \"%s\" dupliqu� dans le fichier %s/%s"

+#, c-format
+msgid "E150: Not a directory: %s"
+msgstr "E150: %s n'est pas un r�pertoire"
+
# AB - Il faut respecter l'esprit plus que la lettre.
#, c-format
msgid "E160: Unknown sign command: %s"
@@ -1332,6 +1398,13 @@ msgstr "ligne %ld : %s"
msgid "cmd: %s"
msgstr "cmde : %s"

+msgid "frame is zero"
+msgstr "le cadre de pile est z�ro"
+
+#, c-format
+msgid "frame at highest level: %d"
+msgstr "cadre de pile au niveau le plus haut : %d"
+
#, c-format
msgid "Breakpoint in \"%s%s\" line %ld"
msgstr "Point d'arr�t dans %s%s ligne %ld"
@@ -1393,8 +1466,8 @@ msgid "Searching for \"%s\""
msgstr "Recherche de \"%s\""

#, c-format
-msgid "not found in 'runtimepath': \"%s\""
-msgstr "introuvable dans 'runtimepath' : \"%s\""
+msgid "not found in '%s': \"%s\""
+msgstr "introuvable dans '%s' : \"%s\""

msgid "Source Vim script"
msgstr "Sourcer un script - Vim"
@@ -1572,7 +1645,7 @@ msgid "E468: Completion argument only allowed for custom completion"
msgstr "E468: Seul le compl�tement personnalis� accepte un argument"

msgid "E467: Custom completion requires a function argument"
-msgstr "E467: Le compl�tement personnalis� requiert une fonction en argument"
+msgstr "E467: Le compl�tement personnalis� n�cessite une fonction en argument"

msgid "unknown"
msgstr "inconnu"
@@ -1615,7 +1688,7 @@ msgid "E187: Unknown"
msgstr "E187: Inconnu"

msgid "E465: :winsize requires two number arguments"
-msgstr "E465: :winsize requiert deux arguments num�riques"
+msgstr "E465: :winsize n�cessite deux arguments num�riques"

#, c-format
msgid "Window position: X %d, Y %d"
@@ -1627,7 +1700,7 @@ msgstr ""
"E188: R�cup�rer la position de la fen�tre non impl�ment� dans cette version"

msgid "E466: :winpos requires two number arguments"
-msgstr "E466: :winpos requiert deux arguments num�riques"
+msgstr "E466: :winpos n�cessite deux arguments num�riques"

msgid "Save Redirection"
msgstr "Enregistrer la redirection"
@@ -2359,6 +2432,18 @@ msgstr "Vim"
msgid "E232: Cannot create BalloonEval with both message and callback"
msgstr "E232: Impossible de cr�er un BalloonEval avec message ET callback"

+msgid "_Cancel"
+msgstr "_Annuler"
+
+msgid "_Save"
+msgstr "_Enregistrer"
+
+msgid "_Open"
+msgstr "_Ouvrir"
+
+msgid "_OK"
+msgstr "_Ok"
+
msgid ""
"&Yes\n"
"&No\n"
@@ -2368,6 +2453,12 @@ msgstr ""
"&Non\n"
"&Annuler"

+msgid "Yes"
+msgstr "Oui"
+
+msgid "No"
+msgstr "Non"
+
# todo '_' is for hotkey, i guess?
msgid "Input _Methods"
msgstr "_M�thodes de saisie"
@@ -2402,18 +2493,18 @@ msgstr "Haut"
msgid "Down"
msgstr "Bas"

-#. 'Find Next' button
msgid "Find Next"
msgstr "Suivant"

-#. 'Replace' button
msgid "Replace"
msgstr "Remplacer"

-#. 'Replace All' button
msgid "Replace All"
msgstr "Remplacer tout"

+msgid "_Close"
+msgstr "_Fermer"
+
msgid "Vim: Received \"die\" request from session manager\n"
msgstr "Vim : Une requ�te \"die\" a �t� re�ue par le gestionnaire de session\n"

@@ -2467,17 +2558,6 @@ msgstr "Rempl&acer tout"
msgid "&Undo"
msgstr "Ann&uler"

-#, c-format
-msgid "E671: Cannot find window title \"%s\""
-msgstr "E671: Titre de fen�tre \"%s\" introuvable"
-
-#, c-format
-msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
-msgstr "E243: Argument non support� : \"-%s\" ; Utilisez la version OLE."
-
-msgid "E672: Unable to open window inside MDI application"
-msgstr "E672: Impossible d'ouvrir une fen�tre dans une application MDI"
-
msgid "Open tab..."
msgstr "Ouvrir dans un onglet..."

@@ -2501,6 +2581,17 @@ msgstr "Non utilis
msgid "Directory\t*.nothing\n"
msgstr "R�pertoire\t*.rien\n"

+#, c-format
+msgid "E671: Cannot find window title \"%s\""
+msgstr "E671: Titre de fen�tre \"%s\" introuvable"
+
+#, c-format
+msgid "E243: Argument not supported: \"-%s\"; Use the OLE version."
+msgstr "E243: Argument non support� : \"-%s\" ; Utilisez la version OLE."
+
+msgid "E672: Unable to open window inside MDI application"
+msgstr "E672: Impossible d'ouvrir une fen�tre dans une application MDI"
+
# DB - todo : perfectible.
msgid "Vim E458: Cannot allocate colormap entry, some colors may be incorrect"
msgstr ""
@@ -2855,6 +2946,13 @@ msgstr ""
"E815: D�sol�, cette commande est d�sactiv�e : les biblioth�ques MzScheme "
"n'ont pas pu �tre charg�es."

+msgid ""
+"E895: Sorry, this command is disabled, the MzScheme's racket/base module "
+"could not be loaded."
+msgstr ""
+"E895: D�sol�, cette commande est d�sactiv�e : le module MzScheme racket/base "
+"ne peut pas �tre charg�."
+
msgid "invalid expression"
msgstr "expression invalide"

@@ -2961,97 +3059,6 @@ msgstr "E272: Exception non prise en charge"
msgid "E273: unknown longjmp status %d"
msgstr "E273: contexte de longjmp inconnu : %d"

-msgid "Toggle implementation/definition"
-msgstr "Basculer impl�mentation/d�finition"
-
-msgid "Show base class of"
-msgstr "Montrer la classe de base de"
-
-msgid "Show overridden member function"
-msgstr "Montrer les fonctions membres surcharg�es"
-
-msgid "Retrieve from file"
-msgstr "R�cup�rer du fichier"
-
-msgid "Retrieve from project"
-msgstr "R�cup�rer du projet"
-
-msgid "Retrieve from all projects"
-msgstr "R�cup�rer de tous les projets"
-
-msgid "Retrieve"
-msgstr "R�cup�rer"
-
-msgid "Show source of"
-msgstr "Montrer source de"
-
-msgid "Find symbol"
-msgstr "Trouver symbole"
-
-msgid "Browse class"
-msgstr "Parcourir classe"
-
-msgid "Show class in hierarchy"
-msgstr "Montrer classe dans hi�rarchie"
-
-msgid "Show class in restricted hierarchy"
-msgstr "Montrer classe dans hi�rarchie restreinte"
-
-# todo
-msgid "Xref refers to"
-msgstr "Xref r�f�rence"
-
-msgid "Xref referred by"
-msgstr "Xref est r�f�renc� par"
-
-msgid "Xref has a"
-msgstr "Xref a un(e)"
-
-msgid "Xref used by"
-msgstr "Xref utilis�e par"
-
-msgid "Show docu of"
-msgstr "Montrer doc de"
-
-msgid "Generate docu for"
-msgstr "G�n�rer la doc de"
-
-msgid ""
-"Cannot connect to SNiFF+. Check environment (sniffemacs must be found in "
-"$PATH).\n"
-msgstr ""
-"Connexion � SNiFF+ impossible. V�rifiez l'environnement (sniffemacs doit "
-"�tre dans le $PATH).\n"
-
-msgid "E274: Sniff: Error during read. Disconnected"
-msgstr "E274: Sniff : Erreur de lecture. D�connexion"
-
-# DB - Les trois messages suivants vont ensembles.
-msgid "SNiFF+ is currently "
-msgstr "SNiFF+ est actuellement "
-
-msgid "not "
-msgstr "d�"
-
-msgid "connected"
-msgstr "connect�"
-
-#, c-format
-msgid "E275: Unknown SNiFF+ request: %s"
-msgstr "E275: Requ�te SNiFF+ inconnue : %s"
-
-msgid "E276: Error connecting to SNiFF+"
-msgstr "E276: Erreur lors de la connexion � SNiFF+"
-
-msgid "E278: SNiFF+ not connected"
-msgstr "E278: SNiFF+ n'est pas connect�"
-
-msgid "E279: Not a SNiFF+ buffer"
-msgstr "E279: Ce tampon n'est pas un tampon SNiFF+"
-
-msgid "Sniff: Error during write. Disconnected"
-msgstr "Sniff : Erreur lors d'une �criture. D�connexion"
-
msgid "invalid buffer number"
msgstr "num�ro de tampon invalide"

@@ -3348,6 +3355,10 @@ msgstr "-F\t\tD
msgid "-T <terminal>\tSet terminal type to <terminal>"
msgstr "-T <term>\tR�gler le type du terminal sur <terminal>"

+msgid "--not-a-term\t\tSkip warning for input/output not being a terminal"
+msgstr ""
+"--no-a-term\t\tAucun avertissement si l'entr�e/sortie n'est pas un terminal"
+
msgid "-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"
msgstr "-u <vimrc>\tUtiliser <vimrc> au lieu du vimrc habituel"

@@ -3636,7 +3647,7 @@ msgstr "E286:

msgid "E287: Warning: Could not set destroy callback to IM"
msgstr ""
-"E287: Alerte : Impossible d'inscrire la callback de destruction dans la MS"
+"E287: Alerte : Impossible d'inscrire le callback de destruction dans la MS"

msgid "E288: input method doesn't support any style"
msgstr "E288: la m�thode de saisie ne supporte aucun style"
@@ -4041,15 +4052,13 @@ msgid ""
"\n"
"(1) Another program may be editing the same file. If this is the case,\n"
" be careful not to end up with two different instances of the same\n"
-" file when making changes."
+" file when making changes. Quit, or continue with caution.\n"
msgstr ""
"\n"
"(1) Un autre programme est peut-�tre en train d'�diter ce fichier.\n"
" Si c'est le cas, faites attention � ne pas vous retrouver avec\n"
-" deux versions diff�rentes du m�me fichier en faisant des modifications."
-
-msgid " Quit, or continue with caution.\n"
-msgstr " Quittez, ou continuez prudemment.\n"
+" deux versions diff�rentes du m�me fichier en faisant des modifications.\n"
+" Quitter ou continuer avec attention.\n"

msgid "(2) An edit session for this file crashed.\n"
msgstr "(2) Une session d'�dition de ce fichier a plant�.\n"
@@ -4356,22 +4365,12 @@ msgstr "E346: Plus de r
msgid "E347: No more file \"%s\" found in path"
msgstr "E347: Plus de fichier \"%s\" dans 'path'"

-msgid "Cannot connect to Netbeans #2"
-msgstr "Impossible de se connecter � Netbeans n�2"
-
-msgid "Cannot connect to Netbeans"
-msgstr "Impossible de se connecter � Netbeans"
-
#, c-format
msgid "E668: Wrong access mode for NetBeans connection info file: \"%s\""
msgstr ""
"E668: Mode d'acc�s incorrect au fichier d'infos de connexion NetBeans : \"%s"
"\""

-# DB : message d'un appel � perror().
-msgid "read from Netbeans socket"
-msgstr "read sur la socket Netbeans"
-
#, c-format
msgid "E658: NetBeans connection lost for buffer %ld"
msgstr "E658: Connexion NetBeans perdue pour le tampon %ld"
@@ -4661,7 +4660,7 @@ msgid "E590: A preview window already exists"
msgstr "E590: Il existe d�j� une fen�tre de pr�visualisation"

msgid "W17: Arabic requires UTF-8, do ':set encoding=utf-8'"
-msgstr "W17: L'arabe requiert l'UTF-8, tapez ':set encoding=utf-8'"
+msgstr "W17: L'arabe n�cessite l'UTF-8, tapez ':set encoding=utf-8'"

#, c-format
msgid "E593: Need at least %d lines"
@@ -4834,18 +4833,14 @@ msgstr ""
"\n"
"Impossible de modifier le contexte de s�curit� pour "

-msgid "Could not set security context "
-msgstr "Impossible d'initialiser le contexte de s�curit� "
-
-msgid " for "
-msgstr " pour "
-
-#. no enough size OR unexpected error
-msgid "Could not get security context "
-msgstr "Impossible d'obtenir le contexte de s�curit� "
+#, c-format
+msgid "Could not set security context %s for %s"
+msgstr "Impossible d'initialiser le contexte de s�curit� %s pour %s"

-msgid ". Removing it!\n"
-msgstr ". Suppression !\n"
+#, c-format
+msgid "Could not get security context %s for %s. Removing it!"
+msgstr ""
+"Impossible d'obtenir le contexte de s�curit� %s pour %s. Il sera supprim� !"

msgid ""
"\n"
@@ -4924,10 +4919,6 @@ msgstr "Erreur VIM"
msgid "Could not fix up function pointers to the DLL!"
msgstr "Impossible d'initialiser les pointeurs de fonction vers la DLL !"

-#, c-format
-msgid "shell returned %d"
-msgstr "le shell a retourn� %d"
-
# DB - Les �v�nements en question sont ceux des messages qui suivent.
#, c-format
msgid "Vim: Caught %s event\n"
@@ -4958,6 +4949,10 @@ msgid "Vim Warning"
msgstr "Alerte Vim"

#, c-format
+msgid "shell returned %d"
+msgstr "le shell a retourn� %d"
+
+#, c-format
msgid "E372: Too many %%%c in format string"
msgstr "E372: Trop de %%%c dans la cha�ne de format"

@@ -4989,6 +4984,15 @@ msgstr "E379: Nom de r
msgid "E553: No more items"
msgstr "E553: Plus d'�l�ments"

+msgid "E924: Current window was closed"
+msgstr "E924: La fen�tre courante doit �tre ferm�e"
+
+msgid "E925: Current quickfix was changed"
+msgstr "E925: Le quickfix courant a chang�"
+
+msgid "E926: Current location list was changed"
+msgstr "E926: La liste d'emplacements courante a chang�"
+
#, c-format
msgid "(%d of %d)%s%s: "
msgstr "(%d sur %d)%s%s : "
@@ -5714,6 +5718,9 @@ msgstr "Aucun
msgid "E390: Illegal argument: %s"
msgstr "E390: Argument invalide : %s"

+msgid "syntax iskeyword "
+msgstr "syntaxe iskeyword "
+
#, c-format
msgid "E391: No such syntax cluster: %s"
msgstr "E391: Aucune grappe de syntaxe %s"
@@ -5794,6 +5801,10 @@ msgid "E789: Missing ']': %s"
msgstr "E789: ']' manquant : %s"

#, c-format
+msgid "E890: trailing char after ']': %s]%s"
+msgstr "E890: Caract�re surnum�raire apr�s ']': %s]%s"
+
+#, c-format
msgid "E398: Missing '=': %s"
msgstr "E398: '=' manquant : %s"

@@ -6235,27 +6246,6 @@ msgstr ""

msgid ""
"\n"
-"MS-Windows 16-bit version"
-msgstr ""
-"\n"
-"Version MS-Windows 16 bits"
-
-msgid ""
-"\n"
-"32-bit MS-DOS version"
-msgstr ""
-"\n"
-"Version MS-DOS 32 bits"
-
-msgid ""
-"\n"
-"16-bit MS-DOS version"
-msgstr ""
-"\n"
-"Version MS-DOS 16 bits"
-
-msgid ""
-"\n"
"MacOS X (unix) version"
msgstr ""
"\n"
@@ -6347,6 +6337,9 @@ msgstr ""
msgid "without GUI."
msgstr "sans interface graphique."

+msgid "with GTK3 GUI."
+msgstr "avec interface graphique GTK3."
+
msgid "with GTK2-GNOME GUI."
msgstr "avec interface graphique GTK2-GNOME."

@@ -6841,6 +6834,9 @@ msgid "E794: Cannot set variable in the sandbox: \"%s\""
msgstr ""
"E794: Impossible de modifier une variable depuis le bac � sable : \"%s\""

+msgid "E713: Cannot use empty key for Dictionary"
+msgstr "E713: Impossible d'utiliser une cl� vide dans un Dictionnaire"
+
msgid "E47: Error while reading errorfile"
msgstr "E47: Erreur lors de la lecture du fichier d'erreurs"

@@ -6941,6 +6937,10 @@ msgstr "E764: L'option '%s' n'est pas activ
msgid "E850: Invalid register name"
msgstr "E850: Nom de registre invalide"

+#, c-format
+msgid "E919: Directory not found in '%s': \"%s\""
+msgstr "E919: R�pertoire introuvable dans '%s' : \"%s\""
+
msgid "search hit TOP, continuing at BOTTOM"
msgstr "La recherche a atteint le HAUT, et continue en BAS"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 0239acb11fe4bfe9b525ea90b782759da5eb7704
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 11 21:02:54 2016 +0200

patch 7.4.1722
Problem: Crash when calling garbagecollect() after starting a job.
Solution: Set the copyID on job and channel. (Hirohito Higashi, Ozaki
Kiichi)
---
src/eval.c | 2 ++
src/version.c | 2 ++
2 files changed, 4 insertions(+)

diff --git a/src/eval.c b/src/eval.c
index 1c5a316..0c270b9 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7326,6 +7326,7 @@ set_ref_in_item(

if (job != NULL && job->jv_copyID != copyID)
{
+ job->jv_copyID = copyID;
if (job->jv_channel != NULL)
{
dtv.v_type = VAR_CHANNEL;
@@ -7350,6 +7351,7 @@ set_ref_in_item(

if (ch != NULL && ch->ch_copyID != copyID)
{
+ ch->ch_copyID = copyID;
for (part = PART_SOCK; part <= PART_IN; ++part)
{
for (jq = ch->ch_part[part].ch_json_head.jq_next; jq != NULL;
diff --git a/src/version.c b/src/version.c
index ef777cf..4f8bc2e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1722,
+/**/
1721,
/**/
1720,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit f73d3bc253fa79ad220f52f04b93e782e95a9d43
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 11 21:55:15 2016 +0200

patch 7.4.1723
Problem: When using try/catch in 'tabline' it is still considered an
error and the tabline will be disabled.
Solution: Check did_emsg instead of called_emsg. (haya14busa, closes #746)
---
src/screen.c | 8 ++++----
src/testdir/test_alot.vim | 1 +
src/testdir/test_tabline.vim | 43 +++++++++++++++++++++++++++++++++++++++++++
src/version.c | 2 ++
4 files changed, 50 insertions(+), 4 deletions(-)

diff --git a/src/screen.c b/src/screen.c
index dc5d175..8044079 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -10266,16 +10266,16 @@ draw_tabline(void)
/* Use the 'tabline' option if it's set. */
if (*p_tal != NUL)
{
- int save_called_emsg = called_emsg;
+ int saved_did_emsg = did_emsg;

/* Check for an error. If there is one we would loop in redrawing the
* screen. Avoid that by making 'tabline' empty. */
- called_emsg = FALSE;
+ did_emsg = FALSE;
win_redr_custom(NULL, FALSE);
- if (called_emsg)
+ if (did_emsg)
set_string_option_direct((char_u *)"tabline", -1,
(char_u *)"", OPT_FREE, SID_ERROR);
- called_emsg |= save_called_emsg;
+ did_emsg |= saved_did_emsg;
}
else
#endif
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 1eb76a6..7f9a1a7 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -24,6 +24,7 @@ source test_set.vim
source test_sort.vim
source test_statusline.vim
source test_syn_attr.vim
+source test_tabline.vim
source test_timers.vim
source test_undolevels.vim
source test_unlet.vim
diff --git a/src/testdir/test_tabline.vim b/src/testdir/test_tabline.vim
new file mode 100644
index 0000000..6c7a02d
--- /dev/null
+++ b/src/testdir/test_tabline.vim
@@ -0,0 +1,43 @@
+function! TablineWithCaughtError()
+ let s:func_in_tabline_called = 1
+ try
+ call eval('unknown expression')
+ catch
+ endtry
+ return ''
+endfunction
+
+function! TablineWithError()
+ let s:func_in_tabline_called = 1
+ call eval('unknown expression')
+ return ''
+endfunction
+
+function! Test_caught_error_in_tabline()
+ let showtabline_save = &showtabline
+ set showtabline=2
+ let s:func_in_tabline_called = 0
+ let tabline = '%{TablineWithCaughtError()}'
+ let &tabline = tabline
+ redraw!
+ call assert_true(s:func_in_tabline_called)
+ call assert_equal(tabline, &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+endfunction
+
+function! Test_tabline_will_be_disabled_with_error()
+ let showtabline_save = &showtabline
+ set showtabline=2
+ let s:func_in_tabline_called = 0
+ let tabline = '%{TablineWithError()}'
+ try
+ let &tabline = tabline
+ redraw!
+ catch
+ endtry
+ call assert_true(s:func_in_tabline_called)
+ call assert_equal('', &tabline)
+ set tabline=
+ let &showtabline = showtabline_save
+endfunction
diff --git a/src/version.c b/src/version.c
index 4f8bc2e..0713142 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1723,
+/**/
1722,
/**/
1721,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 73cd8fb3e87e4b29dfc489f58e56dee1839c18e5
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 11 22:49:03 2016 +0200

patch 7.4.1724
Problem: Tabline test fails in GUI.
Solution: Remove 'e' from 'guioptions'.
---
src/testdir/test_tabline.vim | 6 ++++++
src/version.c | 2 ++
2 files changed, 8 insertions(+)

diff --git a/src/testdir/test_tabline.vim b/src/testdir/test_tabline.vim
index 6c7a02d..b08f299 100644
--- a/src/testdir/test_tabline.vim
+++ b/src/testdir/test_tabline.vim
@@ -14,6 +14,9 @@ function! TablineWithError()
endfunction

function! Test_caught_error_in_tabline()
+ if has('gui')
+ set guioptions-=e
+ endif
let showtabline_save = &showtabline
set showtabline=2
let s:func_in_tabline_called = 0
@@ -27,6 +30,9 @@ function! Test_caught_error_in_tabline()
endfunction

function! Test_tabline_will_be_disabled_with_error()
+ if has('gui')
+ set guioptions-=e
+ endif
let showtabline_save = &showtabline
set showtabline=2
let s:func_in_tabline_called = 0
diff --git a/src/version.c b/src/version.c
index 0713142..e422527 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1724,
+/**/
1723,
/**/
1722,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 03413f44167c4b5cd0012def9bb331e2518c83cf
Author: Bram Moolenaar <***@vim.org>
Date: Tue Apr 12 21:07:15 2016 +0200

Updated runtime files.
---
runtime/autoload/vimball.vim | 32 +++---
runtime/doc/Makefile | 2 +
runtime/doc/eval.txt | 34 ++++--
runtime/doc/gui_x11.txt | 4 +-
runtime/doc/help.txt | 3 +-
runtime/doc/helphelp.txt | 6 +-
runtime/doc/options.txt | 6 +-
runtime/doc/pattern.txt | 6 +-
runtime/doc/pi_logipat.txt | 40 ++++---
runtime/doc/pi_vimball.txt | 23 ++--
runtime/doc/quickref.txt | 3 +-
runtime/doc/repeat.txt | 50 +++++++--
runtime/doc/starting.txt | 9 +-
runtime/doc/syntax.txt | 40 ++++---
runtime/doc/tags | 68 +++++++++---
runtime/doc/todo.txt | 97 +++++++++++-----
runtime/doc/usr_41.txt | 5 +-
runtime/doc/version7.txt | 6 +-
runtime/doc/version8.txt | 233 +++++++++++++++++++++++++++++++++++++++
runtime/doc/vim.1 | 2 +-
runtime/gvim.desktop | 1 +
runtime/plugin/vimballPlugin.vim | 29 ++---
runtime/syntax/c.vim | 8 +-
runtime/syntax/mysql.vim | 30 ++---
runtime/syntax/sh.vim | 21 ++--
runtime/syntax/tex.vim | 14 ++-
runtime/syntax/vim.vim | 78 ++++++-------
runtime/vim.desktop | 1 +
28 files changed, 629 insertions(+), 222 deletions(-)

diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim
index 9a5a73c..1af6b19 100644
--- a/runtime/autoload/vimball.vim
+++ b/runtime/autoload/vimball.vim
@@ -1,9 +1,9 @@
" vimball.vim : construct a file containing both paths and files
-" Author: Charles E. Campbell, Jr.
-" Date: Jan 17, 2012
-" Version: 35
+" Author: Charles E. Campbell
+" Date: Apr 11, 2016
+" Version: 37
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
-" Copyright: (c) 2004-2011 by Charles E. Campbell, Jr.
+" Copyright: (c) 2004-2011 by Charles E. Campbell
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
" No warranty, express or implied.
@@ -14,7 +14,7 @@
if &cp || exists("g:loaded_vimball")
finish
endif
-let g:loaded_vimball = "v35"
+let g:loaded_vimball = "v37"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of vimball needs vim 7.2"
@@ -142,7 +142,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range

let lastline= line("$") + 1
if lastline == 2 && getline("$") == ""
- call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
+ call setline(1,'" Vimball Archiver by Charles E. Campbell')
call setline(2,'UseVimball')
call setline(3,'finish')
let lastline= line("$") + 1
@@ -179,7 +179,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
" remove the evidence
setlocal nomod bh=wipe
exe "tabn ".curtabnr
- exe "tabc ".vbtabnr
+ exe "tabc! ".vbtabnr

" restore options
call vimball#RestoreSettings()
@@ -280,7 +280,7 @@ fun! vimball#Vimball(really,...)
" when AsNeeded/filename is filereadable or was present in VimballRecord
if fname =~ '\<plugin/'
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
- if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
+ if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~# anfname)
" call Decho("using anfname<".anfname."> instead of <".fname.">")
let fname= anfname
endif
@@ -379,10 +379,10 @@ fun! vimball#Vimball(really,...)
call s:RecordInFile(home)

" restore events, delete tab and buffer
- exe "tabn ".vbtabnr
+ exe "sil! tabn ".vbtabnr
setlocal nomod bh=wipe
- exe "tabn ".curtabnr
- exe "tabc ".vbtabnr
+ exe "sil! tabn ".curtabnr
+ exe "sil! tabc! ".vbtabnr
call vimball#RestoreSettings()
call s:ChgDir(curdir)

@@ -555,7 +555,7 @@ fun! vimball#ShowMesg(level,msg)
set noruler noshowcmd
redraw!

- if &fo =~ '[ta]'
+ if &fo =~# '[ta]'
echomsg "***vimball*** ".a:msg
else
if a:level == s:WARNING || a:level == s:USAGE
@@ -715,7 +715,7 @@ fun! vimball#SaveSettings()
" call Dfunc("SaveSettings()")
let s:makeep = getpos("'a")
let s:regakeep= @a
- if exists("&acd")
+ if exists("+acd")
let s:acdkeep = &acd
endif
let s:eikeep = &ei
@@ -728,7 +728,7 @@ fun! vimball#SaveSettings()
let s:vekeep = &ve
let s:ffkeep = &l:ff
let s:swfkeep = &l:swf
- if exists("&acd")
+ if exists("+acd")
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
else
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
@@ -743,7 +743,7 @@ endfun
fun! vimball#RestoreSettings()
" call Dfunc("RestoreSettings()")
let @a = s:regakeep
- if exists("&acd")
+ if exists("+acd")
let &acd = s:acdkeep
endif
let &l:fen = s:fenkeep
@@ -760,7 +760,7 @@ fun! vimball#RestoreSettings()
" call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",s:makeep)
endif
- if exists("&acd")
+ if exists("+acd")
unlet s:acdkeep
endif
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile
index d36f2ce..33a09be 100644
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -142,6 +142,7 @@ DOCS = \
version5.txt \
version6.txt \
version7.txt \
+ version8.txt \
vi_diff.txt \
visual.txt \
windows.txt \
@@ -275,6 +276,7 @@ HTMLS = \
version5.html \
version6.html \
version7.html \
+ version8.html \
vi_diff.html \
vimindex.html \
visual.html \
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b0b8479..1b4b3b7 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 Mar 29
+*eval.txt* For Vim version 7.4. Last change: 2016 Apr 12


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -411,7 +411,8 @@ only appear once. Examples: >
A key is always a String. You can use a Number, it will be converted to a
String automatically. Thus the String '4' and the number 4 will find the same
entry. Note that the String '04' and the Number 04 are different, since the
-Number will be converted to the String '4'.
+Number will be converted to the String '4'. The empty string can be used as a
+key.

A value can be any expression. Using a Dictionary for a value creates a
nested Dictionary: >
@@ -874,11 +875,11 @@ These three can be repeated and mixed. Examples:
expr8 *expr8*
-----
expr8[expr1] item of String or |List| *expr-[]* *E111*
- *E909*
+ *E909* *subscript*
If expr8 is a Number or String this results in a String that contains the
expr1'th single byte from expr8. expr8 is used as a String, expr1 as a
Number. This doesn't recognize multi-byte encodings, see |byteidx()| for
-an alternative.
+an alternative, or use `split()` to turn the string into a list of characters.

Index zero gives the first byte. This is like it works in C. Careful:
text column numbers start with one! Example, to get the byte under the
@@ -2046,6 +2047,7 @@ range( {expr} [, {max} [, {stride}]])
readfile( {fname} [, {binary} [, {max}]])
List get list of lines from file {fname}
reltime( [{start} [, {end}]]) List get time value
+reltimefloat( {time}) Float turn the time value into a Float
reltimestr( {time}) String turn time value into a String
remote_expr( {server}, {string} [, {idvar}])
String send expression
@@ -2183,6 +2185,7 @@ writefile( {list}, {fname} [, {flags}])
Number write list of lines to file {fname}
xor( {expr}, {expr}) Number bitwise XOR

+
abs({expr}) *abs()*
Return the absolute value of {expr}. When {expr} evaluates to
a |Float| abs() returns a |Float|. When {expr} can be
@@ -2996,6 +2999,7 @@ cursor({list})

When there is one argument {list} this is used as a |List|
with two, three or four item:
+ [{lnum}, {col}]
[{lnum}, {col}, {off}]
[{lnum}, {col}, {off}, {curswant}]
This is like the return value of |getpos()| or |getcurpos()|,
@@ -3400,7 +3404,10 @@ feedkeys({string} [, {mode}]) *feedkeys()*
similar to using ":normal!". You can call feedkeys()
several times without 'x' and then one time with 'x'
(possibly with an empty {string}) to execute all the
- typeahead.
+ typeahead. Note that when Vim ends in Insert mode it
+ will behave as if <Esc> is typed, to avoid getting
+ stuck, waiting for a character to be typed before the
+ script continues.
Return value is always 0.

filereadable({file}) *filereadable()*
@@ -4633,7 +4640,7 @@ job_status({job}) *job_status()* *E916*
"fail" job failed to start
"dead" job died or was stopped after running

- If an exit callback was set with the "exit-cb" option and the
+ If an exit callback was set with the "exit_cb" option and the
job is now detected to be "dead" the callback will be invoked.

For more information see |job_info()|.
@@ -5642,7 +5649,8 @@ readfile({fname} [, {binary} [, {max}]])
reltime([{start} [, {end}]]) *reltime()*
Return an item that represents a time value. The format of
the item depends on the system. It can be passed to
- |reltimestr()| to convert it to a string.
+ |reltimestr()| to convert it to a string or |reltimefloat()|
+ to convert to a Float.
Without an argument it returns the current time.
With one argument is returns the time passed since the time
specified in the argument.
@@ -5652,6 +5660,16 @@ reltime([{start} [, {end}]]) *reltime()*
reltime().
{only available when compiled with the |+reltime| feature}

+reltimefloat({time}) *reltimefloat()*
+ Return a Float that represents the time value of {time}.
+ Example: >
+ let start = reltime()
+ call MyFunction()
+ let seconds = reltimefloat(reltime(start))
+< See the note of reltimestr() about overhead.
+ Also see |profiling|.
+ {only available when compiled with the |+reltime| feature}
+
reltimestr({time}) *reltimestr()*
Return a String that represents the time value of {time}.
This is the number of seconds, a dot and the number of
@@ -7340,7 +7358,7 @@ win_gotoid({expr}) *win_gotoid()*
tabpage.
Return 1 if successful, 0 if the window cannot be found.

-win_id2tabwin({expr} *win_id2tabwin()*
+win_id2tabwin({expr}) *win_id2tabwin()*
Return a list with the tab number and window number of window
with ID {expr}: [tabnr, winnr].
Return [0, 0] if the window cannot be found.
diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt
index 605b998..c657790 100644
--- a/runtime/doc/gui_x11.txt
+++ b/runtime/doc/gui_x11.txt
@@ -1,4 +1,4 @@
-*gui_x11.txt* For Vim version 7.4. Last change: 2014 Mar 08
+*gui_x11.txt* For Vim version 7.4. Last change: 2016 Apr 08


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -305,7 +305,7 @@ If a name is used that exists on other systems, but not in X11, the default
"arrow" pointer is used.

==============================================================================
-5. GTK version *gui-gtk* *GTK+* *GTK*
+5. GTK version *gui-gtk* *GTK+* *GTK* *GTK3*

The GTK version of the GUI works a little bit different.

diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 09cb325..23d981a 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -1,4 +1,4 @@
-*help.txt* For Vim version 7.4. Last change: 2016 Feb 27
+*help.txt* For Vim version 7.4. Last change: 2016 Mar 31

VIM - main help file
k
@@ -178,6 +178,7 @@ Versions ~
|version5.txt| Differences between Vim version 4.6 and 5.x
|version6.txt| Differences between Vim version 5.7 and 6.x
|version7.txt| Differences between Vim version 6.4 and 7.x
+|version8.txt| Differences between Vim version 7.4 and 8.x
*sys-file-list*
Remarks about specific systems ~
|os_390.txt| OS/390 Unix
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index 2d52d13..2a06b63 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -1,4 +1,4 @@
-*helphelp.txt* For Vim version 7.4. Last change: 2016 Mar 28
+*helphelp.txt* For Vim version 7.4. Last change: 2016 Apr 01


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -322,6 +322,10 @@ aligned on a line.
When referring to an existing help tag and to create a hot-link, place the
name between two bars (|) eg. |help-writing|.

+When referring to a Vim command and to create a hot-link, place the
+name between two backticks, eg. inside `:filetype`. You will see this is
+highlighted as a command, like a code block (see below).
+
When referring to a Vim option in the help file, place the option name between
two single quotes, eg. 'statusline'

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 6ddf076..b354ddf 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.4. Last change: 2016 Apr 03
+*options.txt* For Vim version 7.4. Last change: 2016 Apr 12


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2646,7 +2646,7 @@ A jump table for the options with a short description can be found at |Q_op|.
also 'gdefault' option.
Switching this option on is discouraged!

- *'emoji'* *'emo'*
+ *'emoji'* *'emo'* *'noemoji'* *'noemo'*
'emoji' 'emo' boolean (default: on)
global
{not in Vi}
@@ -3634,7 +3634,7 @@ A jump table for the options with a short description can be found at |Q_op|.
HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.
Normally you would use "cDEFAULT".
- qXX - quality XX. Valid charsets are: PROOF, DRAFT,
+ qXX - quality XX. Valid quality names are: PROOF, DRAFT,
ANTIALIASED, UNANTIALIASED, CLEARTYPE, DEFAULT.
Normally you would use "qDEFAULT".
Some quality values isn't supported in legacy OSs.
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 2a3d2c4..9cb6e11 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 7.4. Last change: 2016 Jan 03
+*pattern.txt* For Vim version 7.4. Last change: 2016 Apr 03


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1104,8 +1104,8 @@ x A single character, with no special meaning, matches itself
'/', alphabetic, numeric, '_' or '~'.
These items only work for 8-bit characters, except [:lower:] and
[:upper:] also work for multi-byte characters when using the new
- regexp engine. In the future these items may work for multi-byte
- characters.
+ regexp engine. See |two-engines|. In the future these items may
+ work for multi-byte characters.
*/[[=* *[==]*
- An equivalence class. This means that characters are matched that
have almost the same meaning, e.g., when ignoring accents. This
diff --git a/runtime/doc/pi_logipat.txt b/runtime/doc/pi_logipat.txt
index ea3acda..d2eac80 100644
--- a/runtime/doc/pi_logipat.txt
+++ b/runtime/doc/pi_logipat.txt
@@ -1,25 +1,25 @@
-*pi_logipat.txt* Logical Patterns Mar 13, 2013
+*logiPat.txt* Logical Patterns Jun 22, 2015

Author: Charles E. Campbell <***@ScampbellPfamily.AbizM>
-Copyright: (c) 2004-2013 by Charles E. Campbell *logipat-copyright*
+Copyright: (c) 2004-2015 by Charles E. Campbell *logiPat-copyright*
The VIM LICENSE applies to LogiPat.vim and LogiPat.txt
(see |copyright|) except use "LogiPat" instead of "Vim"
No warranty, express or implied. Use At-Your-Own-Risk.

==============================================================================
-1. Contents *logipat* *logipat-contents*
+1. Contents *logiPat* *logiPat-contents*

- 1. Contents.................: |logipat-contents|
- 2. LogiPat Manual...........: |logipat-manual|
- 3. LogiPat Examples.........: |logipat-examples|
- 4. Caveat...................: |logipat-caveat|
- 5. LogiPat History..........: |logipat-history|
+ 1. Contents.................: |logiPat-contents|
+ 2. LogiPat Manual...........: |logiPat-manual|
+ 3. LogiPat Examples.........: |logiPat-examples|
+ 4. Caveat...................: |logiPat-caveat|
+ 5. LogiPat History..........: |logiPat-history|

-==============================================================================
-2. LogiPat Manual *logipat-manual* *logipat-man*

+==============================================================================
+2. LogiPat Manual *logiPat-manual* *logiPat-man*

- *logipat-arg* *logipat-input* *logipat-pattern* *logipat-operators*
+ *logiPat-arg* *logiPat-input* *logiPat-pattern* *logiPat-operators*
Boolean logic patterns are composed of

operators ! = not
@@ -30,13 +30,12 @@ Copyright: (c) 2004-2013 by Charles E. Campbell *logipat-copyright*

:LogiPat {boolean-logic pattern} *:LogiPat*
:LogiPat is a command which takes a boolean-logic
- argument (|logipat-arg|).
+ argument (|logiPat-arg|).

:LP {boolean-logic pattern} *:LP*
:LP is a shorthand command version of :LogiPat
- (|:LogiPat|).

- :ELP {boolean-logic pattern} *:ELP*
+ :LPE {boolean-logic pattern} *:LPE*
No search is done, but the conversion from the
boolean logic pattern to the regular expression
is performed and echoed onto the display.
@@ -59,8 +58,9 @@ Copyright: (c) 2004-2013 by Charles E. Campbell *logipat-copyright*
To get a " inside a pattern, as opposed to having it delimit
the pattern, double it.

+
==============================================================================
-3. LogiPat Examples *logipat-examples*
+3. LogiPat Examples *logiPat-examples*

LogiPat takes Boolean logic arguments and produces a regular
expression which implements the choices. A series of examples
@@ -96,22 +96,26 @@ Copyright: (c) 2004-2013 by Charles E. Campbell *logipat-copyright*


==============================================================================
-4. Caveat *logipat-caveat*
+4. Caveat *logiPat-caveat*

The "not" operator may be fragile; ie. it may not always play well
with the & (logical-and) and | (logical-or) operators. Please try out
your patterns, possibly with :set hls, to insure that what is matching
is what you want.

+
==============================================================================
-3. LogiPat History *logipat-history*
+3. LogiPat History *logiPat-history*

+ v4 Jun 22, 2015 * LogiPat has been picked up by Bram M for standard
+ plugin distribution; hence the name change
v3 Sep 25, 2006 * LP_Or() fixed; it now encapsulates its output
in \%(...\) parentheses
- Dec 12, 2011 * |:ELP| added
+ Dec 12, 2011 * |:LPE| added
* "" is mapped to a single " and left inside patterns
v2 May 31, 2005 * LPF and LogiPatFlags commands weren't working
v1 May 23, 2005 * initial release

+
==============================================================================
vim:tw=78:ts=8:ft=help
diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt
index bbc7498..68103b5 100644
--- a/runtime/doc/pi_vimball.txt
+++ b/runtime/doc/pi_vimball.txt
@@ -1,12 +1,12 @@
-*pi_vimball.txt* For Vim version 7.4. Last change: 2012 Jan 17
+*pi_vimball.txt* For Vim version 7.4. Last change: 2016 Apr 11

----------------
Vimball Archiver
----------------

-Author: Charles E. Campbell, Jr. <***@ScampbellPfamily.AbizM>
+Author: Charles E. Campbell <***@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
-Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *Vimball-copyright*
+Copyright: (c) 2004-2015 by Charles E. Campbell *Vimball-copyright*
The VIM LICENSE (see |copyright|) applies to the files in this
package, including vimballPlugin.vim, vimball.vim, and pi_vimball.txt.
except use "vimball" instead of "VIM". Like anything else that's free,
@@ -99,10 +99,10 @@ MAKING DIRECTORIES VIA VIMBALLS *g:vimball_mkdir*

If it doesn't exist, then if g:vimball_mkdir doesn't exist, it is set
as follows: >
- |g:netrw_local_mkdir|, if it exists
- "mkdir" , if it is executable
- "makedir" , if it is executable
- Otherwise , it is undefined.
+ |g:netrw_localmkdir|, if it exists
+ "mkdir" , if it is executable
+ "makedir" , if it is executable
+ Otherwise , it is undefined.
< One may explicitly specify the directory making command using
g:vimball_mkdir. This command is used to make directories that
are needed as indicated by the vimball.
@@ -120,8 +120,7 @@ CONTROLLING THE VIMBALL EXTRACTION DIRECTORY *g:vimball_home*
source the file to extract its contents.

Extraction will only proceed if the first line of a putative vimball
- file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D."
- line.
+ file holds the "Vimball Archiver by Charles E. Campbell" line.

LISTING FILES IN A VIMBALL *:VimballList*

@@ -182,13 +181,16 @@ WINDOWS *vimball-windows*
==============================================================================
4. Vimball History *vimball-history* {{{1

+ 37 : Jul 18, 2014 * (by request of T. Miedema) added augroup around
+ the autocmds in vimballPlugin.vim
+ Jul 06, 2015 * there are two uses of tabc; changed to tabc!
34 : Sep 22, 2011 * "UseVimball path" now supports a non-full path by
prepending the current directory to it.
33 : Apr 02, 2011 * Gave priority to *.vmb over *.vba
* Changed silent! to sil! (shorter)
* Safed |'swf'| setting (during vimball extraction,
its now turned off)
- 32 : May 19, 2010 * (Christian Brabandt) :so someplugin.vba and
+ 32 : May 19, 2010 * (Christian Brabrandt) :so someplugin.vba and
:so someplugin.vba.gz (and the other supported
compression types) now works
* (Jan Steffens) added support for xz compression
@@ -200,6 +202,7 @@ WINDOWS *vimball-windows*
MkVimball, however, now will create *.vmb files.
Feb 11, 2011 * motoyakurotsu reported an error with vimball's
handling of zero-length files
+ Feb 18, 2016 * Changed =~ to =~# where appropriate
30 : Dec 08, 2008 * fnameescape() inserted to protect error
messaging using corrupted filenames from
causing problems
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 8d415ae..f42ea82 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -1,4 +1,4 @@
-*quickref.txt* For Vim version 7.4. Last change: 2016 Feb 24
+*quickref.txt* For Vim version 7.4. Last change: 2016 Mar 30


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -679,6 +679,7 @@ Short explanation of each option: *option-list*
'display' 'dy' list of flags for how to display text
'eadirection' 'ead' in which direction 'equalalways' works
'edcompatible' 'ed' toggle flags of ":substitute" command
+'emoji' 'emo' emoji characters are considered full width
'encoding' 'enc' encoding used internally
'endofline' 'eol' write <EOL> for last line in file
'equalalways' 'ea' windows are automatically made the same size
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index e2c4c2f..92ab585 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -1,4 +1,4 @@
-*repeat.txt* For Vim version 7.4. Last change: 2016 Mar 27
+*repeat.txt* For Vim version 7.4. Last change: 2016 Apr 05


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -72,8 +72,8 @@ examples.
The global commands work by first scanning through the [range] lines and
marking each line where a match occurs (for a multi-line pattern, only the
start of the match matters).
-In a second scan the [cmd] is executed for each marked line with its line
-number prepended. For ":v" and ":g!" the command is executed for each not
+In a second scan the [cmd] is executed for each marked line, as if the cursor
+was in that line. For ":v" and ":g!" the command is executed for each not
marked line. If a line is deleted its mark disappears.
The default for [range] is the whole buffer (1,$). Use "CTRL-C" to interrupt
the command. If an error message is given for a line, the command for that
@@ -234,8 +234,11 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
there yet.

Note that {name} is the directory name, not the name
- of the .vim file. If the "{name}/plugin" directory
- contains more than one file they are all sourced.
+ of the .vim file. All the files matching the pattern
+ pack/*/opt/{name}/plugin/**/*.vim ~
+ will be sourced. This allows for using subdirectories
+ below "plugin", just like with plugins in
+ 'runtimepath'.

If the filetype detection was not enabled yet (this
is usually done with a "syntax enable" or "filetype
@@ -251,15 +254,24 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
Also see |pack-add|.

*:packl* *:packloadall*
-:packloadall[!] Load all packages in the "start" directories under
- 'packpath'. The directories found are added to
- 'runtimepath'.
+:packl[oadall][!] Load all packages in the "start" directory under each
+ entry in 'packpath'.
+
+ First all the directories found are added to
+ 'runtimepath', then the plugins found in the
+ directories are sourced. This allows for a plugin to
+ depend on something of another plugin, e.g. an
+ "autoload" directory. See |packload-two-steps| for
+ how this can be useful.
+
This is normally done automatically during startup,
after loading your .vimrc file. With this command it
can be done earlier.
+
Packages will be loaded only once. After this command
it won't happen again. When the optional ! is added
this command will load packages even when done before.
+
An error only causes sourcing the script where it
happens to be aborted, further plugins will be loaded.
See |packages|.
@@ -471,8 +483,9 @@ You would now have these files under ~/.vim:
pack/foo/opt/foodebug/plugin/debugger.vim

When Vim starts up, after processing your .vimrc, it scans all directories in
-'packpath' for plugins under the "pack/*/start" directory and loads them. The
-directory is added to 'runtimepath'.
+'packpath' for plugins under the "pack/*/start" directory. First all those
+directories are added to 'runtimepath'. Then all the plugins are loaded.
+See |packload-two-steps| for how these two steps can be useful.

In the example Vim will find "pack/foo/start/foobar/plugin/foo.vim" and adds
"~/.vim/pack/foo/start/foobar" to 'runtimepath'.
@@ -599,6 +612,23 @@ the command after changing the plugin help: >
:helptags path/start/foobar/doc
:helptags path/opt/fooextra/doc

+
+Dependencies between plugins ~
+ *packload-two-steps*
+Suppose you have a two plugins that depend on the same functionality. You can
+put the common functionality in an autoload directory, so that it will be
+found automatically. Your package would have these files:
+
+ pack/foo/start/one/plugin/one.vim >
+ call foolib#getit()
+< pack/foo/start/two/plugin/two.vim >
+ call foolib#getit()
+< pack/foo/start/lib/autoload/foolib.vim >
+ func foolib#getit()
+
+This works, because loading packages will first add all found directories to
+'runtimepath' before sourcing the plugins.
+
==============================================================================
7. Debugging scripts *debug-scripts*

diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index d2c44b9..050afcd 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt* For Vim version 7.4. Last change: 2016 Mar 26
+*starting.txt* For Vim version 7.4. Last change: 2016 Apr 05


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -865,9 +865,10 @@ accordingly. Vim proceeds in this order:
commands from the command line have not been executed yet. You can
use "--cmd 'set noloadplugins'" |--cmd|.

- Plugin packs are loaded. These are plugins, as above, but found in
- 'packpath' "start" directories. Every plugin directory found is added
- in 'runtimepath'. See |packages|.
+ Packages are loaded. These are plugins, as above, but found in the
+ "start" directory of each entry in 'packpath'. Every plugin directory
+ found is added in 'runtimepath' and then the plugins are sourced. See
+ |packages|.

5. Set 'shellpipe' and 'shellredir'
The 'shellpipe' and 'shellredir' options are set according to the
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index f635111..ab5c083 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.4. Last change: 2016 Mar 12
+*syntax.txt* For Vim version 7.4. Last change: 2016 Apr 10


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -941,26 +941,27 @@ To disable them use ":unlet". Example: >
:unlet c_comment_strings

Variable Highlight ~
-c_gnu GNU gcc specific items
-c_comment_strings strings and numbers inside a comment
-c_space_errors trailing white space and spaces before a <Tab>
-c_no_trail_space_error ... but no trailing spaces
-c_no_tab_space_error ... but no spaces before a <Tab>
-c_no_bracket_error don't highlight {}; inside [] as errors
-c_no_curly_error don't highlight {}; inside [] and () as errors;
+*c_gnu* GNU gcc specific items
+*c_comment_strings* strings and numbers inside a comment
+*c_space_errors* trailing white space and spaces before a <Tab>
+*c_no_trail_space_error* ... but no trailing spaces
+*c_no_tab_space_error* ... but no spaces before a <Tab>
+*c_no_bracket_error* don't highlight {}; inside [] as errors
+*c_no_curly_error* don't highlight {}; inside [] and () as errors;
except { and } in first column
-c_curly_error highlight a missing }; this forces syncing from the
+*c_curly_error* highlight a missing }; this forces syncing from the
start of the file, can be slow
-c_no_ansi don't do standard ANSI types and constants
-c_ansi_typedefs ... but do standard ANSI types
-c_ansi_constants ... but do standard ANSI constants
-c_no_utf don't highlight \u and \U in strings
-c_syntax_for_h for *.h files use C syntax instead of C++ and use objc
+*c_no_ansi* don't do standard ANSI types and constants
+*c_ansi_typedefs* ... but do standard ANSI types
+*c_ansi_constants* ... but do standard ANSI constants
+*c_no_utf* don't highlight \u and \U in strings
+*c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc
syntax instead of objcpp
-c_no_if0 don't highlight "#if 0" blocks as comments
-c_no_cformat don't highlight %-formats in strings
-c_no_c99 don't highlight C99 standard items
-c_no_c11 don't highlight C11 standard items
+*c_no_if0* don't highlight "#if 0" blocks as comments
+*c_no_cformat* don't highlight %-formats in strings
+*c_no_c99* don't highlight C99 standard items
+*c_no_c11* don't highlight C11 standard items
+*c_no_bsd* don't highlight BSD specific types

When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will
become a fold. If you don't want comments to become a fold use: >
@@ -5047,6 +5048,9 @@ defaults back: >

:syntax reset

+It is a bit of a wrong name, since it does not reset any syntax items, it only
+affects the highlighting.
+
This doesn't change the colors for the 'highlight' option.

Note that the syntax colors that you set in your vimrc file will also be reset
diff --git a/runtime/doc/tags b/runtime/doc/tags
index a11cf6c..ec0e580 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -538,6 +538,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'noed' options.txt /*'noed'*
'noedcompatible' options.txt /*'noedcompatible'*
'noek' options.txt /*'noek'*
+'noemo' options.txt /*'noemo'*
+'noemoji' options.txt /*'noemoji'*
'noendofline' options.txt /*'noendofline'*
'noeol' options.txt /*'noeol'*
'noequalalways' options.txt /*'noequalalways'*
@@ -1867,7 +1869,6 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:CompilerSet usr_41.txt /*:CompilerSet*
:DiffOrig diff.txt /*:DiffOrig*
:DoMatchParen pi_paren.txt /*:DoMatchParen*
-:ELP pi_logipat.txt /*:ELP*
:Explore pi_netrw.txt /*:Explore*
:GLVS pi_getscript.txt /*:GLVS*
:GetLatestVimScripts_dat pi_getscript.txt /*:GetLatestVimScripts_dat*
@@ -1876,6 +1877,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:GnatTags ft_ada.txt /*:GnatTags*
:Hexplore pi_netrw.txt /*:Hexplore*
:LP pi_logipat.txt /*:LP*
+:LPE pi_logipat.txt /*:LPE*
:LPF pi_logipat.txt /*:LPF*
:Lexplore pi_netrw.txt /*:Lexplore*
:LogiPat pi_logipat.txt /*:LogiPat*
@@ -4502,6 +4504,7 @@ G motion.txt /*G*
GNOME gui_x11.txt /*GNOME*
GTK gui_x11.txt /*GTK*
GTK+ gui_x11.txt /*GTK+*
+GTK3 gui_x11.txt /*GTK3*
GUI gui.txt /*GUI*
GUI-X11 gui_x11.txt /*GUI-X11*
GUIEnter autocmd.txt /*GUIEnter*
@@ -4952,6 +4955,8 @@ assert_exception() eval.txt /*assert_exception()*
assert_fails() eval.txt /*assert_fails()*
assert_false() eval.txt /*assert_false()*
assert_match() eval.txt /*assert_match()*
+assert_notequal() eval.txt /*assert_notequal()*
+assert_notmatch() eval.txt /*assert_notmatch()*
assert_true() eval.txt /*assert_true()*
at motion.txt /*at*
atan() eval.txt /*atan()*
@@ -5073,6 +5078,7 @@ bufwinnr() eval.txt /*bufwinnr()*
bug-fixes-5 version5.txt /*bug-fixes-5*
bug-fixes-6 version6.txt /*bug-fixes-6*
bug-fixes-7 version7.txt /*bug-fixes-7*
+bug-fixes-8 version8.txt /*bug-fixes-8*
bug-reports intro.txt /*bug-reports*
bugreport.vim intro.txt /*bugreport.vim*
bugs intro.txt /*bugs*
@@ -5166,7 +5172,25 @@ c_Insert cmdline.txt /*c_Insert*
c_Left cmdline.txt /*c_Left*
c_Right cmdline.txt /*c_Right*
c_Up cmdline.txt /*c_Up*
+c_ansi_constants syntax.txt /*c_ansi_constants*
+c_ansi_typedefs syntax.txt /*c_ansi_typedefs*
+c_comment_strings syntax.txt /*c_comment_strings*
+c_curly_error syntax.txt /*c_curly_error*
c_digraph cmdline.txt /*c_digraph*
+c_gnu syntax.txt /*c_gnu*
+c_no_ansi syntax.txt /*c_no_ansi*
+c_no_bracket_error syntax.txt /*c_no_bracket_error*
+c_no_bsd syntax.txt /*c_no_bsd*
+c_no_c11 syntax.txt /*c_no_c11*
+c_no_c99 syntax.txt /*c_no_c99*
+c_no_cformat syntax.txt /*c_no_cformat*
+c_no_curly_error syntax.txt /*c_no_curly_error*
+c_no_if0 syntax.txt /*c_no_if0*
+c_no_tab_space_error syntax.txt /*c_no_tab_space_error*
+c_no_trail_space_error syntax.txt /*c_no_trail_space_error*
+c_no_utf syntax.txt /*c_no_utf*
+c_space_errors syntax.txt /*c_space_errors*
+c_syntax_for_h syntax.txt /*c_syntax_for_h*
c_wildchar cmdline.txt /*c_wildchar*
call() eval.txt /*call()*
carriage-return intro.txt /*carriage-return*
@@ -5327,6 +5351,7 @@ compatible-default starting.txt /*compatible-default*
compile-changes-5 version5.txt /*compile-changes-5*
compile-changes-6 version6.txt /*compile-changes-6*
compile-changes-7 version7.txt /*compile-changes-7*
+compile-changes-8 version8.txt /*compile-changes-8*
compiler-compaqada ft_ada.txt /*compiler-compaqada*
compiler-decada ft_ada.txt /*compiler-decada*
compiler-gcc quickfix.txt /*compiler-gcc*
@@ -6783,6 +6808,7 @@ improved-viminfo version5.txt /*improved-viminfo*
improvements-5 version5.txt /*improvements-5*
improvements-6 version6.txt /*improvements-6*
improvements-7 version7.txt /*improvements-7*
+improvements-8 version8.txt /*improvements-8*
in_bot channel.txt /*in_bot*
in_buf channel.txt /*in_buf*
in_mode channel.txt /*in_mode*
@@ -6795,6 +6821,7 @@ incomp-small-6 version6.txt /*incomp-small-6*
incompatible-5 version5.txt /*incompatible-5*
incompatible-6 version6.txt /*incompatible-6*
incompatible-7 version7.txt /*incompatible-7*
+incompatible-8 version8.txt /*incompatible-8*
indent() eval.txt /*indent()*
indent-expression indent.txt /*indent-expression*
indent.txt indent.txt /*indent.txt*
@@ -6988,18 +7015,19 @@ location-list quickfix.txt /*location-list*
location-list-window quickfix.txt /*location-list-window*
log() eval.txt /*log()*
log10() eval.txt /*log10()*
-logipat pi_logipat.txt /*logipat*
-logipat-arg pi_logipat.txt /*logipat-arg*
-logipat-caveat pi_logipat.txt /*logipat-caveat*
-logipat-contents pi_logipat.txt /*logipat-contents*
-logipat-copyright pi_logipat.txt /*logipat-copyright*
-logipat-examples pi_logipat.txt /*logipat-examples*
-logipat-history pi_logipat.txt /*logipat-history*
-logipat-input pi_logipat.txt /*logipat-input*
-logipat-man pi_logipat.txt /*logipat-man*
-logipat-manual pi_logipat.txt /*logipat-manual*
-logipat-operators pi_logipat.txt /*logipat-operators*
-logipat-pattern pi_logipat.txt /*logipat-pattern*
+logiPat pi_logipat.txt /*logiPat*
+logiPat-arg pi_logipat.txt /*logiPat-arg*
+logiPat-caveat pi_logipat.txt /*logiPat-caveat*
+logiPat-contents pi_logipat.txt /*logiPat-contents*
+logiPat-copyright pi_logipat.txt /*logiPat-copyright*
+logiPat-examples pi_logipat.txt /*logiPat-examples*
+logiPat-history pi_logipat.txt /*logiPat-history*
+logiPat-input pi_logipat.txt /*logiPat-input*
+logiPat-man pi_logipat.txt /*logiPat-man*
+logiPat-manual pi_logipat.txt /*logiPat-manual*
+logiPat-operators pi_logipat.txt /*logiPat-operators*
+logiPat-pattern pi_logipat.txt /*logiPat-pattern*
+logiPat.txt pi_logipat.txt /*logiPat.txt*
long-lines version5.txt /*long-lines*
love intro.txt /*love*
lowercase change.txt /*lowercase*
@@ -7452,6 +7480,7 @@ network pi_netrw.txt /*network*
new-5 version5.txt /*new-5*
new-6 version6.txt /*new-6*
new-7 version7.txt /*new-7*
+new-8 version8.txt /*new-8*
new-GTK-GUI version5.txt /*new-GTK-GUI*
new-MzScheme version7.txt /*new-MzScheme*
new-Select-mode version5.txt /*new-Select-mode*
@@ -7484,6 +7513,7 @@ new-highlighting version5.txt /*new-highlighting*
new-indent-flex version6.txt /*new-indent-flex*
new-items-6 version6.txt /*new-items-6*
new-items-7 version7.txt /*new-items-7*
+new-items-8 version8.txt /*new-items-8*
new-line-continuation version5.txt /*new-line-continuation*
new-location-list version7.txt /*new-location-list*
new-lua version7.txt /*new-lua*
@@ -7526,6 +7556,7 @@ new-user-manual version6.txt /*new-user-manual*
new-utf-8 version6.txt /*new-utf-8*
new-vertsplit version6.txt /*new-vertsplit*
new-vim-script version7.txt /*new-vim-script*
+new-vim-script-8 version8.txt /*new-vim-script-8*
new-vim-server version6.txt /*new-vim-server*
new-vimgrep version7.txt /*new-vimgrep*
new-virtedit version6.txt /*new-virtedit*
@@ -7611,6 +7642,7 @@ p change.txt /*p*
pack-add repeat.txt /*pack-add*
package-create repeat.txt /*package-create*
packages repeat.txt /*packages*
+packload-two-steps repeat.txt /*packload-two-steps*
page-down intro.txt /*page-down*
page-up intro.txt /*page-up*
page_down intro.txt /*page_down*
@@ -7619,6 +7651,7 @@ pager message.txt /*pager*
papp.vim syntax.txt /*papp.vim*
paragraph motion.txt /*paragraph*
pascal.vim syntax.txt /*pascal.vim*
+patches-8 version8.txt /*patches-8*
pathshorten() eval.txt /*pathshorten()*
pattern pattern.txt /*pattern*
pattern-atoms pattern.txt /*pattern-atoms*
@@ -7670,7 +7703,6 @@ php3.vim syntax.txt /*php3.vim*
phtml.vim syntax.txt /*phtml.vim*
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
-pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
pi_paren.txt pi_paren.txt /*pi_paren.txt*
pi_spec.txt pi_spec.txt /*pi_spec.txt*
@@ -7871,6 +7903,7 @@ registers change.txt /*registers*
regular-expression pattern.txt /*regular-expression*
reload editing.txt /*reload*
reltime() eval.txt /*reltime()*
+reltimefloat() eval.txt /*reltimefloat()*
reltimestr() eval.txt /*reltimestr()*
remote.txt remote.txt /*remote.txt*
remote_expr() eval.txt /*remote_expr()*
@@ -8260,6 +8293,7 @@ sub-replace-special change.txt /*sub-replace-special*
sublist eval.txt /*sublist*
submatch() eval.txt /*submatch()*
subscribe-maillist intro.txt /*subscribe-maillist*
+subscript eval.txt /*subscript*
substitute() eval.txt /*substitute()*
substitute-CR version6.txt /*substitute-CR*
suffixes cmdline.txt /*suffixes*
@@ -8919,6 +8953,7 @@ version-7.1 version7.txt /*version-7.1*
version-7.2 version7.txt /*version-7.2*
version-7.3 version7.txt /*version-7.3*
version-7.4 version7.txt /*version-7.4*
+version-8.0 version8.txt /*version-8.0*
version-variable eval.txt /*version-variable*
version4.txt version4.txt /*version4.txt*
version5.txt version5.txt /*version5.txt*
@@ -8929,6 +8964,8 @@ version7.2 version7.txt /*version7.2*
version7.3 version7.txt /*version7.3*
version7.4 version7.txt /*version7.4*
version7.txt version7.txt /*version7.txt*
+version8.0 version8.txt /*version8.0*
+version8.txt version8.txt /*version8.txt*
vi intro.txt /*vi*
vi-differences vi_diff.txt /*vi-differences*
vi: options.txt /*vi:*
@@ -8937,6 +8974,8 @@ view starting.txt /*view*
view-diffs diff.txt /*view-diffs*
view-file starting.txt /*view-file*
views-sessions starting.txt /*views-sessions*
+vim-7.4 version7.txt /*vim-7.4*
+vim-8 version8.txt /*vim-8*
vim-additions vi_diff.txt /*vim-additions*
vim-announce intro.txt /*vim-announce*
vim-arguments starting.txt /*vim-arguments*
@@ -8950,6 +8989,7 @@ vim-script-intro usr_41.txt /*vim-script-intro*
vim-variable eval.txt /*vim-variable*
vim.vim syntax.txt /*vim.vim*
vim7 version7.txt /*vim7*
+vim8 version8.txt /*vim8*
vim: options.txt /*vim:*
vim_did_enter-variable eval.txt /*vim_did_enter-variable*
vim_starting eval.txt /*vim_starting*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index e9a6d91..ff359b1 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.4. Last change: 2016 Mar 29
+*todo.txt* For Vim version 7.4. Last change: 2016 Apr 11


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -27,14 +27,31 @@ Priority classification:
See |develop.txt| for development plans. You can vote for which items should
be worked on, but only if you sponsor Vim development. See |sponsor|.

-Issues can also be entered online: http://code.google.com/p/vim/issues/list
+Issues can also be entered online: https://github.com/vim/vim/issues
Updates will be forwarded to the vim_dev maillist. Issues entered there will
not be repeated below, unless there is extra information.

*known-bugs*
-------------------- Known bugs and current work -----------------------

-Using free memory. (Dominique, 2016 Mar 27)
+Crash in garbagecollect() after starting a job. (Yasuhiro Matsumoto)
+ :let g:a = job_start(['ls'])
+ :call garbagecollect()
+-> Need to find a way to call garbagecollect() in a test.
+
+Channel closes unexpectedly. (Christian Robinson, 2016 Apr 10)
+Log file later.
+Remarks from Kazunobu Kuriyama. Fix from Hirohito, suggested by Ozaki Kiichi.
+
+When test_partial start_job() has a non-existing command memory leaks.
+
+Vim 8 features to mention:
+* TabNew, TabNewEntered and TabClosed autocommand events.
+
+Also keep a list of loaded plugins, skip when encountered again?
+
+Memory leak in test49
+Memory leak in test_alot, with matchstrpos()

+channel:
- When a message in the queue but there is no callback, drop it after a while?
@@ -50,23 +67,17 @@ Later
- job_start(): run job in a newly opened terminal.
With xterm could use -S{pty}.

-Partial:
-- Maybe we also need VAR_PARTIAL support in if_mzsch.
+Test for try/catch in 'tabline'. #746, Haya, 2016 Apr 10.

Make it so that the window ID can be used where currently a window nr is used

-Patch to add "q" item to guifont. #720, Kim Brouer, 2016 Mar 29
-Better patch from Yasuhiro Matsumoto, 2016 Jan 4.
-
Patch to make tag jump work on function({expr}). (Hirohito Higashi, 2016 Mar
25)

-Allow for an empty dictionary key?
-
Patch to improve I/O for Perl. (Damien, 2016 Jan 9, update Jan 22 2nd one)

-Patch to fix ml_get error. (Alexander Freiherr von Buddenbrock, 2016 Mar 4,
-#676)
+Add strgetchar(): get a character by index from a string.
+ using [] is a byte index.

Regexp problems:
- The regexp engines are not reentrant, causing havoc when interrupted by a
@@ -89,6 +100,7 @@ Regexp problems:
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
+- \%'[ does not work. '%'] does work. (Masaaki Nakamura, 2016 Apr 4)
- Bug relating to back references. (Ingo Karkat, 2014 Jul 24)
- New RE does not give an error for empty group: "\(\)\{2}" (Dominique Pelle,
2015 Feb 7)
@@ -114,21 +126,31 @@ Using freed memory in quickfix code. (Dominique, 2016 Mar 21)

Patch 7.4.1401 caused autochdir not to work on startup. (Rob Hoelz, #704)

+Patch to support partions for Python, #734. Nikolai Pavlov, 2017 Apr 6
+
Patch to fix that folds close with autocomplete. #643
Christian Brabandt, 2016 Feb 18.

Also include update_curswant() fix for getcurpos(). (Christian Brabandt, 2016
Feb 9)

+When cross-compiling skip generating the tags file (and moving it out of the
+way). (Christian Neukirchen, 2016 Apr 7) #740
+
Patch to list some messages and clear messages. (Yasuhiro Matsumoto, 2016 Mar
12)

Patch to fix escaping special characters for delete(). (tc-0, 2016 Mar 20,
#700) Test fails on MS-Windows.

+Patch to have complete() not set 'modified'. (Shougo, 2016 Apr 9, #745)
+
Patch to put undo options together in undo window.
(Gary Johnson, 2016 Jan 28)

+Still problems with 'emoji'. See issue #721. Patch 7.4.1697 half-fixes it.
+Avoid PLAN_WRITE in windgoto() ?
+
Patch to have better check for {action} argument of setqflist().
Nikolai Pavlov, Feb 25, #661. Can be even more strict.
Also see patch from Hirohito Higash, Feb 25.
@@ -141,6 +163,11 @@ Patch for test86 and test87. (Roland Puntaier, #622)

Cannot delete a file with square brackets with delete(). (#696)

+Patch on issue #728 by Christian Brabandt, 2016 Apr 7. Update with test: Apr 8.
+Might be related to:
+Test 44 fails when [[=A=]] is changed to [[=À=]]. Caused by getcmdline() not
+handling the 0x80 as a second byte correctly? (Dominique Pelle, 2015 Jun 10)
+
Patch to add 'topbot' to 'belloff' option. (Coot, 2016 Mar 18, #695)

Patch to make matchit work better, respect 'matchpairs'. (Ken Takata, 2016 Mar
@@ -164,7 +191,13 @@ Patches from Ken Takata might help (2014 Apr 17)
Update 2016 Mar 28. Can include all parts into one dist patch.

Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
-Update 2016 Mar 28.
+Update 2016 Apr 4.
+
+Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
+Updated 2016 Feb 10
+
+Patch to improve indenting for C++ constructor with initializer list.
+(Hirohito Higashi, 2016 Mar 31)

After 7.5 is released:
- Drop support for older MS-Windows systems, before XP.
@@ -193,6 +226,8 @@ work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)

Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)

+Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
+
jsonencode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
What if there is an invalid character?

@@ -224,18 +259,22 @@ Access to uninitialized memory in match_backref() regexp_nda.c:4882
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)

+7 Add a watchpoint in the debug mode: An expression that breaks execution
+ when evaluating to non-zero. Add the "watchadd expr" command, stop when
+ the value of the expression changes. ":watchdel" deletes an item,
+ ":watchlist" lists the items. (Charles Campbell)
+Patch by Christian Brabandt, 2016 Feb 1.
+
+Patch to discard remainder of long error messages in quickfix, avoid using
+them as separate messages. (Anton Lindqvist, 2016 Apr 9)
+
Patch to avoid redrawing tabline when the popup menu is visible.
(Christian Brabandt, 2016 Jan 28)

Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)

Add value "smart" to 'tagcase': ignore case when tag is all lower case.
-
-7 Add a watchpoint in the debug mode: An expression that breaks execution
- when evaluating to non-zero. Add the "watchadd expr" command, stop when
- the value of the expression changes. ":watchdel" deletes an item,
- ":watchlist" lists the items. (Charles Campbell)
-Patch by Christian Brabandt, 2016 Feb 1.
+Patch from Christian Brabandt, 2016 Mar 30, #712.

Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
@@ -311,7 +350,7 @@ Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.

Patch to add filtering of the quickfix list. (Yegappan Lakshmanan, 2016 Mar
-13, last version) Update Mar 21.
+13, last version) Update Mar 21., Apr 2.

Can we cache the syntax attributes, so that updates for 'relativenumber' and
'cursorline'/'cursorcolumn' are a lot faster?
@@ -324,7 +363,7 @@ Use v:none. var == v:none

Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
24) Also need a way to get the global arg list? Update later on Jan 24
-Update Mar 5.
+Update Mar 5. Update Apr 7.

To support Thai (and other languages) word boundaries, include the ICU
library: http://userguide.icu-project.org/boundaryanalysis
@@ -332,9 +371,6 @@ library: http://userguide.icu-project.org/boundaryanalysis
When complete() first argument is before where insert started and 'backspace'
is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19)

-Test 44 fails when [[=A=]] is changed to [[=À=]]. Caused by getcmdline() not
-handling the 0x80 as a second byte correctly? (Dominique Pelle, 2015 Jun 10)
-
Patch to use two highlight groups for relative numbers. (Shaun Brady, 2016 Jan
30)

@@ -369,8 +405,8 @@ Crash in :cnext on MS-Windows. (Ben Fritz, 2015 Oct 27)
When using --remote-tab on MS-Windows 'encoding' hasn't been initialized yet,
the file name ends up encoded wrong. (Raul Coronado, 2015 Dec 21)

-Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
-26, update 2013 Dec 14, another 2014 Nov 22)
+Patch to add GUI colors to the terminal, when 'guicolors' is set. (ZyX, 2013
+Jan 26, update 2013 Dec 14, another 2014 Nov 22)

Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
Sep 10)
@@ -379,7 +415,7 @@ Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
Needs a different check for CLEARTYPE_QUALITY.
Problem mentioned by Christian Brabandt, 2016 Jan 4.

-Example in editing.txt uses $HOME with the expectating that it ends in a
+Example in editing.txt uses $HOME with the expectation that it ends in a
slash. For me it does, but perhaps not for everybody. Add a function that
inserts a slash when needed? pathconcat(dir, path) (Thilo Six, 2015 Aug 12)

@@ -404,6 +440,7 @@ Is this the right solution? Need to cleanup langmap behavior:
covered by the above change.
So that replaying the register doesn't use keymap/langmap and still does the
same thing. Remarks on issue 543 (Roland Puntaier).
+Also see #737: langmap not applied to replaying recording.

Patch to add grepfile(). (Scott Prager, 2015 May 26)
Work in progress.
@@ -539,9 +576,6 @@ Jun 8)
Bug: Autocompleting ":tag/pat" replaces "/pat" with a match but does not
insert a space. (Micha Mos, 2014 Nov 7)

-Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
-Updated 2016 Feb 10
-
Patch to add argument to :cquit. (Thinca, 2014 Oct 12)

No error for missing endwhile. (ZyX, 2014 Mar 20)
@@ -781,6 +815,9 @@ May 17: with winlist() and tabpagelist().
May 19: with local variables.
May 28: with options

+Patch to add getbufinfo(), gettabinfo() and getwininfo(). (Yegappan
+Lakshmanan, 2016 Apr 2016)
+
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
28) With tests: Oct 9.

diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 4ce4c23..8bbc29d 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 7.4. Last change: 2016 Mar 27
+*usr_41.txt* For Vim version 7.4. Last change: 2016 Apr 12

VIM USER MANUAL - by Bram Moolenaar

@@ -769,6 +769,7 @@ Date and Time: *date-functions* *time-functions*
strftime() convert time to a string
reltime() get the current or elapsed time accurately
reltimestr() convert reltime() result to a string
+ reltimefloat() convert reltime() result to a Float

*buffer-functions* *window-functions* *arg-functions*
Buffers, windows and the argument list:
@@ -891,7 +892,9 @@ Mappings: *mapping-functions*

Testing: *test-functions*
assert_equal() assert that two expressions values are equal
+ assert_notequal() assert that two expressions values are not equal
assert_match() assert that a pattern matches the value
+ assert_notmatch() assert that a pattern does not match the value
assert_false() assert that an expression is false
assert_true() assert that an expression is true
assert_exception() assert that a command throws an exception
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 90b80ca..0b38263 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.4. Last change: 2014 Aug 29
+*version7.txt* For Vim version 7.4. Last change: 2016 Apr 03


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1681,7 +1681,7 @@ work. Use "LPT1" then.
The GTK font dialog uses a font size zero when the font name doesn't include a
size. Use a default size of 10.

-This example in the documentation didn't work:
+This example in the documentation didn't work: >
:e `=foo . ".c"`
Skip over the expression in `=expr` when looking for comments, |, % and #.

@@ -10158,7 +10158,7 @@ an error. Was caused by patch 7.2.132.
Make the references to features in the help more consistent. (Sylvain Hitier)

==============================================================================
-VERSION 7.4 *version-7.4* *version7.4*
+VERSION 7.4 *version-7.4* *version7.4* *vim-7.4*

This section is about improvements made between version 7.3 and 7.4.

diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
new file mode 100644
index 0000000..8d14a87
--- /dev/null
+++ b/runtime/doc/version8.txt
@@ -0,0 +1,233 @@
+*version8.txt* For Vim version 8.0. Last change: 2016 Apr 12
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+
+NOTE: THIS FILE IS STILL BEING WORKED ON
+
+ *vim8* *vim-8* *version-8.0* *version8.0*
+Welcome to Vim 8! A large number of bugs have been fixed and several
+features have been added. This file mentions all the new items and changes to
+existing features since Vim 7.4. Bug fixes, the patches for Vim 7.4, can be
+found below |vim-7.4|. Use this command to see the version you are using: >
+ :version
+
+See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0.
+See |version4.txt| for differences between Vim 3.x and Vim 4.x.
+See |version5.txt| for differences between Vim 4.x and Vim 5.x.
+See |version6.txt| for differences between Vim 5.x and Vim 6.x.
+See |version7.txt| for differences between Vim 6.x and Vim 7.x.
+
+INCOMPATIBLE CHANGES |incompatible-8|
+
+NEW FEATURES |new-8|
+
+Vim script enhancements |new-vim-script-8|
+
+IMPROVEMENTS |improvements-8|
+
+COMPILE TIME CHANGES |compile-changes-8|
+
+PATCHES |patches-8|
+
+
+==============================================================================
+INCOMPATIBLE CHANGES *incompatible-8*
+
+These changes are incompatible with previous releases. Check this list if you
+run into a problem when upgrading from Vim 7.4 to 8.0.
+
+The support for MS-DOS has been removed.
+
+
+Minor incompatibilities:
+
+For filetype detection: ...
+
+==============================================================================
+NEW FEATURES *new-8*
+
+First a list to the bigger new features. A comprehensive list is below.
+
+
+Asynchronous I/O support, channels ~
+
+Vim can now exchange messages with another process in the background. The
+message are received and handled while Vim is waiting for a character. See
+|channel-demo| for an example, communicating with a Python server.
+
+Closely related to channels is JSON support. JSON is widely supported and can
+easily be used for inter-process communication, allowing for writing a server
+in any language. The functions to use are |json_encode()| and |json_decode()|.
+
+
+Jobs ~
+
+Vim can now start a job, communicate with it and stop it. This is very useful
+to run a process for completion, syntax checking, etc. Channels are used to
+communicate with the job. Jobs can also read from or write to a buffer or a
+file. See |job_start()|.
+
+
+Timers ~
+
+Also asynchronous are timers. They can fire once or repeatedly and invoke a
+function to do any work. For example: >
+ let tempTimer = timer_start(4000, 'CheckTemp')
+This will make call 4 seconds later, like: >
+ call CheckTemp()
+
+
+Partials ~
+
+Vim already had a Funcref, a reference to a function. A partial also refers
+to a function, and additionally binds arguments and/or a dictionary. This is
+especially useful for callbacks on channels and timers. E.g., for the timer
+example above, to pass an argument to the function: >
+ let tempTimer = timer_start(4000, function('CheckTemp', ['out']))
+This will make call 4 seconds later, like: >
+ call CheckTemp('out')
+
+
+Packages ~
+
+Plugins keep growing and more of them are available then ever before. To keep
+the collection of plugins manageable package support has been added. This is
+a convenient way to get one or more plugins, drop them in a directory and
+possibly keep them updated. Vim will load them automatically, or only when
+desired. See |packages|.
+
+
+New style tests ~
+
+This is for Vim developers. So far writing tests for Vim has not been easy.
+Vim 8 adds assert functions and a framework to run tests. This makes it a lot
+simpler to write tests and keep them updated.
+
+These functions have been added:
+ |assert_equal()|
+ |assert_notequal()|
+ |assert_exception()|
+ |assert_fails()|
+ |assert_false()|
+ |assert_match()|
+ |assert_notmatch()|
+ |assert_true()|
+ |alloc_fail()|
+ |disable_char_avail_for_testing()|
+
+
+Window IDs ~
+
+Previously windows could only be accessed by their number. And every time a
+window would open, close or move that number changes. Each window now has a
+unique ID, so that they are easy to find.
+
+
+Wrapping lines with indent ~
+
+The 'breakindent' option has been added to be able to wrap lines without
+changing the amount of indent.
+
+
+Windows: Direct-X support ~
+
+This adds the 'renderoptions' option to allow for switching on Direct-X
+(DirectWrite) support on MS-Windows.
+
+
+GTK+ 3 support ~
+
+GTK+ 2 is getting old, GTK+ 3 is here. Support has been added and it already
+works quite well, mostly just like GTK+ 2.
+
+
+Vim script enhancements *new-vim-script-8*
+-----------------------
+
+In Vim scripts the following types have been added:
+
+ |Special| |v:false|, |v:true|, |v:none| and |v:null|
+ |Channel| connection to another process for asynchronous I/O
+ |Job| process control
+
+Many functions and commands have been added to support the new types.
+
+
+
+Various new items *new-items-8*
+-----------------
+
+Normal mode commands: ~
+
+
+Insert mode commands: ~
+
+
+Options: ~
+
+
+Ex commands: ~
+
+
+Ex command modifiers: ~
+
+
+Ex command arguments: ~
+
+
+New and extended functions: ~
+
+
+
+New Vim variables: ~
+
+|v:vim_did_enter| Set when VimEnter autocommands are triggered
+
+
+New autocommand events: ~
+
+
+
+New highlight groups: ~
+
+
+New items in search patterns: ~
+
+
+New Syntax/Indent/FTplugin files: ~
+
+
+New Keymaps: ~
+
+
+New message translations: ~
+
+
+Others: ~
+
+
+==============================================================================
+IMPROVEMENTS *improvements-8*
+
+The existing blowfish encryption turned out to be much weaker than it was
+supposed to be. The blowfish2 method has been added to fix that. Note that
+this still isn't a state-of-the-art encryption, but good enough for most
+usage. See 'cryptmethod'.
+
+==============================================================================
+COMPILE TIME CHANGES *compile-changes-8*
+
+Dropped the support for MS-DOS. It was too big to fit in memory.
+
+
+==============================================================================
+PATCHES *patches-8* *bug-fixes-8*
+
+The list of patches that got included since 7.4.0. This includes all the new
+features, but does not include runtime file changes (syntax, indent, help,
+etc.)
+
+TODO: INCLUDE PATCH LIST.
+
+ vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/vim.1 b/runtime/doc/vim.1
index e2dcd42..e3c8773 100644
--- a/runtime/doc/vim.1
+++ b/runtime/doc/vim.1
@@ -321,7 +321,7 @@ When N is omitted, open one tab page for each file.
\-R
Read-only mode.
The 'readonly' option will be set.
-You can still edit the buffer, but will be prevented from accidently
+You can still edit the buffer, but will be prevented from accidentally
overwriting a file.
If you do want to overwrite a file, add an exclamation mark to the Ex command,
as in ":w!".
diff --git a/runtime/gvim.desktop b/runtime/gvim.desktop
index 24d7445..aeeddfc 100644
--- a/runtime/gvim.desktop
+++ b/runtime/gvim.desktop
@@ -74,6 +74,7 @@ TryExec=gvim
Exec=gvim -f %F
Terminal=false
Type=Application
+Keywords=Text;editor;
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=true
diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim
index 5927977..d7473a0 100644
--- a/runtime/plugin/vimballPlugin.vim
+++ b/runtime/plugin/vimballPlugin.vim
@@ -1,6 +1,6 @@
" vimballPlugin : construct a file containing both paths and files
-" Author: Charles E. Campbell, Jr.
-" Copyright: (c) 2004-2010 by Charles E. Campbell, Jr.
+" Author: Charles E. Campbell
+" Copyright: (c) 2004-2014 by Charles E. Campbell
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
" No warranty, express or implied.
@@ -16,22 +16,25 @@
if &cp || exists("g:loaded_vimballPlugin")
finish
endif
-let g:loaded_vimballPlugin = "v35"
+let g:loaded_vimballPlugin = "v37"
let s:keepcpo = &cpo
set cpo&vim

" ------------------------------------------------------------------------------
" Public Interface: {{{1
-com! -ra -complete=file -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>)
-com! -na=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>)
-com! -na=0 VimballList call vimball#Vimball(0)
-com! -na=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings()
-au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")
-au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif
-au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
-au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")
-au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif
-au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
+com! -range -complete=file -nargs=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>)
+com! -nargs=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>)
+com! -nargs=0 VimballList call vimball#Vimball(0)
+com! -nargs=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings()
+augroup Vimball
+ au!
+ au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif
+ au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
+ au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
+ au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif
+ au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
+ au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
+augroup END

" =====================================================================
" Restoration And Modelines: {{{1
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index bd63578..3fe3256 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <***@vim.org>
-" Last Change: 2016 Apr 07
+" Last Change: 2016 Apr 10

" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -248,8 +248,10 @@ if !exists("c_no_c99") " ISO C99
syn keyword cType _Bool bool _Complex complex _Imaginary imaginary
syn keyword cType int8_t int16_t int32_t int64_t
syn keyword cType uint8_t uint16_t uint32_t uint64_t
- " These are BSD specific?
- syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t
+ if !exists("c_no_bsd")
+ " These are BSD specific.
+ syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t
+ endif
syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t
syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t
syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t
diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim
index c01ecc1..d7cf747 100644
--- a/runtime/syntax/mysql.vim
+++ b/runtime/syntax/mysql.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: mysql
" Maintainer: Kenneth J. Pronovici <***@ieee.org>
-" Last Change: $LastChangedDate: 2010-04-22 09:48:02 -0500 (Thu, 22 Apr 2010) $
+" Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $
" Filenames: *.mysql
" URL: ftp://cedar-solutions.com/software/mysql.vim
" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23
@@ -18,7 +18,7 @@ endif
syn case ignore

" General keywords which don't fall into other categories
-syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg avg_row_length
+syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg_row_length
syn keyword mysqlKeyword both by
syn keyword mysqlKeyword cascade change character check checksum column columns comment constraint create cross
syn keyword mysqlKeyword current_date current_time current_timestamp
@@ -30,7 +30,7 @@ syn keyword mysqlKeyword global grant grants group
syn keyword mysqlKeyword having heap high_priority hosts hour hour_minute hour_second
syn keyword mysqlKeyword identified ignore index infile inner insert insert_id into isam
syn keyword mysqlKeyword join
-syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long
+syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long
syn keyword mysqlKeyword low_priority
syn keyword mysqlKeyword match max_rows middleint min_rows minute minute_second modify month myisam
syn keyword mysqlKeyword natural no
@@ -64,6 +64,9 @@ syn match mysqlNumber "\<0x[abcdefABCDEF0-9]*\>"
" User variables
syn match mysqlVariable "@\a*[A-Za-z0-9]*\([._]*[A-Za-z0-9]\)*"

+" Escaped column names
+syn match mysqlEscaped "`[^`]*`"
+
" Comments (c-style, mysql-style and modified sql-style)
syn region mysqlComment start="/\*" end="\*/"
syn match mysqlComment "#.*"
@@ -84,14 +87,14 @@ syn sync ccomment mysqlComment
" The second problem is that some of these keywords are included in
" function names. For instance, year() is part of the name of the
" dayofyear() function, and the dec keyword (no parenthesis) is part of
-" the name of the decode() function.
+" the name of the decode() function.

-syn keyword mysqlType tinyint smallint mediumint int integer bigint
-syn keyword mysqlType date datetime time bit bool
+syn keyword mysqlType tinyint smallint mediumint int integer bigint
+syn keyword mysqlType date datetime time bit bool
syn keyword mysqlType tinytext mediumtext longtext text
syn keyword mysqlType tinyblob mediumblob longblob blob
-syn region mysqlType start="float\W" end="."me=s-1
-syn region mysqlType start="float$" end="."me=s-1
+syn region mysqlType start="float\W" end="."me=s-1
+syn region mysqlType start="float$" end="."me=s-1
syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable
syn region mysqlType start="double\W" end="."me=s-1
syn region mysqlType start="double$" end="."me=s-1
@@ -139,12 +142,12 @@ syn region mysqlFlow start="if(" end=")" contains=ALL
"
" I'm leery of just defining keywords for functions, since according to the MySQL manual:
"
-" Function names do not clash with table or column names. For example, ABS is a
-" valid column name. The only restriction is that for a function call, no spaces
-" are allowed between the function name and the `(' that follows it.
+" Function names do not clash with table or column names. For example, ABS is a
+" valid column name. The only restriction is that for a function call, no spaces
+" are allowed between the function name and the `(' that follows it.
"
-" This means that if I want to highlight function names properly, I have to use a
-" region to define them, not just a keyword. This will probably cause the syntax file
+" This means that if I want to highlight function names properly, I have to use a
+" region to define them, not just a keyword. This will probably cause the syntax file
" to load more slowly, but at least it will be 'correct'.

syn region mysqlFunction start="abs(" end=")" contains=ALL
@@ -154,6 +157,7 @@ syn region mysqlFunction start="ascii(" end=")" contains=ALL
syn region mysqlFunction start="asin(" end=")" contains=ALL
syn region mysqlFunction start="atan(" end=")" contains=ALL
syn region mysqlFunction start="atan2(" end=")" contains=ALL
+syn region mysqlFunction start="avg(" end=")" contains=ALL
syn region mysqlFunction start="benchmark(" end=")" contains=ALL
syn region mysqlFunction start="bin(" end=")" contains=ALL
syn region mysqlFunction start="bit_and(" end=")" contains=ALL
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 8b0a91f..6ef5bf0 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <***@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <***@ecmwf.int>
-" Last Change: Mar 12, 2016
-" Version: 146
+" Last Change: Apr 11, 2016
+" Version: 147
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (***@ens.fr)
@@ -539,13 +539,20 @@ endif

" Synchronization: {{{1
" ================
-if !exists("sh_minlines")
- let sh_minlines = 200
+if !exists("g:sh_minlines")
+ let s:sh_minlines = 200
+else
+ let s:sh_minlines= g:sh_minlines
endif
-if !exists("sh_maxlines")
- let sh_maxlines = 2 * sh_minlines
+if !exists("g:sh_maxlines")
+ let s:sh_maxlines = 2*s:sh_minlines
+ if s:sh_maxlines < 25
+ let s:sh_maxlines= 25
+ endif
+else
+ let s:sh_maxlines= g:sh_maxlines
endif
-exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines
+exec "syn sync minlines=" . s:sh_minlines . " maxlines=" . s:sh_maxlines
syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>"
syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>"
syn sync match shDoSync grouphere shDo "\<do\>"
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 5af5882..d6d5dd8 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <***@ScampbellPfamily.AbizM>
-" Last Change: Mar 07, 2016
-" Version: 93
+" Last Change: Apr 11, 2016
+" Version: 94
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -83,10 +83,14 @@ else
let s:tex_conceal= g:tex_conceal
endif
if !exists("g:tex_superscripts")
- let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
+ let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
+else
+ let s:tex_superscripts= g:tex_superscripts
endif
if !exists("g:tex_subscripts")
- let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
+ let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
+else
+ let s:tex_subscripts= g:tex_subscripts
endif

" Determine whether or not to use "*.sty" mode {{{1
@@ -1049,7 +1053,7 @@ if has("conceal") && &enc == 'utf-8'
endif
" s:SuperSub:
fun! s:SuperSub(group,leader,pat,cchar)
- if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# g:tex_superscripts) || (a:leader == '_' && a:pat =~# g:tex_subscripts)
+ if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# s:tex_superscripts) || (a:leader == '_' && a:pat =~# s:tex_subscripts)
" call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">")
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index c809f70..d8fed46 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <***@PcampbellAfamily.Mbiz>
-" Last Change: March 29, 2016
-" Version: 7.4-45
+" Last Change: April 12, 2016
+" Version: 7.4-47
" Automatically generated keyword lists: {{{1

" Quit when a syntax file was already loaded {{{2
@@ -18,35 +18,34 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell

" regular vim commands {{{2
-syn keyword vimCommand contained a argd argu[ment] bf[irst] brea[k] buf cabc[lear] cc cfdo changes clo[se] cnf comc[lear] cpf[ile] cstag debugg[reedy] deletel dell diffg[et] dif[fupdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nore on[ly] packl perld[o] pre[serve] promptf[ind] ptl[ast] p [...]
-syn keyword vimCommand contained ab argd[elete] as[cii] bl[ast] breaka[dd] bufdo cad[dbuffer] ccl[ose] cf[ile] chd[ir] cmapc[lear] cNf comp[iler] cp[revious] cuna[bbrev] del deletep delm[arks] diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] nos[wapfile] o[pen] packloadall po[p] pr [...]
-syn keyword vimCommand contained abc[lear] argdo au bm[odified] breakd[el] b[uffer] cadde[xpr] cd cfir[st] che[ckpath] cn cnf[ile] con cq[uit] cw[indow] delc[ommand] deletl delp diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa nu[mber] opt[ions] pc[lose] popu p[rint] ps[earch] [...]
-syn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bn[ext] breakl[ist] buffers caddf[ile] cdo cgetb[uffer] checkt[ime] cN cNf[ile] conf[irm] cr[ewind] d delel deletp dep diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd o ownsyntax pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rubyd[o] [...]
-syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bN[ext] br[ewind] bun[load] cal[l] ce[nter] cgete[xpr] cl cnew[er] col[der] con[tinue] cs de delep delf di diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] ol[dfiles] p ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 r [...]
-syn keyword vimCommand contained ar argl[ocal] bd[elete] bo[tright] bro[wse] bw[ipeout] cat[ch] cex[pr] cg[etfile] cla[st] cn[ext] colo[rscheme] cope[n] cscope debug d[elete] delf[unction] dif difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nor omapc[lear] pa[ckadd] pe[rl] pr prof[ile] ptj[ [...]
-syn keyword vimCommand contained arga[dd] ar[gs] bel[owright] bp[revious] bu c cb[uffer] cf c[hange] cl[ist] cN[ext] com co[py]
+syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] ccl[ose] cfdo chd[ir] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k keepp[atterns] lad[dexpr] later lcs lex[pr] lgetb[uffer] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pc[lose] popu[p] pr [...]
+syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] cd cfir[st] che[ckpath] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lN[ext] laddb[uffer] lb[uffer] lcscope lf[ile] lgete[xpr] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] pe[rl] pp[op] [...]
+syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cdo cg[etfile] checkt[ime] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa lNf[ile] laddf[ile] lc[d] ld[o] lfdo lgr[ep] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] ped[it] pre[ser [...]
+syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] ce[nter] cgetb[uffer] cl[ist] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt l[ist] lan[guage] lch[dir] le[ft] lfir[st] lgrepa[dd] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl perld[o] prev[io [...]
+syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] cex[pr] cgete[xpr] cla[st] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] la[st] lat lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] packloadall po[p] [...]
+syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cc cf[ile] changes clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fix[del] for gui helpg[rep] ia in ju[mps]
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns

" vimOptions are caught only when contained in a vimSet {{{2
-syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmdwinheight com conceallevel cpoptions cscopetag csto debug dict dir eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime revins [...]
-syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cmp comments confirm cpt cscopetagorder csverb deco dictionary directory ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop [...]
-syn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions cms commentstring consk crb cscopeverbose cuc def diff display edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relat [...]
-syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw co compatible conskey cryptmethod cspc cul define diffexpr dy ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescape remap rig [...]
-syn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cocu complete copyindent cscopepathcomp csprg cursorbind delcombine diffopt ea efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph pp print [...]
-syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard cole completefunc cot cscopeprg csqf cursorcolumn dex digraph ead ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh [...]
-syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopequickfix csre cursorline dg dip eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly rest [...]
-syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdheight columns concealcursor cpo cscoperelative cst cwh
+syn keyword vimOption contained acd ambw arshape background ballooneval bg bomb bs cb ch cinoptions cms commentstring copyindent cryptmethod cscopeverbose csverb debug dict dir eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime [...]
+syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh breakat bsdir cc charconvert cinw co compatible cot cscopepathcomp cspc cuc deco dictionary directory ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop [...]
+syn keyword vimOption contained akm antialias autoindent backup bdir bin breakindent bsk ccv ci cinwords cocu complete cp cscopeprg csprg cul def diff display edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relativ [...]
+syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakindentopt bt cd cin clipboard cole completefunc cpo cscopequickfix csqf cursorbind define diffexpr dy ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescap [...]
+syn keyword vimOption contained aleph arab autowrite backupdir belloff bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph p [...]
+syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetag cst cursorline dex digraph ead ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh [...]
+syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopetagorder csto cwh dg dip eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly restorescreen [...]
+syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bo browsedir casemap cfu cino cmp comments confirm

" vimOptions: These are the turn-off setting variants {{{2
-syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobreakindent nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangnoremap nolbr nolisp nolnr nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nop [...]
-syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nobri noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolinebreak nolist noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopas [...]
-syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois
+syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noimdisable noinf noinsertmode nojoinspaces nolangnoremap nolbr nolisp nolnr nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonum [...]
+syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noincsearch noinfercase nois nojs nolazyredraw nolinebreak nolist noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nop [...]
+syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc

" vimOptions: These are the invertible variants {{{2
-syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbreakindent invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangnoremap invlbr invlisp invlnr invlpl invma invmagic invml invmodeline invmodified invm [...]
-syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invbri invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlinebreak invlist invloadplugins invlz invmacatsui invmh invmod invmo [...]
-syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis
+syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invimdisable invinf invinsertmode invjoinspaces invlangnoremap invlbr invlisp invlnr invlpl invma invmagic invml inv [...]
+syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invincsearch invinfercase invis invjs invlazyredraw invlinebreak invlist invloadplugins invlz invmacatsui invmh invmod invmodifiab [...]
+syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc

" termcap codes (which can also be set) {{{2
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve [...]
@@ -60,12 +59,13 @@ syn match vimOption contained "t_&8"
syn match vimOption contained "t_%i"
syn match vimOption contained "t_k;"

-" unsupported settings: these are supported by vi but don't do anything in vim {{{2
-syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
+" unsupported settings: some were supported by vi but don't do anything in vim {{{2
+" others have been dropped along with msdos support
+syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beautify flash graphic hardtabs mesg novice open op optimize redraw slow slowopen sourceany w300 w1200 w9600 hardtabs ht nobioskey nobiosk noconskey noconsk noautoprint nobeautify noflash nographic nohardtabs nomesg nonovice noopen noop nooptimize noredraw noslow noslowopen nosourceany now300 now1200 now9600 w1200 w300 w9600

" AutoCmd Events {{{2
syn case ignore
-syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPo [...]
+syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEnc [...]

" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
@@ -76,10 +76,10 @@ syn match vimHLGroup contained "Conceal"
syn case match

" Function Names {{{2
-syn keyword vimFuncName contained abs and arglistid assert_exception assert_true browsedir bufname byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype empty executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions j [...]
-syn keyword vimFuncName contained acos append argv assert_fails atan bufexists bufnr byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler escape exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join [...]
-syn keyword vimFuncName contained add argc asin assert_false atan2 buflisted bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte lo [...]
-syn keyword vimFuncName contained alloc_fail argidx assert_equal assert_match browse bufloaded byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete disable_char_avail_for_testing eventhandler
+syn keyword vimFuncName contained abs and arglistid assert_exception assert_notequal atan2 buflisted bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eval exists extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions job_s [...]
+syn keyword vimFuncName contained acos append argv assert_fails assert_notmatch browse bufloaded byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete disable_char_avail_for_testing eventhandler exp feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getch [...]
+syn keyword vimFuncName contained add argc asin assert_false assert_true browsedir bufname byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype empty executable expand filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode lib [...]
+syn keyword vimFuncName contained alloc_fail argidx assert_equal assert_match atan bufexists bufnr byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler escape exepath

"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -151,6 +151,13 @@ if exists("g:vimsyntax_noerror")
let g:vimsyn_noerror= g:vimsyntax_noerror
endif

+" Variable options {{{2
+if exists("g:vim_maxlines")
+ let s:vimsyn_maxlines= g:vim_maxlines
+else
+ let s:vimsyn_maxlines= 60
+endif
+
" Numbers {{{2
" =======
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
@@ -759,9 +766,10 @@ if !filereadable(s:mzschemepath)
endif
if (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
unlet! b:current_syntax
- let iskKeep= &isk
+ let s:iskKeep= &isk
exe "syn include @vimMzSchemeScript ".s:mzschemepath
- let &isk= iskKeep
+ let &isk= s:iskKeep
+ unlet s:iskKeep
VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
syn cluster vimFuncBodyList add=vimMzSchemeRegion
@@ -776,11 +784,7 @@ unlet s:mzschemepath
if exists("g:vimsyn_minlines")
exe "syn sync minlines=".g:vimsyn_minlines
endif
-if exists("g:vimsyn_maxlines")
- exe "syn sync maxlines=".g:vimsyn_maxlines
-else
- syn sync maxlines=60
-endif
+exe "syn sync maxlines=".s:vimsyn_maxlines
syn sync linecont "^\s\+\\"
syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"

diff --git a/runtime/vim.desktop b/runtime/vim.desktop
index b6caf7b..d4ab844 100644
--- a/runtime/vim.desktop
+++ b/runtime/vim.desktop
@@ -74,6 +74,7 @@ TryExec=vim
Exec=vim %F
Terminal=true
Type=Application
+Keywords=Text;editor;
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=false
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 3780bb923a688e0051a9a23474eeb38a8acb695a
Author: Bram Moolenaar <***@vim.org>
Date: Tue Apr 12 22:18:53 2016 +0200

patch 7.4.1725
Problem: Compiler errors for non-ANSI compilers.
Solution: Remove // comment. Remove comma at end of enum. (Michael Jarvis)
---
src/eval.c | 4 ++--
src/version.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 0c270b9..a14a721 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7005,7 +7005,7 @@ garbage_collect(void)
#endif

#ifdef FEAT_JOB_CHANNEL
-// abort = abort || set_ref_in_channel(copyID);
+ abort = abort || set_ref_in_channel(copyID);
#endif

if (!abort)
@@ -9472,7 +9472,7 @@ typedef enum
ASSERT_NOTEQUAL,
ASSERT_MATCH,
ASSERT_NOTMATCH,
- ASSERT_OTHER,
+ ASSERT_OTHER
} assert_type_T;

static void prepare_assert_error(garray_T*gap);
diff --git a/src/version.c b/src/version.c
index e422527..5ca0219 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1725,
+/**/
1724,
/**/
1723,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:58 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 700eefe5a4385fd128f5496e3ca384869752376a
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 13 21:14:37 2016 +0200

patch 7.4.1726
Problem: ANSI compiler complains about string length.
Solution: Split long string in two parts. (Michael Jarvis)
---
src/ex_cmds.c | 25 +++++++++++++++----------
src/version.c | 2 ++
2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index b602979..daac3ae 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -7805,21 +7805,26 @@ set_context_in_sign_cmd(expand_T *xp, char_u *arg)
void
ex_smile(exarg_T *eap UNUSED)
{
- static char *code = "\34 \4o\14$\4ox\30 \2o\30$\1ox\25 \2o\36$\1o\11 \1o\1$\3 \2$\1 \1o\1$x\5 \1o\1 \1$\1 \2o\10 \1o\44$\1o\7 \2$\1 \2$\1 \2$\1o\1$x\2 \2o\1 \1$\1 \1$\1 \1\"\1$\6 \1o\11$\4 \15$\4 \11$\1o\7 \3$\1o\2$\1o\1$x\2 \1\"\6$\1o\1$\5 \1o\11$\6 \13$\6 \12$\1o\4 \10$x\4 \7$\4 \13$\6 \13$\6 \27$x\4 \27$\4 \15$\4 \16$\2 \3\"\3$x\5 \1\"\3$\4\"\61$\5 \1\"\3$x\6 \3$\3 \1o\62$\5 \1\"\3$\1ox\5 \1o\2$\1\"\3 \63$\7 \3$\1ox\5 \3$\4 \55$\1\"\1 \1\"\6$\5o\4$\1ox\4 \1o\3$\4o\5$\2 \45$\3 \1o\ [...]
+ static char *code[] = {
+ "\34 \4o\14$\4ox\30 \2o\30$\1ox\25 \2o\36$\1o\11 \1o\1$\3 \2$\1 \1o\1$x\5 \1o\1 \1$\1 \2o\10 \1o\44$\1o\7 \2$\1 \2$\1 \2$\1o\1$x\2 \2o\1 \1$\1 \1$\1 \1\"\1$\6 \1o\11$\4 \15$\4 \11$\1o\7 \3$\1o\2$\1o\1$x\2 \1\"\6$\1o\1$\5 \1o\11$\6 \13$\6 \12$\1o\4 \10$x\4 \7$\4 \13$\6 \13$\6 \27$x\4 \27$\4 \15$\4 \16$\2 \3\"\3$x\5 \1\"\3$\4\"\61$\5 \1\"\3$x\6 \3$\3 \1o\62$\5 \1\"\3$\1ox\5 \1o\2$\1\"\3 \63$\7 \3$\1ox\5 \3$\4 \55$\1\"\1 \1\"\6$",
+ "\5o\4$\1ox\4 \1o\3$\4o\5$\2 \45$\3 \1o\21$x\4 \10$\1\"\4$\3 \42$\5 \4$\10\"x\3 \4\"\7 \4$\4 \1\"\34$\1\"\6 \1o\3$x\16 \1\"\3$\1o\5 \3\"\22$\1\"\2$\1\"\11 \3$x\20 \3$\1o\12 \1\"\2$\2\"\6$\4\"\13 \1o\3$x\21 \4$\1o\40 \1o\3$\1\"x\22 \1\"\4$\1o\6 \1o\6$\1o\1\"\4$\1o\10 \1o\4$x\24 \1\"\5$\2o\5 \2\"\4$\1o\5$\1o\3 \1o\4$\2\"x\27 \2\"\5$\4o\2 \1\"\3$\1o\11$\3\"x\32 \2\"\7$\2o\1 \12$x\42 \4\"\13$x\46 \14$x\47 \12$\1\"x\50 \1\"\3$\4\"x"
+ };
char *p;
int n;
+ int i;

msg_start();
msg_putchar('\n');
- for (p = code; *p != NUL; ++p)
- if (*p == 'x')
- msg_putchar('\n');
- else
- for (n = *p++; n > 0; --n)
- if (*p == 'o' || *p == '$')
- msg_putchar_attr(*p, hl_attr(HLF_L));
- else
- msg_putchar(*p);
+ for (i = 0; i < 2; ++i)
+ for (p = code[i]; *p != NUL; ++p)
+ if (*p == 'x')
+ msg_putchar('\n');
+ else
+ for (n = *p++; n > 0; --n)
+ if (*p == 'o' || *p == '$')
+ msg_putchar_attr(*p, hl_attr(HLF_L));
+ else
+ msg_putchar(*p);
msg_clr_eos();
}

diff --git a/src/version.c b/src/version.c
index 5ca0219..cf7d48c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1726,
+/**/
1725,
/**/
1724,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:59 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit ebf7dfa6f121c82f97d2adca3d45fbaba9ad8f7e
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 12:46:51 2016 +0200

patch 7.4.1727
Problem: Cannot detect a crash in tests when caused by garbagecollect().
Solution: Add garbagecollect_for_testing(). Do not free a job if is still
useful.
---
runtime/doc/eval.txt | 32 ++++++++++++++++--------
src/channel.c | 26 ++++++++++++++------
src/eval.c | 58 ++++++++++++++++++++++++++++++++++++++------
src/getchar.c | 4 +--
src/main.c | 2 +-
src/proto/eval.pro | 4 +--
src/testdir/runtest.vim | 3 +++
src/testdir/test_channel.vim | 12 +++++++--
src/version.c | 2 ++
src/vim.h | 3 ++-
10 files changed, 112 insertions(+), 34 deletions(-)

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 1b4b3b7..93bf3f1 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 Apr 12
+*eval.txt* For Vim version 7.4. Last change: 2016 Apr 14


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -61,9 +61,9 @@ Funcref A reference to a function |Funcref|.

Special |v:false|, |v:true|, |v:none| and |v:null|. *Special*

-Job Used for a job, see |job_start()|. *Job*
+Job Used for a job, see |job_start()|. *Job* *Jobs*

-Channel Used for a channel, see |ch_open()|. *Channel*
+Channel Used for a channel, see |ch_open()|. *Channel* *Channels*

The Number and String types are converted automatically, depending on how they
are used.
@@ -1723,6 +1723,9 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV|
always 95 or bigger). Pc is always zero.
{only when compiled with |+termresponse| feature}

+ *v:testing* *testing-variable*
+v:testing Must be set before using `garbagecollect_for_testing()`.
+
*v:this_session* *this_session-variable*
v:this_session Full filename of the last loaded or saved session file. See
|:mksession|. It is allowed to set this variable. When no
@@ -1905,9 +1908,10 @@ foldlevel( {lnum}) Number fold level at {lnum}
foldtext() String line displayed for closed fold
foldtextresult( {lnum}) String text for closed fold at {lnum}
foreground() Number bring the Vim window to the foreground
-function({name} [, {arglist}] [, {dict}])
+function( {name} [, {arglist}] [, {dict}])
Funcref reference to function {name}
garbagecollect( [{atexit}]) none free memory, breaking cyclic references
+garbagecollect_for_testing() none free memory right now
get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
getbufline( {expr}, {lnum} [, {end}])
@@ -3674,19 +3678,27 @@ function({name} [, {arglist}] [, {dict}])


garbagecollect([{atexit}]) *garbagecollect()*
- Cleanup unused |Lists| and |Dictionaries| that have circular
- references. There is hardly ever a need to invoke this
- function, as it is automatically done when Vim runs out of
- memory or is waiting for the user to press a key after
- 'updatetime'. Items without circular references are always
- freed when they become unused.
+ Cleanup unused |Lists|, |Dictionaries|, |Channels| and |Jobs|
+ that have circular references.
+
+ There is hardly ever a need to invoke this function, as it is
+ automatically done when Vim runs out of memory or is waiting
+ for the user to press a key after 'updatetime'. Items without
+ circular references are always freed when they become unused.
This is useful if you have deleted a very big |List| and/or
|Dictionary| with circular references in a script that runs
for a long time.
+
When the optional {atexit} argument is one, garbage
collection will also be done when exiting Vim, if it wasn't
done before. This is useful when checking for memory leaks.

+garbagecollect_for_testing() *garbagecollect_for_testing()*
+ Like garbagecollect(), but executed right away. This must
+ only be called directly to avoid any structure to exist
+ internally, and |v:testing| must have been set before calling
+ any function.
+
get({list}, {idx} [, {default}]) *get()*
Get item {idx} from |List| {list}. When this item is not
available return {default}. Return zero when {default} is
diff --git a/src/channel.c b/src/channel.c
index 83d057d..72484ec 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -458,8 +458,7 @@ free_unused_channels(int copyID, int mask)
ch_next = ch->ch_next;
if ((ch->ch_copyID & mask) != (copyID & mask))
{
- /* Free the channel and ordinary items it contains, but don't
- * recurse into Lists, Dictionaries etc. */
+ /* Free the channel struct itself. */
channel_free_channel(ch);
}
}
@@ -4006,6 +4005,17 @@ job_free(job_T *job)
}
}

+/*
+ * Return TRUE if the job should not be freed yet. Do not free the job when
+ * it has not ended yet and there is a "stoponexit" flag or an exit callback.
+ */
+ static int
+job_still_useful(job_T *job)
+{
+ return job->jv_status == JOB_STARTED
+ && (job->jv_stoponexit != NULL || job->jv_exit_cb != NULL);
+}
+
void
job_unref(job_T *job)
{
@@ -4013,8 +4023,7 @@ job_unref(job_T *job)
{
/* Do not free the job when it has not ended yet and there is a
* "stoponexit" flag or an exit callback. */
- if (job->jv_status != JOB_STARTED
- || (job->jv_stoponexit == NULL && job->jv_exit_cb == NULL))
+ if (!job_still_useful(job))
{
job_free(job);
}
@@ -4036,7 +4045,8 @@ free_unused_jobs_contents(int copyID, int mask)
job_T *job;

for (job = first_job; job != NULL; job = job->jv_next)
- if ((job->jv_copyID & mask) != (copyID & mask))
+ if ((job->jv_copyID & mask) != (copyID & mask)
+ && !job_still_useful(job))
{
/* Free the channel and ordinary items it contains, but don't
* recurse into Lists, Dictionaries etc. */
@@ -4055,10 +4065,10 @@ free_unused_jobs(int copyID, int mask)
for (job = first_job; job != NULL; job = job_next)
{
job_next = job->jv_next;
- if ((job->jv_copyID & mask) != (copyID & mask))
+ if ((job->jv_copyID & mask) != (copyID & mask)
+ && !job_still_useful(job))
{
- /* Free the channel and ordinary items it contains, but don't
- * recurse into Lists, Dictionaries etc. */
+ /* Free the job struct itself. */
job_free_job(job);
}
}
diff --git a/src/eval.c b/src/eval.c
index a14a721..8658045 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -373,6 +373,7 @@ static struct vimvar
{VV_NAME("null", VAR_SPECIAL), VV_RO},
{VV_NAME("none", VAR_SPECIAL), VV_RO},
{VV_NAME("vim_did_enter", VAR_NUMBER), VV_RO},
+ {VV_NAME("testing", VAR_NUMBER), 0},
};

/* shorthand */
@@ -580,6 +581,7 @@ static void f_foldtextresult(typval_T *argvars, typval_T *rettv);
static void f_foreground(typval_T *argvars, typval_T *rettv);
static void f_function(typval_T *argvars, typval_T *rettv);
static void f_garbagecollect(typval_T *argvars, typval_T *rettv);
+static void f_garbagecollect_for_testing(typval_T *argvars, typval_T *rettv);
static void f_get(typval_T *argvars, typval_T *rettv);
static void f_getbufline(typval_T *argvars, typval_T *rettv);
static void f_getbufvar(typval_T *argvars, typval_T *rettv);
@@ -1029,7 +1031,7 @@ eval_clear(void)
ga_clear(&ga_scripts);

/* unreferenced lists and dicts */
- (void)garbage_collect();
+ (void)garbage_collect(FALSE);

/* functions */
free_all_functions();
@@ -6889,6 +6891,9 @@ get_copyID(void)
return current_copyID;
}

+/* Used by get_func_tv() */
+static garray_T funcargs = GA_EMPTY;
+
/*
* Garbage collection for lists and dictionaries.
*
@@ -6911,10 +6916,11 @@ get_copyID(void)

/*
* Do garbage collection for lists and dicts.
+ * When "testing" is TRUE this is called from garbagecollect_for_testing().
* Return TRUE if some memory was freed.
*/
int
-garbage_collect(void)
+garbage_collect(int testing)
{
int copyID;
int abort = FALSE;
@@ -6928,10 +6934,13 @@ garbage_collect(void)
tabpage_T *tp;
#endif

- /* Only do this once. */
- want_garbage_collect = FALSE;
- may_garbage_collect = FALSE;
- garbage_collect_at_exit = FALSE;
+ if (!testing)
+ {
+ /* Only do this once. */
+ want_garbage_collect = FALSE;
+ may_garbage_collect = FALSE;
+ garbage_collect_at_exit = FALSE;
+ }

/* We advance by two because we add one for items referenced through
* previous_funccal. */
@@ -6989,6 +6998,11 @@ garbage_collect(void)
abort = abort || set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID, NULL);
}

+ /* function call arguments, if v:testing is set. */
+ for (i = 0; i < funcargs.ga_len; ++i)
+ abort = abort || set_ref_in_item(((typval_T **)funcargs.ga_data)[i],
+ copyID, NULL, NULL);
+
/* v: vars */
abort = abort || set_ref_in_ht(&vimvarht, copyID, NULL);

@@ -7034,7 +7048,7 @@ garbage_collect(void)
if (did_free_funccal)
/* When a funccal was freed some more items might be garbage
* collected, so run again. */
- (void)garbage_collect();
+ (void)garbage_collect(testing);
}
else if (p_verbose > 0)
{
@@ -8424,6 +8438,7 @@ static struct fst
{"foreground", 0, 0, f_foreground},
{"function", 1, 3, f_function},
{"garbagecollect", 0, 1, f_garbagecollect},
+ {"garbagecollect_for_testing", 0, 0, f_garbagecollect_for_testing},
{"get", 2, 3, f_get},
{"getbufline", 2, 3, f_getbufline},
{"getbufvar", 2, 3, f_getbufvar},
@@ -8896,8 +8911,26 @@ get_func_tv(
ret = FAIL;

if (ret == OK)
+ {
+ int i = 0;
+
+ if (get_vim_var_nr(VV_TESTING))
+ {
+ /* Prepare for calling garbagecollect_for_testing(), need to know
+ * what variables are used on the call stack. */
+ if (funcargs.ga_itemsize == 0)
+ ga_init2(&funcargs, (int)sizeof(typval_T *), 50);
+ for (i = 0; i < argcount; ++i)
+ if (ga_grow(&funcargs, 1) == OK)
+ ((typval_T **)funcargs.ga_data)[funcargs.ga_len++] =
+ &argvars[i];
+ }
+
ret = call_func(name, len, rettv, argcount, argvars,
firstline, lastline, doesrange, evaluate, partial, selfdict);
+
+ funcargs.ga_len -= i;
+ }
else if (!aborting())
{
if (argcount == MAX_FUNC_ARGS)
@@ -12318,6 +12351,17 @@ f_garbagecollect(typval_T *argvars, typval_T *rettv UNUSED)
}

/*
+ * "garbagecollect_for_testing()" function
+ */
+ static void
+f_garbagecollect_for_testing(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+{
+ /* This is dangerous, any Lists and Dicts used internally may be freed
+ * while still in use. */
+ garbage_collect(TRUE);
+}
+
+/*
* "get()" function
*/
static void
diff --git a/src/getchar.c b/src/getchar.c
index 4a225e1..c771117 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1523,7 +1523,7 @@ before_blocking(void)
updatescript(0);
#ifdef FEAT_EVAL
if (may_garbage_collect)
- garbage_collect();
+ garbage_collect(FALSE);
#endif
}

@@ -1571,7 +1571,7 @@ vgetc(void)
/* Do garbage collection when garbagecollect() was called previously and
* we are now at the toplevel. */
if (may_garbage_collect && want_garbage_collect)
- garbage_collect();
+ garbage_collect(FALSE);
#endif

/*
diff --git a/src/main.c b/src/main.c
index dc7b702..ee37500 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1531,7 +1531,7 @@ getout(int exitval)
#endif
#ifdef FEAT_EVAL
if (garbage_collect_at_exit)
- garbage_collect();
+ garbage_collect(FALSE);
#endif
#if defined(WIN32) && defined(FEAT_MBYTE)
free_cmd_argsW();
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index 38392b9..9fda13c 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -49,7 +49,6 @@ void partial_unref(partial_T *pt);
list_T *list_alloc(void);
int rettv_list_alloc(typval_T *rettv);
void list_unref(list_T *l);
-void list_free_internal(list_T *l);
void list_free(list_T *l);
listitem_T *listitem_alloc(void);
void listitem_free(listitem_T *item);
@@ -66,14 +65,13 @@ int list_insert_tv(list_T *l, typval_T *tv, listitem_T *item);
void list_insert(list_T *l, listitem_T *ni, listitem_T *item);
void vimlist_remove(list_T *l, listitem_T *item, listitem_T *item2);
int get_copyID(void);
-int garbage_collect(void);
+int garbage_collect(int testing);
int set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack);
int set_ref_in_list(list_T *l, int copyID, ht_stack_T **ht_stack);
int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack);
dict_T *dict_alloc(void);
int rettv_dict_alloc(typval_T *rettv);
void dict_unref(dict_T *d);
-void dict_free_internal(dict_T *d);
void dict_free(dict_T *d);
dictitem_T *dictitem_alloc(char_u *key);
void dictitem_free(dictitem_T *item);
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 4d75af3..2b38981 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -60,6 +60,9 @@ let $HOME = '/does/not/exist'

let s:srcdir = expand('%:p:h:h')

+" Prepare for calling garbagecollect_for_testing().
+let v:testing = 1
+
" Support function: get the alloc ID by name.
function GetAllocId(name)
exe 'split ' . s:srcdir . '/alloc.h'
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index e134527..05df50a 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -183,7 +183,7 @@ func s:communicate(port)
call assert_equal('got it', s:responseMsg)

" Collect garbage, tests that our handle isn't collected.
- call garbagecollect()
+ call garbagecollect_for_testing()

" check setting options (without testing the effect)
call ch_setoptions(handle, {'callback': 's:NotUsed'})
@@ -1231,7 +1231,7 @@ func Test_job_start_invalid()
call assert_fails('call job_start("")', 'E474:')
endfunc

-" This leaking memory.
+" This was leaking memory.
func Test_partial_in_channel_cycle()
let d = {}
let d.a = function('string', [d])
@@ -1243,5 +1243,13 @@ func Test_partial_in_channel_cycle()
unlet d
endfunc

+func Test_using_freed_memory()
+ let g:a = job_start(['ls'])
+ sleep 10m
+ call garbagecollect_for_testing()
+endfunc
+
+
+
" Uncomment this to see what happens, output is in src/testdir/channellog.
" call ch_logfile('channellog', 'w')
diff --git a/src/version.c b/src/version.c
index cf7d48c..6c94bc6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1727,
+/**/
1726,
/**/
1725,
diff --git a/src/vim.h b/src/vim.h
index 36cc19a..9e2ab21 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1868,7 +1868,8 @@ typedef int sock_T;
#define VV_NULL 65
#define VV_NONE 66
#define VV_VIM_DID_ENTER 67
-#define VV_LEN 68 /* number of v: vars */
+#define VV_TESTING 68
+#define VV_LEN 69 /* number of v: vars */

/* used for v_number in VAR_SPECIAL */
#define VVAL_FALSE 0L
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:59 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 13:51:37 2016 +0200

patch 7.4.1728
Problem: The help for functions require a space after the "(".
Solution: Make CTRL-] on a function name ignore the arguments. (Hirohito
Higashi)
---
runtime/doc/eval.txt | 594 +++++++++++++++++++-------------------
src/ex_cmds.c | 7 +
src/testdir/test_help_tagjump.vim | 10 +
src/version.c | 2 +
4 files changed, 319 insertions(+), 294 deletions(-)

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 93bf3f1..2d7beb7 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1791,134 +1791,137 @@ See |function-list| for a list grouped by what the function is used for.

USAGE RESULT DESCRIPTION ~

-abs( {expr}) Float or Number absolute value of {expr}
-acos( {expr}) Float arc cosine of {expr}
-add( {list}, {item}) List append {item} to |List| {list}
-alloc_fail( {id}, {countdown}, {repeat})
+abs({expr}) Float or Number absolute value of {expr}
+acos({expr}) Float arc cosine of {expr}
+add({list}, {item}) List append {item} to |List| {list}
+alloc_fail({id}, {countdown}, {repeat})
none make memory allocation fail
-and( {expr}, {expr}) Number bitwise AND
-append( {lnum}, {string}) Number append {string} below line {lnum}
-append( {lnum}, {list}) Number append lines {list} below line {lnum}
+and({expr}, {expr}) Number bitwise AND
+append({lnum}, {string}) Number append {string} below line {lnum}
+append({lnum}, {list}) Number append lines {list} below line {lnum}
argc() Number number of files in the argument list
argidx() Number current index in the argument list
-arglistid( [{winnr} [, {tabnr}]])
- Number argument list id
-argv( {nr}) String {nr} entry of the argument list
+arglistid([{winnr} [, {tabnr}]]) Number argument list id
+argv({nr}) String {nr} entry of the argument list
argv() List the argument list
-assert_equal( {exp}, {act} [, {msg}]) none assert {exp} is equal to {act}
-assert_exception( {error} [, {msg}]) none assert {error} is in v:exception
-assert_fails( {cmd} [, {error}]) none assert {cmd} fails
-assert_false( {actual} [, {msg}]) none assert {actual} is false
-assert_match( {pat}, {text} [, {msg}]) none assert {pat} matches {text}
-assert_notequal( {exp}, {act} [, {msg}]) none assert {exp} is not equal {act}
-assert_notmatch( {pat}, {text} [, {msg}]) none assert {pat} not matches {text}
-assert_true( {actual} [, {msg}]) none assert {actual} is true
-asin( {expr}) Float arc sine of {expr}
-atan( {expr}) Float arc tangent of {expr}
-atan2( {expr}, {expr}) Float arc tangent of {expr1} / {expr2}
-browse( {save}, {title}, {initdir}, {default})
+assert_equal({exp}, {act} [, {msg}]) none assert {exp} is equal to {act}
+assert_exception({error} [, {msg}]) none assert {error} is in v:exception
+assert_fails({cmd} [, {error}]) none assert {cmd} fails
+assert_false({actual} [, {msg}]) none assert {actual} is false
+assert_match({pat}, {text} [, {msg}]) none assert {pat} matches {text}
+assert_notequal({exp}, {act} [, {msg}]) none assert {exp} is not equal {act}
+assert_notmatch({pat}, {text} [, {msg}]) none assert {pat} not matches {text}
+assert_true({actual} [, {msg}]) none assert {actual} is true
+asin({expr}) Float arc sine of {expr}
+atan({expr}) Float arc tangent of {expr}
+atan2({expr}, {expr}) Float arc tangent of {expr1} / {expr2}
+browse({save}, {title}, {initdir}, {default})
String put up a file requester
-browsedir( {title}, {initdir}) String put up a directory requester
-bufexists( {expr}) Number TRUE if buffer {expr} exists
-buflisted( {expr}) Number TRUE if buffer {expr} is listed
-bufloaded( {expr}) Number TRUE if buffer {expr} is loaded
-bufname( {expr}) String Name of the buffer {expr}
-bufnr( {expr} [, {create}]) Number Number of the buffer {expr}
-bufwinnr( {expr}) Number window number of buffer {expr}
-byte2line( {byte}) Number line number at byte count {byte}
-byteidx( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
-byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
-call( {func}, {arglist} [, {dict}])
+browsedir({title}, {initdir}) String put up a directory requester
+bufexists({expr}) Number TRUE if buffer {expr} exists
+buflisted({expr}) Number TRUE if buffer {expr} is listed
+bufloaded({expr}) Number TRUE if buffer {expr} is loaded
+bufname({expr}) String Name of the buffer {expr}
+bufnr({expr} [, {create}]) Number Number of the buffer {expr}
+bufwinnr({expr}) Number window number of buffer {expr}
+byte2line({byte}) Number line number at byte count {byte}
+byteidx({expr}, {nr}) Number byte index of {nr}'th char in {expr}
+byteidxcomp({expr}, {nr}) Number byte index of {nr}'th char in {expr}
+call({func}, {arglist} [, {dict}])
any call {func} with arguments {arglist}
-ceil( {expr}) Float round {expr} up
-ch_close( {handle}) none close {handle}
-ch_evalexpr( {handle}, {expr} [, {options}])
+ceil({expr}) Float round {expr} up
+ch_close({handle}) none close {handle}
+ch_evalexpr({handle}, {expr} [, {options}])
any evaluate {expr} on JSON {handle}
-ch_evalraw( {handle}, {string} [, {options}])
+ch_evalraw({handle}, {string} [, {options}])
any evaluate {string} on raw {handle}
-ch_getbufnr( {handle}, {what}) Number get buffer number for {handle}/{what}
-ch_getjob( {channel}) Job get the Job of {channel}
-ch_info( {handle}) String info about channel {handle}
-ch_log( {msg} [, {handle}]) none write {msg} in the channel log file
-ch_logfile( {fname} [, {mode}]) none start logging channel activity
-ch_open( {address} [, {options}]) Channel open a channel to {address}
-ch_read( {handle} [, {options}]) String read from {handle}
-ch_readraw( {handle} [, {options}]) String read raw from {handle}
-ch_sendexpr( {handle}, {expr} [, {options}])
+ch_getbufnr({handle}, {what}) Number get buffer number for {handle}/{what}
+ch_getjob({channel}) Job get the Job of {channel}
+ch_info({handle}) String info about channel {handle}
+ch_log({msg} [, {handle}]) none write {msg} in the channel log file
+ch_logfile({fname} [, {mode}]) none start logging channel activity
+ch_open({address} [, {options}])
+ Channel open a channel to {address}
+ch_read({handle} [, {options}]) String read from {handle}
+ch_readraw({handle} [, {options}])
+ String read raw from {handle}
+ch_sendexpr({handle}, {expr} [, {options}])
any send {expr} over JSON {handle}
-ch_sendraw( {handle}, {string} [, {options}])
+ch_sendraw({handle}, {string} [, {options}])
any send {string} over raw {handle}
-ch_setoptions( {handle}, {options}) none set options for {handle}
-ch_status( {handle}) String status of channel {handle}
+ch_setoptions({handle}, {options})
+ none set options for {handle}
+ch_status({handle}) String status of channel {handle}
changenr() Number current change number
-char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
-cindent( {lnum}) Number C indent for line {lnum}
+char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
+cindent({lnum}) Number C indent for line {lnum}
clearmatches() none clear all matches
-col( {expr}) Number column nr of cursor or mark
-complete( {startcol}, {matches}) none set Insert mode completion
-complete_add( {expr}) Number add completion match
+col({expr}) Number column nr of cursor or mark
+complete({startcol}, {matches}) none set Insert mode completion
+complete_add({expr}) Number add completion match
complete_check() Number check for key typed during completion
-confirm( {msg} [, {choices} [, {default} [, {type}]]])
+confirm({msg} [, {choices} [, {default} [, {type}]]])
Number number of choice picked by user
-copy( {expr}) any make a shallow copy of {expr}
-cos( {expr}) Float cosine of {expr}
-cosh( {expr}) Float hyperbolic cosine of {expr}
-count( {list}, {expr} [, {ic} [, {start}]])
+copy({expr}) any make a shallow copy of {expr}
+cos({expr}) Float cosine of {expr}
+cosh({expr}) Float hyperbolic cosine of {expr}
+count({list}, {expr} [, {ic} [, {start}]])
Number count how many {expr} are in {list}
-cscope_connection( [{num} , {dbpath} [, {prepend}]])
+cscope_connection([{num} , {dbpath} [, {prepend}]])
Number checks existence of cscope connection
-cursor( {lnum}, {col} [, {off}])
+cursor({lnum}, {col} [, {off}])
Number move cursor to {lnum}, {col}, {off}
-cursor( {list}) Number move cursor to position in {list}
-deepcopy( {expr} [, {noref}]) any make a full copy of {expr}
-delete( {fname} [, {flags}]) Number delete the file or directory {fname}
+cursor({list}) Number move cursor to position in {list}
+deepcopy({expr} [, {noref}]) any make a full copy of {expr}
+delete({fname} [, {flags}]) Number delete the file or directory {fname}
did_filetype() Number TRUE if FileType autocommand event used
-diff_filler( {lnum}) Number diff filler lines about {lnum}
-diff_hlID( {lnum}, {col}) Number diff highlighting at {lnum}/{col}
-disable_char_avail_for_testing( {expr}) none test without typeahead
-empty( {expr}) Number TRUE if {expr} is empty
-escape( {string}, {chars}) String escape {chars} in {string} with '\'
-eval( {string}) any evaluate {string} into its value
+diff_filler({lnum}) Number diff filler lines about {lnum}
+diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col}
+disable_char_avail_for_testing({expr})
+ none test without typeahead
+empty({expr}) Number TRUE if {expr} is empty
+escape({string}, {chars}) String escape {chars} in {string} with '\'
+eval({string}) any evaluate {string} into its value
eventhandler() Number TRUE if inside an event handler
-executable( {expr}) Number 1 if executable {expr} exists
-exepath( {expr}) String full path of the command {expr}
-exists( {expr}) Number TRUE if {expr} exists
-extend( {expr1}, {expr2} [, {expr3}])
+executable({expr}) Number 1 if executable {expr} exists
+exepath({expr}) String full path of the command {expr}
+exists({expr}) Number TRUE if {expr} exists
+extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
-exp( {expr}) Float exponential of {expr}
-expand( {expr} [, {nosuf} [, {list}]])
+exp({expr}) Float exponential of {expr}
+expand({expr} [, {nosuf} [, {list}]])
any expand special keywords in {expr}
-feedkeys( {string} [, {mode}]) Number add key sequence to typeahead buffer
-filereadable( {file}) Number TRUE if {file} is a readable file
-filewritable( {file}) Number TRUE if {file} is a writable file
-filter( {expr}, {string}) List/Dict remove items from {expr} where
+feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
+filereadable({file}) Number TRUE if {file} is a readable file
+filewritable({file}) Number TRUE if {file} is a writable file
+filter({expr}, {string}) List/Dict remove items from {expr} where
{string} is 0
-finddir( {name}[, {path}[, {count}]])
+finddir({name}[, {path}[, {count}]])
String find directory {name} in {path}
-findfile( {name}[, {path}[, {count}]])
+findfile({name}[, {path}[, {count}]])
String find file {name} in {path}
-float2nr( {expr}) Number convert Float {expr} to a Number
-floor( {expr}) Float round {expr} down
-fmod( {expr1}, {expr2}) Float remainder of {expr1} / {expr2}
-fnameescape( {fname}) String escape special characters in {fname}
-fnamemodify( {fname}, {mods}) String modify file name
-foldclosed( {lnum}) Number first line of fold at {lnum} if closed
-foldclosedend( {lnum}) Number last line of fold at {lnum} if closed
-foldlevel( {lnum}) Number fold level at {lnum}
+float2nr({expr}) Number convert Float {expr} to a Number
+floor({expr}) Float round {expr} down
+fmod({expr1}, {expr2}) Float remainder of {expr1} / {expr2}
+fnameescape({fname}) String escape special characters in {fname}
+fnamemodify({fname}, {mods}) String modify file name
+foldclosed({lnum}) Number first line of fold at {lnum} if closed
+foldclosedend({lnum}) Number last line of fold at {lnum} if closed
+foldlevel({lnum}) Number fold level at {lnum}
foldtext() String line displayed for closed fold
-foldtextresult( {lnum}) String text for closed fold at {lnum}
+foldtextresult({lnum}) String text for closed fold at {lnum}
foreground() Number bring the Vim window to the foreground
-function( {name} [, {arglist}] [, {dict}])
+function({name} [, {arglist}] [, {dict}])
Funcref reference to function {name}
-garbagecollect( [{atexit}]) none free memory, breaking cyclic references
+garbagecollect([{atexit}]) none free memory, breaking cyclic references
garbagecollect_for_testing() none free memory right now
-get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
-get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
-getbufline( {expr}, {lnum} [, {end}])
+get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
+get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
+getbufline({expr}, {lnum} [, {end}])
List lines {lnum} to {end} of buffer {expr}
-getbufvar( {expr}, {varname} [, {def}])
+getbufvar({expr}, {varname} [, {def}])
any variable {varname} in buffer {expr}
-getchar( [expr]) Number get one character from the user
+getchar([expr]) Number get one character from the user
getcharmod() Number modifiers for the last typed character
getcharsearch() Dict last character search
getcmdline() String return the current command-line
@@ -1926,268 +1929,271 @@ getcmdpos() Number return cursor position in command-line
getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcurpos() List position of the cursor
-getcwd( [{winnr} [, {tabnr}]]) String get the current working directory
-getfontname( [{name}]) String name of font being used
-getfperm( {fname}) String file permissions of file {fname}
-getfsize( {fname}) Number size in bytes of file {fname}
-getftime( {fname}) Number last modification time of file
-getftype( {fname}) String description of type of file {fname}
-getline( {lnum}) String line {lnum} of current buffer
-getline( {lnum}, {end}) List lines {lnum} to {end} of current buffer
-getloclist( {nr}) List list of location list items
+getcwd([{winnr} [, {tabnr}]]) String get the current working directory
+getfontname([{name}]) String name of font being used
+getfperm({fname}) String file permissions of file {fname}
+getfsize({fname}) Number size in bytes of file {fname}
+getftime({fname}) Number last modification time of file
+getftype({fname}) String description of type of file {fname}
+getline({lnum}) String line {lnum} of current buffer
+getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
+getloclist({nr}) List list of location list items
getmatches() List list of current matches
getpid() Number process ID of Vim
-getpos( {expr}) List position of cursor, mark, etc.
+getpos({expr}) List position of cursor, mark, etc.
getqflist() List list of quickfix items
-getreg( [{regname} [, 1 [, {list}]]])
+getreg([{regname} [, 1 [, {list}]]])
String or List contents of register
-getregtype( [{regname}]) String type of register
-gettabvar( {nr}, {varname} [, {def}])
+getregtype([{regname}]) String type of register
+gettabvar({nr}, {varname} [, {def}])
any variable {varname} in tab {nr} or {def}
-gettabwinvar( {tabnr}, {winnr}, {name} [, {def}])
+gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr}
getwinposx() Number X coord in pixels of GUI Vim window
getwinposy() Number Y coord in pixels of GUI Vim window
-getwinvar( {nr}, {varname} [, {def}])
+getwinvar({nr}, {varname} [, {def}])
any variable {varname} in window {nr}
-glob( {expr} [, {nosuf} [, {list} [, {alllinks}]]])
+glob({expr} [, {nosuf} [, {list} [, {alllinks}]]])
any expand file wildcards in {expr}
-glob2regpat( {expr}) String convert a glob pat into a search pat
-globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
+glob2regpat({expr}) String convert a glob pat into a search pat
+globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
String do glob({expr}) for all dirs in {path}
-has( {feature}) Number TRUE if feature {feature} supported
-has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
-haslocaldir( [{winnr} [, {tabnr}]])
+has({feature}) Number TRUE if feature {feature} supported
+has_key({dict}, {key}) Number TRUE if {dict} has entry {key}
+haslocaldir([{winnr} [, {tabnr}]])
Number TRUE if the window executed |:lcd|
-hasmapto( {what} [, {mode} [, {abbr}]])
+hasmapto({what} [, {mode} [, {abbr}]])
Number TRUE if mapping to {what} exists
-histadd( {history}, {item}) String add an item to a history
-histdel( {history} [, {item}]) String remove an item from a history
-histget( {history} [, {index}]) String get the item {index} from a history
-histnr( {history}) Number highest index of a history
-hlexists( {name}) Number TRUE if highlight group {name} exists
-hlID( {name}) Number syntax ID of highlight group {name}
+histadd({history}, {item}) String add an item to a history
+histdel({history} [, {item}]) String remove an item from a history
+histget({history} [, {index}]) String get the item {index} from a history
+histnr({history}) Number highest index of a history
+hlexists({name}) Number TRUE if highlight group {name} exists
+hlID({name}) Number syntax ID of highlight group {name}
hostname() String name of the machine Vim is running on
-iconv( {expr}, {from}, {to}) String convert encoding of {expr}
-indent( {lnum}) Number indent of line {lnum}
-index( {list}, {expr} [, {start} [, {ic}]])
+iconv({expr}, {from}, {to}) String convert encoding of {expr}
+indent({lnum}) Number indent of line {lnum}
+index({list}, {expr} [, {start} [, {ic}]])
Number index in {list} where {expr} appears
-input( {prompt} [, {text} [, {completion}]])
+input({prompt} [, {text} [, {completion}]])
String get input from the user
-inputdialog( {p} [, {t} [, {c}]]) String like input() but in a GUI dialog
-inputlist( {textlist}) Number let the user pick from a choice list
+inputdialog({prompt} [, {text} [, {completion}]]])
+ String like input() but in a GUI dialog
+inputlist({textlist}) Number let the user pick from a choice list
inputrestore() Number restore typeahead
inputsave() Number save and clear typeahead
-inputsecret( {prompt} [, {text}]) String like input() but hiding the text
-insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
-invert( {expr}) Number bitwise invert
-isdirectory( {directory}) Number TRUE if {directory} is a directory
-islocked( {expr}) Number TRUE if {expr} is locked
-isnan( {expr}) Number TRUE if {expr} is NaN
-items( {dict}) List key-value pairs in {dict}
-job_getchannel( {job}) Channel get the channel handle for {job}
-job_info( {job}) Dict get information about {job}
-job_setoptions( {job}, {options}) none set options for {job}
-job_start( {command} [, {options}]) Job start a job
-job_status( {job}) String get the status of {job}
-job_stop( {job} [, {how}]) Number stop {job}
-join( {list} [, {sep}]) String join {list} items into one String
-js_decode( {string}) any decode JS style JSON
-js_encode( {expr}) String encode JS style JSON
-json_decode( {string}) any decode JSON
-json_encode( {expr}) String encode JSON
-keys( {dict}) List keys in {dict}
-len( {expr}) Number the length of {expr}
-libcall( {lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
-libcallnr( {lib}, {func}, {arg}) Number idem, but return a Number
-line( {expr}) Number line nr of cursor, last line or mark
-line2byte( {lnum}) Number byte count of line {lnum}
-lispindent( {lnum}) Number Lisp indent for line {lnum}
+inputsecret({prompt} [, {text}]) String like input() but hiding the text
+insert({list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
+invert({expr}) Number bitwise invert
+isdirectory({directory}) Number TRUE if {directory} is a directory
+islocked({expr}) Number TRUE if {expr} is locked
+isnan({expr}) Number TRUE if {expr} is NaN
+items({dict}) List key-value pairs in {dict}
+job_getchannel({job}) Channel get the channel handle for {job}
+job_info({job}) Dict get information about {job}
+job_setoptions({job}, {options}) none set options for {job}
+job_start({command} [, {options}])
+ Job start a job
+job_status({job}) String get the status of {job}
+job_stop({job} [, {how}]) Number stop {job}
+join({list} [, {sep}]) String join {list} items into one String
+js_decode({string}) any decode JS style JSON
+js_encode({expr}) String encode JS style JSON
+json_decode({string}) any decode JSON
+json_encode({expr}) String encode JSON
+keys({dict}) List keys in {dict}
+len({expr}) Number the length of {expr}
+libcall({lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
+libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
+line({expr}) Number line nr of cursor, last line or mark
+line2byte({lnum}) Number byte count of line {lnum}
+lispindent({lnum}) Number Lisp indent for line {lnum}
localtime() Number current time
-log( {expr}) Float natural logarithm (base e) of {expr}
-log10( {expr}) Float logarithm of Float {expr} to base 10
-luaeval( {expr}[, {expr}]) any evaluate |Lua| expression
-map( {expr}, {string}) List/Dict change each item in {expr} to {expr}
-maparg( {name}[, {mode} [, {abbr} [, {dict}]]])
+log({expr}) Float natural logarithm (base e) of {expr}
+log10({expr}) Float logarithm of Float {expr} to base 10
+luaeval({expr}[, {expr}]) any evaluate |Lua| expression
+map({expr}, {string}) List/Dict change each item in {expr} to {expr}
+maparg({name}[, {mode} [, {abbr} [, {dict}]]])
String or Dict
rhs of mapping {name} in mode {mode}
-mapcheck( {name}[, {mode} [, {abbr}]])
+mapcheck({name}[, {mode} [, {abbr}]])
String check for mappings matching {name}
-match( {expr}, {pat}[, {start}[, {count}]])
+match({expr}, {pat}[, {start}[, {count}]])
Number position where {pat} matches in {expr}
-matchadd( {group}, {pattern}[, {priority}[, {id} [, {dict}]]])
+matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
Number highlight {pattern} with {group}
-matchaddpos( {group}, {pos}[, {priority}[, {id}[, {dict}]]])
+matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]])
Number highlight positions with {group}
-matcharg( {nr}) List arguments of |:match|
-matchdelete( {id}) Number delete match identified by {id}
-matchend( {expr}, {pat}[, {start}[, {count}]])
+matcharg({nr}) List arguments of |:match|
+matchdelete({id}) Number delete match identified by {id}
+matchend({expr}, {pat}[, {start}[, {count}]])
Number position where {pat} ends in {expr}
-matchlist( {expr}, {pat}[, {start}[, {count}]])
+matchlist({expr}, {pat}[, {start}[, {count}]])
List match and submatches of {pat} in {expr}
-matchstr( {expr}, {pat}[, {start}[, {count}]])
+matchstr({expr}, {pat}[, {start}[, {count}]])
String {count}'th match of {pat} in {expr}
-matchstrpos( {expr}, {pat}[, {start}[, {count}]])
+matchstrpos({expr}, {pat}[, {start}[, {count}]])
List {count}'th match of {pat} in {expr}
-max( {list}) Number maximum value of items in {list}
-min( {list}) Number minimum value of items in {list}
-mkdir( {name} [, {path} [, {prot}]])
+max({list}) Number maximum value of items in {list}
+min({list}) Number minimum value of items in {list}
+mkdir({name} [, {path} [, {prot}]])
Number create directory {name}
-mode( [expr]) String current editing mode
-mzeval( {expr}) any evaluate |MzScheme| expression
-nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
-nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
-or( {expr}, {expr}) Number bitwise OR
-pathshorten( {expr}) String shorten directory names in a path
-perleval( {expr}) any evaluate |Perl| expression
-pow( {x}, {y}) Float {x} to the power of {y}
-prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum}
-printf( {fmt}, {expr1}...) String format text
+mode([expr]) String current editing mode
+mzeval({expr}) any evaluate |MzScheme| expression
+nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
+nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
+or({expr}, {expr}) Number bitwise OR
+pathshorten({expr}) String shorten directory names in a path
+perleval({expr}) any evaluate |Perl| expression
+pow({x}, {y}) Float {x} to the power of {y}
+prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
+printf({fmt}, {expr1}...) String format text
pumvisible() Number whether popup menu is visible
-pyeval( {expr}) any evaluate |Python| expression
-py3eval( {expr}) any evaluate |python3| expression
-range( {expr} [, {max} [, {stride}]])
+pyeval({expr}) any evaluate |Python| expression
+py3eval({expr}) any evaluate |python3| expression
+range({expr} [, {max} [, {stride}]])
List items from {expr} to {max}
-readfile( {fname} [, {binary} [, {max}]])
+readfile({fname} [, {binary} [, {max}]])
List get list of lines from file {fname}
-reltime( [{start} [, {end}]]) List get time value
-reltimefloat( {time}) Float turn the time value into a Float
-reltimestr( {time}) String turn time value into a String
-remote_expr( {server}, {string} [, {idvar}])
+reltime([{start} [, {end}]]) List get time value
+reltimefloat({time}) Float turn the time value into a Float
+reltimestr({time}) String turn time value into a String
+remote_expr({server}, {string} [, {idvar}])
String send expression
-remote_foreground( {server}) Number bring Vim server to the foreground
-remote_peek( {serverid} [, {retvar}])
+remote_foreground({server}) Number bring Vim server to the foreground
+remote_peek({serverid} [, {retvar}])
Number check for reply string
-remote_read( {serverid}) String read reply string
-remote_send( {server}, {string} [, {idvar}])
+remote_read({serverid}) String read reply string
+remote_send({server}, {string} [, {idvar}])
String send key sequence
-remove( {list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
-remove( {dict}, {key}) any remove entry {key} from {dict}
-rename( {from}, {to}) Number rename (move) file from {from} to {to}
-repeat( {expr}, {count}) String repeat {expr} {count} times
-resolve( {filename}) String get filename a shortcut points to
-reverse( {list}) List reverse {list} in-place
-round( {expr}) Float round off {expr}
-screenattr( {row}, {col}) Number attribute at screen position
-screenchar( {row}, {col}) Number character at screen position
+remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
+remove({dict}, {key}) any remove entry {key} from {dict}
+rename({from}, {to}) Number rename (move) file from {from} to {to}
+repeat({expr}, {count}) String repeat {expr} {count} times
+resolve({filename}) String get filename a shortcut points to
+reverse({list}) List reverse {list} in-place
+round({expr}) Float round off {expr}
+screenattr({row}, {col}) Number attribute at screen position
+screenchar({row}, {col}) Number character at screen position
screencol() Number current cursor column
screenrow() Number current cursor row
-search( {pattern} [, {flags} [, {stopline} [, {timeout}]]])
+search({pattern} [, {flags} [, {stopline} [, {timeout}]]])
Number search for {pattern}
-searchdecl( {name} [, {global} [, {thisblock}]])
+searchdecl({name} [, {global} [, {thisblock}]])
Number search for variable declaration
-searchpair( {start}, {middle}, {end} [, {flags} [, {skip} [...]]])
+searchpair({start}, {middle}, {end} [, {flags} [, {skip} [...]]])
Number search for other end of start/end pair
-searchpairpos( {start}, {middle}, {end} [, {flags} [, {skip} [...]]])
+searchpairpos({start}, {middle}, {end} [, {flags} [, {skip} [...]]])
List search for other end of start/end pair
-searchpos( {pattern} [, {flags} [, {stopline} [, {timeout}]]])
+searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]])
List search for {pattern}
-server2client( {clientid}, {string})
+server2client({clientid}, {string})
Number send reply string
serverlist() String get a list of available servers
-setbufvar( {expr}, {varname}, {val}) set {varname} in buffer {expr} to {val}
-setcharsearch( {dict}) Dict set character search from {dict}
-setcmdpos( {pos}) Number set cursor position in command-line
-setfperm( {fname}, {mode}) Number set {fname} file permissions to {mode}
-setline( {lnum}, {line}) Number set line {lnum} to {line}
-setloclist( {nr}, {list}[, {action}])
+setbufvar({expr}, {varname}, {val})
+ none set {varname} in buffer {expr} to {val}
+setcharsearch({dict}) Dict set character search from {dict}
+setcmdpos({pos}) Number set cursor position in command-line
+setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
+setline({lnum}, {line}) Number set line {lnum} to {line}
+setloclist({nr}, {list}[, {action}])
Number modify location list using {list}
-setmatches( {list}) Number restore a list of matches
-setpos( {expr}, {list}) Number set the {expr} position to {list}
-setqflist( {list}[, {action}]) Number modify quickfix list using {list}
-setreg( {n}, {v}[, {opt}]) Number set register to value and type
-settabvar( {nr}, {varname}, {val}) set {varname} in tab page {nr} to {val}
-settabwinvar( {tabnr}, {winnr}, {varname}, {val}) set {varname} in window
- {winnr} in tab page {tabnr} to {val}
-setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
-sha256( {string}) String SHA256 checksum of {string}
-shellescape( {string} [, {special}])
+setmatches({list}) Number restore a list of matches
+setpos({expr}, {list}) Number set the {expr} position to {list}
+setqflist({list}[, {action}]) Number modify quickfix list using {list}
+setreg({n}, {v}[, {opt}]) Number set register to value and type
+settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
+settabwinvar({tabnr}, {winnr}, {varname}, {val})
+ none set {varname} in window {winnr} in tab
+ page {tabnr} to {val}
+setwinvar({nr}, {varname}, {val}) none set {varname} in window {nr} to {val}
+sha256({string}) String SHA256 checksum of {string}
+shellescape({string} [, {special}])
String escape {string} for use as shell
command argument
shiftwidth() Number effective value of 'shiftwidth'
-simplify( {filename}) String simplify filename as much as possible
-sin( {expr}) Float sine of {expr}
-sinh( {expr}) Float hyperbolic sine of {expr}
-sort( {list} [, {func} [, {dict}]])
+simplify({filename}) String simplify filename as much as possible
+sin({expr}) Float sine of {expr}
+sinh({expr}) Float hyperbolic sine of {expr}
+sort({list} [, {func} [, {dict}]])
List sort {list}, using {func} to compare
-soundfold( {word}) String sound-fold {word}
+soundfold({word}) String sound-fold {word}
spellbadword() String badly spelled word at cursor
-spellsuggest( {word} [, {max} [, {capital}]])
+spellsuggest({word} [, {max} [, {capital}]])
List spelling suggestions
-split( {expr} [, {pat} [, {keepempty}]])
+split({expr} [, {pat} [, {keepempty}]])
List make |List| from {pat} separated {expr}
-sqrt( {expr}) Float square root of {expr}
-str2float( {expr}) Float convert String to Float
-str2nr( {expr} [, {base}]) Number convert String to Number
-strchars( {expr} [, {skipcc}]) Number character length of the String {expr}
-strdisplaywidth( {expr} [, {col}]) Number display length of the String {expr}
-strftime( {format}[, {time}]) String time in specified format
-stridx( {haystack}, {needle}[, {start}])
+sqrt({expr}) Float square root of {expr}
+str2float({expr}) Float convert String to Float
+str2nr({expr} [, {base}]) Number convert String to Number
+strchars({expr} [, {skipcc}]) Number character length of the String {expr}
+strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
+strftime({format}[, {time}]) String time in specified format
+stridx({haystack}, {needle}[, {start}])
Number index of {needle} in {haystack}
-string( {expr}) String String representation of {expr} value
-strlen( {expr}) Number length of the String {expr}
-strpart( {src}, {start}[, {len}])
+string({expr}) String String representation of {expr} value
+strlen({expr}) Number length of the String {expr}
+strpart({src}, {start}[, {len}])
String {len} characters of {src} at {start}
-strridx( {haystack}, {needle} [, {start}])
+strridx({haystack}, {needle} [, {start}])
Number last index of {needle} in {haystack}
-strtrans( {expr}) String translate string to make it printable
-strwidth( {expr}) Number display cell length of the String {expr}
-submatch( {nr}[, {list}]) String or List
+strtrans({expr}) String translate string to make it printable
+strwidth({expr}) Number display cell length of the String {expr}
+submatch({nr}[, {list}]) String or List
specific match in ":s" or substitute()
-substitute( {expr}, {pat}, {sub}, {flags})
+substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
-synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
-synIDattr( {synID}, {what} [, {mode}])
+synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
+synIDattr({synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
-synIDtrans( {synID}) Number translated syntax ID of {synID}
-synconcealed( {lnum}, {col}) List info about concealing
-synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
-system( {expr} [, {input}]) String output of shell command/filter {expr}
-systemlist( {expr} [, {input}]) List output of shell command/filter {expr}
-tabpagebuflist( [{arg}]) List list of buffer numbers in tab page
-tabpagenr( [{arg}]) Number number of current or last tab page
-tabpagewinnr( {tabarg}[, {arg}])
- Number number of current window in tab page
-taglist( {expr}) List list of tags matching {expr}
+synIDtrans({synID}) Number translated syntax ID of {synID}
+synconcealed({lnum}, {col}) List info about concealing
+synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
+system({expr} [, {input}]) String output of shell command/filter {expr}
+systemlist({expr} [, {input}]) List output of shell command/filter {expr}
+tabpagebuflist([{arg}]) List list of buffer numbers in tab page
+tabpagenr([{arg}]) Number number of current or last tab page
+tabpagewinnr({tabarg}[, {arg}]) Number number of current window in tab page
+taglist({expr}) List list of tags matching {expr}
tagfiles() List tags files used
-tan( {expr}) Float tangent of {expr}
-tanh( {expr}) Float hyperbolic tangent of {expr}
+tan({expr}) Float tangent of {expr}
+tanh({expr}) Float hyperbolic tangent of {expr}
tempname() String name for a temporary file
-timer_start( {time}, {callback} [, {options}])
+timer_start({time}, {callback} [, {options}])
Number create a timer
-timer_stop( {timer}) none stop a timer
-tolower( {expr}) String the String {expr} switched to lowercase
-toupper( {expr}) String the String {expr} switched to uppercase
-tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
+timer_stop({timer}) none stop a timer
+tolower({expr}) String the String {expr} switched to lowercase
+toupper({expr}) String the String {expr} switched to uppercase
+tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
to chars in {tostr}
-trunc( {expr}) Float truncate Float {expr}
-type( {name}) Number type of variable {name}
-undofile( {name}) String undo file name for {name}
+trunc({expr}) Float truncate Float {expr}
+type({name}) Number type of variable {name}
+undofile({name}) String undo file name for {name}
undotree() List undo file tree
-uniq( {list} [, {func} [, {dict}]])
+uniq({list} [, {func} [, {dict}]])
List remove adjacent duplicates from a list
-values( {dict}) List values in {dict}
-virtcol( {expr}) Number screen column of cursor or mark
-visualmode( [expr]) String last visual mode used
+values({dict}) List values in {dict}
+virtcol({expr}) Number screen column of cursor or mark
+visualmode([expr]) String last visual mode used
wildmenumode() Number whether 'wildmenu' mode is active
-win_findbuf( {bufnr}) List find windows containing {bufnr}
-win_getid( [{win} [, {tab}]]) Number get window ID for {win} in {tab}
-win_gotoid( {expr}) Number go to window with ID {expr}
-win_id2tabwin( {expr}) List get tab and window nr from window ID
-win_id2win( {expr}) Number get window nr from window ID
-winbufnr( {nr}) Number buffer number of window {nr}
+win_findbuf({bufnr}) List find windows containing {bufnr}
+win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab}
+win_gotoid({expr}) Number go to window with ID {expr}
+win_id2tabwin({expr}) List get tab and window nr from window ID
+win_id2win({expr}) Number get window nr from window ID
+winbufnr({nr}) Number buffer number of window {nr}
wincol() Number window column of the cursor
-winheight( {nr}) Number height of window {nr}
+winheight({nr}) Number height of window {nr}
winline() Number window line of the cursor
-winnr( [{expr}]) Number number of current window
+winnr([{expr}]) Number number of current window
winrestcmd() String returns command to restore window sizes
-winrestview( {dict}) none restore view of current window
+winrestview({dict}) none restore view of current window
winsaveview() Dict save view of current window
-winwidth( {nr}) Number width of window {nr}
+winwidth({nr}) Number width of window {nr}
wordcount() Dict get byte/char/word statistics
-writefile( {list}, {fname} [, {flags}])
+writefile({list}, {fname} [, {flags}])
Number write list of lines to file {fname}
-xor( {expr}, {expr}) Number bitwise XOR
+xor({expr}, {expr}) Number bitwise XOR


abs({expr}) *abs()*
@@ -4754,9 +4760,9 @@ json_encode({expr}) *json_encode()*
String in double quotes (possibly null)
Funcref not possible, error
List as an array (possibly null); when
- used recursively: []
+ used recursively: []
Dict as an object (possibly null); when
- used recursively: {}
+ used recursively: {}
v:false "false"
v:true "true"
v:none "null"
@@ -6098,7 +6104,7 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *searchpos()*
< In this example "submatch" is 2 when a lowercase letter is
found |/\l|, 3 when an uppercase letter is found |/\u|.

-server2client( {clientid}, {string}) *server2client()*
+server2client({clientid}, {string}) *server2client()*
Send a reply string to {clientid}. The most recent {clientid}
that sent a string can be retrieved with expand("<client>").
{only available when compiled with the |+clientserver| feature}
@@ -6611,7 +6617,7 @@ sqrt({expr}) *sqrt()*
{only available when compiled with the |+float| feature}


-str2float( {expr}) *str2float()*
+str2float({expr}) *str2float()*
Convert String {expr} to a Float. This mostly works the same
as when using a floating point number in an expression, see
|floating-point-format|. But it's a bit more permissive.
@@ -6626,7 +6632,7 @@ str2float( {expr}) *str2float()*
< {only available when compiled with the |+float| feature}


-str2nr( {expr} [, {base}]) *str2nr()*
+str2nr({expr} [, {base}]) *str2nr()*
Convert string {expr} to a number.
{base} is the conversion base, it can be 2, 8, 10 or 16.
When {base} is omitted base 10 is used. This also means that
@@ -7136,7 +7142,7 @@ timer_start({time}, {callback} [, {options}])

{options} is a dictionary. Supported entries:
"repeat" Number of times to repeat calling the
- callback. -1 means forever.
+ callback. -1 means forever.

Example: >
func MyHandler(timer)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index daac3ae..d83dc40 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6204,6 +6204,13 @@ find_help_tags(
*d++ = *s;

/*
+ * If tag contains "({" or "([", tag terminates at the "(".
+ * This is for help on functions, e.g.: abs({expr}).
+ */
+ if (*s == '(' && (s[1] == '{' || s[1] =='['))
+ break;
+
+ /*
* If tag starts with ', toss everything after a second '. Fixes
* CTRL-] on 'option'. (would include the trailing '.').
*/
diff --git a/src/testdir/test_help_tagjump.vim b/src/testdir/test_help_tagjump.vim
index d1e9ad4..f486583 100644
--- a/src/testdir/test_help_tagjump.vim
+++ b/src/testdir/test_help_tagjump.vim
@@ -15,4 +15,14 @@ func Test_help_tagjump()
call assert_equal("help", &filetype)
call assert_true(getline('.') =~ "\\*'buflisted'\\*")
helpclose
+
+ exec "help! abs({expr})"
+ call assert_equal("help", &filetype)
+ call assert_true(getline('.') =~ '\*abs()\*')
+ helpclose
+
+ exec "help! arglistid([{winnr}"
+ call assert_equal("help", &filetype)
+ call assert_true(getline('.') =~ '\*arglistid()\*')
+ helpclose
endfunc
diff --git a/src/version.c b/src/version.c
index 6c94bc6..a8556a8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1728,
+/**/
1727,
/**/
1726,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:59 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 6244a0fc29163ba1c734f92b55a89e01e6cf2a67
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 14:09:25 2016 +0200

patch 7.4.1729
Problem: The Perl interface cannot use 'print' operator for writing
directly in standard IO.
Solution: Add a minimal implementation of PerlIO Layer feature and try to
use it for STDOUT/STDERR. (Damien)
---
src/if_perl.xs | 98 ++++++++++++++++++++++++++++++++++++++++++++++-
src/testdir/test_perl.vim | 11 ++++++
src/version.c | 2 +
3 files changed, 110 insertions(+), 1 deletion(-)

diff --git a/src/if_perl.xs b/src/if_perl.xs
index 4fbc13e..b091bf7 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -57,7 +57,9 @@
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
-
+#if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
+# include <perliol.h>
+#endif

/*
* Work around clashes between Perl and Vim namespace. proto.h doesn't
@@ -293,6 +295,10 @@ typedef int perl_key;
# define Perl_av_fetch dll_Perl_av_fetch
# define Perl_av_len dll_Perl_av_len
# define Perl_sv_2nv_flags dll_Perl_sv_2nv_flags
+# if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
+# define PerlIOBase_pushed dll_PerlIOBase_pushed
+# define PerlIO_define_layer dll_PerlIO_define_layer
+# endif

/*
* Declare HANDLE for perl.dll and function pointers.
@@ -445,6 +451,10 @@ static SV * (*Perl_hv_iterval)(pTHX_ HV *, HE *);
static SV** (*Perl_av_fetch)(pTHX_ AV *, SSize_t, I32);
static SSize_t (*Perl_av_len)(pTHX_ AV *);
static NV (*Perl_sv_2nv_flags)(pTHX_ SV *const, const I32);
+#if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
+static IV (*PerlIOBase_pushed)(pTHX_ PerlIO *, const char *, SV *, PerlIO_funcs *);
+static void (*PerlIO_define_layer)(pTHX_ PerlIO_funcs *);
+#endif

/*
* Table of name to function pointer of perl.
@@ -584,6 +594,10 @@ static struct {
{"Perl_av_fetch", (PERL_PROC*)&Perl_av_fetch},
{"Perl_av_len", (PERL_PROC*)&Perl_av_len},
{"Perl_sv_2nv_flags", (PERL_PROC*)&Perl_sv_2nv_flags},
+#if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
+ {"PerlIOBase_pushed", (PERL_PROC*)&PerlIOBase_pushed},
+ {"PerlIO_define_layer", (PERL_PROC*)&PerlIO_define_layer},
+#endif
{"", NULL},
};

@@ -646,6 +660,10 @@ perl_enabled(int verbose)
}
#endif /* DYNAMIC_PERL */

+#if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
+static void vim_IOLayer_init(void);
+#endif
+
/*
* perl_init(): initialize perl interpreter
* We have to call perl_parse to initialize some structures,
@@ -671,6 +689,8 @@ perl_init(void)
sfdisc(PerlIO_stderr(), sfdcnewvim());
sfsetbuf(PerlIO_stdout(), NULL, 0);
sfsetbuf(PerlIO_stderr(), NULL, 0);
+#elif defined(PERLIO_LAYERS)
+ vim_IOLayer_init();
#endif
}

@@ -1307,6 +1327,82 @@ err:
}
}

+#if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
+typedef struct {
+ struct _PerlIO base;
+ int attr;
+} PerlIOVim;
+
+ static IV
+PerlIOVim_pushed(pTHX_ PerlIO *f, const char *mode,
+ SV *arg, PerlIO_funcs *tab)
+{
+ PerlIOVim *s = PerlIOSelf(f, PerlIOVim);
+ s->attr = 0;
+ if (arg && SvPOK(arg)) {
+ int id = syn_name2id((char_u *)SvPV_nolen(arg));
+ if (id != 0)
+ s->attr = syn_id2attr(id);
+ }
+ return PerlIOBase_pushed(aTHX_ f, mode, (SV *)NULL, tab);
+}
+
+ static SSize_t
+PerlIOVim_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
+{
+ char_u *str;
+ PerlIOVim * s = PerlIOSelf(f, PerlIOVim);
+
+ str = vim_strnsave((char_u *)vbuf, count);
+ if (str == NULL)
+ return 0;
+ msg_split((char_u *)str, s->attr);
+ vim_free(str);
+
+ return count;
+}
+
+static PERLIO_FUNCS_DECL(PerlIO_Vim) = {
+ sizeof(PerlIO_funcs),
+ "Vim",
+ sizeof(PerlIOVim),
+ PERLIO_K_DUMMY, /* flags */
+ PerlIOVim_pushed,
+ NULL, /* popped */
+ NULL, /* open */
+ NULL, /* binmode */
+ NULL, /* arg */
+ NULL, /* fileno */
+ NULL, /* dup */
+ NULL, /* read */
+ NULL, /* unread */
+ PerlIOVim_write,
+ NULL, /* seek */
+ NULL, /* tell */
+ NULL, /* close */
+ NULL, /* flush */
+ NULL, /* fill */
+ NULL, /* eof */
+ NULL, /* error */
+ NULL, /* clearerr */
+ NULL, /* setlinebuf */
+ NULL, /* get_base */
+ NULL, /* get_bufsiz */
+ NULL, /* get_ptr */
+ NULL, /* get_cnt */
+ NULL /* set_ptrcnt */
+};
+
+/* Use Vim routine for print operator */
+ static void
+vim_IOLayer_init(void)
+{
+ PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_Vim));
+ (void)eval_pv( "binmode(STDOUT, ':Vim')"
+ " && binmode(STDERR, ':Vim(ErrorMsg)');", 0);
+}
+#endif /* PERLIO_LAYERS && !USE_SFIO */
+
#ifndef FEAT_WINDOWS
int
win_valid(win_T *w)
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim
index 79e24f4..b523805 100644
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -92,3 +92,14 @@ function Test_VIM_package()
perl VIM::SetOption('et')
call assert_true(&et)
endf
+
+function Test_stdio()
+ redir =>l:out
+ perl <<EOF
+ VIM::Msg("&VIM::Msg");
+ print "STDOUT";
+ print STDERR "STDERR";
+EOF
+ redir END
+ call assert_equal(['&VIM::Msg', 'STDOUT', 'STDERR'], split(l:out, "\n"))
+endf
diff --git a/src/version.c b/src/version.c
index a8556a8..2683123 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1729,
+/**/
1728,
/**/
1727,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:59 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 58de0e2dcc1f2d251b74892a06d71a14973f3187
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 15:13:46 2016 +0200

patch 7.4.1730
Problem: It is not easy to get a character out of a string.
Solution: Add strgetchar() and strcharpart().
---
src/eval.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++
src/testdir/test_expr.vim | 47 ++++++++++++++++++++
src/version.c | 2 +
3 files changed, 158 insertions(+)

diff --git a/src/eval.c b/src/eval.c
index 8658045..9dd4d84 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -779,9 +779,11 @@ static void f_strchars(typval_T *argvars, typval_T *rettv);
#ifdef HAVE_STRFTIME
static void f_strftime(typval_T *argvars, typval_T *rettv);
#endif
+static void f_strgetchar(typval_T *argvars, typval_T *rettv);
static void f_stridx(typval_T *argvars, typval_T *rettv);
static void f_string(typval_T *argvars, typval_T *rettv);
static void f_strlen(typval_T *argvars, typval_T *rettv);
+static void f_strcharpart(typval_T *argvars, typval_T *rettv);
static void f_strpart(typval_T *argvars, typval_T *rettv);
static void f_strridx(typval_T *argvars, typval_T *rettv);
static void f_strtrans(typval_T *argvars, typval_T *rettv);
@@ -8635,11 +8637,13 @@ static struct fst
{"str2float", 1, 1, f_str2float},
#endif
{"str2nr", 1, 2, f_str2nr},
+ {"strcharpart", 2, 3, f_strcharpart},
{"strchars", 1, 2, f_strchars},
{"strdisplaywidth", 1, 2, f_strdisplaywidth},
#ifdef HAVE_STRFTIME
{"strftime", 1, 2, f_strftime},
#endif
+ {"strgetchar", 2, 2, f_strgetchar},
{"stridx", 2, 3, f_stridx},
{"string", 1, 1, f_string},
{"strlen", 1, 1, f_strlen},
@@ -19551,6 +19555,46 @@ f_strftime(typval_T *argvars, typval_T *rettv)
#endif

/*
+ * "strgetchar()" function
+ */
+ static void
+f_strgetchar(typval_T *argvars, typval_T *rettv)
+{
+ char_u *str;
+ int len;
+ int error = FALSE;
+ int charidx;
+
+ rettv->vval.v_number = -1;
+ str = get_tv_string_chk(&argvars[0]);
+ if (str == NULL)
+ return;
+ len = (int)STRLEN(str);
+ charidx = get_tv_number_chk(&argvars[1], &error);
+ if (error)
+ return;
+#ifdef FEAT_MBYTE
+ {
+ int byteidx = 0;
+
+ while (charidx >= 0 && byteidx < len)
+ {
+ if (charidx == 0)
+ {
+ rettv->vval.v_number = mb_ptr2char(str + byteidx);
+ break;
+ }
+ --charidx;
+ byteidx += mb_char2len(str[byteidx]);
+ }
+ }
+#else
+ if (charidx < len)
+ rettv->vval.v_number = str[charidx];
+#endif
+}
+
+/*
* "stridx()" function
*/
static void
@@ -19678,6 +19722,71 @@ f_strwidth(typval_T *argvars, typval_T *rettv)
}

/*
+ * "strcharpart()" function
+ */
+ static void
+f_strcharpart(typval_T *argvars, typval_T *rettv)
+{
+#ifdef FEAT_MBYTE
+ char_u *p;
+ int nchar;
+ int nbyte = 0;
+ int charlen;
+ int len = 0;
+ int slen;
+ int error = FALSE;
+
+ p = get_tv_string(&argvars[0]);
+ slen = (int)STRLEN(p);
+
+ nchar = get_tv_number_chk(&argvars[1], &error);
+ if (!error)
+ {
+ if (nchar > 0)
+ while (nchar > 0 && nbyte < slen)
+ {
+ nbyte += mb_char2len(p[nbyte]);
+ --nchar;
+ }
+ else
+ nbyte = nchar;
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+ charlen = get_tv_number(&argvars[2]);
+ while (charlen > 0 && nbyte + len < slen)
+ {
+ len += mb_char2len(p[nbyte + len]);
+ --charlen;
+ }
+ }
+ else
+ len = slen - nbyte; /* default: all bytes that are available. */
+ }
+
+ /*
+ * Only return the overlap between the specified part and the actual
+ * string.
+ */
+ if (nbyte < 0)
+ {
+ len += nbyte;
+ nbyte = 0;
+ }
+ else if (nbyte > slen)
+ nbyte = slen;
+ if (len < 0)
+ len = 0;
+ else if (nbyte + len > slen)
+ len = slen - nbyte;
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = vim_strnsave(p + nbyte, len);
+#else
+ f_strpart(argvars, rettv);
+#endif
+}
+
+/*
* "strpart()" function
*/
static void
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index 33115c7..cdaf45e 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -50,3 +50,50 @@ func Test_dict()
call assert_equal('none', d[''])
call assert_equal('aaa', d['a'])
endfunc
+
+func Test_strgetchar()
+ call assert_equal(char2nr('a'), strgetchar('axb', 0))
+ call assert_equal(char2nr('x'), strgetchar('axb', 1))
+ call assert_equal(char2nr('b'), strgetchar('axb', 2))
+
+ call assert_equal(-1, strgetchar('axb', -1))
+ call assert_equal(-1, strgetchar('axb', 3))
+ call assert_equal(-1, strgetchar('', 0))
+
+ if !has('multi_byte')
+ return
+ endif
+
+ call assert_equal(char2nr('á'), strgetchar('áxb', 0))
+ call assert_equal(char2nr('x'), strgetchar('áxb', 1))
+
+ call assert_equal(char2nr('a'), strgetchar('àxb', 0))
+ call assert_equal(char2nr('̀'), strgetchar('àxb', 1))
+ call assert_equal(char2nr('x'), strgetchar('àxb', 2))
+endfunc
+
+func Test_strcharpart()
+ call assert_equal('a', strcharpart('axb', 0, 1))
+ call assert_equal('x', strcharpart('axb', 1, 1))
+ call assert_equal('b', strcharpart('axb', 2, 1))
+ call assert_equal('xb', strcharpart('axb', 1))
+
+ call assert_equal('', strcharpart('axb', 1, 0))
+ call assert_equal('', strcharpart('axb', 1, -1))
+ call assert_equal('', strcharpart('axb', -1, 1))
+ call assert_equal('', strcharpart('axb', -2, 2))
+
+ call assert_equal('a', strcharpart('axb', -1, 2))
+
+ if !has('multi_byte')
+ return
+ endif
+
+ call assert_equal('áxb', strcharpart('áxb', 0))
+ call assert_equal('á', strcharpart('áxb', 0, 1))
+ call assert_equal('x', strcharpart('áxb', 1, 1))
+
+ call assert_equal('a', strcharpart('àxb', 0, 1))
+ call assert_equal('̀', strcharpart('àxb', 1, 1))
+ call assert_equal('x', strcharpart('àxb', 2, 1))
+endfunc
diff --git a/src/version.c b/src/version.c
index 2683123..7132e0b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1730,
+/**/
1729,
/**/
1728,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:59 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 8110a091bc749d8748a20807a724a3af3ca6d509
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 15:56:09 2016 +0200

patch 7.4.1731
Problem: Python: turns partial into simple funcref.
Solution: Use partials like partials. (Nikolai Pavlov, closes #734)
---
runtime/doc/if_pyth.txt | 28 ++++-
src/eval.c | 3 +-
src/if_py_both.h | 294 +++++++++++++++++++++++++++++++++++++++++++-----
src/if_python.c | 10 +-
src/if_python3.c | 10 +-
src/proto/eval.pro | 1 +
src/testdir/test86.in | 203 +++++++++++++++++++++++++++++++--
src/testdir/test86.ok | 114 ++++++++++++++++++-
src/testdir/test87.in | 206 +++++++++++++++++++++++++++++++--
src/testdir/test87.ok | 114 ++++++++++++++++++-
src/version.c | 2 +
11 files changed, 923 insertions(+), 62 deletions(-)

diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 4f79c57..3d91814 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -653,10 +653,25 @@ vim.List object *python-List*
class List(vim.List): # Subclassing

vim.Function object *python-Function*
- Function-like object, acting like vim |Funcref| object. Supports `.name`
- attribute and is callable. Accepts special keyword argument `self`, see
- |Dictionary-function|. You can also use `vim.Function(name)` constructor,
- it is the same as `vim.bindeval('function(%s)'%json.dumps(name))`.
+ Function-like object, acting like vim |Funcref| object. Accepts special
+ keyword argument `self`, see |Dictionary-function|. You can also use
+ `vim.Function(name)` constructor, it is the same as
+ `vim.bindeval('function(%s)'%json.dumps(name))`.
+
+ Attributes (read-only):
+ Attribute Description ~
+ name Function name.
+ args `None` or a |python-List| object with arguments. Note that
+ this is a copy of the arguments list, constructed each time
+ you request this attribute. Modifications made to the list
+ will be ignored (but not to the containers inside argument
+ list: this is like |copy()| and not |deepcopy()|).
+ self `None` or a |python-Dictionary| object with self
+ dictionary. Note that explicit `self` keyword used when
+ calling resulting object overrides this attribute.
+
+ Constructor additionally accepts `args` and `self` keywords. If any of
+ them is given then it constructs a partial, see |function()|.

Examples: >
f = vim.Function('tr') # Constructor
@@ -670,6 +685,11 @@ vim.Function object *python-Function*
print f(self={}) # Like call('DictFun', [], {})
print isinstance(f, vim.Function) # True

+ p = vim.Function('DictFun', self={})
+ print f()
+ p = vim.Function('tr', args=['abc', 'a'])
+ print f('b')
+
==============================================================================
8. pyeval() and py3eval() Vim functions *python-pyeval*

diff --git a/src/eval.c b/src/eval.c
index 9dd4d84..5ced88e 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -453,7 +453,6 @@ static long dict_len(dict_T *d);
static char_u *dict2string(typval_T *tv, int copyID);
static int get_dict_tv(char_u **arg, typval_T *rettv, int evaluate);
static char_u *echo_string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
-static char_u *tv2string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
static char_u *string_quote(char_u *str, int function);
static int get_env_tv(char_u **arg, typval_T *rettv, int evaluate);
static int find_internal_func(char_u *name);
@@ -8153,7 +8152,7 @@ echo_string(
* Puts quotes around strings, so that they can be parsed back by eval().
* May return NULL.
*/
- static char_u *
+ char_u *
tv2string(
typval_T *tv,
char_u **tofree,
diff --git a/src/if_py_both.h b/src/if_py_both.h
index ee88260..d6ae880 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -72,6 +72,7 @@ typedef void (*runner)(const char *, void *
static int ConvertFromPyObject(PyObject *, typval_T *);
static int _ConvertFromPyObject(PyObject *, typval_T *, PyObject *);
static int ConvertFromPyMapping(PyObject *, typval_T *);
+static int ConvertFromPySequence(PyObject *, typval_T *);
static PyObject *WindowNew(win_T *, tabpage_T *);
static PyObject *BufferNew (buf_T *);
static PyObject *LineToString(const char *);
@@ -1433,6 +1434,7 @@ typedef struct pylinkedlist_S {

static pylinkedlist_T *lastdict = NULL;
static pylinkedlist_T *lastlist = NULL;
+static pylinkedlist_T *lastfunc = NULL;

static void
pyll_remove(pylinkedlist_T *ref, pylinkedlist_T **last)
@@ -2828,14 +2830,20 @@ typedef struct
{
PyObject_HEAD
char_u *name;
+ int argc;
+ typval_T *argv;
+ dict_T *self;
+ pylinkedlist_T ref;
} FunctionObject;

static PyTypeObject FunctionType;

-#define NEW_FUNCTION(name) FunctionNew(&FunctionType, name)
+#define NEW_FUNCTION(name, argc, argv, self) \
+ FunctionNew(&FunctionType, name, argc, argv, self)

static PyObject *
-FunctionNew(PyTypeObject *subtype, char_u *name)
+FunctionNew(PyTypeObject *subtype, char_u *name, int argc, typval_T *argv,
+ dict_T *selfdict)
{
FunctionObject *self;

@@ -2865,6 +2873,13 @@ FunctionNew(PyTypeObject *subtype, char_u *name)
return NULL;
}

+ self->argc = argc;
+ self->argv = argv;
+ self->self = selfdict;
+
+ if (self->argv || self->self)
+ pyll_add((PyObject *)(self), &self->ref, &lastfunc);
+
return (PyObject *)(self);
}

@@ -2872,19 +2887,59 @@ FunctionNew(PyTypeObject *subtype, char_u *name)
FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
{
PyObject *self;
+ PyObject *selfdictObject;
+ PyObject *argsObject = NULL;
char_u *name;
+ typval_T selfdicttv;
+ typval_T argstv;
+ list_T *argslist = NULL;
+ dict_T *selfdict = NULL;
+ int argc = 0;
+ typval_T *argv = NULL;
+ typval_T *curtv;
+ listitem_T *li;

- if (kwargs)
+ if (kwargs != NULL)
{
- PyErr_SET_STRING(PyExc_TypeError,
- N_("function constructor does not accept keyword arguments"));
- return NULL;
+ selfdictObject = PyDict_GetItemString(kwargs, "self");
+ if (selfdictObject != NULL)
+ {
+ if (ConvertFromPyMapping(selfdictObject, &selfdicttv) == -1)
+ return NULL;
+ selfdict = selfdicttv.vval.v_dict;
+ }
+ argsObject = PyDict_GetItemString(kwargs, "args");
+ if (argsObject != NULL)
+ {
+ if (ConvertFromPySequence(argsObject, &argstv) == -1)
+ {
+ dict_unref(selfdict);
+ return NULL;
+ }
+ argslist = argstv.vval.v_list;
+
+ argc = argslist->lv_len;
+ if (argc != 0)
+ {
+ argv = PyMem_New(typval_T, (size_t) argc);
+ curtv = argv;
+ for (li = argslist->lv_first; li != NULL; li = li->li_next)
+ copy_tv(&li->li_tv, curtv++);
+ }
+ list_unref(argslist);
+ }
}

if (!PyArg_ParseTuple(args, "et", "ascii", &name))
+ {
+ dict_unref(selfdict);
+ while (argc--)
+ clear_tv(&argv[argc]);
+ PyMem_Free(argv);
return NULL;
+ }

- self = FunctionNew(subtype, name);
+ self = FunctionNew(subtype, name, argc, argv, selfdict);

PyMem_Free(name);

@@ -2894,14 +2949,21 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
static void
FunctionDestructor(FunctionObject *self)
{
+ int i;
func_unref(self->name);
vim_free(self->name);
+ for (i = 0; i < self->argc; ++i)
+ clear_tv(&self->argv[i]);
+ PyMem_Free(self->argv);
+ dict_unref(self->self);
+ if (self->argv || self->self)
+ pyll_remove(&self->ref, &lastfunc);

DESTRUCTOR_FINISH(self);
}

static char *FunctionAttrs[] = {
- "softspace",
+ "softspace", "args", "self",
NULL
};

@@ -2912,6 +2974,69 @@ FunctionDir(PyObject *self)
}

static PyObject *
+FunctionAttr(FunctionObject *self, char *name)
+{
+ list_T *list;
+ int i;
+ if (strcmp(name, "name") == 0)
+ return PyString_FromString((char *)(self->name));
+ else if (strcmp(name, "args") == 0)
+ {
+ if (self->argv == NULL)
+ return AlwaysNone(NULL);
+ list = list_alloc();
+ for (i = 0; i < self->argc; ++i)
+ list_append_tv(list, &self->argv[i]);
+ return NEW_LIST(list);
+ }
+ else if (strcmp(name, "self") == 0)
+ return self->self == NULL
+ ? AlwaysNone(NULL)
+ : NEW_DICTIONARY(self->self);
+ else if (strcmp(name, "__members__") == 0)
+ return ObjectDir(NULL, FunctionAttrs);
+ return NULL;
+}
+
+/* Populate partial_T given function object.
+ *
+ * "exported" should be set to true when it is needed to construct a partial
+ * that may be stored in a variable (i.e. may be freed by Vim).
+ */
+ static void
+set_partial(FunctionObject *self, partial_T *pt, int exported)
+{
+ typval_T *curtv;
+ int i;
+
+ pt->pt_name = self->name;
+ if (self->argv)
+ {
+ pt->pt_argc = self->argc;
+ if (exported)
+ {
+ pt->pt_argv = (typval_T *)alloc_clear(
+ sizeof(typval_T) * self->argc);
+ for (i = 0; i < pt->pt_argc; ++i)
+ copy_tv(&self->argv[i], &pt->pt_argv[i]);
+ }
+ else
+ pt->pt_argv = self->argv;
+ }
+ else
+ {
+ pt->pt_argc = 0;
+ pt->pt_argv = NULL;
+ }
+ pt->pt_dict = self->self;
+ if (exported && self->self)
+ ++pt->pt_dict->dv_refcount;
+ if (exported)
+ pt->pt_name = vim_strsave(pt->pt_name);
+ pt->pt_refcount = 1;
+}
+
+ static PyObject *
FunctionCall(FunctionObject *self, PyObject *argsObject, PyObject *kwargs)
{
char_u *name = self->name;
@@ -2922,8 +3047,10 @@ FunctionCall(FunctionObject *self, PyObject *argsObject, PyObject *kwargs)
PyObject *selfdictObject;
PyObject *ret;
int error;
+ partial_T pt;
+ partial_T *pt_ptr = NULL;

- if (ConvertFromPyObject(argsObject, &args) == -1)
+ if (ConvertFromPySequence(argsObject, &args) == -1)
return NULL;

if (kwargs != NULL)
@@ -2940,11 +3067,17 @@ FunctionCall(FunctionObject *self, PyObject *argsObject, PyObject *kwargs)
}
}

+ if (self->argv || self->self)
+ {
+ set_partial(self, &pt, FALSE);
+ pt_ptr = &pt;
+ }
+
Py_BEGIN_ALLOW_THREADS
Python_Lock_Vim();

VimTryStart();
- error = func_call(name, &args, NULL, selfdict, &rettv);
+ error = func_call(name, &args, pt_ptr, selfdict, &rettv);

Python_Release_Vim();
Py_END_ALLOW_THREADS
@@ -2970,14 +3103,49 @@ FunctionCall(FunctionObject *self, PyObject *argsObject, PyObject *kwargs)
static PyObject *
FunctionRepr(FunctionObject *self)
{
-#ifdef Py_TRACE_REFS
- /* For unknown reason self->name may be NULL after calling
- * Finalize */
- return PyString_FromFormat("<vim.Function '%s'>",
- (self->name == NULL ? "<NULL>" : (char *)self->name));
-#else
- return PyString_FromFormat("<vim.Function '%s'>", (char *)self->name);
-#endif
+ PyObject *ret;
+ garray_T repr_ga;
+ int i;
+ char_u *tofree = NULL;
+ typval_T tv;
+ char_u numbuf[NUMBUFLEN];
+
+ ga_init2(&repr_ga, (int)sizeof(char), 70);
+ ga_concat(&repr_ga, (char_u *)"<vim.Function '");
+ if (self->name)
+ ga_concat(&repr_ga, self->name);
+ else
+ ga_concat(&repr_ga, (char_u *)"<NULL>");
+ ga_append(&repr_ga, '\'');
+ if (self->argv)
+ {
+ ga_concat(&repr_ga, (char_u *)", args=[");
+ ++emsg_silent;
+ for (i = 0; i < self->argc; i++)
+ {
+ if (i != 0)
+ ga_concat(&repr_ga, (char_u *)", ");
+ ga_concat(&repr_ga, tv2string(&self->argv[i], &tofree, numbuf,
+ get_copyID()));
+ vim_free(tofree);
+ }
+ --emsg_silent;
+ ga_append(&repr_ga, ']');
+ }
+ if (self->self)
+ {
+ ga_concat(&repr_ga, (char_u *)", self=");
+ tv.v_type = VAR_DICT;
+ tv.vval.v_dict = self->self;
+ ++emsg_silent;
+ ga_concat(&repr_ga, tv2string(&tv, &tofree, numbuf, get_copyID()));
+ --emsg_silent;
+ vim_free(tofree);
+ }
+ ga_append(&repr_ga, '>');
+ ret = PyString_FromString((char *)repr_ga.ga_data);
+ ga_clear(&repr_ga);
+ return ret;
}

static struct PyMethodDef FunctionMethods[] = {
@@ -5551,11 +5719,13 @@ set_ref_in_py(const int copyID)
pylinkedlist_T *cur;
dict_T *dd;
list_T *ll;
+ int i;
int abort = FALSE;
+ FunctionObject *func;

if (lastdict != NULL)
{
- for(cur = lastdict ; !abort && cur != NULL ; cur = cur->pll_prev)
+ for (cur = lastdict ; !abort && cur != NULL ; cur = cur->pll_prev)
{
dd = ((DictionaryObject *) (cur->pll_obj))->dict;
if (dd->dv_copyID != copyID)
@@ -5568,7 +5738,7 @@ set_ref_in_py(const int copyID)

if (lastlist != NULL)
{
- for(cur = lastlist ; !abort && cur != NULL ; cur = cur->pll_prev)
+ for (cur = lastlist ; !abort && cur != NULL ; cur = cur->pll_prev)
{
ll = ((ListObject *) (cur->pll_obj))->list;
if (ll->lv_copyID != copyID)
@@ -5579,6 +5749,24 @@ set_ref_in_py(const int copyID)
}
}

+ if (lastfunc != NULL)
+ {
+ for (cur = lastfunc ; !abort && cur != NULL ; cur = cur->pll_prev)
+ {
+ func = (FunctionObject *) cur->pll_obj;
+ if (func->self != NULL && func->self->dv_copyID != copyID)
+ {
+ func->self->dv_copyID = copyID;
+ abort = abort || set_ref_in_ht(
+ &func->self->dv_hashtab, copyID, NULL);
+ }
+ if (func->argc)
+ for (i = 0; !abort && i < func->argc; ++i)
+ abort = abort
+ || set_ref_in_item(&func->argv[i], copyID, NULL, NULL);
+ }
+ }
+
return abort;
}

@@ -5880,6 +6068,34 @@ ConvertFromPyMapping(PyObject *obj, typval_T *tv)
}

static int
+ConvertFromPySequence(PyObject *obj, typval_T *tv)
+{
+ PyObject *lookup_dict;
+ int ret;
+
+ if (!(lookup_dict = PyDict_New()))
+ return -1;
+
+ if (PyType_IsSubtype(obj->ob_type, &ListType))
+ {
+ tv->v_type = VAR_LIST;
+ tv->vval.v_list = (((ListObject *)(obj))->list);
+ ++tv->vval.v_list->lv_refcount;
+ }
+ else if (PyIter_Check(obj) || PySequence_Check(obj))
+ return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
+ else
+ {
+ PyErr_FORMAT(PyExc_TypeError,
+ N_("unable to convert %s to vim list"),
+ Py_TYPE_NAME(obj));
+ ret = -1;
+ }
+ Py_DECREF(lookup_dict);
+ return ret;
+}
+
+ static int
ConvertFromPyObject(PyObject *obj, typval_T *tv)
{
PyObject *lookup_dict;
@@ -5909,11 +6125,22 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookup_dict)
}
else if (PyType_IsSubtype(obj->ob_type, &FunctionType))
{
- if (set_string_copy(((FunctionObject *) (obj))->name, tv) == -1)
- return -1;
+ FunctionObject *func = (FunctionObject *) obj;
+ if (func->self != NULL || func->argv != NULL)
+ {
+ partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T));
+ set_partial(func, pt, TRUE);
+ tv->vval.v_partial = pt;
+ tv->v_type = VAR_PARTIAL;
+ }
+ else
+ {
+ if (set_string_copy(func->name, tv) == -1)
+ return -1;

- tv->v_type = VAR_FUNC;
- func_ref(tv->vval.v_string);
+ tv->v_type = VAR_FUNC;
+ }
+ func_ref(func->name);
}
else if (PyBytes_Check(obj))
{
@@ -6009,6 +6236,8 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookup_dict)
static PyObject *
ConvertToPyObject(typval_T *tv)
{
+ typval_T *argv;
+ int i;
if (tv == NULL)
{
PyErr_SET_VIM(N_("internal error: NULL reference passed"));
@@ -6031,10 +6260,23 @@ ConvertToPyObject(typval_T *tv)
return NEW_DICTIONARY(tv->vval.v_dict);
case VAR_FUNC:
return NEW_FUNCTION(tv->vval.v_string == NULL
- ? (char_u *)"" : tv->vval.v_string);
+ ? (char_u *)"" : tv->vval.v_string,
+ 0, NULL, NULL);
case VAR_PARTIAL:
+ if (tv->vval.v_partial->pt_argc)
+ {
+ argv = PyMem_New(typval_T, (size_t)tv->vval.v_partial->pt_argc);
+ for (i = 0; i < tv->vval.v_partial->pt_argc; i++)
+ copy_tv(&tv->vval.v_partial->pt_argv[i], &argv[i]);
+ }
+ else
+ argv = NULL;
+ if (tv->vval.v_partial->pt_dict != NULL)
+ tv->vval.v_partial->pt_dict->dv_refcount++;
return NEW_FUNCTION(tv->vval.v_partial == NULL
- ? (char_u *)"" : tv->vval.v_partial->pt_name);
+ ? (char_u *)"" : tv->vval.v_partial->pt_name,
+ tv->vval.v_partial->pt_argc, argv,
+ tv->vval.v_partial->pt_dict);
case VAR_UNKNOWN:
case VAR_CHANNEL:
case VAR_JOB:
diff --git a/src/if_python.c b/src/if_python.c
index fa3fc88..a54a0e2 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -1539,12 +1539,12 @@ ListGetattr(PyObject *self, char *name)
static PyObject *
FunctionGetattr(PyObject *self, char *name)
{
- FunctionObject *this = (FunctionObject *)(self);
+ PyObject *r;

- if (strcmp(name, "name") == 0)
- return PyString_FromString((char *)(this->name));
- else if (strcmp(name, "__members__") == 0)
- return ObjectDir(NULL, FunctionAttrs);
+ r = FunctionAttr((FunctionObject *)(self), name);
+
+ if (r || PyErr_Occurred())
+ return r;
else
return Py_FindMethod(FunctionMethods, self, name);
}
diff --git a/src/if_python3.c b/src/if_python3.c
index 5cf508f..d2f6066 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1528,14 +1528,16 @@ ListSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
static PyObject *
FunctionGetattro(PyObject *self, PyObject *nameobj)
{
+ PyObject *r;
FunctionObject *this = (FunctionObject *)(self);

GET_ATTR_STRING(name, nameobj);

- if (strcmp(name, "name") == 0)
- return PyUnicode_FromString((char *)(this->name));
-
- return PyObject_GenericGetAttr(self, nameobj);
+ r = FunctionAttr(this, name);
+ if (r || PyErr_Occurred())
+ return r;
+ else
+ return PyObject_GenericGetAttr(self, nameobj);
}

/* External interface
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index 9fda13c..60fad80 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -150,4 +150,5 @@ void ex_oldfiles(exarg_T *eap);
void reset_v_option_vars(void);
int modify_fname(char_u *src, int *usedlen, char_u **fnamep, char_u **bufp, int *fnamelen);
char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, char_u *flags);
+char_u *tv2string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
/* vim: set ft=c : */
diff --git a/src/testdir/test86.in b/src/testdir/test86.in
index cc76cff..6f47ff6 100644
--- a/src/testdir/test86.in
+++ b/src/testdir/test86.in
@@ -13,6 +13,7 @@ STARTTEST
:lang C
:fun Test()
:py import vim
+:py cb = vim.current.buffer
:let l = []
:py l=vim.bindeval('l')
:py f=vim.bindeval('function("strlen")')
@@ -207,7 +208,15 @@ EOF
:let l = [0, 1, 2, 3]
:py l=vim.bindeval('l')
:lockvar! l
-:py l[2]='i'
+py << EOF
+def emsg(ei):
+ return ei[0].__name__ + ':' + repr(ei[1].args)
+
+try:
+ l[2]='i'
+except vim.error:
+ cb.append('l[2] threw vim.error: ' + emsg(sys.exc_info()))
+EOF
:$put =string(l)
:unlockvar! l
:"
@@ -219,7 +228,7 @@ def ee(expr, g=globals(), l=locals()):
exec(expr, g, l)
except:
ei = sys.exc_info()
- msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args)
+ msg = emsg(ei)
msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'')
if expr.find('None') > -1:
msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
@@ -611,7 +620,6 @@ EOF
: autocmd BufFilePre * python cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
:augroup END
py << EOF
-cb = vim.current.buffer
# Tests BufferAppend and BufferItem
cb.append(b[0])
# Tests BufferSlice and BufferAssSlice
@@ -865,6 +873,175 @@ EOF
:$put =string(pyeval('vim.List()'))
:$put =string(pyeval('vim.List(iter(''abc7''))'))
:$put =string(pyeval('vim.Function(''tr'')'))
+:$put =string(pyeval('vim.Function(''tr'', args=[123, 3, 4])'))
+:$put =string(pyeval('vim.Function(''tr'', args=[])'))
+:$put =string(pyeval('vim.Function(''tr'', self={})'))
+:$put =string(pyeval('vim.Function(''tr'', args=[123, 3, 4], self={})'))
+:"
+:" Test vim.Function
+:function Args(...)
+: return a:000
+:endfunction
+:function SelfArgs(...) dict
+: return [a:000, self]
+:endfunction
+:" The following four lines should not crash
+:let Pt = function('tr', [[]], {'l': []})
+:py Pt = vim.bindeval('Pt')
+:unlet Pt
+:py del Pt
+py << EOF
+def ecall(out_prefix, func, *args, **kwargs):
+ line = out_prefix + ': '
+ try:
+ ret = func(*args, **kwargs)
+ except Exception:
+ line += '!exception: ' + emsg(sys.exc_info())
+ else:
+ line += '!result: ' + vim.Function('string')(ret)
+ cb.append(line)
+a = vim.Function('Args')
+pa1 = vim.Function('Args', args=['abcArgsPA1'])
+pa2 = vim.Function('Args', args=[])
+pa3 = vim.Function('Args', args=['abcArgsPA3'], self={'abcSelfPA3': 'abcSelfPA3Val'})
+pa4 = vim.Function('Args', self={'abcSelfPA4': 'abcSelfPA4Val'})
+cb.append('a: ' + repr(a))
+cb.append('pa1: ' + repr(pa1))
+cb.append('pa2: ' + repr(pa2))
+cb.append('pa3: ' + repr(pa3))
+cb.append('pa4: ' + repr(pa4))
+sa = vim.Function('SelfArgs')
+psa1 = vim.Function('SelfArgs', args=['abcArgsPSA1'])
+psa2 = vim.Function('SelfArgs', args=[])
+psa3 = vim.Function('SelfArgs', args=['abcArgsPSA3'], self={'abcSelfPSA3': 'abcSelfPSA3Val'})
+psa4 = vim.Function('SelfArgs', self={'abcSelfPSA4': 'abcSelfPSA4Val'})
+cb.append('sa: ' + repr(sa))
+cb.append('psa1: ' + repr(psa1))
+cb.append('psa2: ' + repr(psa2))
+cb.append('psa3: ' + repr(psa3))
+cb.append('psa4: ' + repr(psa4))
+
+psar = vim.Function('SelfArgs', args=[{'abcArgsPSAr': 'abcArgsPSArVal'}], self={'abcSelfPSAr': 'abcSelfPSArVal'})
+psar.args[0]['abcArgsPSAr2'] = [psar.self, psar.args[0]]
+psar.self['rec'] = psar
+psar.self['self'] = psar.self
+psar.self['args'] = psar.args
+
+try:
+ cb.append('psar: ' + repr(psar))
+except Exception:
+ cb.append('!!!!!!!! Caught exception: ' + emsg(sys.exc_info()))
+EOF
+:$put ='s(a): '.string(pyeval('a'))
+:$put ='s(pa1): '.string(pyeval('pa1'))
+:$put ='s(pa2): '.string(pyeval('pa2'))
+:$put ='s(pa3): '.string(pyeval('pa3'))
+:$put ='s(pa4): '.string(pyeval('pa4'))
+:$put ='s(sa): '.string(pyeval('sa'))
+:$put ='s(psa1): '.string(pyeval('psa1'))
+:$put ='s(psa2): '.string(pyeval('psa2'))
+:$put ='s(psa3): '.string(pyeval('psa3'))
+:$put ='s(psa4): '.string(pyeval('psa4'))
+:
+:py ecall('a()', a, )
+:py ecall('pa1()', pa1, )
+:py ecall('pa2()', pa2, )
+:py ecall('pa3()', pa3, )
+:py ecall('pa4()', pa4, )
+:py ecall('sa()', sa, )
+:py ecall('psa1()', psa1, )
+:py ecall('psa2()', psa2, )
+:py ecall('psa3()', psa3, )
+:py ecall('psa4()', psa4, )
+:
+:py ecall('a(42, 43)', a, 42, 43)
+:py ecall('pa1(42, 43)', pa1, 42, 43)
+:py ecall('pa2(42, 43)', pa2, 42, 43)
+:py ecall('pa3(42, 43)', pa3, 42, 43)
+:py ecall('pa4(42, 43)', pa4, 42, 43)
+:py ecall('sa(42, 43)', sa, 42, 43)
+:py ecall('psa1(42, 43)', psa1, 42, 43)
+:py ecall('psa2(42, 43)', psa2, 42, 43)
+:py ecall('psa3(42, 43)', psa3, 42, 43)
+:py ecall('psa4(42, 43)', psa4, 42, 43)
+:
+:py ecall('a(42, self={"20": 1})', a, 42, self={'20': 1})
+:py ecall('pa1(42, self={"20": 1})', pa1, 42, self={'20': 1})
+:py ecall('pa2(42, self={"20": 1})', pa2, 42, self={'20': 1})
+:py ecall('pa3(42, self={"20": 1})', pa3, 42, self={'20': 1})
+:py ecall('pa4(42, self={"20": 1})', pa4, 42, self={'20': 1})
+:py ecall('sa(42, self={"20": 1})', sa, 42, self={'20': 1})
+:py ecall('psa1(42, self={"20": 1})', psa1, 42, self={'20': 1})
+:py ecall('psa2(42, self={"20": 1})', psa2, 42, self={'20': 1})
+:py ecall('psa3(42, self={"20": 1})', psa3, 42, self={'20': 1})
+:py ecall('psa4(42, self={"20": 1})', psa4, 42, self={'20': 1})
+:
+:py ecall('a(self={"20": 1})', a, self={'20': 1})
+:py ecall('pa1(self={"20": 1})', pa1, self={'20': 1})
+:py ecall('pa2(self={"20": 1})', pa2, self={'20': 1})
+:py ecall('pa3(self={"20": 1})', pa3, self={'20': 1})
+:py ecall('pa4(self={"20": 1})', pa4, self={'20': 1})
+:py ecall('sa(self={"20": 1})', sa, self={'20': 1})
+:py ecall('psa1(self={"20": 1})', psa1, self={'20': 1})
+:py ecall('psa2(self={"20": 1})', psa2, self={'20': 1})
+:py ecall('psa3(self={"20": 1})', psa3, self={'20': 1})
+:py ecall('psa4(self={"20": 1})', psa4, self={'20': 1})
+py << EOF
+def s(v):
+ if v is None:
+ return repr(v)
+ else:
+ return vim.Function('string')(v)
+
+cb.append('a.args: ' + s(a.args))
+cb.append('pa1.args: ' + s(pa1.args))
+cb.append('pa2.args: ' + s(pa2.args))
+cb.append('pa3.args: ' + s(pa3.args))
+cb.append('pa4.args: ' + s(pa4.args))
+cb.append('sa.args: ' + s(sa.args))
+cb.append('psa1.args: ' + s(psa1.args))
+cb.append('psa2.args: ' + s(psa2.args))
+cb.append('psa3.args: ' + s(psa3.args))
+cb.append('psa4.args: ' + s(psa4.args))
+
+cb.append('a.self: ' + s(a.self))
+cb.append('pa1.self: ' + s(pa1.self))
+cb.append('pa2.self: ' + s(pa2.self))
+cb.append('pa3.self: ' + s(pa3.self))
+cb.append('pa4.self: ' + s(pa4.self))
+cb.append('sa.self: ' + s(sa.self))
+cb.append('psa1.self: ' + s(psa1.self))
+cb.append('psa2.self: ' + s(psa2.self))
+cb.append('psa3.self: ' + s(psa3.self))
+cb.append('psa4.self: ' + s(psa4.self))
+
+cb.append('a.name: ' + s(a.name))
+cb.append('pa1.name: ' + s(pa1.name))
+cb.append('pa2.name: ' + s(pa2.name))
+cb.append('pa3.name: ' + s(pa3.name))
+cb.append('pa4.name: ' + s(pa4.name))
+cb.append('sa.name: ' + s(sa.name))
+cb.append('psa1.name: ' + s(psa1.name))
+cb.append('psa2.name: ' + s(psa2.name))
+cb.append('psa3.name: ' + s(psa3.name))
+cb.append('psa4.name: ' + s(psa4.name))
+
+del s
+
+del a
+del pa1
+del pa2
+del pa3
+del pa4
+del sa
+del psa1
+del psa2
+del psa3
+del psa4
+del psar
+
+del ecall
+EOF
:"
:" Test stdout/stderr
:redir => messages
@@ -1140,7 +1317,7 @@ ee('vim.foreach_rtp(FailingCall())')
ee('vim.foreach_rtp(int, 2)')
cb.append('> import')
old_rtp = vim.options['rtp']
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
+vim.options['rtp'] = os.getcwd().replace('\\', '\\\\').replace(',', '\\,')
ee('import xxx_no_such_module_xxx')
ee('import failing_import')
ee('import failing')
@@ -1224,9 +1401,20 @@ ee('l.locked = FailingTrue()')
ee('l.xxx = True')
cb.append("> Function")
cb.append(">> FunctionConstructor")
+cb.append(">>> FunctionConstructor")
ee('vim.Function("123")')
ee('vim.Function("xxx_non_existent_function_xxx")')
ee('vim.Function("xxx#non#existent#function#xxx")')
+ee('vim.Function("xxx_non_existent_function_xxx2", args=[])')
+ee('vim.Function("xxx_non_existent_function_xxx3", self={})')
+ee('vim.Function("xxx_non_existent_function_xxx4", args=[], self={})')
+cb.append(">>> FunctionNew")
+ee('vim.Function("tr", self="abcFuncSelf")')
+ee('vim.Function("tr", args=427423)')
+ee('vim.Function("tr", self="abcFuncSelf2", args="abcFuncArgs2")')
+ee('vim.Function(self="abcFuncSelf2", args="abcFuncArgs2")')
+ee('vim.Function("tr", "", self="abcFuncSelf2", args="abcFuncArgs2")')
+ee('vim.Function("tr", "")')
cb.append(">> FunctionCall")
convertfrompyobject_test('f(%s)')
convertfrompymapping_test('fd(self=%s)')
@@ -1381,7 +1569,7 @@ def test_keyboard_interrupt():
except KeyboardInterrupt:
cb.append('Caught KeyboardInterrupt')
except Exception:
- cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
+ cb.append('!!!!!!!! Caught exception: ' + emsg(sys.exc_info()))
else:
cb.append('!!!!!!!! No exception')
try:
@@ -1389,7 +1577,7 @@ def test_keyboard_interrupt():
except KeyboardInterrupt:
cb.append('!!!!!!!! Caught KeyboardInterrupt')
except Exception:
- cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
+ cb.append('!!!!!!!! Caught exception: ' + emsg(sys.exc_info()))
else:
cb.append('No exception')
EOF
@@ -1409,6 +1597,7 @@ EOF
py << EOF
del cb
del ee
+del emsg
del sys
del os
del vim
@@ -1441,7 +1630,7 @@ EOF
:"
:/^start:/,$wq! test.out
:" vim: et ts=4 isk-=\:
-:call getchar()
+:while getchar(0) isnot 0|endwhile
ENDTEST

start:
diff --git a/src/testdir/test86.ok b/src/testdir/test86.ok
index d103909..fe27c05 100644
--- a/src/testdir/test86.ok
+++ b/src/testdir/test86.ok
@@ -57,6 +57,7 @@ None
[0, 1, 2, 3, 4, 5, 6, 7]
[0, 1, 2, 3, 4, 5, 6, 7]
[0, 1, 2, 3, 4, 5, 6, 7]
+l[2] threw vim.error: error:('list is locked',)
[0, 1, 2, 3]
[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
@@ -447,7 +448,7 @@ tabpage:__dir__,__members__,number,valid,vars,window,windows
range:__dir__,__members__,append,end,start
dictionary:__dir__,__members__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
list:__dir__,__members__,extend,locked
-function:__dir__,__members__,softspace
+function:__dir__,__members__,args,self,softspace
output:__dir__,__members__,close,flush,isatty,readable,seekable,softspace,writable,write,writelines
{}
{'a': 1}
@@ -455,12 +456,108 @@ output:__dir__,__members__,close,flush,isatty,readable,seekable,softspace,writab
[]
['a', 'b', 'c', '7']
function('tr')
+function('tr', [123, 3, 4])
+function('tr')
+function('tr', {})
+function('tr', [123, 3, 4], {})
+a: <vim.Function 'Args'>
+pa1: <vim.Function 'Args', args=['abcArgsPA1']>
+pa2: <vim.Function 'Args'>
+pa3: <vim.Function 'Args', args=['abcArgsPA3'], self={'abcSelfPA3': 'abcSelfPA3Val'}>
+pa4: <vim.Function 'Args', self={'abcSelfPA4': 'abcSelfPA4Val'}>
+sa: <vim.Function 'SelfArgs'>
+psa1: <vim.Function 'SelfArgs', args=['abcArgsPSA1']>
+psa2: <vim.Function 'SelfArgs'>
+psa3: <vim.Function 'SelfArgs', args=['abcArgsPSA3'], self={'abcSelfPSA3': 'abcSelfPSA3Val'}>
+psa4: <vim.Function 'SelfArgs', self={'abcSelfPSA4': 'abcSelfPSA4Val'}>
+psar: <vim.Function 'SelfArgs', args=[{'abcArgsPSAr2': [{'rec': function('SelfArgs', [{...}], {...}), 'self': {...}, 'abcSelfPSAr': 'abcSelfPSArVal', 'args': [{...}]}, {...}], 'abcArgsPSAr': 'abcArgsPSArVal'}], self={'rec': function('SelfArgs', [{'abcArgsPSAr2': [{...}, {...}], 'abcArgsPSAr': 'abcArgsPSArVal'}], {...}), 'self': {...}, 'abcSelfPSAr': 'abcSelfPSArVal', 'args': [{...}]}>
+s(a): function('Args')
+s(pa1): function('Args', ['abcArgsPA1'])
+s(pa2): function('Args')
+s(pa3): function('Args', ['abcArgsPA3'], {'abcSelfPA3': 'abcSelfPA3Val'})
+s(pa4): function('Args', {'abcSelfPA4': 'abcSelfPA4Val'})
+s(sa): function('SelfArgs')
+s(psa1): function('SelfArgs', ['abcArgsPSA1'])
+s(psa2): function('SelfArgs')
+s(psa3): function('SelfArgs', ['abcArgsPSA3'], {'abcSelfPSA3': 'abcSelfPSA3Val'})
+s(psa4): function('SelfArgs', {'abcSelfPSA4': 'abcSelfPSA4Val'})
+a(): !result: []
+pa1(): !result: ['abcArgsPA1']
+pa2(): !result: []
+pa3(): !result: ['abcArgsPA3']
+pa4(): !result: []
+sa(): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa1(): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa2(): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa3(): !result: [['abcArgsPSA3'], {'abcSelfPSA3': 'abcSelfPSA3Val'}]
+psa4(): !result: [[], {'abcSelfPSA4': 'abcSelfPSA4Val'}]
+a(42, 43): !result: [42, 43]
+pa1(42, 43): !result: ['abcArgsPA1', 42, 43]
+pa2(42, 43): !result: [42, 43]
+pa3(42, 43): !result: ['abcArgsPA3', 42, 43]
+pa4(42, 43): !result: [42, 43]
+sa(42, 43): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa1(42, 43): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa2(42, 43): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa3(42, 43): !result: [['abcArgsPSA3', 42, 43], {'abcSelfPSA3': 'abcSelfPSA3Val'}]
+psa4(42, 43): !result: [[42, 43], {'abcSelfPSA4': 'abcSelfPSA4Val'}]
+a(42, self={"20": 1}): !result: [42]
+pa1(42, self={"20": 1}): !result: ['abcArgsPA1', 42]
+pa2(42, self={"20": 1}): !result: [42]
+pa3(42, self={"20": 1}): !result: ['abcArgsPA3', 42]
+pa4(42, self={"20": 1}): !result: [42]
+sa(42, self={"20": 1}): !result: [[42], {'20': 1}]
+psa1(42, self={"20": 1}): !result: [['abcArgsPSA1', 42], {'20': 1}]
+psa2(42, self={"20": 1}): !result: [[42], {'20': 1}]
+psa3(42, self={"20": 1}): !result: [['abcArgsPSA3', 42], {'20': 1}]
+psa4(42, self={"20": 1}): !result: [[42], {'20': 1}]
+a(self={"20": 1}): !result: []
+pa1(self={"20": 1}): !result: ['abcArgsPA1']
+pa2(self={"20": 1}): !result: []
+pa3(self={"20": 1}): !result: ['abcArgsPA3']
+pa4(self={"20": 1}): !result: []
+sa(self={"20": 1}): !result: [[], {'20': 1}]
+psa1(self={"20": 1}): !result: [['abcArgsPSA1'], {'20': 1}]
+psa2(self={"20": 1}): !result: [[], {'20': 1}]
+psa3(self={"20": 1}): !result: [['abcArgsPSA3'], {'20': 1}]
+psa4(self={"20": 1}): !result: [[], {'20': 1}]
+a.args: None
+pa1.args: ['abcArgsPA1']
+pa2.args: None
+pa3.args: ['abcArgsPA3']
+pa4.args: None
+sa.args: None
+psa1.args: ['abcArgsPSA1']
+psa2.args: None
+psa3.args: ['abcArgsPSA3']
+psa4.args: None
+a.self: None
+pa1.self: None
+pa2.self: None
+pa3.self: {'abcSelfPA3': 'abcSelfPA3Val'}
+pa4.self: {'abcSelfPA4': 'abcSelfPA4Val'}
+sa.self: None
+psa1.self: None
+psa2.self: None
+psa3.self: {'abcSelfPSA3': 'abcSelfPSA3Val'}
+psa4.self: {'abcSelfPSA4': 'abcSelfPSA4Val'}
+a.name: 'Args'
+pa1.name: 'Args'
+pa2.name: 'Args'
+pa3.name: 'Args'
+pa4.name: 'Args'
+sa.name: 'SelfArgs'
+psa1.name: 'SelfArgs'
+psa2.name: 'SelfArgs'
+psa3.name: 'SelfArgs'
+psa4.name: 'SelfArgs'
'
abcdef
-line :
+Error detected while processing function RunTest[]..Test:
+line :
abcdef
abcA
-line :
+line :
abcB'
['a', 'dup_a']
['a', 'a']
@@ -1046,9 +1143,20 @@ l.locked = FailingTrue():NotImplementedError:('bool',)
l.xxx = True:AttributeError:('cannot set attribute xxx',)
Post by James McCoy
Function
FunctionConstructor
+>>> FunctionConstructor
vim.Function("123"):ValueError:('unnamed function 123 does not exist',)
vim.Function("xxx_non_existent_function_xxx"):ValueError:('function xxx_non_existent_function_xxx does not exist',)
vim.Function("xxx#non#existent#function#xxx"):NOT FAILED
+vim.Function("xxx_non_existent_function_xxx2", args=[]):ValueError:('function xxx_non_existent_function_xxx2 does not exist',)
+vim.Function("xxx_non_existent_function_xxx3", self={}):ValueError:('function xxx_non_existent_function_xxx3 does not exist',)
+vim.Function("xxx_non_existent_function_xxx4", args=[], self={}):ValueError:('function xxx_non_existent_function_xxx4 does not exist',)
+>>> FunctionNew
+vim.Function("tr", self="abcFuncSelf"):TypeError:('unable to convert str to vim dictionary',)
+vim.Function("tr", args=427423):TypeError:('unable to convert int to vim list',)
+vim.Function("tr", self="abcFuncSelf2", args="abcFuncArgs2"):TypeError:('unable to convert str to vim dictionary',)
+vim.Function(self="abcFuncSelf2", args="abcFuncArgs2"):TypeError:('unable to convert str to vim dictionary',)
+vim.Function("tr", "", self="abcFuncSelf2", args="abcFuncArgs2"):TypeError:('unable to convert str to vim dictionary',)
+vim.Function("tr", ""):TypeError:('function takes exactly 1 argument (2 given)',)
Post by James McCoy
FunctionCall
Testing StringToChars using f({%s : 1})
f({1 : 1}):TypeError:('expected str() or unicode() instance, but got int',)
diff --git a/src/testdir/test87.in b/src/testdir/test87.in
index 535a143..e3bc994 100644
--- a/src/testdir/test87.in
+++ b/src/testdir/test87.in
@@ -7,6 +7,7 @@ STARTTEST
:lang C
:fun Test()
:py3 import vim
+:py3 cb = vim.current.buffer
:let l = []
:py3 l=vim.bindeval('l')
:py3 f=vim.bindeval('function("strlen")')
@@ -200,7 +201,15 @@ EOF
:let l = [0, 1, 2, 3]
:py3 l=vim.bindeval('l')
:lockvar! l
-:py3 l[2]='i'
+py3 << EOF
+def emsg(ei):
+ return ei[0].__name__ + ':' + repr(ei[1].args)
+
+try:
+ l[2]='i'
+except vim.error:
+ cb.append('l[2] threw vim.error: ' + emsg(sys.exc_info()))
+EOF
:$put =string(l)
:unlockvar! l
:"
@@ -614,7 +623,6 @@ EOF
: autocmd BufFilePre * python3 cb.append(vim.eval('expand("<abuf>")') + ':BufFilePre:' + vim.eval('bufnr("%")'))
:augroup END
py3 << EOF
-cb = vim.current.buffer
# Tests BufferAppend and BufferItem
cb.append(b[0])
# Tests BufferSlice and BufferAssSlice
@@ -859,6 +867,175 @@ EOF
:$put =string(py3eval('vim.List()'))
:$put =string(py3eval('vim.List(iter(''abc7''))'))
:$put =string(py3eval('vim.Function(''tr'')'))
+:$put =string(py3eval('vim.Function(''tr'', args=[123, 3, 4])'))
+:$put =string(py3eval('vim.Function(''tr'', args=[])'))
+:$put =string(py3eval('vim.Function(''tr'', self={})'))
+:$put =string(py3eval('vim.Function(''tr'', args=[123, 3, 4], self={})'))
+:"
+:" Test vim.Function
+:function Args(...)
+: return a:000
+:endfunction
+:function SelfArgs(...) dict
+: return [a:000, self]
+:endfunction
+:" The following four lines should not crash
+:let Pt = function('tr', [[]], {'l': []})
+:py3 Pt = vim.bindeval('Pt')
+:unlet Pt
+:py3 del Pt
+py3 << EOF
+def ecall(out_prefix, func, *args, **kwargs):
+ line = out_prefix + ': '
+ try:
+ ret = func(*args, **kwargs)
+ except Exception:
+ line += '!exception: ' + emsg(sys.exc_info())
+ else:
+ line += '!result: ' + str(vim.Function('string')(ret), 'utf-8')
+ cb.append(line)
+a = vim.Function('Args')
+pa1 = vim.Function('Args', args=['abcArgsPA1'])
+pa2 = vim.Function('Args', args=[])
+pa3 = vim.Function('Args', args=['abcArgsPA3'], self={'abcSelfPA3': 'abcSelfPA3Val'})
+pa4 = vim.Function('Args', self={'abcSelfPA4': 'abcSelfPA4Val'})
+cb.append('a: ' + repr(a))
+cb.append('pa1: ' + repr(pa1))
+cb.append('pa2: ' + repr(pa2))
+cb.append('pa3: ' + repr(pa3))
+cb.append('pa4: ' + repr(pa4))
+sa = vim.Function('SelfArgs')
+psa1 = vim.Function('SelfArgs', args=['abcArgsPSA1'])
+psa2 = vim.Function('SelfArgs', args=[])
+psa3 = vim.Function('SelfArgs', args=['abcArgsPSA3'], self={'abcSelfPSA3': 'abcSelfPSA3Val'})
+psa4 = vim.Function('SelfArgs', self={'abcSelfPSA4': 'abcSelfPSA4Val'})
+cb.append('sa: ' + repr(sa))
+cb.append('psa1: ' + repr(psa1))
+cb.append('psa2: ' + repr(psa2))
+cb.append('psa3: ' + repr(psa3))
+cb.append('psa4: ' + repr(psa4))
+
+psar = vim.Function('SelfArgs', args=[{'abcArgsPSAr': 'abcArgsPSArVal'}], self={'abcSelfPSAr': 'abcSelfPSArVal'})
+psar.args[0]['abcArgsPSAr2'] = [psar.self, psar.args[0]]
+psar.self['rec'] = psar
+psar.self['self'] = psar.self
+psar.self['args'] = psar.args
+
+try:
+ cb.append('psar: ' + repr(psar))
+except Exception:
+ cb.append('!!!!!!!! Caught exception: ' + emsg(sys.exc_info()))
+EOF
+:$put ='s(a): '.string(py3eval('a'))
+:$put ='s(pa1): '.string(py3eval('pa1'))
+:$put ='s(pa2): '.string(py3eval('pa2'))
+:$put ='s(pa3): '.string(py3eval('pa3'))
+:$put ='s(pa4): '.string(py3eval('pa4'))
+:$put ='s(sa): '.string(py3eval('sa'))
+:$put ='s(psa1): '.string(py3eval('psa1'))
+:$put ='s(psa2): '.string(py3eval('psa2'))
+:$put ='s(psa3): '.string(py3eval('psa3'))
+:$put ='s(psa4): '.string(py3eval('psa4'))
+:
+:py3 ecall('a()', a, )
+:py3 ecall('pa1()', pa1, )
+:py3 ecall('pa2()', pa2, )
+:py3 ecall('pa3()', pa3, )
+:py3 ecall('pa4()', pa4, )
+:py3 ecall('sa()', sa, )
+:py3 ecall('psa1()', psa1, )
+:py3 ecall('psa2()', psa2, )
+:py3 ecall('psa3()', psa3, )
+:py3 ecall('psa4()', psa4, )
+:
+:py3 ecall('a(42, 43)', a, 42, 43)
+:py3 ecall('pa1(42, 43)', pa1, 42, 43)
+:py3 ecall('pa2(42, 43)', pa2, 42, 43)
+:py3 ecall('pa3(42, 43)', pa3, 42, 43)
+:py3 ecall('pa4(42, 43)', pa4, 42, 43)
+:py3 ecall('sa(42, 43)', sa, 42, 43)
+:py3 ecall('psa1(42, 43)', psa1, 42, 43)
+:py3 ecall('psa2(42, 43)', psa2, 42, 43)
+:py3 ecall('psa3(42, 43)', psa3, 42, 43)
+:py3 ecall('psa4(42, 43)', psa4, 42, 43)
+:
+:py3 ecall('a(42, self={"20": 1})', a, 42, self={'20': 1})
+:py3 ecall('pa1(42, self={"20": 1})', pa1, 42, self={'20': 1})
+:py3 ecall('pa2(42, self={"20": 1})', pa2, 42, self={'20': 1})
+:py3 ecall('pa3(42, self={"20": 1})', pa3, 42, self={'20': 1})
+:py3 ecall('pa4(42, self={"20": 1})', pa4, 42, self={'20': 1})
+:py3 ecall('sa(42, self={"20": 1})', sa, 42, self={'20': 1})
+:py3 ecall('psa1(42, self={"20": 1})', psa1, 42, self={'20': 1})
+:py3 ecall('psa2(42, self={"20": 1})', psa2, 42, self={'20': 1})
+:py3 ecall('psa3(42, self={"20": 1})', psa3, 42, self={'20': 1})
+:py3 ecall('psa4(42, self={"20": 1})', psa4, 42, self={'20': 1})
+:
+:py3 ecall('a(self={"20": 1})', a, self={'20': 1})
+:py3 ecall('pa1(self={"20": 1})', pa1, self={'20': 1})
+:py3 ecall('pa2(self={"20": 1})', pa2, self={'20': 1})
+:py3 ecall('pa3(self={"20": 1})', pa3, self={'20': 1})
+:py3 ecall('pa4(self={"20": 1})', pa4, self={'20': 1})
+:py3 ecall('sa(self={"20": 1})', sa, self={'20': 1})
+:py3 ecall('psa1(self={"20": 1})', psa1, self={'20': 1})
+:py3 ecall('psa2(self={"20": 1})', psa2, self={'20': 1})
+:py3 ecall('psa3(self={"20": 1})', psa3, self={'20': 1})
+:py3 ecall('psa4(self={"20": 1})', psa4, self={'20': 1})
+py3 << EOF
+def s(v):
+ if v is None:
+ return repr(v)
+ else:
+ return str(vim.Function('string')(v), 'utf-8')
+
+cb.append('a.args: ' + s(a.args))
+cb.append('pa1.args: ' + s(pa1.args))
+cb.append('pa2.args: ' + s(pa2.args))
+cb.append('pa3.args: ' + s(pa3.args))
+cb.append('pa4.args: ' + s(pa4.args))
+cb.append('sa.args: ' + s(sa.args))
+cb.append('psa1.args: ' + s(psa1.args))
+cb.append('psa2.args: ' + s(psa2.args))
+cb.append('psa3.args: ' + s(psa3.args))
+cb.append('psa4.args: ' + s(psa4.args))
+
+cb.append('a.self: ' + s(a.self))
+cb.append('pa1.self: ' + s(pa1.self))
+cb.append('pa2.self: ' + s(pa2.self))
+cb.append('pa3.self: ' + s(pa3.self))
+cb.append('pa4.self: ' + s(pa4.self))
+cb.append('sa.self: ' + s(sa.self))
+cb.append('psa1.self: ' + s(psa1.self))
+cb.append('psa2.self: ' + s(psa2.self))
+cb.append('psa3.self: ' + s(psa3.self))
+cb.append('psa4.self: ' + s(psa4.self))
+
+cb.append('a.name: ' + s(a.name))
+cb.append('pa1.name: ' + s(pa1.name))
+cb.append('pa2.name: ' + s(pa2.name))
+cb.append('pa3.name: ' + s(pa3.name))
+cb.append('pa4.name: ' + s(pa4.name))
+cb.append('sa.name: ' + s(sa.name))
+cb.append('psa1.name: ' + s(psa1.name))
+cb.append('psa2.name: ' + s(psa2.name))
+cb.append('psa3.name: ' + s(psa3.name))
+cb.append('psa4.name: ' + s(psa4.name))
+
+del s
+
+del a
+del pa1
+del pa2
+del pa3
+del pa4
+del sa
+del psa1
+del psa2
+del psa3
+del psa4
+del psar
+
+del ecall
+EOF
:"
:" Test stdout/stderr
:redir => messages
@@ -1134,7 +1311,7 @@ ee('vim.foreach_rtp(FailingCall())')
ee('vim.foreach_rtp(int, 2)')
cb.append('> import')
old_rtp = vim.options['rtp']
-vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
+vim.options['rtp'] = os.getcwd().replace('\\', '\\\\').replace(',', '\\,')
ee('import xxx_no_such_module_xxx')
ee('import failing_import')
ee('import failing')
@@ -1218,9 +1395,20 @@ ee('l.locked = FailingTrue()')
ee('l.xxx = True')
cb.append("> Function")
cb.append(">> FunctionConstructor")
+cb.append(">>> FunctionConstructor")
ee('vim.Function("123")')
ee('vim.Function("xxx_non_existent_function_xxx")')
ee('vim.Function("xxx#non#existent#function#xxx")')
+ee('vim.Function("xxx_non_existent_function_xxx2", args=[])')
+ee('vim.Function("xxx_non_existent_function_xxx3", self={})')
+ee('vim.Function("xxx_non_existent_function_xxx4", args=[], self={})')
+cb.append(">>> FunctionNew")
+ee('vim.Function("tr", self="abcFuncSelf")')
+ee('vim.Function("tr", args=427423)')
+ee('vim.Function("tr", self="abcFuncSelf2", args="abcFuncArgs2")')
+ee('vim.Function(self="abcFuncSelf2", args="abcFuncArgs2")')
+ee('vim.Function("tr", "", self="abcFuncSelf2", args="abcFuncArgs2")')
+ee('vim.Function("tr", "")')
cb.append(">> FunctionCall")
convertfrompyobject_test('f(%s)')
convertfrompymapping_test('fd(self=%s)')
@@ -1374,16 +1562,16 @@ def test_keyboard_interrupt():
vim.command('while 1 | endwhile')
except KeyboardInterrupt:
cb.append('Caught KeyboardInterrupt')
- except Exception as e:
- cb.append('!!!!!!!! Caught exception: ' + repr(e))
+ except Exception:
+ cb.append('!!!!!!!! Caught exception: ' + emsg(sys.exc_info()))
else:
cb.append('!!!!!!!! No exception')
try:
vim.command('$ put =\'Running :put\'')
except KeyboardInterrupt:
cb.append('!!!!!!!! Caught KeyboardInterrupt')
- except Exception as e:
- cb.append('!!!!!!!! Caught exception: ' + repr(e))
+ except Exception:
+ cb.append('!!!!!!!! Caught exception: ' + emsg(sys.exc_info()))
else:
cb.append('No exception')
EOF
@@ -1403,6 +1591,7 @@ EOF
py3 << EOF
del cb
del ee
+del emsg
del sys
del os
del vim
@@ -1434,8 +1623,9 @@ EOF
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
+:/^start:/,$w! test.out
:" vim: et ts=4 isk-=\:
-:call getchar()
+:while getchar(0) isnot 0|endwhile
ENDTEST

start:
diff --git a/src/testdir/test87.ok b/src/testdir/test87.ok
index 1d9b6e2..25c0b51 100644
--- a/src/testdir/test87.ok
+++ b/src/testdir/test87.ok
@@ -57,6 +57,7 @@ None
[0, 1, 2, 3, 4, 5, 6, 7]
[0, 1, 2, 3, 4, 5, 6, 7]
[0, 1, 2, 3, 4, 5, 6, 7]
+l[2] threw vim.error: error:('list is locked',)
[0, 1, 2, 3]
[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
[function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
@@ -447,7 +448,7 @@ tabpage:__dir__,number,valid,vars,window,windows
range:__dir__,append,end,start
dictionary:__dir__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
list:__dir__,extend,locked
-function:__dir__,softspace
+function:__dir__,args,self,softspace
output:__dir__,close,flush,isatty,readable,seekable,softspace,writable,write,writelines
{}
{'a': 1}
@@ -455,12 +456,108 @@ output:__dir__,close,flush,isatty,readable,seekable,softspace,writable,write,wri
[]
['a', 'b', 'c', '7']
function('tr')
+function('tr', [123, 3, 4])
+function('tr')
+function('tr', {})
+function('tr', [123, 3, 4], {})
+a: <vim.Function 'Args'>
+pa1: <vim.Function 'Args', args=['abcArgsPA1']>
+pa2: <vim.Function 'Args'>
+pa3: <vim.Function 'Args', args=['abcArgsPA3'], self={'abcSelfPA3': 'abcSelfPA3Val'}>
+pa4: <vim.Function 'Args', self={'abcSelfPA4': 'abcSelfPA4Val'}>
+sa: <vim.Function 'SelfArgs'>
+psa1: <vim.Function 'SelfArgs', args=['abcArgsPSA1']>
+psa2: <vim.Function 'SelfArgs'>
+psa3: <vim.Function 'SelfArgs', args=['abcArgsPSA3'], self={'abcSelfPSA3': 'abcSelfPSA3Val'}>
+psa4: <vim.Function 'SelfArgs', self={'abcSelfPSA4': 'abcSelfPSA4Val'}>
+psar: <vim.Function 'SelfArgs', args=[{'abcArgsPSAr2': [{'rec': function('SelfArgs', [{...}], {...}), 'self': {...}, 'abcSelfPSAr': 'abcSelfPSArVal', 'args': [{...}]}, {...}], 'abcArgsPSAr': 'abcArgsPSArVal'}], self={'rec': function('SelfArgs', [{'abcArgsPSAr2': [{...}, {...}], 'abcArgsPSAr': 'abcArgsPSArVal'}], {...}), 'self': {...}, 'abcSelfPSAr': 'abcSelfPSArVal', 'args': [{...}]}>
+s(a): function('Args')
+s(pa1): function('Args', ['abcArgsPA1'])
+s(pa2): function('Args')
+s(pa3): function('Args', ['abcArgsPA3'], {'abcSelfPA3': 'abcSelfPA3Val'})
+s(pa4): function('Args', {'abcSelfPA4': 'abcSelfPA4Val'})
+s(sa): function('SelfArgs')
+s(psa1): function('SelfArgs', ['abcArgsPSA1'])
+s(psa2): function('SelfArgs')
+s(psa3): function('SelfArgs', ['abcArgsPSA3'], {'abcSelfPSA3': 'abcSelfPSA3Val'})
+s(psa4): function('SelfArgs', {'abcSelfPSA4': 'abcSelfPSA4Val'})
+a(): !result: []
+pa1(): !result: ['abcArgsPA1']
+pa2(): !result: []
+pa3(): !result: ['abcArgsPA3']
+pa4(): !result: []
+sa(): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa1(): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa2(): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa3(): !result: [['abcArgsPSA3'], {'abcSelfPSA3': 'abcSelfPSA3Val'}]
+psa4(): !result: [[], {'abcSelfPSA4': 'abcSelfPSA4Val'}]
+a(42, 43): !result: [42, 43]
+pa1(42, 43): !result: ['abcArgsPA1', 42, 43]
+pa2(42, 43): !result: [42, 43]
+pa3(42, 43): !result: ['abcArgsPA3', 42, 43]
+pa4(42, 43): !result: [42, 43]
+sa(42, 43): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa1(42, 43): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa2(42, 43): !exception: error:('Vim:E725: Calling dict function without Dictionary: SelfArgs',)
+psa3(42, 43): !result: [['abcArgsPSA3', 42, 43], {'abcSelfPSA3': 'abcSelfPSA3Val'}]
+psa4(42, 43): !result: [[42, 43], {'abcSelfPSA4': 'abcSelfPSA4Val'}]
+a(42, self={"20": 1}): !result: [42]
+pa1(42, self={"20": 1}): !result: ['abcArgsPA1', 42]
+pa2(42, self={"20": 1}): !result: [42]
+pa3(42, self={"20": 1}): !result: ['abcArgsPA3', 42]
+pa4(42, self={"20": 1}): !result: [42]
+sa(42, self={"20": 1}): !result: [[42], {'20': 1}]
+psa1(42, self={"20": 1}): !result: [['abcArgsPSA1', 42], {'20': 1}]
+psa2(42, self={"20": 1}): !result: [[42], {'20': 1}]
+psa3(42, self={"20": 1}): !result: [['abcArgsPSA3', 42], {'20': 1}]
+psa4(42, self={"20": 1}): !result: [[42], {'20': 1}]
+a(self={"20": 1}): !result: []
+pa1(self={"20": 1}): !result: ['abcArgsPA1']
+pa2(self={"20": 1}): !result: []
+pa3(self={"20": 1}): !result: ['abcArgsPA3']
+pa4(self={"20": 1}): !result: []
+sa(self={"20": 1}): !result: [[], {'20': 1}]
+psa1(self={"20": 1}): !result: [['abcArgsPSA1'], {'20': 1}]
+psa2(self={"20": 1}): !result: [[], {'20': 1}]
+psa3(self={"20": 1}): !result: [['abcArgsPSA3'], {'20': 1}]
+psa4(self={"20": 1}): !result: [[], {'20': 1}]
+a.args: None
+pa1.args: ['abcArgsPA1']
+pa2.args: None
+pa3.args: ['abcArgsPA3']
+pa4.args: None
+sa.args: None
+psa1.args: ['abcArgsPSA1']
+psa2.args: None
+psa3.args: ['abcArgsPSA3']
+psa4.args: None
+a.self: None
+pa1.self: None
+pa2.self: None
+pa3.self: {'abcSelfPA3': 'abcSelfPA3Val'}
+pa4.self: {'abcSelfPA4': 'abcSelfPA4Val'}
+sa.self: None
+psa1.self: None
+psa2.self: None
+psa3.self: {'abcSelfPSA3': 'abcSelfPSA3Val'}
+psa4.self: {'abcSelfPSA4': 'abcSelfPSA4Val'}
+a.name: 'Args'
+pa1.name: 'Args'
+pa2.name: 'Args'
+pa3.name: 'Args'
+pa4.name: 'Args'
+sa.name: 'SelfArgs'
+psa1.name: 'SelfArgs'
+psa2.name: 'SelfArgs'
+psa3.name: 'SelfArgs'
+psa4.name: 'SelfArgs'
'
abcdef
-line :
+Error detected while processing function RunTest[]..Test:
+line :
abcdef
abcA
-line :
+line :
abcB'
['a', 'dup_a']
['a', 'a']
@@ -1046,9 +1143,20 @@ l.locked = FailingTrue():(<class 'NotImplementedError'>, NotImplementedError('bo
l.xxx = True:(<class 'AttributeError'>, AttributeError('cannot set attribute xxx',))
Post by James McCoy
Function
FunctionConstructor
+>>> FunctionConstructor
vim.Function("123"):(<class 'ValueError'>, ValueError('unnamed function 123 does not exist',))
vim.Function("xxx_non_existent_function_xxx"):(<class 'ValueError'>, ValueError('function xxx_non_existent_function_xxx does not exist',))
vim.Function("xxx#non#existent#function#xxx"):NOT FAILED
+vim.Function("xxx_non_existent_function_xxx2", args=[]):(<class 'ValueError'>, ValueError('function xxx_non_existent_function_xxx2 does not exist',))
+vim.Function("xxx_non_existent_function_xxx3", self={}):(<class 'ValueError'>, ValueError('function xxx_non_existent_function_xxx3 does not exist',))
+vim.Function("xxx_non_existent_function_xxx4", args=[], self={}):(<class 'ValueError'>, ValueError('function xxx_non_existent_function_xxx4 does not exist',))
+>>> FunctionNew
+vim.Function("tr", self="abcFuncSelf"):(<class 'AttributeError'>, AttributeError('keys',))
+vim.Function("tr", args=427423):(<class 'TypeError'>, TypeError('unable to convert int to vim list',))
+vim.Function("tr", self="abcFuncSelf2", args="abcFuncArgs2"):(<class 'AttributeError'>, AttributeError('keys',))
+vim.Function(self="abcFuncSelf2", args="abcFuncArgs2"):(<class 'AttributeError'>, AttributeError('keys',))
+vim.Function("tr", "", self="abcFuncSelf2", args="abcFuncArgs2"):(<class 'AttributeError'>, AttributeError('keys',))
+vim.Function("tr", ""):(<class 'TypeError'>, TypeError('function takes exactly 1 argument (2 given)',))
Post by James McCoy
FunctionCall
Testing StringToChars using f({%s : 1})
f({1 : 1}):(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',))
diff --git a/src/version.c b/src/version.c
index 7132e0b..04545d9 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1731,
+/**/
1730,
/**/
1729,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:59 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 429fcfbf9a9275367fe9441a50a3dcd773497d84
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 16:22:04 2016 +0200

patch 7.4.1732
Problem: Folds may close when using autocomplete. (Anmol Sethi)
Solution: Increment/decrement disable_fold. (Christian Brabandt, closes
#643)
---
src/edit.c | 2 ++
src/fold.c | 3 +++
src/globals.h | 4 ++++
src/version.c | 2 ++
4 files changed, 11 insertions(+)

diff --git a/src/edit.c b/src/edit.c
index abe26fb..f4a8354 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1424,8 +1424,10 @@ doESCkey:

docomplete:
compl_busy = TRUE;
+ disable_fold_update++; /* don't redraw folds here */
if (ins_complete(c, TRUE) == FAIL)
compl_cont_status = 0;
+ disable_fold_update--;
compl_busy = FALSE;
break;
#endif /* FEAT_INS_EXPAND */
diff --git a/src/fold.c b/src/fold.c
index e0b2609..8b9ca35 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -811,6 +811,9 @@ foldUpdate(win_T *wp, linenr_T top, linenr_T bot)
{
fold_T *fp;

+ if (disable_fold_update > 0)
+ return;
+
/* Mark all folds from top to bot as maybe-small. */
(void)foldFind(&wp->w_folds, top, &fp);
while (fp < (fold_T *)wp->w_folds.ga_data + wp->w_folds.ga_len
diff --git a/src/globals.h b/src/globals.h
index 3278ad9..5effdb5 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1176,6 +1176,10 @@ EXTERN int fill_fold INIT(= '-');
EXTERN int fill_diff INIT(= '-');
#endif

+#ifdef FEAT_FOLDING
+EXTERN int disable_fold_update INIT(= 0);
+#endif
+
/* Whether 'keymodel' contains "stopsel" and "startsel". */
EXTERN int km_stopsel INIT(= FALSE);
EXTERN int km_startsel INIT(= FALSE);
diff --git a/src/version.c b/src/version.c
index 04545d9..f1dbb61 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1732,
+/**/
1731,
/**/
1730,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 03:59:59 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 839e954aaa72ef62f65416d177f829e681c15466
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 16:46:02 2016 +0200

patch 7.4.1733
Problem: "make install" doesn't know about cross-compiling. (Christian
Neukirchen)
Solution: Add CROSS_COMPILING. (closes #740)
---
src/Makefile | 19 +++++++++++++++----
src/auto/configure | 4 ++++
src/config.mk.in | 1 +
src/configure.in | 3 +++
src/version.c | 2 ++
5 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index cf9636d..195cbd5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1998,23 +1998,25 @@ test1 \
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
- test100 test101 test102 test103 test104 test105 test107 test108:
+ test100 test101 test102 test103 test104 test107 test108:
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)

# Run individual NEW style test, assuming that Vim was already compiled.
test_arglist \
test_assert \
test_assign \
+ test_autocmd \
test_backspace_opt \
test_cdo \
test_channel \
test_cursor_func \
test_delete \
test_ex_undo \
- test_expr \
test_expand \
+ test_expr \
test_feedkeys \
test_file_perm \
+ test_fnamemodify \
test_glob2regpat \
test_hardcopy \
test_help_tagjump \
@@ -2024,17 +2026,22 @@ test_arglist \
test_json \
test_langmap \
test_lispwords \
+ test_matchstrpos \
test_menu \
test_packadd \
test_partial \
test_perl \
test_quickfix \
+ test_regexp_latin \
+ test_regexp_utf8 \
test_reltime \
test_searchpos \
test_set \
test_sort \
+ test_statusline \
test_syn_attr \
test_syntax \
+ test_tabline \
test_timers \
test_undolevels \
test_unlet \
@@ -2042,6 +2049,8 @@ test_arglist \
test_viml \
test_visual \
test_window_id \
+ test_alot_latin \
+ test_alot_utf8 \
test_alot:
cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile $@.res VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
@if test -f testdir/test.log; then \
@@ -2126,9 +2135,11 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \
# Generate the help tags with ":helptags" to handle all languages.
# Move the distributed tags file aside and restore it, to avoid it being
# different from the repository.
- cd $(HELPSOURCE); if test -f tags; then mv -f tags tags.dist; fi
+ cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)" -a -f tags; then \
+ mv -f tags tags.dist; fi
@echo generating help tags
- -@cd $(HELPSOURCE); $(MAKE) VIMEXE=$(DEST_BIN)/$(VIMTARGET) vimtags
+ -@cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \
+ $(MAKE) VIMEXE=$(DEST_BIN)/$(VIMTARGET) vimtags; fi
cd $(HELPSOURCE); \
files=`ls *.txt tags`; \
files="$$files `ls *.??x tags-?? 2>/dev/null || true`"; \
diff --git a/src/auto/configure b/src/auto/configure
index a708230..91b075d 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -721,6 +721,7 @@ OS_EXTRA_OBJ
OS_EXTRA_SRC
XCODE_SELECT
CPP_MM
+CROSS_COMPILING
STRIP
AWK
FGREP
@@ -4113,11 +4114,14 @@ else
$as_echo "no" >&6; }
fi

+CROSS_COMPILING=
if test "$cross_compiling" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
$as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
+ CROSS_COMPILING=1
fi

+
test "$GCC" = yes && CPP_MM=M;

if test -f ./toolcheck; then
diff --git a/src/config.mk.in b/src/config.mk.in
index 7c0726c..1002d7c 100644
--- a/src/config.mk.in
+++ b/src/config.mk.in
@@ -104,6 +104,7 @@ AWK = @AWK@
STRIP = @STRIP@

EXEEXT = @EXEEXT@
+CROSS_COMPILING = @CROSS_COMPILING@

COMPILEDBY = @compiledby@

diff --git a/src/configure.in b/src/configure.in
index f29b62c..0a8c95b 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -88,9 +88,12 @@ fi

dnl If configure thinks we are cross compiling, there might be something
dnl wrong with the CC or CFLAGS settings, give a useful warning message
+CROSS_COMPILING=
if test "$cross_compiling" = yes; then
AC_MSG_RESULT([cannot compile a simple program; if not cross compiling check CC and CFLAGS])
+ CROSS_COMPILING=1
fi
+AC_SUBST(CROSS_COMPILING)

dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies.
dnl But gcc 3.1 changed the meaning! See near the end.
diff --git a/src/version.c b/src/version.c
index f1dbb61..873f21c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1733,
+/**/
1732,
/**/
1731,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:00 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 0f518a8f4d4be4cac10389680f6bd5e3781f94b0
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 16:57:10 2016 +0200

patch 7.4.1734
Problem: Test fails when not using utf-8.
Solution: Split test in regularand utf-8 part.
---
src/testdir/test_alot_utf8.vim | 1 +
src/testdir/test_expr.vim | 23 -----------------------
src/testdir/test_expr_utf8.vim | 26 ++++++++++++++++++++++++++
src/version.c | 2 ++
4 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/src/testdir/test_alot_utf8.vim b/src/testdir/test_alot_utf8.vim
index 20d919c..e55555e 100644
--- a/src/testdir/test_alot_utf8.vim
+++ b/src/testdir/test_alot_utf8.vim
@@ -4,4 +4,5 @@
" These tests use utf8 'encoding'. Setting 'encoding' is in the individual
" files, so that they can be run by themselves.

+source test_expr_utf8.vim
source test_regexp_utf8.vim
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index cdaf45e..c8c8e2c 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -59,17 +59,6 @@ func Test_strgetchar()
call assert_equal(-1, strgetchar('axb', -1))
call assert_equal(-1, strgetchar('axb', 3))
call assert_equal(-1, strgetchar('', 0))
-
- if !has('multi_byte')
- return
- endif
-
- call assert_equal(char2nr('á'), strgetchar('áxb', 0))
- call assert_equal(char2nr('x'), strgetchar('áxb', 1))
-
- call assert_equal(char2nr('a'), strgetchar('àxb', 0))
- call assert_equal(char2nr('̀'), strgetchar('àxb', 1))
- call assert_equal(char2nr('x'), strgetchar('àxb', 2))
endfunc

func Test_strcharpart()
@@ -84,16 +73,4 @@ func Test_strcharpart()
call assert_equal('', strcharpart('axb', -2, 2))

call assert_equal('a', strcharpart('axb', -1, 2))
-
- if !has('multi_byte')
- return
- endif
-
- call assert_equal('áxb', strcharpart('áxb', 0))
- call assert_equal('á', strcharpart('áxb', 0, 1))
- call assert_equal('x', strcharpart('áxb', 1, 1))
-
- call assert_equal('a', strcharpart('àxb', 0, 1))
- call assert_equal('̀', strcharpart('àxb', 1, 1))
- call assert_equal('x', strcharpart('àxb', 2, 1))
endfunc
diff --git a/src/testdir/test_expr_utf8.vim b/src/testdir/test_expr_utf8.vim
new file mode 100644
index 0000000..8b10e63
--- /dev/null
+++ b/src/testdir/test_expr_utf8.vim
@@ -0,0 +1,26 @@
+" Tests for expressions using utf-8.
+if !has('multi_byte')
+ finish
+endif
+set encoding=utf-8
+scriptencoding utf-8
+
+func Test_strgetchar()
+ call assert_equal(char2nr('a'), strgetchar('axb', 0))
+ call assert_equal(char2nr('x'), strgetchar('axb', 1))
+ call assert_equal(char2nr('b'), strgetchar('axb', 2))
+
+ call assert_equal(-1, strgetchar('axb', -1))
+ call assert_equal(-1, strgetchar('axb', 3))
+ call assert_equal(-1, strgetchar('', 0))
+endfunc
+
+func Test_strcharpart()
+ call assert_equal('áxb', strcharpart('áxb', 0))
+ call assert_equal('á', strcharpart('áxb', 0, 1))
+ call assert_equal('x', strcharpart('áxb', 1, 1))
+
+ call assert_equal('a', strcharpart('àxb', 0, 1))
+ call assert_equal('̀', strcharpart('àxb', 1, 1))
+ call assert_equal('x', strcharpart('àxb', 2, 1))
+endfunc
diff --git a/src/version.c b/src/version.c
index 873f21c..a013661 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1734,
+/**/
1733,
/**/
1732,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:00 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 451f849fd6282a4facd4f0f58af62837443fb5a6
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 17:16:22 2016 +0200

patch 7.4.1735
Problem: It is not possible to only see part of the message history. It is
not possible to clear messages.
Solution: Add a count to ":messages" and a clear argument. (Yasuhiro
Matsumoto)
---
runtime/doc/message.txt | 14 ++++++++++++--
src/ex_cmds.h | 2 +-
src/message.c | 34 +++++++++++++++++++++++++++++++++-
src/testdir/test_alot.vim | 1 +
src/testdir/test_messages.vim | 42 ++++++++++++++++++++++++++++++++++++++++++
src/version.c | 2 ++
6 files changed, 91 insertions(+), 4 deletions(-)

diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 56745f3..d41915e 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -1,4 +1,4 @@
-*message.txt* For Vim version 7.4. Last change: 2016 Feb 27
+*message.txt* For Vim version 7.4. Last change: 2016 Apr 14


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -19,6 +19,15 @@ The ":messages" command can be used to view previously given messages. This
is especially useful when messages have been overwritten or truncated. This
depends on the 'shortmess' option.

+ :messages Show all messages.
+
+ :{count}messages Show the {count} most recent messages.
+
+ :messages clear Clear all messages.
+
+ :{count}messages clear Clear messages, keeping only the {count} most
+ recent ones.
+
The number of remembered messages is fixed at 20 for the tiny version and 200
for other versions.

@@ -58,8 +67,9 @@ If you are lazy, it also works without the shift key: >
When an error message is displayed, but it is removed before you could read
it, you can see it again with: >
:echo errmsg
-or view a list of recent messages with: >
+Or view a list of recent messages with: >
:messages
+See `:messages` above.


LIST OF MESSAGES
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 34defea..4095331 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -886,7 +886,7 @@ EX(CMD_menutranslate, "menutranslate", ex_menutranslate,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
ADDR_LINES),
EX(CMD_messages, "messages", ex_messages,
- TRLBAR|CMDWIN,
+ EXTRA|TRLBAR|RANGE|CMDWIN,
ADDR_LINES),
EX(CMD_mkexrc, "mkexrc", ex_mkrc,
BANG|FILE1|TRLBAR|CMDWIN,
diff --git a/src/message.c b/src/message.c
index 099c3aa..b24013e 100644
--- a/src/message.c
+++ b/src/message.c
@@ -770,6 +770,22 @@ ex_messages(exarg_T *eap UNUSED)
{
struct msg_hist *p;
char_u *s;
+ int c = 0;
+
+ if (STRCMP(eap->arg, "clear") == 0)
+ {
+ int keep = eap->addr_count == 0 ? 0 : eap->line2;
+
+ while (msg_hist_len > keep)
+ (void)delete_first_msg();
+ return;
+ }
+
+ if (*eap->arg != NUL)
+ {
+ EMSG(_(e_invarg));
+ return;
+ }

msg_hist_off = TRUE;

@@ -779,7 +795,23 @@ ex_messages(exarg_T *eap UNUSED)
_("Messages maintainer: Bram Moolenaar <***@vim.org>"),
hl_attr(HLF_T));

- for (p = first_msg_hist; p != NULL && !got_int; p = p->next)
+ p = first_msg_hist;
+
+ if (eap->addr_count != 0)
+ {
+ /* Count total messages */
+ for (; p != NULL && !got_int; p = p->next)
+ c++;
+
+ c -= eap->line2;
+
+ /* Skip without number of messages specified */
+ for (p = first_msg_hist; p != NULL && !got_int && c > 0;
+ p = p->next, c--);
+ }
+
+ /* Display what was not skipped. */
+ for (; p != NULL && !got_int; p = p->next)
if (p->msg != NULL)
msg_attr(p->msg, p->attr);

diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 7f9a1a7..d393fe7 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -17,6 +17,7 @@ source test_join.vim
source test_lispwords.vim
source test_matchstrpos.vim
source test_menu.vim
+source test_messages.vim
source test_partial.vim
source test_reltime.vim
source test_searchpos.vim
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
new file mode 100644
index 0000000..4d7e411
--- /dev/null
+++ b/src/testdir/test_messages.vim
@@ -0,0 +1,42 @@
+" Tests for :messages
+
+function Test_messages()
+ let oldmore = &more
+ try
+ set nomore
+
+ let arr = map(range(10), '"hello" . v:val')
+ for s in arr
+ echomsg s | redraw
+ endfor
+ let result = ''
+
+ redir => result
+ 2messages | redraw
+ redir END
+
+ " get last two messages
+ let msg = split(result, "\n")[1:][-2:]
+ call assert_equal(["hello8", "hello9"], msg)
+
+ " clear messages without last one
+ 1messages clear
+ redir => result
+ redraw | 1messages
+ redir END
+ " get last last message
+ let msg = split(result, "\n")[1:][-1:]
+ call assert_equal(['hello9'], msg)
+
+ " clear all messages
+ messages clear
+ redir => result
+ redraw | 1messages
+ redir END
+ " get last last message
+ let msg = split(result, "\n")[1:][-1:]
+ call assert_equal([], msg)
+ finally
+ let &more = oldmore
+ endtry
+endfunction
diff --git a/src/version.c b/src/version.c
index a013661..93c74d3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1735,
+/**/
1734,
/**/
1733,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:00 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit baa9fcaf4042a6dbe01e64ce63cb54941ee00f09
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 17:40:56 2016 +0200

patch 7.4.1736
Problem: Unused variable.
Solution: Remove it. (Yasuhiro Matsumoto)
---
src/if_py_both.h | 1 -
src/version.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/if_py_both.h b/src/if_py_both.h
index d6ae880..ceedd4c 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -3006,7 +3006,6 @@ FunctionAttr(FunctionObject *self, char *name)
static void
set_partial(FunctionObject *self, partial_T *pt, int exported)
{
- typval_T *curtv;
int i;

pt->pt_name = self->name;
diff --git a/src/version.c b/src/version.c
index 93c74d3..6e2ca8d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1736,
+/**/
1735,
/**/
1734,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:00 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 52196b2dbe3b64b5054e1df3d3aa8fc65e30addc
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 17:52:41 2016 +0200

patch 7.4.1737
Problem: Argument marked as unused is used.
Solution: Remove UNUSED.
---
src/message.c | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/message.c b/src/message.c
index b24013e..8d34c12 100644
--- a/src/message.c
+++ b/src/message.c
@@ -766,7 +766,7 @@ delete_first_msg(void)
* ":messages" command.
*/
void
-ex_messages(exarg_T *eap UNUSED)
+ex_messages(exarg_T *eap)
{
struct msg_hist *p;
char_u *s;
diff --git a/src/version.c b/src/version.c
index 6e2ca8d..0f8ff39 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1737,
+/**/
1736,
/**/
1735,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:00 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 5d91646599a7b74310845e30a2a52ff197dc0ed7
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 18:42:47 2016 +0200

patch 7.4.1738
Problem: Count for ":messages" depends on number of lines.
Solution: Add ADDR_OTHER address type.
---
src/ex_cmds.h | 3 ++-
src/version.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 4095331..e2b30f2 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -66,6 +66,7 @@
#define ADDR_BUFFERS 4
#define ADDR_TABS 5
#define ADDR_QUICKFIX 6
+#define ADDR_OTHER 99

#ifndef DO_DECLARE_EXCMD
typedef struct exarg exarg_T;
@@ -887,7 +888,7 @@ EX(CMD_menutranslate, "menutranslate", ex_menutranslate,
ADDR_LINES),
EX(CMD_messages, "messages", ex_messages,
EXTRA|TRLBAR|RANGE|CMDWIN,
- ADDR_LINES),
+ ADDR_OTHER),
EX(CMD_mkexrc, "mkexrc", ex_mkrc,
BANG|FILE1|TRLBAR|CMDWIN,
ADDR_LINES),
diff --git a/src/version.c b/src/version.c
index 0f8ff39..ad1511c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1738,
+/**/
1737,
/**/
1736,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:00 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit bea1ede1c59a11ca5bf9d91cd30b7b2937b9fb41
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 19:44:36 2016 +0200

patch 7.4.1739
Problem: Messages test fails on MS-Windows.
Solution: Adjust the asserts. Skip the "messages maintainer" line if not
showing all messages.
---
src/message.c | 16 +++++++++-------
src/testdir/test_messages.vim | 22 ++++++++++------------
src/version.c | 2 ++
3 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/message.c b/src/message.c
index 8d34c12..d3572eb 100644
--- a/src/message.c
+++ b/src/message.c
@@ -789,14 +789,7 @@ ex_messages(exarg_T *eap)

msg_hist_off = TRUE;

- s = mch_getenv((char_u *)"LANG");
- if (s != NULL && *s != NUL)
- msg_attr((char_u *)
- _("Messages maintainer: Bram Moolenaar <***@vim.org>"),
- hl_attr(HLF_T));
-
p = first_msg_hist;
-
if (eap->addr_count != 0)
{
/* Count total messages */
@@ -810,6 +803,15 @@ ex_messages(exarg_T *eap)
p = p->next, c--);
}

+ if (p == first_msg_hist)
+ {
+ s = mch_getenv((char_u *)"LANG");
+ if (s != NULL && *s != NUL)
+ msg_attr((char_u *)
+ _("Messages maintainer: Bram Moolenaar <***@vim.org>"),
+ hl_attr(HLF_T));
+ }
+
/* Display what was not skipped. */
for (; p != NULL && !got_int; p = p->next)
if (p->msg != NULL)
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index 4d7e411..188406e 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -4,6 +4,8 @@ function Test_messages()
let oldmore = &more
try
set nomore
+ " Avoid the "message maintainer" line.
+ let $LANG = ''

let arr = map(range(10), '"hello" . v:val')
for s in arr
@@ -11,31 +13,27 @@ function Test_messages()
endfor
let result = ''

+ " get last two messages
redir => result
2messages | redraw
redir END
-
- " get last two messages
- let msg = split(result, "\n")[1:][-2:]
- call assert_equal(["hello8", "hello9"], msg)
+ let msg_list = split(result, "\n")
+ call assert_equal(["hello8", "hello9"], msg_list)

" clear messages without last one
1messages clear
redir => result
- redraw | 1messages
+ redraw | messages
redir END
- " get last last message
- let msg = split(result, "\n")[1:][-1:]
- call assert_equal(['hello9'], msg)
+ let msg_list = split(result, "\n")
+ call assert_equal(['hello9'], msg_list)

" clear all messages
messages clear
redir => result
- redraw | 1messages
+ redraw | messages
redir END
- " get last last message
- let msg = split(result, "\n")[1:][-1:]
- call assert_equal([], msg)
+ call assert_equal('', result)
finally
let &more = oldmore
endtry
diff --git a/src/version.c b/src/version.c
index ad1511c..6bdb861 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1739,
+/**/
1738,
/**/
1737,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:01 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 4d585022023b96f6507e8cae5ed8fc8d926f5140
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 19:50:22 2016 +0200

patch 7.4.1740
Problem: syn-cchar defined with matchadd() does not appear if there are no
other syntax definitions which matches buffer text.
Solution: Check for startcol. (Ozaki Kiichi, haya14busa, closes #757)
---
src/screen.c | 15 +-
src/testdir/Make_all.mak | 4 +-
src/testdir/test_alot_utf8.vim | 1 +
src/testdir/test_match_conceal.in | 159 -----------------
src/testdir/test_match_conceal.ok | 52 ------
src/testdir/test_matchadd_conceal.vim | 266 +++++++++++++++++++++++++++++
src/testdir/test_matchadd_conceal_utf8.vim | 45 +++++
src/testdir/test_undolevels.vim | 4 +
src/version.c | 2 +
9 files changed, 328 insertions(+), 220 deletions(-)

diff --git a/src/screen.c b/src/screen.c
index 8044079..b92cbf9 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3057,8 +3057,8 @@ win_line(
wrapping */
int vcol_off = 0; /* offset for concealed characters */
int did_wcol = FALSE;
- int match_conc = FALSE; /* cchar for match functions */
- int has_match_conc = FALSE; /* match wants to conceal */
+ int match_conc = 0; /* cchar for match functions */
+ int has_match_conc = 0; /* match wants to conceal */
int old_boguscols = 0;
# define VCOL_HLC (vcol - vcol_off)
# define FIX_FOR_BOGUSCOLS \
@@ -3595,7 +3595,7 @@ win_line(
for (;;)
{
#ifdef FEAT_CONCEAL
- has_match_conc = FALSE;
+ has_match_conc = 0;
#endif
/* Skip this quickly when working on the text. */
if (draw_state != WL_LINE)
@@ -3944,11 +3944,12 @@ win_line(
if (cur != NULL && syn_name2id((char_u *)"Conceal")
== cur->hlg_id)
{
- has_match_conc = TRUE;
+ has_match_conc =
+ v == (long)shl->startcol ? 2 : 1;
match_conc = cur->conceal_char;
}
else
- has_match_conc = match_conc = FALSE;
+ has_match_conc = match_conc = 0;
#endif
}
else if (v == (long)shl->endcol)
@@ -4905,12 +4906,12 @@ win_line(
if ( wp->w_p_cole > 0
&& (wp != curwin || lnum != wp->w_cursor.lnum ||
conceal_cursor_line(wp) )
- && ( (syntax_flags & HL_CONCEAL) != 0 || has_match_conc)
+ && ( (syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
&& !(lnum_in_visual_area
&& vim_strchr(wp->w_p_cocu, 'v') == NULL))
{
char_attr = conceal_attr;
- if (prev_syntax_id != syntax_seqnr
+ if ((prev_syntax_id != syntax_seqnr || has_match_conc > 1)
&& (syn_get_sub_char() != NUL || match_conc
|| wp->w_p_cole == 1)
&& wp->w_p_cole != 3)
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 2540abf..0e4ab7f 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -104,7 +104,6 @@ SCRIPTS_ALL = \
test_listlbr.out \
test_mapping.out \
test_marks.out \
- test_match_conceal.out \
test_nested_function.out \
test_options.out \
test_ruby.out \
@@ -164,7 +163,7 @@ SCRIPTS_GUI = test16.out


# Tests using runtest.vim.vim.
-# Keep test_alot.res as the last one, sort the others.
+# Keep test_alot*.res as the last one, sort the others.
NEW_TESTS = test_arglist.res \
test_assert.res \
test_backspace_opt.res \
@@ -175,6 +174,7 @@ NEW_TESTS = test_arglist.res \
test_increment.res \
test_json.res \
test_langmap.res \
+ test_matchadd_conceal.res \
test_packadd.res \
test_perl.res \
test_quickfix.res \
diff --git a/src/testdir/test_alot_utf8.vim b/src/testdir/test_alot_utf8.vim
index e55555e..8824ee5 100644
--- a/src/testdir/test_alot_utf8.vim
+++ b/src/testdir/test_alot_utf8.vim
@@ -5,4 +5,5 @@
" files, so that they can be run by themselves.

source test_expr_utf8.vim
+source test_matchadd_conceal_utf8.vim
source test_regexp_utf8.vim
diff --git a/src/testdir/test_match_conceal.in b/src/testdir/test_match_conceal.in
deleted file mode 100644
index aa32b85..0000000
--- a/src/testdir/test_match_conceal.in
+++ /dev/null
@@ -1,159 +0,0 @@
-Test for matchadd() and conceal feature
-
-STARTTEST
-:so small.vim
-:if !has("conceal") | e! test.ok | w! test.out | qa! | endif
-:set term=ansi
-:so mbyte.vim
-:if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
-:10new|:vsp|:vert resize 20
-:put =\"\#\ This\ is\ a\ Test\"
-:norm! mazt
-:fu! ScreenChar(width, lines)
-: let c=''
-: for j in range(1,a:lines)
-: for i in range(1,a:width)
-: let c.=nr2char(screenchar(j, i))
-: endfor
-: let c.="\n"
-: endfor
-: return c
-:endfu
-:fu! ScreenAttr(line, pos, eval)
-: let g:attr=[]
-: for col in a:pos
-: call add(g:attr, screenattr(a:line,col))
-: endfor
-: " In case all values are zero, probably the terminal
-: " isn't set correctly, so catch that case
-: let null = (eval(join(g:attr, '+')) == 0)
-: let str=substitute(a:eval, '\d\+', 'g:attr[&]', 'g')
-: if null || eval(str)
-: :let g:attr_test="OK: ". str
-: else
-: :let g:attr_test="FAILED: ".str
-: :let g:attr_test.="\n". join(g:attr, ' ')
-: :let g:attr_test.="\n TERM: ". &term
-: endif
-:endfu
-:fu! DoRecordScreen()
-: wincmd l
-: $put =printf(\"\n%s\", g:test)
-: $put =g:line
-: $put =g:attr_test
-: wincmd p
-:endfu
-:let g:test ="Test 1: simple addmatch()"
-:call matchadd('Conceal', '\%2l ')
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:
-:let g:test ="Test 2: simple addmatch() and conceal (should be: #XThisXisXaXTest)"
-:norm! 'azt
-:call clearmatches()
-:syntax on
-:set concealcursor=n conceallevel=1
-:call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'X'})
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:
-:let g:test ="Test 3: addmatch() and conceallevel=3 (should be: #ThisisaTest)"
-:norm! 'azt
-:set conceallevel=3
-:call clearmatches()
-:call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'X'})
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0==1 && 1==2 && 1==3 && 1==4 && 0!=5")
-:call DoRecordScreen()
-:
-:let g:test ="Test 4: more match() (should be: #Thisisa Test)"
-:norm! 'azt
-:call matchadd('ErrorMsg', '\%2l Test', 20, -1, {'conceal': 'X'})
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0==1 && 1==2 && 0!=3 && 3==4 && 0!=5 && 3!=5")
-:call DoRecordScreen()
-:
-:let g:test ="Test 5/1: default conceal char (should be: # This is a Test)"
-:norm! 'azt
-:call clearmatches()
-:set conceallevel=1
-:call matchadd('Conceal', '\%2l ', 10, -1, {})
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:let g:test ="Test 5/2: default conceal char (should be: #+This+is+a+Test)"
-:norm! 'azt
-:set listchars=conceal:+
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:set listchars&vim
-:
-:let g:test ="Test 6/1: syn and match conceal (should be: #ZThisZisZaZTest)"
-:norm! 'azt
-:call clearmatches()
-:set conceallevel=1
-:call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'Z'})
-:syn match MyConceal /\%2l / conceal containedin=ALL cchar=*
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:let g:test ="Test 6/2: syn and match conceal (should be: #*This*is*a*Test)"
-:norm! 'azt
-:call clearmatches()
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:
-:let g:test ="Test 7/1: clear matches"
-:norm! 'azt
-:syn on
-:call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'Z'})
-:let a=getmatches()
-:call clearmatches()
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0==1 && 0==2 && 0==3 && 0==4 && 0==5")
-:call DoRecordScreen()
-:$put =a
-:call setmatches(a)
-:norm! 'azt
-:let g:test ="Test 7/2: reset match using setmatches()"
-:norm! 'azt
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:
-:let g:test ="Test 8: using matchaddpos() (should be #Pis a Test"
-:norm! 'azt
-:call clearmatches()
-:call matchaddpos('Conceal', [[2,2,6]], 10, -1, {'conceal': 'P'})
-:let a=getmatches()
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1!=2 && 0==2 && 0==3 && 0!=4 && 0!=5 && 4==5")
-:call DoRecordScreen()
-:$put =a
-:
-:let g:test ="Test 9: match using multibyte conceal char (should be: #ˑThisˑisˑaˑTest)"
-:norm! 'azt
-:call clearmatches()
-:call matchadd('Conceal', '\%2l ', 20, -1, {'conceal': "\u02d1"})
-:redraw!
-:let line=ScreenChar(winwidth(0),1)
-:call ScreenAttr(1,[1,2,7,10,12,16], "0!=1 && 1==2 && 1==3 && 1==4 && 0==5")
-:call DoRecordScreen()
-:
-:"sleep 10
-:%w! test.out
-:qa!
-ENDTEST
-dummy text
diff --git a/src/testdir/test_match_conceal.ok b/src/testdir/test_match_conceal.ok
deleted file mode 100644
index 11c379e..0000000
--- a/src/testdir/test_match_conceal.ok
+++ /dev/null
@@ -1,52 +0,0 @@
-
-# This is a Test
-
-Test 1: simple addmatch()
-# This is a Test
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
-
-Test 2: simple addmatch() and conceal (should be: #XThisXisXaXTest)
-#XThisXisXaXTest
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
-
-Test 3: addmatch() and conceallevel=3 (should be: #ThisisaTest)
-#ThisisaTest
-OK: g:attr[0]==g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]!=g:attr[5]
-
-Test 4: more match() (should be: #Thisisa Test)
-#Thisisa Test
-OK: g:attr[0]==g:attr[1] && g:attr[1]==g:attr[2] && g:attr[0]!=g:attr[3] && g:attr[3]==g:attr[4] && g:attr[0]!=g:attr[5] && g:attr[3]!=g:attr[5]
-
-Test 5/1: default conceal char (should be: # This is a Test)
-# This is a Test
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
-
-Test 5/2: default conceal char (should be: #+This+is+a+Test)
-#+This+is+a+Test
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
-
-Test 6/1: syn and match conceal (should be: #ZThisZisZaZTest)
-#ZThisZisZaZTest
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
-
-Test 6/2: syn and match conceal (should be: #*This*is*a*Test)
-#*This*is*a*Test
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
-
-Test 7/1: clear matches
-# This is a Test
-OK: g:attr[0]==g:attr[1] && g:attr[0]==g:attr[2] && g:attr[0]==g:attr[3] && g:attr[0]==g:attr[4] && g:attr[0]==g:attr[5]
-{'group': 'Conceal', 'pattern': '\%2l ', 'priority': 10, 'id': 10, 'conceal': 'Z'}
-
-Test 7/2: reset match using setmatches()
-#ZThisZisZaZTest
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
-
-Test 8: using matchaddpos() (should be #Pis a Test
-#Pis a Test
-OK: g:attr[0]!=g:attr[1] && g:attr[1]!=g:attr[2] && g:attr[0]==g:attr[2] && g:attr[0]==g:attr[3] && g:attr[0]!=g:attr[4] && g:attr[0]!=g:attr[5] && g:attr[4]==g:attr[5]
-{'group': 'Conceal', 'id': 11, 'priority': 10, 'pos1': [2, 2, 6], 'conceal': 'P'}
-
-Test 9: match using multibyte conceal char (should be: #ˑThisˑisˑaˑTest)
-#ˑThisˑisˑaˑTest
-OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
diff --git a/src/testdir/test_matchadd_conceal.vim b/src/testdir/test_matchadd_conceal.vim
new file mode 100644
index 0000000..5da2816
--- /dev/null
+++ b/src/testdir/test_matchadd_conceal.vim
@@ -0,0 +1,266 @@
+" Test for matchadd() and conceal feature
+if !has('conceal')
+ finish
+endif
+
+if !has('gui_running') && has('unix')
+ set term=ansi
+endif
+
+function! s:screenline(lnum) abort
+ let line = []
+ for c in range(1, winwidth(0))
+ call add(line, nr2char(screenchar(a:lnum, c)))
+ endfor
+ return s:trim(join(line, ''))
+endfunction
+
+function! s:trim(str) abort
+ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$')
+endfunction
+
+function! Test_simple_matchadd()
+ new
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '# This is a Test'
+
+ call cursor(1, 1)
+ call matchadd('Conceal', '\%2l ')
+ redraw!
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+endfunction
+
+function! Test_simple_matchadd_and_conceal()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '#XThisXisXaXTest'
+
+ call cursor(1, 1)
+ call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'X'})
+ redraw!
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+endfunction
+
+function! Test_matchadd_and_conceallevel_3()
+ new
+
+ setlocal conceallevel=3
+ " set filetype and :syntax on to change screenattr()
+ setlocal filetype=conf
+ syntax on
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '#ThisisaTest'
+
+ call cursor(1, 1)
+ call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'X'})
+ redraw!
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ " more matchadd()
+ " 1234567890123456
+ let expect = '#Thisisa Test'
+
+ call matchadd('ErrorMsg', '\%2l Test', 20, -1, {'conceal': 'X'})
+ redraw!
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_equal(screenattr(lnum, 1) , screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2) , screenattr(lnum, 7))
+ call assert_notequal(screenattr(lnum, 1) , screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 10), screenattr(lnum, 12))
+ call assert_notequal(screenattr(lnum, 1) , screenattr(lnum, 16))
+ call assert_notequal(screenattr(lnum, 10), screenattr(lnum, 16))
+
+ syntax off
+ quit!
+endfunction
+
+function! Test_default_conceal_char()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '# This is a Test'
+
+ call cursor(1, 1)
+ call matchadd('Conceal', '\%2l ', 10, -1, {})
+ redraw!
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ " 1234567890123456
+ let expect = '#+This+is+a+Test'
+ let listchars_save = &listchars
+ set listchars=conceal:+
+ redraw!
+
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ let &listchars = listchars_save
+ quit!
+endfunction
+
+function! Test_syn_and_match_conceal()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '#ZThisZisZaZTest'
+
+ call cursor(1, 1)
+ call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'Z'})
+ syntax match MyConceal /\%2l / conceal containedin=ALL cchar=*
+ redraw!
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ " 1234567890123456
+ let expect = '#*This*is*a*Test'
+ call clearmatches()
+ redraw!
+
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ syntax off
+ quit!
+endfunction
+
+function! Test_clearmatches()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '# This is a Test'
+
+ call cursor(1, 1)
+ call matchadd('Conceal', '\%2l ', 10, -1, {'conceal': 'Z'})
+ let a = getmatches()
+ call clearmatches()
+ redraw!
+
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ " reset match using setmatches()
+ " 1234567890123456
+ let expect = '#ZThisZisZaZTest'
+ call setmatches(a)
+ redraw!
+
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+ call assert_equal({'group': 'Conceal', 'pattern': '\%2l ', 'priority': 10, 'id': a[0].id, 'conceal': 'Z'}, a[0])
+
+ quit!
+endfunction
+
+function! Test_using_matchaddpos()
+ new
+ setlocal concealcursor=n conceallevel=1
+ " set filetype and :syntax on to change screenattr()
+ setlocal filetype=conf
+ syntax on
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '#Pis a Test'
+
+ call cursor(1, 1)
+ call matchaddpos('Conceal', [[2,2,6]], 10, -1, {'conceal': 'P'})
+ let a = getmatches()
+ redraw!
+
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1) , screenattr(lnum, 2))
+ call assert_notequal(screenattr(lnum, 2) , screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 1) , screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 1) , screenattr(lnum, 10))
+ call assert_notequal(screenattr(lnum, 1) , screenattr(lnum, 12))
+ call assert_notequal(screenattr(lnum, 1) , screenattr(lnum, 16))
+ call assert_equal(screenattr(lnum, 12), screenattr(lnum, 16))
+ call assert_equal({'group': 'Conceal', 'id': a[0].id, 'priority': 10, 'pos1': [2, 2, 6], 'conceal': 'P'}, a[0])
+
+ syntax off
+ quit!
+endfunction
+
+function! Test_matchadd_repeat_conceal_with_syntax_off()
+ new
+
+ " To test targets in the same line string is replaced with conceal char
+ " correctly, repeat 'TARGET'
+ 1put ='TARGET_TARGETTARGET'
+ call cursor(1, 1)
+ redraw
+ call assert_equal('TARGET_TARGETTARGET', s:screenline(2))
+
+ setlocal conceallevel=2
+ call matchadd('Conceal', 'TARGET', 10, -1, {'conceal': 't'})
+
+ redraw
+ call assert_equal('t_tt', s:screenline(2))
+
+ quit!
+endfunction
diff --git a/src/testdir/test_matchadd_conceal_utf8.vim b/src/testdir/test_matchadd_conceal_utf8.vim
new file mode 100644
index 0000000..8293fbe
--- /dev/null
+++ b/src/testdir/test_matchadd_conceal_utf8.vim
@@ -0,0 +1,45 @@
+" Test for matchadd() and conceal feature using utf-8.
+if !has('conceal') || !has('multi_byte')
+ finish
+endif
+set encoding=utf-8
+scriptencoding utf-8
+
+if !has('gui_running') && has('unix')
+ set term=ansi
+endif
+
+function! s:screenline(lnum) abort
+ let line = []
+ for c in range(1, winwidth(0))
+ call add(line, nr2char(screenchar(a:lnum, c)))
+ endfor
+ return s:trim(join(line, ''))
+endfunction
+
+function! s:trim(str) abort
+ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$')
+endfunction
+
+function! Test_match_using_multibyte_conceal_char()
+ new
+ setlocal concealcursor=n conceallevel=1
+
+ 1put='# This is a Test'
+ " 1234567890123456
+ let expect = '#ˑThisˑisˑaˑTest'
+
+ call cursor(1, 1)
+ call matchadd('Conceal', '\%2l ', 20, -1, {'conceal': "\u02d1"})
+ redraw!
+
+ let lnum = 2
+ call assert_equal(expect, s:screenline(lnum))
+ call assert_notequal(screenattr(lnum, 1), screenattr(lnum, 2))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 7))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 10))
+ call assert_equal(screenattr(lnum, 2), screenattr(lnum, 12))
+ call assert_equal(screenattr(lnum, 1), screenattr(lnum, 16))
+
+ quit!
+endfunction
diff --git a/src/testdir/test_undolevels.vim b/src/testdir/test_undolevels.vim
index 7bb25ef..b96b693 100644
--- a/src/testdir/test_undolevels.vim
+++ b/src/testdir/test_undolevels.vim
@@ -41,4 +41,8 @@ func Test_global_local_undolevels()
call assert_equal(50, &g:undolevels)
call assert_equal(-123456, &l:undolevels)

+ " Drop created windows
+ set ul&
+ new
+ only!
endfunc
diff --git a/src/version.c b/src/version.c
index 6bdb861..755cf65 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1740,
+/**/
1739,
/**/
1738,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:01 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit b22bd46b9681d73d095f2eadff8163d3a6cf416b
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 22:52:50 2016 +0200

patch 7.4.1741
Problem: Not testing utf-8 characters.
Solution: Move the right asserts to the test_expr_utf8 test.
---
src/testdir/test_expr_utf8.vim | 11 +++++------
src/version.c | 2 ++
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/testdir/test_expr_utf8.vim b/src/testdir/test_expr_utf8.vim
index 8b10e63..ec36dec 100644
--- a/src/testdir/test_expr_utf8.vim
+++ b/src/testdir/test_expr_utf8.vim
@@ -6,13 +6,12 @@ set encoding=utf-8
scriptencoding utf-8

func Test_strgetchar()
- call assert_equal(char2nr('a'), strgetchar('axb', 0))
- call assert_equal(char2nr('x'), strgetchar('axb', 1))
- call assert_equal(char2nr('b'), strgetchar('axb', 2))
+ call assert_equal(char2nr('á'), strgetchar('áxb', 0))
+ call assert_equal(char2nr('x'), strgetchar('áxb', 1))

- call assert_equal(-1, strgetchar('axb', -1))
- call assert_equal(-1, strgetchar('axb', 3))
- call assert_equal(-1, strgetchar('', 0))
+ call assert_equal(char2nr('a'), strgetchar('àxb', 0))
+ call assert_equal(char2nr('̀'), strgetchar('àxb', 1))
+ call assert_equal(char2nr('x'), strgetchar('àxb', 2))
endfunc

func Test_strcharpart()
diff --git a/src/version.c b/src/version.c
index 755cf65..07f1a0d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1741,
+/**/
1740,
/**/
1739,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:01 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 5d18e0eca59ffbba22c7f7c91c9f99d672095728
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 22:54:24 2016 +0200

patch 7.4.1742
Problem: strgetchar() does not work correctly.
Solution: use mb_cptr2len(). Add a test. (Naruhiko Nishino)
---
src/eval.c | 43 +++++++++++++++++++++---------------------
src/testdir/test_expr_utf8.vim | 4 ++++
src/version.c | 2 ++
3 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 5ced88e..bd4a11a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -13048,26 +13048,6 @@ f_getpid(typval_T *argvars UNUSED, typval_T *rettv)
rettv->vval.v_number = mch_get_pid();
}

-static void getpos_both(typval_T *argvars, typval_T *rettv, int getcurpos);
-
-/*
- * "getcurpos()" function
- */
- static void
-f_getcurpos(typval_T *argvars, typval_T *rettv)
-{
- getpos_both(argvars, rettv, TRUE);
-}
-
-/*
- * "getpos(string)" function
- */
- static void
-f_getpos(typval_T *argvars, typval_T *rettv)
-{
- getpos_both(argvars, rettv, FALSE);
-}
-
static void
getpos_both(
typval_T *argvars,
@@ -13110,6 +13090,25 @@ getpos_both(
rettv->vval.v_number = FALSE;
}

+
+/*
+ * "getcurpos()" function
+ */
+ static void
+f_getcurpos(typval_T *argvars, typval_T *rettv)
+{
+ getpos_both(argvars, rettv, TRUE);
+}
+
+/*
+ * "getpos(string)" function
+ */
+ static void
+f_getpos(typval_T *argvars, typval_T *rettv)
+{
+ getpos_both(argvars, rettv, FALSE);
+}
+
/*
* "getqflist()" and "getloclist()" functions
*/
@@ -19574,7 +19573,7 @@ f_strgetchar(typval_T *argvars, typval_T *rettv)
return;
#ifdef FEAT_MBYTE
{
- int byteidx = 0;
+ int byteidx = 0;

while (charidx >= 0 && byteidx < len)
{
@@ -19584,7 +19583,7 @@ f_strgetchar(typval_T *argvars, typval_T *rettv)
break;
}
--charidx;
- byteidx += mb_char2len(str[byteidx]);
+ byteidx += mb_cptr2len(str + byteidx);
}
}
#else
diff --git a/src/testdir/test_expr_utf8.vim b/src/testdir/test_expr_utf8.vim
index ec36dec..c512ddf 100644
--- a/src/testdir/test_expr_utf8.vim
+++ b/src/testdir/test_expr_utf8.vim
@@ -12,6 +12,10 @@ func Test_strgetchar()
call assert_equal(char2nr('a'), strgetchar('àxb', 0))
call assert_equal(char2nr('̀'), strgetchar('àxb', 1))
call assert_equal(char2nr('x'), strgetchar('àxb', 2))
+
+ call assert_equal(char2nr('あ'), strgetchar('あaい', 0))
+ call assert_equal(char2nr('a'), strgetchar('あaい', 1))
+ call assert_equal(char2nr('い'), strgetchar('あaい', 2))
endfunc

func Test_strcharpart()
diff --git a/src/version.c b/src/version.c
index 07f1a0d..4c00d31 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1742,
+/**/
1741,
/**/
1740,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:01 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 75be2339d877bbd38df91c0181e1e0e388852df6
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 14 23:10:40 2016 +0200

patch 7.4.1743
Problem: Clang warns for uninitialzed variable. (Michael Jarvis)
Solution: Initialize it.
---
src/if_py_both.h | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/if_py_both.h b/src/if_py_both.h
index ceedd4c..0b701ae 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -6070,7 +6070,7 @@ ConvertFromPyMapping(PyObject *obj, typval_T *tv)
ConvertFromPySequence(PyObject *obj, typval_T *tv)
{
PyObject *lookup_dict;
- int ret;
+ int ret = 0;

if (!(lookup_dict = PyDict_New()))
return -1;
diff --git a/src/version.c b/src/version.c
index 4c00d31..aa181fb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1743,
+/**/
1742,
/**/
1741,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:02 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 66210042892389d36e3d37203ec77f61467bfb1c
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 15 20:40:41 2016 +0200

patch 7.4.1744
Problem: Python: Converting a sequence may leak memory.
Solution: Decrement a reference. (Nikolay Pavlov)
---
src/if_py_both.h | 5 +++--
src/version.c | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/if_py_both.h b/src/if_py_both.h
index 0b701ae..c6a8c44 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -6070,7 +6070,7 @@ ConvertFromPyMapping(PyObject *obj, typval_T *tv)
ConvertFromPySequence(PyObject *obj, typval_T *tv)
{
PyObject *lookup_dict;
- int ret = 0;
+ int ret;

if (!(lookup_dict = PyDict_New()))
return -1;
@@ -6080,9 +6080,10 @@ ConvertFromPySequence(PyObject *obj, typval_T *tv)
tv->v_type = VAR_LIST;
tv->vval.v_list = (((ListObject *)(obj))->list);
++tv->vval.v_list->lv_refcount;
+ ret = 0;
}
else if (PyIter_Check(obj) || PySequence_Check(obj))
- return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
+ ret = convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
else
{
PyErr_FORMAT(PyExc_TypeError,
diff --git a/src/version.c b/src/version.c
index aa181fb..1dd7d49 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1744,
+/**/
1743,
/**/
1742,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:02 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 5d98c9d93278d6961bfee59151666b8a8bcd23c3
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 15 20:54:52 2016 +0200

patch 7.4.1745
Problem: README file is not clear about where to get Vim.
Solution: Add links to github, releases and the Windows installer.
(Suggested by Christian Brabandt)
---
README.md | 7 +++++++
README.txt | 6 ++++++
src/version.c | 2 ++
3 files changed, 15 insertions(+)

diff --git a/README.md b/README.md
index d368a75..9be068e 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,13 @@ Which one you need depends on the system you want to run it on and whether you
want or must compile it yourself. Check http://www.vim.org/download.php for
an overview of currently available distributions.

+Some popular places to get the latest Vim:
+* Check out the git repository from [github](https://github.com/vim/vim).
+* Get the source code as an [archive](https://github.com/vim/vim/releases).
+* Get a Windows executable from the
+[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
+
+

## Compiling ##

diff --git a/README.txt b/README.txt
index 0d0905a..a47b004 100644
--- a/README.txt
+++ b/README.txt
@@ -36,6 +36,12 @@ Which one you need depends on the system you want to run it on and whether you
want or must compile it yourself. Check "http://www.vim.org/download.php" for
an overview of currently available distributions.

+Some popular places to get the latest Vim:
+* Check out the git repository from github: https://github.com/vim/vim.
+* Get the source code as an archive: https://github.com/vim/vim/releases.
+* Get a Windows executable from the vim-win32-installer repository:
+ https://github.com/vim/vim-win32-installer/releases.
+

COMPILING

diff --git a/src/version.c b/src/version.c
index 1dd7d49..bfb64e6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1745,
+/**/
1744,
/**/
1743,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:02 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 95509e18f8806046eeee27482c77666bbec515da
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 15 21:16:11 2016 +0200

patch 7.4.1746
Problem: Memory leak in Perl.
Solution: Decrement the reference count. Add a test. (Damien)
---
src/if_perl.xs | 1 +
src/testdir/test_perl.vim | 28 +++++++++++++++++++++++-----
src/version.c | 2 ++
3 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/src/if_perl.xs b/src/if_perl.xs
index b091bf7..23246a5 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -844,6 +844,7 @@ I32 cur_val(IV iv, SV *sv)
else
rv = newBUFrv(newSV(0), curbuf);
sv_setsv(sv, rv);
+ SvREFCNT_dec(SvRV(rv));
return 0;
}
#endif /* !PROTO */
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim
index b523805..da47ab1 100644
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -34,7 +34,7 @@ fu <SID>catch_peval(expr)
endtry
call assert_true(0, 'no exception for `perleval("'.a:expr.'")`')
return ''
-endf
+endfunc

function Test_perleval()
call assert_false(perleval('undef'))
@@ -73,7 +73,7 @@ function Test_perleval()

call assert_equal('*VIM', perleval('"*VIM"'))
call assert_true(perleval('\\0') =~ 'SCALAR(0x\x\+)')
-endf
+endfunc

function Test_perldo()
sp __TEST__
@@ -82,7 +82,7 @@ function Test_perldo()
1
call assert_false(search('\Cperl'))
bw!
-endf
+endfunc

function Test_VIM_package()
perl VIM::DoCommand('let l:var = "foo"')
@@ -91,7 +91,7 @@ function Test_VIM_package()
set noet
perl VIM::SetOption('et')
call assert_true(&et)
-endf
+endfunc

function Test_stdio()
redir =>l:out
@@ -102,4 +102,22 @@ function Test_stdio()
EOF
redir END
call assert_equal(['&VIM::Msg', 'STDOUT', 'STDERR'], split(l:out, "\n"))
-endf
+endfunc
+
+function Test_SvREFCNT()
+ new t
+ perl <<--perl
+ my ($b, $w);
+ $b = $curbuf for 0 .. 10;
+ $w = $curwin for 0 .. 10;
+ VIM::DoCommand('bw! t');
+ if (exists &Internals::SvREFCNT) {
+ my $cb = Internals::SvREFCNT($$b);
+ my $cw = Internals::SvREFCNT($$w);
+ VIM::Eval("assert_equal(2, $cb)");
+ VIM::Eval("assert_equal(2, $cw)");
+ }
+ VIM::Eval("assert_false($$b)");
+ VIM::Eval("assert_false($$w)");
+--perl
+endfunc
diff --git a/src/version.c b/src/version.c
index bfb64e6..74e5f92 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1746,
+/**/
1745,
/**/
1744,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:02 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit fe4b18640656ddea41f60cf7a76956c9cc5494d6
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 15 21:47:54 2016 +0200

patch 7.4.1747
Problem: Coverity: missing check for NULL pointer.
Solution: Check for out of memory.
---
src/if_py_both.h | 7 +++++++
src/version.c | 2 ++
2 files changed, 9 insertions(+)

diff --git a/src/if_py_both.h b/src/if_py_both.h
index c6a8c44..de3e868 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -2922,6 +2922,13 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
if (argc != 0)
{
argv = PyMem_New(typval_T, (size_t) argc);
+ if (argv == NULL)
+ {
+ PyErr_NoMemory();
+ dict_unref(selfdict);
+ list_unref(argslist);
+ return NULL;
+ }
curtv = argv;
for (li = argslist->lv_first; li != NULL; li = li->li_next)
copy_tv(&li->li_tv, curtv++);
diff --git a/src/version.c b/src/version.c
index 74e5f92..d7544b8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1747,
+/**/
1746,
/**/
1745,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:03 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 1538fc34fae3fae39773ca43f6ff52401fce61d8
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 16 09:13:34 2016 +0200

patch 7.4.1748
Problem: "gD" does not find match in first column of first line. (Gary
Johnson)
Solution: Accept match at the cursor.
---
src/normal.c | 3 ++-
src/testdir/test_alot.vim | 1 +
src/version.c | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/normal.c b/src/normal.c
index f9a0124..7c15c15 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4228,7 +4228,8 @@ nv_gd(
char_u *ptr;

if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0
- || find_decl(ptr, len, nchar == 'd', thisblock, 0) == FAIL)
+ || find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START)
+ == FAIL)
clearopbeep(oap);
#ifdef FEAT_FOLDING
else if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP)
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index d393fe7..5637a8e 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -12,6 +12,7 @@ source test_feedkeys.vim
source test_fnamemodify.vim
source test_file_perm.vim
source test_glob2regpat.vim
+source test_goto.vim
source test_help_tagjump.vim
source test_join.vim
source test_lispwords.vim
diff --git a/src/version.c b/src/version.c
index d7544b8..d26268e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1748,
+/**/
1747,
/**/
1746,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:03 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit f9660b59b2bdaa3ec2e7b31ab52186ad8b99f047
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 16 22:19:15 2016 +0200

Add missing test file.
---
src/testdir/test_goto.vim | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/src/testdir/test_goto.vim b/src/testdir/test_goto.vim
new file mode 100644
index 0000000..fb8f190
--- /dev/null
+++ b/src/testdir/test_goto.vim
@@ -0,0 +1,10 @@
+" Test commands that jump somewhere.
+
+func Test_geedee()
+ new
+ call setline(1, ["Filename x;", "", "int Filename", "int func() {", "Filename y;"])
+ /y;/
+ normal gD
+ call assert_equal(1, line('.'))
+ quit!
+endfunc
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:03 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 30e12d259ee78272359f9da2655d0593a4f6a626
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 17 20:49:53 2016 +0200

patch 7.4.1749
Problem: When using GTK 3.20 there are a few warnings.
Solution: Use new functions when available. (Kazunobu Kuriyama)
---
src/gui_beval.c | 5 +++++
src/gui_gtk_x11.c | 5 +++++
src/version.c | 2 ++
3 files changed, 12 insertions(+)

diff --git a/src/gui_beval.c b/src/gui_beval.c
index 258ba8a..9a945bc 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -557,8 +557,13 @@ target_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
{
GdkWindow * const win = gtk_widget_get_window(widget);
GdkDisplay * const dpy = gdk_window_get_display(win);
+# if GTK_CHECK_VERSION(3,20,0)
+ GdkSeat * const seat = gdk_display_get_default_seat(dpy);
+ GdkDevice * const dev = gdk_seat_get_pointer(seat);
+# else
GdkDeviceManager * const mngr = gdk_display_get_device_manager(dpy);
GdkDevice * const dev = gdk_device_manager_get_client_pointer(mngr);
+# endif
gdk_window_get_device_position(win, dev , &x, &y, &state);
}
# else
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 00196eb..77e84c1 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -1842,8 +1842,13 @@ gui_gtk_get_pointer_device(GtkWidget *widget)
{
GdkWindow * const win = gtk_widget_get_window(widget);
GdkDisplay * const dpy = gdk_window_get_display(win);
+# if GTK_CHECK_VERSION(3,20,0)
+ GdkSeat * const seat = gdk_display_get_default_seat(dpy);
+ return gdk_seat_get_pointer(seat);
+# else
GdkDeviceManager * const mngr = gdk_display_get_device_manager(dpy);
return gdk_device_manager_get_client_pointer(mngr);
+# endif
}

static GdkWindow *
diff --git a/src/version.c b/src/version.c
index d26268e..fa09585 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1749,
+/**/
1748,
/**/
1747,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:03 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 7f7c3325d3f1baba32263a3457cfc4d90ecd5ff1
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 18 19:27:24 2016 +0200

patch 7.4.1750
Problem: When a buffer gets updated while in command line mode, the screen
may be messed up.
Solution: Postpone the redraw when the screen is scrolled.
---
src/channel.c | 16 +++++++++-------
src/version.c | 2 ++
2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/channel.c b/src/channel.c
index 72484ec..892c09a 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -1431,6 +1431,7 @@ channel_write_new_lines(buf_T *buf)

/*
* Invoke the "callback" on channel "channel".
+ * This does not redraw but sets channel_need_redraw;
*/
static void
invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
@@ -1445,8 +1446,7 @@ invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
call_func(callback, (int)STRLEN(callback),
&rettv, 2, argv, 0L, 0L, &dummy, TRUE, partial, NULL);
clear_tv(&rettv);
-
- redraw_after_callback();
+ channel_need_redraw = TRUE;
}

/*
@@ -2009,6 +2009,10 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
}
}

+/*
+ * Invoke the callback at "cbhead".
+ * Does not redraw but sets channel_need_redraw.
+ */
static void
invoke_one_time_callback(
channel_T *channel,
@@ -2099,6 +2103,7 @@ append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel)

/*
* Invoke a callback for "channel"/"part" if needed.
+ * This does not redraw but sets channel_need_redraw when redraw is needed.
* Return TRUE when a message was handled, there might be another one.
*/
static int
@@ -3468,13 +3473,10 @@ channel_parse_messages(void)
}
}

- if (channel_need_redraw && must_redraw)
+ if (channel_need_redraw)
{
channel_need_redraw = FALSE;
- update_screen(0);
- setcursor();
- cursor_on();
- out_flush();
+ redraw_after_callback();
}

return ret;
diff --git a/src/version.c b/src/version.c
index fa09585..695d0b7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1750,
+/**/
1749,
/**/
1748,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:03 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit def5abe0a2727041ecee69afdccfca405333bd24
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 18 19:46:15 2016 +0200

patch 7.4.1751
Problem: Crash when 'tagstack' is off. (Dominique Pelle)
Solution: Fix it. (Hirohito Higashi)
---
src/tag.c | 8 ++++++++
src/testdir/test_alot.vim | 1 +
src/version.c | 2 ++
3 files changed, 11 insertions(+)

diff --git a/src/tag.c b/src/tag.c
index 4224c6f..8f4495e 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -200,6 +200,14 @@ do_tag(
{
use_tagstack = FALSE;
new_tag = TRUE;
+#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+ if (g_do_tagpreview != 0)
+ {
+ vim_free(ptag_entry.tagname);
+ if ((ptag_entry.tagname = vim_strsave(tag)) == NULL)
+ goto end_do_tag;
+ }
+#endif
}
else
{
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 5637a8e..cb37771 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -27,6 +27,7 @@ source test_sort.vim
source test_statusline.vim
source test_syn_attr.vim
source test_tabline.vim
+source test_tagjump.vim
source test_timers.vim
source test_undolevels.vim
source test_unlet.vim
diff --git a/src/version.c b/src/version.c
index 695d0b7..7918d99 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1751,
+/**/
1750,
/**/
1749,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:04 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit c1808d5822ed9534ef7f0fe509b15bee92a5cc28
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 18 20:04:00 2016 +0200

patch 7.4.1752
Problem: When adding to the quickfix list the current position is reset.
Solution: Do not reset the position when not needed. (Yegappan Lakshmanan)
---
src/quickfix.c | 27 ++++++++++++++----------
src/testdir/test_quickfix.vim | 48 +++++++++++++++++++++++++++++++++++++++++++
src/version.c | 2 ++
3 files changed, 66 insertions(+), 11 deletions(-)

diff --git a/src/quickfix.c b/src/quickfix.c
index 00762bd..510d8dd 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -126,7 +126,7 @@ static int qf_win_pos_update(qf_info_T *qi, int old_qf_index);
static int is_qf_win(win_T *win, qf_info_T *qi);
static win_T *qf_find_win(qf_info_T *qi);
static buf_T *qf_find_buf(qf_info_T *qi);
-static void qf_update_buffer(qf_info_T *qi);
+static void qf_update_buffer(qf_info_T *qi, int update_cursor);
static void qf_set_title_var(qf_info_T *qi);
static void qf_fill_buffer(qf_info_T *qi);
#endif
@@ -880,7 +880,7 @@ qf_init_end:
vim_free(fmtstr);

#ifdef FEAT_WINDOWS
- qf_update_buffer(qi);
+ qf_update_buffer(qi, TRUE);
#endif

return retval;
@@ -2176,7 +2176,7 @@ qf_msg(qf_info_T *qi)
qi->qf_curlist + 1, qi->qf_listcount,
qi->qf_lists[qi->qf_curlist].qf_count);
#ifdef FEAT_WINDOWS
- qf_update_buffer(qi);
+ qf_update_buffer(qi, TRUE);
#endif
}

@@ -2606,7 +2606,7 @@ qf_find_buf(qf_info_T *qi)
* Find the quickfix buffer. If it exists, update the contents.
*/
static void
-qf_update_buffer(qf_info_T *qi)
+qf_update_buffer(qf_info_T *qi, int update_cursor)
{
buf_T *buf;
win_T *win;
@@ -2633,7 +2633,8 @@ qf_update_buffer(qf_info_T *qi)
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(&aco);

- (void)qf_win_pos_update(qi, 0);
+ if (update_cursor)
+ (void)qf_win_pos_update(qi, 0);
}
}

@@ -3675,7 +3676,7 @@ ex_vimgrep(exarg_T *eap)
qi->qf_lists[qi->qf_curlist].qf_index = 1;

#ifdef FEAT_WINDOWS
- qf_update_buffer(qi);
+ qf_update_buffer(qi, TRUE);
#endif

#ifdef FEAT_AUTOCMD
@@ -4115,12 +4116,16 @@ set_errorlist(
qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE;
else
qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE;
- qi->qf_lists[qi->qf_curlist].qf_ptr = qi->qf_lists[qi->qf_curlist].qf_start;
- if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
- qi->qf_lists[qi->qf_curlist].qf_index = 1;
+ if (action != 'a') {
+ qi->qf_lists[qi->qf_curlist].qf_ptr =
+ qi->qf_lists[qi->qf_curlist].qf_start;
+ if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
+ qi->qf_lists[qi->qf_curlist].qf_index = 1;
+ }

#ifdef FEAT_WINDOWS
- qf_update_buffer(qi);
+ /* Don't update the cursor in quickfix window when appending entries */
+ qf_update_buffer(qi, (action != 'a'));
#endif

return retval;
@@ -4427,7 +4432,7 @@ ex_helpgrep(exarg_T *eap)
free_string_option(save_cpo);

#ifdef FEAT_WINDOWS
- qf_update_buffer(qi);
+ qf_update_buffer(qi, TRUE);
#endif

#ifdef FEAT_AUTOCMD
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 8da1b6f..17b0763 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -697,3 +697,51 @@ func Test_cgetexpr_works()
" this must not crash Vim
cgetexpr [$x]
endfunc
+
+" Tests for the setqflist() and setloclist() functions
+function SetXlistTests(cchar, bnum)
+ if a:cchar == 'c'
+ let Xsetlist = function('setqflist')
+ let Xgetlist = function('getqflist')
+ let Xnext = 'cnext'
+ else
+ let Xsetlist = function('setloclist', [0])
+ let Xgetlist = function('getloclist', [0])
+ let Xnext = 'lnext'
+ endif
+
+ call Xsetlist([{'bufnr': a:bnum, 'lnum': 1},
+ \ {'bufnr': a:bnum, 'lnum': 2}])
+ let l = Xgetlist()
+ call assert_equal(2, len(l))
+ call assert_equal(2, l[1].lnum)
+
+ exe Xnext
+ call Xsetlist([{'bufnr': a:bnum, 'lnum': 3}], 'a')
+ let l = Xgetlist()
+ call assert_equal(3, len(l))
+ exe Xnext
+ call assert_equal(3, line('.'))
+
+ call Xsetlist([{'bufnr': a:bnum, 'lnum': 3},
+ \ {'bufnr': a:bnum, 'lnum': 4},
+ \ {'bufnr': a:bnum, 'lnum': 5}], 'r')
+ let l = Xgetlist()
+ call assert_equal(3, len(l))
+ call assert_equal(5, l[2].lnum)
+
+ call Xsetlist([])
+ let l = Xgetlist()
+ call assert_equal(0, len(l))
+endfunction
+
+function Test_setqflist()
+ new Xtestfile | only
+ let bnum = bufnr('%')
+ call setline(1, range(1,5))
+
+ call SetXlistTests('c', bnum)
+ call SetXlistTests('l', bnum)
+
+ call delete('Xtestfile')
+endfunction
diff --git a/src/version.c b/src/version.c
index 7918d99..0c50f1a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1752,
+/**/
1751,
/**/
1750,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:04 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 8d8aa0a367380f23f0af428fcb66a1a0615bf872
Author: Bram Moolenaar <***@vim.org>
Date: Mon Apr 18 20:21:12 2016 +0200

Add missing test file.
---
src/testdir/test_tagjump.vim | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/src/testdir/test_tagjump.vim b/src/testdir/test_tagjump.vim
new file mode 100644
index 0000000..d8a333f
--- /dev/null
+++ b/src/testdir/test_tagjump.vim
@@ -0,0 +1,9 @@
+" Tests for tagjump (tags and special searches)
+
+" SEGV occurs in older versions. (At least 7.4.1748 or older)
+func Test_ptag_with_notagstack()
+ set notagstack
+ call assert_fails('ptag does_not_exist_tag_name', 'E426')
+ set tagstack&vim
+endfunc
+" vim: sw=2 et
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:04 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit c020042083b9c0a4e932b562c3bef97c76328e18
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 12:02:02 2016 +0200

patch 7.4.1753
Problem: "noinsert" in 'completeopt' is sometimes ignored.
Solution: Set the variables when the 'completeopt' was set. (Ozaki Kiichi)
---
src/edit.c | 22 +++++++++++++++-------
src/option.c | 2 ++
src/proto/edit.pro | 1 +
src/version.c | 2 ++
4 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/edit.c b/src/edit.c
index f4a8354..080e1ab 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -2761,6 +2761,21 @@ ins_compl_make_cyclic(void)
}

/*
+ * Set variables that store noselect and noinsert behavior from the
+ * 'completeopt' value.
+ */
+ void
+completeopt_was_set()
+{
+ compl_no_insert = FALSE;
+ compl_no_select = FALSE;
+ if (strstr((char *)p_cot, "noselect") != NULL)
+ compl_no_select = TRUE;
+ if (strstr((char *)p_cot, "noinsert") != NULL)
+ compl_no_insert = TRUE;
+}
+
+/*
* Start completion for the complete() function.
* "startcol" is where the matched text starts (1 is first column).
* "list" is the list of matches.
@@ -3675,13 +3690,6 @@ ins_compl_prep(int c)

}

- compl_no_insert = FALSE;
- compl_no_select = FALSE;
- if (strstr((char *)p_cot, "noselect") != NULL)
- compl_no_select = TRUE;
- if (strstr((char *)p_cot, "noinsert") != NULL)
- compl_no_insert = TRUE;
-
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET)
{
/*
diff --git a/src/option.c b/src/option.c
index 8a706af..348c37a 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6951,6 +6951,8 @@ did_set_string_option(
{
if (check_opt_strings(p_cot, p_cot_values, TRUE) != OK)
errmsg = e_invarg;
+ else
+ completeopt_was_set();
}
#endif /* FEAT_INS_EXPAND */

diff --git a/src/proto/edit.pro b/src/proto/edit.pro
index 2772583..e32b5ba 100644
--- a/src/proto/edit.pro
+++ b/src/proto/edit.pro
@@ -8,6 +8,7 @@ void truncate_spaces(char_u *line);
void backspace_until_column(int col);
int vim_is_ctrl_x_key(int c);
int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int dir, int flags);
+void completeopt_was_set(void);
void set_completion(colnr_T startcol, list_T *list);
void ins_compl_show_pum(void);
char_u *find_word_start(char_u *ptr);
diff --git a/src/version.c b/src/version.c
index 0c50f1a..774ac52 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1753,
+/**/
1752,
/**/
1751,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:04 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit c3691332f72169c486066200c0f3935418364900
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 12:49:49 2016 +0200

patch 7.4.1754
Problem: When 'filetype' was set and reloading a buffer which does not
cause it to be set, the syntax isn't loaded. (KillTheMule)
Solution: Remember whether the FileType event was fired and fire it if not.
(Anton Lindqvist, closes #747)
---
src/fileio.c | 28 ++++++++++++++++++++++++++++
src/testdir/test_syntax.vim | 15 +++++++++++++++
src/version.c | 2 ++
3 files changed, 45 insertions(+)

diff --git a/src/fileio.c b/src/fileio.c
index ed8d45b..0ddd079 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -143,6 +143,18 @@ static void vim_settempdir(char_u *tempdir);
static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
#endif

+#ifdef FEAT_AUTOCMD
+/*
+ * Set by the apply_autocmds_group function if the given event is equal to
+ * EVENT_FILETYPE. Used by the readfile function in order to determine if
+ * EVENT_BUFREADPOST triggered the EVENT_FILETYPE.
+ *
+ * Relying on this value requires one to reset it prior calling
+ * apply_autocmds_group.
+ */
+static int au_did_filetype INIT(= FALSE);
+#endif
+
void
filemess(
buf_T *buf,
@@ -305,6 +317,10 @@ readfile(
int using_b_fname;
#endif

+#ifdef FEAT_AUTOCMD
+ au_did_filetype = FALSE; /* reset before triggering any autocommands */
+#endif
+
curbuf->b_no_eol_lnum = 0; /* in case it was set by the previous read */

/*
@@ -2669,8 +2685,17 @@ failed:
apply_autocmds_exarg(EVENT_FILTERREADPOST, NULL, sfname,
FALSE, curbuf, eap);
else if (newfile)
+ {
apply_autocmds_exarg(EVENT_BUFREADPOST, NULL, sfname,
FALSE, curbuf, eap);
+ if (!au_did_filetype && *curbuf->b_p_ft != NUL)
+ /*
+ * EVENT_FILETYPE was not triggered but the buffer already has a
+ * filetype. Trigger EVENT_FILETYPE using the existing filetype.
+ */
+ apply_autocmds(EVENT_FILETYPE, curbuf->b_p_ft, curbuf->b_fname,
+ TRUE, curbuf);
+ }
else
apply_autocmds_exarg(EVENT_FILEREADPOST, sfname, sfname,
FALSE, NULL, eap);
@@ -9537,6 +9562,9 @@ BYPASS_AU:
if (event == EVENT_BUFWIPEOUT && buf != NULL)
aubuflocal_remove(buf);

+ if (retval == OK && event == EVENT_FILETYPE)
+ au_did_filetype = TRUE;
+
return retval;
}

diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim
index 297e835..4b88fe3 100644
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -65,3 +65,18 @@ func Test_syn_iskeyword()

quit!
endfunc
+
+func Test_syntax_after_reload()
+ split Xsomefile
+ call setline(1, ['hello', 'there'])
+ w!
+ only!
+ setl filetype=hello
+ au FileType hello let g:gotit = 1
+ call assert_false(exists('g:gotit'))
+ edit other
+ buf Xsomefile
+ call assert_equal('hello', &filetype)
+ call assert_true(exists('g:gotit'))
+ call delete('Xsomefile')
+endfunc
diff --git a/src/version.c b/src/version.c
index 774ac52..20197c5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1754,
+/**/
1753,
/**/
1752,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:05 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 517ffbee0d5b7b46320726faaa330b61f54e867c
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 14:59:29 2016 +0200

patch 7.4.1755
Problem: When using getreg() on a non-existing register a NULL list is
returned. (Bjorn Linse)
Solution: Allocate an empty list. Add a test.
---
src/eval.c | 6 ++++--
src/testdir/test_expr.vim | 9 +++++++++
src/version.c | 2 ++
3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index bd4a11a..28cc2f1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6051,7 +6051,7 @@ list_alloc(void)
}

/*
- * Allocate an empty list for a return value.
+ * Allocate an empty list for a return value, with reference count set.
* Returns OK or FAIL.
*/
int
@@ -13173,7 +13173,9 @@ f_getreg(typval_T *argvars, typval_T *rettv)
rettv->v_type = VAR_LIST;
rettv->vval.v_list = (list_T *)get_reg_contents(regname,
(arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
- if (rettv->vval.v_list != NULL)
+ if (rettv->vval.v_list == NULL)
+ rettv_list_alloc(rettv);
+ else
++rettv->vval.v_list->lv_refcount;
}
else
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index c8c8e2c..a726933 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -74,3 +74,12 @@ func Test_strcharpart()

call assert_equal('a', strcharpart('axb', -1, 2))
endfunc
+
+func Test_getreg_empty_list()
+ call assert_equal('', getreg('x'))
+ call assert_equal([], getreg('x', 1, 1))
+ let x = getreg('x', 1, 1)
+ let y = x
+ call add(x, 'foo')
+ call assert_equal(['foo'], y)
+endfunc
diff --git a/src/version.c b/src/version.c
index 20197c5..393b75d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1755,
+/**/
1754,
/**/
1753,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:05 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit a6e42501424f6670fa864c739d2dc2eb764900b9
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 16:19:52 2016 +0200

patch 7.4.1756
Problem: "dll" options are not expanded.
Solution: Expand environment variables. (Ozaki Kiichi)
---
src/option.c | 12 ++++++------
src/testdir/test_alot.vim | 1 +
src/testdir/test_expand_dllpath.vim | 33 +++++++++++++++++++++++++++++++++
src/version.c | 2 ++
4 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/src/option.c b/src/option.c
index 348c37a..a5b403c 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1766,7 +1766,7 @@ static struct vimoption options[] =
(char_u *)&p_lpl, PV_NONE,
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
#if defined(DYNAMIC_LUA)
- {"luadll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ {"luadll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_luadll, PV_NONE,
{(char_u *)DYNAMIC_LUA_DLL, (char_u *)0L}
SCRIPTID_INIT},
@@ -2012,7 +2012,7 @@ static struct vimoption options[] =
#endif
(char_u *)0L} SCRIPTID_INIT},
#if defined(DYNAMIC_PERL)
- {"perldll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ {"perldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_perldll, PV_NONE,
{(char_u *)DYNAMIC_PERL_DLL, (char_u *)0L}
SCRIPTID_INIT},
@@ -2123,13 +2123,13 @@ static struct vimoption options[] =
#endif
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
#if defined(DYNAMIC_PYTHON3)
- {"pythonthreedll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ {"pythonthreedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_py3dll, PV_NONE,
{(char_u *)DYNAMIC_PYTHON3_DLL, (char_u *)0L}
SCRIPTID_INIT},
#endif
#if defined(DYNAMIC_PYTHON)
- {"pythondll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ {"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_pydll, PV_NONE,
{(char_u *)DYNAMIC_PYTHON_DLL, (char_u *)0L}
SCRIPTID_INIT},
@@ -2208,7 +2208,7 @@ static struct vimoption options[] =
#endif
SCRIPTID_INIT},
#if defined(DYNAMIC_RUBY)
- {"rubydll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ {"rubydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_rubydll, PV_NONE,
{(char_u *)DYNAMIC_RUBY_DLL, (char_u *)0L}
SCRIPTID_INIT},
@@ -2592,7 +2592,7 @@ static struct vimoption options[] =
(char_u *)&p_tgst, PV_NONE,
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
#if defined(DYNAMIC_TCL)
- {"tcldll", NULL, P_STRING|P_VI_DEF|P_SECURE,
+ {"tcldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_tcldll, PV_NONE,
{(char_u *)DYNAMIC_TCL_DLL, (char_u *)0L}
SCRIPTID_INIT},
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index cb37771..6bfd81e 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -8,6 +8,7 @@ source test_delete.vim
source test_ex_undo.vim
source test_expr.vim
source test_expand.vim
+source test_expand_dllpath.vim
source test_feedkeys.vim
source test_fnamemodify.vim
source test_file_perm.vim
diff --git a/src/testdir/test_expand_dllpath.vim b/src/testdir/test_expand_dllpath.vim
new file mode 100644
index 0000000..e69e7e1
--- /dev/null
+++ b/src/testdir/test_expand_dllpath.vim
@@ -0,0 +1,33 @@
+scriptencoding utf-8
+
+func s:test_expand_dllpath(optname)
+ let $TEST_EXPAND_DLLPATH = '/dllpath/lib' . substitute(a:optname, '\zedll$', '.', '')
+ execute 'let dllpath_save = &' . a:optname
+ try
+ execute 'set ' . a:optname . '=$TEST_EXPAND_DLLPATH'
+ execute 'call assert_equal("' . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')'
+
+ execute 'set ' . a:optname . '=~' . $TEST_EXPAND_DLLPATH
+ execute 'call assert_equal("' . $HOME . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')'
+ finally
+ execute 'let &' . a:optname . ' = dllpath_save'
+ let $TEST_EXPAND_DLLPATH = ''
+ endtry
+endfunc
+
+func s:generate_test_if_exists(optname)
+ if exists('&' . a:optname)
+ execute join([
+ \ 'func Test_expand_' . a:optname . '()',
+ \ ' call s:test_expand_dllpath("' . a:optname . '")',
+ \ 'endfunc'
+ \ ], "\n")
+ endif
+endfunc
+
+call s:generate_test_if_exists('luadll')
+call s:generate_test_if_exists('perldll')
+call s:generate_test_if_exists('pythondll')
+call s:generate_test_if_exists('pythonthreedll')
+call s:generate_test_if_exists('rubydll')
+call s:generate_test_if_exists('tcldll')
diff --git a/src/version.c b/src/version.c
index 393b75d..6fdc9da 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1756,
+/**/
1755,
/**/
1754,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:05 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 8e42ae5069d4985869e46eaa56900ed19e30f504
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 16:39:19 2016 +0200

patch 7.4.1757
Problem: When using complete() it may set 'modified' even though nothing
was inserted.
Solution: Use Down/Up instead of Next/Previous match. (Shougo, closes #745)
---
src/edit.c | 12 +++++++-----
src/version.c | 2 ++
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/edit.c b/src/edit.c
index 080e1ab..c813d1f 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -2813,12 +2813,15 @@ set_completion(colnr_T startcol, list_T *list)
compl_cont_status = 0;

compl_curr_match = compl_first_match;
- if (compl_no_insert)
+ if (compl_no_insert || compl_no_select)
+ {
ins_complete(K_DOWN, FALSE);
+ if (compl_no_select)
+ /* Down/Up has no real effect. */
+ ins_complete(K_UP, FALSE);
+ }
else
ins_complete(Ctrl_N, FALSE);
- if (compl_no_select)
- ins_complete(Ctrl_P, FALSE);

/* Lazily show the popup menu, unless we got interrupted. */
if (!compl_interrupted)
@@ -4969,8 +4972,7 @@ ins_compl_check_keys(int frequency)
ins_compl_key2dir(int c)
{
if (c == Ctrl_P || c == Ctrl_L
- || (pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP
- || c == K_S_UP || c == K_UP)))
+ || c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_UP)
return BACKWARD;
return FORWARD;
}
diff --git a/src/version.c b/src/version.c
index 6fdc9da..6308789 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1757,
+/**/
1756,
/**/
1755,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:05 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 245c41070c7f37d52be43cce0cb140bd3ade6c7e
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 17:37:41 2016 +0200

patch 7.4.1758
Problem: Triggering CursorHoldI when in CTRL-X mode causes problems.
Solution: Do not trigger CursorHoldI in CTRL-X mode. Add "!" flag to
feedkeys() (test with that didn't work though).
---
src/edit.c | 7 ++++++-
src/eval.c | 8 ++++++--
src/version.c | 2 ++
3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/edit.c b/src/edit.c
index c813d1f..73ed472 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1526,7 +1526,12 @@ normalchar:

#ifdef FEAT_AUTOCMD
/* If typed something may trigger CursorHoldI again. */
- if (c != K_CURSORHOLD)
+ if (c != K_CURSORHOLD
+# ifdef FEAT_COMPL_FUNC
+ /* but not in CTRL-X mode, a script can't restore the state */
+ && ctrl_x_mode == 0
+# endif
+ )
did_cursorhold = FALSE;
#endif

diff --git a/src/eval.c b/src/eval.c
index 28cc2f1..53a651a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -11547,6 +11547,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
char_u nbuf[NUMBUFLEN];
int typed = FALSE;
int execute = FALSE;
+ int dangerous = FALSE;
char_u *keys_esc;

/* This is not allowed in the sandbox. If the commands would still be
@@ -11569,6 +11570,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
case 't': typed = TRUE; break;
case 'i': insert = TRUE; break;
case 'x': execute = TRUE; break;
+ case '!': dangerous = TRUE; break;
}
}
}
@@ -11592,9 +11594,11 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
/* Avoid a 1 second delay when the keys start Insert mode. */
msg_scroll = FALSE;

- ++ex_normal_busy;
+ if (!dangerous)
+ ++ex_normal_busy;
exec_normal(TRUE);
- --ex_normal_busy;
+ if (!dangerous)
+ --ex_normal_busy;
msg_scroll |= save_msg_scroll;
}
}
diff --git a/src/version.c b/src/version.c
index 6308789..0993f66 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1758,
+/**/
1757,
/**/
1756,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:06 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 40b1b5443c88fab77f1f7c6f9e801f7ffdb7e0a8
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 20:18:23 2016 +0200

patch 7.4.1759
Problem: When using feedkeys() in a timer the inserted characters are not
used right away.
Solution: Break the wait loop when characters have been added to typebuf.
use this for testing CursorHoldI.
---
src/gui.c | 6 ++++++
src/os_unix.c | 17 ++++++++++++-----
src/os_win32.c | 6 ++++++
src/testdir/test_autocmd.vim | 27 +++++++++++++++++++++++++++
src/version.c | 2 ++
5 files changed, 53 insertions(+), 5 deletions(-)

diff --git a/src/gui.c b/src/gui.c
index 8999f79..d747d81 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -2855,6 +2855,7 @@ gui_wait_for_chars_or_timer(long wtime)
#ifdef FEAT_TIMERS
int due_time;
long remaining = wtime;
+ int tb_change_cnt = typebuf.tb_change_cnt;

/* When waiting very briefly don't trigger timers. */
if (wtime >= 0 && wtime < 10L)
@@ -2865,6 +2866,11 @@ gui_wait_for_chars_or_timer(long wtime)
/* Trigger timers and then get the time in wtime until the next one is
* due. Wait up to that time. */
due_time = check_due_timer();
+ if (typebuf.tb_change_cnt != tb_change_cnt)
+ {
+ /* timer may have used feedkeys() */
+ return FALSE;
+ }
if (due_time <= 0 || (wtime > 0 && due_time > remaining))
due_time = remaining;
if (gui_mch_wait_for_chars(due_time))
diff --git a/src/os_unix.c b/src/os_unix.c
index 58a27da..f8cf691 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -397,7 +397,7 @@ mch_inchar(

if (wtime >= 0)
{
- while (WaitForChar(wtime) == 0) /* no character available */
+ while (!WaitForChar(wtime)) /* no character available */
{
if (do_resize)
handle_resize();
@@ -420,7 +420,7 @@ mch_inchar(
* flush all the swap files to disk.
* Also done when interrupted by SIGWINCH.
*/
- if (WaitForChar(p_ut) == 0)
+ if (!WaitForChar(p_ut))
{
#ifdef FEAT_AUTOCMD
if (trigger_cursorhold() && maxlen >= 3
@@ -448,7 +448,7 @@ mch_inchar(
* We want to be interrupted by the winch signal
* or by an event on the monitored file descriptors.
*/
- if (WaitForChar(-1L) == 0)
+ if (!WaitForChar(-1L))
{
if (do_resize) /* interrupted by SIGWINCH signal */
handle_resize();
@@ -482,7 +482,7 @@ handle_resize(void)
}

/*
- * return non-zero if a character is available
+ * Return non-zero if a character is available.
*/
int
mch_char_avail(void)
@@ -5210,7 +5210,7 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED)
/* See above for type of argv. */
execvp(argv[0], argv);

- perror("executing job failed");
+ // perror("executing job failed");
_exit(EXEC_FAILED); /* exec failed, return failure code */
}

@@ -5359,6 +5359,7 @@ mch_breakcheck(void)
* "msec" == -1 will block forever.
* Invokes timer callbacks when needed.
* When a GUI is being used, this will never get called -- webb
+ * Returns TRUE when a character is available.
*/
static int
WaitForChar(long msec)
@@ -5367,6 +5368,7 @@ WaitForChar(long msec)
long due_time;
long remaining = msec;
int break_loop = FALSE;
+ int tb_change_cnt = typebuf.tb_change_cnt;

/* When waiting very briefly don't trigger timers. */
if (msec >= 0 && msec < 10L)
@@ -5377,6 +5379,11 @@ WaitForChar(long msec)
/* Trigger timers and then get the time in msec until the next one is
* due. Wait up to that time. */
due_time = check_due_timer();
+ if (typebuf.tb_change_cnt != tb_change_cnt)
+ {
+ /* timer may have used feedkeys() */
+ return FALSE;
+ }
if (due_time <= 0 || (msec > 0 && due_time > remaining))
due_time = remaining;
if (WaitForCharOrMouse(due_time, &break_loop))
diff --git a/src/os_win32.c b/src/os_win32.c
index 627d515..159905d 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -1446,6 +1446,7 @@ WaitForChar(long msec)
INPUT_RECORD ir;
DWORD cRecords;
WCHAR ch, ch2;
+ int tb_change_cnt = typebuf.tb_change_cnt;

if (msec > 0)
/* Wait until the specified time has elapsed. */
@@ -1511,6 +1512,11 @@ WaitForChar(long msec)
/* Trigger timers and then get the time in msec until the
* next one is due. Wait up to that time. */
due_time = check_due_timer();
+ if (typebuf.tb_change_cnt != tb_change_cnt)
+ {
+ /* timer may have used feedkeys() */
+ return FALSE;
+ }
if (due_time > 0 && dwWaitTime > (DWORD)due_time)
dwWaitTime = due_time;
}
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 12c9848..d3e0981 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -6,3 +6,30 @@ func Test_vim_did_enter()
" This script will never reach the main loop, can't check if v:vim_did_enter
" becomes one.
endfunc
+
+if !has('timers')
+ finish
+endif
+
+func ExitInsertMode(id)
+ call feedkeys("\<Esc>")
+endfunc
+
+func Test_cursorhold_insert()
+ let g:triggered = 0
+ au CursorHoldI * let g:triggered += 1
+ set updatetime=20
+ call timer_start(100, 'ExitInsertMode')
+ call feedkeys('a', 'x!')
+ call assert_equal(1, g:triggered)
+endfunc
+
+func Test_cursorhold_insert_ctrl_x()
+ let g:triggered = 0
+ au CursorHoldI * let g:triggered += 1
+ set updatetime=20
+ call timer_start(100, 'ExitInsertMode')
+ " CursorHoldI does not trigger after CTRL-X
+ call feedkeys("a\<C-X>", 'x!')
+ call assert_equal(0, g:triggered)
+endfunc
diff --git a/src/version.c b/src/version.c
index 0993f66..f550196 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1759,
+/**/
1758,
/**/
1757,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:06 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 4445f7ee708f1a1304526a5979c9dd9883a92a0a
Author: Bram Moolenaar <***@vim.org>
Date: Wed Apr 20 20:55:56 2016 +0200

patch 7.4.1760
Problem: Compiler warning for unused variable.
Solution: Add #ifdef. (John Marriott)
---
src/os_win32.c | 2 ++
src/version.c | 2 ++
2 files changed, 4 insertions(+)

diff --git a/src/os_win32.c b/src/os_win32.c
index 159905d..dfc0d4d 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -1446,7 +1446,9 @@ WaitForChar(long msec)
INPUT_RECORD ir;
DWORD cRecords;
WCHAR ch, ch2;
+#ifdef FEAT_TIMERS
int tb_change_cnt = typebuf.tb_change_cnt;
+#endif

if (msec > 0)
/* Wait until the specified time has elapsed. */
diff --git a/src/version.c b/src/version.c
index f550196..eeff8c6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1760,
+/**/
1759,
/**/
1758,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:06 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit aa3b15dbebf333282503d6031e2f9ba6ee4398ed
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 08:53:19 2016 +0200

Updated runtime files.
---
runtime/autoload/netrw.vim | 502 ++++++++++++++++++++---------------------
runtime/doc/autocmd.txt | 5 +-
runtime/doc/change.txt | 6 +-
runtime/doc/channel.txt | 4 +-
runtime/doc/editing.txt | 2 +-
runtime/doc/eval.txt | 60 +++--
runtime/doc/if_cscop.txt | 4 +-
runtime/doc/if_pyth.txt | 2 +-
runtime/doc/if_tcl.txt | 2 +-
runtime/doc/index.txt | 7 +-
runtime/doc/map.txt | 2 +-
runtime/doc/netbeans.txt | 2 +-
runtime/doc/options.txt | 10 +-
runtime/doc/pattern.txt | 6 +-
runtime/doc/pi_netrw.txt | 27 ++-
runtime/doc/tags | 23 +-
runtime/doc/term.txt | 2 +-
runtime/doc/todo.txt | 109 ++++-----
runtime/doc/version8.txt | 20 +-
runtime/indent/vim.vim | 4 +-
runtime/plugin/netrwPlugin.vim | 2 +-
runtime/syntax/php.vim | 4 +-
22 files changed, 414 insertions(+), 391 deletions(-)

diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 64c08e9..de85844 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
-" Date: Feb 16, 2016
-" Version: 155 ASTRO-ONLY
+" Date: Apr 20, 2016
+" Version: 156
" Maintainer: Charles E Campbell <***@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
@@ -13,7 +13,7 @@
" expressed or implied. By using this plugin, you agree that
" in no event will the copyright holder be liable for any damages
" resulting from the use of this software.
-"redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore(,'~'.expand("<slnum>"))
+"redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
"
" But be doers of the Word, and not only hearers, deluding your own selves {{{1
" (James 1:22 RSV)
@@ -30,7 +30,7 @@ if v:version < 704 || !has("patch213")
let s:needpatch213= 1
finish
endif
-let g:loaded_netrw = "v155"
+let g:loaded_netrw = "v156"
if !exists("s:NOTE")
let s:NOTE = 0
let s:WARNING = 1
@@ -444,7 +444,7 @@ call s:NetrwInit("g:netrw_markfileesc" , '*./[\~')
call s:NetrwInit("g:netrw_maxfilenamelen", 32)
call s:NetrwInit("g:netrw_menu" , 1)
call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir")
-call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~ '[anh]'))
+call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh]'))
call s:NetrwInit("g:netrw_retmap" , 0)
if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME")
@@ -490,6 +490,7 @@ if !exists("g:netrw_sort_sequence")
endif
call s:NetrwInit("g:netrw_special_syntax" , 0)
call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$')
+call s:NetrwInit("g:netrw_suppress_gx_mesg", 1)
call s:NetrwInit("g:netrw_use_noswf" , 1)
call s:NetrwInit("g:netrw_sizestyle" ,"b")
" Default values - t-w ---------- {{{3
@@ -526,6 +527,7 @@ if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4'
else
let s:treedepthstring= "| "
endif
+call s:NetrwInit("s:netrw_nbcd",'{}')

" BufEnter event ignored by decho when following variable is true
" Has a side effect that doau BufReadPost doesn't work, so
@@ -551,7 +553,7 @@ if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists(
endif
au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif

-if g:netrw_keepj =~ "keepj"
+if g:netrw_keepj =~# "keepj"
com! -nargs=* NetrwKeepj keepj <args>
else
let g:netrw_keepj= ""
@@ -821,7 +823,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
let dirname= curfiledir
" call Decho("..empty dirname, using current file's directory<".dirname.">",'~'.expand("<slnum>"))
endif
- if dirname =~ '^scp://' || dirname =~ '^ftp://'
+ if dirname =~# '^scp://' || dirname =~ '^ftp://'
call netrw#Nread(2,dirname)
else
if dirname == ""
@@ -1560,15 +1562,7 @@ fun! s:NetrwOptionRestore(vt)
" call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$"))
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
if !exists("{a:vt}netrw_optionsave")
- if exists("s:nbcd_curpos_{bufnr('%')}")
-" call Decho("restoring posn to s:nbcd_curpos_".bufnr('%')."<".string(s:nbcd_curpos_{bufnr('%')}).">",'~'.expand("<slnum>"))
- NetrwKeepj call winrestview(s:nbcd_curpos_{bufnr('%')})
-" call Decho("win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$"),'~'.expand("<slnum>"))
-" call Decho("unlet s:nbcd_curpos_".bufnr('%'),'~'.expand("<slnum>"))
- unlet s:nbcd_curpos_{bufnr('%')}
- else
-" call Decho("no previous position",'~'.expand("<slnum>"))
- endif
+ call s:RestorePosn(s:netrw_nbcd)
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
" call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist")
@@ -1656,16 +1650,7 @@ fun! s:NetrwOptionRestore(vt)
if exists("{a:vt}netrw_regstar") |sil! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif
endif
if exists("{a:vt}netrw_regslash")|sil! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif
- if exists("s:nbcd_curpos_{bufnr('%')}")
-" call Decho("restoring posn to s:nbcd_curpos_".bufnr('%')."<".string(s:nbcd_curpos_{bufnr('%')}).">",'~'.expand("<slnum>"))
- NetrwKeepj call winrestview(s:nbcd_curpos_{bufnr('%')})
-" call Decho("unlet s:nbcd_curpos_".bufnr('%'),'~'.expand("<slnum>"))
- if exists("s:nbcd_curpos_".bufnr('%'))
- unlet s:nbcd_curpos_{bufnr('%')}
- endif
- else
-" call Decho("no previous position",'~'.expand("<slnum>"))
- endif
+ call s:RestorePosn(s:netrw_nbcd)

" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd,'~'.expand("<slnum>"))
" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist"),'~'.expand("<slnum>"))
@@ -3016,10 +3001,10 @@ fun! s:NetrwMethod(choice)
if exists("s:netrw_hup[host]")
call NetUserPass("ftp:".host)

- elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:'
+ elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~# '-[sS]:'
" call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
" call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
- if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>'
+ if g:netrw_ftp_cmd =~# '-[sS]:\S*MACHINE\>'
let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\<MACHINE\>',g:netrw_machine,'')
" call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
endif
@@ -3583,7 +3568,7 @@ fun! s:NetrwBrowse(islocal,dirname)
" This is useful when one edits a local file, then :e ., then :Rex
if a:islocal && !exists("w:netrw_rexfile") && bufname("#") != ""
let w:netrw_rexfile= bufname("#")
-" call Decho("setting w:netrw_rexfile<".w:netrw_rexfile."> win#".winnr())
+" call Decho("setting w:netrw_rexfile<".w:netrw_rexfile."> win#".winnr(),'~'.expand("<slnum>"))
endif

" s:NetrwBrowse : initialize history {{{3
@@ -3773,7 +3758,7 @@ fun! s:NetrwBrowse(islocal,dirname)

" analyze dirname and g:netrw_list_cmd {{{3
" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">",'~'.expand("<slnum>"))
- if dirname =~ "^NetrwTreeListing\>"
+ if dirname =~# "^NetrwTreeListing\>"
let dirname= b:netrw_curdir
" call Decho("(dirname was <NetrwTreeListing>) dirname<".dirname.">",'~'.expand("<slnum>"))
elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
@@ -3854,15 +3839,15 @@ endfun
" directory is used.
fun! s:NetrwFile(fname)
" call Dfunc("s:NetrwFile(fname<".a:fname.">) win#".winnr())
-" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'))
-" call Decho("g:netrw_cygwin =".(exists("g:netrw_cygwin")? g:netrw_cygwin : 'n/a'))
-" call Decho("g:netrw_liststyle=".(exists("g:netrw_liststyle")? g:netrw_liststyle : 'n/a'))
-" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'))
+" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("g:netrw_cygwin =".(exists("g:netrw_cygwin")? g:netrw_cygwin : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("g:netrw_liststyle=".(exists("g:netrw_liststyle")? g:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))

" clean up any leading treedepthstring
if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
let fname= substitute(a:fname,'^'.s:treedepthstring.'\+','','')
-" call Decho("clean up any leading treedepthstring: fname<".fname.">")
+" call Decho("clean up any leading treedepthstring: fname<".fname.">",'~'.expand("<slnum>"))
else
let fname= a:fname
endif
@@ -3897,6 +3882,8 @@ fun! s:NetrwFile(fname)
" vim and netrw agree on the current directory
let ret= fname
" call Decho("vim and netrw agree on current directory (g:netrw_keepdir=".g:netrw_keepdir.")",'~'.expand("<slnum>"))
+" call Decho("vim directory: ".getcwd(),'~'.expand("<slnum>"))
+" call Decho("netrw directory: ".(exists("b:netrw_curdir")? b:netrw_curdir : 'n/a'),'~'.expand("<slnum>"))
endif

" call Dret("s:NetrwFile ".ret)
@@ -3910,9 +3897,9 @@ fun! s:NetrwFileInfo(islocal,fname)
let ykeep= @@
if a:islocal
let lsopt= "-lsad"
- if g:netrw_sizestyle =~ 'H'
+ if g:netrw_sizestyle =~# 'H'
let lsopt= "-lsadh"
- elseif g:netrw_sizestyle =~ 'h'
+ elseif g:netrw_sizestyle =~# 'h'
let lsopt= "-lsadh --si"
endif
if (has("unix") || has("macunix")) && executable("/bin/ls")
@@ -3944,7 +3931,7 @@ fun! s:NetrwFileInfo(islocal,fname)
endif
let t = getftime(s:NetrwFile(fname))
let sz = getfsize(s:NetrwFile(fname))
- if g:netrw_sizestyle =~ "[hH]"
+ if g:netrw_sizestyle =~# "[hH]"
let sz= s:NetrwHumanReadable(sz)
endif
echo a:fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(s:NetrwFile(fname)))
@@ -3958,108 +3945,49 @@ fun! s:NetrwFileInfo(islocal,fname)
endfun

" ---------------------------------------------------------------------
+" s:NetrwFullPath: returns the full path to a directory and/or file {{{2
+fun! s:NetrwFullPath(filename)
+" " call Dfunc("s:NetrwFullPath(filename<".a:filename.">)")
+ let filename= a:filename
+ if filename !~ '^/'
+ let filename= resolve(getcwd().'/'.filename)
+ endif
+ if filename != "/" && filename =~ '/$'
+ let filename= substitute(filename,'/$','','')
+ endif
+" " call Dret("s:NetrwFullPath <".filename.">")
+ return filename
+endfun
+
+" ---------------------------------------------------------------------
" s:NetrwGetBuffer: {{{2
" returns 0=cleared buffer
" 1=re-used buffer (buffer not cleared)
fun! s:NetrwGetBuffer(islocal,dirname)
" call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle)
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("netrwbuf dictionary=".string(s:netrwbuf),'~'.expand("<slnum>"))
let dirname= a:dirname

" re-use buffer if possible {{{3
" call Decho("--re-use a buffer if possible--",'~'.expand("<slnum>"))
- if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
- " find NetrwTreeList buffer if there is one
-" call Decho("case liststyle=treelist: find NetrwTreeList buffer if there is one",'~'.expand("<slnum>"))
- if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0
-" call Decho(" re-using w:netrw_treebufnr=".w:netrw_treebufnr,'~'.expand("<slnum>"))
- let eikeep= &ei
- setl ei=all
- exe "sil! keepj noswapfile keepalt b ".w:netrw_treebufnr
- let &ei= eikeep
- setl ma
- sil! NetrwKeepj %d _
-" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
-" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
-" call Dret("s:NetrwGetBuffer 0<buffer cleared> : bufnum#".w:netrw_treebufnr."<NetrwTreeListing>")
- return 0
+ if !exists("s:netrwbuf")
+ let s:netrwbuf= {}
+ endif
+ if has_key(s:netrwbuf,s:NetrwFullPath(dirname))
+ let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)]
+" call Decho("lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnum)
+ if !bufexists(bufnum)
+ call remove(s:netrwbuf,s:NetrwFullPath(dirname))
+ let bufnum= -1
endif
- let bufnum= -1
-" call Decho(" liststyle=TREE but w:netrw_treebufnr doesn't exist",'~'.expand("<slnum>"))
-
else
- " find buffer number of buffer named precisely the same as dirname {{{3
-" call Decho("case listtyle not treelist: find buffer numnber of buffer named precisely the same as dirname--",'~'.expand("<slnum>"))
-" call Dredir("(NetrwGetBuffer) ls!","ls!")
-
- " get dirname and associated buffer number
- let bufnum = bufnr(escape(dirname,'\'))
-" call Decho(" find buffer<".dirname.">'s number ",'~'.expand("<slnum>"))
-" call Decho(" bufnr(dirname<".escape(dirname,'\').">)=".bufnum,'~'.expand("<slnum>"))
-
- if bufnum < 0 && dirname !~ '/$'
- " try appending a trailing /
-" call Decho(" try appending a trailing / to dirname<".dirname.">",'~'.expand("<slnum>"))
- let bufnum= bufnr(escape(dirname.'/','\'))
- if bufnum > 0
- let dirname= dirname.'/'
- endif
- endif
-
- if bufnum < 0 && dirname =~ '/$'
- " try removing a trailing /
-" call Decho(" try removing a trailing / from dirname<".dirname.">",'~'.expand("<slnum>"))
- let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\'))
- if bufnum > 0
- let dirname= substitute(dirname,'/$','','')
- endif
- endif
-
-" call Decho(" findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)",'~'.expand("<slnum>"))
- " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/ and abc/ matches)
- if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.'
- " handle approximate matches
-" call Decho(" handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'",'~'.expand("<slnum>"))
- let ibuf = 1
- let buflast = bufnr("$")
-" call Decho(" findbuf2: buflast=bufnr($)=".buflast,'~'.expand("<slnum>"))
- while ibuf <= buflast
- let bname= substitute(bufname(ibuf),'\\','/','g')
- let bname= substitute(bname,'.\zs/$','','')
-" call Decho(" findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">",'~'.expand("<slnum>"))
- if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/'
- " bname is not empty
- " dirname ends with bname,
- " dirname doesn't start with /, so its not a absolute path
-" call Decho(" findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/','~'.expand("<slnum>"))
- break
- endif
- if bname =~ '^'.dirname.'/\=$'
- " bname begins with dirname
-" call Decho(' findbuf3b: passes test 2 : bname<'.bname.'>=~^'.dirname.'/\=$','~'.expand("<slnum>"))
- break
- endif
- if dirname =~ '^'.bname.'/$'
-" call Decho(' findbuf3c: passes test 3 : dirname<'.dirname.'>=~^'.bname.'/$','~'.expand("<slnum>"))
- break
- endif
- if bname != '' && dirname =~ '/'.bname.'$' && bname == bufname("%") && line("$") == 1
-" call Decho(' findbuf3d: passes test 4 : dirname<'.dirname.'>=~ /'.bname.'$','~'.expand("<slnum>"))
- break
- endif
- let ibuf= ibuf + 1
- endwhile
- if ibuf > buflast
- let bufnum= -1
- else
- let bufnum= ibuf
- endif
-" call Decho(" findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")",'~'.expand("<slnum>"))
- endif
+" call Decho("lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key")
+ let bufnum= -1
endif

" get enew buffer and name it -or- re-use buffer {{{3
- if bufnum < 0 || !bufexists(bufnum) " get enew buffer and name it
+ if bufnum < 0 " get enew buffer and name it
" call Decho("--get enew buffer and name it (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)",'~'.expand("<slnum>"))
call s:NetrwEnew(dirname)
" call Decho(" got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)",'~'.expand("<slnum>"))
@@ -4093,6 +4021,10 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" let v:errmsg= "" " Decho
exe 'sil! keepj keepalt file '.escdirname
" call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">",'~'.expand("<slnum>"))
+ " enter the new buffer into the s:netrwbuf dictionary
+ let s:netrwbuf[s:NetrwFullPath(dirname)]= bufnr("%")
+" call Decho("update netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnr("%"),'~'.expand("<slnum>"))
+" call Decho("netrwbuf dictionary=".string(s:netrwbuf),'~'.expand("<slnum>"))
endif
" call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))

@@ -4100,7 +4032,7 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)",'~'.expand("<slnum>"))
let eikeep= &ei
setl ei=all
- if getline(2) =~ '^" Netrw Directory Listing'
+ if getline(2) =~# '^" Netrw Directory Listing'
" call Decho(" getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum,'~'.expand("<slnum>"))
exe "sil! NetrwKeepj noswapfile keepalt b ".bufnum
else
@@ -4215,20 +4147,20 @@ fun! s:NetrwGetWord()
let dirname= "./"
let curline= getline('.')

- if curline =~ '"\s*Sorted by\s'
+ if curline =~# '"\s*Sorted by\s'
NetrwKeepj norm s
let s:netrw_skipbrowse= 1
echo 'Pressing "s" also works'

- elseif curline =~ '"\s*Sort sequence:'
+ elseif curline =~# '"\s*Sort sequence:'
let s:netrw_skipbrowse= 1
echo 'Press "S" to edit sorting sequence'

- elseif curline =~ '"\s*Quick Help:'
+ elseif curline =~# '"\s*Quick Help:'
NetrwKeepj norm ?
let s:netrw_skipbrowse= 1

- elseif curline =~ '"\s*\%(Hiding\|Showing\):'
+ elseif curline =~# '"\s*\%(Hiding\|Showing\):'
NetrwKeepj norm a
let s:netrw_skipbrowse= 1
echo 'Pressing "a" also works'
@@ -4471,10 +4403,10 @@ fun! s:NetrwBookmark(del,...)
let i = 1
while i <= a:0
if islocal
- if v:version == 704 && has("patch656")
- let mbfiles= glob(a:{i},0,1,1)
+ if v:version > 704 || (v:version == 704 && has("patch656"))
+ let mbfiles= glob(fnameescape(a:{i}),0,1,1)
else
- let mbfiles= glob(a:{i},0,1)
+ let mbfiles= glob(fnameescape(a:{i}),0,1)
endif
else
let mbfiles= [a:{i}]
@@ -4578,14 +4510,13 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" call Dret("s:NetrwBrowseChgDir")
return
endif
+" call Decho("b:netrw_curdir<".b:netrw_curdir.">")

" NetrwBrowseChgDir: save options and initialize {{{3
" call Decho("saving options",'~'.expand("<slnum>"))
+ call s:SavePosn(s:netrw_nbcd)
NetrwKeepj call s:NetrwOptionSave("s:")
NetrwKeepj call s:NetrwSafeOptions()
- let nbcd_curpos = winsaveview()
-" call Decho("saving posn to nbcd_curpos<".string(nbcd_curpos).">",'~'.expand("<slnum>"))
- let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos
if (has("win32") || has("win95") || has("win64") || has("win16"))
let dirname = substitute(b:netrw_curdir,'\\','/','ge')
else
@@ -4601,15 +4532,14 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
if g:netrw_banner
" call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#"),'~'.expand("<slnum>"))
if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt
- if getline(".") =~ 'Quick Help'
+ if getline(".") =~# 'Quick Help'
" call Decho("#1: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp)
" call Decho("#2: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
setl ma noro nowrap
NetrwKeepj call setline(line('.'),'" Quick Help: <F1>:help '.s:QuickHelp[g:netrw_quickhelp])
setl noma nomod nowrap
-" call Decho("restoring posn to nbcd_curpos<".string(nbcd_curpos).">",'~'.expand("<slnum>"))
- NetrwKeepj call winrestview(nbcd_curpos)
+ call s:RestorePosn(s:netrw_nbcd)
NetrwKeepj call s:NetrwOptionRestore("s:")
" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
endif
@@ -4633,7 +4563,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" call Decho("adjusting dirname<".dirname.'> (put trailing "/" back)','~'.expand("<slnum>"))
endif

-" " call Decho("[newdir<".newdir."> ".((newdir =~ dirpat)? "=~" : "!~")." dirpat<".dirpat.">] && [islocal=".a:islocal."] && [newdir is ".(isdirectory(s:NetrwFile(newdir))? "" : "not ")."a directory]",'~'.expand("<slnum>"))
+" call Decho("[newdir<".newdir."> ".((newdir =~ dirpat)? "=~" : "!~")." dirpat<".dirpat.">] && [islocal=".a:islocal."] && [newdir is ".(isdirectory(s:NetrwFile(newdir))? "" : "not ")."a directory]",'~'.expand("<slnum>"))
if newdir !~ dirpat && !(a:islocal && isdirectory(s:NetrwFile(s:ComposePath(dirname,newdir))))
" ------------------------------
" NetrwBrowseChgDir: edit a file {{{3
@@ -4658,7 +4588,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" call Decho("edit-a-file: dirname<".dirname.">",'~'.expand("<slnum>"))
" call Decho("edit-a-file: tree listing",'~'.expand("<slnum>"))
elseif newdir =~ '^\(/\|\a:\)'
-" call Decho("edit-a-file: handle an url or path starting with /: <".newdir.">")
+" call Decho("edit-a-file: handle an url or path starting with /: <".newdir.">",'~'.expand("<slnum>"))
let dirname= newdir
else
let dirname= s:ComposePath(dirname,newdir)
@@ -4685,7 +4615,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
if !&ea
keepalt wincmd _
endif
- call s:SetRexDir(a:islocal,b:netrw_curdir)
+ call s:SetRexDir(a:islocal,curdir)
elseif g:netrw_browse_split == 2
" vertically splitting the window first
" call Decho("edit-a-file: vertically splitting window prior to edit",'~'.expand("<slnum>"))
@@ -4693,12 +4623,15 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
if !&ea
keepalt wincmd |
endif
- call s:SetRexDir(a:islocal,b:netrw_curdir)
+ call s:SetRexDir(a:islocal,curdir)
elseif g:netrw_browse_split == 3
" open file in new tab
" call Decho("edit-a-file: opening new tab prior to edit",'~'.expand("<slnum>"))
keepalt tabnew
- call s:SetRexDir(a:islocal,b:netrw_curdir)
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+ endif
+ call s:SetRexDir(a:islocal,curdir)
elseif g:netrw_browse_split == 4
" act like "P" (ie. open previous window)
" call Decho("edit-a-file: use previous window for edit",'~'.expand("<slnum>"))
@@ -4707,7 +4640,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" call Dret("s:NetrwBrowseChgDir")
return
endif
- call s:SetRexDir(a:islocal,b:netrw_curdir)
+ call s:SetRexDir(a:islocal,curdir)
else
" handling a file, didn't split, so remove menu
" call Decho("edit-a-file: handling a file+didn't split, so remove menu",'~'.expand("<slnum>"))
@@ -4860,7 +4793,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
endif
let treedir = s:NetrwTreeDir(a:islocal)
" call Decho("tree-list: treedir<".treedir.">",'~'.expand("<slnum>"))
- let s:treecurpos = nbcd_curpos
+ let s:treecurpos = winsaveview()
let haskey = 0
" call Decho("tree-list: w:netrw_treedict<".string(w:netrw_treedict).">",'~'.expand("<slnum>"))

@@ -4936,6 +4869,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" else " Decho
" call Decho("skipping option restore (dorestore==0): hidden=".&hidden." bufhidden=".&bufhidden." mod=".&mod,'~'.expand("<slnum>"))
endif
+ call s:RestorePosn(s:netrw_nbcd)
if dolockout && dorestore
" call Decho("restore: filewritable(dirname<".dirname.">)=".filewritable(dirname),'~'.expand("<slnum>"))
if filewritable(dirname)
@@ -4971,6 +4905,10 @@ fun! s:NetrwBrowseUpDir(islocal)
return
endif

+ if !exists("w:netrw_liststyle") || w:netrw_liststyle != s:TREELIST
+ call s:SavePosn(s:netrw_nbcd)
+ endif
+
norm! 0
if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
" call Decho("case: treestyle",'~'.expand("<slnum>"))
@@ -5010,7 +4948,9 @@ fun! s:NetrwBrowseUpDir(islocal)
else
call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../'))
endif
- if exists("w:netrw_bannercnt")
+ if has_key(s:netrw_nbcd,bufnr("%"))
+ call s:RestorePosn(s:netrw_nbcd)
+ elseif exists("w:netrw_bannercnt")
" call Decho("moving to line#".w:netrw_bannercnt,'~'.expand("<slnum>"))
exe w:netrw_bannercnt
else
@@ -5106,17 +5046,20 @@ fun! netrw#BrowseX(fname,remote)
" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten),'~'.expand("<slnum>"))

- " set up redirection
- if &srr =~ "%s"
- if (has("win32") || has("win95") || has("win64") || has("win16"))
- let redir= substitute(&srr,"%s","nul","")
+ " set up redirection (avoids browser messages)
+ " by default, g:netrw_suppress_gx_mesg is true
+ if g:netrw_suppress_gx_mesg
+ if &srr =~ "%s"
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+ let redir= substitute(&srr,"%s","nul","")
+ else
+ let redir= substitute(&srr,"%s","/dev/null","")
+ endif
+ elseif (has("win32") || has("win95") || has("win64") || has("win16"))
+ let redir= &srr . "nul"
else
- let redir= substitute(&srr,"%s","/dev/null","")
+ let redir= &srr . "/dev/null"
endif
- elseif (has("win32") || has("win95") || has("win64") || has("win16"))
- let redir= &srr . "nul"
- else
- let redir= &srr . "/dev/null"
endif
" call Decho("set up redirection: redir{".redir."} srr{".&srr."}",'~'.expand("<slnum>"))

@@ -5377,8 +5320,12 @@ endfun

" ---------------------------------------------------------------------
" s:NetrwGlob: does glob() if local, remote listing otherwise {{{2
-fun! s:NetrwGlob(direntry,expr)
-" call Dfunc("s:NetrwGlob(direntry<".a:direntry."> expr<".a:expr.">)")
+" direntry: this is the name of the directory. Will be fnameescape'd to prevent wildcard handling by glob()
+" expr : this is the expression to follow the directory. Will use s:ComposePath()
+" pare =1: remove the current directory from the resulting glob() filelist
+" =0: leave the current directory in the resulting glob() filelist
+fun! s:NetrwGlob(direntry,expr,pare)
+" call Dfunc("s:NetrwGlob(direntry<".a:direntry."> expr<".a:expr."> pare=".a:pare.")")
if netrw#CheckIfRemote()
keepalt 1sp
keepalt enew
@@ -5393,9 +5340,16 @@ fun! s:NetrwGlob(direntry,expr)
let filelist= w:netrw_treedict[a:direntry]
endif
let w:netrw_liststyle= keep_liststyle
+ elseif v:version > 704 || (v:version == 704 && has("patch656"))
+ let filelist= glob(s:ComposePath(fnameescape(a:direntry),a:expr),0,1,1)
+ if a:pare
+ let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")')
+ endif
else
- let filelist= glob(s:ComposePath(a:direntry,a:expr),0,1,1)
- let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")')
+ let filelist= glob(s:ComposePath(fnameescape(a:direntry),a:expr),0,1)
+ if a:pare
+ let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")')
+ endif
endif
" call Dret("s:NetrwGlob ".string(filelist))
return filelist
@@ -6087,7 +6041,7 @@ fun! s:NetrwMaps(islocal)
nnoremap <buffer> <silent> <nowait> qf :<c-u>call <SID>NetrwFileInfo(1,<SID>NetrwGetWord())<cr>
nnoremap <buffer> <silent> <nowait> qF :<c-u>call <SID>NetrwMarkFileQFEL(1,getqflist())<cr>
nnoremap <buffer> <silent> <nowait> qL :<c-u>call <SID>NetrwMarkFileQFEL(1,getloclist(v:count))<cr>
- nnoremap <buffer> <silent> <nowait> r :<c-u>let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
+ nnoremap <buffer> <silent> <nowait> r :<c-u>let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
nnoremap <buffer> <silent> <nowait> s :call <SID>NetrwSortStyle(1)<cr>
nnoremap <buffer> <silent> <nowait> S :<c-u>call <SID>NetSortSequence(1)<cr>
nnoremap <buffer> <silent> <nowait> Tb :<c-u>call <SID>NetrwSetTgt(1,'b',v:count1)<cr>
@@ -6140,7 +6094,7 @@ fun! s:NetrwMaps(islocal)
" inoremap <buffer> <silent> <nowait> qf <c-o>:<c-u>call <SID>NetrwFileInfo(1,<SID>NetrwGetWord())<cr>
" inoremap <buffer> <silent> <nowait> qF :<c-u>call <SID>NetrwMarkFileQFEL(1,getqflist())<cr>
" inoremap <buffer> <silent> <nowait> qL :<c-u>call <SID>NetrwMarkFileQFEL(1,getloclist(v:count))<cr>
-" inoremap <buffer> <silent> <nowait> r <c-o>:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
+" inoremap <buffer> <silent> <nowait> r <c-o>:let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
" inoremap <buffer> <silent> <nowait> s <c-o>:call <SID>NetrwSortStyle(1)<cr>
" inoremap <buffer> <silent> <nowait> S <c-o>:call <SID>NetSortSequence(1)<cr>
" inoremap <buffer> <silent> <nowait> t <c-o>:call <SID>NetrwSplit(4)<cr>
@@ -6261,7 +6215,7 @@ fun! s:NetrwMaps(islocal)
nnoremap <buffer> <silent> <nowait> qf :<c-u>call <SID>NetrwFileInfo(0,<SID>NetrwGetWord())<cr>
nnoremap <buffer> <silent> <nowait> qF :<c-u>call <SID>NetrwMarkFileQFEL(0,getqflist())<cr>
nnoremap <buffer> <silent> <nowait> qL :<c-u>call <SID>NetrwMarkFileQFEL(0,getloclist(v:count))<cr>
- nnoremap <buffer> <silent> <nowait> r :<c-u>let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+ nnoremap <buffer> <silent> <nowait> r :<c-u>let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
nnoremap <buffer> <silent> <nowait> s :call <SID>NetrwSortStyle(0)<cr>
nnoremap <buffer> <silent> <nowait> S :<c-u>call <SID>NetSortSequence(0)<cr>
nnoremap <buffer> <silent> <nowait> Tb :<c-u>call <SID>NetrwSetTgt(0,'b',v:count1)<cr>
@@ -6311,7 +6265,7 @@ fun! s:NetrwMaps(islocal)
" inoremap <buffer> <silent> <nowait> qf <c-o>:<c-u>call <SID>NetrwFileInfo(0,<SID>NetrwGetWord())<cr>
" inoremap <buffer> <silent> <nowait> qF :<c-u>call <SID>NetrwMarkFileQFEL(0,getqflist())<cr>
" inoremap <buffer> <silent> <nowait> qL :<c-u>call <SID>NetrwMarkFileQFEL(0,getloclist(v:count))<cr>
-" inoremap <buffer> <silent> <nowait> r <c-o>:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+" inoremap <buffer> <silent> <nowait> r <c-o>:let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
" inoremap <buffer> <silent> <nowait> s <c-o>:call <SID>NetrwSortStyle(0)<cr>
" inoremap <buffer> <silent> <nowait> S <c-o>:call <SID>NetSortSequence(0)<cr>
" inoremap <buffer> <silent> <nowait> t <c-o>:call <SID>NetrwSplit(1)<cr>
@@ -6415,10 +6369,10 @@ fun! s:NetrwMarkFiles(islocal,...)
let i = 1
while i <= a:0
if a:islocal
- if v:version == 704 && has("patch656")
- let mffiles= glob(a:{i},0,1,1)
+ if v:version > 704 || (v:version == 704 && has("patch656"))
+ let mffiles= glob(fnameescape(a:{i}),0,1,1)
else
- let mffiles= glob(a:{i},0,1)
+ let mffiles= glob(fnameescape(a:{i}),0,1)
endif
else
let mffiles= [a:{i}]
@@ -6894,6 +6848,8 @@ fun! s:NetrwMarkFileCopy(islocal,...)
" cleanup
" -------
" call Decho("cleanup",'~'.expand("<slnum>"))
+ " remove markings from local buffer
+ call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer
" call Decho(" g:netrw_fastbrowse =".g:netrw_fastbrowse,'~'.expand("<slnum>"))
" call Decho(" s:netrwmftgt =".s:netrwmftgt,'~'.expand("<slnum>"))
" call Decho(" s:netrwmftgt_islocal=".s:netrwmftgt_islocal,'~'.expand("<slnum>"))
@@ -7373,7 +7329,7 @@ fun! s:NetrwMarkFileGrep(islocal)
if exists("nonisi")
" original, user-supplied pattern did not begin with a character from isident
" call Decho("looking for trailing nonisi<".nonisi."> followed by a j, gj, or jg",'~'.expand("<slnum>"))
- if pat =~ nonisi.'j$\|'.nonisi.'gj$\|'.nonisi.'jg$'
+ if pat =~# nonisi.'j$\|'.nonisi.'gj$\|'.nonisi.'jg$'
call s:NetrwMarkFileQFEL(a:islocal,getqflist())
endif
endif
@@ -7571,7 +7527,7 @@ fun! s:NetrwMarkFileRegexp(islocal)
" get the matching list of files using local glob()
" call Decho("handle local regexp",'~'.expand("<slnum>"))
let dirname = escape(b:netrw_curdir,g:netrw_glob_escape)
- if v:version == 704 && has("patch656")
+ if v:version > 704 || (v:version == 704 && has("patch656"))
let files = glob(s:ComposePath(dirname,regexp),0,0,1)
else
let files = glob(s:ComposePath(dirname,regexp),0,0)
@@ -7788,7 +7744,7 @@ fun! s:NetrwMarkFileTgt(islocal)
" need to do refresh so that the banner will be updated
" s:LocalBrowseRefresh handles all local-browsing buffers when not fast browsing
if g:netrw_fastbrowse <= 1
-" call Decho("g:netrw_fastbrowse=".g:netrw_fastbrowse.", so refreshing all local netrw buffers")
+" call Decho("g:netrw_fastbrowse=".g:netrw_fastbrowse.", so refreshing all local netrw buffers",'~'.expand("<slnum>"))
call s:LocalBrowseRefresh()
endif
" call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
@@ -7821,10 +7777,10 @@ fun! s:NetrwGetCurdir(islocal)
" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)",'~'.expand("<slnum>"))
endif

-" call Decho("b:netrw_curdir<".b:netrw_curdir."> ".((b:netrw_curdir !~ '\<\a\{3,}://')? "does not match" : "matches")." url pattern")
+" call Decho("b:netrw_curdir<".b:netrw_curdir."> ".((b:netrw_curdir !~ '\<\a\{3,}://')? "does not match" : "matches")." url pattern",'~'.expand("<slnum>"))
if b:netrw_curdir !~ '\<\a\{3,}://'
let curdir= b:netrw_curdir
-" call Decho("g:netrw_keepdir=".g:netrw_keepdir)
+" call Decho("g:netrw_keepdir=".g:netrw_keepdir,'~'.expand("<slnum>"))
if g:netrw_keepdir == 0
call s:NetrwLcd(curdir)
endif
@@ -8125,7 +8081,7 @@ fun! s:NetrwMenu(domenu)
elseif !a:domenu
let s:netrwcnt = 0
let curwin = winnr()
- windo if getline(2) =~ "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif
+ windo if getline(2) =~# "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif
exe curwin."wincmd w"

if s:netrwcnt <= 1
@@ -8708,7 +8664,7 @@ fun! s:NetrwSortStyle(islocal)
let svpos= winsaveview()
" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))

- let g:netrw_sort_by= (g:netrw_sort_by =~ '^n')? 'time' : (g:netrw_sort_by =~ '^t')? 'size' : (g:netrw_sort_by =~ '^siz')? 'exten' : 'name'
+ let g:netrw_sort_by= (g:netrw_sort_by =~# '^n')? 'time' : (g:netrw_sort_by =~# '^t')? 'size' : (g:netrw_sort_by =~# '^siz')? 'exten' : 'name'
NetrwKeepj norm! 0
NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
@@ -8811,7 +8767,6 @@ fun! s:NetrwSplit(mode)
let s:didsplit= 1
NetrwKeepj call s:RestoreWinVars()
NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
- "call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
unlet s:didsplit

else
@@ -8890,9 +8845,9 @@ endfun
" (full path directory with trailing slash returned)
fun! s:NetrwTreeDir(islocal)
" call Dfunc("s:NetrwTreeDir(islocal=".a:islocal.") getline(".line(".").")"."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft)
-" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'))
-" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'))
-" call Decho("w:netrw_treetop =".(exists("w:netrw_treetop")? w:netrw_treetop : 'n/a'))
+" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("w:netrw_treetop =".(exists("w:netrw_treetop")? w:netrw_treetop : 'n/a'),'~'.expand("<slnum>"))

if exists("s:treedir")
" s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early
@@ -8933,7 +8888,7 @@ fun! s:NetrwTreeDir(islocal)
" detect user attempting to close treeroot
" call Decho("check if user is attempting to close treeroot",'~'.expand("<slnum>"))
" call Decho(".win#".winnr()." buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
-" call Decho(".getline(".line(".").")<".getline('.').'> '.((getline('.') =~ '^'.s:treedepthstring)? '=~' : '!~').' ^'.s:treedepthstring,'~'.expand("<slnum>"))
+" call Decho(".getline(".line(".").")<".getline('.').'> '.((getline('.') =~# '^'.s:treedepthstring)? '=~#' : '!~').' ^'.s:treedepthstring,'~'.expand("<slnum>"))
if curline !~ '^'.s:treedepthstring && getline('.') != '..'
" call Decho(".user may have attempted to close treeroot",'~'.expand("<slnum>"))
" now force a refresh
@@ -9040,24 +8995,24 @@ fun! s:NetrwRefreshTreeDict(dir)
if entry =~ '/$' && has_key(w:netrw_treedict,direntry)
" call Decho("<".direntry."> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
NetrwKeepj call s:NetrwRefreshTreeDict(direntry)
- let liststar = s:NetrwGlob(direntry,'*')
- let listdotstar = s:NetrwGlob(direntry,'.*')
+ let liststar = s:NetrwGlob(direntry,'*',1)
+ let listdotstar = s:NetrwGlob(direntry,'.*',1)
let w:netrw_treedict[direntry] = liststar + listdotstar
" call Decho("updating w:netrw_treedict[".direntry.']='.string(w:netrw_treedict[direntry]),'~'.expand("<slnum>"))

elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/')
" call Decho("<".direntry."/> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/')
- let liststar = s:NetrwGlob(direntry.'/','*')
- let listdotstar= s:NetrwGlob(direntry.'/','.*')
+ let liststar = s:NetrwGlob(direntry.'/','*',1)
+ let listdotstar= s:NetrwGlob(direntry.'/','.*',1)
let w:netrw_treedict[direntry]= liststar + listdotstar
" call Decho("updating w:netrw_treedict[".direntry.']='.string(w:netrw_treedict[direntry]),'~'.expand("<slnum>"))

elseif entry =~ '@$' && has_key(w:netrw_treedict,direntry.'@')
" call Decho("<".direntry."/> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/')
- let liststar = s:NetrwGlob(direntry.'/','*')
- let listdotstar= s:NetrwGlob(direntry.'/','.*')
+ let liststar = s:NetrwGlob(direntry.'/','*',1)
+ let listdotstar= s:NetrwGlob(direntry.'/','.*',1)
" call Decho("updating w:netrw_treedict[".direntry.']='.string(w:netrw_treedict[direntry]),'~'.expand("<slnum>"))

else
@@ -9315,14 +9270,14 @@ fun! s:PerformListing(islocal)
" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("<slnum>"))

let sortby= g:netrw_sort_by
- if g:netrw_sort_direction =~ "^r"
+ if g:netrw_sort_direction =~# "^r"
let sortby= sortby." reversed"
endif

" Sorted by... {{{3
if g:netrw_banner
" call Decho("--handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("<slnum>"))
- if g:netrw_sort_by =~ "^n"
+ if g:netrw_sort_by =~# "^n"
" call Decho("directories will be sorted by name",'~'.expand("<slnum>"))
" sorted by name
NetrwKeepj put ='\" Sorted by '.sortby
@@ -9419,13 +9374,13 @@ fun! s:PerformListing(islocal)
if !g:netrw_banner || line("$") >= w:netrw_bannercnt
" call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("<slnum>"))

- if g:netrw_sort_by =~ "^n"
+ if g:netrw_sort_by =~# "^n"
" sort by name
NetrwKeepj call s:NetrwSetSort()

if !g:netrw_banner || w:netrw_bannercnt < line("$")
" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
- if g:netrw_sort_direction =~ 'n'
+ if g:netrw_sort_direction =~# 'n'
" normal direction sorting
exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
else
@@ -9438,7 +9393,7 @@ fun! s:PerformListing(islocal)
exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{3}'.g:netrw_sepchr.'//e'
NetrwKeepj call histdel("/",-1)

- elseif g:netrw_sort_by =~ "^ext"
+ elseif g:netrw_sort_by =~# "^ext"
" sort by extension
exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g+/+s/^/001'.g:netrw_sepchr.'/'
NetrwKeepj call histdel("/",-1)
@@ -9448,7 +9403,7 @@ fun! s:PerformListing(islocal)
NetrwKeepj call histdel("/",-1)
if !g:netrw_banner || w:netrw_bannercnt < line("$")
" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
- if g:netrw_sort_direction =~ 'n'
+ if g:netrw_sort_direction =~# 'n'
" normal direction sorting
exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
else
@@ -9462,7 +9417,7 @@ fun! s:PerformListing(islocal)
elseif a:islocal
if !g:netrw_banner || w:netrw_bannercnt < line("$")
" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction,'~'.expand("<slnum>"))
- if g:netrw_sort_direction =~ 'n'
+ if g:netrw_sort_direction =~# 'n'
" call Decho('exe sil NetrwKeepj '.w:netrw_bannercnt.',$sort','~'.expand("<slnum>"))
exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
else
@@ -9474,7 +9429,7 @@ fun! s:PerformListing(islocal)
endif
endif

- elseif g:netrw_sort_direction =~ 'r'
+ elseif g:netrw_sort_direction =~# 'r'
" call Decho('(s:PerformListing) reverse the sorted listing','~'.expand("<slnum>"))
if !g:netrw_banner || w:netrw_bannercnt < line('$')
exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g/^/m '.w:netrw_bannercnt
@@ -9790,9 +9745,9 @@ fun! s:NetrwRemoteListing()
" call Decho("use ftp to get remote file listing",'~'.expand("<slnum>"))
let s:method = "ftp"
let listcmd = g:netrw_ftp_list_cmd
- if g:netrw_sort_by =~ '^t'
+ if g:netrw_sort_by =~# '^t'
let listcmd= g:netrw_ftp_timelist_cmd
- elseif g:netrw_sort_by =~ '^s'
+ elseif g:netrw_sort_by =~# '^s'
let listcmd= g:netrw_ftp_sizelist_cmd
endif
" call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)",'~'.expand("<slnum>"))
@@ -9899,7 +9854,7 @@ fun! s:NetrwRemoteListing()
if s:method == "ftp"
" cleanup
exe "sil! NetrwKeepj ".w:netrw_bannercnt
- while getline('.') =~ g:netrw_ftp_browse_reject
+ while getline('.') =~# g:netrw_ftp_browse_reject
sil! NetrwKeepj d
endwhile
" if there's no ../ listed, then put ../ in
@@ -9952,9 +9907,9 @@ fun! s:NetrwRemoteRm(usrhost,path) range
" call Decho("remove all marked files with bufnr#".bufnr("%"),'~'.expand("<slnum>"))
for fname in s:netrwmarkfilelist_{bufnr("%")}
let ok= s:NetrwRemoteRmFile(a:path,fname,all)
- if ok =~ 'q\%[uit]'
+ if ok =~# 'q\%[uit]'
break
- elseif ok =~ 'a\%[ll]'
+ elseif ok =~# 'a\%[ll]'
let all= 1
endif
endfor
@@ -9973,9 +9928,9 @@ fun! s:NetrwRemoteRm(usrhost,path) range
while ctr <= a:lastline
exe "NetrwKeepj ".ctr
let ok= s:NetrwRemoteRmFile(a:path,s:NetrwGetWord(),all)
- if ok =~ 'q\%[uit]'
+ if ok =~# 'q\%[uit]'
break
- elseif ok =~ 'a\%[ll]'
+ elseif ok =~# 'a\%[ll]'
let all= 1
endif
let ctr= ctr + 1
@@ -10014,12 +9969,12 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
let ok="no"
endif
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
- if ok =~ 'a\%[ll]'
+ if ok =~# 'a\%[ll]'
let all= 1
endif
endif

- if all || ok =~ 'y\%[es]' || ok == ""
+ if all || ok =~# 'y\%[es]' || ok == ""
" call Decho("case all=".all." or ok<".ok.">".(exists("w:netrw_method")? ': netrw_method='.w:netrw_method : ""),'~'.expand("<slnum>"))
if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
" call Decho("case ftp:",'~'.expand("<slnum>"))
@@ -10054,13 +10009,13 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
else
call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60)
endif
- else if ret != 0
+ elseif ret != 0
call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60)
endif
" call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("<slnum>"))
endif
endif
- elseif ok =~ 'q\%[uit]'
+ elseif ok =~# 'q\%[uit]'
" call Decho("ok==".ok,'~'.expand("<slnum>"))
endif

@@ -10075,12 +10030,12 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
let ok="no"
endif
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
- if ok =~ 'a\%[ll]'
+ if ok =~# 'a\%[ll]'
let all= 1
endif
endif

- if all || ok =~ 'y\%[es]' || ok == ""
+ if all || ok =~# 'y\%[es]' || ok == ""
if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
NetrwKeepj call s:NetrwRemoteFtpCmd(a:path,"rmdir ".a:rmfile)
else
@@ -10103,7 +10058,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all)
endif
endif

- elseif ok =~ 'q\%[uit]'
+ elseif ok =~# 'q\%[uit]'
" call Decho("ok==".ok,'~'.expand("<slnum>"))
endif
endif
@@ -10257,7 +10212,7 @@ fun! netrw#LocalBrowseCheck(dirname)
" would hit when re-entering netrw windows, creating unexpected
" refreshes (and would do so in the middle of NetrwSaveOptions(), too)
" call Dfunc("netrw#LocalBrowseCheck(dirname<".a:dirname.">")
-" call Decho("isdir<".a:dirname.">=".isdirectory(s:NetrwFile(a:dirname)).((exists("s:treeforceredraw")? " treeforceredraw" : "")).expand("<slnum>"))
+" call Decho("isdir<".a:dirname."> =".isdirectory(s:NetrwFile(a:dirname)).((exists("s:treeforceredraw")? " treeforceredraw" : "")).'~'.expand("<slnum>"))
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
" call Dredir("ls!","ls!")
" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
@@ -10281,7 +10236,6 @@ fun! netrw#LocalBrowseCheck(dirname)
unlet s:treeforceredraw
sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname)
endif
-
" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
" call Dret("netrw#LocalBrowseCheck")
return
@@ -10361,7 +10315,7 @@ fun! s:LocalBrowseRefresh()
" refresh any netrw buffer
" call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf),'~'.expand("<slnum>"))
exe bufwinnr(ibuf)."wincmd w"
- if getline(".") =~ 'Quick Help'
+ if getline(".") =~# 'Quick Help'
" decrement g:netrw_quickhelp to prevent refresh from changing g:netrw_quickhelp
" (counteracts s:NetrwBrowseChgDir()'s incrementing)
let g:netrw_quickhelp= g:netrw_quickhelp - 1
@@ -10467,15 +10421,8 @@ fun! s:LocalListing()
" get the list of files contained in the current directory
let dirname = b:netrw_curdir
let dirnamelen = strlen(b:netrw_curdir)
- if v:version == 704 && has("patch656")
-" call Decho("using glob with patch656",'~'.expand("<slnum>"))
- let filelist = glob(s:ComposePath(dirname,"*"),0,1,1)
- let filelist = filelist + glob(s:ComposePath(dirname,".*"),0,1,1)
- else
-" call Decho("using glob without patch656",'~'.expand("<slnum>"))
- let filelist = glob(s:ComposePath(dirname,"*"),0,1)
- let filelist = filelist + glob(s:ComposePath(dirname,".*"),0,1)
- endif
+ let filelist = s:NetrwGlob(dirname,"*",0)
+ let filelist = filelist + s:NetrwGlob(dirname,".*",0)
" call Decho("filelist=".string(filelist),'~'.expand("<slnum>"))

if g:netrw_cygwin == 0 && (has("win32") || has("win95") || has("win64") || has("win16"))
@@ -10487,9 +10434,9 @@ fun! s:LocalListing()
" call Decho("filelist=".string(filelist),'~'.expand("<slnum>"))
endif

-" call Decho("before while: dirname<".dirname.">",'~'.expand("<slnum>"))
+" call Decho("before while: dirname <".dirname.">",'~'.expand("<slnum>"))
" call Decho("before while: dirnamelen<".dirnamelen.">",'~'.expand("<slnum>"))
-" call Decho("before while: filelist=".string(filelist),'~'.expand("<slnum>"))
+" call Decho("before while: filelist =".string(filelist),'~'.expand("<slnum>"))

if get(g:, 'netrw_dynamic_maxfilenamelen', 0)
let filelistcopy = map(deepcopy(filelist),'fnamemodify(v:val, ":t")')
@@ -10559,15 +10506,15 @@ fun! s:LocalListing()

if w:netrw_liststyle == s:LONGLIST
let sz = getfsize(filename)
- if g:netrw_sizestyle =~ "[hH]"
+ if g:netrw_sizestyle =~# "[hH]"
let sz= s:NetrwHumanReadable(sz)
endif
let fsz = strpart(" ",1,15-strlen(sz)).sz
let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename))
-" call Decho("sz=".sz." fsz=".fsz,'~'.expand("<slnum>"))
+" call Decho("longlist support: sz=".sz." fsz=".fsz,'~'.expand("<slnum>"))
endif

- if g:netrw_sort_by =~ "^t"
+ if g:netrw_sort_by =~# "^t"
" sort by time (handles time up to 1 quintillion seconds, US)
" call Decho("getftime(".filename.")=".getftime(filename),'~'.expand("<slnum>"))
let t = getftime(filename)
@@ -10580,7 +10527,7 @@ fun! s:LocalListing()
" sort by size (handles file sizes up to 1 quintillion bytes, US)
" call Decho("getfsize(".filename.")=".getfsize(filename),'~'.expand("<slnum>"))
let sz = getfsize(filename)
- if g:netrw_sizestyle =~ "[hH]"
+ if g:netrw_sizestyle =~# "[hH]"
let sz= s:NetrwHumanReadable(sz)
endif
let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz
@@ -10733,9 +10680,9 @@ fun! s:NetrwLocalRm(path) range
" call Decho("remove all marked files",'~'.expand("<slnum>"))
for fname in s:netrwmarkfilelist_{bufnr("%")}
let ok= s:NetrwLocalRmFile(a:path,fname,all)
- if ok =~ 'q\%[uit]' || ok == "no"
+ if ok =~# 'q\%[uit]' || ok == "no"
break
- elseif ok =~ 'a\%[ll]'
+ elseif ok =~# 'a\%[ll]'
let all= 1
endif
endfor
@@ -10762,9 +10709,9 @@ fun! s:NetrwLocalRm(path) range
continue
endif
let ok= s:NetrwLocalRmFile(a:path,curword,all)
- if ok =~ 'q\%[uit]' || ok == "no"
+ if ok =~# 'q\%[uit]' || ok == "no"
break
- elseif ok =~ 'a\%[ll]'
+ elseif ok =~# 'a\%[ll]'
let all= 1
endif
let ctr= ctr + 1
@@ -10811,12 +10758,12 @@ fun! s:NetrwLocalRmFile(path,fname,all)
" call Decho("response: ok<".ok.">",'~'.expand("<slnum>"))
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
" call Decho("response: ok<".ok."> (after sub)",'~'.expand("<slnum>"))
- if ok =~ 'a\%[ll]'
+ if ok =~# 'a\%[ll]'
let all= 1
endif
endif

- if all || ok =~ 'y\%[es]' || ok == ""
+ if all || ok =~# 'y\%[es]' || ok == ""
let ret= s:NetrwDelete(rmfile)
" call Decho("errcode=".v:shell_error." ret=".ret,'~'.expand("<slnum>"))
endif
@@ -10832,13 +10779,13 @@ fun! s:NetrwLocalRmFile(path,fname,all)
if ok == ""
let ok="no"
endif
- if ok =~ 'a\%[ll]'
+ if ok =~# 'a\%[ll]'
let all= 1
endif
endif
let rmfile= substitute(rmfile,'[\/]$','','e')

- if all || ok =~ 'y\%[es]' || ok == ""
+ if all || ok =~# 'y\%[es]' || ok == ""
if v:version < 704 || !has("patch1109")
" " call Decho("1st attempt: system(netrw#WinPath(".g:netrw_localrmdir.') '.s:ShellEscape(rmfile).')','~'.expand("<slnum>"))
call system(netrw#WinPath(g:netrw_localrmdir).' '.s:ShellEscape(rmfile))
@@ -10879,6 +10826,17 @@ endfun
" Support Functions: {{{1

" ---------------------------------------------------------------------
+" s:WinNames: COMBAK {{{2
+fun! s:WinNames(id)
+ let curwin= winnr()
+ 1wincmd w
+" call Decho("--- Windows By Name --- #".a:id)
+" windo call Decho("win#".winnr()."<".expand("%").">")
+" call Decho("--- --- --- --- --- ---")
+ exe curwin."wincmd w"
+endfun
+
+" ---------------------------------------------------------------------
" netrw#Access: intended to provide access to variable values for netrw's test suite {{{2
" 0: marked file list of current buffer
" 1: marked file target
@@ -10905,8 +10863,6 @@ fun! netrw#Call(funcname,...)
" call Dret("netrw#Call")
endfun

-" ------------------------------------------------------------------------
-
" ---------------------------------------------------------------------
" netrw#Expose: allows UserMaps and pchk to look at otherwise script-local variables {{{2
" I expect this function to be used in
@@ -10914,18 +10870,22 @@ endfun
" for example.
fun! netrw#Expose(varname)
" call Dfunc("netrw#Expose(varname<".a:varname.">)")
- exe "let retval= s:".a:varname
- if exists("g:netrw_pchk")
- if type(retval) == 3
- let retval = copy(retval)
- let i = 0
- while i < len(retval)
- let retval[i]= substitute(retval[i],expand("$HOME"),'~','')
- let i = i + 1
- endwhile
+ if exists("s:".a:varname)
+ exe "let retval= s:".a:varname
+ if exists("g:netrw_pchk")
+ if type(retval) == 3
+ let retval = copy(retval)
+ let i = 0
+ while i < len(retval)
+ let retval[i]= substitute(retval[i],expand("$HOME"),'~','')
+ let i = i + 1
+ endwhile
+ endif
+" call Dret("netrw#Expose ".string(retval))
+ return string(retval)
endif
-" call Dret("netrw#Expose ".string(retval))
- return string(retval)
+ else
+ let retval= "n/a"
endif

" call Dret("netrw#Expose ".string(retval))
@@ -11018,9 +10978,9 @@ fun! s:ComposePath(base,subdir)
" call Decho("amiga",'~'.expand("<slnum>"))
let ec = a:base[s:Strlen(a:base)-1]
if ec != '/' && ec != ':'
- let ret = a:base . "/" . a:subdir
+ let ret = a:base."/" . a:subdir
else
- let ret = a:base . a:subdir
+ let ret = a:base.a:subdir
endif

elseif a:subdir =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16"))
@@ -11248,10 +11208,10 @@ fun! s:NetrwBMShow()
redir END
let bmshowlist = split(bmshowraw,'\n')
if bmshowlist != []
- let bmshowfuncs= filter(bmshowlist,'v:val =~ "<SNR>\\d\\+_BMShow()"')
+ let bmshowfuncs= filter(bmshowlist,'v:val =~# "<SNR>\\d\\+_BMShow()"')
if bmshowfuncs != []
let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','')
- if bmshowfunc =~ '^call.*BMShow()'
+ if bmshowfunc =~# '^call.*BMShow()'
exe "sil! NetrwKeepj ".bmshowfunc
endif
endif
@@ -11395,11 +11355,12 @@ fun! s:NetrwEnew(...)
" call Decho("generate a buffer with NetrwKeepj keepalt enew!",'~'.expand("<slnum>"))
" when tree listing uses file TreeListing... a new buffer is made.
" Want the old buffer to be unlisted.
- setl nobl
+ " COMBAK: this causes a problem, see P43
+" setl nobl
let netrw_keepdiff= &l:diff
noswapfile NetrwKeepj keepalt enew!
let &l:diff= netrw_keepdiff
-" call Decho("bufnr($)=".bufnr("$")." winnr($)=".winnr("$"),'~'.expand("<slnum>"))
+" call Decho("bufnr($)=".bufnr("$")."<".bufname(bufnr("$"))."> winnr($)=".winnr("$"),'~'.expand("<slnum>"))
NetrwKeepj call s:NetrwOptionSave("w:")

" copy function-local-variables to buffer variable equivalents
@@ -11458,8 +11419,8 @@ endfun
" ---------------------------------------------------------------------
" s:NetrwInsureWinVars: insure that a netrw buffer has its w: variables in spite of a wincmd v or s {{{2
fun! s:NetrwInsureWinVars()
-" call Dfunc("s:NetrwInsureWinVars() win#".winnr())
if !exists("w:netrw_liststyle")
+" call Dfunc("s:NetrwInsureWinVars() win#".winnr())
let curbuf = bufnr("%")
let curwin = winnr()
let iwin = 1
@@ -11479,8 +11440,8 @@ fun! s:NetrwInsureWinVars()
let w:{k}= winvars[k]
endfor
endif
+" call Dret("s:NetrwInsureWinVars win#".winnr())
endif
-" call Dret("s:NetrwInsureWinVars win#".winnr())
endfun

" ---------------------------------------------------------------------
@@ -11685,7 +11646,7 @@ endfun
" s:SetRexDir() sets up <2-leftmouse> maps (if g:netrw_retmap
" is true) and a command, :Rexplore, which call this function.
"
-" s:nbcd_curpos_{bufnr('%')} is set up by s:NetrwBrowseChgDir()
+" s:netrw_nbcd is set up by s:NetrwBrowseChgDir()
"
" s:rexposn_BUFNR used to save/restore cursor position
fun! s:NetrwRexplore(islocal,dirname)
@@ -11766,6 +11727,29 @@ fun! s:SaveBufVars()
endfun

" ---------------------------------------------------------------------
+" s:SavePosn: saves position associated with current buffer into a dictionary {{{2
+fun! s:SavePosn(posndict)
+" call Dfunc("s:SavePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">")
+
+ let a:posndict[bufnr("%")]= winsaveview()
+" call Decho("saving posn: posndict[".bufnr("%")."]=".string(winsaveview()),'~'.expand("<slnum>"))
+
+" call Dret("s:SavePosn posndict")
+ return a:posndict
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestorePosn: restores position associated with current buffer using dictionary {{{2
+fun! s:RestorePosn(posndict)
+" call Dfunc("s:RestorePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">")
+ if has_key(a:posndict,bufnr("%"))
+ call winrestview(a:posndict[bufnr("%")])
+" call Decho("restoring posn: posndict[".bufnr("%")."]=".string(a:posndict[bufnr("%")]),'~'.expand("<slnum>"))
+ endif
+" call Dret("s:RestorePosn")
+endfun
+
+" ---------------------------------------------------------------------
" s:SaveWinVars: (used by Explore() and NetrwSplit()) {{{2
fun! s:SaveWinVars()
" call Dfunc("s:SaveWinVars() win#".winnr())
@@ -11819,10 +11803,10 @@ fun! s:SetRexDir(islocal,dirname)
let w:netrw_rexdir = a:dirname
let w:netrw_rexlocal = a:islocal
let s:rexposn_{bufnr("%")} = winsaveview()
-" call Decho("setting w:netrw_rexdir =".w:netrw_rexdir)
-" call Decho("setting w:netrw_rexlocal=".w:netrw_rexlocal)
+" call Decho("setting w:netrw_rexdir =".w:netrw_rexdir,'~'.expand("<slnum>"))
+" call Decho("setting w:netrw_rexlocal=".w:netrw_rexlocal,'~'.expand("<slnum>"))
" call Decho("saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("<slnum>"))
-" call Decho("setting s:rexposn_".bufnr("%")."<".bufname("%")."> to SavePosn",'~'.expand("<slnum>"))
+" call Decho("setting s:rexposn_".bufnr("%")."<".bufname("%")."> to ".string(winsaveview()),'~'.expand("<slnum>"))
" call Dret("s:SetRexDir : win#".winnr()." ".(a:islocal? "local" : "remote")." dir: ".a:dirname)
endfun

@@ -11956,7 +11940,7 @@ fun! s:TreeListMove(dir)
" call Decho("regfile srch back: ".nl,'~'.expand("<slnum>"))
elseif a:dir == '[]' && nxtline != ''
NetrwKeepj norm! 0
-" call Decho('srchpat<'.'^\%('.curindent.'\)\@!'.'>')
+" call Decho('srchpat<'.'^\%('.curindent.'\)\@!'.'>','~'.expand("<slnum>"))
let nl = search('^\%('.curindent.'\)\@!','We') " search forwards
if nl != 0
NetrwKeepj norm! k
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index dea70a3..c3978fa 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.4. Last change: 2016 Mar 26
+*autocmd.txt* For Vim version 7.4. Last change: 2016 Apr 20


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -539,6 +539,9 @@ CursorHold When the user doesn't press a key for the time
versions}
*CursorHoldI*
CursorHoldI Just like CursorHold, but in Insert mode.
+ Not triggered when waiting for another key,
+ e.g. after CTRL-V, and not when in CTRL-X mode
+ |insert_expand|.

*CursorMoved*
CursorMoved After the cursor was moved in Normal or Visual
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 2280f65..02f3139 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.4. Last change: 2016 Mar 08
+*change.txt* For Vim version 7.4. Last change: 2016 Apr 12


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -852,7 +852,7 @@ Examples: >
:s/abcde/abc^Mde/ modifies "abcde" to "abc", "de" (two lines)
:s/$/\^M/ modifies "abcde" to "abcde^M"
:s/\w\+/\u\0/g modifies "bla bla" to "Bla Bla"
- :s/\w\+/\L\u/g modifies "BLA bla" to "Bla Bla"
+ :s/\w\+/\L\u\0/g modifies "BLA bla" to "Bla Bla"

Note: "\L\u" can be used to capitalize the first letter of a word. This is
not compatible with Vi and older versions of Vim, where the "\u" would cancel
@@ -1205,7 +1205,7 @@ name '"'. This means you have to type two double quotes. Writing to the ""
register writes to register "0.
{Vi: register contents are lost when changing files, no '"'}

-2. Numbered registers "0 to "9 *quote_number* *quote0* *quote1*
+2. Numbered registers "0 to "9 *quote_number* *quote0* *quote1*
*quote2* *quote3* *quote4* *quote9*
Vim fills these registers with text from yank and delete commands.
Numbered register 0 contains the text from the most recent yank command,
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index cc4bc90..e91a403 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -200,10 +200,10 @@ Note that a channel is closed in three stages:
When the channel can't be opened you will get an error message. There is a
difference between MS-Windows and Unix: On Unix when the port doesn't exist
ch_open() fails quickly. On MS-Windows "waittime" applies.
-*E898* *E899* *E900* *E901* *E902*
+*E898* *E901* *E902*

If there is an error reading or writing a channel it will be closed.
-*E896* *E630* *E631*
+*E630* *E631*

==============================================================================
4. Using a JSON or JS channel *channel-use*
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index d9ce12a..3610a0e 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1221,7 +1221,7 @@ Examples: >

If you want to always use ":confirm", set the 'confirm' option.

- *:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
+ *:browse* *:bro* *E338* *E614* *E615* *E616*
:bro[wse] {command} Open a file selection dialog for an argument to
{command}. At present this works for |:e|, |:w|,
|:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|,
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 2d7beb7..3e99858 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 Apr 14
+*eval.txt* For Vim version 7.4. Last change: 2016 Apr 20


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -752,7 +752,7 @@ A |Dictionary| can only be compared with a |Dictionary| and only "equal", "not
equal" and "is" can be used. This compares the key/values of the |Dictionary|
recursively. Ignoring case means case is ignored when comparing item values.

- *E693* *E694*
+ *E694*
A |Funcref| can only be compared with a |Funcref| and only "equal" and "not
equal" can be used. Case is never ignored. Whether arguments or a Dictionary
are bound (with a partial) is ignored. This is so that when a function is
@@ -2127,14 +2127,17 @@ sqrt({expr}) Float square root of {expr}
str2float({expr}) Float convert String to Float
str2nr({expr} [, {base}]) Number convert String to Number
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
+strcharpart({str}, {start}[, {len}])
+ String {len} characters of {str} at {start}
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
strftime({format}[, {time}]) String time in specified format
+strgetchar({str}, {index}) Number get char {index} from {str}
stridx({haystack}, {needle}[, {start}])
Number index of {needle} in {haystack}
string({expr}) String String representation of {expr} value
strlen({expr}) Number length of the String {expr}
-strpart({src}, {start}[, {len}])
- String {len} characters of {src} at {start}
+strpart({str}, {start}[, {len}])
+ String {len} characters of {str} at {start}
strridx({haystack}, {needle} [, {start}])
Number last index of {needle} in {haystack}
strtrans({expr}) String translate string to make it printable
@@ -2551,7 +2554,9 @@ byteidx({expr}, {nr}) *byteidx()*
same: >
let s = strpart(str, byteidx(str, 3))
echo strpart(s, 0, byteidx(s, 1))
-< If there are less than {nr} characters -1 is returned.
+< Also see |strgetchar()| and |strcharpart()|.
+
+ If there are less than {nr} characters -1 is returned.
If there are exactly {nr} characters the length of the string
in bytes is returned.

@@ -3418,6 +3423,10 @@ feedkeys({string} [, {mode}]) *feedkeys()*
will behave as if <Esc> is typed, to avoid getting
stuck, waiting for a character to be typed before the
script continues.
+ '!' When used with 'x' will not end Insert mode. Can be
+ used in a test when a timer is set to exit Insert mode
+ a little later. Useful for testing CursorHoldI.
+
Return value is always 0.

filereadable({file}) *filereadable()*
@@ -4100,16 +4109,21 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
The result is a String, which is the contents of register
{regname}. Example: >
:let cliptext = getreg('*')
-< getreg('=') returns the last evaluated value of the expression
+< When {regname} was not set the result is a empty string.
+
+ getreg('=') returns the last evaluated value of the expression
register. (For use in maps.)
getreg('=', 1) returns the expression itself, so that it can
be restored with |setreg()|. For other registers the extra
argument is ignored, thus you can always give it.
- If {list} is present and non-zero result type is changed to
- |List|. Each list item is one text line. Use it if you care
+
+ If {list} is present and non-zero, the result type is changed
+ to |List|. Each list item is one text line. Use it if you care
about zero bytes possibly present inside register: without
third argument both NLs and zero bytes are represented as NLs
(see |NL-used-for-Nul|).
+ When the register was not set an empty list is returned.
+
If {regname} is not specified, |v:register| is used.


@@ -5590,7 +5604,6 @@ pumvisible() *pumvisible()*
This can be used to avoid some things that would remove the
popup menu.

- *E860*
py3eval({expr}) *py3eval()*
Evaluate Python expression {expr} and return its result
converted to Vim data structures.
@@ -6652,7 +6665,6 @@ strchars({expr} [, {skipcc}]) *strchars()*
counted separately.
When {skipcc} set to 1, Composing characters are ignored.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
-

{skipcc} is only available after 7.4.755. For backward
compatibility, you can define a wrapper function: >
@@ -6670,6 +6682,13 @@ strchars({expr} [, {skipcc}]) *strchars()*
endfunction
endif
<
+strcharpart({src}, {start}[, {len}]) *strcharpart()*
+ Like |strpart()| but using character index and length instead
+ of byte index and length.
+ When a character index is used where a character does not
+ exist it is assumed to be one byte. For example: >
+ strcharpart('abc', -1, 2)
+< results in 'a'.

strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
The result is a Number, which is the number of display cells
@@ -6703,6 +6722,12 @@ strftime({format} [, {time}]) *strftime()*
< Not available on all systems. To check use: >
:if exists("*strftime")

+strgetchar({str}, {index}) *strgetchar()*
+ Get character {index} from {str}. This uses a character
+ index, not a byte index. Composing characters are considered
+ separate characters here.
+ Also see |strcharpart()| and |strchars()|.
+
stridx({haystack}, {needle} [, {start}]) *stridx()*
The result is a Number, which gives the byte index in
{haystack} of the first occurrence of the String {needle}.
@@ -6752,14 +6777,17 @@ strlen({expr}) The result is a Number, which is the length of the String
strpart({src}, {start}[, {len}]) *strpart()*
The result is a String, which is part of {src}, starting from
byte {start}, with the byte length {len}.
- When non-existing bytes are included, this doesn't result in
- an error, the bytes are simply omitted.
+ To count characters instead of bytes use |strcharpart()|.
+
+ When bytes are selected which do not exist, this doesn't
+ result in an error, the bytes are simply omitted.
If {len} is missing, the copy continues from {start} till the
end of the {src}. >
strpart("abcdefg", 3, 2) == "de"
strpart("abcdefg", -2, 4) == "ab"
strpart("abcdefg", 5, 4) == "fg"
strpart("abcdefg", 3) == "defg"
+
< Note: To get the first character, {start} must be 0. For
example, to get three bytes under and after the cursor: >
strpart(getline("."), col(".") - 1, 3)
@@ -8422,14 +8450,6 @@ This does NOT work: >
endfor
< Note that reordering the list (e.g., with sort() or
reverse()) may have unexpected effects.
- Note that the type of each list item should be
- identical to avoid errors for the type of {var}
- changing. Unlet the variable at the end of the loop
- to allow multiple item types: >
- for item in ["foo", ["bar"]]
- echo item
- unlet item " E706 without this
- endfor

:for [{var1}, {var2}, ...] in {listlist}
:endfo[r]
diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt
index d8dc48f..695b24a 100644
--- a/runtime/doc/if_cscop.txt
+++ b/runtime/doc/if_cscop.txt
@@ -97,8 +97,8 @@ command does the same and also splits the window (short: "scs").

The available subcommands are:

- *E563* *E564* *E566* *E568* *E569* *E622* *E623*
- *E625* *E626* *E609*
+ *E563* *E564* *E566* *E568* *E622* *E623* *E625*
+ *E626* *E609*
add : Add a new cscope database/connection.

USAGE :cs add {file|dir} [pre-path] [flags]
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 3d91814..cec23db 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -734,7 +734,7 @@ if the `:py3` command is working: >
:py3 print("Hello")
< *:py3file*
The `:py3file` command works similar to `:pyfile`.
- *:py3do* *E863*
+ *:py3do*
The `:py3do` command works similar to `:pydo`.


diff --git a/runtime/doc/if_tcl.txt b/runtime/doc/if_tcl.txt
index a7a61df..685c3c2 100644
--- a/runtime/doc/if_tcl.txt
+++ b/runtime/doc/if_tcl.txt
@@ -16,7 +16,7 @@ The Tcl Interface to Vim *tcl* *Tcl* *TCL*
8. Examples |tcl-examples|
9. Dynamic loading |tcl-dynamic|

-{Vi does not have any of these commands} *E280* *E281*
+{Vi does not have any of these commands} *E280*

The Tcl interface only works when Vim was compiled with the |+tcl| feature.

diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 76ff93f..c636b7c 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 7.4. Last change: 2016 Mar 12
+*index.txt* For Vim version 7.4. Last change: 2016 Apr 12


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -49,6 +49,7 @@ tag char action in Insert mode ~
|i_CTRL-G_k| CTRL-G k line up, to column where inserting started
|i_CTRL-G_k| CTRL-G <Up> line up, to column where inserting started
|i_CTRL-G_u| CTRL-G u start new undoable edit
+|i_CTRL-G_U| CTRL-G U don't break undo with next cursor movement
|i_<BS>| <BS> delete character before the cursor
|i_digraph| {char1}<BS>{char2}
enter digraph (only when 'digraph' option set)
@@ -859,6 +860,7 @@ tag command note action in Visual mode ~
------------------------------------------------------------------------------
|v_CTRL-\_CTRL-N| CTRL-\ CTRL-N stop Visual mode
|v_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
+|v_CTRL-A| CTRL-A 2 add N to number in highlighted text
|v_CTRL-C| CTRL-C stop Visual mode
|v_CTRL-G| CTRL-G toggle between Visual mode and Select mode
|v_<BS>| <BS> 2 Select mode: delete highlighted area
@@ -867,6 +869,7 @@ tag command note action in Visual mode ~
command
|v_CTRL-V| CTRL-V make Visual mode blockwise or stop Visual
mode
+|v_CTRL-X| CTRL-X 2 subtract N from number in highlighted text
|v_<Esc>| <Esc> stop Visual mode
|v_CTRL-]| CTRL-] jump to highlighted tag
|v_!| !{filter} 2 filter the highlighted lines through the
@@ -923,6 +926,8 @@ tag command note action in Visual mode ~
|v_a}| a} same as aB
|v_c| c 2 delete highlighted area and start insert
|v_d| d 2 delete highlighted area
+|v_g_CTRL-A| g CTRL-A 2 add N to number in highlighted text
+|v_g_CTRL-X| g CTRL-X 2 subtract N from number in highlighted text
|v_gJ| gJ 2 join the highlighted lines without
inserting spaces
|v_gq| gq 2 format the highlighted lines
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 4e7a784..3fd22f6 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1358,7 +1358,7 @@ Possible attributes are:
Note that -range=N and -count=N are mutually exclusive - only one should be
specified.

- *E889* *:command-addr*
+ *:command-addr*
It is possible that the special characters in the range like ., $ or % which
by default correspond to the current line, last line and the whole buffer,
relate to arguments, (loaded) buffers, windows or tab pages.
diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt
index 74bdc34..7455f2f 100644
--- a/runtime/doc/netbeans.txt
+++ b/runtime/doc/netbeans.txt
@@ -827,7 +827,7 @@ REJECT Not used.
These errors occur when a message violates the protocol:
*E627* *E628* *E629* *E632* *E633* *E634* *E635* *E636*
*E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646*
-*E647* *E648* *E649* *E650* *E651* *E652* *E653* *E654*
+*E647* *E648* *E649* *E650* *E651* *E652*


==============================================================================
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index b354ddf..80d2360 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.4. Last change: 2016 Apr 12
+*options.txt* For Vim version 7.4. Last change: 2016 Apr 20


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4863,6 +4863,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Specifies the name of the Lua shared library. The default is
DYNAMIC_LUA_DLL, which was specified at compile time.
+ Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

@@ -5030,7 +5031,7 @@ A jump table for the options with a short description can be found at |Q_op|.
without a limit.
On 64 bit machines higher values might work. But hey, do you really
need more than 2 Gbyte for text editing? Keep in mind that text is
- stored in the swap file, one can edit files > 2 Gbyte anyay. We do
+ stored in the swap file, one can edit files > 2 Gbyte anyway. We do
need the memory to store undo info.
Also see 'maxmem'.

@@ -5590,6 +5591,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Specifies the name of the Perl shared library. The default is
DYNAMIC_PERL_DLL, which was specified at compile time.
+ Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

@@ -5727,6 +5729,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Specifies the name of the Python 2.x shared library. The default is
DYNAMIC_PYTHON_DLL, which was specified at compile time.
+ Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

@@ -5738,6 +5741,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Specifies the name of the Python 3 shared library. The default is
DYNAMIC_PYTHON3_DLL, which was specified at compile time.
+ Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

@@ -5968,6 +5972,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Specifies the name of the Ruby shared library. The default is
DYNAMIC_RUBY_DLL, which was specified at compile time.
+ Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

@@ -7462,6 +7467,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Specifies the name of the Tcl shared library. The default is
DYNAMIC_TCL_DLL, which was specified at compile time.
+ Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 9cb6e11..e77c1c2 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -576,7 +576,7 @@ An atom can be followed by an indication of how many times the atom can be
matched and in what way. This is called a multi. See |/multi| for an
overview.

- */star* */\star* *E56*
+ */star* */\star*
* (use \* when 'magic' is not set)
Matches 0 or more of the preceding atom, as many as possible.
Example 'nomagic' matches ~
@@ -596,7 +596,7 @@ overview.
the end of the file and then tries matching "END", backing up one
character at a time.

- */\+* *E57*
+ */\+*
\+ Matches 1 or more of the preceding atom, as many as possible. {not in
Vi}
Example matches ~
@@ -612,7 +612,7 @@ overview.
\? Just like \=. Cannot be used when searching backwards with the "?"
command. {not in Vi}

- */\{* *E58* *E60* *E554* *E870*
+ */\{* *E60* *E554* *E870*
\{n,m} Matches n to m of the preceding atom, as many as possible
\{n} Matches n of the preceding atom
\{n,} Matches at least n of the preceding atom, as many as possible
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 145c918..3f705d4 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt* For Vim version 7.4. Last change: 2016 Feb 16
+*pi_netrw.txt* For Vim version 7.4. Last change: 2016 Apr 20

------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -1525,6 +1525,7 @@ the |'isfname'| option (which is global, so netrw doesn't modify it).
Associated setting variables:
|g:netrw_gx| control how gx picks up the text under the cursor
|g:netrw_nogx| prevent gx map while editing
+ |g:netrw_suppress_gx_mesg| controls gx's suppression of browser messages

*netrw_filehandler*

@@ -2931,6 +2932,13 @@ your browsing preferences. (see also: |netrw-settings|)
such as listing, file removal, etc.
default: ssh

+ *g:netrw_suppress_gx_mesg* =1 : browsers sometimes produce messages
+ which are normally unwanted intermixed
+ with the page.
+ However, when using links, for example,
+ those messages are what the browser produces.
+ By setting this option to 0, netrw will not
+ suppress browser messages.

*g:netrw_tmpfile_escape* =' &;'
escape() is applied to all temporary files
@@ -3757,6 +3765,23 @@ netrw:
==============================================================================
12. History *netrw-history* {{{1

+ v156: Feb 18, 2016 * Changed =~ to =~# where appropriate
+ Feb 23, 2016 * s:ComposePath(base,subdir) now uses
+ fnameescape() on the base portion
+ Mar 01, 2016 * (gt_macki) reported where :Explore would
+ make file unlisted. Fixed (tst943)
+ Apr 04, 2016 * (reported by John Little) netrw normally
+ suppresses browser messages, but sometimes
+ those "messages" are what is wanted.
+ See |g:netrw_suppress_gx_mesg|
+ Apr 06, 2016 * (reported by Carlos Pita) deleting a remote
+ file was giving an error message. Fixed.
+ Apr 08, 2016 * (Charles Cooper) had a problem with an
+ undefined b:netrw_curdir. He also provided
+ a fix.
+ Apr 20, 2016 * Changed s:NetrwGetBuffer(); now uses
+ dictionaries. Also fixed the "No Name"
+ buffer problem.
v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's
mapping of ctrl-l was not allowing refresh of
other windows when it was done in a netrw
diff --git a/runtime/doc/tags b/runtime/doc/tags
index ec0e580..1a221ac 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -3551,6 +3551,7 @@ CTRL-] tagsrch.txt /*CTRL-]*
CTRL-^ editing.txt /*CTRL-^*
CTRL-{char} intro.txt /*CTRL-{char}*
Channel eval.txt /*Channel*
+Channels eval.txt /*Channels*
Chinese mbyte.txt /*Chinese*
Cmd-event autocmd.txt /*Cmd-event*
CmdUndefined autocmd.txt /*CmdUndefined*
@@ -3769,7 +3770,6 @@ E273 if_ruby.txt /*E273*
E277 remote.txt /*E277*
E28 syntax.txt /*E28*
E280 if_tcl.txt /*E280*
-E281 if_tcl.txt /*E281*
E282 starting.txt /*E282*
E283 motion.txt /*E283*
E284 mbyte.txt /*E284*
@@ -3854,7 +3854,6 @@ E358 options.txt /*E358*
E359 term.txt /*E359*
E36 windows.txt /*E36*
E360 various.txt /*E360*
-E362 term.txt /*E362*
E363 options.txt /*E363*
E364 eval.txt /*E364*
E365 print.txt /*E365*
@@ -4062,7 +4061,6 @@ E556 tagsrch.txt /*E556*
E557 term.txt /*E557*
E558 term.txt /*E558*
E559 term.txt /*E559*
-E56 pattern.txt /*E56*
E560 if_cscop.txt /*E560*
E561 if_cscop.txt /*E561*
E562 if_cscop.txt /*E562*
@@ -4071,8 +4069,6 @@ E564 if_cscop.txt /*E564*
E566 if_cscop.txt /*E566*
E567 if_cscop.txt /*E567*
E568 if_cscop.txt /*E568*
-E569 if_cscop.txt /*E569*
-E57 pattern.txt /*E57*
E570 message.txt /*E570*
E571 if_tcl.txt /*E571*
E572 if_tcl.txt /*E572*
@@ -4081,9 +4077,7 @@ E574 starting.txt /*E574*
E575 starting.txt /*E575*
E576 starting.txt /*E576*
E577 starting.txt /*E577*
-E578 editing.txt /*E578*
E579 eval.txt /*E579*
-E58 pattern.txt /*E58*
E580 eval.txt /*E580*
E581 eval.txt /*E581*
E582 eval.txt /*E582*
@@ -4162,8 +4156,6 @@ E65 pattern.txt /*E65*
E650 netbeans.txt /*E650*
E651 netbeans.txt /*E651*
E652 netbeans.txt /*E652*
-E653 netbeans.txt /*E653*
-E654 netbeans.txt /*E654*
E655 eval.txt /*E655*
E656 netbeans.txt /*E656*
E657 netbeans.txt /*E657*
@@ -4206,7 +4198,6 @@ E69 pattern.txt /*E69*
E690 eval.txt /*E690*
E691 eval.txt /*E691*
E692 eval.txt /*E692*
-E693 eval.txt /*E693*
E694 eval.txt /*E694*
E695 eval.txt /*E695*
E696 eval.txt /*E696*
@@ -4387,9 +4378,7 @@ E855 autocmd.txt /*E855*
E858 eval.txt /*E858*
E859 eval.txt /*E859*
E86 windows.txt /*E86*
-E860 eval.txt /*E860*
E862 eval.txt /*E862*
-E863 if_pyth.txt /*E863*
E864 pattern.txt /*E864*
E865 pattern.txt /*E865*
E866 pattern.txt /*E866*
@@ -4417,7 +4406,6 @@ E885 sign.txt /*E885*
E886 starting.txt /*E886*
E887 if_pyth.txt /*E887*
E888 pattern.txt /*E888*
-E889 map.txt /*E889*
E89 message.txt /*E89*
E890 syntax.txt /*E890*
E891 eval.txt /*E891*
@@ -4425,11 +4413,8 @@ E892 eval.txt /*E892*
E893 eval.txt /*E893*
E894 eval.txt /*E894*
E895 if_mzsch.txt /*E895*
-E896 channel.txt /*E896*
E898 channel.txt /*E898*
-E899 channel.txt /*E899*
E90 message.txt /*E90*
-E900 channel.txt /*E900*
E901 channel.txt /*E901*
E902 channel.txt /*E902*
E903 channel.txt /*E903*
@@ -4527,6 +4512,7 @@ InsertLeave autocmd.txt /*InsertLeave*
J change.txt /*J*
Japanese mbyte.txt /*Japanese*
Job eval.txt /*Job*
+Jobs eval.txt /*Jobs*
K various.txt /*K*
KDE gui_x11.txt /*KDE*
KVim gui_x11.txt /*KVim*
@@ -6356,6 +6342,7 @@ g` motion.txt /*g`*
g`a motion.txt /*g`a*
ga various.txt /*ga*
garbagecollect() eval.txt /*garbagecollect()*
+garbagecollect_for_testing() eval.txt /*garbagecollect_for_testing()*
gd pattern.txt /*gd*
gdb debug.txt /*gdb*
ge motion.txt /*ge*
@@ -8260,11 +8247,13 @@ statusmsg-variable eval.txt /*statusmsg-variable*
str2float() eval.txt /*str2float()*
str2nr() eval.txt /*str2nr()*
strcasestr() eval.txt /*strcasestr()*
+strcharpart() eval.txt /*strcharpart()*
strchars() eval.txt /*strchars()*
strchr() eval.txt /*strchr()*
strcspn() eval.txt /*strcspn()*
strdisplaywidth() eval.txt /*strdisplaywidth()*
strftime() eval.txt /*strftime()*
+strgetchar() eval.txt /*strgetchar()*
stridx() eval.txt /*stridx()*
string eval.txt /*string*
string() eval.txt /*string()*
@@ -8609,6 +8598,7 @@ terminal-options term.txt /*terminal-options*
terminfo term.txt /*terminfo*
termresponse-variable eval.txt /*termresponse-variable*
test-functions usr_41.txt /*test-functions*
+testing-variable eval.txt /*testing-variable*
tex-cchar syntax.txt /*tex-cchar*
tex-cole syntax.txt /*tex-cole*
tex-conceal syntax.txt /*tex-conceal*
@@ -8805,6 +8795,7 @@ v:swapchoice eval.txt /*v:swapchoice*
v:swapcommand eval.txt /*v:swapcommand*
v:swapname eval.txt /*v:swapname*
v:termresponse eval.txt /*v:termresponse*
+v:testing eval.txt /*v:testing*
v:this_session eval.txt /*v:this_session*
v:throwpoint eval.txt /*v:throwpoint*
v:true eval.txt /*v:true*
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index a56813a..4359764 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -542,7 +542,7 @@ correct values.

One command can be used to set the screen size:

- *:mod* *:mode* *E359* *E362*
+ *:mod* *:mode* *E359*
:mod[e] [mode]

Without argument this only detects the screen size and redraws the screen.
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index ff359b1..8b0329c 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.4. Last change: 2016 Apr 11
+*todo.txt* For Vim version 7.4. Last change: 2016 Apr 21


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,26 +34,19 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------

-Crash in garbagecollect() after starting a job. (Yasuhiro Matsumoto)
- :let g:a = job_start(['ls'])
- :call garbagecollect()
--> Need to find a way to call garbagecollect() in a test.
+In test_partial when start_job() has a non-existing command memory leaks.

-Channel closes unexpectedly. (Christian Robinson, 2016 Apr 10)
-Log file later.
-Remarks from Kazunobu Kuriyama. Fix from Hirohito, suggested by Ozaki Kiichi.
-
-When test_partial start_job() has a non-existing command memory leaks.
-
-Vim 8 features to mention:
-* TabNew, TabNewEntered and TabClosed autocommand events.
+Memory leak in test49
+Memory leak in test_alot, with matchstrpos()

Also keep a list of loaded plugins, skip when encountered again?

-Memory leak in test49
-Memory leak in test_alot, with matchstrpos()
+Vim.org: when a user already has a homepage, do show the field so that it can
+be deleted.

+channel:
+- GUI:cursor blinking is irregular when invoking callbacks. (Ramel Eshed, 2016
+ Apr 16) somehow remember the previous state?
- When a message in the queue but there is no callback, drop it after a while?
Add timestamp to queued messages and callbacks with ID, remove after a
minute. Option to set the droptime.
@@ -67,17 +60,10 @@ Later
- job_start(): run job in a newly opened terminal.
With xterm could use -S{pty}.

-Test for try/catch in 'tabline'. #746, Haya, 2016 Apr 10.
-
Make it so that the window ID can be used where currently a window nr is used

-Patch to make tag jump work on function({expr}). (Hirohito Higashi, 2016 Mar
-25)
-
-Patch to improve I/O for Perl. (Damien, 2016 Jan 9, update Jan 22 2nd one)
-
-Add strgetchar(): get a character by index from a string.
- using [] is a byte index.
+Patch to fix invalid behavior with NULL list. (Nikolai Pavlov, #768)
+Also check :for.

Regexp problems:
- The regexp engines are not reentrant, causing havoc when interrupted by a
@@ -124,26 +110,23 @@ Regexp problems:

Using freed memory in quickfix code. (Dominique, 2016 Mar 21)

-Patch 7.4.1401 caused autochdir not to work on startup. (Rob Hoelz, #704)
-
-Patch to support partions for Python, #734. Nikolai Pavlov, 2017 Apr 6
-
-Patch to fix that folds close with autocomplete. #643
-Christian Brabandt, 2016 Feb 18.
+jsonencode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
+What if there is an invalid character?

-Also include update_curswant() fix for getcurpos(). (Christian Brabandt, 2016
-Feb 9)
+Once .exe with updated installer is available: Add remark to download page
+about /S and /D options (Ken Takata, 2016 Apr 13)

-When cross-compiling skip generating the tags file (and moving it out of the
-way). (Christian Neukirchen, 2016 Apr 7) #740
+Patch to make cursor blinking work better with GTK3. (Kazunobu Kuriyama, 2016
+Apr 19) Need to check this works on Linux.

-Patch to list some messages and clear messages. (Yasuhiro Matsumoto, 2016 Mar
-12)
+Use ADDR_OTHER instead of ADDR_LINES for many more commands.
+Add tests for using number larger than number of lines in buffer.

Patch to fix escaping special characters for delete(). (tc-0, 2016 Mar 20,
#700) Test fails on MS-Windows.

-Patch to have complete() not set 'modified'. (Shougo, 2016 Apr 9, #745)
+ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19)
+Also with latest version.

Patch to put undo options together in undo window.
(Gary Johnson, 2016 Jan 28)
@@ -151,9 +134,11 @@ Patch to put undo options together in undo window.
Still problems with 'emoji'. See issue #721. Patch 7.4.1697 half-fixes it.
Avoid PLAN_WRITE in windgoto() ?

+AVR assembler syntax file. (Marius Ghita, #439)
+
Patch to have better check for {action} argument of setqflist().
Nikolai Pavlov, Feb 25, #661. Can be even more strict.
-Also see patch from Hirohito Higash, Feb 25.
+Also see patch from Hirohito Higashi, Feb 25.
Updated patch, 2016 Mar 25.

Patch to update the GTK icon cache when installing. (Kazunobu Kuriyama, 2016
@@ -163,13 +148,22 @@ Patch for test86 and test87. (Roland Puntaier, #622)

Cannot delete a file with square brackets with delete(). (#696)

+Patch to add GUI colors to the terminal, when 'guicolors' is set. (ZyX, 2013
+Jan 26, update 2013 Dec 14, another 2014 Nov 22)
+
+Patch to add TabNew, TabNewEntered and TabClosed autocommand events.
+(Felipe Morales, 2015 Feb 1)
+
Patch on issue #728 by Christian Brabandt, 2016 Apr 7. Update with test: Apr 8.
+Explanation Apr 12.
Might be related to:
Test 44 fails when [[=A=]] is changed to [[=À=]]. Caused by getcmdline() not
handling the 0x80 as a second byte correctly? (Dominique Pelle, 2015 Jun 10)

Patch to add 'topbot' to 'belloff' option. (Coot, 2016 Mar 18, #695)

+Patch for C syntax HL. (Bradley Garagan, 2016 Apr 17) #763
+
Patch to make matchit work better, respect 'matchpairs'. (Ken Takata, 2016 Mar
25)

@@ -196,6 +190,9 @@ Update 2016 Apr 4.
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
Updated 2016 Feb 10

+Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574
+No test, needs some work to include.
+>
Patch to improve indenting for C++ constructor with initializer list.
(Hirohito Higashi, 2016 Mar 31)

@@ -228,8 +225,13 @@ Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)

Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)

-jsonencode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
-What if there is an invalid character?
+When repeating the 'confirm' dialog one needs to press Enter. (ds26gte, 2016
+Apr 17) #762
+
+Patch to support expression argument to sort() instead of a function name.
+Yasuhiro Matsumoto, 2013 May 31.
+Or should we add a more general mechanism, like a lambda() function?
+Patch by Yasuhiro Matsumoto, 2014 Sep 16, update 2016 Apr 17.

Should jsonencode()/jsondecode() restrict recursiveness?
Or avoid recursiveness.
@@ -266,7 +268,7 @@ directory exists. (Sergio Gallelli, 2013 Dec 29)
Patch by Christian Brabandt, 2016 Feb 1.

Patch to discard remainder of long error messages in quickfix, avoid using
-them as separate messages. (Anton Lindqvist, 2016 Apr 9)
+them as separate messages. (Anton Lindqvist, 2016 Apr 9, update Apr 13)

Patch to avoid redrawing tabline when the popup menu is visible.
(Christian Brabandt, 2016 Jan 28)
@@ -279,6 +281,10 @@ Patch from Christian Brabandt, 2016 Mar 30, #712.
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.

+When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot
+restore the mode properly. (Andrew Stewart, 2016 Apr 20)
+Do not trigger the event?
+
Using ":windo" to set options in all windows has the side effect that it
changes the window layout and the current window. Make a variant that saves
and restores. Use in the matchparen plugin.
@@ -297,7 +303,7 @@ https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
Patch to make the behavior of "w" more straightforward, but not Vi compatible.
With a 'cpo' flag. (Christian Brabandt, 2016 Feb 8)

-Patch to add optionproperties(). (Anton Lindqvist, 2016 Mar 27)
+Patch to add optionproperties(). (Anton Lindqvist, 2016 Mar 27, update Apr 13)

Patch to add TagNotFound autocommand. (Anton Lindqvist, 2016 Feb 3)

@@ -374,9 +380,6 @@ is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19)
Patch to use two highlight groups for relative numbers. (Shaun Brady, 2016 Jan
30)

-Weird encryption problems on Windows. (Ben Fritz, 2015 Feb 13)
-Goes away when disabling the swap file. (might1, Feb 16)
-
MS-Windows: Crash opening very long file name starting with "\\".
(Christian Brock, 2012 Jun 29)

@@ -405,9 +408,6 @@ Crash in :cnext on MS-Windows. (Ben Fritz, 2015 Oct 27)
When using --remote-tab on MS-Windows 'encoding' hasn't been initialized yet,
the file name ends up encoded wrong. (Raul Coronado, 2015 Dec 21)

-Patch to add GUI colors to the terminal, when 'guicolors' is set. (ZyX, 2013
-Jan 26, update 2013 Dec 14, another 2014 Nov 22)
-
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
Sep 10)

@@ -428,8 +428,6 @@ Patch to fix checking global option value when not using it.
When 'showbreak' is set repeating a Visual operation counts the size of the
'showbreak' text as part of the operation. (Axel Bender, 2015 Jul 20)

-Patch for matchit plugin related to multibyte chars. (Ken Takata, 2015 Jul 22)
-
Patch for multi-byte characters in langmap and applying a mapping on them.
(Christian Brabandt, 2015 Jun 12, update July 25)
Is this the right solution? Need to cleanup langmap behavior:
@@ -609,9 +607,6 @@ What for systems that don't have unsetenv()?

Patch to add a :domodeline command. (Christian Brabandt, 2014 Oct 21)

-Patch to add TabNew, TabNewEntered and TabClosed autocommand events.
-(Felipe Morales, 2015 Feb 1)
-
This does not give an error: (Andre Sihera, 2014 Mar 21)
vim -u NONE 1 2 3 -c 'bufdo if 1 | echo 1'
This neither: (ZyX)
@@ -678,14 +673,6 @@ various other commands. (ZyX, 2014 Mar 30)
Patch to skip sort if no line matches the expression.
(Christian Brabandt, 2014 Jun 25)

-Patch to add sortuniq(). (Cade Forester, 2014 Mar 19)
-Or add uniq() instead? Patch by lcd47, but it has problems.
-
-Patch to support expression argument to sort() instead of a function name.
-Yasuhiro Matsumoto, 2013 May 31.
-Or should we add a more general mechanism, like a lambda() function?
-Patch by Yasuhiro Matsumoto, 2014 Sep 16.
-
VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow
instead. (Samuel Ferencik, 2013 Sep 28)

diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
index 8d14a87..b9df287 100644
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -1,4 +1,4 @@
-*version8.txt* For Vim version 8.0. Last change: 2016 Apr 12
+*version8.txt* For Vim version 8.0. Last change: 2016 Apr 14


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -37,8 +37,10 @@ INCOMPATIBLE CHANGES *incompatible-8*
These changes are incompatible with previous releases. Check this list if you
run into a problem when upgrading from Vim 7.4 to 8.0.

-The support for MS-DOS has been removed.
+The support for MS-DOS has been removed. It hasn't been working for a while
+and removing it cleans up the code quite a bit.

+The support for Windows 16 bit (Windows 95 and older) has been removed.

Minor incompatibilities:

@@ -47,13 +49,13 @@ For filetype detection: ...
==============================================================================
NEW FEATURES *new-8*

-First a list to the bigger new features. A comprehensive list is below.
+First a list of the bigger new features. A comprehensive list is below.


Asynchronous I/O support, channels ~

-Vim can now exchange messages with another process in the background. The
-message are received and handled while Vim is waiting for a character. See
+Vim can now exchange messages with another process in the background. The
+messages are received and handled while Vim is waiting for a character. See
|channel-demo| for an example, communicating with a Python server.

Closely related to channels is JSON support. JSON is widely supported and can
@@ -74,7 +76,7 @@ Timers ~
Also asynchronous are timers. They can fire once or repeatedly and invoke a
function to do any work. For example: >
let tempTimer = timer_start(4000, 'CheckTemp')
-This will make call 4 seconds later, like: >
+This will make a call four seconds (4000 milli seconds) later, like: >
call CheckTemp()


@@ -85,13 +87,13 @@ to a function, and additionally binds arguments and/or a dictionary. This is
especially useful for callbacks on channels and timers. E.g., for the timer
example above, to pass an argument to the function: >
let tempTimer = timer_start(4000, function('CheckTemp', ['out']))
-This will make call 4 seconds later, like: >
+This will a make call four seconds later, like: >
call CheckTemp('out')


Packages ~

-Plugins keep growing and more of them are available then ever before. To keep
+Plugins keep growing and more of them are available than ever before. To keep
the collection of plugins manageable package support has been added. This is
a convenient way to get one or more plugins, drop them in a directory and
possibly keep them updated. Vim will load them automatically, or only when
@@ -145,7 +147,7 @@ works quite well, mostly just like GTK+ 2.
Vim script enhancements *new-vim-script-8*
-----------------------

-In Vim scripts the following types have been added:
+In Vim script the following types have been added:

|Special| |v:false|, |v:true|, |v:none| and |v:null|
|Channel| connection to another process for asynchronous I/O
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim
index 31b76b8..7ec7df8 100644
--- a/runtime/indent/vim.vim
+++ b/runtime/indent/vim.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <***@vim.org>
-" Last Change: 2016 Jan 24
+" Last Change: 2016 Apr 19

" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -60,7 +60,7 @@ function GetVimIndentIntern()
else
let ind = ind + shiftwidth() * 3
endif
- elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+END'
+ elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+[eE][nN][dD]'
let ind = ind + shiftwidth()
else
" A line starting with :au does not increment/decrement indent.
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index 69902b1..28e1c3e 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
-let g:loaded_netrwPlugin = "v155"
+let g:loaded_netrwPlugin = "v156"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn
diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim
index 94d1b0b..83d72c5 100644
--- a/runtime/syntax/php.vim
+++ b/runtime/syntax/php.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5
" Maintainer: Jason Woofenden <***@jasonwoof.com>
-" Last Change: Dec 26, 2015
+" Last Change: Apr 18, 2016
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
" Former Maintainers: Peter Hodge <toomuchphp-***@yahoo.com>
" Debian VIM Maintainers <pkg-vim-***@lists.alioth.debian.org>
@@ -136,7 +136,7 @@ syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ __D

" Function and Methods ripped from php_manual_de.tar.gz Jan 2003
syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained
-syn keyword phpFunctions array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_uassoc array_diff array_fill array_filter array_flip array_intersect_assoc array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_unique a [...]
+syn keyword phpFunctions array_change_key_case array_chunk array_column array_combine array_count_values array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_diff array_fill_keys array_fill array_filter array_flip array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_product array_push array_rand array_reduce [...]
syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained
syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained
syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:07 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 8ed43916dbea4ccedcc84d271e292abbf658b9c5
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 08:56:12 2016 +0200

patch 7.4.1761
Problem: Coverity complains about ignoring return value.
Solution: Add "(void)" to get rid of the warning.
---
src/eval.c | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/eval.c b/src/eval.c
index 53a651a..1daf042 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -13178,7 +13178,7 @@ f_getreg(typval_T *argvars, typval_T *rettv)
rettv->vval.v_list = (list_T *)get_reg_contents(regname,
(arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
if (rettv->vval.v_list == NULL)
- rettv_list_alloc(rettv);
+ (void)rettv_list_alloc(rettv);
else
++rettv->vval.v_list->lv_refcount;
}
diff --git a/src/version.c b/src/version.c
index eeff8c6..63dedd7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1761,
+/**/
1760,
/**/
1759,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:07 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 268a06ce901d2c780304e0395028e3c2f60ec755
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 09:07:01 2016 +0200

patch 7.4.1762
Problem: Coverity: useless assignments.
Solution: Remove them.
---
src/search.c | 3 +--
src/version.c | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/search.c b/src/search.c
index 23cb291..5fc6820 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4594,7 +4594,6 @@ current_search(
orig_pos = curwin->w_cursor;

pos = curwin->w_cursor;
- start_pos = VIsual;

/* make sure, searching further will extend the match */
if (VIsual_active)
@@ -4606,7 +4605,7 @@ current_search(
}
}
else
- orig_pos = pos = start_pos = curwin->w_cursor;
+ orig_pos = pos = curwin->w_cursor;

/* Is the pattern is zero-width? */
one_char = is_one_char(spats[last_idx].pat, TRUE);
diff --git a/src/version.c b/src/version.c
index 63dedd7..9cbce20 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1762,
+/**/
1761,
/**/
1760,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:07 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit ba53435144f46eaaa53c63a62e748b3feee9742c
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 09:20:26 2016 +0200

patch 7.4.1763
Problem: Coverity: useless assignment.
Solution: Add #if 0.
---
src/spell.c | 2 ++
src/version.c | 2 ++
2 files changed, 4 insertions(+)

diff --git a/src/spell.c b/src/spell.c
index 3f23bf9..259f6d7 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -1649,7 +1649,9 @@ find_word(matchinf_T *mip, int mode)
}
}
#endif
+#if 0 /* Disabled, see below */
c = mip->mi_compoff;
+#endif
++mip->mi_complen;
if (flags & WF_COMPROOT)
++mip->mi_compextra;
diff --git a/src/version.c b/src/version.c
index 9cbce20..9ec96b2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1763,
+/**/
1762,
/**/
1761,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:07 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 4694a17d1ec08382f996990a7fac1ac60197ec81
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 14:05:23 2016 +0200

patch 7.4.1765
Problem: Undo options are not together in the options window.
Solution: Put them together. (Gary Johnson)
---
runtime/optwin.vim | 8 ++++----
src/os_unix.c | 7 +++++--
src/version.c | 4 ++++
3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 368eb09..b88f301 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -738,6 +738,10 @@ call <SID>Header("editing text")
call append("$", "undolevels\tmaximum number of changes that can be undone")
call append("$", "\t(global or local to buffer)")
call append("$", " \tset ul=" . &ul)
+call append("$", "undofile\tautomatically save and restore undo history")
+call <SID>BinOptionG("udf", &udf)
+call append("$", "undodir\tlist of directories for undo files")
+call <SID>OptionG("udir", &udir)
call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload")
call append("$", " \tset ur=" . &ur)
call append("$", "modified\tchanges have been made and not written to a file")
@@ -1074,10 +1078,6 @@ if has("vertsplit")
call append("$", "cmdwinheight\theight of the command-line window")
call <SID>OptionG("cwh", &cwh)
endif
-call append("$", "undofile\tautomatically save and restore undo history")
-call <SID>BinOptionG("udf", &udf)
-call append("$", "undodir\tlist of directories for undo files")
-call <SID>OptionG("udir", &udir)


call <SID>Header("executing external commands")
diff --git a/src/os_unix.c b/src/os_unix.c
index f8cf691..57eb050 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5138,7 +5138,8 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED)

if (pid == 0)
{
- int null_fd = -1;
+ int null_fd = -1;
+ int stderr_works = TRUE;

/* child */
reset_signals(); /* handle signals normally */
@@ -5175,6 +5176,7 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED)
{
close(2);
ignored = dup(null_fd);
+ stderr_works = FALSE;
}
else if (use_out_for_err)
{
@@ -5210,7 +5212,8 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED)
/* See above for type of argv. */
execvp(argv[0], argv);

- // perror("executing job failed");
+ if (stderr_works)
+ perror("executing job failed");
_exit(EXEC_FAILED); /* exec failed, return failure code */
}

diff --git a/src/version.c b/src/version.c
index 9ec96b2..75d4746 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,10 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1765,
+/**/
+ 1764,
+/**/
1763,
/**/
1762,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:07 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 02cfac85b4e4b038bb2df6962699fa93a42c7eb1
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 14:34:58 2016 +0200

patch 7.4.1766
Problem: Building instructions for MS-Windows are outdated.
Solution: Mention setting SDK_INCLUDE_DIR. (Ben Franklin, closes #771) Move
outdated instructions further down.
---
src/INSTALLpc.txt | 139 +++++++++++++++++++++++++++++++-----------------------
src/version.c | 2 +
2 files changed, 81 insertions(+), 60 deletions(-)

diff --git a/src/INSTALLpc.txt b/src/INSTALLpc.txt
index 31da97d..bc1fa36 100644
--- a/src/INSTALLpc.txt
+++ b/src/INSTALLpc.txt
@@ -11,9 +11,9 @@ The file "feature.h" can be edited to match your preferences. You can skip
this, then you will get the default behavior as is documented, which should
be fine for most people.

-With the exception of two sections (Windows 3.1 and MS-DOS), this document
-assumes that you are building Vim for Win32 or later.
-(Windows 95/98/Me/NT/2000/XP/2003/Vista/7/8/10)
+This document assumes that you are building Vim for Win32 or later (Windows
+XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but
+they might no longer work.


Contents:
@@ -36,9 +36,7 @@ Contents:


The currently preferred method is using the free Visual C++ Toolkit 2008
-|msvc-2008-express|, the produced binary runs on most MS-Windows systems. If
-you need the executable to run on Windows 98 or ME, use the 2003 one
-|msvc-2003-toolkit|.
+|msvc-2008-express|, the produced binary runs on most MS-Windows systems.


1. Microsoft Visual C++
@@ -87,6 +85,69 @@ These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
Ron Aaron; they have been tested.


+Visual C++ 2008 Express Edition *msvc-2008-express*
+-------------------------------
+
+Visual C++ 2008 Express Edition can be downloaded for free from:
+ http://www.microsoft.com/express/downloads/
+This includes the IDE and the debugger.
+
+To set the environment execute the msvc2008.bat script. You can then build
+Vim with Make_mvc.mak.
+
+For building 64 bit binaries you also need to install the SDK:
+"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1"
+You don't need the examples and documentation.
+
+If you get an error that Win32.mak can't be found, you have to set the
+variable SDK_INCLUDE_DIR. For example, on Windows 10, installation of MSVC
+puts include files in the following directory:
+ set SDK_INCLUDE_DIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
+
+
+Visual C++ 2010 Express Edition *msvc-2010-express*
+-------------------------------
+
+Visual C++ 2010 Express Edition can be downloaded for free from:
+ http://www.microsoft.com/express/vc/Default.aspx
+This includes the IDE and the debugger.
+
+To set the environment execute the msvc2010.bat script. You can then build
+Vim with Make_mvc.mak.
+
+
+Targeting Windows XP with new MSVC *new-msvc-windows-xp*
+----------------------------------
+
+Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
+so that it targets Windows 6.0 (Vista) by default. In order to override
+this, the target Windows version number needs to be passed to LINK like
+follows:
+ LINK ... /subsystem:console,5.01
+
+Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
+Use lines like follows to target Windows XP (assuming using Visual C++ 2012
+under 64-bit Windows):
+ set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
+ set SDK_INCLUDE_DIR=%WinSdk71%\Include
+ set INCLUDE=%WinSdk71%\Include;%INCLUDE%
+ set LIB=%WinSdk71%\Lib;%LIB%
+ set PATH=%WinSdk71%\Bin;%PATH%
+ set CL=/D_USING_V110_SDK71_
+ nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
+
+The following Visual C++ team blog can serve as a reference page:
+ http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
+
+
+OLDER VERSIONS
+
+The minimal supported version is Windows XP. Building with older compilers
+might still work, but these instructions might be outdated.
+
+If you need the executable to run on Windows 98 or ME, use the 2003 one
+|msvc-2003-toolkit|.
+
Visual C++ Toolkit 2003 *msvc-2003-toolkit*
-----------------------

@@ -172,55 +233,6 @@ Instructions for integrating the Platform SDK into VC Express:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx


-Visual C++ 2008 Express Edition *msvc-2008-express*
--------------------------------
-
-Visual C++ 2008 Express Edition can be downloaded for free from:
- http://www.microsoft.com/express/downloads/
-This includes the IDE and the debugger.
-
-To set the environment execute the msvc2008.bat script. You can then build
-Vim with Make_mvc.mak.
-
-For building 64 bit binaries you also need to install the SDK:
-"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1"
-You don't need the examples and documentation.
-
-
-Visual C++ 2010 Express Edition *msvc-2010-express*
--------------------------------
-
-Visual C++ 2010 Express Edition can be downloaded for free from:
- http://www.microsoft.com/express/vc/Default.aspx
-This includes the IDE and the debugger.
-
-To set the environment execute the msvc2010.bat script. You can then build
-Vim with Make_mvc.mak.
-
-
-Targeting Windows XP with new MSVC *new-msvc-windows-xp*
-----------------------------------
-
-Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
-so that it targets Windows 6.0 (Vista) by default. In order to override
-this, the target Windows version number needs to be passed to LINK like
-follows:
- LINK ... /subsystem:console,5.01
-
-Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
-Use lines like follows to target Windows XP (assuming using Visual C++ 2012
-under 64-bit Windows):
- set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
- set SDK_INCLUDE_DIR=%WinSdk71%\Include
- set INCLUDE=%WinSdk71%\Include;%INCLUDE%
- set LIB=%WinSdk71%\Lib;%LIB%
- set PATH=%WinSdk71%\Bin;%PATH%
- set CL=/D_USING_V110_SDK71_
- nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
-
-The following Visual C++ team blog can serve as a reference page:
- http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
-

2. MinGW
========
@@ -253,10 +265,14 @@ System, Advanced, and edit the environment from there. If you use msys2
compilers, set your installed paths:

C:\msys2\mingw32\bin
+or
+ C:\msys64\mingw32\bin

for 32bit. And 64bit:

C:\msys2\mingw64\bin
+or
+ C:\msys64\mingw64\bin

Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:

@@ -605,7 +621,7 @@ A) Using MSVC
If you want to link with ruby, normally you must use the same compiler as
which was used to build the ruby binary. RubyInstaller is built with MinGW,
so normally you cannot use MSVC for building Vim if you want to link with
-RubyInstaller. If you use a different complier, there are mainly two problems:
+RubyInstaller. If you use a different compiler, there are mainly two problems:
config.h and Ruby's DLL name. Here are the steps for working around them:

1) Download and Install RubyInstaller.
@@ -639,9 +655,10 @@ config.h and Ruby's DLL name. Here are the steps for working around them:
nmake -f Make_mvc.mak
RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
RUBY_MSVCRT_NAME=msvcrt
- WINVER=0x500
+ WINVER=0x501

- WINVER must be set to >=0x500, when building with Ruby 2.1 or later.
+ If you set WINVER explicitly, it must be set to >=0x500, when building
+ with Ruby 2.1 or later. (Default is 0x501.)
When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt
which is used for the Ruby's DLL name.

@@ -652,9 +669,11 @@ After you install RubyInstaller, just type this (as one line):

mingw32-make -f Make_ming.mak
RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
- WINVER=0x500
+ WINVER=0x501
+
+If you set WINVER explicitly, it must be set to >=0x500, when building with
+Ruby 2.1 or later. (Default is 0x501.)

-WINVER must be set to >=0x500, when building with Ruby 2.1 or later.


12. Building with Tcl support
diff --git a/src/version.c b/src/version.c
index 75d4746..92bf726 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1766,
+/**/
1765,
/**/
1764,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:08 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 0c1ff16b5467f97ce08134fdbc8198127bbe492a
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 18:01:28 2016 +0200

updated runtime files. Add avra syntax.
---
runtime/optwin.vim | 2 +-
runtime/synmenu.vim | 1 +
runtime/syntax/avra.vim | 73 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index b88f301..2ba347e 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <***@vim.org>
-" Last Change: 2016 Mar 19
+" Last Change: 2016 Apr 21

" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim
index 76f6013..01dad3c 100644
--- a/runtime/synmenu.vim
+++ b/runtime/synmenu.vim
@@ -61,6 +61,7 @@ an 50.10.320 &Syntax.AB.Ascii\ Doc :cal SetSyn("asciidoc")<CR>
an 50.10.330 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")<CR>
an 50.10.340 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")<CR>
an 50.10.350 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")<CR>
+an 50.10.355 &Syntax.AB.Assembly.AVR :cal SetSyn("avra")<CR>
an 50.10.360 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")<CR>
an 50.10.370 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")<CR>
an 50.10.380 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")<CR>
diff --git a/runtime/syntax/avra.vim b/runtime/syntax/avra.vim
new file mode 100644
index 0000000..ebf0aaf
--- /dev/null
+++ b/runtime/syntax/avra.vim
@@ -0,0 +1,73 @@
+" Vim syntax file
+" Language: AVR Assembler (AVRA)
+" AVRA Home: http://avra.sourceforge.net/index.html
+" AVRA Version: 1.3.0
+" Maintainer: Marius Ghita <***@gmail.com>
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+setlocal iskeyword=a-z,A-Z,48-57,.,_
+" 'isident' is a global option, better not set it
+" setlocal isident=a-z,A-Z,48-57,.,_
+syn case ignore
+
+syn keyword avraRegister r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14
+syn keyword avraRegister r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27
+syn keyword avraRegister r28 r29 r30 r31
+
+syn keyword avraInstr add adc adiw sub subi sbc sbci sbiw and andi or ori eor
+syn keyword avraInstr com neg sbr cbr inc dec tst clr ser mul muls mulsu fmul
+syn keyword avraInstr fmuls fmulsu des rjmp ijmp eijmp jmp rcall icall eicall
+syn keyword avraInstr call ret reti cpse cp cpc cpi sbrc sbrs sbic sbis brbs
+syn keyword avraInstr brbc breq brne brcs brcc brsh brlo brmi brpl brge brlt
+syn keyword avraInstr brhs brhc brts brtc brvs brvc brie brid mov movw ldi lds
+syn keyword avraInstr ld ldd sts st std lpm elpm spm in out push pop xch las
+syn keyword avraInstr lac lat lsl lsr rol ror asr swap bset bclr sbi cbi bst bld
+syn keyword avraInstr sec clc sen cln sez clz sei cli ses cls sev clv set clt
+syn keyword avraInstr seh clh break nop sleep wdr
+
+syn keyword avraDirective .byte .cseg .db .def .device .dseg .dw .endmacro .equ
+syn keyword avraDirective .eseg .exit .include .list .listmac .macro .nolist
+syn keyword avraDirective .org .set .define .undef .ifdef .ifndef .if .else
+syn keyword avraDirective .elif .elseif .warning
+
+syn keyword avraOperator low high byte2 byte3 byte4 lwrd hwrd page exp2 log2
+
+syn match avraNumericOperator "[-*/+]"
+syn match avraUnaryOperator "!"
+syn match avraBinaryOperator "<<\|>>\|<\|<=\|>\|>=\|==\|!="
+syn match avraBitwiseOperator "[~&^|]\|&&\|||"
+
+syn match avraBinaryNumber "\<0[bB][0-1]*\>"
+syn match avraHexNumber "\<0[xX][0-9a-fA-F]\+\>"
+syn match avraDecNumber "\<\(0\|[1-9]\d*\)\>"
+
+syn region avraComment start=";" end="$"
+syn region avraString start="\"" end="\"\|$"
+
+syn match avraLabel "^\s*[^; \t]\+:"
+
+hi def link avraBinaryNumber avraNumber
+hi def link avraHexNumber avraNumber
+hi def link avraDecNumber avraNumber
+
+hi def link avraNumericOperator avraOperator
+hi def link avraUnaryOperator avraOperator
+hi def link avraBinaryOperator avraOperator
+hi def link avraBitwiseOperator avraOperator
+
+
+hi def link avraOperator operator
+hi def link avraComment comment
+hi def link avraDirective preproc
+hi def link avraRegister type
+hi def link avraNumber constant
+hi def link avraString String
+hi def link avraInstr keyword
+hi def link avraLabel label
+
+let b:current_syntax = "avra"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:08 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 4adfaabfe7e07da9546b45130cad0d266ba48611
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 18:20:11 2016 +0200

patch 7.4.1767
Problem: When installing Vim on a GTK system the icon cache is not updated.
Solution: Update the GTK icon cache when possible. (Kazunobu Kuriyama)
---
src/Makefile | 17 ++++++-
src/auto/configure | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/config.mk.in | 3 ++
src/configure.in | 32 +++++++++++++
src/version.c | 2 +
5 files changed, 185 insertions(+), 1 deletion(-)

diff --git a/src/Makefile b/src/Makefile
index 195cbd5..69e3a4b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1977,7 +1977,6 @@ test1 \
test_listlbr_utf8 \
test_mapping \
test_marks \
- test_match_conceal \
test_nested_function \
test_options \
test_ruby \
@@ -2013,11 +2012,14 @@ test_arglist \
test_delete \
test_ex_undo \
test_expand \
+ test_expand_dllpath \
test_expr \
+ test_expr_utf8 \
test_feedkeys \
test_file_perm \
test_fnamemodify \
test_glob2regpat \
+ test_goto \
test_hardcopy \
test_help_tagjump \
test_history \
@@ -2026,8 +2028,11 @@ test_arglist \
test_json \
test_langmap \
test_lispwords \
+ test_matchadd_conceal \
+ test_matchadd_conceal_utf8 \
test_matchstrpos \
test_menu \
+ test_messages \
test_packadd \
test_partial \
test_perl \
@@ -2042,6 +2047,7 @@ test_arglist \
test_syn_attr \
test_syntax \
test_tabline \
+ test_tagjump \
test_timers \
test_undolevels \
test_unlet \
@@ -2350,12 +2356,18 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP)
ICON48PATH = $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
ICON32PATH = $(DESTDIR)$(DATADIR)/icons/locolor/32x32/apps
ICON16PATH = $(DESTDIR)$(DATADIR)/icons/locolor/16x16/apps
+ICONTHEMEPATH = $(DATADIR)/icons/hicolor
DESKTOPPATH = $(DESTDIR)$(DATADIR)/applications
KDEPATH = $(HOME)/.kde/share/icons
install-icons:
if test -d $(ICON48PATH) -a -w $(ICON48PATH) \
-a ! -f $(ICON48PATH)/gvim.png; then \
$(INSTALL_DATA) $(SCRIPTSOURCE)/vim48x48.png $(ICON48PATH)/gvim.png; \
+ if test -z "$(DESTDIR)" -a -x $(GTK_UPDATE_ICON_CACHE) \
+ -a -w $(ICONTHEMEPATH) \
+ -a -f $(ICONTHEMEPATH)/index.theme; then \
+ $(GTK_UPDATE_ICON_CACHE) -q $(ICONTHEMEPATH); \
+ fi \
fi
if test -d $(ICON32PATH) -a -w $(ICON32PATH) \
-a ! -f $(ICON32PATH)/gvim.png; then \
@@ -2369,6 +2381,9 @@ install-icons:
$(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \
$(SCRIPTSOURCE)/gvim.desktop \
$(DESKTOPPATH); \
+ if test -z "$(DESTDIR)" -a -x $(UPDATE_DESKTOP_DATABASE); then \
+ $(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \
+ fi \
fi

$(HELPSOURCE)/vim.1 $(MACROSOURCE) $(TOOLSSOURCE):
diff --git a/src/auto/configure b/src/auto/configure
index 91b075d..ff3a63b 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -638,6 +638,8 @@ NARROW_PROTO
MOTIF_LIBNAME
GRESOURCE_OBJ
GRESOURCE_SRC
+UPDATE_DESKTOP_DATABASE
+GTK_UPDATE_ICON_CACHE
GLIB_COMPILE_RESOURCES
GNOME_INCLUDEDIR
GNOME_LIBDIR
@@ -828,6 +830,8 @@ enable_gtktest
with_gnome_includes
with_gnome_libs
with_gnome
+enable_icon_cache_update
+enable_desktop_database_update
with_motif_lib
with_tlib
enable_largefile
@@ -1488,6 +1492,8 @@ Optional Features:
--enable-nextaw-check If auto-select GUI, check for neXtaw default=yes
--enable-carbon-check If auto-select GUI, check for Carbon default=yes
--disable-gtktest Do not try to compile and run a test GTK program
+ --disable-icon-cache-update update disabled
+ --disable-desktop-database-update update disabled
--disable-largefile omit support for large files
--disable-acl Don't check for ACL support.
--disable-gpm Don't use gpm (Linux mouse daemon).
@@ -9351,8 +9357,134 @@ $as_echo "not usable." >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
$as_echo "cannot obtain from pkg_config." >&6; }
fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
+$as_echo_n "checking --disable-icon-cache-update argument... " >&6; }
+ # Check whether --enable-icon_cache_update was given.
+if test "${enable_icon_cache_update+set}" = set; then :
+ enableval=$enable_icon_cache_update;
+else
+ enable_icon_cache_update="yes"
+fi
+
+ if test "$enable_icon_cache_update" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
+$as_echo "not set" >&6; }
+ # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
+set dummy gtk-update-icon-cache; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GTK_UPDATE_ICON_CACHE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GTK_UPDATE_ICON_CACHE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
+ ;;
+esac
+fi
+GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
+if test -n "$GTK_UPDATE_ICON_CACHE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
+$as_echo "$GTK_UPDATE_ICON_CACHE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
+$as_echo "not found in PATH." >&6; }
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
+$as_echo "update disabled" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
+$as_echo_n "checking --disable-desktop-database-update argument... " >&6; }
+ # Check whether --enable-desktop_database_update was given.
+if test "${enable_desktop_database_update+set}" = set; then :
+ enableval=$enable_desktop_database_update;
+else
+ enable_desktop_database_update="yes"
fi

+ if test "$enable_desktop_database_update" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
+$as_echo "not set" >&6; }
+ # Extract the first word of "update-desktop-database", so it can be a program name with args.
+set dummy update-desktop-database; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $UPDATE_DESKTOP_DATABASE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
+ ;;
+esac
+fi
+UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
+if test -n "$UPDATE_DESKTOP_DATABASE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
+$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
+$as_echo "not found in PATH." >&6; }
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
+$as_echo "update disabled" >&6; }
+ fi
+fi
+
+
+



diff --git a/src/config.mk.in b/src/config.mk.in
index 1002d7c..90a3337 100644
--- a/src/config.mk.in
+++ b/src/config.mk.in
@@ -162,6 +162,9 @@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GRESOURCE_SRC = @GRESOURCE_SRC@
GRESOURCE_OBJ = @GRESOURCE_OBJ@

+GTK_UPDATE_ICON_CACHE = @GTK_UPDATE_ICON_CACHE@
+UPDATE_DESKTOP_DATABASE = @UPDATE_DESKTOP_DATABASE@
+
### Any OS dependent extra source and object file
OS_EXTRA_SRC = @OS_EXTRA_SRC@
OS_EXTRA_OBJ = @OS_EXTRA_OBJ@
diff --git a/src/configure.in b/src/configure.in
index 0a8c95b..279ed47 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -2688,10 +2688,42 @@ if test "x$GUITYPE" = "xGTK"; then
else
AC_MSG_RESULT([cannot obtain from pkg_config.])
fi
+
+ AC_MSG_CHECKING([--disable-icon-cache-update argument])
+ AC_ARG_ENABLE(icon_cache_update,
+ [ --disable-icon-cache-update update disabled],
+ [],
+ [enable_icon_cache_update="yes"])
+ if test "$enable_icon_cache_update" = "yes"; then
+ AC_MSG_RESULT([not set])
+ AC_PATH_PROG(GTK_UPDATE_ICON_CACHE,[gtk-update-icon-cache],no)
+ if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
+ AC_MSG_RESULT([not found in PATH.])
+ fi
+ else
+ AC_MSG_RESULT([update disabled])
+ fi
+
+ AC_MSG_CHECKING([--disable-desktop-database-update argument])
+ AC_ARG_ENABLE(desktop_database_update,
+ [ --disable-desktop-database-update update disabled],
+ [],
+ [enable_desktop_database_update="yes"])
+ if test "$enable_desktop_database_update" = "yes"; then
+ AC_MSG_RESULT([not set])
+ AC_PATH_PROG(UPDATE_DESKTOP_DATABASE,[update-desktop-database],no)
+ if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
+ AC_MSG_RESULT([not found in PATH.])
+ fi
+ else
+ AC_MSG_RESULT([update disabled])
+ fi
fi
AC_SUBST(GLIB_COMPILE_RESOURCES)
AC_SUBST(GRESOURCE_SRC)
AC_SUBST(GRESOURCE_OBJ)
+AC_SUBST(GTK_UPDATE_ICON_CACHE)
+AC_SUBST(UPDATE_DESKTOP_DATABASE)

dnl Check for Motif include files location.
dnl The LAST one found is used, this makes the highest version to be used,
diff --git a/src/version.c b/src/version.c
index 92bf726..1b15ded 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1767,
+/**/
1766,
/**/
1765,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:08 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit d106e5ba7f10f0d2a14eaefe5d78405044416cb9
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 19:38:07 2016 +0200

patch 7.4.1768
Problem: Arguments of setqflist() are not checked properly.
Solution: Add better checks, add a test. (Nikolai Pavlov, Hirohito Higashi,
closes #661)
---
src/eval.c | 14 ++++--
src/testdir/test_quickfix.vim | 102 ++++++++++++++++++++++++++++++++++++++----
src/version.c | 2 +
3 files changed, 107 insertions(+), 11 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 1daf042..b82a98f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -98,6 +98,7 @@ static char *e_listarg = N_("E686: Argument of %s must be a List");
static char *e_listdictarg = N_("E712: Argument of %s must be a List or Dictionary");
static char *e_listreq = N_("E714: List required");
static char *e_dictreq = N_("E715: Dictionary required");
+static char *e_stringreq = N_("E928: String required");
static char *e_toomanyarg = N_("E118: Too many arguments for function: %s");
static char *e_dictkey = N_("E716: Key not present in Dictionary: %s");
static char *e_funcexts = N_("E122: Function %s already exists, add ! to replace it");
@@ -18280,8 +18281,9 @@ set_qf_ll_list(
typval_T *rettv)
{
#ifdef FEAT_QUICKFIX
+ static char *e_invact = N_("E927: Invalid action: '%s'");
char_u *act;
- int action = ' ';
+ int action = 0;
#endif

rettv->vval.v_number = -1;
@@ -18298,11 +18300,17 @@ set_qf_ll_list(
act = get_tv_string_chk(action_arg);
if (act == NULL)
return; /* type error; errmsg already given */
- if (*act == 'a' || *act == 'r')
+ if ((*act == 'a' || *act == 'r' || *act == ' ') && act[1] == NUL)
action = *act;
+ else
+ EMSG2(_(e_invact), act);
}
+ else if (action_arg->v_type == VAR_UNKNOWN)
+ action = ' ';
+ else
+ EMSG(_(e_stringreq));

- if (l != NULL && set_errorlist(wp, l, action,
+ if (l != NULL && action && set_errorlist(wp, l, action,
(char_u *)(wp == NULL ? "setqflist()" : "setloclist()")) == OK)
rettv->vval.v_number = 0;
}
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 17b0763..e0da0d0 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -501,7 +501,7 @@ endfunction
function Test_locationlist_curwin_was_closed()
augroup testgroup
au!
- autocmd BufReadCmd t call R(expand("<amatch>"))
+ autocmd BufReadCmd test_curwin.txt call R(expand("<amatch>"))
augroup END

function! R(n)
@@ -510,7 +510,7 @@ function Test_locationlist_curwin_was_closed()

new
let q = []
- call add(q, {'filename': 't' })
+ call add(q, {'filename': 'test_curwin.txt' })
call setloclist(0, q)
call assert_fails('lrewind', 'E924:')

@@ -643,14 +643,14 @@ function XquickfixChangedByAutocmd(cchar)
let Xgetexpr = a:cchar . 'getexpr'
let Xrewind = a:cchar . 'rewind'
if a:cchar == 'c'
- let Xsetlist = 'setqflist('
+ let Xsetlist = function('setqflist')
let ErrorNr = 'E925'
function! ReadFunc()
colder
cgetexpr []
endfunc
else
- let Xsetlist = 'setloclist(0,'
+ let Xsetlist = function('setloclist', [0])
let ErrorNr = 'E926'
function! ReadFunc()
lolder
@@ -660,15 +660,15 @@ function XquickfixChangedByAutocmd(cchar)

augroup testgroup
au!
- autocmd BufReadCmd t call ReadFunc()
+ autocmd BufReadCmd test_changed.txt call ReadFunc()
augroup END

- bwipe!
+ new | only
let words = [ "a", "b" ]
let qflist = []
for word in words
- call add(qflist, {'filename': 't'})
- exec "call " . Xsetlist . "qflist, '')"
+ call add(qflist, {'filename': 'test_changed.txt'})
+ call Xsetlist(qflist, ' ')
endfor
exec "call assert_fails('" . Xrewind . "', '" . ErrorNr . ":')"

@@ -745,3 +745,89 @@ function Test_setqflist()

call delete('Xtestfile')
endfunction
+
+function! XquickfixSetListWithAct(cchar)
+ let Xolder = a:cchar . 'older'
+ let Xnewer = a:cchar . 'newer'
+ if a:cchar == 'c'
+ let Xsetlist = function('setqflist')
+ let Xgetlist = function('getqflist')
+ else
+ let Xsetlist = function('setloclist', [0])
+ let Xgetlist = function('getloclist', [0])
+ endif
+ let list1 = [{'filename': 'fnameA', 'text': 'A'},
+ \ {'filename': 'fnameB', 'text': 'B'}]
+ let list2 = [{'filename': 'fnameC', 'text': 'C'},
+ \ {'filename': 'fnameD', 'text': 'D'},
+ \ {'filename': 'fnameE', 'text': 'E'}]
+
+ " {action} is unspecified. Same as specifing ' '.
+ new | only
+ exec "silent! " . Xnewer . "99"
+ call Xsetlist(list1)
+ call Xsetlist(list2)
+ let li = Xgetlist()
+ call assert_equal(3, len(li))
+ call assert_equal('C', li[0]['text'])
+ call assert_equal('D', li[1]['text'])
+ call assert_equal('E', li[2]['text'])
+ exec "silent! " . Xolder
+ let li = Xgetlist()
+ call assert_equal(2, len(li))
+ call assert_equal('A', li[0]['text'])
+ call assert_equal('B', li[1]['text'])
+
+ " {action} is specified ' '.
+ new | only
+ exec "silent! " . Xnewer . "99"
+ call Xsetlist(list1)
+ call Xsetlist(list2, ' ')
+ let li = Xgetlist()
+ call assert_equal(3, len(li))
+ call assert_equal('C', li[0]['text'])
+ call assert_equal('D', li[1]['text'])
+ call assert_equal('E', li[2]['text'])
+ exec "silent! " . Xolder
+ let li = Xgetlist()
+ call assert_equal(2, len(li))
+ call assert_equal('A', li[0]['text'])
+ call assert_equal('B', li[1]['text'])
+
+ " {action} is specified 'a'.
+ new | only
+ exec "silent! " . Xnewer . "99"
+ call Xsetlist(list1)
+ call Xsetlist(list2, 'a')
+ let li = Xgetlist()
+ call assert_equal(5, len(li))
+ call assert_equal('A', li[0]['text'])
+ call assert_equal('B', li[1]['text'])
+ call assert_equal('C', li[2]['text'])
+ call assert_equal('D', li[3]['text'])
+ call assert_equal('E', li[4]['text'])
+
+ " {action} is specified 'r'.
+ new | only
+ exec "silent! " . Xnewer . "99"
+ call Xsetlist(list1)
+ call Xsetlist(list2, 'r')
+ let li = Xgetlist()
+ call assert_equal(3, len(li))
+ call assert_equal('C', li[0]['text'])
+ call assert_equal('D', li[1]['text'])
+ call assert_equal('E', li[2]['text'])
+
+ " Test for wrong value.
+ new | only
+ call assert_fails("call Xsetlist(0)", 'E714:')
+ call assert_fails("call Xsetlist(list1, '')", 'E927:')
+ call assert_fails("call Xsetlist(list1, 'aa')", 'E927:')
+ call assert_fails("call Xsetlist(list1, ' a')", 'E927:')
+ call assert_fails("call Xsetlist(list1, 0)", 'E928:')
+endfunc
+
+function Test_quickfix_set_list_with_act()
+ call XquickfixSetListWithAct('c')
+ call XquickfixSetListWithAct('l')
+endfunction
diff --git a/src/version.c b/src/version.c
index 1b15ded..9c03872 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1768,
+/**/
1767,
/**/
1766,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:08 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 6d4431e7b675ba7a0194c0b8eb84b7d92e4e7953
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 20:00:56 2016 +0200

patch 7.4.1769
Problem: No "closed", "errors" and "encoding" attribute on Python output.
Solution: Add attributes and more tests. (Roland Puntaier, closes #622)
---
src/if_py_both.h | 1 +
src/if_python.c | 5 ++++-
src/if_python3.c | 4 ++++
src/testdir/test86.in | 5 +++++
src/testdir/test86.ok | 7 ++++++-
src/testdir/test87.in | 5 +++++
src/testdir/test87.ok | 7 ++++++-
src/version.c | 2 ++
8 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/src/if_py_both.h b/src/if_py_both.h
index de3e868..a0385f9 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -503,6 +503,7 @@ static struct PyMethodDef OutputMethods[] = {
{"readable", (PyCFunction)AlwaysFalse, METH_NOARGS, ""},
{"seekable", (PyCFunction)AlwaysFalse, METH_NOARGS, ""},
{"writable", (PyCFunction)AlwaysTrue, METH_NOARGS, ""},
+ {"closed", (PyCFunction)AlwaysFalse, METH_NOARGS, ""},
{"__dir__", (PyCFunction)OutputDir, METH_NOARGS, ""},
{ NULL, NULL, 0, NULL}
};
diff --git a/src/if_python.c b/src/if_python.c
index a54a0e2..622634d 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -1195,7 +1195,10 @@ OutputGetattr(PyObject *self, char *name)
return PyInt_FromLong(((OutputObject *)(self))->softspace);
else if (strcmp(name, "__members__") == 0)
return ObjectDir(NULL, OutputAttrs);
-
+ else if (strcmp(name, "errors") == 0)
+ return PyString_FromString("strict");
+ else if (strcmp(name, "encoding") == 0)
+ return PyString_FromString(ENC_OPT);
return Py_FindMethod(OutputMethods, self, name);
}

diff --git a/src/if_python3.c b/src/if_python3.c
index d2f6066..10984cd 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1100,6 +1100,10 @@ OutputGetattro(PyObject *self, PyObject *nameobj)

if (strcmp(name, "softspace") == 0)
return PyLong_FromLong(((OutputObject *)(self))->softspace);
+ else if (strcmp(name, "errors") == 0)
+ return PyString_FromString("strict");
+ else if (strcmp(name, "encoding") == 0)
+ return PyString_FromString(ENC_OPT);

return PyObject_GenericGetAttr(self, nameobj);
}
diff --git a/src/testdir/test86.in b/src/testdir/test86.in
index 6f47ff6..71fe920 100644
--- a/src/testdir/test86.in
+++ b/src/testdir/test86.in
@@ -1289,6 +1289,11 @@ ee('assert sys.stdout.writable()==True')
ee('assert sys.stdout.readable()==False')
ee('assert sys.stderr.writable()==True')
ee('assert sys.stderr.readable()==False')
+ee('assert sys.stdout.closed()==False')
+ee('assert sys.stderr.closed()==False')
+ee('assert sys.stdout.errors=="strict"')
+ee('assert sys.stderr.errors=="strict"')
+ee('assert sys.stdout.encoding==sys.stderr.encoding')
ee('sys.stdout.write(None)')
cb.append(">> OutputWriteLines")
ee('sys.stdout.writelines(None)')
diff --git a/src/testdir/test86.ok b/src/testdir/test86.ok
index fe27c05..8529040 100644
--- a/src/testdir/test86.ok
+++ b/src/testdir/test86.ok
@@ -449,7 +449,7 @@ range:__dir__,__members__,append,end,start
dictionary:__dir__,__members__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
list:__dir__,__members__,extend,locked
function:__dir__,__members__,args,self,softspace
-output:__dir__,__members__,close,flush,isatty,readable,seekable,softspace,writable,write,writelines
+output:__dir__,__members__,close,closed,flush,isatty,readable,seekable,softspace,writable,write,writelines
{}
{'a': 1}
{'a': 1}
@@ -600,6 +600,11 @@ assert sys.stdout.writable()==True:NOT FAILED
assert sys.stdout.readable()==False:NOT FAILED
assert sys.stderr.writable()==True:NOT FAILED
assert sys.stderr.readable()==False:NOT FAILED
+assert sys.stdout.closed()==False:NOT FAILED
+assert sys.stderr.closed()==False:NOT FAILED
+assert sys.stdout.errors=="strict":NOT FAILED
+assert sys.stderr.errors=="strict":NOT FAILED
+assert sys.stdout.encoding==sys.stderr.encoding:NOT FAILED
sys.stdout.write(None):TypeError:('coercing to Unicode: need string or buffer, NoneType found',)
OutputWriteLines
sys.stdout.writelines(None):TypeError:("'NoneType' object is not iterable",)
diff --git a/src/testdir/test87.in b/src/testdir/test87.in
index e3bc994..0df002f 100644
--- a/src/testdir/test87.in
+++ b/src/testdir/test87.in
@@ -1283,6 +1283,11 @@ ee('assert sys.stdout.writable()==True')
ee('assert sys.stdout.readable()==False')
ee('assert sys.stderr.writable()==True')
ee('assert sys.stderr.readable()==False')
+ee('assert sys.stdout.closed()==False')
+ee('assert sys.stderr.closed()==False')
+ee('assert sys.stdout.errors=="strict"')
+ee('assert sys.stderr.errors=="strict"')
+ee('assert sys.stdout.encoding==sys.stderr.encoding')
ee('sys.stdout.write(None)')
cb.append(">> OutputWriteLines")
ee('sys.stdout.writelines(None)')
diff --git a/src/testdir/test87.ok b/src/testdir/test87.ok
index 25c0b51..10069b9 100644
--- a/src/testdir/test87.ok
+++ b/src/testdir/test87.ok
@@ -449,7 +449,7 @@ range:__dir__,append,end,start
dictionary:__dir__,get,has_key,items,keys,locked,pop,popitem,scope,update,values
list:__dir__,extend,locked
function:__dir__,args,self,softspace
-output:__dir__,close,flush,isatty,readable,seekable,softspace,writable,write,writelines
+output:__dir__,close,closed,flush,isatty,readable,seekable,softspace,writable,write,writelines
{}
{'a': 1}
{'a': 1}
@@ -600,6 +600,11 @@ assert sys.stdout.writable()==True:NOT FAILED
assert sys.stdout.readable()==False:NOT FAILED
assert sys.stderr.writable()==True:NOT FAILED
assert sys.stderr.readable()==False:NOT FAILED
+assert sys.stdout.closed()==False:NOT FAILED
+assert sys.stderr.closed()==False:NOT FAILED
+assert sys.stdout.errors=="strict":NOT FAILED
+assert sys.stderr.errors=="strict":NOT FAILED
+assert sys.stdout.encoding==sys.stderr.encoding:NOT FAILED
sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
OutputWriteLines
sys.stdout.writelines(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
diff --git a/src/version.c b/src/version.c
index 9c03872..4599f88 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1769,
+/**/
1768,
/**/
1767,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:09 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 8a633e3427b47286869aa4b96f2bfc1fe65b25cd
Author: Bram Moolenaar <***@vim.org>
Date: Thu Apr 21 21:10:14 2016 +0200

patch 7.4.1770
Problem: Cannot use true color in the terminal.
Solution: Add the 'guicolors' option. (Nikolai Pavlov)
---
runtime/doc/options.txt | 14 ++-
runtime/doc/term.txt | 22 +++-
runtime/doc/various.txt | 1 +
src/auto/configure | 18 +++
src/config.h.in | 3 +
src/configure.in | 9 ++
src/eval.c | 3 +
src/globals.h | 4 +
src/hardcopy.c | 6 +-
src/option.c | 24 +++-
src/option.h | 3 +
src/proto/term.pro | 5 +
src/screen.c | 100 ++++++++++++----
src/structs.h | 8 +-
src/syntax.c | 296 ++++++++++++++++++++++++++++++++++--------------
src/term.c | 208 +++++++++++++++++++++++++++++++++-
src/term.h | 8 +-
src/version.c | 7 ++
src/vim.h | 25 ++++
19 files changed, 644 insertions(+), 120 deletions(-)

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 80d2360..8310a68 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.4. Last change: 2016 Apr 20
+*options.txt* For Vim version 7.4. Last change: 2016 Apr 21


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3477,6 +3477,18 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

+ *'guicolors'* *'gcol'*
+'guicolors' 'gcol' boolean (default off)
+ global
+ {not in Vi}
+ {not available when compiled without the
+ |+termtruecolor| feature}
+ When on, uses |highlight-guifg| and |highlight-guibg| attributes in
+ the terminal (thus using 24-bit color). Requires a ISO-8613-3
+ compatible terminal.
+ If setting this option does not work (produces a colorless UI)
+ reading |xterm-true-color| might help.
+
*'guicursor'* *'gcr'* *E545* *E546* *E548* *E549*
'guicursor' 'gcr' string (default "n-v-c:block-Cursor/lCursor,
ve:ver35-Cursor,
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 4359764..0ac5b41 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -1,4 +1,4 @@
-*term.txt* For Vim version 7.4. Last change: 2015 Nov 24
+*term.txt* For Vim version 7.4. Last change: 2016 Apr 21


VIM REFERENCE MANUAL by Bram Moolenaar
@@ -303,6 +303,10 @@ Added by Vim (there are no standard codes for these):
see |'ambiwidth'|
t_RB request terminal background color *t_RB* *'t_RB'*
see |'ambiwidth'|
+ t_8f set foreground color (R, G, B) *t_8f* *'t_8f'*
+ |xterm-true-color|
+ t_8b set background color (R, G, B) *t_8b* *'t_8b'*
+ |xterm-true-color|

KEY CODES
Note: Use the <> form if possible
@@ -419,6 +423,22 @@ VT220, etc.). The result is that codes like <xF1> are no longer needed.
Note: This is only done on startup. If the xterm options are changed after
Vim has started, the escape sequences may not be recognized anymore.

+ *xterm-true-color*
+Vim supports using true colors in the terminal (taken from |highlight-guifg|
+and |highlight-guibg|), given that terminal supports this. To make this
+work, 'guicolors' option needs to be set.
+
+Sometimes setting 'guicolors' is not enough and one has to set the |t_8f| and
+|t_8b| options explicitly. Default values of these options are
+`^[[38;2;%lu;%lu;%lum` and `^[[48;2;%lu;%lu;%lum` (replace `^[` with real
+escape) respectively, but it is only set when `$TERM` is `xterm`. Some
+terminals accept the same sequences, but with all semicolons replaced by
+colons (this is actually more compatible, but less widely supported). These
+options contain printf strings, with |printf()| (actually, its C equivalent
+hence `l` modifier) invoked with the t_ option value and three unsigned long
+integers that may have any value between 0 and 255 (inclusive) representing
+red, green and blue colors respectively.
+
*xterm-resize*
Window resizing with xterm only works if the allowWindowOps resource is
enabled. On some systems and versions of xterm it's disabled by default
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 8e51005..b73949f 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -424,6 +424,7 @@ m *+tcl* Tcl interface |tcl|
m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
*+terminfo* uses |terminfo| instead of termcap
N *+termresponse* support for |t_RV| and |v:termresponse|
+m *+termtruecolor* 24-bit color in xterm-compatible terminals support
N *+textobjects* |text-objects| selection
*+tgetent* non-Unix only: able to use external termcap
N *+timers* the |timer_start()| function
diff --git a/src/auto/configure b/src/auto/configure
index ff3a63b..ba0d0b0 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -810,6 +810,7 @@ with_tclsh
enable_rubyinterp
with_ruby_command
enable_cscope
+enable_termtruecolor
enable_workshop
enable_netbeans
enable_channel
@@ -1476,6 +1477,7 @@ Optional Features:
--enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
--enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
--enable-cscope Include cscope interface.
+ --enable-termtruecolor Include support for 24-bit colors in ISO-8613-3 compatible terminals
--enable-workshop Include Sun Visual Workshop support.
--disable-netbeans Disable NetBeans integration support.
--disable-channel Disable process communication support.
@@ -7216,6 +7218,22 @@ if test "$enable_cscope" = "yes"; then

fi

+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-termtruecolor argument" >&5
+$as_echo_n "checking --enable-termtruecolor argument... " >&6; }
+# Check whether --enable-termtruecolor was given.
+if test "${enable_termtruecolor+set}" = set; then :
+ enableval=$enable_termtruecolor;
+else
+ enable_termtruecolor="no"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_termtruecolor" >&5
+$as_echo "$enable_termtruecolor" >&6; }
+if test "$enable_termtruecolor" = "yes"; then
+ $as_echo "#define FEAT_TERMTRUECOLOR 1" >>confdefs.h
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-workshop argument" >&5
$as_echo_n "checking --enable-workshop argument... " >&6; }
# Check whether --enable-workshop was given.
diff --git a/src/config.h.in b/src/config.h.in
index 9d35e48..6c0f779 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -362,6 +362,9 @@
/* Define for linking via dlopen() or LoadLibrary() */
#undef DYNAMIC_TCL

+/* Define if you want 24-bit colors in ISO-8613-3 compatible terminals. */
+#undef FEAT_TERMTRUECOLOR
+
/* Define if you want to add support for ACL */
#undef HAVE_POSIX_ACL
#undef HAVE_SOLARIS_ZFS_ACL
diff --git a/src/configure.in b/src/configure.in
index 279ed47..d1d7838 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1926,6 +1926,15 @@ if test "$enable_cscope" = "yes"; then
AC_DEFINE(FEAT_CSCOPE)
fi

+AC_MSG_CHECKING(--enable-termtruecolor argument)
+AC_ARG_ENABLE(termtruecolor,
+ [ --enable-termtruecolor Include support for 24-bit colors in ISO-8613-3 compatible terminals], ,
+ [enable_termtruecolor="no"])
+AC_MSG_RESULT($enable_termtruecolor)
+if test "$enable_termtruecolor" = "yes"; then
+ AC_DEFINE(FEAT_TERMTRUECOLOR)
+fi
+
AC_MSG_CHECKING(--enable-workshop argument)
AC_ARG_ENABLE(workshop,
[ --enable-workshop Include Sun Visual Workshop support.], ,
diff --git a/src/eval.c b/src/eval.c
index b82a98f..3542b77 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -14044,6 +14044,9 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_TERMRESPONSE
"termresponse",
#endif
+#ifdef FEAT_TERMTRUECOLOR
+ "termtruecolor",
+#endif
#ifdef FEAT_TEXTOBJ
"textobjects",
#endif
diff --git a/src/globals.h b/src/globals.h
index 5effdb5..8cc9bed 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -369,6 +369,10 @@ EXTERN char_u *use_gvimrc INIT(= NULL); /* "-U" cmdline argument */
EXTERN int cterm_normal_fg_color INIT(= 0);
EXTERN int cterm_normal_fg_bold INIT(= 0);
EXTERN int cterm_normal_bg_color INIT(= 0);
+#ifdef FEAT_TERMTRUECOLOR
+EXTERN long_u cterm_normal_fg_gui_color INIT(= INVALCOLOR);
+EXTERN long_u cterm_normal_bg_gui_color INIT(= INVALCOLOR);
+#endif

#ifdef FEAT_AUTOCMD
EXTERN int autocmd_busy INIT(= FALSE); /* Is apply_autocmds() busy? */
diff --git a/src/hardcopy.c b/src/hardcopy.c
index f65a6dd..aaa2010 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -164,7 +164,7 @@ parse_printoptions(void)

#if (defined(FEAT_MBYTE) && defined(FEAT_POSTSCRIPT)) || defined(PROTO)
/*
- * Parse 'printoptions' and set the flags in "printer_opts".
+ * Parse 'printmbfont' and set the flags in "mbfont_opts".
* Returns an error message or NULL;
*/
char_u *
@@ -307,8 +307,8 @@ prt_get_attr(
pattr->underline = (highlight_has_attr(hl_id, HL_UNDERLINE, modec) != NULL);
pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL);

-# ifdef FEAT_GUI
- if (gui.in_use)
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+ if (USE_24BIT)
{
bg_color = highlight_gui_color_rgb(hl_id, FALSE);
if (bg_color == PRCOLOR_BLACK)
diff --git a/src/option.c b/src/option.c
index a5b403c..da02864 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1305,7 +1305,16 @@ static struct vimoption options[] =
{(char_u *)NULL, (char_u *)0L}
#endif
SCRIPTID_INIT},
- {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ {"guicolors", "gcol", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+#ifdef FEAT_TERMTRUECOLOR
+ (char_u *)&p_guicolors, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+#else
+ (char_u*)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+#endif
+ SCRIPTID_INIT},
+ {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
#ifdef CURSOR_SHAPE
(char_u *)&p_guicursor, PV_NONE,
{
@@ -3011,6 +3020,8 @@ static struct vimoption options[] =
p_term("t_xs", T_XS)
p_term("t_ZH", T_CZH)
p_term("t_ZR", T_CZR)
+ p_term("t_8f", T_8F)
+ p_term("t_8b", T_8B)

/* terminal key codes are not in here */

@@ -8353,6 +8364,17 @@ set_bool_option(

#endif

+#ifdef FEAT_TERMTRUECOLOR
+ /* 'guicolors' */
+ else if ((int *)varp == &p_guicolors)
+ {
+# ifdef FEAT_GUI
+ if (!gui.in_use && !gui.starting)
+# endif
+ highlight_gui_started();
+ }
+#endif
+
/*
* End of handling side effects for bool options.
*/
diff --git a/src/option.h b/src/option.h
index cf7ba04..60889ab 100644
--- a/src/option.h
+++ b/src/option.h
@@ -527,6 +527,9 @@ EXTERN char_u *p_popt; /* 'printoptions' */
EXTERN char_u *p_header; /* 'printheader' */
#endif
EXTERN int p_prompt; /* 'prompt' */
+#ifdef FEAT_TERMTRUECOLOR
+EXTERN int p_guicolors; /* 'guicolors' */
+#endif
#ifdef FEAT_GUI
EXTERN char_u *p_guifont; /* 'guifont' */
# ifdef FEAT_XFONTSET
diff --git a/src/proto/term.pro b/src/proto/term.pro
index 5836979..cd2ca26 100644
--- a/src/proto/term.pro
+++ b/src/proto/term.pro
@@ -1,4 +1,7 @@
/* term.c */
+guicolor_T termtrue_mch_get_color(char_u *name);
+guicolor_T termtrue_get_color(char_u *name);
+long_u termtrue_mch_get_rgb(guicolor_T color);
int set_termname(char_u *term);
void set_mouse_termcode(int n, char_u *s);
void del_mouse_termcode(int n);
@@ -22,6 +25,8 @@ void term_set_winpos(int x, int y);
void term_set_winsize(int width, int height);
void term_fg_color(int n);
void term_bg_color(int n);
+void term_fg_rgb_color(long_u rgb);
+void term_bg_rgb_color(long_u rgb);
void term_settitle(char_u *title);
void ttest(int pairs);
void add_long_to_buf(long_u val, char_u *dst);
diff --git a/src/screen.c b/src/screen.c
index b92cbf9..5dc8ffe 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7828,7 +7828,7 @@ screen_start_highlight(int attr)
{
if (attr > HL_ALL) /* special HL attr. */
{
- if (t_colors > 1)
+ if (IS_CTERM)
aep = syn_cterm_attr2entry(attr);
else
aep = syn_term_attr2entry(attr);
@@ -7839,8 +7839,16 @@ screen_start_highlight(int attr)
}
if ((attr & HL_BOLD) && T_MD != NULL) /* bold */
out_str(T_MD);
- else if (aep != NULL && t_colors > 1 && aep->ae_u.cterm.fg_color
- && cterm_normal_fg_bold)
+ else if (aep != NULL && cterm_normal_fg_bold &&
+#ifdef FEAT_TERMTRUECOLOR
+ (p_guicolors ?
+ (aep->ae_u.cterm.fg_rgb != INVALCOLOR):
+#endif
+ (t_colors > 1 && aep->ae_u.cterm.fg_color)
+#ifdef FEAT_TERMTRUECOLOR
+ )
+#endif
+ )
/* If the Normal FG color has BOLD attribute and the new HL
* has a FG color defined, clear BOLD. */
out_str(T_ME);
@@ -7860,17 +7868,29 @@ screen_start_highlight(int attr)
*/
if (aep != NULL)
{
- if (t_colors > 1)
+#ifdef FEAT_TERMTRUECOLOR
+ if (p_guicolors)
{
- if (aep->ae_u.cterm.fg_color)
- term_fg_color(aep->ae_u.cterm.fg_color - 1);
- if (aep->ae_u.cterm.bg_color)
- term_bg_color(aep->ae_u.cterm.bg_color - 1);
+ if (aep->ae_u.cterm.fg_rgb != INVALCOLOR)
+ term_fg_rgb_color(aep->ae_u.cterm.fg_rgb);
+ if (aep->ae_u.cterm.bg_rgb != INVALCOLOR)
+ term_bg_rgb_color(aep->ae_u.cterm.bg_rgb);
}
else
+#endif
{
- if (aep->ae_u.term.start != NULL)
- out_str(aep->ae_u.term.start);
+ if (t_colors > 1)
+ {
+ if (aep->ae_u.cterm.fg_color)
+ term_fg_color(aep->ae_u.cterm.fg_color - 1);
+ if (aep->ae_u.cterm.bg_color)
+ term_bg_color(aep->ae_u.cterm.bg_color - 1);
+ }
+ else
+ {
+ if (aep->ae_u.term.start != NULL)
+ out_str(aep->ae_u.term.start);
+ }
}
}
}
@@ -7904,14 +7924,23 @@ screen_stop_highlight(void)
{
attrentry_T *aep;

- if (t_colors > 1)
+ if (IS_CTERM)
{
/*
* Assume that t_me restores the original colors!
*/
aep = syn_cterm_attr2entry(screen_attr);
- if (aep != NULL && (aep->ae_u.cterm.fg_color
- || aep->ae_u.cterm.bg_color))
+ if (aep != NULL &&
+#ifdef FEAT_TERMTRUECOLOR
+ (p_guicolors ?
+ (aep->ae_u.cterm.fg_rgb != INVALCOLOR ||
+ aep->ae_u.cterm.bg_rgb != INVALCOLOR):
+#endif
+ (aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color)
+#ifdef FEAT_TERMTRUECOLOR
+ )
+#endif
+ )
do_ME = TRUE;
}
else
@@ -7959,15 +7988,27 @@ screen_stop_highlight(void)
if (do_ME || (screen_attr & (HL_BOLD | HL_INVERSE)))
out_str(T_ME);

- if (t_colors > 1)
+#ifdef FEAT_TERMTRUECOLOR
+ if (p_guicolors)
{
- /* set Normal cterm colors */
- if (cterm_normal_fg_color != 0)
- term_fg_color(cterm_normal_fg_color - 1);
- if (cterm_normal_bg_color != 0)
- term_bg_color(cterm_normal_bg_color - 1);
- if (cterm_normal_fg_bold)
- out_str(T_MD);
+ if (cterm_normal_fg_gui_color != INVALCOLOR)
+ term_fg_rgb_color(cterm_normal_fg_gui_color);
+ if (cterm_normal_bg_gui_color != INVALCOLOR)
+ term_bg_rgb_color(cterm_normal_bg_gui_color);
+ }
+ else
+#endif
+ {
+ if (t_colors > 1)
+ {
+ /* set Normal cterm colors */
+ if (cterm_normal_fg_color != 0)
+ term_fg_color(cterm_normal_fg_color - 1);
+ if (cterm_normal_bg_color != 0)
+ term_bg_color(cterm_normal_bg_color - 1);
+ if (cterm_normal_fg_bold)
+ out_str(T_MD);
+ }
}
}
}
@@ -7981,10 +8022,17 @@ screen_stop_highlight(void)
void
reset_cterm_colors(void)
{
- if (t_colors > 1)
+ if (IS_CTERM)
{
/* set Normal cterm colors */
+#ifdef FEAT_TERMTRUECOLOR
+ if (p_guicolors ?
+ (cterm_normal_fg_gui_color != INVALCOLOR
+ || cterm_normal_bg_gui_color != INVALCOLOR):
+ (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
+#else
if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)
+#endif
{
out_str(T_OP);
screen_attr = -1;
@@ -8228,7 +8276,7 @@ screen_fill(
#ifdef FEAT_GUI
!gui.in_use &&
#endif
- t_colors <= 1);
+ !IS_CTERM);
for (row = start_row; row < end_row; ++row)
{
#ifdef FEAT_MBYTE
@@ -8911,6 +8959,9 @@ can_clear(char_u *p)
#ifdef FEAT_GUI
|| gui.in_use
#endif
+#ifdef FEAT_TERMTRUECOLOR
+ || (p_guicolors && cterm_normal_bg_gui_color != INVALCOLOR)
+#endif
|| cterm_normal_bg_color == 0 || *T_UT != NUL));
}

@@ -10242,6 +10293,9 @@ draw_tabline(void)
#ifdef FEAT_GUI
&& !gui.in_use
#endif
+#ifdef FEAT_TERMTRUECOLOR
+ && !p_guicolors
+#endif
);

redraw_tabline = FALSE;
diff --git a/src/structs.h b/src/structs.h
index adee3e8..1775256 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -84,7 +84,9 @@ typedef struct file_buffer buf_T; /* forward declaration */
# ifdef FEAT_XCLIPBOARD
# include <X11/Intrinsic.h>
# endif
-# define guicolor_T int /* avoid error in prototypes */
+# define guicolor_T long_u /* avoid error in prototypes and
+ * make FEAT_TERMTRUECOLOR work */
+# define INVALCOLOR ((guicolor_T)0x1ffffff)
#endif

/*
@@ -911,6 +913,10 @@ typedef struct attr_entry
/* These colors need to be > 8 bits to hold 256. */
short_u fg_color; /* foreground color number */
short_u bg_color; /* background color number */
+# ifdef FEAT_TERMTRUECOLOR
+ long_u fg_rgb; /* foreground color RGB */
+ long_u bg_rgb; /* background color RGB */
+# endif
} cterm;
# ifdef FEAT_GUI
struct
diff --git a/src/syntax.c b/src/syntax.c
index 31c1d0d..76a5976 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -33,10 +33,12 @@ struct hl_group
int sg_cterm_fg; /* terminal fg color number + 1 */
int sg_cterm_bg; /* terminal bg color number + 1 */
int sg_cterm_attr; /* Screen attr for color term mode */
-#ifdef FEAT_GUI
/* for when using the GUI */
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
guicolor_T sg_gui_fg; /* GUI foreground color handle */
guicolor_T sg_gui_bg; /* GUI background color handle */
+#endif
+#ifdef FEAT_GUI
guicolor_T sg_gui_sp; /* GUI special color handle */
GuiFont sg_font; /* GUI font handle */
#ifdef FEAT_XFONTSET
@@ -97,10 +99,12 @@ static int syn_list_header(int did_header, int outlen, int id);
static int hl_has_settings(int idx, int check_link);
static void highlight_clear(int idx);

-#ifdef FEAT_GUI
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
static void gui_do_one_color(int idx, int do_menu, int do_tooltip);
-static int set_group_colors(char_u *name, guicolor_T *fgp, guicolor_T *bgp, int do_menu, int use_norm, int do_tooltip);
static guicolor_T color_name2handle(char_u *name);
+#endif
+#ifdef FEAT_GUI
+static int set_group_colors(char_u *name, guicolor_T *fgp, guicolor_T *bgp, int do_menu, int use_norm, int do_tooltip);
static GuiFont font_name2handle(char_u *name);
# ifdef FEAT_XFONTSET
static GuiFontset fontset_name2handle(char_u *name, int fixed_width);
@@ -7333,8 +7337,8 @@ do_highlight(
for (idx = 0; idx < highlight_ga.ga_len; ++idx)
highlight_clear(idx);
init_highlight(TRUE, TRUE);
-#ifdef FEAT_GUI
- if (gui.in_use)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+ if (USE_24BIT)
highlight_gui_started();
#endif
highlight_changed();
@@ -7788,10 +7792,16 @@ do_highlight(
if (!init)
HL_TABLE()[idx].sg_set |= SG_GUI;

-# ifdef FEAT_GUI
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
/* In GUI guifg colors are only used when recognized */
i = color_name2handle(arg);
- if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
+ if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0
+# ifdef FEAT_GUI
+ || !(USE_24BIT)
+# else
+ || !p_guicolors
+# endif
+ )
{
HL_TABLE()[idx].sg_gui_fg = i;
# endif
@@ -7800,7 +7810,7 @@ do_highlight(
HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
else
HL_TABLE()[idx].sg_gui_fg_name = NULL;
-# ifdef FEAT_GUI
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
# ifdef FEAT_GUI_X11
if (is_menu_group)
gui.menu_fg_pixel = i;
@@ -7825,10 +7835,10 @@ do_highlight(
if (!init)
HL_TABLE()[idx].sg_set |= SG_GUI;

-# ifdef FEAT_GUI
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
/* In GUI guifg colors are only used when recognized */
i = color_name2handle(arg);
- if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
+ if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !USE_24BIT)
{
HL_TABLE()[idx].sg_gui_bg = i;
# endif
@@ -7837,7 +7847,7 @@ do_highlight(
HL_TABLE()[idx].sg_gui_bg_name = vim_strsave(arg);
else
HL_TABLE()[idx].sg_gui_bg_name = NULL;
-# ifdef FEAT_GUI
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
# ifdef FEAT_GUI_X11
if (is_menu_group)
gui.menu_bg_pixel = i;
@@ -7997,7 +8007,9 @@ do_highlight(
* Need to update all groups, because they might be using "bg"
* and/or "fg", which have been changed now.
*/
- if (gui.in_use)
+#endif
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+ if (USE_24BIT)
highlight_gui_started();
#endif
}
@@ -8068,6 +8080,10 @@ restore_cterm_colors(void)
cterm_normal_fg_color = 0;
cterm_normal_fg_bold = 0;
cterm_normal_bg_color = 0;
+# ifdef FEAT_TERMTRUECOLOR
+ cterm_normal_fg_gui_color = INVALCOLOR;
+ cterm_normal_bg_gui_color = INVALCOLOR;
+# endif
#endif
}

@@ -8118,9 +8134,11 @@ highlight_clear(int idx)
vim_free(HL_TABLE()[idx].sg_gui_sp_name);
HL_TABLE()[idx].sg_gui_sp_name = NULL;
#endif
-#ifdef FEAT_GUI
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
HL_TABLE()[idx].sg_gui_fg = INVALCOLOR;
HL_TABLE()[idx].sg_gui_bg = INVALCOLOR;
+#endif
+#ifdef FEAT_GUI
HL_TABLE()[idx].sg_gui_sp = INVALCOLOR;
gui_mch_free_font(HL_TABLE()[idx].sg_font);
HL_TABLE()[idx].sg_font = NOFONT;
@@ -8140,7 +8158,7 @@ highlight_clear(int idx)
#endif
}

-#if defined(FEAT_GUI) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
/*
* Set the normal foreground and background colors according to the "Normal"
* highlighting group. For X11 also set "Menu", "Scrollbar", and
@@ -8149,44 +8167,78 @@ highlight_clear(int idx)
void
set_normal_colors(void)
{
- if (set_group_colors((char_u *)"Normal",
- &gui.norm_pixel, &gui.back_pixel,
- FALSE, TRUE, FALSE))
- {
- gui_mch_new_colors();
- must_redraw = CLEAR;
- }
-#ifdef FEAT_GUI_X11
- if (set_group_colors((char_u *)"Menu",
- &gui.menu_fg_pixel, &gui.menu_bg_pixel,
- TRUE, FALSE, FALSE))
- {
-# ifdef FEAT_MENU
- gui_mch_new_menu_colors();
+#ifdef FEAT_GUI
+# ifdef FEAT_TERMTRUECOLOR
+ if (gui.in_use)
# endif
- must_redraw = CLEAR;
- }
-# ifdef FEAT_BEVAL
- if (set_group_colors((char_u *)"Tooltip",
- &gui.tooltip_fg_pixel, &gui.tooltip_bg_pixel,
- FALSE, FALSE, TRUE))
{
-# ifdef FEAT_TOOLBAR
- gui_mch_new_tooltip_colors();
+ if (set_group_colors((char_u *)"Normal",
+ &gui.norm_pixel, &gui.back_pixel,
+ FALSE, TRUE, FALSE))
+ {
+ gui_mch_new_colors();
+ must_redraw = CLEAR;
+ }
+# ifdef FEAT_GUI_X11
+ if (set_group_colors((char_u *)"Menu",
+ &gui.menu_fg_pixel, &gui.menu_bg_pixel,
+ TRUE, FALSE, FALSE))
+ {
+# ifdef FEAT_MENU
+ gui_mch_new_menu_colors();
+# endif
+ must_redraw = CLEAR;
+ }
+# ifdef FEAT_BEVAL
+ if (set_group_colors((char_u *)"Tooltip",
+ &gui.tooltip_fg_pixel, &gui.tooltip_bg_pixel,
+ FALSE, FALSE, TRUE))
+ {
+# ifdef FEAT_TOOLBAR
+ gui_mch_new_tooltip_colors();
+# endif
+ must_redraw = CLEAR;
+ }
+# endif
+ if (set_group_colors((char_u *)"Scrollbar",
+ &gui.scroll_fg_pixel, &gui.scroll_bg_pixel,
+ FALSE, FALSE, FALSE))
+ {
+ gui_new_scrollbar_colors();
+ must_redraw = CLEAR;
+ }
# endif
- must_redraw = CLEAR;
}
#endif
- if (set_group_colors((char_u *)"Scrollbar",
- &gui.scroll_fg_pixel, &gui.scroll_bg_pixel,
- FALSE, FALSE, FALSE))
+#ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_GUI
+ else
+# endif
{
- gui_new_scrollbar_colors();
- must_redraw = CLEAR;
+ int idx;
+
+ idx = syn_name2id((char_u *)"Normal") - 1;
+ if (idx >= 0)
+ {
+ gui_do_one_color(idx, FALSE, FALSE);
+
+ if (HL_TABLE()[idx].sg_gui_fg != INVALCOLOR)
+ {
+ cterm_normal_fg_gui_color = HL_TABLE()[idx].sg_gui_fg;
+ must_redraw = CLEAR;
+ }
+ if (HL_TABLE()[idx].sg_gui_bg != INVALCOLOR)
+ {
+ cterm_normal_bg_gui_color = HL_TABLE()[idx].sg_gui_bg;
+ must_redraw = CLEAR;
+ }
+ }
}
#endif
}
+#endif

+#if defined(FEAT_GUI) || defined(PROTO)
/*
* Set the colors for "Normal", "Menu", "Tooltip" or "Scrollbar".
*/
@@ -8299,24 +8351,6 @@ hl_set_fg_color_name(
}

/*
- * Return the handle for a color name.
- * Returns INVALCOLOR when failed.
- */
- static guicolor_T
-color_name2handle(char_u *name)
-{
- if (STRCMP(name, "NONE") == 0)
- return INVALCOLOR;
-
- if (STRICMP(name, "fg") == 0 || STRICMP(name, "foreground") == 0)
- return gui.norm_pixel;
- if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
- return gui.back_pixel;
-
- return gui_get_color(name);
-}
-
-/*
* Return the handle for a font name.
* Returns NOFONT when failed.
*/
@@ -8439,6 +8473,52 @@ hl_do_font(

#endif /* FEAT_GUI */

+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+/*
+ * Return the handle for a color name.
+ * Returns INVALCOLOR when failed.
+ */
+ static guicolor_T
+color_name2handle(char_u *name)
+{
+ if (STRCMP(name, "NONE") == 0)
+ return INVALCOLOR;
+
+ if (STRICMP(name, "fg") == 0 || STRICMP(name, "foreground") == 0)
+ {
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+ if (gui.in_use)
+#endif
+#ifdef FEAT_GUI
+ return gui.norm_pixel;
+#endif
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+ else
+#endif
+#ifdef FEAT_TERMTRUECOLOR
+ return cterm_normal_fg_gui_color;
+#endif
+ }
+ if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
+ {
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+ if (gui.in_use)
+#endif
+#ifdef FEAT_GUI
+ return gui.back_pixel;
+#endif
+#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+ else
+#endif
+#ifdef FEAT_TERMTRUECOLOR
+ return cterm_normal_bg_gui_color;
+#endif
+ }
+
+ return GUI_GET_COLOR(name);
+}
+#endif
+
/*
* Table with the specifications for an attribute number.
* Note that this table is used by ALL buffers. This is required because the
@@ -8514,8 +8594,15 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
&& aep->ae_u.cterm.fg_color
== taep->ae_u.cterm.fg_color
&& aep->ae_u.cterm.bg_color
- == taep->ae_u.cterm.bg_color)
- ))
+ == taep->ae_u.cterm.bg_color
+#ifdef FEAT_TERMTRUECOLOR
+ && aep->ae_u.cterm.fg_rgb
+ == taep->ae_u.cterm.fg_rgb
+ && aep->ae_u.cterm.bg_rgb
+ == taep->ae_u.cterm.bg_rgb
+#endif
+
+ )))

return i + ATTR_OFF;
}
@@ -8580,6 +8667,10 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
{
taep->ae_u.cterm.fg_color = aep->ae_u.cterm.fg_color;
taep->ae_u.cterm.bg_color = aep->ae_u.cterm.bg_color;
+#ifdef FEAT_TERMTRUECOLOR
+ taep->ae_u.cterm.fg_rgb = aep->ae_u.cterm.fg_rgb;
+ taep->ae_u.cterm.bg_rgb = aep->ae_u.cterm.bg_rgb;
+#endif
}
++table->ga_len;
return (table->ga_len - 1 + ATTR_OFF);
@@ -8671,7 +8762,7 @@ hl_combine_attr(int char_attr, int prim_attr)
}
#endif

- if (t_colors > 1)
+ if (IS_CTERM)
{
if (char_attr > HL_ALL)
char_aep = syn_cterm_attr2entry(char_attr);
@@ -8696,6 +8787,12 @@ hl_combine_attr(int char_attr, int prim_attr)
new_en.ae_u.cterm.fg_color = spell_aep->ae_u.cterm.fg_color;
if (spell_aep->ae_u.cterm.bg_color > 0)
new_en.ae_u.cterm.bg_color = spell_aep->ae_u.cterm.bg_color;
+#ifdef FEAT_TERMTRUECOLOR
+ if (spell_aep->ae_u.cterm.fg_rgb != INVALCOLOR)
+ new_en.ae_u.cterm.fg_rgb = spell_aep->ae_u.cterm.fg_rgb;
+ if (spell_aep->ae_u.cterm.bg_rgb != INVALCOLOR)
+ new_en.ae_u.cterm.bg_rgb = spell_aep->ae_u.cterm.bg_rgb;
+#endif
}
}
return get_attr_entry(&cterm_attr_table, &new_en);
@@ -8757,10 +8854,10 @@ syn_attr2attr(int attr)
aep = syn_gui_attr2entry(attr);
else
#endif
- if (t_colors > 1)
- aep = syn_cterm_attr2entry(attr);
- else
- aep = syn_term_attr2entry(attr);
+ if (IS_CTERM)
+ aep = syn_cterm_attr2entry(attr);
+ else
+ aep = syn_term_attr2entry(attr);

if (aep == NULL) /* highlighting not set */
return 0;
@@ -8959,13 +9056,15 @@ highlight_color(
return NULL;
if (modec == 'g')
{
-# ifdef FEAT_GUI
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# ifdef FEAT_GUI
/* return font name */
if (font)
return HL_TABLE()[id - 1].sg_font_name;
+# endif

/* return #RRGGBB form (only possible when GUI is running) */
- if (gui.in_use && what[2] == '#')
+ if ((USE_24BIT) && what[2] == '#')
{
guicolor_T color;
long_u rgb;
@@ -8974,19 +9073,23 @@ highlight_color(
if (fg)
color = HL_TABLE()[id - 1].sg_gui_fg;
else if (sp)
+# ifdef FEAT_GUI
color = HL_TABLE()[id - 1].sg_gui_sp;
+# else
+ color = INVALCOLOR;
+# endif
else
color = HL_TABLE()[id - 1].sg_gui_bg;
if (color == INVALCOLOR)
return NULL;
- rgb = gui_mch_get_rgb(color);
+ rgb = GUI_MCH_GET_RGB(color);
sprintf((char *)buf, "#%02x%02x%02x",
(unsigned)(rgb >> 16),
(unsigned)(rgb >> 8) & 255,
(unsigned)rgb & 255);
return buf;
}
-#endif
+# endif
if (fg)
return (HL_TABLE()[id - 1].sg_gui_fg_name);
if (sp)
@@ -9011,8 +9114,9 @@ highlight_color(
}
#endif

-#if (defined(FEAT_SYN_HL) && defined(FEAT_GUI) && defined(FEAT_PRINTER)) \
- || defined(PROTO)
+#if (defined(FEAT_SYN_HL) \
+ && (defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)) \
+ && defined(FEAT_PRINTER)) || defined(PROTO)
/*
* Return color name of highlight group "id" as RGB value.
*/
@@ -9034,7 +9138,7 @@ highlight_gui_color_rgb(
if (color == INVALCOLOR)
return 0L;

- return gui_mch_get_rgb(color);
+ return GUI_MCH_GET_RGB(color);
}
#endif

@@ -9150,13 +9254,22 @@ set_hl_attr(
* For the color term mode: If there are other than "normal"
* highlighting attributes, need to allocate an attr number.
*/
- if (sgp->sg_cterm_fg == 0 && sgp->sg_cterm_bg == 0)
+ if (sgp->sg_cterm_fg == 0 && sgp->sg_cterm_bg == 0
+# ifdef FEAT_TERMTRUECOLOR
+ && sgp->sg_gui_fg == INVALCOLOR
+ && sgp->sg_gui_bg == INVALCOLOR
+# endif
+ )
sgp->sg_cterm_attr = sgp->sg_cterm;
else
{
at_en.ae_attr = sgp->sg_cterm;
at_en.ae_u.cterm.fg_color = sgp->sg_cterm_fg;
at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg;
+# ifdef FEAT_TERMTRUECOLOR
+ at_en.ae_u.cterm.fg_rgb = GUI_MCH_GET_RGB(sgp->sg_gui_fg);
+ at_en.ae_u.cterm.bg_rgb = GUI_MCH_GET_RGB(sgp->sg_gui_bg);
+# endif
sgp->sg_cterm_attr = get_attr_entry(&cterm_attr_table, &at_en);
}
}
@@ -9307,10 +9420,12 @@ syn_add_group(char_u *name)
vim_memset(&(HL_TABLE()[highlight_ga.ga_len]), 0, sizeof(struct hl_group));
HL_TABLE()[highlight_ga.ga_len].sg_name = name;
HL_TABLE()[highlight_ga.ga_len].sg_name_u = vim_strsave_up(name);
-#ifdef FEAT_GUI
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
HL_TABLE()[highlight_ga.ga_len].sg_gui_bg = INVALCOLOR;
HL_TABLE()[highlight_ga.ga_len].sg_gui_fg = INVALCOLOR;
+# ifdef FEAT_GUI
HL_TABLE()[highlight_ga.ga_len].sg_gui_sp = INVALCOLOR;
+# endif
#endif
++highlight_ga.ga_len;

@@ -9349,7 +9464,7 @@ syn_id2attr(int hl_id)
attr = sgp->sg_gui_attr;
else
#endif
- if (t_colors > 1)
+ if (IS_CTERM)
attr = sgp->sg_cterm_attr;
else
attr = sgp->sg_term_attr;
@@ -9403,7 +9518,7 @@ syn_get_final_id(int hl_id)
return hl_id;
}

-#ifdef FEAT_GUI
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
/*
* Call this function just after the GUI has started.
* It finds the font and color handles for the highlighting groups.
@@ -9414,7 +9529,12 @@ highlight_gui_started(void)
int idx;

/* First get the colors from the "Normal" and "Menu" group, if set */
- set_normal_colors();
+# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# ifdef FEAT_TERMTRUECOLOR
+ if (USE_24BIT)
+# endif
+ set_normal_colors();
+# endif

for (idx = 0; idx < highlight_ga.ga_len; ++idx)
gui_do_one_color(idx, FALSE, FALSE);
@@ -9430,12 +9550,17 @@ gui_do_one_color(
{
int didit = FALSE;

- if (HL_TABLE()[idx].sg_font_name != NULL)
- {
- hl_do_font(idx, HL_TABLE()[idx].sg_font_name, FALSE, do_menu,
+# ifdef FEAT_GUI
+# ifdef FEAT_TERMTRUECOLOR
+ if (gui.in_use)
+# endif
+ if (HL_TABLE()[idx].sg_font_name != NULL)
+ {
+ hl_do_font(idx, HL_TABLE()[idx].sg_font_name, FALSE, do_menu,
do_tooltip, TRUE);
- didit = TRUE;
- }
+ didit = TRUE;
+ }
+# endif
if (HL_TABLE()[idx].sg_gui_fg_name != NULL)
{
HL_TABLE()[idx].sg_gui_fg =
@@ -9448,16 +9573,17 @@ gui_do_one_color(
color_name2handle(HL_TABLE()[idx].sg_gui_bg_name);
didit = TRUE;
}
+# ifdef FEAT_GUI
if (HL_TABLE()[idx].sg_gui_sp_name != NULL)
{
HL_TABLE()[idx].sg_gui_sp =
color_name2handle(HL_TABLE()[idx].sg_gui_sp_name);
didit = TRUE;
}
+# endif
if (didit) /* need to get a new attr number */
set_hl_attr(idx);
}
-
#endif

/*
diff --git a/src/term.c b/src/term.c
index f6f8eae..82f8012 100644
--- a/src/term.c
+++ b/src/term.c
@@ -77,6 +77,9 @@ struct builtin_term
static struct builtin_term *find_builtin_term(char_u *name);
static void parse_builtin_tcap(char_u *s);
static void term_color(char_u *s, int n);
+#ifdef FEAT_TERMTRUECOLOR
+static void term_rgb_color(char_u *s, long_u rgb);
+#endif
static void gather_termleader(void);
#ifdef FEAT_TERMRESPONSE
static void req_codes_from_term(void);
@@ -382,9 +385,9 @@ static struct builtin_term builtin_termcaps[] =
# else
{(int)KS_CRI, "\033[%dC"},
# endif
-#if defined(BEOS_DR8)
+# if defined(BEOS_DR8)
{(int)KS_DB, ""}, /* hack! see screen.c */
-#endif
+# endif

{K_UP, "\033[A"},
{K_DOWN, "\033[B"},
@@ -790,8 +793,10 @@ static struct builtin_term builtin_termcaps[] =
# endif
# endif

-# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) || defined(__EMX__)
+# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) || defined(__EMX__) || defined(FEAT_TERMTRUECOLOR)
{(int)KS_NAME, "xterm"},
+# endif
+# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) || defined(__EMX__)
{(int)KS_CE, IF_EB("\033[K", ESC_STR "[K")},
{(int)KS_AL, IF_EB("\033[L", ESC_STR "[L")},
# ifdef TERMINFO
@@ -939,6 +944,10 @@ static struct builtin_term builtin_termcaps[] =
{TERMCAP2KEY('F', 'Q'), IF_EB("\033[57;*~", ESC_STR "[57;*~")}, /* F36 */
{TERMCAP2KEY('F', 'R'), IF_EB("\033[58;*~", ESC_STR "[58;*~")}, /* F37 */
# endif
+# ifdef FEAT_TERMTRUECOLOR
+ {(int)KS_8F, IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR "[38;2;%lu;%lu;%lum")},
+ {(int)KS_8B, IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR "[48;2;%lu;%lu;%lum")},
+# endif

# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS)
/*
@@ -1257,6 +1266,171 @@ static struct builtin_term builtin_termcaps[] =

}; /* end of builtin_termcaps */

+#if defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+# define RGB(r, g, b) ((r<<16) | (g<<8) | (b))
+struct rgbcolor_table_S {
+ char_u *color_name;
+ guicolor_T color;
+};
+static struct rgbcolor_table_S rgb_table[] = {
+ {(char_u *)"black", RGB(0x00, 0x00, 0x00)},
+ {(char_u *)"blue", RGB(0x00, 0x00, 0xD4)},
+ {(char_u *)"brown", RGB(0x80, 0x40, 0x40)},
+ {(char_u *)"cyan", RGB(0x02, 0xAB, 0xEA)},
+ {(char_u *)"darkblue", RGB(0x00, 0x00, 0x80)},
+ {(char_u *)"darkcyan", RGB(0x00, 0x80, 0x80)},
+ {(char_u *)"darkgray", RGB(0x80, 0x80, 0x80)},
+ {(char_u *)"darkgreen", RGB(0x00, 0x80, 0x00)},
+ {(char_u *)"darkgrey", RGB(0x80, 0x80, 0x80)},
+ {(char_u *)"darkmagenta", RGB(0x80, 0x00, 0x80)},
+ {(char_u *)"darkred", RGB(0x80, 0x00, 0x00)},
+ {(char_u *)"darkyellow", RGB(0xBB, 0xBB, 0x00)},
+ {(char_u *)"gray", RGB(0xC0, 0xC0, 0xC0)},
+ {(char_u *)"gray10", RGB(0x1A, 0x1A, 0x1A)},
+ {(char_u *)"gray20", RGB(0x33, 0x33, 0x33)},
+ {(char_u *)"gray30", RGB(0x4D, 0x4D, 0x4D)},
+ {(char_u *)"gray40", RGB(0x66, 0x66, 0x66)},
+ {(char_u *)"gray50", RGB(0x7F, 0x7F, 0x7F)},
+ {(char_u *)"gray60", RGB(0x99, 0x99, 0x99)},
+ {(char_u *)"gray70", RGB(0xB3, 0xB3, 0xB3)},
+ {(char_u *)"gray80", RGB(0xCC, 0xCC, 0xCC)},
+ {(char_u *)"gray90", RGB(0xE5, 0xE5, 0xE5)},
+ {(char_u *)"green", RGB(0x00, 0x64, 0x11)},
+ {(char_u *)"grey", RGB(0xC0, 0xC0, 0xC0)},
+ {(char_u *)"grey10", RGB(0x1A, 0x1A, 0x1A)},
+ {(char_u *)"grey20", RGB(0x33, 0x33, 0x33)},
+ {(char_u *)"grey30", RGB(0x4D, 0x4D, 0x4D)},
+ {(char_u *)"grey40", RGB(0x66, 0x66, 0x66)},
+ {(char_u *)"grey50", RGB(0x7F, 0x7F, 0x7F)},
+ {(char_u *)"grey60", RGB(0x99, 0x99, 0x99)},
+ {(char_u *)"grey70", RGB(0xB3, 0xB3, 0xB3)},
+ {(char_u *)"grey80", RGB(0xCC, 0xCC, 0xCC)},
+ {(char_u *)"grey90", RGB(0xE5, 0xE5, 0xE5)},
+ {(char_u *)"lightblue", RGB(0xA0, 0xA0, 0xFF)},
+ {(char_u *)"lightcyan", RGB(0xA0, 0xFF, 0xFF)},
+ {(char_u *)"lightgray", RGB(0xE0, 0xE0, 0xE0)},
+ {(char_u *)"lightgreen", RGB(0xA0, 0xFF, 0xA0)},
+ {(char_u *)"lightgrey", RGB(0xE0, 0xE0, 0xE0)},
+ {(char_u *)"lightmagenta",RGB(0xF0, 0xA0, 0xF0)},
+ {(char_u *)"lightred", RGB(0xFF, 0xA0, 0xA0)},
+ {(char_u *)"lightyellow", RGB(0xFF, 0xFF, 0xA0)},
+ {(char_u *)"magenta", RGB(0xF2, 0x08, 0x84)},
+ {(char_u *)"orange", RGB(0xFC, 0x80, 0x00)},
+ {(char_u *)"purple", RGB(0xA0, 0x20, 0xF0)},
+ {(char_u *)"red", RGB(0xDD, 0x08, 0x06)},
+ {(char_u *)"seagreen", RGB(0x2E, 0x8B, 0x57)},
+ {(char_u *)"slateblue", RGB(0x6A, 0x5A, 0xCD)},
+ {(char_u *)"violet", RGB(0x8D, 0x38, 0xC9)},
+ {(char_u *)"white", RGB(0xFF, 0xFF, 0xFF)},
+ {(char_u *)"yellow", RGB(0xFC, 0xF3, 0x05)},
+};
+
+ static int
+hex_digit(int c)
+{
+ if (isdigit(c))
+ return c - '0';
+ c = TOLOWER_ASC(c);
+ if (c >= 'a' && c <= 'f')
+ return c - 'a' + 10;
+ return 0x1ffffff;
+}
+
+ guicolor_T
+termtrue_mch_get_color(char_u *name)
+{
+ guicolor_T color;
+ int i;
+
+ if (*name == '#' && strlen((char *) name) == 7)
+ {
+ color = RGB(((hex_digit(name[1])<<4) + hex_digit(name[2])),
+ ((hex_digit(name[3])<<4) + hex_digit(name[4])),
+ ((hex_digit(name[5])<<4) + hex_digit(name[6])));
+ if (color > 0xffffff)
+ return INVALCOLOR;
+ return color;
+ }
+ else
+ {
+ /* Check if the name is one of the colors we know */
+ for (i = 0; i < sizeof(rgb_table) / sizeof(rgb_table[0]); i++)
+ if (STRICMP(name, rgb_table[i].color_name) == 0)
+ return rgb_table[i].color;
+ }
+
+ /*
+ * Last attempt. Look in the file "$VIM/rgb.txt".
+ */
+ {
+#define LINE_LEN 100
+ FILE *fd;
+ char line[LINE_LEN];
+ char_u *fname;
+ int r, g, b;
+
+ fname = expand_env_save((char_u *)"$VIMRUNTIME/rgb.txt");
+ if (fname == NULL)
+ return INVALCOLOR;
+
+ fd = fopen((char *)fname, "rt");
+ vim_free(fname);
+ if (fd == NULL)
+ return INVALCOLOR;
+
+ while (!feof(fd))
+ {
+ int len;
+ int pos;
+ char *color;
+
+ fgets(line, LINE_LEN, fd);
+ len = strlen(line);
+
+ if (len <= 1 || line[len-1] != '\n')
+ continue;
+
+ line[len-1] = '\0';
+
+ i = sscanf(line, "%d %d %d %n", &r, &g, &b, &pos);
+ if (i != 3)
+ continue;
+
+ color = line + pos;
+
+ if (STRICMP(color, name) == 0)
+ {
+ fclose(fd);
+ return (guicolor_T) RGB(r, g, b);
+ }
+ }
+ fclose(fd);
+ }
+
+ return INVALCOLOR;
+}
+
+ guicolor_T
+termtrue_get_color(char_u *name)
+{
+ guicolor_T t;
+
+ if (*name == NUL)
+ return INVALCOLOR;
+ t = termtrue_mch_get_color(name);
+
+ if (t == INVALCOLOR)
+ EMSG2(_("E254: Cannot allocate color %s"), name);
+ return t;
+}
+
+ long_u
+termtrue_mch_get_rgb(guicolor_T color)
+{
+ return (long_u) color;
+}
+#endif
+
/*
* DEFAULT_TERM is used, when no terminal is specified with -T option or $TERM.
*/
@@ -1512,6 +1686,7 @@ set_termname(char_u *term)
{KS_CWP, "WP"}, {KS_CWS, "WS"},
{KS_CSI, "SI"}, {KS_CEI, "EI"},
{KS_U7, "u7"}, {KS_RBG, "RB"},
+ {KS_8F, "8f"}, {KS_8B, "8b"},
{(enum SpecialKey)0, NULL}
};

@@ -2608,6 +2783,33 @@ term_color(char_u *s, int n)
OUT_STR(tgoto((char *)s, 0, n));
}

+#if defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+ void
+term_fg_rgb_color(long_u rgb)
+{
+ term_rgb_color(T_8F, rgb);
+}
+
+ void
+term_bg_rgb_color(long_u rgb)
+{
+ term_rgb_color(T_8B, rgb);
+}
+
+#define RED(rgb) ((rgb>>16)&0xFF)
+#define GREEN(rgb) ((rgb>> 8)&0xFF)
+#define BLUE(rgb) ((rgb )&0xFF)
+
+ static void
+term_rgb_color(char_u *s, long_u rgb)
+{
+ char buf[7+3*3+2+1+1];
+
+ sprintf(buf, (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
+ OUT_STR(buf);
+}
+#endif
+
#if (defined(FEAT_TITLE) && (defined(UNIX) || defined(VMS) \
|| defined(MACOS_X))) || defined(PROTO)
/*
diff --git a/src/term.h b/src/term.h
index 4e28486..4a7391c 100644
--- a/src/term.h
+++ b/src/term.h
@@ -87,10 +87,12 @@ enum SpecialKey
KS_CSV, /* scroll region vertical */
#endif
KS_OP, /* original color pair */
- KS_U7 /* request cursor position */
+ KS_U7, /* request cursor position */
+ KS_8F, /* set foreground color (RGB) */
+ KS_8B /* set background color (RGB) */
};

-#define KS_LAST KS_U7
+#define KS_LAST KS_8B

/*
* the terminal capabilities are stored in this array
@@ -166,6 +168,8 @@ extern char_u *(term_strings[]); /* current terminal strings */
#define T_RBG (term_str(KS_RBG)) /* request background RGB */
#define T_OP (term_str(KS_OP)) /* original color pair */
#define T_U7 (term_str(KS_U7)) /* request cursor position */
+#define T_8F (term_str(KS_8F)) /* set foreground color (RGB) */
+#define T_8B (term_str(KS_8B)) /* set background color (RGB) */

#define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */
#define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */
diff --git a/src/version.c b/src/version.c
index 4599f88..bb32541 100644
--- a/src/version.c
+++ b/src/version.c
@@ -621,6 +621,11 @@ static char *(features[]) =
#else
"-termresponse",
#endif
+#ifdef FEAT_TERMTRUECOLOR
+ "+termtruecolor",
+#else
+ "-termtruecolor",
+#endif
#ifdef FEAT_TEXTOBJ
"+textobjects",
#else
@@ -749,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1770,
+/**/
1769,
/**/
1768,
diff --git a/src/vim.h b/src/vim.h
index 9e2ab21..f503ebf 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1558,6 +1558,31 @@ typedef UINT32_TYPEDEF UINT32_T;
#define MSG_PUTS_LONG(s) msg_puts_long_attr((char_u *)(s), 0)
#define MSG_PUTS_LONG_ATTR(s, a) msg_puts_long_attr((char_u *)(s), (a))

+#ifdef FEAT_GUI
+# ifdef FEAT_TERMTRUECOLOR
+# define GUI_FUNCTION(f) (gui.in_use ? gui_##f : termtrue_##f)
+# define USE_24BIT (gui.in_use || p_guicolors)
+# else
+# define GUI_FUNCTION(f) gui_##f
+# define USE_24BIT gui.in_use
+# endif
+#else
+# ifdef FEAT_TERMTRUECOLOR
+# define GUI_FUNCTION(f) termtrue_##f
+# define USE_24BIT p_guicolors
+# endif
+#endif
+#ifdef FEAT_TERMTRUECOLOR
+# define IS_CTERM (t_colors > 1 || p_guicolors)
+#else
+# define IS_CTERM (t_colors > 1)
+#endif
+#ifdef GUI_FUNCTION
+# define GUI_MCH_GET_RGB GUI_FUNCTION(mch_get_rgb)
+# define GUI_MCH_GET_COLOR GUI_FUNCTION(mch_get_color)
+# define GUI_GET_COLOR GUI_FUNCTION(get_color)
+#endif
+
/* Prefer using emsg3(), because perror() may send the output to the wrong
* destination and mess up the screen. */
#ifdef HAVE_STRERROR
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:09 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 21decdd3e6d5ce3469a3c2743de1f4aada388d8c
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 10:00:58 2016 +0200

patch 7.4.1771
Problem: Warning for unused variable.
Solution: Add #ifdef. (John Marriott)
---
src/eval.c | 2 ++
src/version.c | 2 ++
2 files changed, 4 insertions(+)

diff --git a/src/eval.c b/src/eval.c
index 3542b77..e771291 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -98,7 +98,9 @@ static char *e_listarg = N_("E686: Argument of %s must be a List");
static char *e_listdictarg = N_("E712: Argument of %s must be a List or Dictionary");
static char *e_listreq = N_("E714: List required");
static char *e_dictreq = N_("E715: Dictionary required");
+#ifdef FEAT_QUICKFIX
static char *e_stringreq = N_("E928: String required");
+#endif
static char *e_toomanyarg = N_("E118: Too many arguments for function: %s");
static char *e_dictkey = N_("E716: Key not present in Dictionary: %s");
static char *e_funcexts = N_("E122: Function %s already exists, add ! to replace it");
diff --git a/src/version.c b/src/version.c
index bb32541..725d774 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1771,
+/**/
1770,
/**/
1769,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:09 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 54a38415caa31de8b4ac46a9234ae339b1fd6255
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 10:14:07 2016 +0200

patch 7.4.1772
Problem: Installation fails when $GTK_UPDATE_ICON_CACHE is empty.
Solution: Add quotes. (Kazunobu Kuriyama)
---
src/Makefile | 4 ++--
src/version.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 69e3a4b..716dae7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2363,7 +2363,7 @@ install-icons:
if test -d $(ICON48PATH) -a -w $(ICON48PATH) \
-a ! -f $(ICON48PATH)/gvim.png; then \
$(INSTALL_DATA) $(SCRIPTSOURCE)/vim48x48.png $(ICON48PATH)/gvim.png; \
- if test -z "$(DESTDIR)" -a -x $(GTK_UPDATE_ICON_CACHE) \
+ if test -z "$(DESTDIR)" -a -x "$(GTK_UPDATE_ICON_CACHE)" \
-a -w $(ICONTHEMEPATH) \
-a -f $(ICONTHEMEPATH)/index.theme; then \
$(GTK_UPDATE_ICON_CACHE) -q $(ICONTHEMEPATH); \
@@ -2381,7 +2381,7 @@ install-icons:
$(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \
$(SCRIPTSOURCE)/gvim.desktop \
$(DESKTOPPATH); \
- if test -z "$(DESTDIR)" -a -x $(UPDATE_DESKTOP_DATABASE); then \
+ if test -z "$(DESTDIR)" -a -x "$(UPDATE_DESKTOP_DATABASE)"; then \
$(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \
fi \
fi
diff --git a/src/version.c b/src/version.c
index 725d774..77d0117 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1772,
+/**/
1771,
/**/
1770,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:09 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 380130f1e18da92a44372728fe044f56db58585b
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 11:24:43 2016 +0200

patch 7.4.1773
Problem: Compiler warnings. (Dominique Pelle)
Solution: Add UNUSED. Add type cast. Avoid a buffer overflow.
---
src/syntax.c | 4 ++--
src/term.c | 11 +++++++----
src/version.c | 2 ++
3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/syntax.c b/src/syntax.c
index 76a5976..9e2971e 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -9545,8 +9545,8 @@ highlight_gui_started(void)
static void
gui_do_one_color(
int idx,
- int do_menu, /* TRUE: might set the menu font */
- int do_tooltip) /* TRUE: might set the tooltip font */
+ int do_menu UNUSED, /* TRUE: might set the menu font */
+ int do_tooltip UNUSED) /* TRUE: might set the tooltip font */
{
int didit = FALSE;

diff --git a/src/term.c b/src/term.c
index 82f8012..d85cd53 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1272,6 +1272,7 @@ struct rgbcolor_table_S {
char_u *color_name;
guicolor_T color;
};
+
static struct rgbcolor_table_S rgb_table[] = {
{(char_u *)"black", RGB(0x00, 0x00, 0x00)},
{(char_u *)"blue", RGB(0x00, 0x00, 0xD4)},
@@ -1354,7 +1355,7 @@ termtrue_mch_get_color(char_u *name)
else
{
/* Check if the name is one of the colors we know */
- for (i = 0; i < sizeof(rgb_table) / sizeof(rgb_table[0]); i++)
+ for (i = 0; i < (int)(sizeof(rgb_table) / sizeof(rgb_table[0])); i++)
if (STRICMP(name, rgb_table[i].color_name) == 0)
return rgb_table[i].color;
}
@@ -1384,7 +1385,7 @@ termtrue_mch_get_color(char_u *name)
int pos;
char *color;

- fgets(line, LINE_LEN, fd);
+ ignored = fgets(line, LINE_LEN, fd);
len = strlen(line);

if (len <= 1 || line[len-1] != '\n')
@@ -2803,9 +2804,11 @@ term_bg_rgb_color(long_u rgb)
static void
term_rgb_color(char_u *s, long_u rgb)
{
- char buf[7+3*3+2+1+1];
+#define MAX_COLOR_STR_LEN 100
+ char buf[MAX_COLOR_STR_LEN];

- sprintf(buf, (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
+ vim_snprintf(buf, MAX_KEY_CODE_LEN,
+ (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
OUT_STR(buf);
}
#endif
diff --git a/src/version.c b/src/version.c
index 77d0117..51b45c2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1773,
+/**/
1772,
/**/
1771,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:09 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 902647d2dfb42dce8449dfbbc22dab27a528744d
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 11:49:06 2016 +0200

patch 7.4.1774
Problem: Cterm true color feature has warnings.
Solution: Add type casts.
---
src/screen.c | 20 ++++++++++----------
src/syntax.c | 4 ++--
src/term.c | 7 ++-----
src/version.c | 2 ++
4 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/src/screen.c b/src/screen.c
index 5dc8ffe..ee348e9 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7842,7 +7842,7 @@ screen_start_highlight(int attr)
else if (aep != NULL && cterm_normal_fg_bold &&
#ifdef FEAT_TERMTRUECOLOR
(p_guicolors ?
- (aep->ae_u.cterm.fg_rgb != INVALCOLOR):
+ (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR):
#endif
(t_colors > 1 && aep->ae_u.cterm.fg_color)
#ifdef FEAT_TERMTRUECOLOR
@@ -7871,9 +7871,9 @@ screen_start_highlight(int attr)
#ifdef FEAT_TERMTRUECOLOR
if (p_guicolors)
{
- if (aep->ae_u.cterm.fg_rgb != INVALCOLOR)
+ if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR)
term_fg_rgb_color(aep->ae_u.cterm.fg_rgb);
- if (aep->ae_u.cterm.bg_rgb != INVALCOLOR)
+ if (aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR)
term_bg_rgb_color(aep->ae_u.cterm.bg_rgb);
}
else
@@ -7933,8 +7933,8 @@ screen_stop_highlight(void)
if (aep != NULL &&
#ifdef FEAT_TERMTRUECOLOR
(p_guicolors ?
- (aep->ae_u.cterm.fg_rgb != INVALCOLOR ||
- aep->ae_u.cterm.bg_rgb != INVALCOLOR):
+ (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR ||
+ aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR):
#endif
(aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color)
#ifdef FEAT_TERMTRUECOLOR
@@ -7991,9 +7991,9 @@ screen_stop_highlight(void)
#ifdef FEAT_TERMTRUECOLOR
if (p_guicolors)
{
- if (cterm_normal_fg_gui_color != INVALCOLOR)
+ if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR)
term_fg_rgb_color(cterm_normal_fg_gui_color);
- if (cterm_normal_bg_gui_color != INVALCOLOR)
+ if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
term_bg_rgb_color(cterm_normal_bg_gui_color);
}
else
@@ -8027,8 +8027,8 @@ reset_cterm_colors(void)
/* set Normal cterm colors */
#ifdef FEAT_TERMTRUECOLOR
if (p_guicolors ?
- (cterm_normal_fg_gui_color != INVALCOLOR
- || cterm_normal_bg_gui_color != INVALCOLOR):
+ (cterm_normal_fg_gui_color != (long_u)INVALCOLOR
+ || cterm_normal_bg_gui_color != (long_u)INVALCOLOR):
(cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
#else
if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)
@@ -8960,7 +8960,7 @@ can_clear(char_u *p)
|| gui.in_use
#endif
#ifdef FEAT_TERMTRUECOLOR
- || (p_guicolors && cterm_normal_bg_gui_color != INVALCOLOR)
+ || (p_guicolors && cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
#endif
|| cterm_normal_bg_color == 0 || *T_UT != NUL));
}
diff --git a/src/syntax.c b/src/syntax.c
index 9e2971e..ea4e74c 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -8788,9 +8788,9 @@ hl_combine_attr(int char_attr, int prim_attr)
if (spell_aep->ae_u.cterm.bg_color > 0)
new_en.ae_u.cterm.bg_color = spell_aep->ae_u.cterm.bg_color;
#ifdef FEAT_TERMTRUECOLOR
- if (spell_aep->ae_u.cterm.fg_rgb != INVALCOLOR)
+ if (spell_aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR)
new_en.ae_u.cterm.fg_rgb = spell_aep->ae_u.cterm.fg_rgb;
- if (spell_aep->ae_u.cterm.bg_rgb != INVALCOLOR)
+ if (spell_aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR)
new_en.ae_u.cterm.bg_rgb = spell_aep->ae_u.cterm.bg_rgb;
#endif
}
diff --git a/src/term.c b/src/term.c
index d85cd53..29b48e9 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1383,9 +1383,8 @@ termtrue_mch_get_color(char_u *name)
{
int len;
int pos;
- char *color;

- ignored = fgets(line, LINE_LEN, fd);
+ (void)fgets(line, LINE_LEN, fd);
len = strlen(line);

if (len <= 1 || line[len-1] != '\n')
@@ -1397,9 +1396,7 @@ termtrue_mch_get_color(char_u *name)
if (i != 3)
continue;

- color = line + pos;
-
- if (STRICMP(color, name) == 0)
+ if (STRICMP(line + pos, name) == 0)
{
fclose(fd);
return (guicolor_T) RGB(r, g, b);
diff --git a/src/version.c b/src/version.c
index 51b45c2..3c5f94e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1774,
+/**/
1773,
/**/
1772,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:09 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 763b684373bf5954445d8d8d99da1e39a4fc5105
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 12:24:52 2016 +0200

patch 7.4.1775
Problem: The rgb.txt file is not installed.
Solution: Install the file. (Christian Brabandt)
---
src/Makefile | 6 ++++++
src/version.c | 2 ++
2 files changed, 8 insertions(+)

diff --git a/src/Makefile b/src/Makefile
index 716dae7..f0f892b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1076,6 +1076,9 @@ SYS_DELMENU_FILE = $(DESTDIR)$(SCRIPTLOC)/delmenu.vim
### Name of the bugreport file target.
SYS_BUGR_FILE = $(DESTDIR)$(SCRIPTLOC)/bugreport.vim

+### Name of the rgb.txt file target.
+SYS_RGB_FILE = $(DESTDIR)$(SCRIPTLOC)/rgb.txt
+
### Name of the file type detection file target.
SYS_FILETYPE_FILE = $(DESTDIR)$(SCRIPTLOC)/filetype.vim

@@ -2167,6 +2170,9 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \
chmod $(VIMSCRIPTMOD) $(MSWIN_FILE)
$(INSTALL_DATA) $(SCRIPTSOURCE)/evim.vim $(EVIM_FILE)
chmod $(VIMSCRIPTMOD) $(EVIM_FILE)
+# install the rgb.txt file
+ $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(SYS_RGB_FILE)
+ chmod $(VIMSCRIPTMOD) $(SYS_RGB_FILE)
# install the bugreport file
$(INSTALL_DATA) $(SCRIPTSOURCE)/bugreport.vim $(SYS_BUGR_FILE)
chmod $(VIMSCRIPTMOD) $(SYS_BUGR_FILE)
diff --git a/src/version.c b/src/version.c
index 3c5f94e..2d0abeb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1775,
+/**/
1774,
/**/
1773,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:10 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit a1c487eef71d1673e57511453009de9cb4c9af51
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 20:20:19 2016 +0200

patch 7.4.1776
Problem: Using wrong buffer length.
Solution: use the right name. (Kazunobu Kuriyama)
---
src/term.c | 2 +-
src/version.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/term.c b/src/term.c
index 29b48e9..059aed7 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2804,7 +2804,7 @@ term_rgb_color(char_u *s, long_u rgb)
#define MAX_COLOR_STR_LEN 100
char buf[MAX_COLOR_STR_LEN];

- vim_snprintf(buf, MAX_KEY_CODE_LEN,
+ vim_snprintf(buf, MAX_COLOR_STR_LEN,
(char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
OUT_STR(buf);
}
diff --git a/src/version.c b/src/version.c
index 2d0abeb..1c35576 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1776,
+/**/
1775,
/**/
1774,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:10 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 3849992b16011e36a5cb5be4b127f843389b96fd
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 20:46:52 2016 +0200

patch 7.4.1777
Problem: Newly added features can escape the sandbox.
Solution: Add checks for restricted and secure. (Yasuhiro Matsumoto)
---
src/eval.c | 8 ++++++--
src/version.c | 2 ++
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index e771291..146348d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -10408,6 +10408,8 @@ f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
f_ch_open(typval_T *argvars, typval_T *rettv)
{
rettv->v_type = VAR_CHANNEL;
+ if (check_restricted() || check_secure())
+ return;
rettv->vval.v_channel = channel_open_func(argvars);
}

@@ -15078,6 +15080,8 @@ f_job_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
f_job_start(typval_T *argvars, typval_T *rettv)
{
rettv->v_type = VAR_JOB;
+ if (check_restricted() || check_secure())
+ return;
rettv->vval.v_job = job_start(argvars);
}

@@ -16821,8 +16825,6 @@ check_connection(void)
#endif

#ifdef FEAT_CLIENTSERVER
-static void remote_common(typval_T *argvars, typval_T *rettv, int expr);
-
static void
remote_common(typval_T *argvars, typval_T *rettv, int expr)
{
@@ -20683,6 +20685,8 @@ f_timer_start(typval_T *argvars, typval_T *rettv)
char_u *callback;
dict_T *dict;

+ if (check_secure())
+ return;
if (argvars[2].v_type != VAR_UNKNOWN)
{
if (argvars[2].v_type != VAR_DICT
diff --git a/src/version.c b/src/version.c
index 1c35576..34b5f4c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1777,
+/**/
1776,
/**/
1775,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:10 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit b2fa54a84078e2b8dc3c7c7bfbccf6b75c0788d0
Author: Bram Moolenaar <***@vim.org>
Date: Fri Apr 22 21:11:09 2016 +0200

patch 7.4.1778
Problem: When using the term truecolor feature, the t_8f and t_8b termcap
options are not set by default.
Solution: Move the values to before BT_EXTRA_KEYS. (Christian Brabandt)
---
src/term.c | 13 ++++++-------
src/version.c | 2 ++
2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/term.c b/src/term.c
index 059aed7..34549b1 100644
--- a/src/term.c
+++ b/src/term.c
@@ -793,10 +793,8 @@ static struct builtin_term builtin_termcaps[] =
# endif
# endif

-# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) || defined(__EMX__) || defined(FEAT_TERMTRUECOLOR)
- {(int)KS_NAME, "xterm"},
-# endif
# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) || defined(__EMX__)
+ {(int)KS_NAME, "xterm"},
{(int)KS_CE, IF_EB("\033[K", ESC_STR "[K")},
{(int)KS_AL, IF_EB("\033[L", ESC_STR "[L")},
# ifdef TERMINFO
@@ -861,6 +859,11 @@ static struct builtin_term builtin_termcaps[] =
{(int)KS_CRV, IF_EB("\033[>c", ESC_STR "[>c")},
{(int)KS_RBG, IF_EB("\033]11;?\007", ESC_STR "]11;?\007")},
{(int)KS_U7, IF_EB("\033[6n", ESC_STR "[6n")},
+# ifdef FEAT_TERMTRUECOLOR
+ /* These are printf strings, not terminal codes. */
+ {(int)KS_8F, IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR "[38;2;%lu;%lu;%lum")},
+ {(int)KS_8B, IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR "[48;2;%lu;%lu;%lum")},
+# endif

{K_UP, IF_EB("\033O*A", ESC_STR "O*A")},
{K_DOWN, IF_EB("\033O*B", ESC_STR "O*B")},
@@ -944,10 +947,6 @@ static struct builtin_term builtin_termcaps[] =
{TERMCAP2KEY('F', 'Q'), IF_EB("\033[57;*~", ESC_STR "[57;*~")}, /* F36 */
{TERMCAP2KEY('F', 'R'), IF_EB("\033[58;*~", ESC_STR "[58;*~")}, /* F37 */
# endif
-# ifdef FEAT_TERMTRUECOLOR
- {(int)KS_8F, IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR "[38;2;%lu;%lu;%lum")},
- {(int)KS_8B, IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR "[48;2;%lu;%lu;%lum")},
-# endif

# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS)
/*
diff --git a/src/version.c b/src/version.c
index 34b5f4c..9aa400e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1778,
+/**/
1777,
/**/
1776,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:10 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 73dfe917ba6357413aaf98a021c91add5ac6e9bc
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 23 13:54:48 2016 +0200

patch 7.4.1779
Problem: Using negative index in strcharpart(). (Yegappan Lakshmanan)
Solution: Assume single byte when using a negative iindex.
---
src/eval.c | 7 ++++++-
src/version.c | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/eval.c b/src/eval.c
index 146348d..a3fe2a2 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -19774,7 +19774,12 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
charlen = get_tv_number(&argvars[2]);
while (charlen > 0 && nbyte + len < slen)
{
- len += mb_char2len(p[nbyte + len]);
+ int off = nbyte + len;
+
+ if (off < 0)
+ len += 1;
+ else
+ len += mb_char2len(p[off]);
--charlen;
}
}
diff --git a/src/version.c b/src/version.c
index 9aa400e..adbb46a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1779,
+/**/
1778,
/**/
1777,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:10 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit dc633cf82758f67f656cda7fa8ccc30414ee53f8
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 23 14:33:19 2016 +0200

patch 7.4.1780
Problem: Warnings reported by cppcheck.
Solution: Fix the warnings. (Dominique Pelle)
---
src/ex_cmds2.c | 3 +--
src/json.c | 2 +-
src/misc1.c | 2 +-
src/ops.c | 2 +-
src/regexp_nfa.c | 17 ++++++++++-------
src/version.c | 2 ++
6 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 657c772..4ddfbe4 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -335,9 +335,8 @@ do_debug(char_u *cmd)
get_maxbacktrace_level(void)
{
char *p, *q;
- int maxbacktrace = 1;
+ int maxbacktrace = 0;

- maxbacktrace = 0;
if (sourcing_name != NULL)
{
p = (char *)sourcing_name;
diff --git a/src/json.c b/src/json.c
index b4ebe74..aa168ec 100644
--- a/src/json.c
+++ b/src/json.c
@@ -539,7 +539,6 @@ json_decode_string(js_read_T *reader, typval_T *res)
char_u *p;
int c;
long nr;
- char_u buf[NUMBUFLEN];

if (res != NULL)
ga_init2(&ga, 1, 200);
@@ -617,6 +616,7 @@ json_decode_string(js_read_T *reader, typval_T *res)
if (res != NULL)
{
#ifdef FEAT_MBYTE
+ char_u buf[NUMBUFLEN];
buf[utf_char2bytes((int)nr, buf)] = NUL;
ga_concat(&ga, buf);
#else
diff --git a/src/misc1.c b/src/misc1.c
index ddd9a07..9fa8578 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1197,7 +1197,7 @@ open_line(
int i;
int l;

- for (i = 0; p[i] != NUL && i < lead_len; i += l)
+ for (i = 0; i < lead_len && p[i] != NUL; i += l)
{
l = (*mb_ptr2len)(p + i);
if (vim_strnsize(p, i + l) > repl_size)
diff --git a/src/ops.c b/src/ops.c
index 0584877..983d9d0 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5709,7 +5709,7 @@ do_addsub(
if (buf1 == NULL)
goto theend;
ptr = buf1;
- if (negative && (!visual || (visual && was_positive)))
+ if (negative && (!visual || was_positive))
{
*ptr++ = '-';
}
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 6d06a12..5e073ee 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -5515,14 +5515,9 @@ nfa_regmatch(
int add_off = 0;
int toplevel = start->c == NFA_MOPEN;
#ifdef NFA_REGEXP_DEBUG_LOG
- FILE *debug = fopen(NFA_REGEXP_DEBUG_LOG, "a");
-
- if (debug == NULL)
- {
- EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG);
- return FALSE;
- }
+ FILE *debug;
#endif
+
/* Some patterns may take a long time to match, especially when using
* recursive_regmatch(). Allow interrupting them with CTRL-C. */
fast_breakcheck();
@@ -5533,6 +5528,14 @@ nfa_regmatch(
return FALSE;
#endif

+#ifdef NFA_REGEXP_DEBUG_LOG
+ debug = fopen(NFA_REGEXP_DEBUG_LOG, "a");
+ if (debug == NULL)
+ {
+ EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG);
+ return FALSE;
+ }
+#endif
nfa_match = FALSE;

/* Allocate memory for the lists of nodes. */
diff --git a/src/version.c b/src/version.c
index adbb46a..4bd5f7e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1780,
+/**/
1779,
/**/
1778,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:10 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit da5b3dcf06a3af5b398450258be32b0416451a9b
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 23 15:19:02 2016 +0200

patch 7.4.1781
Problem: synIDattr() does not respect 'guicolors'.
Solution: Change the conditition for the mode. (Christian Brabandt)
---
src/eval.c | 4 ++--
src/version.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index a3fe2a2..b3ebbd7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -20019,8 +20019,8 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
}
else
{
-#ifdef FEAT_GUI
- if (gui.in_use)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+ if (USE_24BIT)
modec = 'g';
else
#endif
diff --git a/src/version.c b/src/version.c
index 4bd5f7e..2ae156c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1781,
+/**/
1780,
/**/
1779,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:11 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit fca66003053f8c0da5161d1fe4b75b3a389934b5
Author: Bram Moolenaar <***@vim.org>
Date: Sat Apr 23 15:30:09 2016 +0200

patch 7.4.1782
Problem: strcharpart() does not work properly with some multi-byte
characters.
Solution: Use mb_cptr2len() instead of mb_char2len(). (Hirohito Higashi)
---
src/eval.c | 4 ++--
src/testdir/test_expr_utf8.vim | 10 ++++++++++
src/version.c | 2 ++
3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index b3ebbd7..63ff2a0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -19764,7 +19764,7 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
if (nchar > 0)
while (nchar > 0 && nbyte < slen)
{
- nbyte += mb_char2len(p[nbyte]);
+ nbyte += mb_cptr2len(p + nbyte);
--nchar;
}
else
@@ -19779,7 +19779,7 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
if (off < 0)
len += 1;
else
- len += mb_char2len(p[off]);
+ len += mb_cptr2len(p + off);
--charlen;
}
}
diff --git a/src/testdir/test_expr_utf8.vim b/src/testdir/test_expr_utf8.vim
index c512ddf..e8246ef 100644
--- a/src/testdir/test_expr_utf8.vim
+++ b/src/testdir/test_expr_utf8.vim
@@ -23,6 +23,16 @@ func Test_strcharpart()
call assert_equal('á', strcharpart('áxb', 0, 1))
call assert_equal('x', strcharpart('áxb', 1, 1))

+ call assert_equal('いうeお', strcharpart('あいうeお', 1))
+ call assert_equal('い', strcharpart('あいうeお', 1, 1))
+ call assert_equal('いう', strcharpart('あいうeお', 1, 2))
+ call assert_equal('いうe', strcharpart('あいうeお', 1, 3))
+ call assert_equal('いうeお', strcharpart('あいうeお', 1, 4))
+ call assert_equal('eお', strcharpart('あいうeお', 3))
+ call assert_equal('e', strcharpart('あいうeお', 3, 1))
+
+ call assert_equal('あ', strcharpart('あいうeお', -3, 4))
+
call assert_equal('a', strcharpart('àxb', 0, 1))
call assert_equal('̀', strcharpart('àxb', 1, 1))
call assert_equal('x', strcharpart('àxb', 2, 1))
diff --git a/src/version.c b/src/version.c
index 2ae156c..09372ef 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1782,
+/**/
1781,
/**/
1780,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
James McCoy
2016-05-06 04:00:11 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit af98a49dd0ef1661b4998f118151fddbf6e4df75
Author: Bram Moolenaar <***@vim.org>
Date: Sun Apr 24 14:40:12 2016 +0200

patch 7.4.1783
Problem: The old regexp engine doesn't handle character classes correctly.
(Manuel Ortega)
Solution: Use regmbc() instead of regc(). Add a test.
---
src/regexp.c | 20 +++++++-------
src/testdir/test_regexp_utf8.vim | 56 ++++++++++++++++++++++++++++++++++++++++
src/version.c | 2 ++
3 files changed, 68 insertions(+), 10 deletions(-)

diff --git a/src/regexp.c b/src/regexp.c
index fada9fe..733d564 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2544,12 +2544,12 @@ collection:
case CLASS_ALNUM:
for (cu = 1; cu <= 255; cu++)
if (isalnum(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_ALPHA:
for (cu = 1; cu <= 255; cu++)
if (isalpha(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_BLANK:
regc(' ');
@@ -2558,32 +2558,32 @@ collection:
case CLASS_CNTRL:
for (cu = 1; cu <= 255; cu++)
if (iscntrl(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_DIGIT:
for (cu = 1; cu <= 255; cu++)
if (VIM_ISDIGIT(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_GRAPH:
for (cu = 1; cu <= 255; cu++)
if (isgraph(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_LOWER:
for (cu = 1; cu <= 255; cu++)
if (MB_ISLOWER(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_PRINT:
for (cu = 1; cu <= 255; cu++)
if (vim_isprintc(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_PUNCT:
for (cu = 1; cu <= 255; cu++)
if (ispunct(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_SPACE:
for (cu = 9; cu <= 13; cu++)
@@ -2593,12 +2593,12 @@ collection:
case CLASS_UPPER:
for (cu = 1; cu <= 255; cu++)
if (MB_ISUPPER(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_XDIGIT:
for (cu = 1; cu <= 255; cu++)
if (vim_isxdigit(cu))
- regc(cu);
+ regmbc(cu);
break;
case CLASS_TAB:
regc('\t');
diff --git a/src/testdir/test_regexp_utf8.vim b/src/testdir/test_regexp_utf8.vim
index f5d7ec9..cef2436 100644
--- a/src/testdir/test_regexp_utf8.vim
+++ b/src/testdir/test_regexp_utf8.vim
@@ -33,3 +33,59 @@ func Test_equivalence_re2()
set re=2
call s:equivalence_test()
endfunc
+
+func s:classes_test()
+ call assert_equal('Motörhead', matchstr('Motörhead', '[[:print:]]\+'))
+
+ let alphachars = ''
+ let lowerchars = ''
+ let upperchars = ''
+ let alnumchars = ''
+ let printchars = ''
+ let punctchars = ''
+ let xdigitchars = ''
+ let i = 1
+ while i <= 255
+ let c = nr2char(i)
+ if c =~ '[[:alpha:]]'
+ let alphachars .= c
+ endif
+ if c =~ '[[:lower:]]'
+ let lowerchars .= c
+ endif
+ if c =~ '[[:upper:]]'
+ let upperchars .= c
+ endif
+ if c =~ '[[:alnum:]]'
+ let alnumchars .= c
+ endif
+ if c =~ '[[:print:]]'
+ let printchars .= c
+ endif
+ if c =~ '[[:punct:]]'
+ let punctchars .= c
+ endif
+ if c =~ '[[:xdigit:]]'
+ let xdigitchars .= c
+ endif
+ let i += 1
+ endwhile
+
+ call assert_equal('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', alphachars)
+ call assert_equal('abcdefghijklmnopqrstuvwxyzµßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ', lowerchars)
+ call assert_equal('ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ', upperchars)
+ call assert_equal('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', alnumchars)
+ call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ', printchars)
+ call assert_equal('!"#$%&''()*+,-./:;<=>?@[\]^_`{|}~', punctchars)
+ call assert_equal('0123456789ABCDEFabcdef', xdigitchars)
+endfunc
+
+func Test_classes_re1()
+ set re=1
+ call s:classes_test()
+endfunc
+
+func Test_classes_re2()
+ set re=2
+ call s:classes_test()
+endfunc
diff --git a/src/version.c b/src/version.c
index 09372ef..a4f3252 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1783,
+/**/
1782,
/**/
1781,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
Loading...