annotate src/dehqx.py @ 20927:9328feafbbf5 v8.2.1015

patch 8.2.1015: popup filter gets key with modifier prepended Commit: https://github.com/vim/vim/commit/20298ce679dbf21c07c8fe2161724a12424f1e69 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 19 21:46:52 2020 +0200 patch 8.2.1015: popup filter gets key with modifier prepended Problem: Popup filter gets key with modifier prepended when using modifyOtherKeys. Solution: Remove the shift modifier when it is included in the key, also when the Alt or Meta modifier is used.
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Jun 2020 22:00:04 +0200
parents 54756c29118c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 # Python script to get both the data and resource fork from a BinHex encoded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 # file.
3614
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 # Author: MURAOKA Taro <koron.kaoriya@gmail.com>
13549
54756c29118c patch 8.0.1648: resource fork tool doesn't work on Python 3
Christian Brabandt <cb@256bit.org>
parents: 3614
diff changeset
4 # Last Change: 2018 Mar 27
3614
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 #
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
6 # Copyright (C) 2003,12 MURAOKA Taro <koron.kaoriya@gmail.com>
f90bb88c2615 updated for version 7.3.567
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
7 # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 import sys
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 import binhex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 input = sys.argv[1]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 conv = binhex.HexBin(input)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 info = conv.FInfo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 out = conv.FName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 out_data = out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 out_rsrc = out + '.rsrcfork'
13549
54756c29118c patch 8.0.1648: resource fork tool doesn't work on Python 3
Christian Brabandt <cb@256bit.org>
parents: 3614
diff changeset
18
54756c29118c patch 8.0.1648: resource fork tool doesn't work on Python 3
Christian Brabandt <cb@256bit.org>
parents: 3614
diff changeset
19 # This uses the print statement on Python 2, print function on Python 3.
54756c29118c patch 8.0.1648: resource fork tool doesn't work on Python 3
Christian Brabandt <cb@256bit.org>
parents: 3614
diff changeset
20 #print('out_rsrc=' + out_rsrc)
54756c29118c patch 8.0.1648: resource fork tool doesn't work on Python 3
Christian Brabandt <cb@256bit.org>
parents: 3614
diff changeset
21 print('In file: ' + input)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 outfile = open(out_data, 'wb')
13549
54756c29118c patch 8.0.1648: resource fork tool doesn't work on Python 3
Christian Brabandt <cb@256bit.org>
parents: 3614
diff changeset
24 print(' Out data fork: ' + out_data)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 while 1:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 d = conv.read(128000)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 if not d: break
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 outfile.write(d)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 outfile.close()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 conv.close_data()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 d = conv.read_rsrc(128000)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 if d:
13549
54756c29118c patch 8.0.1648: resource fork tool doesn't work on Python 3
Christian Brabandt <cb@256bit.org>
parents: 3614
diff changeset
34 print(' Out rsrc fork: ' + out_rsrc)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 outfile = open(out_rsrc, 'wb')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 outfile.write(d)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 while 1:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 d = conv.read_rsrc(128000)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 if not d: break
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 outfile.write(d)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 outfile.close()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 conv.close()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 # vim:set ts=8 sts=4 sw=4 et: