Nazri Ramliy | 25 Nov 02:58 2014
Picon

Bug with rnu and linebreak

Here's how to reproduce in a 120 columns, 69 rows terminal:

foo.txt:
--8<--
        ............ := []......{
                ...........(

`{"hello":".................................","......":{"......":{":.....":"............................",":.........":"..",":....":"....","........":.,"....":{":.....":"...................",":.........":"..",":....":"....","........":.,"............":"...................","..":.,"....":"...
...."},"..":.,".......":"...... ...
......","..":{":.........":".."}}},".......":"..."}`,
                        .........(),
                        ...........(),
                        ...........(),
                ),
        }

        if !............(".......", ., ............, ...........) {
                .......("....... .... ... ... ......")
        }
        if !............("........", ., ............., ............) {
                .......("........ .... ... ... ......")
        }
-->8--

 vi -u NONE -c 'set nocp rnu linebreak' foo.txt

Line 3 is redrawn with 'nolinebreak' when doing either of these two:
        - Go to line 10, then do y5j
        - Visual-line-select lines 10 to 15, hit y

(Continue reading)

Elias Diem | 24 Nov 15:23 2014
Picon

[patch] Consistent naming

Hi all

Give the constant 0 a consistent name in vim.h.

Please check, I'm not yet that familiar with vim 
development.

-- 
Greetings
Elias

-- 
--

-- 
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

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/vim.h b/src/vim.h
--- a/src/vim.h
+++ b/src/vim.h
 <at>  <at>  -1998,7 +1998,7  <at>  <at> 

 #ifndef FEAT_VIRTUALEDIT
 # define getvvcol(w, p, s, c, e) getvcol(w, p, s, c, e)
(Continue reading)

Bram Moolenaar | 23 Nov 15:58 2014
Picon
Picon

Patch 7.4.527


Patch 7.4.527
Problem:    Still confusing regexp failure and NFA_TOO_EXPENSIVE.
Solution:   NFA changes equivalent of 7.4.526.
Files:	    src/regexp_nfa.c

*** ../vim-7.4.526/src/regexp_nfa.c	2014-11-05 14:26:30.764758363 +0100
--- src/regexp_nfa.c	2014-11-23 15:50:57.980625347 +0100
***************
*** 6767,6773 ****

  /*
   * Try match of "prog" with at regline["col"].
!  * Returns 0 for failure, number of lines contained in the match otherwise.
   */
      static long
  nfa_regtry(prog, col)
--- 6767,6773 ----

  /*
   * Try match of "prog" with at regline["col"].
!  * Returns <= 0 for failure, number of lines contained in the match otherwise.
   */
      static long
  nfa_regtry(prog, col)
***************
*** 6897,6903 ****
   * Match a regexp against a string ("line" points to the string) or multiple
   * lines ("line" is NULL, use reg_getline()).
   *
(Continue reading)

Michael Henry | 23 Nov 13:50 2014

Minor getpos() documentation patch

Here is a small patch to the getpos() documentation.

diff -r 8bb4ca7fba40 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt      Wed Oct 22 22:09:01 2014 +0200
+++ b/runtime/doc/eval.txt      Sun Nov 23 07:48:21 2014 -0500
 <at>  <at>  -3514,7 +3514,7  <at>  <at> 
                This can be used to save and restore the position of a
mark: >
                        let save_a_mark = getpos("'a")
                        ...
