Daniel Hahler | 4 Sep 22:02 2015

[vim] filetype: handle lines with `{#\s\+` as htmldjango (#410)

If you have a snippet file without extends, block or load tags, but a
comment at the beginning, this will handle it has htmldjango now, too.

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/410

Commit Summary

  • filetype: handle lines with `{#\s\+` as htmldjango

File Changes

Patch Links:


Reply to this email directly or view it on GitHub.

--
--
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Christian J. Robinson | 4 Sep 19:15 2015
Picon

Bug: --remote-send can trigger FocusGained when it shouldn't


If I set up the following autocmd:

     :autocmd FocusGained * :echomsg "here"

Then from a command-line window do:

     vim --remote-send ":tabnew<cr>"

I get the "here" message.  This happens with a number of other 
commands, including ":new", "i" (start insert mode), etc.  This is a 
problem for one of my scripts because it needs to be able to rely on 
knowing when Vim actually has focus.

It wouldn't be a problem in my use case if it immediately triggered 
the FocusLost event after the --remote-send keystrokes, but it 
doesn't.

- Christian

--

-- 
            For many, the declension of life is: I go, you go, ego.
Christian J. Robinson <heptite <at> gmail.com>      http://christianrobinson.name/

Charles Campbell | 3 Sep 20:14 2015
Picon

small problem with eval.c

Hello!

I just upgraded from patch level 841 to 854 -- and got two warnings. 
I've provided a trivial patch for the eval.c one and, as the misc

* eval.c|4412 error| 'i' undeclared (first use in this function)
* misc2.c|6265 warning| ignoring return value of 'fwrite', declared with
attribute warn_unused_result

I've "fixed" the latter warning by
   size_t throwaway;
  ...
  throwaway= fwrite(...

but I'm not sure that that approach is best (undoubtedly some compiler
will complain of an unused variable).

Regards,
Chip Campbell

-- 
-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
*** old_eval.c	2015-09-03 14:07:20.254837390 -0400
--- eval.c	2015-09-03 14:07:31.604038517 -0400
***************
*** 4407,4412 ****
--- 4407,4413 ----
  		    break;
  	case 'i':   if (p[1] == 's')
  		    {
+ 			int i;
  			if (p[2] == 'n' && p[3] == 'o' && p[4] == 't')
  			    len = 5;
  			i = p[len];
h_east | 3 Sep 14:35 2015
Picon

[patch] Operation of the tab page label with the mouse is wrong.

Hi Bram and List,

Tab page does not move even when click and hold the tab page label and drag it to the right of the label.

How to reproduce (CUI Vim on Linux via xterm): 
- Preparation.
  $ export TERM=xterm-256color
- Start pure Vim. (Open five tab pages)
  $ vim -N -u NONE -p A B C D E -c "set mouse=a"
- Click and hold tab page label "A" with the mouse.
- Drag to tab page label "B".

Expected behavior:
- Tab page "A" move to tab page "B" of the right side.

Actual behavior:
- Tab page doesn't move.
  When drag to tab page label "C", Become to expected behavior.

Investigation result:
- This bug is regression since the patch 7.4.709.
  Sorry. It's my patch.

I wrote a patch.
Please include this.

BTW, Below is also need to be modified, so that, Abe fixed this.
> Patch for drag&drop reordering of GUI tab pages reordering.
> (Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)

https://gist.github.com/nocd5/165286495c782b815b94
This patch was tested on Windows7 64bit and Ubuntu 14.04.2 64bit.

Let's include the above patch!

Thanks.
--
Best regards,
Hirohito Higashi (a.k.a h_east)

-- 
--

-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Byte Termite | 2 Sep 22:30 2015
Picon

ARM Cross compile issue


Hi there,

I am cross compiling vim from the git repository I just checked out.

It breaks when the sjiscorr is built for a ARM and the build process tries to execute on my x86 host.

I am cross compiling on x86 to a ARMv6.

I was able to work around the issue with a simple patch work.

Obviously this is not a final fix but just a heads up.



ORIGINAL ISSUE:

...
iconv -f utf-8 -t cp932 ja.po | ./sjiscorr > ja.sjis.po
/bin/sh: ./sjiscorr: cannot execute binary file: Exec format error
Makefile:200: recipe for target 'ja.sjis.po' failed
make[2]: *** [ja.sjis.po] Error 126
make[2]: Leaving directory 'vim/src/po'
Makefile:1769: recipe for target 'languages' failed
make[1]: *** [languages] Error 2
make[1]: Leaving directory 'vim/src'
Makefile:26: recipe for target 'first' failed
make: *** [first] Error 2




MY WORK AROUND:

$ git diff Makefile
diff --git a/src/po/Makefile b/src/po/Makefile
index d9aa834..272695e 100644
--- a/src/po/Makefile
+++ b/src/po/Makefile
<at> <at> -202,7 +202,8 <at> <at> ja.sjis.po: ja.po
        iconv -f utf-8 -t cp932 ja.po | ./sjiscorr > ja.sjis.po
 
 sjiscorr: sjiscorr.c
-       $(CC) -o sjiscorr sjiscorr.c
+       #$(CC) -o sjiscorr sjiscorr.c
+       gcc -o sjiscorr sjiscorr.c
 
 ja.euc-jp.po: ja.po
        iconv -f utf-8 -t euc-jp ja.po | \






THE ORIGINAL GIT SOURCE CODE LOG:

commit b58988b832b69b52dfefeca338ea4802d0c4cdca
Author: Bram Moolenaar <Bram <at> vim.org>
Date:   Tue Sep 1 21:25:44 2015 +0200

    patch 7.4.854
    Problem:    Missing information about runtime files.
    Solution:   Add section about runtime files. (Christian Brabandt)



--
--
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Georgiy Treyvus | 2 Sep 20:34 2015
Picon

The :help command is buggy when invoked from within vimtutor and gvimtutor

I've been using Vim for a few years now and hobbling around well enough
but ultimately decided I wanted to learn to use Vim more effectively.
Thus among other things I ran vimtutor again in hopes of absorbing stuff
that I didn't remember from the first time around. Ultimately as I
reached the end it suggested I run some :help commands and this is where
things went quite bad.

For example here is what happens when I ran ":help user-manual" from
within vimtutor:

E434: Can't find tag pattern
Press ENTER or type command to continue

After I pressed enter as it said something did open in the top pane but
it was complete garbage.

This same thing seems to occur when running gvimtutor as well.

This does not appear to happen when I use the usual commands of the form:
vim
gvim
vim file1 file2 ...
gvim file1 fil2 ...

Here is information about the version of vim that I am running:

[georgiy <at> PANTHER ~]$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 20 2015 10:38:14)
Included patches: 1-207, 209-801, 803-808, 810-827
Modified by <bugzilla <at> redhat.com>
Compiled by <bugzilla <at> redhat.com>
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      +python3/dyn     +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      +lua/dyn         +rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall
-Werror=format-security -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-z,relro -fstack-protector -rdynamic
-Wl,-export-dynamic -Wl,--enable-new-dtags  -Wl,-z,relro
-L/usr/local/lib -Wl,--as-needed -o vim        -lm -lnsl  -lselinux
-lncurses -lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags
-fstack-protector -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl
-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
[georgiy <at> PANTHER ~]$

Here is information about the version of gvim I am running:

[georgiy <at> PANTHER ~]$ gvim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 20 2015 10:37:43)
Included patches: 1-207, 209-801, 803-808, 810-827
Modified by <bugzilla <at> redhat.com>
Compiled by <bugzilla <at> redhat.com>
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      +python3/dyn     +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua/dyn         +rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    +xpm
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/libdrm
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16
   -O2 -g -pipe -Wall -Werror=format-security -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-z,relro -fstack-protector -rdynamic
