Dead key problem + possible solution

112 views
Skip to first unread message

Marc Thevenet

unread,
Nov 13, 2013, 11:37:14 AM11/13/13
to vim...@googlegroups.com
Hi,

I've been having problems with dead key behavior under Windows since Vim v7.3 (gVim only, the console version does not seem to be affected).
In insert mode, when I type ' followed by space, it's supposed to insert a ', but since 7.3 it just seems to add the ' to the buffer and does not insert it.

If I read the thread right, this is the same problem that was described there : https://groups.google.com/d/topic/vim_dev/uRgvH5dtAkM/discussion

Anyway, I researched the problem for a while, built vim myself, and got to the conclusion that the problem was related to a Microsoft compiler bug (http://connect.microsoft.com/VisualStudio/feedback/details/792598/msvc-10-11-compiler-optimizations-may-produce-incorrect-code ) where the compiler that ships with Visual Studio 2010 (cl.exe v16, if I recall correctly) can produce incorrect code when optimizing.
And, indeed, gVim behaves correctly when compiled without optimizations ("OPTIMIZE=SPACE").

So I upgraded my compiler, and managed to build a working gVim with optimizations using the compiler shipped with Visual Studio Express 2013 (cl.exe v18).

So my question is : are the official Windows releases of Vim built using cl.exe v16, and if so is it possible to upgrade the compiler ?
I'm fine with building Vim myself, but shipping an official version without the dead keys problem would be nice too :)

Tony Mechelynck

unread,
Nov 13, 2013, 12:47:58 PM11/13/13
to vim...@googlegroups.com
There is a distribution for Windows, "unofficial" but built from
official sources and updated more or less regularly, unlike the official
release which is only built once per major/minor version. This
"unofficial" Vim distribution is available at
http://sourceforge.net/projects/cream/files/Vim/ — it is hosted on the
Cream site but available separately: old-timers of this group have
dubbed it "Vim without Cream". IIUC, it is compiled using a gcc compiler
(from MinGW, I think) but can run "natively" under Windows. This of
course means that it doesn't suffer from bugs peculiar to Microsoft
Visual C/C++.


Best regards,
Tony.
--
Yes I have a Machintosh, please don't scream at me.
-- Larry Blumette on linux-kernel

Steve Hall

unread,
Nov 13, 2013, 1:43:59 PM11/13/13
to vim...@googlegroups.com
On Wed, Nov 13, 2013 at 12:47 PM, Tony Mechelynck wrote:
>
> There is a distribution for Windows, "unofficial" but built from
> official sources [....] compiled using a gcc compiler (from MinGW, I
> think)

From Cygwin actually. Vim support of this build method is low priority
so our builds are currently -perl -ruby -tcl -mzscheme.

--
Steve Hall [ digitect dancingpaper com ]
:: Cream for Vim http://cream.sourceforge.net

Christian Brabandt

unread,
Nov 13, 2013, 1:51:12 PM11/13/13
to vim...@googlegroups.com
Hi Tony!

On Mi, 13 Nov 2013, Tony Mechelynck wrote:

> There is a distribution for Windows, "unofficial" but built from
> official sources and updated more or less regularly, unlike the
> official release which is only built once per major/minor version.
> This "unofficial" Vim distribution is available at
> http://sourceforge.net/projects/cream/files/Vim/ — it is hosted on
> the Cream site but available separately: old-timers of this group
> have dubbed it "Vim without Cream". IIUC, it is compiled using a gcc
> compiler (from MinGW, I think) but can run "natively" under Windows.
> This of course means that it doesn't suffer from bugs peculiar to
> Microsoft Visual C/C++.

Nevertheless, it would be nice, if vim.org could provide fixed binaries.
Not everybody knows, where to find the "unofficial" binaries.

Best,
Christian
--
Was sich liebt, das schleckt sich.

Gary Johnson

unread,
Nov 13, 2013, 2:04:50 PM11/13/13
to vim...@googlegroups.com
Vim.org links to the "Vim without Cream" page from
http://www.vim.org/download.php#pc.

Regards,
Gary

Marc Thevenet

unread,
Nov 14, 2013, 8:27:16 AM11/14/13
to vim...@googlegroups.com, gary...@spocom.com
Thanks for the Cream suggestion, but my point is fixing the official Vim
release, not getting an alternative build.

As Christian pointed out, not everyone knows where to find the
"unofficial" binaries (although Cream is linked on the download page),
and even then, such a problem in the official releases just makes vim
look bad.

My initial question remains: are the official Windows releases of Vim

built using cl.exe v16, and if so is it possible to upgrade the
compiler?

Bonus question: does anyone know who is responsible for building the
official releases? Maybe it'll be simpler if I get in touch with this
person directly.

Bram Moolenaar

unread,
Nov 17, 2013, 11:46:25 AM11/17/13
to Marc Thevenet, vim...@googlegroups.com, gary...@spocom.com
I build the MS-Windows binaries with the oldest compiler that supports
the newest OS version. Microsoft has a habit of dropping support for
older OSes in new compiler releases. This way the binary runs on most
OS versions.

If there is an optimizer bug it can usually be fixed by
# pragma optimize("", off)
around the problematic code. I haven't seen a patch for that yet.

Since others produce perfectly fine binaries for recent patch levels, it
doesn't make sense for me to build releases very often. I have plenty
of things to do... It might be that we need to update the download page
to make it more clear what the status of builds is.

--
ARTHUR: Now stand aside worthy adversary.
BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch.
ARTHUR: A scratch? Your arm's off.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

Marc Thevenet

unread,
Nov 19, 2013, 11:08:03 AM11/19/13
to vim...@googlegroups.com
Fair enough, i'll see if i can come up with a working patch.
Could you please tell me which version of the compiler you're using so I
can test my patch correctly ?
Reply all
Reply to author
Forward
0 new messages