> A few questions: > > - What is 'encoding' set to? > - What is the actual text in the entries with problems? Give this > byte-for-byte. You may need to insert an entry to find out. > - Can you reproduce it by setting 'omnifunc' to a simple function that > returns a fixed list of text entries? If so, please give us the > script with this. Otherwise, give us a text file to reproduce the > problem. > - The entries in the menu appear not to be sorted. How did this happen? > - What did you type to get to these screenshots?
My system is UTF-8, so 'encoding' is also set to 'utf-8'. On the screenshot, the file was wrotten in 'latin1' charset. After some tests, I noticed this bugs seems only appears when 'encoding' and 'fileencoding' are not the same. Finally, I could get this bug on win32 : I set 'encoding' to 'utf-8' then open some 'latin-1' files. I wrote two very simple C++ file to help you to reproduce the bug. These two files are written in 'latin1' charset. Their content is simple C++ comments containing French text with accented characters like é, è, à, etc. Put the two files in the same directory. Then open gvim and set your 'encoding' to 'utf-8'. Edit the '2.cpp' file. Verify that 'fileencoding' is set to 'latin1'. Insert a new line between #include and the begin of the /* comment. (o key) Then type CTRL+x CTRL+i and the include completion menu appears like this : http://img131.imageshack.us/img131/4117/vim5ls3.png Another test : 'encoding' = latin1 and utf-8 texts, you get this : http://img78.imageshack.us/img78/483/vim6nt2.png Accents are not correctly displayed. The completion menu uses 'encoding' to display its text. When you edit a file, the buffer is converted to the current encoding (the [converted] message). When you use the completion menu with current buffer words, accented characters will be correctly displayed. But if you use completion menu with words in other files (like with include completion) with a different fileencoding than your current buffer encoding, accented characters will not be displayed correctly because they are not converted to the current encoding. So words from other files should be converted to the current buffer 'encoding' before display them in the completion menu. That will certainly fix this problem. Regards. -- Gombault Damien | Powered by Gentoo Linux AMD64
texts.tar.gz
Description: application/tgz