-Wl,-export-dynamic -Wl,--enable-new-dtags  -Wl,-z,relro
-L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0
-lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0
-lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig
-lfreetype  -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE  -lm -lnsl  -lselinux
  -lncurses -lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags
-fstack-protector -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl
-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
[georgiy <at> PANTHER ~]$

This isn't a big deal for me personally but it probably won't leave
newer users trying to learn with a particularly good first impression.

-- 
--

-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Charles Campbell | 2 Sep 19:55 2015
Picon

another tooltip issue

Hello!

When I have a tooltip window appear, and then change workspaces (via
ctrl-alt-arrow under gtk/linux), the tooltip window appears in the new
workspace.  Moving the mouse about doesn't affect it.

Regards,
Chip Campbell

-- 
--

-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luis González | 1 Sep 21:53 2015
Picon

VIM is inserting characters when start up

Hi All,

Using VIM version:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 25 2015 16:53:28)
Included patches: 1-801, 803-808, 810-838
Compiled by <cygwin <at> cygwin.com>

I found the following issue:
When I start vim for existing file, randomly insert a character 'g'.

Reading in the web https://bbs.archlinux.org/viewtopic.php?id=199362, found that describing
similar issue but I do not use URxvt or any X term.

The issue starts when I try to enable features using my .vimrc file.
Could anyone help me to fix this?

