To: vim_dev@googlegroups.com Subject: Patch 8.1.1759 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1759 Problem: No mode char for terminal mapping from maparg(). Solution: Check for TERMINAL mode. (closes #4735) Files: src/getchar.c, src/testdir/test_maparg.vim *** ../vim-8.1.1758/src/getchar.c 2019-07-05 23:24:39.158501402 +0200 --- src/getchar.c 2019-07-27 21:05:10.347987940 +0200 *************** *** 4009,4014 **** --- 4009,4016 ---- ga_append(&mapmode, 'n'); /* :nmap */ if (mode & OP_PENDING) ga_append(&mapmode, 'o'); /* :omap */ + if (mode & TERMINAL) + ga_append(&mapmode, 't'); /* :tmap */ if ((mode & (VISUAL + SELECTMODE)) == VISUAL + SELECTMODE) ga_append(&mapmode, 'v'); /* :vmap */ else *** ../vim-8.1.1758/src/testdir/test_maparg.vim 2019-01-24 17:59:35.139217458 +0100 --- src/testdir/test_maparg.vim 2019-07-27 20:59:27.490448663 +0200 *************** *** 29,34 **** --- 29,40 ---- \ 'nowait': 1, 'expr': 0, 'sid': sid, 'lnum': lnum + 1, 'rhs': 'bar', \ 'buffer': 1}, \ maparg('foo', '', 0, 1)) + let lnum = expand('') + tmap baz foo + call assert_equal({'silent': 0, 'noremap': 0, 'lhs': 'baz', 'mode': 't', + \ 'nowait': 0, 'expr': 0, 'sid': sid, 'lnum': lnum + 1, 'rhs': 'foo', + \ 'buffer': 0}, + \ maparg('baz', 't', 0, 1)) map abc xx call assert_equal("xrx", maparg('abc')) *** ../vim-8.1.1758/src/version.c 2019-07-27 18:44:53.247184277 +0200 --- src/version.c 2019-07-27 21:01:45.961451120 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1759, /**/ -- CRONE: Who sent you? ARTHUR: The Knights Who Say GNU! CRONE: Aaaagh! (she looks around in rear) No! We have no licenses here. "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD /// Bram Moolenaar -- Bram@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 ///