I cannot say what you did wrong, but calling `searchpos()` multiple
times for each occurence of a pattern is rather wasty. Check how I did
this in [formatvim][1], I collect matches there to highlight them
later, so it gets start and end positions of the match.
[1]:
https://bitbucket.org/ZyX_I/formatvim/src/a00edc4c7032bde5c7e970bca7871e9317ee2265/autoload/format.vim#format.vim-1457
> (Is it not possible to let every character be a single byte char as in languages as Python?)
This was already discussed many times. No, it is not: backward
compatibility, though there are special functions (useless because
column is byte index and not character index, virtual column is in
screen cells which also does not match characters).
Also any character above U+00FF in Python3 is *not* a single byte, it
is just as single byte character as 0xFFFF is single byte in `[0xFFFF,
0xFFFE, 0xFFFD][0]`. Simply different way of storing and indexing
strings.
>
> --
> --
> You received this message from the "vim_use" 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_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
vim_use+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.