Thanks,

Luis

-- 
--

-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Bram Moolenaar | 1 Sep 21:26 2015
Picon
Picon

Patch 7.4.854


Patch 7.4.854 (after 7.4.850)
Problem:    Missing information about runtime files.
Solution:   Add section about runtime files. (Christian Brabandt)
Files:      CONTRIBUTING.md

*** ../vim-7.4.853/CONTRIBUTING.md	2015-09-01 19:50:05.697404798 +0200
--- CONTRIBUTING.md	2015-09-01 21:22:38.119765678 +0200
***************
*** 37,39 ****
--- 37,54 ----
  Or open [the todo file] on GitHub to see the latest version.

  [the todo file]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
+ 
+ 
+ # Syntax, indent and other runtime files
+ 
+ The latest version of these files can be obtained from the repository.
+ They are usually not updated with numbered patches.
+ 
+ If you find a problem with one of these files or have a suggestion for
+ improvement, please first try to contact the maintainer directly.
+ Look in the header of the file for the name and email address.
+ 
+ The maintainer will take care of issues and send updates to Bram for 
+ distribution with Vim.
+ 
+ If the maintainer does not react, contact the vim-dev maillist.
*** ../vim-7.4.853/src/version.c	2015-09-01 20:53:20.294030821 +0200
--- src/version.c	2015-09-01 21:23:38.559133262 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     854,
  /**/

-- 
The Characters and incidents portrayed and the names used are fictitious and
any similarity to the names, characters, or history of any person is entirely
accidental and unintentional.
                                  Signed RICHARD M. NIXON
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram <at> 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    ///

-- 
--

-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bram Moolenaar | 1 Sep 20:53 2015
Picon
Picon

Patch 7.4.853


Patch 7.4.853
Problem:    "zt" in diff mode does not always work properly. (Gary Johnson)
Solution:   Don't count filler lines twice. (Christian Brabandt)
Files:      src/move.c

*** ../vim-7.4.852/src/move.c	2015-08-11 19:13:55.142175641 +0200
--- src/move.c	2015-09-01 20:44:12.507720203 +0200
***************
*** 1732,1738 ****
       * - at least 'scrolloff' lines above and below the cursor
       */
      validate_cheight();
!     used = curwin->w_cline_height;
      if (curwin->w_cursor.lnum < curwin->w_topline)
  	scrolled = used;

--- 1732,1738 ----
       * - at least 'scrolloff' lines above and below the cursor
       */
      validate_cheight();
!     used = curwin->w_cline_height; /* includes filler lines above */
      if (curwin->w_cursor.lnum < curwin->w_topline)
  	scrolled = used;

***************
*** 1751,1760 ****
      new_topline = top + 1;

  #ifdef FEAT_DIFF
!     /* count filler lines of the cursor window as context */
!     i = diff_check_fill(curwin, curwin->w_cursor.lnum);
!     used += i;
!     extra += i;
  #endif

      /*
--- 1751,1762 ----
      new_topline = top + 1;

  #ifdef FEAT_DIFF
!     /* used already contains the number of filler lines above, don't add it
!      * again.
!      * TODO: if filler lines above new top are to be considered as context for
!      * the current window, leave next statement commented, else hide filler
!      * lines above cursor line, by adding them to extra */
!     /* extra += diff_check_fill(curwin, curwin->w_cursor.lnum); */
  #endif

      /*
*** ../vim-7.4.852/src/version.c	2015-09-01 20:31:16.311776122 +0200
--- src/version.c	2015-09-01 20:40:44.433880446 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     853,
  /**/

