Ben Jackson wrote:

> > How about adding a separate function: prompt_getprompt() ?
> > That fits nicely next to prompt_setprompt().
> 
> Sure thing. This was my initial thought. I went for getbufinfo() on
> the basis that it was a smaller change. Reviewing the current values
> for it though, I think you're (both!) right, it doesn't fit well.
> 
> This actually makes it easier to check for this feature `exists(
> '*prompt_getprompt' )`, rather than `has_patch( ... )` I guess.
> 
> Completing the thought process, if in future we might add more
> `prompt_set*` attributes, at which point Yegappan's suggestion of
> `prompt_getinfo()` or equivalent might be better. Let's say we add a
> prompt history (I think that's in the todo list), maybe we add
> `prompt_sethistorylen( 10 )` or something. Perhaps we'd then put that
> in `prompt_getinfo()`, but again the use-case for requesting this is
> much more vague, and having to calculate it for every completion
> request (in the case of a omnifunc) is wasteful. We can therefore add
> `prompt_getprompt()` now, and if we ever need to, add
> `prompt_getinfo()` later.

The history mentioned is for the typed commands, not for the prompt.
Any settings for the history would fit in though.

-- 
Vim is like Emacs without all the typing.  (John "Johann" Spetz)

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202009032034.083KYI8f136244%40masaka.moolenaar.net.

Raspunde prin e-mail lui