Mercurial > vim
annotate src/dehqx.py @ 13790:dd6a63e3e7c4 v8.0.1767
patch 8.0.1767: with 'incsearch' text may jump up and down
commit https://github.com/vim/vim/commit/9d34d90210ba52ebaf45973282e5921f5af364c7
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 27 22:18:12 2018 +0200
patch 8.0.1767: with 'incsearch' text may jump up and down
Problem: With 'incsearch' text may jump up and down. ()
Solution: Besides w_botline also save and restore w_empty_rows.
(closes # 2530)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 27 Apr 2018 22:30:06 +0200 |
parents | 54756c29118c |
children |
rev | line source |
---|---|
7 | 1 # Python script to get both the data and resource fork from a BinHex encoded |
2 # file. | |
3614 | 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 | 5 # |
6 # Copyright (C) 2003,12 MURAOKA Taro <koron.kaoriya@gmail.com> | |
7 # THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. | |
7 | 8 |
9 import sys | |
10 import binhex | |
11 | |
12 input = sys.argv[1] | |
13 conv = binhex.HexBin(input) | |
14 info = conv.FInfo | |
15 out = conv.FName | |
16 out_data = out | |
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 | 22 |
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 | 25 while 1: |
26 d = conv.read(128000) | |
27 if not d: break | |
28 outfile.write(d) | |
29 outfile.close() | |
30 conv.close_data() | |
31 | |
32 d = conv.read_rsrc(128000) | |
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 | 35 outfile = open(out_rsrc, 'wb') |
36 outfile.write(d) | |
37 while 1: | |
38 d = conv.read_rsrc(128000) | |
39 if not d: break | |
40 outfile.write(d) | |
41 outfile.close() | |
42 | |
43 conv.close() | |
44 | |
45 # vim:set ts=8 sts=4 sw=4 et: |