Mercurial > vim
comparison src/macros.h @ 9925:3fba3e8326a7 v7.4.2236
commit https://github.com/vim/vim/commit/920694c1b60fac8017b8909efcc24f189804a9bb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 21 17:45:02 2016 +0200
patch 7.4.2236
Problem: The 'langnoremap' option leads to double negatives. And it does
not work for the last character of a mapping.
Solution: Add 'langremap' with the opposite value. Keep 'langnoremap' for
backwards compatibility. Make it work for the last character of a
mapping. Make the test work.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 21 Aug 2016 18:00:07 +0200 |
parents | bff8a09016a5 |
children | 4aead6a9b7a9 |
comparison
equal
deleted
inserted
replaced
9924:cb0cb5358209 | 9925:3fba3e8326a7 |
---|---|
133 # ifdef FEAT_MBYTE | 133 # ifdef FEAT_MBYTE |
134 # define LANGMAP_ADJUST(c, condition) \ | 134 # define LANGMAP_ADJUST(c, condition) \ |
135 do { \ | 135 do { \ |
136 if (*p_langmap \ | 136 if (*p_langmap \ |
137 && (condition) \ | 137 && (condition) \ |
138 && (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \ | 138 && (p_lrm || (!p_lrm && KeyTyped)) \ |
139 && !KeyStuffed \ | 139 && !KeyStuffed \ |
140 && (c) >= 0) \ | 140 && (c) >= 0) \ |
141 { \ | 141 { \ |
142 if ((c) < 256) \ | 142 if ((c) < 256) \ |
143 c = langmap_mapchar[c]; \ | 143 c = langmap_mapchar[c]; \ |
148 # else | 148 # else |
149 # define LANGMAP_ADJUST(c, condition) \ | 149 # define LANGMAP_ADJUST(c, condition) \ |
150 do { \ | 150 do { \ |
151 if (*p_langmap \ | 151 if (*p_langmap \ |
152 && (condition) \ | 152 && (condition) \ |
153 && (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \ | 153 && (p_lrm || (!p_lrm && KeyTyped)) \ |
154 && !KeyStuffed \ | 154 && !KeyStuffed \ |
155 && (c) >= 0 && (c) < 256) \ | 155 && (c) >= 0 && (c) < 256) \ |
156 c = langmap_mapchar[c]; \ | 156 c = langmap_mapchar[c]; \ |
157 } while (0) | 157 } while (0) |
158 # endif | 158 # endif |