-- 
A fool must search for a greater fool to find admiration.

 /// Bram Moolenaar -- Bram <at> 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    ///

-- 
--

-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bram Moolenaar | 1 Sep 20:31 2015
Picon
Picon

Patch 7.4.852


Patch 7.4.852
Problem:    On MS-Windows console Vim uses ANSI APIs for keyboard input and
            console output, it cannot input/output Unicode characters.
Solution:   Use Unicode APIs for console I/O. (Ken Takata, Yasuhiro Matsumoto)
Files:      src/os_win32.c, src/ui.c, runtime/doc/options.txt

*** ../vim-7.4.851/src/os_win32.c	2015-09-01 20:23:30.408603580 +0200
--- src/os_win32.c	2015-09-01 20:28:43.193363546 +0200
***************
*** 213,220 ****
  static void standend(void);
  static void visual_bell(void);
  static void cursor_visible(BOOL fVisible);
! static BOOL write_chars(LPCSTR pchBuf, DWORD cchToWrite);
! static char_u tgetch(int *pmodifiers, char_u *pch2);
  static void create_conin(void);
  static int s_cursor_visible = TRUE;
  static int did_create_conin = FALSE;
--- 213,220 ----
  static void standend(void);
  static void visual_bell(void);
  static void cursor_visible(BOOL fVisible);
! static DWORD write_chars(char_u *pchBuf, DWORD cbToWrite);
! static WCHAR tgetch(int *pmodifiers, WCHAR *pch2);
  static void create_conin(void);
  static int s_cursor_visible = TRUE;
  static int did_create_conin = FALSE;
***************
*** 265,279 ****
      if (!win8_or_later)
      {
  	if (nLength == -1)
! 	    return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents);
! 	return ReadConsoleInput(hInput, lpBuffer, 1, &dwEvents);
      }

      if (s_dwMax == 0)
      {
  	if (nLength == -1)
! 	    return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents);
! 	if (!ReadConsoleInput(hInput, s_irCache, IRSIZE, &dwEvents))
  	    return FALSE;
  	s_dwIndex = 0;
  	s_dwMax = dwEvents;
--- 265,279 ----
      if (!win8_or_later)
      {
  	if (nLength == -1)
! 	    return PeekConsoleInputW(hInput, lpBuffer, 1, lpEvents);
! 	return ReadConsoleInputW(hInput, lpBuffer, 1, &dwEvents);
      }

      if (s_dwMax == 0)
      {
  	if (nLength == -1)
! 	    return PeekConsoleInputW(hInput, lpBuffer, 1, lpEvents);
! 	if (!ReadConsoleInputW(hInput, s_irCache, IRSIZE, &dwEvents))
  	    return FALSE;
  	s_dwIndex = 0;
  	s_dwMax = dwEvents;
***************
*** 868,876 ****
  #endif

  #if defined(__GNUC__) && !defined(__MINGW32__)  && !defined(__CYGWIN__)
! # define AChar AsciiChar
  #else
! # define AChar uChar.AsciiChar
  #endif

  /* The return code indicates key code size. */
--- 868,876 ----
  #endif

  #if defined(__GNUC__) && !defined(__MINGW32__)  && !defined(__CYGWIN__)
! # define UChar UnicodeChar
  #else
! # define UChar uChar.UnicodeChar
  #endif

  /* The return code indicates key code size. */
***************
*** 889,900 ****

      if (s_iIsDead == 2)
      {
! 	pker->AChar = (CHAR) awAnsiCode[1];
  	s_iIsDead = 0;
  	return 1;
      }

!     if (pker->AChar != 0)
  	return 1;

      vim_memset(abKeystate, 0, sizeof (abKeystate));
--- 889,900 ----

      if (s_iIsDead == 2)
      {
! 	pker->UChar = (WCHAR) awAnsiCode[1];
  	s_iIsDead = 0;
  	return 1;
      }

!     if (pker->UChar != 0)
  	return 1;

      vim_memset(abKeystate, 0, sizeof (abKeystate));
***************
*** 909,915 ****
      }

      /* Clear any pending dead keys */
