Hi,

When leading zero is included, an unexpected Octal conversion is used.
This might be a "bug" instead of a "feature".

>From the help, we have:

    FUNCTIONS FOR FINDING COMPLETIONS                   *complete-functions*
    ...
    On the second invocation the arguments are:
       a:base   the text with which matches should match; the text that
was
                    located in the first call (can be empty)

Therefore, a:base should be "text", as it is.

However, when "text" including leading zero, auto Octal conversion is
done.
For example: when input is 0123, output is 83, instead of '0123'.

My workaround from the script level is to use my self-made s:base
variable,
instead of using a:base function argument:

    let current_line = getline(line('.'))
    let start_cursor = col('.')-1
    " start_column is what found from the first invocation

    let len = start_cursor - start_column
    let s:base = strpart(current_line, start_column, len)

 In this example, when input is '0123':
    s:base returns '0123'   (expected)
    a:base returns '83'       (surprise!)


Sean

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to