|
Karsten Hopp |
68e2f1 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
68e2f1 |
Subject: Patch 7.4.483
|
|
Karsten Hopp |
68e2f1 |
Fcc: outbox
|
|
Karsten Hopp |
68e2f1 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
68e2f1 |
Mime-Version: 1.0
|
|
Karsten Hopp |
68e2f1 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
68e2f1 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
68e2f1 |
------------
|
|
Karsten Hopp |
68e2f1 |
|
|
Karsten Hopp |
68e2f1 |
Patch 7.4.483
|
|
Karsten Hopp |
68e2f1 |
Problem: A 0x80 byte is not handled correctly in abbreviations.
|
|
Karsten Hopp |
68e2f1 |
Solution: Unescape special characters. Add a test. (Christian Brabandt)
|
|
Karsten Hopp |
68e2f1 |
Files: src/getchar.c, src/testdir/Make_amiga.mak,
|
|
Karsten Hopp |
68e2f1 |
src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
|
|
Karsten Hopp |
68e2f1 |
src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
|
|
Karsten Hopp |
68e2f1 |
src/testdir/Makefile, src/testdir/test_mapping.in,
|
|
Karsten Hopp |
68e2f1 |
src/testdir/test_mapping.ok
|
|
Karsten Hopp |
68e2f1 |
|
|
Karsten Hopp |
68e2f1 |
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/getchar.c 2014-10-09 13:36:12.736888764 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/getchar.c 2014-10-21 16:19:23.907174882 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 4443,4448 ****
|
|
Karsten Hopp |
68e2f1 |
--- 4443,4449 ----
|
|
Karsten Hopp |
68e2f1 |
#endif
|
|
Karsten Hopp |
68e2f1 |
int is_id = TRUE;
|
|
Karsten Hopp |
68e2f1 |
int vim_abbr;
|
|
Karsten Hopp |
68e2f1 |
+ int qlen; /* length of q, CSI/K_SPECIAL unescaped */
|
|
Karsten Hopp |
68e2f1 |
|
|
Karsten Hopp |
68e2f1 |
if (typebuf.tb_no_abbr_cnt) /* abbrev. are not recursive */
|
|
Karsten Hopp |
68e2f1 |
return FALSE;
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 4520,4525 ****
|
|
Karsten Hopp |
68e2f1 |
--- 4521,4539 ----
|
|
Karsten Hopp |
68e2f1 |
#else
|
|
Karsten Hopp |
68e2f1 |
mp = first_abbr;
|
|
Karsten Hopp |
68e2f1 |
#endif
|
|
Karsten Hopp |
68e2f1 |
+ qlen = mp->m_keylen;
|
|
Karsten Hopp |
68e2f1 |
+ if (vim_strbyte(mp->m_keys, K_SPECIAL) != NULL)
|
|
Karsten Hopp |
68e2f1 |
+ {
|
|
Karsten Hopp |
68e2f1 |
+ char_u *q = vim_strsave(mp->m_keys);
|
|
Karsten Hopp |
68e2f1 |
+
|
|
Karsten Hopp |
68e2f1 |
+ /* might have CSI escaped mp->m_keys */
|
|
Karsten Hopp |
68e2f1 |
+ if (q != NULL)
|
|
Karsten Hopp |
68e2f1 |
+ {
|
|
Karsten Hopp |
68e2f1 |
+ vim_unescape_csi(q);
|
|
Karsten Hopp |
68e2f1 |
+ qlen = STRLEN(q);
|
|
Karsten Hopp |
68e2f1 |
+ vim_free(q);
|
|
Karsten Hopp |
68e2f1 |
+ }
|
|
Karsten Hopp |
68e2f1 |
+ }
|
|
Karsten Hopp |
68e2f1 |
for ( ; mp;
|
|
Karsten Hopp |
68e2f1 |
#ifdef FEAT_LOCALMAP
|
|
Karsten Hopp |
68e2f1 |
mp->m_next == NULL ? (mp = mp2, mp2 = NULL) :
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 4528,4534 ****
|
|
Karsten Hopp |
68e2f1 |
{
|
|
Karsten Hopp |
68e2f1 |
/* find entries with right mode and keys */
|
|
Karsten Hopp |
68e2f1 |
if ( (mp->m_mode & State)
|
|
Karsten Hopp |
68e2f1 |
! && mp->m_keylen == len
|
|
Karsten Hopp |
68e2f1 |
&& !STRNCMP(mp->m_keys, ptr, (size_t)len))
|
|
Karsten Hopp |
68e2f1 |
break;
|
|
Karsten Hopp |
68e2f1 |
}
|
|
Karsten Hopp |
68e2f1 |
--- 4542,4548 ----
|
|
Karsten Hopp |
68e2f1 |
{
|
|
Karsten Hopp |
68e2f1 |
/* find entries with right mode and keys */
|
|
Karsten Hopp |
68e2f1 |
if ( (mp->m_mode & State)
|
|
Karsten Hopp |
68e2f1 |
! && qlen == len
|
|
Karsten Hopp |
68e2f1 |
&& !STRNCMP(mp->m_keys, ptr, (size_t)len))
|
|
Karsten Hopp |
68e2f1 |
break;
|
|
Karsten Hopp |
68e2f1 |
}
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/Make_amiga.mak 2014-08-16 18:36:38.593993280 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/Make_amiga.mak 2014-10-21 16:12:45.523174012 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 43,48 ****
|
|
Karsten Hopp |
68e2f1 |
--- 43,49 ----
|
|
Karsten Hopp |
68e2f1 |
test_insertcount.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e2f1 |
+ test_mapping.out \
|
|
Karsten Hopp |
68e2f1 |
test_options.out \
|
|
Karsten Hopp |
68e2f1 |
test_qf_title.out \
|
|
Karsten Hopp |
68e2f1 |
test_utf8.out
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/Make_dos.mak 2014-10-09 15:37:02.492904600 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/Make_dos.mak 2014-10-21 16:12:45.523174012 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 42,47 ****
|
|
Karsten Hopp |
68e2f1 |
--- 42,48 ----
|
|
Karsten Hopp |
68e2f1 |
test_insertcount.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e2f1 |
+ test_mapping.out \
|
|
Karsten Hopp |
68e2f1 |
test_options.out \
|
|
Karsten Hopp |
68e2f1 |
test_qf_title.out \
|
|
Karsten Hopp |
68e2f1 |
test_utf8.out
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/Make_ming.mak 2014-08-16 18:36:38.593993280 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/Make_ming.mak 2014-10-21 16:12:45.527174012 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 62,67 ****
|
|
Karsten Hopp |
68e2f1 |
--- 62,68 ----
|
|
Karsten Hopp |
68e2f1 |
test_insertcount.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e2f1 |
+ test_mapping.out \
|
|
Karsten Hopp |
68e2f1 |
test_options.out \
|
|
Karsten Hopp |
68e2f1 |
test_qf_title.out \
|
|
Karsten Hopp |
68e2f1 |
test_utf8.out
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/Make_os2.mak 2014-08-16 18:36:38.593993280 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/Make_os2.mak 2014-10-21 16:15:40.139174393 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 44,49 ****
|
|
Karsten Hopp |
68e2f1 |
--- 44,50 ----
|
|
Karsten Hopp |
68e2f1 |
test_insertcount.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e2f1 |
+ test_mapping.out \
|
|
Karsten Hopp |
68e2f1 |
test_options.out \
|
|
Karsten Hopp |
68e2f1 |
test_qf_title.out \
|
|
Karsten Hopp |
68e2f1 |
test_utf8.out
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/Make_vms.mms 2014-08-16 18:36:38.597993280 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/Make_vms.mms 2014-10-21 16:12:45.527174012 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 103,108 ****
|
|
Karsten Hopp |
68e2f1 |
--- 103,109 ----
|
|
Karsten Hopp |
68e2f1 |
test_insertcount.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e2f1 |
+ test_mapping.out \
|
|
Karsten Hopp |
68e2f1 |
test_options.out \
|
|
Karsten Hopp |
68e2f1 |
test_qf_title.out \
|
|
Karsten Hopp |
68e2f1 |
test_utf8.out
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/Makefile 2014-08-16 18:36:38.597993280 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/Makefile 2014-10-21 16:16:05.771174449 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 40,45 ****
|
|
Karsten Hopp |
68e2f1 |
--- 40,46 ----
|
|
Karsten Hopp |
68e2f1 |
test_insertcount.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr.out \
|
|
Karsten Hopp |
68e2f1 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e2f1 |
+ test_mapping.out \
|
|
Karsten Hopp |
68e2f1 |
test_options.out \
|
|
Karsten Hopp |
68e2f1 |
test_qf_title.out \
|
|
Karsten Hopp |
68e2f1 |
test_utf8.out
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/test_mapping.in 2014-10-21 16:21:48.163175197 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/test_mapping.in 2014-10-21 16:12:45.527174012 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 0 ****
|
|
Karsten Hopp |
68e2f1 |
--- 1,15 ----
|
|
Karsten Hopp |
68e2f1 |
+ Test for mappings and abbreviations
|
|
Karsten Hopp |
68e2f1 |
+
|
|
Karsten Hopp |
68e2f1 |
+ STARTTEST
|
|
Karsten Hopp |
68e2f1 |
+ :so small.vim
|
|
Karsten Hopp |
68e2f1 |
+ :so mbyte.vim
|
|
Karsten Hopp |
68e2f1 |
+ : " abbreviations with р (0x80) should work
|
|
Karsten Hopp |
68e2f1 |
+ :inoreab чкпр vim
|
|
Karsten Hopp |
68e2f1 |
+ GAчкпр
|
|
Karsten Hopp |
68e2f1 |
+ ?
|
|
Karsten Hopp |
68e2f1 |
+ :/^test/,$w! test.out
|
|
Karsten Hopp |
68e2f1 |
+ :qa!
|
|
Karsten Hopp |
68e2f1 |
+ ENDTEST
|
|
Karsten Hopp |
68e2f1 |
+
|
|
Karsten Hopp |
68e2f1 |
+ test starts here:
|
|
Karsten Hopp |
68e2f1 |
+
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/testdir/test_mapping.ok 2014-10-21 16:21:48.167175197 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/testdir/test_mapping.ok 2014-10-21 16:12:45.527174012 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 0 ****
|
|
Karsten Hopp |
68e2f1 |
--- 1,2 ----
|
|
Karsten Hopp |
68e2f1 |
+ test starts here:
|
|
Karsten Hopp |
68e2f1 |
+ vim
|
|
Karsten Hopp |
68e2f1 |
*** ../vim-7.4.482/src/version.c 2014-10-21 14:15:13.419158607 +0200
|
|
Karsten Hopp |
68e2f1 |
--- src/version.c 2014-10-21 16:17:25.139174622 +0200
|
|
Karsten Hopp |
68e2f1 |
***************
|
|
Karsten Hopp |
68e2f1 |
*** 743,744 ****
|
|
Karsten Hopp |
68e2f1 |
--- 743,746 ----
|
|
Karsten Hopp |
68e2f1 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
68e2f1 |
+ /**/
|
|
Karsten Hopp |
68e2f1 |
+ 483,
|
|
Karsten Hopp |
68e2f1 |
/**/
|
|
Karsten Hopp |
68e2f1 |
|
|
Karsten Hopp |
68e2f1 |
--
|
|
Karsten Hopp |
68e2f1 |
E M A C S
|
|
Karsten Hopp |
68e2f1 |
s e l o h
|
|
Karsten Hopp |
68e2f1 |
c t t n i
|
|
Karsten Hopp |
68e2f1 |
a a t f
|
|
Karsten Hopp |
68e2f1 |
p r t
|
|
Karsten Hopp |
68e2f1 |
e o
|
|
Karsten Hopp |
68e2f1 |
l
|
|
Karsten Hopp |
68e2f1 |
|
|
Karsten Hopp |
68e2f1 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
68e2f1 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
68e2f1 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
68e2f1 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|