!     ToAscii(VK_SPACE, MapVirtualKey(VK_SPACE, 0), abKeystate, awAnsiCode, 0);

      if (uMods & SHIFT_PRESSED)
  	abKeystate[VK_SHIFT] = 0x80;
--- 909,915 ----
      }

      /* Clear any pending dead keys */
!     ToUnicode(VK_SPACE, MapVirtualKey(VK_SPACE, 0), abKeystate, awAnsiCode, 2, 0);

      if (uMods & SHIFT_PRESSED)
  	abKeystate[VK_SHIFT] = 0x80;
***************
*** 922,932 ****
  	    abKeystate[VK_MENU] = abKeystate[VK_RMENU] = 0x80;
      }

!     s_iIsDead = ToAscii(pker->wVirtualKeyCode, pker->wVirtualScanCode,
! 			abKeystate, awAnsiCode, 0);

      if (s_iIsDead > 0)
! 	pker->AChar = (CHAR) awAnsiCode[0];

      return s_iIsDead;
  }
--- 922,932 ----
  	    abKeystate[VK_MENU] = abKeystate[VK_RMENU] = 0x80;
      }

!     s_iIsDead = ToUnicode(pker->wVirtualKeyCode, pker->wVirtualScanCode,
! 			abKeystate, awAnsiCode, 2, 0);

      if (s_iIsDead > 0)
! 	pker->UChar = (WCHAR) awAnsiCode[0];

      return s_iIsDead;
  }
