Justin M. Keyes | 5 Aug 01:56 2015
Picon

Update filetype.vim for Git 2.5 worktrees

Via John Whitley:

Git 2.5 adds a new command git worktree, providing first-class
support for multiple working directories (aka worktrees) per
repository. An update to filetype.vim is needed the gitcommit filetype
paths for the new secondary worktree locations. See diff below.

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 71d6b0b..dc11c79 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
 <at>  <at>  -774,6 +774,8  <at>  <at>  au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
 " Git
 au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
 au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit
+au BufNewFile,BufRead *.git/worktrees/*/COMMIT_EDITMSG setf gitcommit
+au BufNewFile,BufRead *.git/worktrees/*/MERGE_MSG setf gitcommit
 au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
 au BufNewFile,BufRead *.git/modules/*/COMMIT_EDITMSG setf gitcommit
 au BufNewFile,BufRead *.git/modules/*/config setf gitconfig

Justin M. Keyes

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
(Continue reading)

Olaf Dabrunz | 4 Aug 22:46 2015

[patch] Literal matching of buffer names in bufnr()

There is no simple way to prepare a file name parameter for bufnr() so
that it reliably finds a specific buffer.

The file name can contain file-pattern characters that can lead to more
than one match, or a match attempt in buflist_findpat() can find a match
on the wrong buffer.

    :let buf = bufnr('[my]_testfile')

    can match           does not match

        m_testfile          [my]_testfile
        y_testfile

According to ':he bufname()', to force a single full match, embed the
filename in '^' and '$'.  Also, the file-pattern characters and special
characters need to be escaped:

    :let buf = bufnr('^'. escape(fname, '*?\,{}[]^$%#') .'$')

But for some character combinations, the escaped characters do not match:

    :echo '^'. escape('test\{,}name', '*?\,{}[]^$%#') .'$'
        ^test\\\{\,\}name$

In the escaped filename, '\\\{\,\}' is treated as the file-pattern
'\\\{n,m\}', equivalent to '\{n,m}' in a regex (':he file-pattern').

But the '\,' in the middle is syntactically incorrect, and the whole
pattern is rejected.  A literal match also fails.  Unless a buffer named
(Continue reading)

Bram Moolenaar | 4 Aug 22:03 2015
Picon
Picon

Patch 7.4.811


Patch 7.4.811
Problem:    Invalid memory access when using "exe 'sc'".
Solution:   Avoid going over the end of the string. (Dominique Pelle)
Files:      src/ex_docmd.c

