Conversation
|
I wonder what happens when calling setcmdline() while in custom completion. Should have a test for that. |
What means the |
|
> I wonder what happens when calling setcmdline() while in custom completion.
What means the `custom completion`?
It is command custom completion? To add tests, I need to understand it.
For a user command custom completion can be defined with:
-complete=custom,{func}
See ":help :command-completion-custom".
In the function used here, if you would call setcmdline(), I wonder if
something breaks (using freed memory, for example).
Perhaps a :cmap using <expr> might also cause trouble.
…--
GALAHAD: No look, really, this isn't nescess ...
PIGLET: We must examine you.
GALAHAD: There's nothing wrong with ... that.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
I have added tests. |
I don't know why it is failed in gvim only. |
|
I have changed the map character. It is passed. |
|
Do you have an example usecase for this function? I don't quite get where this is useful. |
|
I for now use |
|
A few review comments (sorry it took a while):
|
yes, but it is the same behavior with |
Fixed.
Fixed.
Fixed. |
Codecov Report
@@ Coverage Diff @@
## master #10869 +/- ##
==========================================
+ Coverage 82.40% 82.49% +0.08%
==========================================
Files 152 152
Lines 177500 177529 +29
Branches 40279 40283 +4
==========================================
+ Hits 146272 146455 +183
+ Misses 19043 18906 -137
+ Partials 12185 12168 -17
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
> help says returning FALSE or TRUE, but it looks like it's returning
> one and zero
yes, but it is the same behavior with `setcmdpos()`. The
documentation is wrong??
Ah, you took it from there, and there it's confusing as well.
FALSE and TRUE are used for argument values, where zero and v:false are
accepted as FALSE and 1 or v:true are accepted as TRUE. But when
returning a value we know what we are returning, thus we can just use
zero and one. Othewise users may expect v:false or v:true, which
matters when using Vim9 script.
…--
It is illegal to take more than three sips of beer at a time while standing.
[real standing law in Texas, United States of America]
/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
Thank you for the merge. |
…plugin Problem: It is not easy to change the command line from a plugin. Solution: Add setcmdline(). (Shougo Matsushita, closes vim/vim#10869) vim/vim@07ea5f1
…plugin (#19979) vim-patch:9.0.0285: it is not easy to change the command line from a plugin Problem: It is not easy to change the command line from a plugin. Solution: Add setcmdline(). (Shougo Matsushita, closes vim/vim#10869) vim/vim@07ea5f1
…plugin (neovim#19979) vim-patch:9.0.0285: it is not easy to change the command line from a plugin Problem: It is not easy to change the command line from a plugin. Solution: Add setcmdline(). (Shougo Matsushita, closes vim/vim#10869) vim/vim@07ea5f1
It is useful to create plugins for command line.