***************
*** 953,960 ****
      static BOOL
  decode_key_event(
      KEY_EVENT_RECORD	*pker,
!     char_u		*pch,
!     char_u		*pch2,
      int			*pmodifiers,
      BOOL		fDoPost)
  {
--- 953,960 ----
      static BOOL
  decode_key_event(
      KEY_EVENT_RECORD	*pker,
!     WCHAR		*pch,
!     WCHAR		*pch2,
      int			*pmodifiers,
      BOOL		fDoPost)
  {
***************
*** 982,988 ****
      }

      /* special cases */
!     if ((nModifs & CTRL) != 0 && (nModifs & ~CTRL) == 0 && pker->AChar == NUL)
      {
  	/* Ctrl-6 is Ctrl-^ */
  	if (pker->wVirtualKeyCode == '6')
--- 982,988 ----
      }

      /* special cases */
!     if ((nModifs & CTRL) != 0 && (nModifs & ~CTRL) == 0 && pker->UChar == NUL)
      {
  	/* Ctrl-6 is Ctrl-^ */
  	if (pker->wVirtualKeyCode == '6')
***************
*** 1044,1050 ****
  	*pch = NUL;
      else
      {
! 	*pch = (i > 0) ? pker->AChar : NUL;

  	if (pmodifiers != NULL)
  	{
--- 1044,1050 ----
  	*pch = NUL;
      else
      {
! 	*pch = (i > 0) ? pker->UChar : NUL;

  	if (pmodifiers != NULL)
  	{
***************
*** 1436,1442 ****
      DWORD	    dwNow = 0, dwEndTime = 0;
      INPUT_RECORD    ir;
      DWORD	    cRecords;
!     char_u	    ch, ch2;

      if (msec > 0)
  	/* Wait until the specified time has elapsed. */
--- 1436,1442 ----
      DWORD	    dwNow = 0, dwEndTime = 0;
      INPUT_RECORD    ir;
      DWORD	    cRecords;
!     WCHAR	    ch, ch2;

      if (msec > 0)
  	/* Wait until the specified time has elapsed. */
***************
*** 1523,1529 ****
  #ifdef FEAT_MBYTE_IME
  		/* Windows IME sends two '\n's with only one 'ENTER'.  First:
  		 * wVirtualKeyCode == 13. second: wVirtualKeyCode == 0 */
! 		if (ir.Event.KeyEvent.uChar.UnicodeChar == 0
  			&& ir.Event.KeyEvent.wVirtualKeyCode == 13)
  		{
  		    read_console_input(g_hConIn, &ir, 1, &cRecords);
--- 1523,1529 ----
  #ifdef FEAT_MBYTE_IME
  		/* Windows IME sends two '\n's with only one 'ENTER'.  First:
  		 * wVirtualKeyCode == 13. second: wVirtualKeyCode == 0 */
! 		if (ir.Event.KeyEvent.UChar == 0
  			&& ir.Event.KeyEvent.wVirtualKeyCode == 13)
  		{
  		    read_console_input(g_hConIn, &ir, 1, &cRecords);
***************
*** 1586,1595 ****
  /*
   * Get a keystroke or a mouse event
   */
!     static char_u
! tgetch(int *pmodifiers, char_u *pch2)
  {
!     char_u ch;

      for (;;)
      {
--- 1586,1595 ----
  /*
   * Get a keystroke or a mouse event
   */
!     static WCHAR
! tgetch(int *pmodifiers, WCHAR *pch2)
  {
!     WCHAR ch;

      for (;;)
      {
***************
*** 1658,1668 ****
  #define TYPEAHEADLEN 20
      static char_u   typeahead[TYPEAHEADLEN];	/* previously typed bytes. */
      static int	    typeaheadlen = 0;
- #ifdef FEAT_MBYTE
-     static char_u   *rest = NULL;	/* unconverted rest of previous read */
-     static int	    restlen = 0;
-     int		    unconverted;
- #endif

      /* First use any typeahead that was kept because "buf" was too small. */
      if (typeaheadlen > 0)
--- 1658,1663 ----
***************
*** 1761,1798 ****
  	else
  #endif
  	{
! 	    char_u	ch2 = NUL;
  	    int		modifiers = 0;

  	    c = tgetch(&modifiers, &ch2);

- #ifdef FEAT_MBYTE
- 	    /* stolen from fill_input_buf() in ui.c */
- 	    if (rest != NULL)
- 	    {
- 		/* Use remainder of previous call, starts with an invalid
- 		 * character that may become valid when reading more. */
- 		if (restlen > TYPEAHEADLEN - typeaheadlen)
- 		    unconverted = TYPEAHEADLEN - typeaheadlen;
- 		else
- 		    unconverted = restlen;
- 		mch_memmove(typeahead + typeaheadlen, rest, unconverted);
- 		if (unconverted == restlen)
- 		{
- 		    vim_free(rest);
- 		    rest = NULL;
- 		}
- 		else
- 		{
- 		    restlen -= unconverted;
- 		    mch_memmove(rest, rest + unconverted, restlen);
- 		}
- 		typeaheadlen += unconverted;
- 	    }
- 	    else
- 		unconverted = 0;
- #endif
- 
  	    if (typebuf_changed(tb_change_cnt))
  	    {
  		/* "buf" may be invalid now if a client put something in the
--- 1756,1766 ----
  	else
  #endif
  	{
! 	    WCHAR	ch2 = NUL;
  	    int		modifiers = 0;

  	    c = tgetch(&modifiers, &ch2);

  	    if (typebuf_changed(tb_change_cnt))
  	    {
  		/* "buf" may be invalid now if a client put something in the
***************
*** 1816,1842 ****
  		int	n = 1;
  		int     conv = FALSE;

- 		typeahead[typeaheadlen] = c;
- 		if (ch2 != NUL)
- 		{
- 		    typeahead[typeaheadlen + 1] = 3;
- 		    typeahead[typeaheadlen + 2] = ch2;
- 		    n += 2;
- 		}
  #ifdef FEAT_MBYTE
! 		/* Only convert normal characters, not special keys.  Need to
! 		 * convert before applying ALT, otherwise mapping <M-x> breaks
! 		 * when 'tenc' is set. */
! 		if (input_conv.vc_type != CONV_NONE
! 						&& (ch2 == NUL || c != K_NUL))
  		{
! 		    conv = TRUE;
! 		    typeaheadlen -= unconverted;
! 		    n = convert_input_safe(typeahead + typeaheadlen,
! 				n + unconverted, TYPEAHEADLEN - typeaheadlen,
! 				rest == NULL ? &rest : NULL, &restlen);
  		}
  #endif

  		if (conv)
  		{
--- 1784,1819 ----
  		int	n = 1;
  		int     conv = FALSE;

  #ifdef FEAT_MBYTE
! 		if (ch2 == NUL)
  		{
! 		    int	    i;
! 		    char_u  *p;
! 		    WCHAR   ch[2];
! 
! 		    ch[0] = c;
! 		    if (c >= 0xD800 && c <= 0xDBFF)	/* High surrogate */
! 		    {
! 			ch[1] = tgetch(&modifiers, &ch2);
! 			n++;
! 		    }
! 		    p = utf16_to_enc(ch, &n);
! 		    if (p != NULL)
! 		    {
! 			for (i = 0; i < n; i++)
! 			    typeahead[typeaheadlen + i] = p[i];
! 			vim_free(p);
! 		    }
  		}
+ 		else
  #endif
+ 		    typeahead[typeaheadlen] = c;
+ 		if (ch2 != NUL)
+ 		{
+ 		    typeahead[typeaheadlen + n] = 3;
+ 		    typeahead[typeaheadlen + n + 1] = (char_u)ch2;
+ 		    n += 2;
+ 		}

  		if (conv)
  		{
***************
*** 5366,5392 ****

  
  /*
!  * write `cchToWrite' characters in `pchBuf' to the screen
!  * Returns the number of characters actually written (at least one).
   */
!     static BOOL
  write_chars(
!     LPCSTR pchBuf,
!     DWORD  cchToWrite)
  {
      COORD coord = g_coord;
      DWORD written;

!     FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cchToWrite,
! 				coord, &written);
!     /* When writing fails or didn't write a single character, pretend one
!      * character was written, otherwise we get stuck. */
!     if (WriteConsoleOutputCharacter(g_hConOut, pchBuf, cchToWrite,
! 				coord, &written) == 0
! 	    || written == 0)
! 	written = 1;

!     g_coord.X += (SHORT) written;

      while (g_coord.X > g_srScrollRegion.Right)
      {
--- 5343,5415 ----

  
  /*
!  * write `cbToWrite' bytes in `pchBuf' to the screen
!  * Returns the number of bytes actually written (at least one).
   */
!     static DWORD
  write_chars(
!     char_u *pchBuf,
!     DWORD  cbToWrite)
  {
      COORD coord = g_coord;
      DWORD written;

! #ifdef FEAT_MBYTE
!     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
!     {
! 	static WCHAR	*unicodebuf = NULL;
! 	static int	unibuflen = 0;
! 	int		length;
! 	DWORD		n, cchwritten, cells;
! 
! 	length = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)pchBuf, cbToWrite, 0, 0);
! 	if (unicodebuf == NULL || length > unibuflen)
! 	{
! 	    vim_free(unicodebuf);
! 	    unicodebuf = (WCHAR *)lalloc(length * sizeof(WCHAR), FALSE);
! 	    unibuflen = length;
! 	}
! 	MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)pchBuf, cbToWrite,
! 			    unicodebuf, unibuflen);
! 
! 	cells = mb_string2cells(pchBuf, cbToWrite);
! 	FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cells,
! 				    coord, &written);
! 	/* When writing fails or didn't write a single character, pretend one
! 	 * character was written, otherwise we get stuck. */
! 	if (WriteConsoleOutputCharacterW(g_hConOut, unicodebuf, length,
! 		    coord, &cchwritten) == 0
! 		|| cchwritten == 0)
! 	    cchwritten = 1;
! 
! 	if (cchwritten == length)
! 	{
! 	    written = cbToWrite;
! 	    g_coord.X += (SHORT)cells;
! 	}
! 	else
! 	{
! 	    char_u *p = pchBuf;
! 	    for (n = 0; n < cchwritten; n++)
! 		mb_cptr_adv(p);
! 	    written = p - pchBuf;
! 	    g_coord.X += (SHORT)mb_string2cells(pchBuf, written);
! 	}
!     }
!     else
! #endif
!     {
! 	FillConsoleOutputAttribute(g_hConOut, g_attrCurrent, cbToWrite,
! 				    coord, &written);
! 	/* When writing fails or didn't write a single character, pretend one
! 	 * character was written, otherwise we get stuck. */
! 	if (WriteConsoleOutputCharacter(g_hConOut, (LPCSTR)pchBuf, cbToWrite,
! 		    coord, &written) == 0
! 		|| written == 0)
! 	    written = 1;

! 	g_coord.X += (SHORT) written;
!     }

      while (g_coord.X > g_srScrollRegion.Right)
      {
*** ../vim-7.4.851/src/ui.c	2015-08-11 19:13:55.146175594 +0200
--- src/ui.c	2015-09-01 20:27:49.069924312 +0200
***************
*** 42,48 ****
      /* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
      if (!(silent_mode && p_verbose == 0))
      {
! #ifdef FEAT_MBYTE
  	char_u	*tofree = NULL;

  	if (output_conv.vc_type != CONV_NONE)
--- 42,48 ----
      /* Don't output anything in silent mode ("ex -s") unless 'verbose' set */
      if (!(silent_mode && p_verbose == 0))
      {
! #if defined(FEAT_MBYTE) && !defined(WIN3264)
  	char_u	*tofree = NULL;

  	if (output_conv.vc_type != CONV_NONE)
***************
*** 56,62 ****

  	mch_write(s, len);

! #ifdef FEAT_MBYTE
  	if (output_conv.vc_type != CONV_NONE)
  	    vim_free(tofree);
  #endif
--- 56,62 ----

  	mch_write(s, len);

! #if defined(FEAT_MBYTE) && !defined(WIN3264)
  	if (output_conv.vc_type != CONV_NONE)
  	    vim_free(tofree);
  #endif
*** ../vim-7.4.851/runtime/doc/options.txt	2015-07-21 17:53:11.573528028 +0200
--- runtime/doc/options.txt	2015-09-01 20:29:21.724964297 +0200
***************
*** 7377,7390 ****
  	the GUI it only applies to the keyboard ( 'encoding' is used for the
  	display).  Except for the Mac when 'macatsui' is off, then
  	'termencoding' should be "macroman".
- 	In the Win32 console version the default value is the console codepage
- 	when it differs from the ANSI codepage.
  								*E617*
  	Note: This does not apply to the GTK+ 2 GUI.  After the GUI has been
  	successfully initialized, 'termencoding' is forcibly set to "utf-8".
  	Any attempts to set a different value will be rejected, and an error
  	message is shown.
! 	For the Win32 GUI 'termencoding' is not used for typed characters,
  	because the Win32 system always passes Unicode characters.
  	When empty, the same encoding is used as for the 'encoding' option.
  	This is the normal value.
--- 7396,7407 ----
  	the GUI it only applies to the keyboard ( 'encoding' is used for the
  	display).  Except for the Mac when 'macatsui' is off, then
  	'termencoding' should be "macroman".
  								*E617*
  	Note: This does not apply to the GTK+ 2 GUI.  After the GUI has been
  	successfully initialized, 'termencoding' is forcibly set to "utf-8".
  	Any attempts to set a different value will be rejected, and an error
  	message is shown.
! 	For the Win32 GUI and console versions 'termencoding' is not used,
  	because the Win32 system always passes Unicode characters.
  	When empty, the same encoding is used as for the 'encoding' option.
  	This is the normal value.
*** ../vim-7.4.851/src/version.c	2015-09-01 20:23:30.408603580 +0200
--- src/version.c	2015-09-01 20:27:43.713979797 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     852,
  /**/

-- 
(letter from Mark to Mike, about the film's probable certificate)
      I would like to get back to the Censor and agree to lose the shits, take
      the odd Jesus Christ out and lose Oh fuck off, but to retain 'fart in
      your general direction', 'castanets of your testicles' and 'oral sex'
      and ask him for an 'A' rating on that basis.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram <at> 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    ///

-- 
--

-- 
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 vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Gmane