-                       call setpos(''a', save_a_mark
+                       call setpos("'a", save_a_mark
 <              Also see |getcurpos()| and |setpos()|.

Michael Henry

-- 
--

-- 
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

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Elias Diem | 23 Nov 10:26 2014
Picon

[comment patch] Tiny typo

Hi there

A tiny typo in os_unix.c. See attached patch.

-- 
Greetings
Elias

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r 03a813f2cf51 src/os_unix.c
--- a/src/os_unix.c	Thu Nov 20 23:07:05 2014 +0100
+++ b/src/os_unix.c	Sun Nov 23 10:25:08 2014 +0100
 <at>  <at>  -1609,7 +1609,7  <at>  <at> 
 /*
  * If the X11 connection was lost try to restore it.
  * Helps when the X11 server was stopped and restarted while Vim was inactive
- * (e.g. though tmux).
+ * (e.g. through tmux).
  */
(Continue reading)

vim | 23 Nov 00:27 2014

Issue 286 in vim: Please add breakindent to the vim.vim syntax file

Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 286 by sanja... <at> gmail.com: Please add breakindent to the vim.vim  
syntax file
https://code.google.com/p/vim/issues/detail?id=286

What steps will reproduce the problem?
1. Put 'set breakindent' in your .vimrc
2. Observe that the word 'breakindent' is not properly syntax highlighted
3.

What is the expected output? What do you see instead?
The word 'breakindent' should be properly syntax highlighted.

What version of the product are you using? On what operating system?
I'm using 7.4.383 of MacVim on OS X 10.9.5.

Please provide any additional information below.
Please add the keyword 'breakindent' to the vim.vim syntax file.

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

-- 
--

-- 
(Continue reading)

ZyX | 22 Nov 18:55 2014
Picon

[RFC] Remove e_invarg, e_invarg2 and e_invexpr2

While working on VimL parser I have seen *very* large number of these cryptic error messages. I.e. consider
the following line:

    sort no/some long regex/

. This will give you `E474: Invalid argument` with no further explanation or an exact position where error
is located. I.e. it is indicating that you have a error somewhere, but where? Maybe it is an error in regex
(one needs to know that Vim is written in a way that regexes never throw E474 to say this is false), maybe one
should not have omitted space or whatever. One needs to read documentation thoroughly to determine what
is wrong, but even this does not always help: I cannot find any information about the fact that `n`, `o` and
`x` cannot be used together anywhere in `:sort` documentation.

In my parser I change all of these errors to something like “E474: Can only specify one kind of numeric
sort” (and always assigning a position, but this part cannot be changed so easily), never using
“E47(4|5): Invalid argument” or “E15: Invalid expression”.

More or less full list of such changes to these messages (and not only to messages, but this is irrelevant) is
located at https://gist.github.com//4af839e000e7eada347d (it is supposed to be full, but I started
writing it some time after I started writing the parser). I am posting this message to vim-dev to hear Bram
opinion about this and also as a notification in case somebody will want to port these changes.

Note: in order not to break backwards compatibility all new messages look like “E474: …”, no new
number is assigned. Since the following message text is supposed to be localized and theoretically is a
subject to typo corrections it must not be relied on and changing it is not going to break compatibility.

-- 
--

-- 
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)

lilydjwg | 22 Nov 18:24 2014
Picon

crash with regex

Starting with 7.4.497 (found by git bisect), I get the following crash:

1. put the attached files in current directory
2. run vim -u vimrc --noplugin
3. vim crashes, backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5141434 in __memmove_ssse3_back () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff5141434 in __memmove_ssse3_back () from /usr/lib/libc.so.6
#1  0x0000000000475203 in memmove (__len=18446744073700127088, __src=0x8f9790, __dest=<optimized
out>) at /usr/include/bits/string3.h:57
#2  do_string_sub (
    str=str <at> entry=0x8f9790 "contained role oncontextmenu onchange onmousewheel onselect onsubmit
onkeydown onloadeddata contextmenu ondragenter onvolumechange\n", ' ' <repeats 19 times>,
"contained onemptied onended onmousedown onseeking "..., 
    pat=pat <at> entry=0x8b5080 "\\%(\\<match
\\/[^/]\\{-}\\)\\ <at> <=\\<\\w\\{1,2}\\>\\ze.\\{-}\\\\\\ <at> <!\\/\\%(\\%(ms\\|me\\|hs\\|he\\|rs\\|re\\|lc\\)\\S\\+\\)\\?\\s\\+",
sub=sub <at> entry=0x8b21d0 "", flags=<optimized out>) at eval.c:25145
#3  0x00000000004753f6 in f_substitute (argvars=0x7fffffffc8d0, rettv=0x7fffffffcdc0) at eval.c:18357
#4  0x0000000000468880 in call_func (funcname=0x10 <error: Cannot access memory at address 0x10>, 
    funcname <at> entry=0x8b4c01 "substitute( syn_list, '\\%(\\<match