*** ../vim-7.4.810/src/ex_docmd.c	2015-07-28 14:25:41.848151118 +0200
--- src/ex_docmd.c	2015-08-04 22:01:59.955636265 +0200
***************
*** 3129,3136 ****
  	++p;
      }
      else if (p[0] == 's'
! 	    && ((p[1] == 'c' && p[2] != 's' && p[2] != 'r'
! 						&& p[3] != 'i' && p[4] != 'p')
  		|| p[1] == 'g'
  		|| (p[1] == 'i' && p[2] != 'm' && p[2] != 'l' && p[2] != 'g')
  		|| p[1] == 'I'
--- 3129,3136 ----
  	++p;
      }
      else if (p[0] == 's'
! 	    && ((p[1] == 'c' && (p[2] == NUL || (p[2] != 's' && p[2] != 'r'
! 			&& (p[3] == NUL || (p[3] != 'i' && p[4] != 'p')))))
  		|| p[1] == 'g'
  		|| (p[1] == 'i' && p[2] != 'm' && p[2] != 'l' && p[2] != 'g')
  		|| p[1] == 'I'
*** ../vim-7.4.810/src/version.c	2015-08-04 21:51:20.522881723 +0200
--- src/version.c	2015-08-04 22:01:29.395985096 +0200
***************
(Continue reading)

Bram Moolenaar | 4 Aug 21:52 2015
Picon
Picon

Patch 7.4.810


Patch 7.4.810
Problem:    With a sequence of commands using buffers in diff mode E749 is
            given. (itchyny)
Solution:   Skip unloaded buffer. (Hirohito Higashi)
Files:      src/diff.c

*** ../vim-7.4.809/src/diff.c	2015-07-03 15:06:49.714360608 +0200
--- src/diff.c	2015-08-04 21:30:25.100999807 +0200
***************
*** 804,811 ****
      for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
      {
  	buf = curtab->tp_diffbuf[idx_new];
! 	if (buf == NULL)
! 	    continue;
  	if (diff_write(buf, tmp_new) == FAIL)
  	    continue;
  	diff_file(tmp_orig, tmp_new, tmp_diff);
--- 804,811 ----
      for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
      {
  	buf = curtab->tp_diffbuf[idx_new];
! 	if (buf == NULL || buf->b_ml.ml_mfp == NULL)
! 	    continue; /* skip buffer that isn't loaded */
  	if (diff_write(buf, tmp_new) == FAIL)
  	    continue;
  	diff_file(tmp_orig, tmp_new, tmp_diff);
*** ../vim-7.4.809/src/version.c	2015-08-04 21:27:02.767279357 +0200
--- src/version.c	2015-08-04 21:32:41.559463140 +0200
(Continue reading)

Bram Moolenaar | 4 Aug 21:27 2015
Picon
Picon

Patch 7.4.809


Patch 7.4.809 (after 7.4.802)
Problem:    Test is duplicated.
Solution:   Roll back 7.4.802.
Files:      src/testdir/test39.in, src/testdir/test39.ok

*** ../vim-7.4.808/src/testdir/test39.in	2015-07-28 17:16:28.298488158 +0200
--- src/testdir/test39.in	2015-08-04 21:16:02.706707689 +0200
***************
*** 51,62 ****
  :exe ":norm! 012l\<C-v>jjAx\<Esc>"
  :set ve= enc=latin1
  :.,/^$/w >> test.out
- :" Test for single-line Visual block append at wrapped line with :set linebreak
- Golong line:  40afoobar  aTARGET at end 
- :set linebreak
- :exe ":norm! $3B\<C-v>eAx\<Esc>"
- :set nolinebreak
- :.w >> test.out
  :" gUe must uppercase a whole word, also when ß changes to SS
  Gothe youtußeuu end Ypk0wgUe
  :" gUfx must uppercase until x, inclusive.
--- 51,56 ----
*** ../vim-7.4.808/src/testdir/test39.ok	2015-07-28 17:16:28.298488158 +0200
--- src/testdir/test39.ok	2015-08-04 21:14:24.123814265 +0200
***************
*** 30,36 ****
         x     x   line2
         x     x   line3

(Continue reading)

Bram Moolenaar | 4 Aug 19:27 2015
Picon
Picon

Patch 7.4.808


Patch 7.4.808
Problem:    On MS-Windows 8 IME input doen't work correctly.
Solution:   Read console input before calling MsgWaitForMultipleObjects().
            (vim-jp, Nobuhiro Takasaki)
Files:      src/os_win32.c

*** ../vim-7.4.807/src/os_win32.c	2015-07-17 14:16:49.854596682 +0200
--- src/os_win32.c	2015-08-04 19:23:17.165798107 +0200
***************
*** 259,264 ****
--- 259,267 ----
      int tail;
      int i;

+     if (nLength == -2)
+ 	return (s_dwMax > 0) ? TRUE : FALSE;
+ 
      if (!win8_or_later)
      {
  	if (nLength == -1)
***************
*** 303,309 ****
      }

      *lpBuffer = s_irCache[s_dwIndex];
!     if (nLength != -1 && ++s_dwIndex >= s_dwMax)
  	s_dwMax = 0;
      *lpEvents = 1;
      return TRUE;
(Continue reading)

Bram Moolenaar | 4 Aug 19:19 2015
Picon
Picon

Patch 7.4.807


Patch 7.4.807 (after 7.4.798)
Problem:    After CTRL-V CTRL-A mode isn't updated. (Hirohito Higashi)
Solution:   Clear the command line or update the displayed command.
Files:      src/normal.c

*** ../vim-7.4.806/src/normal.c	2015-07-28 11:21:27.041407266 +0200
--- src/normal.c	2015-08-04 19:09:32.059034805 +0200
***************
*** 48,53 ****
--- 48,54 ----
  static void	clearop __ARGS((oparg_T *oap));
  static void	clearopbeep __ARGS((oparg_T *oap));
  static void	unshift_special __ARGS((cmdarg_T *cap));
+ static void	may_clear_cmdline __ARGS((void));
  #ifdef FEAT_CMDL_INFO
  static void	del_from_showcmd __ARGS((int));
  #endif
***************
*** 1752,1763 ****
  		setmouse();
  		mouse_dragging = 0;
  #endif
! 		if (mode_displayed)
! 		    clear_cmdline = TRUE;   /* unshow visual mode later */
! #ifdef FEAT_CMDL_INFO
! 		else
! 		    clear_showcmd();
! #endif
  		if ((oap->op_type == OP_YANK
(Continue reading)

Bram Moolenaar | 4 Aug 18:23 2015
Picon
Picon

Patch 7.4.806


Patch 7.4.806
Problem:    CTRL-A in Visual mode doesn't work properly with "alpha" in
            'nrformat'.
Solution:   Make it work. (Christian Brabandt)
Files:      src/ops.c, src/testdir/test_increment.in,
            src/testdir/test_increment.ok

*** ../vim-7.4.805/src/ops.c	2015-07-28 21:17:31.526069349 +0200
--- src/ops.c	2015-08-04 18:22:23.110938512 +0200
***************
*** 5492,5497 ****
--- 5492,5499 ----

      for (i = lnum; i <= lnume; i++)
      {
+ 	colnr_T stop = 0;
+ 
  	t = curwin->w_cursor;
  	curwin->w_cursor.lnum = i;
  	ptr = ml_get_curline();
***************
*** 5501,5531 ****
  	    continue;
  	if (visual)
  	{
! 	    if (doalp) /* search for ascii chars */
! 	    {
! 		while (!ASCII_ISALPHA(ptr[col]) && ptr[col])
! 		    col++;
(Continue reading)

Bram Moolenaar | 4 Aug 17:43 2015
Picon
Picon

Patch 7.4.805


Patch 7.4.805
Problem:    The ruler shows "Bot" even when there are only filler lines
            missing. (Gary Johnson)
Solution:   Use "All" when the first line and one filler line are visible.
Files:      src/buffer.c

*** ../vim-7.4.804/src/buffer.c	2015-07-21 15:03:00.691467213 +0200
--- src/buffer.c	2015-08-04 17:38:28.340901106 +0200
***************
*** 4434,4439 ****
--- 4434,4443 ----
      above = wp->w_topline - 1;
  #ifdef FEAT_DIFF
      above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill;
+     if (wp->w_topline == 1 && wp->w_topfill >= 1)
+ 	above = 0;  /* All buffer lines are displayed and there is an
+ 		     * indication of filler lines, that can be considered
+ 		     * seeing all lines. */
  #endif
      below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
      if (below <= 0)
*** ../vim-7.4.804/src/version.c	2015-08-04 17:29:02.863390617 +0200
--- src/version.c	2015-08-04 17:42:39.858011243 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     805,
(Continue reading)

Bram Moolenaar | 4 Aug 17:29 2015
Picon
Picon

Patch 7.4.804


Patch 7.4.804
Problem:    Xxd doesn't have a license notice.
Solution:   Add license as indicated by Juergen.
Files:      src/xxd/xxd.c

*** ../vim-7.4.803/src/xxd/xxd.c	2015-03-05 17:51:10.784921052 +0100
--- src/xxd/xxd.c	2015-08-02 16:58:57.275281442 +0200
***************
*** 55,60 ****
--- 55,63 ----
   *
   * (c) 1990-1998 by Juergen Weigert (jnweiger <at> informatik.uni-erlangen.de)
   *
+  * I hereby grant permission to distribute and use xxd
+  * under X11-MIT or GPL-2.0 (at the user's choice).
+  *
   * Small changes made afterwards by Bram Moolenaar et al.
   *
   * Distribute freely and credit me,
*** ../vim-7.4.803/src/version.c	2015-07-28 21:17:31.526069349 +0200
--- src/version.c	2015-08-04 17:28:26.483806771 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     804,
  /**/

(Continue reading)

Bram Moolenaar | 4 Aug 14:42 2015
Picon
Picon

Moving to github


It appears we can't expect any more improvements on the Google code site
to support the move, thus we might as well get it started.

As I understand it, the move will redirect most things to github,
hopefully also deep-linking for issues.  Not sure how well this works,
can't try it out without actually doing the move.

The repository is expected to keep working for a while.  It's good that
you can keep getting Vim, but it will soon be an outdated version.  The
only solution I see now is to check in a change to the Makefile to give
an error and a URL where to find instructions to move to github.
This needs to be done before it goes read-only on August 25.

Roughly the steps would be:
1. Stop making changes: "freeze"
2. Use the move tool on Google code to move the Vim project to github.
   Check that it completely worked.
3. Clean up the repository.
4. "unfreeze", continue committing patches, editing issues, etc.
5. Tell everybody to start using github, add a message on Google code
   that the site is deprecated, any change will be discarded.
   Patches will go to github only.
6. After checking that it works, set the Google code site to the
   "project moved" state.  Mercurial keeps working still, but gets the
   older version.
7. Check in a change to the Mercurial repository to break the build.
   This must be done before August 25.
8. Repair any damage, update broken links, etc.

(Continue reading)


Gmane