{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/2653","labels_url":"https://api.github.com/repos/neovim/neovim/issues/2653/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/2653/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/2653/events","html_url":"https://github.com/neovim/neovim/pull/2653","id":76354517,"number":2653,"title":"[RFC] vim-patch:7.4.582","user":{"login":"glts","id":1483271,"avatar_url":"https://avatars.githubusercontent.com/u/1483271?v=3","gravatar_id":"","url":"https://api.github.com/users/glts","html_url":"https://github.com/glts","followers_url":"https://api.github.com/users/glts/followers","following_url":"https://api.github.com/users/glts/following{/other_user}","gists_url":"https://api.github.com/users/glts/gists{/gist_id}","starred_url":"https://api.github.com/users/glts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glts/subscriptions","organizations_url":"https://api.github.com/users/glts/orgs","repos_url":"https://api.github.com/users/glts/repos","events_url":"https://api.github.com/users/glts/events{/privacy}","received_events_url":"https://api.github.com/users/glts/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neovim/neovim/labels/RFC","name":"RFC","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T13:14:50Z","updated_at":"2015-05-24T15:05:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/2653","html_url":"https://github.com/neovim/neovim/pull/2653","diff_url":"https://github.com/neovim/neovim/pull/2653.diff","patch_url":"https://github.com/neovim/neovim/pull/2653.patch"},"body":"```\r\nProblem:    Can't match \"%>80v\" properly. (Axel Bender)\r\nSolution:   Correctly handle \">\". (Christian Brabandt)\r\n```\r\n\r\nRepro https://groups.google.com/d/msg/vim_dev/n-02i4FnOcw/P3Yyx1OLeXgJ\r\n\r\nhttps://github.com/vim/vim/commit/v7-4-582\r\n\r\nOriginal patch:\r\n\r\n```diff\r\ndiff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c\r\n--- a/src/nvim/regexp_nfa.c\r\n+++ b/src/nvim/regexp_nfa.c\r\n@@ -6441,16 +6441,26 @@ nfa_regmatch(prog, start, submatch, m)\r\n \t\t{\r\n \t\t    int     op = t->state->c - NFA_VCOL;\r\n \t\t    colnr_T col = (colnr_T)(reginput - regline);\r\n+\t\t    win_T   *wp = reg_win == NULL ? curwin : reg_win;\r\n \r\n \t\t    /* Bail out quickly when there can't be a match, avoid the\r\n \t\t     * overhead of win_linetabsize() on long lines. */\r\n-\t\t    if ((col > t->state->val && op != 1)\r\n-\t\t\t    || (col - 1 > t->state->val && op == 1))\r\n+\t\t    if (op != 1 && col > t->state->val)\r\n \t\t\tbreak;\r\n-\t\t    result = nfa_re_num_cmp(t->state->val, op,\r\n-\t\t\t(long_u)win_linetabsize(\r\n-\t\t\t\treg_win == NULL ? curwin : reg_win,\r\n-\t\t\t\t\t\t\t   regline, col) + 1);\r\n+\t\t    result = FALSE;\r\n+\t\t    if (op == 1 && col - 1 > t->state->val && col > 100)\r\n+\t\t    {\r\n+\t\t\tint ts = wp->w_buffer->b_p_ts;\r\n+\r\n+\t\t\t/* Guess that a character won't use more columns than\r\n+\t\t\t * 'tabstop', with a minimum of 4. */\r\n+\t\t\tif (ts < 4)\r\n+\t\t\t    ts = 4;\r\n+\t\t\tresult = col > t->state->val * ts;\r\n+\t\t    }\r\n+\t\t    if (!result)\r\n+\t\t\tresult = nfa_re_num_cmp(t->state->val, op,\r\n+\t\t\t\t(long_u)win_linetabsize(wp, regline, col) + 1);\r\n \t\t    if (result)\r\n \t\t    {\r\n \t\t\tadd_here = TRUE;\r\ndiff --git a/src/nvim/testdir/test64.in b/src/nvim/testdir/test64.in\r\n--- a/src/nvim/testdir/test64.in\r\n+++ b/src/nvim/testdir/test64.in\r\n@@ -7,6 +7,7 @@ actually tried.\r\n STARTTEST\r\n :so small.vim\r\n :\" tl is a List of Lists with:\r\n+:\"    regexp engine\r\n :\"    regexp pattern\r\n :\"    text to test the pattern on\r\n :\"    expected match (optional)\r\n@@ -451,6 +452,9 @@ STARTTEST\r\n :\"\"\"\" Skip adding state twice\r\n :call add(tl, [2, '^\\%(\\%(^\\s*#\\s*if\\>\\|#\\s*if\\)\\)\\(\\%>1c.*$\\)\\@=', \"#if FOO\", \"#if\", ' FOO'])\r\n :\"\r\n+:\"\"\" Test \\%V atom\r\n+:call add(tl, [2, '\\%>70vGesamt', 'Jean-Michel Charlier & Victor Hubinon\\Gesamtausgabe [Salleck]    Buck Danny {Jean-Michel Charlier & Victor Hubinon}\\Gesamtausgabe', 'Gesamt'])\r\n+:\"\r\n :\"\"\"\" Run the tests\r\n :\"\r\n :for t in tl\r\ndiff --git a/src/nvim/testdir/test64.ok b/src/nvim/testdir/test64.ok\r\n--- a/src/nvim/testdir/test64.ok\r\n+++ b/src/nvim/testdir/test64.ok\r\n@@ -1030,6 +1030,9 @@ OK 2 - [0-9a-zA-Z]\\{8}-\\([0-9a-zA-Z]\\{4}\r\n OK 0 - ^\\%(\\%(^\\s*#\\s*if\\>\\|#\\s*if\\)\\)\\(\\%>1c.*$\\)\\@=\r\n OK 1 - ^\\%(\\%(^\\s*#\\s*if\\>\\|#\\s*if\\)\\)\\(\\%>1c.*$\\)\\@=\r\n OK 2 - ^\\%(\\%(^\\s*#\\s*if\\>\\|#\\s*if\\)\\)\\(\\%>1c.*$\\)\\@=\r\n+OK 0 - \\%>70vGesamt\r\n+OK 1 - \\%>70vGesamt\r\n+OK 2 - \\%>70vGesamt\r\n multi-line tests\r\n OK 0 - ^.\\(.\\).\\_..\\1.\r\n OK 1 - ^.\\(.\\).\\_..\\1.\r\ndiff --git a/src/nvim/version.c b/src/nvim/version.c\r\n--- a/src/nvim/version.c\r\n+++ b/src/nvim/version.c\r\n@@ -742,6 +742,8 @@ static char *(features[]) =\r\n static int included_patches[] =\r\n {   /* Add new patch number below this line */\r\n /**/\r\n+    582,\r\n+/**/\r\n     581,\r\n /**/\r\n     580,\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/105023063","html_url":"https://github.com/neovim/neovim/pull/2653#issuecomment-105023063","issue_url":"https://api.github.com/repos/neovim/neovim/issues/2653","id":105023063,"user":{"login":"fwalch","id":339435,"avatar_url":"https://avatars.githubusercontent.com/u/339435?v=3","gravatar_id":"","url":"https://api.github.com/users/fwalch","html_url":"https://github.com/fwalch","followers_url":"https://api.github.com/users/fwalch/followers","following_url":"https://api.github.com/users/fwalch/following{/other_user}","gists_url":"https://api.github.com/users/fwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/fwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwalch/subscriptions","organizations_url":"https://api.github.com/users/fwalch/orgs","repos_url":"https://api.github.com/users/fwalch/repos","events_url":"https://api.github.com/users/fwalch/events{/privacy}","received_events_url":"https://api.github.com/users/fwalch/received_events","type":"User","site_admin":false},"created_at":"2015-05-24T15:05:38Z","updated_at":"2015-05-24T15:05:38Z","body":"One small comment, otherwise LGTM."}}