Re: [vim/vim] Ctrl-] in help buffers gets confused by punctuation (#814)

2016-05-18 Fir de Conversatie h_east
Hi Bram and All,

2016-5-19(Thu) 0:05:03 UTC+9 ZyX:
> 2016-05-18 14:06 GMT+03:00 Marius Gedminas :
> 
> No, I've done make, and then I run vim with a wrapper script that 
> setsVIMRUNTIME=~/src/vim/runtime and exec's ~/src/vim/src/vim.
> 
> 
> But I can also reproduce with /usr/bin/vim, which is version 7.4.1689 from 
> Ubuntu 16.04 vim-gnome-py2.
> 
> 
> What else could be different between our systems?  Locale?  I can still 
> reproduce after setting LC_ALL=C.
> 
> 
> 
> In the text you quoted {address} is present *twice*: once with and once 
> without dot. Given your error message I think you used the second one with 
> dot, but besides that you have not stated explicitly which ​{address} you 
> meant and if I did not see the error message or did not knew that error 
> messages usually do not end with a dot I would never think you meant the 
> second one.
> 
> 
> It is reproducible here on the second {address}.

Ah, nice catch up.  Thanks.

Bram>
I wrote a patch that improve :help for curly bracket.
Please check and include an attached patch.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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/src/ex_cmds.c b/src/ex_cmds.c
index d83dc40..12764b4 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6216,6 +6216,9 @@ find_help_tags(
 	 */
 	if (*s == '\'' && s > arg && *arg == '\'')
 		break;
+	/* Also '{' and '}'. */
+	if (*s == '}' && s > arg && *arg == '{')
+		break;
 	  }
 	  *d = NUL;
 
diff --git a/src/testdir/test_help_tagjump.vim b/src/testdir/test_help_tagjump.vim
index 62076c3..0f14ade 100644
--- a/src/testdir/test_help_tagjump.vim
+++ b/src/testdir/test_help_tagjump.vim
@@ -25,6 +25,16 @@ func Test_help_tagjump()
   call assert_equal("help", )
   call assert_true(getline('.') =~ '\*arglistid()\*')
   helpclose
+
+  exec "help! 'autoindent'."
+  call assert_equal("help", )
+  call assert_true(getline('.') =~ "\\*'autoindent'\\*")
+  helpclose
+
+  exec "help! {address}."
+  call assert_equal("help", )
+  call assert_true(getline('.') =~ '\*{address}\*')
+  helpclose
 endfunc
 
 let s:langs = ['en', 'ab', 'ja']


Re: Latest install of Vim 7.4 crashes 100% if Syntax on and scroll in Ruby file (Windows 10)

2016-05-18 Fir de Conversatie Kelvin Lawrence
Thank you Christian for getting back to me. Everything seems fine with the 
latest version. Again, many thanks.

-- 
-- 
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: [vim/vim] Ctrl-] in help buffers gets confused by punctuation (#814)

2016-05-18 Fir de Conversatie Nikolay Aleksandrovich Pavlov
2016-05-18 14:06 GMT+03:00 Marius Gedminas :

> No, I've done make, and then I run vim with a wrapper script that sets
> VIMRUNTIME=~/src/vim/runtime and exec's ~/src/vim/src/vim.
>
> But I can also reproduce with /usr/bin/vim, which is version 7.4.1689 from
> Ubuntu 16.04 vim-gnome-py2.
>
> What else could be different between our systems? Locale? I can still
> reproduce after setting LC_ALL=C.
>

In the text you quoted {address} is present *twice*: once with and once
without dot. Given your error message I think you used the second one with
dot, but besides that you have not stated explicitly which ​{address} you
meant and if I did not see the error message or did not knew that error
messages usually do not end with a dot I would never think you meant the
second one.

It is reproducible here on the second {address}.



> —
> You are receiving this because you commented.
> Reply to this email directly or view it on GitHub
> 
>
> --
> --
> 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.
>

-- 
-- 
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: [vim/vim] Loss of scope data when using nested partials/funcref (#812)

2016-05-18 Fir de Conversatie Nikolay Aleksandrovich Pavlov
2016-05-18 12:06 GMT+03:00 Andrey Gavrikov :

>  To actually do this one needs to use `get(dict, 'func')`
>
> Does not this imply that 'dict' is available at the point when 'func' is
> about to be invoked?
>
> if I was to extend my original example and instead of calling call
> obj2.func2() directly we had something like this:
>
> " obj2.func2 will be called when channel is closed
> call job_start("ping -c 3 google.com", {"close_cb": obj2.func2})
>
> here is a full version
>
> function! Callback_Test()
> let obj1 = {"test": 'test1', "other_test": "other_test"}
> function obj1.func1() " next line will use value from wrong scope
> echomsg "inside obj1.func1: test=".self.test " next line will 
> result in: 'Key not present in Dictionary: other_test'
> echomsg "inside obj1.func1: other_test=".self.other_test
> endfunction
>
> let obj2 = {"test": 'test2', 'callback': obj1.func1}
> function obj2.func2(...)
> echomsg "inside obj2.func2: ".self.test
> call self.callback()
> endfunction
> "call obj2.func2()
> call job_start("ping -c 3 google.com", {"close_cb": 
> obj2.func2})endfunction
>
> In this instance - is there a way to ensure that when obj1.func1 is
> finally called we have access to its obj1 'dict' in order to be able to do 
> get(obj1,
> 'func1')
>

Since you store `obj1.func1` in obj2 you need to do `get(obj2,
'callback​')` to get partial that is attached to `obj1` because indexing
`obj2` (i.e. `obj2.callback` or `self.callback` in your code) creates new
partial with `obj2` attached in place of `obj1`. I do not see why you think
you need access to `obj1`, expression `obj1.func1` creates a partial which
references this dictionary and you store this partial in `obj2` (and you
can use `pyeval('vim.bindeval("obj2")["callback"].self')` to get `obj1`
back if needed).

But if you do `get(obj1, 'func1')` you will *not* get a partial, you will
get a funcref without `self` dictionaries attached: when defining a
function no partial is created. Calling such funcref needs explicit `self`
(i.e. `call(get(obj1, 'func1'), [], obj1)`, not `get(obj1, 'func1')()`).


> —
> You are receiving this because you commented.
> Reply to this email directly or view it on GitHub
> 
>
> --
> --
> 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.
>

-- 
-- 
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: [vim/vim] The order issue of 'exit_cb' and 'close_cb' in job-options (vim 7.4.1832) (#815)

2016-05-18 Fir de Conversatie skywind3000
sorry,I don't know issues in github will be redirect to this group.


在 2016年5月18日星期三 UTC+8下午4:21:32,Linwei写道:
> Trying to make a async building system with +jobs in the latest vim, I find 
> sometimes 'exit_cb' is invoked after 'close_cb' but sometimes 'close_cb' is 
> invoked after 'exit_cb':
> 
> 
> That's what I done in my plugin:
> 
> 1. output text to quickfix window when 'callback' / 'out_cb' / 'err_cb' happen
> 
> 2. output "(close)" to quickfix window when 'close_cb' happen, and flush all 
> the text in channel to quickfix.
> 
> 3. output "[Finished in xx seconds]" to quickfix when 'exit_cb' happen and 
> clean my job state.
> 
> 
> Sometimes I get this in quickfix:
> 
> hello.c:1: x -> from 'callback'
> hello.c:2: x -> from 'callback'
> hello.c:3: x -> from 'callback'
> hello.c:4: x -> from 'callback'
> (close)   -> from 'close_cb'
> [Finished in 2 seconds] -> from 'exit_cb'
> 
> 
> 
> but sometimes I get this:
> 
> hello.c:1: x -> from 'callback'
> hello.c:2: x -> from 'callback'
> hello.c:3: x -> from 'callback'
> [Finished in 2 seconds] -> from 'exit_cb'
> hello.c:4: x -> from 'callback'
> (close)   -> from 'close_cb'
> 
> 
> 
> I just can't figure out which one will happened at last ? 'close_cb' or 
> 'exit_cb' ? and which one should I rely to do the clean stuff ?
> 
> 
> If I reset my building state in 'close_cb' (reset variables and unlet job 
> object and output 'finished') when 'exit_cb' comes after 'close_cb' the 
> environment is already destroyed.
> 
> 
> And if I reset my building state in 'exit_cb' when 'close_cb' comes after 
> 'exit_cb' the environment is already destroyed too.
> 
> 
> I have created a similar plugin for atom text editor ( atom-shell-commands ) 
> with javascript by using a 'child_process' module in node.js. The "process 
> exit callback" in always invoked after all pipe callbacks, so I can simply
> 
> delete the child-process object and do the destruction things in "process 
> exit callback" without worry about any other callbacks will come after that.
> 
> 
> Is this possible to guarantee that 'exit_cb' will alway be invoked after all 
> other callbacks (close_cb/out_cb/err_cb etc) ? If so, it will be much easier 
> for me to write my async building plugin for vim.
> 
> 
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly or view it on GitHub

-- 
-- 
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: [vim/vim] Ctrl-] in help buffers gets confused by punctuation (#814)

2016-05-18 Fir de Conversatie h_east
Hi Marius,

2016-5-18(Wed) 16:52:50 UTC+9 Marius Gedminas:
> I'm on vim 7.4.1831.  I can reproduce with vim -u NONE, so it's not my .vimrc 
> playing with  or anything.

Yes, I also ran same command and can't reproduce.
You've done below in vim directory?

$ sudo make install

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

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


job_stop is unusable in windows (gvim 7.4.1832) (2 bugs)

2016-05-18 Fir de Conversatie skywind3...@163.com
-- BUG 1 -
job_stop will not actually stop the process in windows unless I unlet the job 
variable

step to reproduct (windows gvim 7.4.1832):
1. start a background python job (output a single line and sleep 1 second, 
repeat 30 times)
2. redirect stdout/stderr into quickfix window by 'callback'
3. call job_stop with 'term' or 'kill' and ** DO NOT unlet job object **
4. check job_status and it changed from 'run' to 'dead'
5. ERROR: but the job is still running, still output text to quickfix window
6. when it actually exit by it self (after repeat itself 30 times) 'close_cb' 
and 'exit_cb' were invoked

and if I unlet job object after job_stop, everything seems okay, the job can 
actually be stopped
but job object can not be unleted after job_stop, because sometimes child 
process will stop signal from 
being terminated (ignore TERM etc) in this circumstance, if I immediately unlet 
job object after
a no-effect job_stop calling my script will fail into an error environment.

This is only in windows, in linux everything is fine, I can clean the job 
object in exit_cb/close_cb as my wish.
and job_stop doesn't require a unlet in linux too.

-- BUG 2 -
'close_cb' and 'exit_cb' will not be invoked if I stop the job by 
job_stop(s:job_obj, 'int') in windows.

if 'term', 'kill' were used to stop the child process (s:job_obj must be unlet 
after it due to bug 1), 
'close_cb' and 'exit_cb' will be invoked correctly.

But 'close_cb' and 'exit_cb' can be lost if 'term', 'kill' has been replaced to 
'int'.


These two bugs are ONLY in windows (gvim 7.4.1832), 




skywind3...@163.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: [vim/vim] Ctrl-] in help buffers gets confused by punctuation (#814)

2016-05-18 Fir de Conversatie h_east
Hi Marius,

2016-5-18(Wed) 16:07:50 UTC+9 Marius Gedminas:
> :help :copy shows this text:
> 
> 
> :[range]co[py] {address}*:co* *:copy*
> Copy the lines given by [range] to below the line
> given by {address}.
> 
> 
> 
> Position the cursor on top of {address}
> 
> Press Ctrl-]
> 
> 
> 
> Expected behavior:
> 
> 
> you're looking at the help topic for {address}
> 
> 
> 
> 
> Actual behavior:
> 
> 
> E149: Sorry, no help for {address}.


I can't reproduce.  (I got your expected behavior)
My Vim is 7.4.1831 on fedora 23.

What your Vim version?


Please retry after execute the following command in Vim.
:helptags ALL

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

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