|
Karsten Hopp |
780fcd |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
780fcd |
Subject: Patch 7.4.502
|
|
Karsten Hopp |
780fcd |
Fcc: outbox
|
|
Karsten Hopp |
780fcd |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
780fcd |
Mime-Version: 1.0
|
|
Karsten Hopp |
780fcd |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
780fcd |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
780fcd |
------------
|
|
Karsten Hopp |
780fcd |
|
|
Karsten Hopp |
780fcd |
Patch 7.4.502
|
|
Karsten Hopp |
780fcd |
Problem: Language mapping also applies to mapped characters.
|
|
Karsten Hopp |
780fcd |
Solution: Add the 'langnoremap' option, when on 'langmap' does not apply to
|
|
Karsten Hopp |
780fcd |
mapped characters. (Christian Brabandt)
|
|
Karsten Hopp |
780fcd |
Files: runtime/doc/options.txt, runtime/vimrc_example.vim, src/macros.h,
|
|
Karsten Hopp |
780fcd |
src/option.c, src/option.h
|
|
Karsten Hopp |
780fcd |
|
|
Karsten Hopp |
780fcd |
|
|
Karsten Hopp |
780fcd |
*** ../vim-7.4.501/runtime/doc/options.txt 2014-11-05 14:26:30.760758363 +0100
|
|
Karsten Hopp |
780fcd |
--- runtime/doc/options.txt 2014-11-05 17:21:15.676505715 +0100
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 4533,4538 ****
|
|
Karsten Hopp |
780fcd |
--- 4534,4543 ----
|
|
Karsten Hopp |
780fcd |
be able to execute Normal mode commands.
|
|
Karsten Hopp |
780fcd |
This is the opposite of the 'keymap' option, where characters are
|
|
Karsten Hopp |
780fcd |
mapped in Insert mode.
|
|
Karsten Hopp |
780fcd |
+ Also consider setting 'langnoremap' to avoid 'langmap' applies to
|
|
Karsten Hopp |
780fcd |
+ characters resulting from a mapping.
|
|
Karsten Hopp |
780fcd |
+ This option cannot be set from a |modeline| or in the |sandbox|, for
|
|
Karsten Hopp |
780fcd |
+ security reasons.
|
|
Karsten Hopp |
780fcd |
|
|
Karsten Hopp |
780fcd |
Example (for Greek, in UTF-8): *greek* >
|
|
Karsten Hopp |
780fcd |
:set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 4586,4591 ****
|
|
Karsten Hopp |
780fcd |
--- 4591,4608 ----
|
|
Karsten Hopp |
780fcd |
:source $VIMRUNTIME/menu.vim
|
|
Karsten Hopp |
780fcd |
< Warning: This deletes all menus that you defined yourself!
|
|
Karsten Hopp |
780fcd |
|
|
Karsten Hopp |
780fcd |
+ *'langnoremap'* *'lnr'*
|
|
Karsten Hopp |
780fcd |
+ 'langnoremap' 'lnr' boolean (default off)
|
|
Karsten Hopp |
780fcd |
+ global
|
|
Karsten Hopp |
780fcd |
+ {not in Vi}
|
|
Karsten Hopp |
780fcd |
+ {only available when compiled with the |+langmap|
|
|
Karsten Hopp |
780fcd |
+ feature}
|
|
Karsten Hopp |
780fcd |
+ When on, setting 'langmap' does not apply to characters resulting from
|
|
Karsten Hopp |
780fcd |
+ a mapping. This basically means, if you noticed that setting
|
|
Karsten Hopp |
780fcd |
+ 'langmap' disables some of your mappings, try setting this option.
|
|
Karsten Hopp |
780fcd |
+ This option defaults to off for backwards compatibility. Set it on if
|
|
Karsten Hopp |
780fcd |
+ that works for you to avoid mappings to break.
|
|
Karsten Hopp |
780fcd |
+
|
|
Karsten Hopp |
780fcd |
*'laststatus'* *'ls'*
|
|
Karsten Hopp |
780fcd |
'laststatus' 'ls' number (default 1)
|
|
Karsten Hopp |
780fcd |
global
|
|
Karsten Hopp |
780fcd |
*** ../vim-7.4.501/runtime/vimrc_example.vim 2014-02-05 22:01:56.686546587 +0100
|
|
Karsten Hopp |
780fcd |
--- runtime/vimrc_example.vim 2014-11-05 17:23:26.808502555 +0100
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 1,7 ****
|
|
Karsten Hopp |
780fcd |
" An example for a vimrc file.
|
|
Karsten Hopp |
780fcd |
"
|
|
Karsten Hopp |
780fcd |
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
|
Karsten Hopp |
780fcd |
! " Last change: 2014 Feb 05
|
|
Karsten Hopp |
780fcd |
"
|
|
Karsten Hopp |
780fcd |
" To use it, copy it to
|
|
Karsten Hopp |
780fcd |
" for Unix and OS/2: ~/.vimrc
|
|
Karsten Hopp |
780fcd |
--- 1,7 ----
|
|
Karsten Hopp |
780fcd |
" An example for a vimrc file.
|
|
Karsten Hopp |
780fcd |
"
|
|
Karsten Hopp |
780fcd |
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
|
Karsten Hopp |
780fcd |
! " Last change: 2014 Nov 05
|
|
Karsten Hopp |
780fcd |
"
|
|
Karsten Hopp |
780fcd |
" To use it, copy it to
|
|
Karsten Hopp |
780fcd |
" for Unix and OS/2: ~/.vimrc
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 95,97 ****
|
|
Karsten Hopp |
780fcd |
--- 95,104 ----
|
|
Karsten Hopp |
780fcd |
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
|
|
Karsten Hopp |
780fcd |
\ | wincmd p | diffthis
|
|
Karsten Hopp |
780fcd |
endif
|
|
Karsten Hopp |
780fcd |
+
|
|
Karsten Hopp |
780fcd |
+ if has('langmap') && exists('+langnoremap')
|
|
Karsten Hopp |
780fcd |
+ " Prevent that the langmap option applies to characters that result from a
|
|
Karsten Hopp |
780fcd |
+ " mapping. If unset (default), this may break plugins (but it's backward
|
|
Karsten Hopp |
780fcd |
+ " compatible).
|
|
Karsten Hopp |
780fcd |
+ set langnoremap
|
|
Karsten Hopp |
780fcd |
+ endif
|
|
Karsten Hopp |
780fcd |
*** ../vim-7.4.501/src/macros.h 2014-05-13 20:19:53.569808877 +0200
|
|
Karsten Hopp |
780fcd |
--- src/macros.h 2014-11-05 17:26:42.172497848 +0100
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 128,140 ****
|
|
Karsten Hopp |
780fcd |
* Adjust chars in a language according to 'langmap' option.
|
|
Karsten Hopp |
780fcd |
* NOTE that there is no noticeable overhead if 'langmap' is not set.
|
|
Karsten Hopp |
780fcd |
* When set the overhead for characters < 256 is small.
|
|
Karsten Hopp |
780fcd |
! * Don't apply 'langmap' if the character comes from the Stuff buffer.
|
|
Karsten Hopp |
780fcd |
* The do-while is just to ignore a ';' after the macro.
|
|
Karsten Hopp |
780fcd |
*/
|
|
Karsten Hopp |
780fcd |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
780fcd |
# define LANGMAP_ADJUST(c, condition) \
|
|
Karsten Hopp |
780fcd |
do { \
|
|
Karsten Hopp |
780fcd |
! if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0) \
|
|
Karsten Hopp |
780fcd |
{ \
|
|
Karsten Hopp |
780fcd |
if ((c) < 256) \
|
|
Karsten Hopp |
780fcd |
c = langmap_mapchar[c]; \
|
|
Karsten Hopp |
780fcd |
--- 128,145 ----
|
|
Karsten Hopp |
780fcd |
* Adjust chars in a language according to 'langmap' option.
|
|
Karsten Hopp |
780fcd |
* NOTE that there is no noticeable overhead if 'langmap' is not set.
|
|
Karsten Hopp |
780fcd |
* When set the overhead for characters < 256 is small.
|
|
Karsten Hopp |
780fcd |
! * Don't apply 'langmap' if the character comes from the Stuff buffer or from
|
|
Karsten Hopp |
780fcd |
! * a mapping and the langnoremap option was set.
|
|
Karsten Hopp |
780fcd |
* The do-while is just to ignore a ';' after the macro.
|
|
Karsten Hopp |
780fcd |
*/
|
|
Karsten Hopp |
780fcd |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
780fcd |
# define LANGMAP_ADJUST(c, condition) \
|
|
Karsten Hopp |
780fcd |
do { \
|
|
Karsten Hopp |
780fcd |
! if (*p_langmap \
|
|
Karsten Hopp |
780fcd |
! && (condition) \
|
|
Karsten Hopp |
780fcd |
! && (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \
|
|
Karsten Hopp |
780fcd |
! && !KeyStuffed \
|
|
Karsten Hopp |
780fcd |
! && (c) >= 0) \
|
|
Karsten Hopp |
780fcd |
{ \
|
|
Karsten Hopp |
780fcd |
if ((c) < 256) \
|
|
Karsten Hopp |
780fcd |
c = langmap_mapchar[c]; \
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 145,151 ****
|
|
Karsten Hopp |
780fcd |
# else
|
|
Karsten Hopp |
780fcd |
# define LANGMAP_ADJUST(c, condition) \
|
|
Karsten Hopp |
780fcd |
do { \
|
|
Karsten Hopp |
780fcd |
! if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0 && (c) < 256) \
|
|
Karsten Hopp |
780fcd |
c = langmap_mapchar[c]; \
|
|
Karsten Hopp |
780fcd |
} while (0)
|
|
Karsten Hopp |
780fcd |
# endif
|
|
Karsten Hopp |
780fcd |
--- 150,160 ----
|
|
Karsten Hopp |
780fcd |
# else
|
|
Karsten Hopp |
780fcd |
# define LANGMAP_ADJUST(c, condition) \
|
|
Karsten Hopp |
780fcd |
do { \
|
|
Karsten Hopp |
780fcd |
! if (*p_langmap \
|
|
Karsten Hopp |
780fcd |
! && (condition) \
|
|
Karsten Hopp |
780fcd |
! && (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \
|
|
Karsten Hopp |
780fcd |
! && !KeyStuffed \
|
|
Karsten Hopp |
780fcd |
! && (c) >= 0 && (c) < 256) \
|
|
Karsten Hopp |
780fcd |
c = langmap_mapchar[c]; \
|
|
Karsten Hopp |
780fcd |
} while (0)
|
|
Karsten Hopp |
780fcd |
# endif
|
|
Karsten Hopp |
780fcd |
*** ../vim-7.4.501/src/option.c 2014-09-29 17:15:09.963945227 +0200
|
|
Karsten Hopp |
780fcd |
--- src/option.c 2014-11-05 17:17:44.208510810 +0100
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 1691,1696 ****
|
|
Karsten Hopp |
780fcd |
--- 1691,1703 ----
|
|
Karsten Hopp |
780fcd |
(char_u *)NULL, PV_NONE,
|
|
Karsten Hopp |
780fcd |
#endif
|
|
Karsten Hopp |
780fcd |
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
|
Karsten Hopp |
780fcd |
+ {"langnoremap", "lnr", P_BOOL|P_VI_DEF,
|
|
Karsten Hopp |
780fcd |
+ #ifdef FEAT_LANGMAP
|
|
Karsten Hopp |
780fcd |
+ (char_u *)&p_lnr, PV_NONE,
|
|
Karsten Hopp |
780fcd |
+ #else
|
|
Karsten Hopp |
780fcd |
+ (char_u *)NULL, PV_NONE,
|
|
Karsten Hopp |
780fcd |
+ #endif
|
|
Karsten Hopp |
780fcd |
+ {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
|
Karsten Hopp |
780fcd |
{"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL,
|
|
Karsten Hopp |
780fcd |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
780fcd |
(char_u *)&p_ls, PV_NONE,
|
|
Karsten Hopp |
780fcd |
*** ../vim-7.4.501/src/option.h 2014-09-23 15:45:04.870801055 +0200
|
|
Karsten Hopp |
780fcd |
--- src/option.h 2014-11-05 17:17:44.212510810 +0100
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 576,581 ****
|
|
Karsten Hopp |
780fcd |
--- 576,582 ----
|
|
Karsten Hopp |
780fcd |
EXTERN char_u *p_km; /* 'keymodel' */
|
|
Karsten Hopp |
780fcd |
#ifdef FEAT_LANGMAP
|
|
Karsten Hopp |
780fcd |
EXTERN char_u *p_langmap; /* 'langmap'*/
|
|
Karsten Hopp |
780fcd |
+ EXTERN int p_lnr; /* 'langnoremap' */
|
|
Karsten Hopp |
780fcd |
#endif
|
|
Karsten Hopp |
780fcd |
#if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
|
|
Karsten Hopp |
780fcd |
EXTERN char_u *p_lm; /* 'langmenu' */
|
|
Karsten Hopp |
780fcd |
*** ../vim-7.4.501/src/version.c 2014-11-05 17:04:10.516530418 +0100
|
|
Karsten Hopp |
780fcd |
--- src/version.c 2014-11-05 17:15:31.820514001 +0100
|
|
Karsten Hopp |
780fcd |
***************
|
|
Karsten Hopp |
780fcd |
*** 743,744 ****
|
|
Karsten Hopp |
780fcd |
--- 743,746 ----
|
|
Karsten Hopp |
780fcd |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
780fcd |
+ /**/
|
|
Karsten Hopp |
780fcd |
+ 502,
|
|
Karsten Hopp |
780fcd |
/**/
|
|
Karsten Hopp |
780fcd |
|
|
Karsten Hopp |
780fcd |
--
|
|
Karsten Hopp |
780fcd |
MARTHA'S WAY: Don't throw out all that leftover wine. Freeze into ice cubes
|
|
Karsten Hopp |
780fcd |
for future use in casseroles and sauces.
|
|
Karsten Hopp |
780fcd |
MY WAY: What leftover wine?
|
|
Karsten Hopp |
780fcd |
|
|
Karsten Hopp |
780fcd |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
780fcd |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
780fcd |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
780fcd |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|