comparison src/testdir/test_termcodes.vim @ 17914:af3d441845cd v8.1.1953

patch 8.1.1953: more functions can be used as a method Commit: https://github.com/vim/vim/commit/f9f24ce7a0e5988fedf2e2ff751818f9b07510a6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 31 21:17:39 2019 +0200 patch 8.1.1953: more functions can be used as a method Problem: More functions can be used as a method. Solution: Allow more functions to be used as a method.
author Bram Moolenaar <Bram@vim.org>
date Sat, 31 Aug 2019 21:30:04 +0200
parents 853afcc375b2
children 8a2fb21c23c0
comparison
equal deleted inserted replaced
17913:be8ab5bb74ce 17914:af3d441845cd
31 func TerminalEscapeCode(code, row, col, m) 31 func TerminalEscapeCode(code, row, col, m)
32 if &ttymouse ==# 'xterm2' 32 if &ttymouse ==# 'xterm2'
33 " need to use byte encoding here. 33 " need to use byte encoding here.
34 let str = list2str([a:code + 0x20, a:col + 0x20, a:row + 0x20]) 34 let str = list2str([a:code + 0x20, a:col + 0x20, a:row + 0x20])
35 if has('iconv') 35 if has('iconv')
36 let bytes = iconv(str, 'utf-8', 'latin1') 36 let bytes = str->iconv('utf-8', 'latin1')
37 else 37 else
38 " Hopefully the numbers are not too big. 38 " Hopefully the numbers are not too big.
39 let bytes = str 39 let bytes = str
40 endif 40 endif
41 call feedkeys("\<Esc>[M" .. bytes, 'Lx!') 41 call feedkeys("\<Esc>[M" .. bytes, 'Lx!')