Buggy "gj" behavior with breakindent and showbreak
Here's how to reproduce it in an 80-column terminal: $ vi --version|head -2 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 27 2014 13:10:11) Included patches: 1-417 $ echo $COLUMNS 80 $ vi -u NONE -U NONE -c 'exec "normal 6i\\31Aa\A a"' -c 'set breakindent showbreak=\> ' -c 'normal ^' The cursor is now placed on the first "a" character on the first line, preceeded with 6 tabs, and we can see that the last "a" character is breakindent-ed with ">" showbreak character on the "virtual" line due to the breakindent. So far so good. Here's the bug: Pressing "gj" in normal mode should move the cursor to the virtual line below but in this case the cursors jumps to the end of the first line instead. Nazri. -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
":set all&" doesn't reset indent amount for cindent.
":set all&" doesn't reset indent amount for cindent. Steps to reproduce: $ vim -u NONE :set shiftwidth=2 :set all& :set shiftwidth? shiftwidth=8 :set cindent i{ This line should be indented with 8 spaces (tab character). } Result: { This line should be indented with 8 spaces (tab character). } Expected: { >---This line should be indented with 8 spaces (tab character). } Cindent uses buffer local cache value. But ":set all&" doesn't reset it. diff -r babc6a1d4c27 src/option.c --- a/src/option.cSat Aug 23 15:31:19 2014 +0200 +++ b/src/option.cThu Aug 28 10:56:40 2014 +0900 @@ -3642,6 +3642,10 @@ #else win_comp_scroll(curwin); #endif + +#ifdef FEAT_CINDENT +parse_cino(curbuf); +#endif } /* -- Yukihiro Nakadaira - yukihiro.nakada...@gmail.com -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [patch] Fix netrw#NetrwBrowseX with `kdeinit` running, but no `kfmclient`
Am Mittwoch, 27. August 2014 16:40:41 UTC+2 schrieb Charles Campbell: > Daniel Hahler wrote: > > > When there is a `kdeinit4` process, but `kfmclient` is not installed > > > `BrowseX` fails to open an URL (it falls through to the last else block). > > > > > > This happened on a non-KDE system, where `kdeinit4` was > > > installed/started for an unknown reason, but konqueror/kfmclient is not > > available. > > > > > > This patch also makes the `system()` call only when necessary (via a > > > function), and will prefer `xdg-open` unconditionally also for potential > > KDE systems. > > > > > > After all, `xdg-open` is better aware of the current desktop environment > > > and is designed for use cases like this. > > > > > > The old code was primarily meant to handle edge cases when `gnome-open` was > > used. > > > I have left it as a fallback in case `xdg-open` might not be available. > > > > > > The patch is available in a branch at: > > https://github.com/blueyed/vim/compare/fix-netrw-with-kdeinit (which > > includes a commit to fix trailing whitespace). > > > > > > I am attaching the patch from the main commit > > (https://github.com/blueyed/vim/commit/b5e13acebc11c13290d3f3dd9940b1ab181f47a3). > > > > > Thanks! I'll look into it. There's a problem/error in the patch (`s/endif/endfun`). I am attaching the updated patch, without whitespace changes. Cheers, Daniel. -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index d8d1857..6f4178b 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -4680,20 +4680,23 @@ fun! netrw#NetrwBrowseX(fname,remote) endif " call Decho("exten<".exten.">") - " seems kde systems often have gnome-open due to dependencies, even though - " gnome-open's subsidiary display tools are largely absent. Kde systems - " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) - if !exists("s:haskdeinit") + " Detect if KDE is running (via `kdeinit*` process). + " This was previously used when `gnome-open` was used instead of `xdg-open` + " and is being kept as fallback (tnx Mikolaj Machowski). + fun! s:haskdeinit() + if !exists('s:_haskdeinit') if has("unix") && executable("ps") && !has("win32unix") -let s:haskdeinit= system("ps -e") =~ 'kdeinit' + let s:_haskdeinit = (system("ps -e") =~ '\ to continue")|call inputrestore() let ret= v:shell_error - elseif has("unix") && executable("xdg-open") && !s:haskdeinit + elseif has("unix") && executable("xdg-open") " call Decho("unix and xdg-open") " call Decho("exe sil !xdg-open ".shellescape(fname,1)." ".redir) exe "sil !xdg-open ".shellescape(fname,1).redir let ret= v:shell_error - elseif has("unix") && executable("kfmclient") && s:haskdeinit + elseif has("unix") && executable("kfmclient") && s:haskdeinit() " call Decho("unix and kfmclient") " call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir) exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir
Re: Update doc/eval.txt about expand()
Yasuhiro Matsumoto wrote: > See: > http://www.reddit.com/r/vim/comments/2el2zo/til_expandshellvar_might_spawn_a_shell/ > > IFAIK, expand('$FOO') doesn't spawn shell in latest version of vim. So I > think it need to update doc. > > https://gist.github.com/mattn/18c27561455271d17158 Thanks! -- hundred-and-one symptoms of being an internet addict: 80. At parties, you introduce your spouse as your "service provider." /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: segfault with nfa
Yasuhiro Matsumoto wrote: > Seems need to avoid following by zero-width. > > diff -r aeafe78fc869 src/regexp_nfa.c > --- a/src/regexp_nfa.cFri Aug 22 13:13:28 2014 +0200 > +++ b/src/regexp_nfa.cWed Aug 27 15:35:21 2014 +0900 > @@ -4408,8 +4408,10 @@ > > case NFA_SPLIT: > /* order matters here */ > - subs = addstate(l, state->out, subs, pim, off); > - subs = addstate(l, state->out1, subs, pim, off); > + if (state->out->c != NFA_ZSTART && state->out->c != NFA_ZEND) { > + subs = addstate(l, state->out, subs, pim, off); > + subs = addstate(l, state->out1, subs, pim, off); > + } > break; > > case NFA_EMPTY: Thanks! I'll check it out. -- hundred-and-one symptoms of being an internet addict: 79. All of your most erotic dreams have a scrollbar at the right side. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: 7.4.356 - bad patch on ftp
Arkadiusz Miśkiewicz wrote: > On Tuesday 22 of July 2014, Bram Moolenaar wrote: > > Arkadiusz Miśkiewicz wrote: > > > Could someone fix 7.4.356 patch that sits on vim ftp? It tries to patch > > > .hgignore file which doesn't exist in released tarballs. > > > > OK, let's do the same as for the other patch that changes .hgignore. > > > > > Thanks! > > > > > > ps. would be nice to enhance whatever script creates these patches to > > > avoid this mistake in future since it is not the first time it happens > > > > Well, only the second time. It's not so easy to automate. > > Ok. Could you also check & fix 7.4.399? > > + + /usr/bin/patch -p0 -s > 1 out of 1 hunk FAILED -- saving rejects to file src/testdir/test71.ok.rej > > $ cat src/testdir/test71.ok.rej > *** ../vim-7.4.398/src/testdir/test71.ok2010-05-21 15:21:48.0 > +0200 > --- src/testdir/test71.ok 2014-08-09 15:28:07.349357660 +0200 > *** > *** 4,10 > OK 01234567890123456789012345678901234567 > OK line 2 foo bar blah > OK line 3 xx > 1234567890 > aábbccddeëff > asdfasdfasdf > 000111222 > --- 4,15 > OK 01234567890123456789012345678901234567 > OK line 2 foo bar blah > OK line 3 xx > + OK OK 01234567890123456789012345678901234567 > + OK OK line 2 foo bar blah > + OK OK line 3 xx > 1234567890 > aábbccddeëff > asdfasdfasdf > 000111222 > + abcdefghijklmnopqrstuvwxyz > + !@#$%^&*()_+=-`~ This patch looks OK to me. Does it fail because of the accented characters? I'll confert it to latin1, but I suspect something else might fail then. -- hundred-and-one symptoms of being an internet addict: 78. You find yourself dialing IP numbers on the phone. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: getting an up-to-date runtime
Charles Campbell wrote: > I don't have mercurial on this machine -- we use cvs. Consequently, > what I'd used in the past to update runtime was: > > rsync -avzcP --delete --exclude="dos" --exclude="spell" > ftp.nluug.nl::Vim/runtime/ . > > but, having tried it this morning, I get: > > rsync: failed to connect to ftp.nluug.nl: Network is unreachable (101) > rsync error: error in socket IO (code 10) at clientserver.c(124) > [receiver=3.0.6] > > (after a considerable wait). Is the up-to-date runtime no longer > available except via mercurial? I haven't heard of an intentional change, so assume the server is currently not working. Let me know if the problem persists for more than a day. -- If bankers can count, how come they have eight windows and only four tellers? /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
getting an up-to-date runtime
Hello: I don't have mercurial on this machine -- we use cvs. Consequently, what I'd used in the past to update runtime was: rsync -avzcP --delete --exclude="dos" --exclude="spell" ftp.nluug.nl::Vim/runtime/ . but, having tried it this morning, I get: rsync: failed to connect to ftp.nluug.nl: Network is unreachable (101) rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6] (after a considerable wait). Is the up-to-date runtime no longer available except via mercurial? Regards, Chip Campbell -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [patch] Fix netrw#NetrwBrowseX with `kdeinit` running, but no `kfmclient`
Daniel Hahler wrote: When there is a `kdeinit4` process, but `kfmclient` is not installed `BrowseX` fails to open an URL (it falls through to the last else block). This happened on a non-KDE system, where `kdeinit4` was installed/started for an unknown reason, but konqueror/kfmclient is not available. This patch also makes the `system()` call only when necessary (via a function), and will prefer `xdg-open` unconditionally also for potential KDE systems. After all, `xdg-open` is better aware of the current desktop environment and is designed for use cases like this. The old code was primarily meant to handle edge cases when `gnome-open` was used. I have left it as a fallback in case `xdg-open` might not be available. The patch is available in a branch at: https://github.com/blueyed/vim/compare/fix-netrw-with-kdeinit (which includes a commit to fix trailing whitespace). I am attaching the patch from the main commit (https://github.com/blueyed/vim/commit/b5e13acebc11c13290d3f3dd9940b1ab181f47a3). Thanks! I'll look into it. Regards, Chip Campbell -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Update doc/eval.txt about expand()
On Wednesday, August 27, 2014 9:58:15 PM UTC+9, mattn wrote: > Yes, I know. > > But in this case, afaik, expand('$FOO') shouldn't call mch_expand_wildcards(). Ooops, sorry. I found it. https://code.google.com/p/vim/source/browse/src/misc1.c#10769 -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Update doc/eval.txt about expand()
Yes, I know. But in this case, afaik, expand('$FOO') shouldn't call mch_expand_wildcards(). -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Update doc/eval.txt about expand()
On 27 August 2014, mattn wrote: > See: > http://www.reddit.com/r/vim/comments/2el2zo/til_expandshellvar_might_spawn_a_shell/ > > IFAIK, expand('$FOO') doesn't spawn shell in latest version of vim. [...] AFAICT it still does, please see os_unix.c lines 5755--6228. /lcd -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Update doc/eval.txt about expand()
See: http://www.reddit.com/r/vim/comments/2el2zo/til_expandshellvar_might_spawn_a_shell/ IFAIK, expand('$FOO') doesn't spawn shell in latest version of vim. So I think it need to update doc. https://gist.github.com/mattn/18c27561455271d17158 Thanks. - Yasuhiro Matsumoto -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.