\\/[^/]\\{-}\\)\\ <at> <=\\<\\w\\{1,2}\\>\\ze.\\{-}\\\\\\ <at> <!\\/\\%(\\%(ms\\|me\\|hs\\|he\\|rs\\|re\\|lc\\)\\S\\+\\)\\?\\s\\+',
'', 'g' )", len=9410464, len <at> entry=10, rettv=0x1, argcount=0, argcount <at> entry=4, argvars=0x0, 
    argvars <at> entry=0x7fffffffc8d0, firstline=72057594028466577, firstline <at> entry=1, lastline=1,
doesrange=0x7fffffffcaa8, evaluate=1, selfdict=0x0)
    at eval.c:8626
#5  0x000000000046c813 in get_func_tv (
    name=0x8b4c01 "substitute( syn_list, '\\%(\\<match
\\/[^/]\\{-}\\)\\ <at> <=\\<\\w\\{1,2}\\>\\ze.\\{-}\\\\\\ <at> <!\\/\\%(\\%(ms\\|me\\|hs\\|he\\|rs\\|re\\|lc\\)\\S\\+\\)\\?\\s\\+',
(Continue reading)

Gary Johnson | 22 Nov 09:13 2014

vimdiff screen not redrawn properly when using 'diffexpr'

I noticed recently when using vimdiff and a 'diffexpr' that the
screen is no longer redrawn properly after certain commands such as
:diffu.  Sometimes the screen is left completely blank; at other
times only a few scattered characters are redrawn.  Typing Ctrl-L
fixes the display.

This can be demonstrated as follows.  Create a vimrc file with these
contents.

---------------------------- vimrc.test ----------------------------
set diffexpr=MyDiff()

function MyDiff()
    silent execute "!diff" v:fname_in v:fname_new ">" v:fname_out
endfunction
--------------------------------------------------------------------

The MyDiff() function was copied from ":help diff-diffexpr" and
simplified.  (I normally use a MyDiff() function that differs
slightly from the example.)

Then execute this command, where file1 and file2 are two text files.
Their contents don't matter.

    vimdiff -N -u vimrc.test --noplugin file1 file2

Then execute

    :diffu

(Continue reading)

Bram Moolenaar | 20 Nov 23:07 2014
Picon
Picon

Patch 7.4.526


Patch 7.4.526
Problem:    matchstr() fails on long text. Daniel Hahler)
Solution:   Return NFA_TOO_EXPENSIVE from regexec_nl(). (Christian Brabandt)
Files:	    src/regexp.c, src/regexec_nfa.c

*** ../vim-7.4.525/src/regexp.c	2014-11-19 16:38:01.508680012 +0100
--- src/regexp.c	2014-11-20 22:59:03.865027911 +0100
***************
*** 3739,3745 ****
   * Uses curbuf for line count and 'iskeyword'.
   * if "line_lbr" is TRUE  consider a "\n" in "line" to be a line break.
   *
!  * Return TRUE if there is a match, FALSE if not.
   */
      static int
  bt_regexec_nl(rmp, line, col, line_lbr)
--- 3739,3745 ----
   * Uses curbuf for line count and 'iskeyword'.
   * if "line_lbr" is TRUE  consider a "\n" in "line" to be a line break.
   *
!  * Returns 0 for failure, number of lines contained in the match otherwise.
   */
      static int
  bt_regexec_nl(rmp, line, col, line_lbr)
***************
*** 3759,3765 ****
      ireg_icombine = FALSE;
  #endif
      ireg_maxcol = 0;
(Continue reading)

Elias Diem | 20 Nov 18:26 2014
Picon

[patch] Indent correctly

Hi there

Here's a small patch to correctly indent macro code.

-- 
Greetings
Elias

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r bbfaabde42b6 src/gui.h
--- a/src/gui.h	Wed Nov 19 20:04:48 2014 +0100
+++ b/src/gui.h	Thu Nov 20 18:25:11 2014 +0100
 <at>  <at>  -41,7 +41,7  <at>  <at> 
 # include <Events.h>
 # include <Menus.h>
 # if !(defined (TARGET_API_MAC_CARBON) && (TARGET_API_MAC_CARBON))
-#   include <Windows.h>
+#  include <Windows.h>
 # endif
(Continue reading)


Gmane