summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-12-13 15:11:52 -1000
committerSam Bingner <sam@bingner.com>2018-12-13 15:11:52 -1000
commit957aa75d05c00731d7112bed7b68ce4568667d0c (patch)
tree0445216818495a7864eaa3acde1a1570d34b958d
parentc54a909c8b5a8519130803cf55f68603c0ad3682 (diff)
Update vim
-rw-r--r--data/vim/_metadata/version2
-rw-r--r--data/vim/make.sh8
-rw-r--r--data/vim/patches/.listing583
-rw-r--r--data/vim/patches/8.1.021466
-rw-r--r--data/vim/patches/8.1.021586
-rw-r--r--data/vim/patches/8.1.021676
-rw-r--r--data/vim/patches/8.1.021785
-rw-r--r--data/vim/patches/8.1.0218253
-rw-r--r--data/vim/patches/8.1.021970
-rw-r--r--data/vim/patches/8.1.022077
-rw-r--r--data/vim/patches/8.1.0221463
-rw-r--r--data/vim/patches/8.1.0222145
-rw-r--r--data/vim/patches/8.1.0223142
-rw-r--r--data/vim/patches/8.1.0224110
-rw-r--r--data/vim/patches/8.1.0225176
-rw-r--r--data/vim/patches/8.1.02261135
-rw-r--r--data/vim/patches/8.1.022775
-rw-r--r--data/vim/patches/8.1.0228569
-rw-r--r--data/vim/patches/8.1.0229124
-rw-r--r--data/vim/patches/8.1.0230156
-rw-r--r--data/vim/patches/8.1.023189
-rw-r--r--data/vim/patches/8.1.0232188
-rw-r--r--data/vim/patches/8.1.0233317
-rw-r--r--data/vim/patches/8.1.0234160
-rw-r--r--data/vim/patches/8.1.0235171
-rw-r--r--data/vim/patches/8.1.0236108
-rw-r--r--data/vim/patches/8.1.023761
-rw-r--r--data/vim/patches/8.1.023872
-rw-r--r--data/vim/patches/8.1.023988
-rw-r--r--data/vim/patches/8.1.024055
-rw-r--r--data/vim/patches/8.1.024158
-rw-r--r--data/vim/patches/8.1.024263
-rw-r--r--data/vim/patches/8.1.024389
-rw-r--r--data/vim/patches/8.1.0244245
-rw-r--r--data/vim/patches/8.1.0245114
-rw-r--r--data/vim/patches/8.1.024663
-rw-r--r--data/vim/patches/8.1.0247318
-rw-r--r--data/vim/patches/8.1.0248147
-rw-r--r--data/vim/patches/8.1.024988
-rw-r--r--data/vim/patches/8.1.0250142
-rw-r--r--data/vim/patches/8.1.0251365
-rw-r--r--data/vim/patches/8.1.02521540
-rw-r--r--data/vim/patches/8.1.0253475
-rw-r--r--data/vim/patches/8.1.025473
-rw-r--r--data/vim/patches/8.1.025573
-rw-r--r--data/vim/patches/8.1.0256286
-rw-r--r--data/vim/patches/8.1.025758
-rw-r--r--data/vim/patches/8.1.025857
-rw-r--r--data/vim/patches/8.1.0259161
-rw-r--r--data/vim/patches/8.1.026044
-rw-r--r--data/vim/patches/8.1.0261177
-rw-r--r--data/vim/patches/8.1.0262100
-rw-r--r--data/vim/patches/8.1.0263142
-rw-r--r--data/vim/patches/8.1.0264121
-rw-r--r--data/vim/patches/8.1.0265875
-rw-r--r--data/vim/patches/8.1.0266436
-rw-r--r--data/vim/patches/8.1.0267140
-rw-r--r--data/vim/patches/8.1.0268380
-rw-r--r--data/vim/patches/8.1.0269127
-rw-r--r--data/vim/patches/8.1.027055
-rw-r--r--data/vim/patches/8.1.0271489
-rw-r--r--data/vim/patches/8.1.027252
-rw-r--r--data/vim/patches/8.1.027350
-rw-r--r--data/vim/patches/8.1.0274166
-rw-r--r--data/vim/patches/8.1.0275185
-rw-r--r--data/vim/patches/8.1.027695
-rw-r--r--data/vim/patches/8.1.0277316
-rw-r--r--data/vim/patches/8.1.027895
-rw-r--r--data/vim/patches/8.1.027996
-rw-r--r--data/vim/patches/8.1.028071
-rw-r--r--data/vim/patches/8.1.0281738
-rw-r--r--data/vim/patches/8.1.0282507
-rw-r--r--data/vim/patches/8.1.028348
-rw-r--r--data/vim/patches/8.1.0284115
-rw-r--r--data/vim/patches/8.1.028551
-rw-r--r--data/vim/patches/8.1.0286104
-rw-r--r--data/vim/patches/8.1.028754
-rw-r--r--data/vim/patches/8.1.0288498
-rw-r--r--data/vim/patches/8.1.028964
-rw-r--r--data/vim/patches/8.1.029087
-rw-r--r--data/vim/patches/8.1.0291137
-rw-r--r--data/vim/patches/8.1.029269
-rw-r--r--data/vim/patches/8.1.0293186
-rw-r--r--data/vim/patches/8.1.029493
-rw-r--r--data/vim/patches/8.1.0295294
-rw-r--r--data/vim/patches/8.1.0296306
-rw-r--r--data/vim/patches/8.1.0297104
-rw-r--r--data/vim/patches/8.1.029844
-rw-r--r--data/vim/patches/8.1.029951
-rw-r--r--data/vim/patches/8.1.030080
-rw-r--r--data/vim/patches/8.1.0301261
-rw-r--r--data/vim/patches/8.1.0302247
-rw-r--r--data/vim/patches/8.1.030392
-rw-r--r--data/vim/patches/8.1.0304315
-rw-r--r--data/vim/patches/8.1.030585
-rw-r--r--data/vim/patches/8.1.0306498
-rw-r--r--data/vim/patches/8.1.0307233
-rw-r--r--data/vim/patches/8.1.030862
-rw-r--r--data/vim/patches/8.1.0309395
-rw-r--r--data/vim/patches/8.1.0310110
-rw-r--r--data/vim/patches/8.1.0311112
-rw-r--r--data/vim/patches/8.1.0312226
-rw-r--r--data/vim/patches/8.1.0313232
-rw-r--r--data/vim/patches/8.1.0314158
-rw-r--r--data/vim/patches/8.1.0315223
-rw-r--r--data/vim/patches/8.1.031661
-rw-r--r--data/vim/patches/8.1.031759
-rw-r--r--data/vim/patches/8.1.031887
-rw-r--r--data/vim/patches/8.1.031957
-rw-r--r--data/vim/patches/8.1.0320141
-rw-r--r--data/vim/patches/8.1.0321147
-rw-r--r--data/vim/patches/8.1.0322153
-rw-r--r--data/vim/patches/8.1.032376
-rw-r--r--data/vim/patches/8.1.032452
-rw-r--r--data/vim/patches/8.1.032562
-rw-r--r--data/vim/patches/8.1.0326101
-rw-r--r--data/vim/patches/8.1.0327136
-rw-r--r--data/vim/patches/8.1.0328167
-rw-r--r--data/vim/patches/8.1.032956
-rw-r--r--data/vim/patches/8.1.0330219
-rw-r--r--data/vim/patches/8.1.0331126
-rw-r--r--data/vim/patches/8.1.033254
-rw-r--r--data/vim/patches/8.1.0333133
-rw-r--r--data/vim/patches/8.1.0334118
-rw-r--r--data/vim/patches/8.1.033555
-rw-r--r--data/vim/patches/8.1.0336104
-rw-r--r--data/vim/patches/8.1.0337121
-rw-r--r--data/vim/patches/8.1.0338177
-rw-r--r--data/vim/patches/8.1.0339102
-rw-r--r--data/vim/patches/8.1.034072
-rw-r--r--data/vim/patches/8.1.0341312
-rw-r--r--data/vim/patches/8.1.0342239
-rw-r--r--data/vim/patches/8.1.034362
-rw-r--r--data/vim/patches/8.1.034485
-rw-r--r--data/vim/patches/8.1.0345286
-rw-r--r--data/vim/patches/8.1.03461530
-rw-r--r--data/vim/patches/8.1.0347174
-rw-r--r--data/vim/patches/8.1.034877
-rw-r--r--data/vim/patches/8.1.0349187
-rw-r--r--data/vim/patches/8.1.0350219
-rw-r--r--data/vim/patches/8.1.0351194
-rw-r--r--data/vim/patches/8.1.0352179
-rw-r--r--data/vim/patches/8.1.0353283
-rw-r--r--data/vim/patches/8.1.035457
-rw-r--r--data/vim/patches/8.1.035596
-rw-r--r--data/vim/patches/8.1.0356224
-rw-r--r--data/vim/patches/8.1.0357102
-rw-r--r--data/vim/patches/8.1.035851
-rw-r--r--data/vim/patches/8.1.035987
-rw-r--r--data/vim/patches/8.1.03606803
-rw-r--r--data/vim/patches/8.1.0361172
-rw-r--r--data/vim/patches/8.1.03626943
-rw-r--r--data/vim/patches/8.1.036387
-rw-r--r--data/vim/patches/8.1.036466
-rw-r--r--data/vim/patches/8.1.0365465
-rw-r--r--data/vim/patches/8.1.0366164
-rw-r--r--data/vim/patches/8.1.036753
-rw-r--r--data/vim/patches/8.1.0368695
-rw-r--r--data/vim/patches/8.1.0369297
-rw-r--r--data/vim/patches/8.1.037051
-rw-r--r--data/vim/patches/8.1.0371224
-rw-r--r--data/vim/patches/8.1.0372204
-rw-r--r--data/vim/patches/8.1.037363
-rw-r--r--data/vim/patches/8.1.0374711
-rw-r--r--data/vim/patches/8.1.037568
-rw-r--r--data/vim/patches/8.1.037663
-rw-r--r--data/vim/patches/8.1.0377771
-rw-r--r--data/vim/patches/8.1.037870
-rw-r--r--data/vim/patches/8.1.03793132
-rw-r--r--data/vim/patches/8.1.0380214
-rw-r--r--data/vim/patches/8.1.038162
-rw-r--r--data/vim/patches/8.1.0382186
-rw-r--r--data/vim/patches/8.1.038353
-rw-r--r--data/vim/patches/8.1.0384189
-rw-r--r--data/vim/patches/8.1.038552
-rw-r--r--data/vim/patches/8.1.0386181
-rw-r--r--data/vim/patches/8.1.038772
-rw-r--r--data/vim/patches/8.1.038852
-rw-r--r--data/vim/patches/8.1.038991
-rw-r--r--data/vim/patches/8.1.0390189
-rw-r--r--data/vim/patches/8.1.039164
-rw-r--r--data/vim/patches/8.1.0392282
-rw-r--r--data/vim/patches/8.1.0393567
-rw-r--r--data/vim/patches/8.1.0394196
-rw-r--r--data/vim/patches/8.1.039552
-rw-r--r--data/vim/patches/8.1.039654
-rw-r--r--data/vim/patches/8.1.0397335
-rw-r--r--data/vim/patches/8.1.0398121
-rw-r--r--data/vim/patches/8.1.0399270
-rw-r--r--data/vim/patches/8.1.0400101
-rw-r--r--data/vim/patches/8.1.0401259
-rw-r--r--data/vim/patches/8.1.0402171
-rw-r--r--data/vim/patches/8.1.040345
-rw-r--r--data/vim/patches/8.1.040469
-rw-r--r--data/vim/patches/8.1.04052286
-rw-r--r--data/vim/patches/8.1.0406125
-rw-r--r--data/vim/patches/8.1.04071253
-rw-r--r--data/vim/patches/8.1.0408219
-rw-r--r--data/vim/patches/8.1.040993
-rw-r--r--data/vim/patches/8.1.0410307
-rw-r--r--data/vim/patches/8.1.041151
-rw-r--r--data/vim/patches/8.1.0412104
-rw-r--r--data/vim/patches/8.1.041375
-rw-r--r--data/vim/patches/8.1.041496
-rw-r--r--data/vim/patches/8.1.0415122
-rw-r--r--data/vim/patches/8.1.041686
-rw-r--r--data/vim/patches/8.1.0417140
-rw-r--r--data/vim/patches/8.1.041882
-rw-r--r--data/vim/patches/8.1.041955
-rw-r--r--data/vim/patches/8.1.042073
-rw-r--r--data/vim/patches/8.1.042176
-rw-r--r--data/vim/patches/8.1.042260
-rw-r--r--data/vim/patches/8.1.042396
-rw-r--r--data/vim/patches/8.1.0424115
-rw-r--r--data/vim/patches/8.1.042599
-rw-r--r--data/vim/patches/8.1.042672
-rw-r--r--data/vim/patches/8.1.042786
-rw-r--r--data/vim/patches/8.1.0428114
-rw-r--r--data/vim/patches/8.1.042954
-rw-r--r--data/vim/patches/8.1.043044
-rw-r--r--data/vim/patches/8.1.0431562
-rw-r--r--data/vim/patches/8.1.043253
-rw-r--r--data/vim/patches/8.1.043374
-rw-r--r--data/vim/patches/8.1.0434335
-rw-r--r--data/vim/patches/8.1.043578
-rw-r--r--data/vim/patches/8.1.043692
-rw-r--r--data/vim/patches/8.1.043774
-rw-r--r--data/vim/patches/8.1.0438344
-rw-r--r--data/vim/patches/8.1.0439600
-rw-r--r--data/vim/patches/8.1.0440100
-rw-r--r--data/vim/patches/8.1.044166
-rw-r--r--data/vim/patches/8.1.044254
-rw-r--r--data/vim/patches/8.1.04433395
-rw-r--r--data/vim/patches/8.1.044452
-rw-r--r--data/vim/patches/8.1.0445317
-rw-r--r--data/vim/patches/8.1.044646
-rw-r--r--data/vim/patches/8.1.0447133
-rw-r--r--data/vim/patches/8.1.0448233
-rw-r--r--data/vim/patches/8.1.0449188
-rw-r--r--data/vim/patches/8.1.045067
-rw-r--r--data/vim/patches/8.1.0451148
-rw-r--r--data/vim/patches/8.1.0452123
-rw-r--r--data/vim/patches/8.1.0453126
-rw-r--r--data/vim/patches/8.1.045490
-rw-r--r--data/vim/patches/8.1.0455238
-rw-r--r--data/vim/patches/8.1.045691
-rw-r--r--data/vim/patches/8.1.0457193
-rw-r--r--data/vim/patches/8.1.0458109
-rw-r--r--data/vim/patches/8.1.045951
-rw-r--r--data/vim/patches/8.1.0460124
-rw-r--r--data/vim/patches/8.1.04614568
-rw-r--r--data/vim/patches/8.1.0462115
-rw-r--r--data/vim/patches/8.1.046380
-rw-r--r--data/vim/patches/8.1.046494
-rw-r--r--data/vim/patches/8.1.046555
-rw-r--r--data/vim/patches/8.1.0466264
-rw-r--r--data/vim/patches/8.1.0467104
-rw-r--r--data/vim/patches/8.1.0468121
-rw-r--r--data/vim/patches/8.1.0469712
-rw-r--r--data/vim/patches/8.1.0470384
-rw-r--r--data/vim/patches/8.1.0471105
-rw-r--r--data/vim/patches/8.1.0472298
-rw-r--r--data/vim/patches/8.1.047379
-rw-r--r--data/vim/patches/8.1.0474151
-rw-r--r--data/vim/patches/8.1.0475544
-rw-r--r--data/vim/patches/8.1.047690
-rw-r--r--data/vim/patches/8.1.047747
-rw-r--r--data/vim/patches/8.1.047853
-rw-r--r--data/vim/patches/8.1.0479188
-rw-r--r--data/vim/patches/8.1.048070
-rw-r--r--data/vim/patches/8.1.048181
-rw-r--r--data/vim/patches/8.1.048274
-rw-r--r--data/vim/patches/8.1.048387
-rw-r--r--data/vim/patches/8.1.0484213
-rw-r--r--data/vim/patches/8.1.048586
-rw-r--r--data/vim/patches/8.1.048656
-rw-r--r--data/vim/patches/8.1.04871207
-rw-r--r--data/vim/patches/8.1.0488662
-rw-r--r--data/vim/patches/8.1.0489198
-rw-r--r--data/vim/patches/8.1.0490117
-rw-r--r--data/vim/patches/8.1.049157
-rw-r--r--data/vim/patches/8.1.0492113
-rw-r--r--data/vim/patches/8.1.0493497
-rw-r--r--data/vim/patches/8.1.0494154
-rw-r--r--data/vim/patches/8.1.0495230
-rw-r--r--data/vim/patches/8.1.0496413
-rw-r--r--data/vim/patches/8.1.0497104
-rw-r--r--data/vim/patches/8.1.049881
-rw-r--r--data/vim/patches/8.1.0499149
-rw-r--r--data/vim/patches/8.1.050064
-rw-r--r--data/vim/patches/8.1.050154
-rw-r--r--data/vim/patches/8.1.0502111
-rw-r--r--data/vim/patches/8.1.050361
-rw-r--r--data/vim/patches/8.1.0504112
-rw-r--r--data/vim/patches/8.1.050551
-rw-r--r--data/vim/patches/8.1.050658
-rw-r--r--data/vim/patches/8.1.0507102
-rw-r--r--data/vim/patches/8.1.050885
-rw-r--r--data/vim/patches/8.1.050968
-rw-r--r--data/vim/patches/8.1.051071
-rw-r--r--data/vim/patches/8.1.051177
-rw-r--r--data/vim/patches/8.1.051290
-rw-r--r--data/vim/patches/8.1.051367
-rw-r--r--data/vim/patches/8.1.05141123
-rw-r--r--data/vim/patches/8.1.0515265
-rw-r--r--data/vim/patches/8.1.0516165
-rw-r--r--data/vim/patches/8.1.051764
-rw-r--r--data/vim/patches/8.1.051883
-rw-r--r--data/vim/patches/8.1.0519768
-rw-r--r--data/vim/patches/8.1.052050
-rw-r--r--data/vim/patches/8.1.052151
-rw-r--r--data/vim/patches/8.1.052282
-rw-r--r--data/vim/patches/8.1.0523403
-rw-r--r--data/vim/patches/8.1.052463
-rw-r--r--data/vim/patches/8.1.0525122
-rw-r--r--data/vim/patches/8.1.052657
-rw-r--r--data/vim/patches/8.1.052762
-rw-r--r--data/vim/patches/8.1.0528797
-rw-r--r--data/vim/patches/8.1.0529113
-rw-r--r--data/vim/patches/8.1.0530104
-rw-r--r--data/vim/patches/8.1.053183
-rw-r--r--data/vim/patches/8.1.0532381
-rw-r--r--data/vim/patches/8.1.053352
-rw-r--r--data/vim/patches/8.1.0534379
-rw-r--r--data/vim/patches/8.1.053597
-rw-r--r--data/vim/patches/8.1.0536103
-rw-r--r--data/vim/patches/8.1.053774
-rw-r--r--data/vim/patches/8.1.053852
-rw-r--r--data/vim/patches/8.1.0539114
-rw-r--r--data/vim/patches/8.1.0540134
-rw-r--r--data/vim/patches/8.1.054166
-rw-r--r--data/vim/patches/8.1.0542423
-rw-r--r--data/vim/patches/8.1.054368
-rw-r--r--data/vim/patches/8.1.0544432
-rw-r--r--data/vim/patches/8.1.054571
-rw-r--r--data/vim/patches/8.1.054646
-rw-r--r--data/vim/patches/8.1.054746
-rw-r--r--data/vim/patches/8.1.054853
-rw-r--r--data/vim/patches/8.1.0549111
-rw-r--r--data/vim/patches/8.1.0550123
-rw-r--r--data/vim/patches/8.1.055172
-rw-r--r--data/vim/patches/8.1.0552120
-rw-r--r--data/vim/patches/8.1.0553197
-rw-r--r--data/vim/patches/8.1.0554127
-rw-r--r--data/vim/patches/8.1.055574
-rw-r--r--data/vim/patches/8.1.0556130
-rw-r--r--data/vim/patches/8.1.0557528
-rw-r--r--data/vim/patches/8.1.0558161
-rw-r--r--data/vim/patches/8.1.0559115
-rw-r--r--data/vim/patches/8.1.0560142
-rw-r--r--data/vim/patches/8.1.056152
-rw-r--r--data/vim/patches/8.1.0562172
-rw-r--r--data/vim/patches/8.1.056356
-rw-r--r--data/vim/patches/8.1.056467
-rw-r--r--data/vim/patches/8.1.056555
-rw-r--r--data/vim/patches/8.1.056670
-rw-r--r--data/vim/patches/8.1.056765
-rw-r--r--data/vim/patches/8.1.056865
-rw-r--r--data/vim/patches/8.1.056998
-rw-r--r--data/vim/patches/8.1.0570126
-rw-r--r--data/vim/patches/8.1.0571125
-rw-r--r--data/vim/patches/8.1.057279
-rw-r--r--data/vim/patches/8.1.0573254
-rw-r--r--data/vim/patches/8.1.0574129
-rw-r--r--data/vim/patches/8.1.0575346
-rw-r--r--data/vim/patches/8.1.057667
-rw-r--r--data/vim/patches/8.1.0577153
-rw-r--r--data/vim/patches/8.1.0578266
-rw-r--r--data/vim/patches/8.1.05792526
369 files changed, 94949 insertions, 4 deletions
diff --git a/data/vim/_metadata/version b/data/vim/_metadata/version
index 8a549c0d4..f068dd2ac 100644
--- a/data/vim/_metadata/version
+++ b/data/vim/_metadata/version
@@ -1 +1 @@
-8.1.213
+8.1.579
diff --git a/data/vim/make.sh b/data/vim/make.sh
index 790e0d155..5a68d377e 100644
--- a/data/vim/make.sh
+++ b/data/vim/make.sh
@@ -1,10 +1,11 @@
pkg:extract
cd *
-for ((x = 2; x != 214; ++x)); do
- echo Applying patch $x
- patch -p0 <"${PKG_DATA}/patches/8.1.$(printf '%.4u\n' "$x")"
+for patch in "${PKG_DATA}/patches/8.1."*; do
+ echo Applying patch $(basename "${patch}")
+ patch -p0 <"${patch}"
done
+
pkg:patch
cd src
autoconf
@@ -14,3 +15,4 @@ make
pkg:install
pkg: mkdir -p /etc/profile.d
pkg: cp -a %/vim.sh /etc/profile.d
+pkg: ln -s vim /usr/bin/vi
diff --git a/data/vim/patches/.listing b/data/vim/patches/.listing
new file mode 100644
index 000000000..bd5ad134d
--- /dev/null
+++ b/data/vim/patches/.listing
@@ -0,0 +1,583 @@
+drwxrwsr-x 2 506 450 16384 Dec 13 22:21 .
+drwxrwsr-x 12 506 450 40960 May 17 2018 ..
+-rw-r--r-- 1 506 450 2006 May 17 2018 8.1.0001
+-rw-r--r-- 1 506 450 2572 May 19 2018 8.1.0002
+-rw-r--r-- 1 506 450 3792 May 19 2018 8.1.0003
+-rw-r--r-- 1 506 450 1751 May 19 2018 8.1.0004
+-rw-r--r-- 1 506 450 1807 May 19 2018 8.1.0005
+-rw-r--r-- 1 506 450 1693 May 20 2018 8.1.0006
+-rw-r--r-- 1 506 450 1962 May 20 2018 8.1.0007
+-rw-r--r-- 1 506 450 2386 May 20 2018 8.1.0008
+-rw-r--r-- 1 506 450 2778 May 20 2018 8.1.0009
+-rw-r--r-- 1 506 450 9415 May 20 2018 8.1.0010
+-rw-r--r-- 1 506 450 2536 May 21 2018 8.1.0011
+-rw-r--r-- 1 506 450 1610 May 21 2018 8.1.0012
+-rw-r--r-- 1 506 450 6717 May 21 2018 8.1.0013
+-rw-r--r-- 1 506 450 13559 May 21 2018 8.1.0014
+-rw-r--r-- 1 506 450 4186 May 21 2018 8.1.0015
+-rw-r--r-- 1 506 450 1890 May 21 2018 8.1.0016
+-rw-r--r-- 1 506 450 5801 May 22 2018 8.1.0017
+-rw-r--r-- 1 506 450 9499 May 22 2018 8.1.0018
+-rw-r--r-- 1 506 450 2326 May 22 2018 8.1.0019
+-rw-r--r-- 1 506 450 15279 May 22 2018 8.1.0020
+-rw-r--r-- 1 506 450 2235 May 23 2018 8.1.0021
+-rw-r--r-- 1 506 450 2396 May 23 2018 8.1.0022
+-rw-r--r-- 1 506 450 2004 May 26 2018 8.1.0023
+-rw-r--r-- 1 506 450 2617 May 26 2018 8.1.0024
+-rw-r--r-- 1 506 450 4779 May 26 2018 8.1.0025
+-rw-r--r-- 1 506 450 1809 May 26 2018 8.1.0026
+-rw-r--r-- 1 506 450 50988 Jun 03 2018 8.1.0027
+-rw-r--r-- 1 506 450 1760 Jun 03 2018 8.1.0028
+-rw-r--r-- 1 506 450 1495 Jun 03 2018 8.1.0029
+-rw-r--r-- 1 506 450 3105 Jun 03 2018 8.1.0030
+-rw-r--r-- 1 506 450 1611 Jun 03 2018 8.1.0031
+-rw-r--r-- 1 506 450 5262 Jun 04 2018 8.1.0032
+-rw-r--r-- 1 506 450 1848 Jun 04 2018 8.1.0033
+-rw-r--r-- 1 506 450 2716 Jun 04 2018 8.1.0034
+-rw-r--r-- 1 506 450 6569 Jun 06 2018 8.1.0035
+-rw-r--r-- 1 506 450 4578 Jun 06 2018 8.1.0036
+-rw-r--r-- 1 506 450 15307 Jun 06 2018 8.1.0037
+-rw-r--r-- 1 506 450 1978 Jun 07 2018 8.1.0038
+-rw-r--r-- 1 506 450 8953 Jun 07 2018 8.1.0039
+-rw-r--r-- 1 506 450 2531 Jun 10 2018 8.1.0040
+-rw-r--r-- 1 506 450 4059 Jun 10 2018 8.1.0041
+-rw-r--r-- 1 506 450 3565 Jun 10 2018 8.1.0042
+-rw-r--r-- 1 506 450 3435 Jun 12 2018 8.1.0043
+-rw-r--r-- 1 506 450 2509 Jun 12 2018 8.1.0044
+-rw-r--r-- 1 506 450 8195 Jun 12 2018 8.1.0045
+-rw-r--r-- 1 506 450 5925 Jun 12 2018 8.1.0046
+-rw-r--r-- 1 506 450 2905 Jun 12 2018 8.1.0047
+-rw-r--r-- 1 506 450 3129 Jun 12 2018 8.1.0048
+-rw-r--r-- 1 506 450 7856 Jun 12 2018 8.1.0049
+-rw-r--r-- 1 506 450 12084 Jun 12 2018 8.1.0050
+-rw-r--r-- 1 506 450 1187 Jun 12 2018 8.1.0051
+-rw-r--r-- 1 506 450 1660 Jun 12 2018 8.1.0052
+-rw-r--r-- 1 506 450 17493 Jun 12 2018 8.1.0053
+-rw-r--r-- 1 506 450 1978 Jun 13 2018 8.1.0054
+-rw-r--r-- 1 506 450 2674 Jun 13 2018 8.1.0055
+-rw-r--r-- 1 506 450 2996 Jun 16 14:44 8.1.0056
+-rw-r--r-- 1 506 450 5625 Jun 16 15:33 8.1.0057
+-rw-r--r-- 1 506 450 5833 Jun 16 16:21 8.1.0058
+-rw-r--r-- 1 506 450 3006 Jun 16 17:26 8.1.0059
+-rw-r--r-- 1 506 450 2199 Jun 16 22:17 8.1.0060
+-rw-r--r-- 1 506 450 9361 Jun 16 22:58 8.1.0061
+-rw-r--r-- 1 506 450 10083 Jun 17 14:48 8.1.0062
+-rw-r--r-- 1 506 450 4134 Jun 17 15:01 8.1.0063
+-rw-r--r-- 1 506 450 3198 Jun 17 16:24 8.1.0064
+-rw-r--r-- 1 506 450 2714 Jun 17 17:11 8.1.0065
+-rw-r--r-- 1 506 450 4125 Jun 17 17:33 8.1.0066
+-rw-r--r-- 1 506 450 3453 Jun 17 19:08 8.1.0067
+-rw-r--r-- 1 506 450 2218 Jun 17 19:23 8.1.0068
+-rw-r--r-- 1 506 450 10539 Jun 17 19:37 8.1.0069
+-rw-r--r-- 1 506 450 1772 Jun 17 20:11 8.1.0070
+-rw-r--r-- 1 506 450 24885 Jun 17 21:34 8.1.0071
+-rw-r--r-- 1 506 450 3489 Jun 17 22:19 8.1.0072
+-rw-r--r-- 1 506 450 2490 Jun 18 21:17 8.1.0073
+-rw-r--r-- 1 506 450 1917 Jun 18 21:53 8.1.0074
+-rw-r--r-- 1 506 450 1690 Jun 18 22:01 8.1.0075
+-rw-r--r-- 1 506 450 2192 Jun 18 22:16 8.1.0076
+-rw-r--r-- 1 506 450 1575 Jun 18 22:31 8.1.0077
+-rw-r--r-- 1 506 450 3972 Jun 19 14:24 8.1.0078
+-rw-r--r-- 1 506 450 1941 Jun 19 14:46 8.1.0079
+-rw-r--r-- 1 506 450 9680 Jun 19 17:28 8.1.0080
+-rw-r--r-- 1 506 450 2721 Jun 19 17:28 8.1.0081
+-rw-r--r-- 1 506 450 3834 Jun 19 17:49 8.1.0082
+-rw-r--r-- 1 506 450 5227 Jun 19 18:28 8.1.0083
+-rw-r--r-- 1 506 450 5639 Jun 19 18:58 8.1.0084
+-rw-r--r-- 1 506 450 3269 Jun 19 19:09 8.1.0085
+-rw-r--r-- 1 506 450 2588 Jun 19 19:46 8.1.0086
+-rw-r--r-- 1 506 450 6792 Jun 19 19:59 8.1.0087
+-rw-r--r-- 1 506 450 2126 Jun 19 20:08 8.1.0088
+-rw-r--r-- 1 506 450 5766 Jun 19 22:35 8.1.0089
+-rw-r--r-- 1 506 450 4270 Jun 20 20:38 8.1.0090
+-rw-r--r-- 1 506 450 10822 Jun 20 22:38 8.1.0091
+-rw-r--r-- 1 506 450 1512 Jun 21 12:08 8.1.0092
+-rw-r--r-- 1 506 450 2187 Jun 21 20:31 8.1.0093
+-rw-r--r-- 1 506 450 1399 Jun 21 21:39 8.1.0094
+-rw-r--r-- 1 506 450 2373 Jun 21 22:10 8.1.0095
+-rw-r--r-- 1 506 450 4382 Jun 22 21:31 8.1.0096
+-rw-r--r-- 1 506 450 1805 Jun 22 21:43 8.1.0097
+-rw-r--r-- 1 506 450 9705 Jun 23 14:22 8.1.0098
+-rw-r--r-- 1 506 450 1924 Jun 23 14:35 8.1.0099
+-rw-r--r-- 1 506 450 1595 Jun 23 14:36 8.1.0100
+-rw-r--r-- 1 506 450 1769 Jun 23 14:55 8.1.0101
+-rw-r--r-- 1 506 450 1557 Jun 23 15:09 8.1.0102
+-rw-r--r-- 1 506 450 5682 Jun 23 16:12 8.1.0103
+-rw-r--r-- 1 506 450 1709 Jun 23 17:15 8.1.0104
+-rw-r--r-- 1 506 450 91953 Jun 23 19:23 8.1.0105
+-rw-r--r-- 1 506 450 1471 Jun 24 14:45 8.1.0106
+-rw-r--r-- 1 506 450 2523 Jun 24 15:14 8.1.0107
+-rw-r--r-- 1 506 450 206793 Jun 24 15:54 8.1.0108
+-rw-r--r-- 1 506 450 1365 Jun 24 15:56 8.1.0109
+-rw-r--r-- 1 506 450 2466 Jun 24 16:54 8.1.0110
+-rw-r--r-- 1 506 450 4914 Jun 24 18:05 8.1.0111
+-rw-r--r-- 1 506 450 4681 Jun 24 19:02 8.1.0112
+-rw-r--r-- 1 506 450 1508 Jun 24 19:24 8.1.0113
+-rw-r--r-- 1 506 450 6304 Jun 24 23:53 8.1.0114
+-rw-r--r-- 1 506 450 1961 Jun 25 00:06 8.1.0115
+-rw-r--r-- 1 506 450 2800 Jun 25 21:25 8.1.0116
+-rw-r--r-- 1 506 450 1760 Jun 26 23:19 8.1.0117
+-rw-r--r-- 1 506 450 4245 Jun 27 21:22 8.1.0118
+-rw-r--r-- 1 506 450 1948 Jun 27 23:13 8.1.0119
+-rw-r--r-- 1 506 450 5855 Jun 28 11:28 8.1.0120
+-rw-r--r-- 1 506 450 4713 Jun 28 12:05 8.1.0121
+-rw-r--r-- 1 506 450 1658 Jun 28 14:55 8.1.0122
+-rw-r--r-- 1 506 450 1718 Jun 28 15:30 8.1.0123
+-rw-r--r-- 1 506 450 1597 Jun 28 15:50 8.1.0124
+-rw-r--r-- 1 506 450 4884 Jun 28 19:26 8.1.0125
+-rw-r--r-- 1 506 450 6119 Jun 28 22:23 8.1.0126
+-rw-r--r-- 1 506 450 1817 Jun 29 20:29 8.1.0127
+-rw-r--r-- 1 506 450 13345 Jun 30 18:25 8.1.0128
+-rw-r--r-- 1 506 450 1716 Jun 30 18:25 8.1.0129
+-rw-r--r-- 1 506 450 5062 Jun 30 18:28 8.1.0130
+-rw-r--r-- 1 506 450 7164 Jun 30 21:18 8.1.0131
+-rw-r--r-- 1 506 450 21355 Jun 30 21:50 8.1.0132
+-rw-r--r-- 1 506 450 3994 Jun 30 22:41 8.1.0133
+-rw-r--r-- 1 506 450 18460 Jul 01 15:12 8.1.0134
+-rw-r--r-- 1 506 450 2589 Jul 01 16:44 8.1.0135
+-rw-r--r-- 1 506 450 9996 Jul 01 19:49 8.1.0136
+-rw-r--r-- 1 506 450 8177 Jul 01 21:13 8.1.0137
+-rw-r--r-- 1 506 450 4761 Jul 02 20:51 8.1.0138
+-rw-r--r-- 1 506 450 3091 Jul 02 22:55 8.1.0139
+-rw-r--r-- 1 506 450 2895 Jul 03 14:48 8.1.0140
+-rw-r--r-- 1 506 450 15890 Jul 03 16:54 8.1.0141
+-rw-r--r-- 1 506 450 4578 Jul 03 17:17 8.1.0142
+-rw-r--r-- 1 506 450 6351 Jul 03 18:18 8.1.0143
+-rw-r--r-- 1 506 450 2728 Jul 03 18:37 8.1.0144
+-rw-r--r-- 1 506 450 2327 Jul 03 19:17 8.1.0145
+-rw-r--r-- 1 506 450 1367 Jul 03 21:27 8.1.0146
+-rw-r--r-- 1 506 450 3044 Jul 04 22:04 8.1.0147
+-rw-r--r-- 1 506 450 1512 Jul 04 22:13 8.1.0148
+-rw-r--r-- 1 506 450 6889 Jul 04 22:27 8.1.0149
+-rw-r--r-- 1 506 450 22149 Jul 04 22:37 8.1.0150
+-rw-r--r-- 1 506 450 1593 Jul 04 22:44 8.1.0151
+-rw-r--r-- 1 506 450 11431 Jul 04 23:06 8.1.0152
+-rw-r--r-- 1 506 450 1970 Jul 05 22:28 8.1.0153
+-rw-r--r-- 1 506 450 3833 Jul 05 22:28 8.1.0154
+-rw-r--r-- 1 506 450 1273 Jul 05 22:59 8.1.0155
+-rw-r--r-- 1 506 450 1574 Jul 06 23:12 8.1.0156
+-rw-r--r-- 1 506 450 2144 Jul 06 23:12 8.1.0157
+-rw-r--r-- 1 506 450 1647 Jul 07 16:19 8.1.0158
+-rw-r--r-- 1 506 450 2569 Jul 07 16:41 8.1.0159
+-rw-r--r-- 1 506 450 1361 Jul 07 17:22 8.1.0160
+-rw-r--r-- 1 506 450 3923 Jul 07 18:34 8.1.0161
+-rw-r--r-- 1 506 450 6881 Jul 07 22:42 8.1.0162
+-rw-r--r-- 1 506 450 6408 Jul 07 22:42 8.1.0163
+-rw-r--r-- 1 506 450 2724 Jul 07 23:08 8.1.0164
+-rw-r--r-- 1 506 450 3898 Jul 08 16:01 8.1.0165
+-rw-r--r-- 1 506 450 38155 Jul 08 16:51 8.1.0166
+-rw-r--r-- 1 506 450 5740 Jul 08 17:19 8.1.0167
+-rw-r--r-- 1 506 450 4177 Jul 08 17:58 8.1.0168
+-rw-r--r-- 1 506 450 4184 Jul 08 18:20 8.1.0169
+-rw-r--r-- 1 506 450 9933 Jul 08 19:07 8.1.0170
+-rw-r--r-- 1 506 450 3250 Jul 08 20:49 8.1.0171
+-rw-r--r-- 1 506 450 1771 Jul 08 21:47 8.1.0172
+-rw-r--r-- 1 506 450 1429 Jul 09 20:40 8.1.0173
+-rw-r--r-- 1 506 450 3944 Jul 10 15:07 8.1.0174
+-rw-r--r-- 1 506 450 1934 Jul 10 15:23 8.1.0175
+-rw-r--r-- 1 506 450 1599 Jul 10 17:35 8.1.0176
+-rw-r--r-- 1 506 450 4584 Jul 10 19:39 8.1.0177
+-rw-r--r-- 1 506 450 1431 Jul 24 04:15 8.1.0178
+-rw-r--r-- 1 506 450 1857 Jul 13 18:14 8.1.0179
+-rw-r--r-- 1 506 450 4435 Jul 13 22:11 8.1.0180
+-rw-r--r-- 1 506 450 1921 Jul 14 17:25 8.1.0181
+-rw-r--r-- 1 506 450 9703 Jul 14 19:31 8.1.0182
+-rw-r--r-- 1 506 450 3966 Jul 14 21:42 8.1.0183
+-rw-r--r-- 1 506 450 4488 Jul 14 21:42 8.1.0184
+-rw-r--r-- 1 506 450 4643 Jul 14 21:49 8.1.0185
+-rw-r--r-- 1 506 450 2592 Jul 14 22:24 8.1.0186
+-rw-r--r-- 1 506 450 9073 Jul 15 17:01 8.1.0187
+-rw-r--r-- 1 506 450 1963 Jul 15 17:36 8.1.0188
+-rw-r--r-- 1 506 450 1688 Jul 15 20:26 8.1.0189
+-rw-r--r-- 1 506 450 6411 Jul 16 17:48 8.1.0190
+-rw-r--r-- 1 506 450 1565 Jul 16 18:11 8.1.0191
+-rw-r--r-- 1 506 450 112175 Jul 17 05:45 8.1.0192
+-rw-r--r-- 1 506 450 1805 Jul 17 05:56 8.1.0193
+-rw-r--r-- 1 506 450 2862 Jul 18 06:04 8.1.0194
+-rw-r--r-- 1 506 450 1809 Jul 19 03:08 8.1.0195
+-rw-r--r-- 1 506 450 2085 Jul 19 04:14 8.1.0196
+-rw-r--r-- 1 506 450 2341 Jul 20 05:08 8.1.0197
+-rw-r--r-- 1 506 450 2382 Jul 20 20:26 8.1.0198
+-rw-r--r-- 1 506 450 1487 Jul 20 20:29 8.1.0199
+-rw-r--r-- 1 506 450 3017 Jul 20 23:38 8.1.0200
+-rw-r--r-- 1 506 450 11749 Jul 22 04:31 8.1.0201
+-rw-r--r-- 1 506 450 2036 Jul 22 05:10 8.1.0202
+-rw-r--r-- 1 506 450 3913 Jul 22 07:33 8.1.0203
+-rw-r--r-- 1 506 450 2093 Jul 22 19:39 8.1.0204
+-rw-r--r-- 1 506 450 6691 Jul 23 04:12 8.1.0205
+-rw-r--r-- 1 506 450 2828 Jul 23 04:50 8.1.0206
+-rw-r--r-- 1 506 450 2260 Jul 23 05:10 8.1.0207
+-rw-r--r-- 1 506 450 1379 Jul 24 04:55 8.1.0208
+-rw-r--r-- 1 506 450 3024 Jul 24 05:43 8.1.0209
+-rw-r--r-- 1 506 450 2831 Jul 25 19:50 8.1.0210
+-rw-r--r-- 1 506 450 7061 Jul 25 21:19 8.1.0211
+-rw-r--r-- 1 506 450 7545 Jul 25 22:03 8.1.0212
+-rw-r--r-- 1 506 450 5556 Jul 25 22:37 8.1.0213
+-rw-r--r-- 1 506 450 1925 Jul 27 22:09 8.1.0214
+-rw-r--r-- 1 506 450 2582 Jul 27 22:35 8.1.0215
+-rw-r--r-- 1 506 450 2392 Jul 27 23:18 8.1.0216
+-rw-r--r-- 1 506 450 2403 Jul 28 16:14 8.1.0217
+-rw-r--r-- 1 506 450 6928 Jul 28 16:56 8.1.0218
+-rw-r--r-- 1 506 450 1963 Jul 28 17:08 8.1.0219
+-rw-r--r-- 1 506 450 2311 Jul 28 17:18 8.1.0220
+-rw-r--r-- 1 506 450 14127 Jul 28 17:29 8.1.0221
+-rw-r--r-- 1 506 450 5102 Jul 28 18:17 8.1.0222
+-rw-r--r-- 1 506 450 4387 Jul 28 19:20 8.1.0223
+-rw-r--r-- 1 506 450 3118 Jul 28 23:12 8.1.0224
+-rw-r--r-- 1 506 450 5657 Jul 29 15:35 8.1.0225
+-rw-r--r-- 1 506 450 28724 Jul 29 16:09 8.1.0226
+-rw-r--r-- 1 506 450 1700 Jul 29 16:13 8.1.0227
+-rw-r--r-- 1 506 450 15828 Jul 29 17:36 8.1.0228
+-rw-r--r-- 1 506 450 3254 Jul 29 17:41 8.1.0229
+-rw-r--r-- 1 506 450 4212 Aug 01 17:56 8.1.0230
+-rw-r--r-- 1 506 450 3398 Aug 01 18:03 8.1.0231
+-rw-r--r-- 1 506 450 6091 Aug 01 18:42 8.1.0232
+-rw-r--r-- 1 506 450 9163 Aug 01 19:06 8.1.0233
+-rw-r--r-- 1 506 450 4813 Aug 02 21:47 8.1.0234
+-rw-r--r-- 1 506 450 6005 Aug 02 22:24 8.1.0235
+-rw-r--r-- 1 506 450 3812 Aug 03 22:03 8.1.0236
+-rw-r--r-- 1 506 450 2407 Aug 04 15:14 8.1.0237
+-rw-r--r-- 1 506 450 2455 Aug 04 16:54 8.1.0238
+-rw-r--r-- 1 506 450 3139 Aug 04 17:25 8.1.0239
+-rw-r--r-- 1 506 450 1835 Aug 05 13:22 8.1.0240
+-rw-r--r-- 1 506 450 1779 Aug 07 13:15 8.1.0241
+-rw-r--r-- 1 506 450 2127 Aug 07 14:55 8.1.0242
+-rw-r--r-- 1 506 450 3046 Aug 07 16:33 8.1.0243
+-rw-r--r-- 1 506 450 6049 Aug 07 17:39 8.1.0244
+-rw-r--r-- 1 506 450 3316 Aug 07 19:05 8.1.0245
+-rw-r--r-- 1 506 450 1756 Aug 07 19:33 8.1.0246
+-rw-r--r-- 1 506 450 8011 Aug 07 19:45 8.1.0247
+-rw-r--r-- 1 506 450 4314 Aug 07 19:48 8.1.0248
+-rw-r--r-- 1 506 450 2789 Aug 07 20:02 8.1.0249
+-rw-r--r-- 1 506 450 3230 Aug 07 20:48 8.1.0250
+-rw-r--r-- 1 506 450 12239 Aug 07 21:40 8.1.0251
+-rw-r--r-- 1 506 450 41015 Aug 07 21:55 8.1.0252
+-rw-r--r-- 1 506 450 14504 Aug 07 22:32 8.1.0253
+-rw-r--r-- 1 506 450 2428 Aug 07 22:43 8.1.0254
+-rw-r--r-- 1 506 450 2310 Aug 08 22:09 8.1.0255
+-rw-r--r-- 1 506 450 8885 Aug 08 22:09 8.1.0256
+-rw-r--r-- 1 506 450 2084 Aug 08 22:28 8.1.0257
+-rw-r--r-- 1 506 450 1854 Aug 08 22:56 8.1.0258
+-rw-r--r-- 1 506 450 4897 Aug 09 21:19 8.1.0259
+-rw-r--r-- 1 506 450 1783 Aug 09 21:34 8.1.0260
+-rw-r--r-- 1 506 450 4958 Aug 09 21:52 8.1.0261
+-rw-r--r-- 1 506 450 3052 Aug 09 22:09 8.1.0262
+-rw-r--r-- 1 506 450 3417 Aug 09 22:16 8.1.0263
+-rw-r--r-- 1 506 450 3278 Aug 09 22:27 8.1.0264
+-rw-r--r-- 1 506 450 23576 Aug 10 22:08 8.1.0265
+-rw-r--r-- 1 506 450 10962 Aug 10 23:14 8.1.0266
+-rw-r--r-- 1 506 450 3831 Aug 11 13:37 8.1.0267
+-rw-r--r-- 1 506 450 10135 Aug 11 13:57 8.1.0268
+-rw-r--r-- 1 506 450 3772 Aug 11 14:24 8.1.0269
+-rw-r--r-- 1 506 450 1866 Aug 11 14:42 8.1.0270
+-rw-r--r-- 1 506 450 13097 Aug 11 16:41 8.1.0271
+-rw-r--r-- 1 506 450 1723 Aug 11 17:53 8.1.0272
+-rw-r--r-- 1 506 450 1470 Aug 11 19:03 8.1.0273
+-rw-r--r-- 1 506 450 4628 Aug 12 15:50 8.1.0274
+-rw-r--r-- 1 506 450 4964 Aug 12 15:50 8.1.0275
+-rw-r--r-- 1 506 450 2991 Aug 12 16:27 8.1.0276
+-rw-r--r-- 1 506 450 9021 Aug 12 17:39 8.1.0277
+-rw-r--r-- 1 506 450 2988 Aug 12 21:54 8.1.0278
+-rw-r--r-- 1 506 450 3306 Aug 12 22:03 8.1.0279
+-rw-r--r-- 1 506 450 2293 Aug 13 22:55 8.1.0280
+-rw-r--r-- 1 506 450 19659 Aug 14 13:38 8.1.0281
+-rw-r--r-- 1 506 450 14174 Aug 14 16:06 8.1.0282
+-rw-r--r-- 1 506 450 1846 Aug 14 17:29 8.1.0283
+-rw-r--r-- 1 506 450 3774 Aug 14 18:17 8.1.0284
+-rw-r--r-- 1 506 450 1416 Aug 14 20:18 8.1.0285
+-rw-r--r-- 1 506 450 3285 Aug 14 21:32 8.1.0286
+-rw-r--r-- 1 506 450 1772 Aug 14 22:08 8.1.0287
+-rw-r--r-- 1 506 450 12170 Aug 15 22:24 8.1.0288
+-rw-r--r-- 1 506 450 2018 Aug 16 22:29 8.1.0289
+-rw-r--r-- 1 506 450 2722 Aug 16 22:29 8.1.0290
+-rw-r--r-- 1 506 450 4355 Aug 18 16:20 8.1.0291
+-rw-r--r-- 1 506 450 2120 Aug 18 19:13 8.1.0292
+-rw-r--r-- 1 506 450 5483 Aug 18 20:00 8.1.0293
+-rw-r--r-- 1 506 450 2332 Aug 18 20:20 8.1.0294
+-rw-r--r-- 1 506 450 9332 Aug 18 21:14 8.1.0295
+-rw-r--r-- 1 506 450 8125 Aug 18 21:23 8.1.0296
+-rw-r--r-- 1 506 450 2733 Aug 19 14:40 8.1.0297
+-rw-r--r-- 1 506 450 1475 Aug 19 16:10 8.1.0298
+-rw-r--r-- 1 506 450 1657 Aug 19 17:04 8.1.0299
+-rw-r--r-- 1 506 450 2295 Aug 19 22:21 8.1.0300
+-rw-r--r-- 1 506 450 8790 Aug 19 22:59 8.1.0301
+-rw-r--r-- 1 506 450 6061 Aug 20 21:59 8.1.0302
+-rw-r--r-- 1 506 450 2912 Aug 20 22:53 8.1.0303
+-rw-r--r-- 1 506 450 9124 Aug 21 13:09 8.1.0304
+-rw-r--r-- 1 506 450 3073 Aug 21 14:24 8.1.0305
+-rw-r--r-- 1 506 450 14029 Aug 21 15:12 8.1.0306
+-rw-r--r-- 1 506 450 6949 Aug 21 16:57 8.1.0307
+-rw-r--r-- 1 506 450 1720 Aug 21 17:08 8.1.0308
+-rw-r--r-- 1 506 450 18244 Aug 21 17:50 8.1.0309
+-rw-r--r-- 1 506 450 3277 Aug 21 18:50 8.1.0310
+-rw-r--r-- 1 506 450 4009 Aug 21 19:22 8.1.0311
+-rw-r--r-- 1 506 450 7961 Aug 21 19:48 8.1.0312
+-rw-r--r-- 1 506 450 7881 Aug 21 20:29 8.1.0313
+-rw-r--r-- 1 506 450 5176 Aug 21 21:20 8.1.0314
+-rw-r--r-- 1 506 450 6290 Aug 21 21:58 8.1.0315
+-rw-r--r-- 1 506 450 2195 Aug 22 11:28 8.1.0316
+-rw-r--r-- 1 506 450 2110 Aug 22 20:06 8.1.0317
+-rw-r--r-- 1 506 450 3126 Aug 22 20:16 8.1.0318
+-rw-r--r-- 1 506 450 1642 Aug 22 21:57 8.1.0319
+-rw-r--r-- 1 506 450 4447 Aug 22 23:04 8.1.0320
+-rw-r--r-- 1 506 450 4558 Aug 23 20:56 8.1.0321
+-rw-r--r-- 1 506 450 3868 Aug 23 22:21 8.1.0322
+-rw-r--r-- 1 506 450 2305 Aug 23 22:39 8.1.0323
+-rw-r--r-- 1 506 450 1492 Aug 23 22:52 8.1.0324
+-rw-r--r-- 1 506 450 2183 Aug 23 23:01 8.1.0325
+-rw-r--r-- 1 506 450 4926 Aug 24 21:31 8.1.0326
+-rw-r--r-- 1 506 450 4900 Aug 24 22:08 8.1.0327
+-rw-r--r-- 1 506 450 4775 Aug 26 21:23 8.1.0328
+-rw-r--r-- 1 506 450 1872 Aug 27 23:24 8.1.0329
+-rw-r--r-- 1 506 450 6219 Aug 28 22:08 8.1.0330
+-rw-r--r-- 1 506 450 3811 Aug 28 22:20 8.1.0331
+-rw-r--r-- 1 506 450 1940 Aug 29 21:43 8.1.0332
+-rw-r--r-- 1 506 450 5951 Aug 29 21:43 8.1.0333
+-rw-r--r-- 1 506 450 3122 Aug 30 13:07 8.1.0334
+-rw-r--r-- 1 506 450 1780 Aug 30 14:05 8.1.0335
+-rw-r--r-- 1 506 450 3139 Aug 30 14:16 8.1.0336
+-rw-r--r-- 1 506 450 3531 Aug 30 15:59 8.1.0337
+-rw-r--r-- 1 506 450 5890 Aug 30 17:47 8.1.0338
+-rw-r--r-- 1 506 450 3237 Aug 31 22:10 8.1.0339
+-rw-r--r-- 1 506 450 2219 Aug 31 22:27 8.1.0340
+-rw-r--r-- 1 506 450 8417 Aug 31 23:07 8.1.0341
+-rw-r--r-- 1 506 450 6555 Sep 01 15:30 8.1.0342
+-rw-r--r-- 1 506 450 1636 Sep 02 14:25 8.1.0343
+-rw-r--r-- 1 506 450 2422 Sep 02 15:07 8.1.0344
+-rw-r--r-- 1 506 450 10052 Sep 02 15:19 8.1.0345
+-rw-r--r-- 1 506 450 57731 Sep 02 15:27 8.1.0346
+-rw-r--r-- 1 506 450 5485 Sep 05 22:26 8.1.0347
+-rw-r--r-- 1 506 450 4181 Sep 05 22:26 8.1.0348
+-rw-r--r-- 1 506 450 5581 Sep 06 13:16 8.1.0349
+-rw-r--r-- 1 506 450 6919 Sep 06 16:27 8.1.0350
+-rw-r--r-- 1 506 450 5206 Sep 06 21:44 8.1.0351
+-rw-r--r-- 1 506 450 8073 Sep 08 15:11 8.1.0352
+-rw-r--r-- 1 506 450 8839 Sep 08 18:21 8.1.0353
+-rw-r--r-- 1 506 450 2279 Sep 08 19:13 8.1.0354
+-rw-r--r-- 1 506 450 3168 Sep 09 15:29 8.1.0355
+-rw-r--r-- 1 506 450 6409 Sep 09 15:55 8.1.0356
+-rw-r--r-- 1 506 450 4016 Sep 09 15:56 8.1.0357
+-rw-r--r-- 1 506 450 1607 Sep 09 19:56 8.1.0358
+-rw-r--r-- 1 506 450 3072 Sep 09 22:03 8.1.0359
+-rw-r--r-- 1 506 450 237081 Sep 10 19:04 8.1.0360
+-rw-r--r-- 1 506 450 4571 Sep 10 19:04 8.1.0361
+-rw-r--r-- 1 506 450 227344 Sep 10 21:16 8.1.0362
+-rw-r--r-- 1 506 450 2800 Sep 10 21:16 8.1.0363
+-rw-r--r-- 1 506 450 2130 Sep 10 21:22 8.1.0364
+-rw-r--r-- 1 506 450 28602 Sep 10 22:04 8.1.0365
+-rw-r--r-- 1 506 450 3826 Sep 10 22:19 8.1.0366
+-rw-r--r-- 1 506 450 1749 Sep 11 20:11 8.1.0367
+-rw-r--r-- 1 506 450 20303 Sep 11 21:30 8.1.0368
+-rw-r--r-- 1 506 450 9213 Sep 11 22:46 8.1.0369
+-rw-r--r-- 1 506 450 1651 Sep 12 18:34 8.1.0370
+-rw-r--r-- 1 506 450 6298 Sep 12 20:29 8.1.0371
+-rw-r--r-- 1 506 450 5591 Sep 12 21:52 8.1.0372
+-rw-r--r-- 1 506 450 1768 Sep 12 22:27 8.1.0373
+-rw-r--r-- 1 506 450 19602 Sep 12 23:16 8.1.0374
+-rw-r--r-- 1 506 450 2197 Sep 13 13:03 8.1.0375
+-rw-r--r-- 1 506 450 2133 Sep 13 14:58 8.1.0376
+-rw-r--r-- 1 506 450 21413 Sep 13 15:34 8.1.0377
+-rw-r--r-- 1 506 450 2048 Sep 13 15:59 8.1.0378
+-rw-r--r-- 1 506 450 125615 Sep 13 17:33 8.1.0379
+-rw-r--r-- 1 506 450 6840 Sep 13 17:33 8.1.0380
+-rw-r--r-- 1 506 450 1858 Sep 13 17:33 8.1.0381
+-rw-r--r-- 1 506 450 9705 Sep 13 18:02 8.1.0382
+-rw-r--r-- 1 506 450 1782 Sep 13 18:06 8.1.0383
+-rw-r--r-- 1 506 450 5127 Sep 13 18:33 8.1.0384
+-rw-r--r-- 1 506 450 2742 Sep 13 19:05 8.1.0385
+-rw-r--r-- 1 506 450 5812 Sep 13 20:32 8.1.0386
+-rw-r--r-- 1 506 450 2071 Sep 13 20:47 8.1.0387
+-rw-r--r-- 1 506 450 1579 Sep 13 21:30 8.1.0388
+-rw-r--r-- 1 506 450 2651 Sep 14 20:11 8.1.0389
+-rw-r--r-- 1 506 450 6076 Sep 14 21:27 8.1.0390
+-rw-r--r-- 1 506 450 2344 Sep 15 15:09 8.1.0391
+-rw-r--r-- 1 506 450 9049 Sep 15 15:43 8.1.0392
+-rw-r--r-- 1 506 450 27803 Sep 15 19:18 8.1.0393
+-rw-r--r-- 1 506 450 6228 Sep 16 14:11 8.1.0394
+-rw-r--r-- 1 506 450 1672 Sep 16 14:52 8.1.0395
+-rw-r--r-- 1 506 450 1768 Sep 16 15:15 8.1.0396
+-rw-r--r-- 1 506 450 15721 Sep 16 15:48 8.1.0397
+-rw-r--r-- 1 506 450 4360 Sep 16 16:28 8.1.0398
+-rw-r--r-- 1 506 450 8813 Sep 16 17:08 8.1.0399
+-rw-r--r-- 1 506 450 2686 Sep 16 18:11 8.1.0400
+-rw-r--r-- 1 506 450 8652 Sep 16 18:47 8.1.0401
+-rw-r--r-- 1 506 450 5092 Sep 18 21:21 8.1.0402
+-rw-r--r-- 1 506 450 1357 Sep 18 21:42 8.1.0403
+-rw-r--r-- 1 506 450 2233 Sep 18 21:54 8.1.0404
+-rw-r--r-- 1 506 450 68527 Sep 18 22:30 8.1.0405
+-rw-r--r-- 1 506 450 4335 Sep 18 22:38 8.1.0406
+-rw-r--r-- 1 506 450 33033 Sep 18 22:51 8.1.0407
+-rw-r--r-- 1 506 450 7190 Sep 18 22:59 8.1.0408
+-rw-r--r-- 1 506 450 3554 Sep 19 21:07 8.1.0409
+-rw-r--r-- 1 506 450 8456 Sep 19 21:56 8.1.0410
+-rw-r--r-- 1 506 450 1570 Sep 19 22:01 8.1.0411
+-rw-r--r-- 1 506 450 2839 Sep 19 22:40 8.1.0412
+-rw-r--r-- 1 506 450 2486 Sep 20 21:40 8.1.0413
+-rw-r--r-- 1 506 450 3066 Sep 21 12:00 8.1.0414
+-rw-r--r-- 1 506 450 4556 Sep 21 12:24 8.1.0415
+-rw-r--r-- 1 506 450 2741 Sep 21 12:47 8.1.0416
+-rw-r--r-- 1 506 450 4674 Sep 21 12:54 8.1.0417
+-rw-r--r-- 1 506 450 2249 Sep 21 13:44 8.1.0418
+-rw-r--r-- 1 506 450 1921 Sep 21 13:57 8.1.0419
+-rw-r--r-- 1 506 450 2056 Sep 21 14:02 8.1.0420
+-rw-r--r-- 1 506 450 2776 Sep 21 14:32 8.1.0421
+-rw-r--r-- 1 506 450 1647 Sep 21 14:43 8.1.0422
+-rw-r--r-- 1 506 450 2704 Sep 21 14:49 8.1.0423
+-rw-r--r-- 1 506 450 3886 Sep 21 16:39 8.1.0424
+-rw-r--r-- 1 506 450 2891 Sep 21 17:01 8.1.0425
+-rw-r--r-- 1 506 450 2598 Sep 22 14:41 8.1.0426
+-rw-r--r-- 1 506 450 2361 Sep 22 14:41 8.1.0427
+-rw-r--r-- 1 506 450 3757 Sep 22 21:39 8.1.0428
+-rw-r--r-- 1 506 450 1649 Sep 23 19:37 8.1.0429
+-rw-r--r-- 1 506 450 1332 Sep 24 21:32 8.1.0430
+-rw-r--r-- 1 506 450 15030 Sep 24 21:51 8.1.0431
+-rw-r--r-- 1 506 450 1645 Sep 25 19:00 8.1.0432
+-rw-r--r-- 1 506 450 2241 Sep 25 20:49 8.1.0433
+-rw-r--r-- 1 506 450 9471 Sep 25 22:08 8.1.0434
+-rw-r--r-- 1 506 450 2271 Sep 25 22:18 8.1.0435
+-rw-r--r-- 1 506 450 2471 Sep 25 22:28 8.1.0436
+-rw-r--r-- 1 506 450 2119 Sep 28 22:31 8.1.0437
+-rw-r--r-- 1 506 450 9235 Sep 28 23:11 8.1.0438
+-rw-r--r-- 1 506 450 16394 Sep 30 17:14 8.1.0439
+-rw-r--r-- 1 506 450 2960 Sep 30 17:16 8.1.0440
+-rw-r--r-- 1 506 450 1734 Sep 30 17:45 8.1.0441
+-rw-r--r-- 1 506 450 1685 Sep 30 18:22 8.1.0442
+-rw-r--r-- 1 506 450 108558 Sep 30 21:43 8.1.0443
+-rw-r--r-- 1 506 450 1546 Oct 02 14:15 8.1.0444
+-rw-r--r-- 1 506 450 9270 Oct 02 14:45 8.1.0445
+-rw-r--r-- 1 506 450 1447 Oct 02 15:07 8.1.0446
+-rw-r--r-- 1 506 450 4197 Oct 02 16:24 8.1.0447
+-rw-r--r-- 1 506 450 12315 Oct 02 18:26 8.1.0448
+-rw-r--r-- 1 506 450 6929 Oct 02 21:21 8.1.0449
+-rw-r--r-- 1 506 450 2060 Oct 02 21:49 8.1.0450
+-rw-r--r-- 1 506 450 6235 Oct 03 22:23 8.1.0451
+-rw-r--r-- 1 506 450 3847 Oct 06 15:03 8.1.0452
+-rw-r--r-- 1 506 450 3698 Oct 06 15:19 8.1.0453
+-rw-r--r-- 1 506 450 3104 Oct 06 15:43 8.1.0454
+-rw-r--r-- 1 506 450 6496 Oct 07 14:39 8.1.0455
+-rw-r--r-- 1 506 450 3080 Oct 07 15:42 8.1.0456
+-rw-r--r-- 1 506 450 7330 Oct 07 15:50 8.1.0457
+-rw-r--r-- 1 506 450 2997 Oct 07 17:47 8.1.0458
+-rw-r--r-- 1 506 450 1582 Oct 07 18:43 8.1.0459
+-rw-r--r-- 1 506 450 3900 Oct 07 20:26 8.1.0460
+-rw-r--r-- 1 506 450 130449 Oct 07 20:26 8.1.0461
+-rw-r--r-- 1 506 450 2953 Oct 07 20:35 8.1.0462
+-rw-r--r-- 1 506 450 2527 Oct 07 20:49 8.1.0463
+-rw-r--r-- 1 506 450 2848 Oct 07 21:37 8.1.0464
+-rw-r--r-- 1 506 450 1671 Oct 07 22:47 8.1.0465
+-rw-r--r-- 1 506 450 7829 Oct 07 23:17 8.1.0466
+-rw-r--r-- 1 506 450 3658 Oct 08 20:08 8.1.0467
+-rw-r--r-- 1 506 450 3212 Oct 09 21:50 8.1.0468
+-rw-r--r-- 1 506 450 19665 Oct 11 17:39 8.1.0469
+-rw-r--r-- 1 506 450 10852 Oct 11 19:28 8.1.0470
+-rw-r--r-- 1 506 450 3488 Oct 12 22:15 8.1.0471
+-rw-r--r-- 1 506 450 9221 Oct 13 17:26 8.1.0472
+-rw-r--r-- 1 506 450 2574 Oct 13 19:07 8.1.0473
+-rw-r--r-- 1 506 450 5110 Oct 14 16:25 8.1.0474
+-rw-r--r-- 1 506 450 15480 Oct 14 21:41 8.1.0475
+-rw-r--r-- 1 506 450 3035 Oct 14 22:04 8.1.0476
+-rw-r--r-- 1 506 450 1255 Oct 14 22:38 8.1.0477
+-rw-r--r-- 1 506 450 1704 Oct 19 16:54 8.1.0478
+-rw-r--r-- 1 506 450 4319 Oct 15 22:52 8.1.0479
+-rw-r--r-- 1 506 450 2299 Oct 19 16:54 8.1.0480
+-rw-r--r-- 1 506 450 2186 Oct 16 22:14 8.1.0481
+-rw-r--r-- 1 506 450 2192 Oct 19 16:54 8.1.0482
+-rw-r--r-- 1 506 450 2806 Oct 17 22:46 8.1.0483
+-rw-r--r-- 1 506 450 8349 Oct 19 16:54 8.1.0484
+-rw-r--r-- 1 506 450 2921 Oct 19 16:54 8.1.0485
+-rw-r--r-- 1 506 450 1842 Oct 19 17:37 8.1.0486
+-rw-r--r-- 1 506 450 39192 Oct 19 22:37 8.1.0487
+-rw-r--r-- 1 506 450 15995 Oct 20 20:54 8.1.0488
+-rw-r--r-- 1 506 450 5140 Oct 21 18:48 8.1.0489
+-rw-r--r-- 1 506 450 4061 Oct 21 22:46 8.1.0490
+-rw-r--r-- 1 506 450 1640 Oct 23 21:43 8.1.0491
+-rw-r--r-- 1 506 450 3142 Oct 25 11:26 8.1.0492
+-rw-r--r-- 1 506 450 13964 Oct 25 13:32 8.1.0493
+-rw-r--r-- 1 506 450 3977 Oct 25 13:32 8.1.0494
+-rw-r--r-- 1 506 450 7883 Oct 25 13:32 8.1.0495
+-rw-r--r-- 1 506 450 11218 Oct 25 16:54 8.1.0496
+-rw-r--r-- 1 506 450 3122 Oct 25 17:52 8.1.0497
+-rw-r--r-- 1 506 450 3486 Oct 27 14:27 8.1.0498
+-rw-r--r-- 1 506 450 4415 Oct 28 14:36 8.1.0499
+-rw-r--r-- 1 506 450 1549 Oct 28 15:44 8.1.0500
+-rw-r--r-- 1 506 450 1823 Oct 30 22:17 8.1.0501
+-rw-r--r-- 1 506 450 5075 Oct 31 23:10 8.1.0502
+-rw-r--r-- 1 506 450 1854 Nov 01 21:15 8.1.0503
+-rw-r--r-- 1 506 450 3277 Nov 02 11:59 8.1.0504
+-rw-r--r-- 1 506 450 1858 Nov 03 19:00 8.1.0505
+-rw-r--r-- 1 506 450 1836 Nov 03 19:07 8.1.0506
+-rw-r--r-- 1 506 450 3054 Nov 03 19:52 8.1.0507
+-rw-r--r-- 1 506 450 3099 Nov 03 21:10 8.1.0508
+-rw-r--r-- 1 506 450 2311 Nov 03 21:47 8.1.0509
+-rw-r--r-- 1 506 450 2146 Nov 04 14:41 8.1.0510
+-rw-r--r-- 1 506 450 2370 Nov 04 23:40 8.1.0511
+-rw-r--r-- 1 506 450 2387 Nov 05 20:26 8.1.0512
+-rw-r--r-- 1 506 450 2564 Nov 05 21:22 8.1.0513
+-rw-r--r-- 1 506 450 26020 Nov 10 16:16 8.1.0514
+-rw-r--r-- 1 506 450 8965 Nov 10 17:33 8.1.0515
+-rw-r--r-- 1 506 450 4755 Nov 10 18:55 8.1.0516
+-rw-r--r-- 1 506 450 1951 Nov 10 20:29 8.1.0517
+-rw-r--r-- 1 506 450 2801 Nov 10 20:48 8.1.0518
+-rw-r--r-- 1 506 450 23694 Nov 11 15:21 8.1.0519
+-rw-r--r-- 1 506 450 1717 Nov 11 18:52 8.1.0520
+-rw-r--r-- 1 506 450 1657 Nov 11 21:23 8.1.0521
+-rw-r--r-- 1 506 450 2564 Nov 11 22:19 8.1.0522
+-rw-r--r-- 1 506 450 12244 Nov 11 22:51 8.1.0523
+-rw-r--r-- 1 506 450 2080 Nov 11 23:15 8.1.0524
+-rw-r--r-- 1 506 450 3553 Nov 12 21:43 8.1.0525
+-rw-r--r-- 1 506 450 1694 Nov 12 21:45 8.1.0526
+-rw-r--r-- 1 506 450 1727 Nov 14 21:46 8.1.0527
+-rw-r--r-- 1 506 450 27062 Nov 16 16:22 8.1.0528
+-rw-r--r-- 1 506 450 3431 Nov 16 16:52 8.1.0529
+-rw-r--r-- 1 506 450 3468 Nov 16 17:46 8.1.0530
+-rw-r--r-- 1 506 450 2564 Nov 16 18:23 8.1.0531
+-rw-r--r-- 1 506 450 10477 Nov 16 18:46 8.1.0532
+-rw-r--r-- 1 506 450 1607 Nov 16 18:50 8.1.0533
+-rw-r--r-- 1 506 450 10454 Nov 16 19:40 8.1.0534
+-rw-r--r-- 1 506 450 2589 Nov 16 20:55 8.1.0535
+-rw-r--r-- 1 506 450 2944 Nov 18 12:26 8.1.0536
+-rw-r--r-- 1 506 450 2151 Nov 20 02:54 8.1.0537
+-rw-r--r-- 1 506 450 1629 Nov 20 04:26 8.1.0538
+-rw-r--r-- 1 506 450 3595 Nov 20 13:34 8.1.0539
+-rw-r--r-- 1 506 450 3752 Nov 21 14:03 8.1.0540
+-rw-r--r-- 1 506 450 2844 Nov 21 14:03 8.1.0541
+-rw-r--r-- 1 506 450 13399 Nov 22 12:28 8.1.0542
+-rw-r--r-- 1 506 450 2020 Nov 24 14:29 8.1.0543
+-rw-r--r-- 1 506 450 13034 Nov 25 02:19 8.1.0544
+-rw-r--r-- 1 506 450 2290 Nov 25 04:09 8.1.0545
+-rw-r--r-- 1 506 450 1370 Nov 25 04:31 8.1.0546
+-rw-r--r-- 1 506 450 1459 Nov 25 05:12 8.1.0547
+-rw-r--r-- 1 506 450 1682 Nov 26 21:19 8.1.0548
+-rw-r--r-- 1 506 450 3892 Nov 26 21:22 8.1.0549
+-rw-r--r-- 1 506 450 3590 Nov 28 20:39 8.1.0550
+-rw-r--r-- 1 506 450 2045 Nov 28 21:21 8.1.0551
+-rw-r--r-- 1 506 450 3711 Nov 30 21:58 8.1.0552
+-rw-r--r-- 1 506 450 6225 Nov 30 22:40 8.1.0553
+-rw-r--r-- 1 506 450 4062 Dec 01 12:03 8.1.0554
+-rw-r--r-- 1 506 450 2343 Dec 01 13:15 8.1.0555
+-rw-r--r-- 1 506 450 3947 Dec 01 21:08 8.1.0556
+-rw-r--r-- 1 506 450 16010 Dec 02 14:04 8.1.0557
+-rw-r--r-- 1 506 450 7059 Dec 02 14:04 8.1.0558
+-rw-r--r-- 1 506 450 3535 Dec 02 14:55 8.1.0559
+-rw-r--r-- 1 506 450 4527 Dec 02 18:22 8.1.0560
+-rw-r--r-- 1 506 450 1987 Dec 03 21:38 8.1.0561
+-rw-r--r-- 1 506 450 7029 Dec 04 22:25 8.1.0562
+-rw-r--r-- 1 506 450 1734 Dec 04 22:38 8.1.0563
+-rw-r--r-- 1 506 450 2097 Dec 05 18:44 8.1.0564
+-rw-r--r-- 1 506 450 1779 Dec 05 19:46 8.1.0565
+-rw-r--r-- 1 506 450 2201 Dec 07 14:19 8.1.0566
+-rw-r--r-- 1 506 450 1986 Dec 07 14:41 8.1.0567
+-rw-r--r-- 1 506 450 2214 Dec 07 14:42 8.1.0568
+-rw-r--r-- 1 506 450 3027 Dec 07 16:38 8.1.0569
+-rw-r--r-- 1 506 450 4021 Dec 07 21:09 8.1.0570
+-rw-r--r-- 1 506 450 3527 Dec 08 14:46 8.1.0571
+-rw-r--r-- 1 506 450 2180 Dec 08 14:53 8.1.0572
+-rw-r--r-- 1 506 450 9154 Dec 08 16:05 8.1.0573
+-rw-r--r-- 1 506 450 3955 Dec 09 15:01 8.1.0574
+-rw-r--r-- 1 506 450 10330 Dec 09 15:53 8.1.0575
+-rw-r--r-- 1 506 450 2167 Dec 10 21:37 8.1.0576
+-rw-r--r-- 1 506 450 5482 Dec 11 20:40 8.1.0577
+-rw-r--r-- 1 506 450 8465 Dec 12 20:35 8.1.0578
+-rw-r--r-- 1 506 450 74440 Dec 13 22:21 8.1.0579
+-rw-r--r-- 1 506 450 24897 Dec 13 22:21 MD5SUMS
+-rw-r--r-- 1 506 450 36772 Dec 13 22:21 README
diff --git a/data/vim/patches/8.1.0214 b/data/vim/patches/8.1.0214
new file mode 100644
index 000000000..6b67d1454
--- /dev/null
+++ b/data/vim/patches/8.1.0214
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0214
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0214
+Problem: +autochdir feature not reported by has() or :version.
+Solution: Add the feature in the list.
+Files: src/evalfunc.c, src/version.c
+
+
+*** ../vim-8.1.0213/src/evalfunc.c 2018-07-25 21:19:09.363656976 +0200
+--- src/evalfunc.c 2018-07-27 22:01:31.050713281 +0200
+***************
+*** 6045,6050 ****
+--- 6045,6053 ----
+ "arabic",
+ #endif
+ "autocmd",
++ #ifdef FEAT_AUTOCHDIR
++ "autochdir",
++ #endif
+ #ifdef FEAT_AUTOSERVERNAME
+ "autoservername",
+ #endif
+*** ../vim-8.1.0213/src/version.c 2018-07-25 22:36:48.991518559 +0200
+--- src/version.c 2018-07-27 22:04:16.085747831 +0200
+***************
+*** 101,106 ****
+--- 101,111 ----
+ "-arabic",
+ #endif
+ "+autocmd",
++ #ifdef FEAT_AUTOCHDIR
++ "+autochdir",
++ #else
++ "-autochdir",
++ #endif
+ #ifdef FEAT_AUTOSERVERNAME
+ "+autoservername",
+ #else
+*** ../vim-8.1.0213/src/version.c 2018-07-25 22:36:48.991518559 +0200
+--- src/version.c 2018-07-27 22:04:16.085747831 +0200
+***************
+*** 795,796 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 214,
+ /**/
+
+--
+LAUNCELOT: At last! A call! A cry of distress ...
+ (he draws his sword, and turns to CONCORDE)
+ Concorde! Brave, Concorde ... you shall not have died in vain!
+CONCORDE: I'm not quite dead, sir ...
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0215 b/data/vim/patches/8.1.0215
new file mode 100644
index 000000000..c77c7106d
--- /dev/null
+++ b/data/vim/patches/8.1.0215
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0215
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0215
+Problem: No error if configure --with-x cannot configure X.
+Solution: Check that when --with-x is used X can be configured.
+Files: src/configure.ac, src/auto/configure
+
+
+*** ../vim-8.1.0214/src/configure.ac 2018-05-13 15:37:01.000000000 +0200
+--- src/configure.ac 2018-07-27 22:31:12.914547455 +0200
+***************
+*** 72,77 ****
+--- 72,80 ----
+ [fail_if_missing="no"])
+ AC_MSG_RESULT($fail_if_missing)
+
++ dnl Keep original value to check later.
++ with_x_arg="$with_x"
++
+ dnl Set default value for CFLAGS if none is defined or it's empty
+ if test -z "$CFLAGS"; then
+ CFLAGS="-O"
+***************
+*** 2283,2288 ****
+--- 2286,2296 ----
+ fi
+ fi
+
++ dnl Check if --with-x was given but it doesn't work.
++ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
++ AC_MSG_ERROR([could not configure X])
++ fi
++
+ test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
+
+ AC_MSG_CHECKING(--enable-gui argument)
+*** ../vim-8.1.0214/src/auto/configure 2018-05-13 15:38:02.000000000 +0200
+--- src/auto/configure 2018-07-27 22:31:16.926521603 +0200
+***************
+*** 4466,4471 ****
+--- 4466,4473 ----
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
+ $as_echo "$fail_if_missing" >&6; }
+
++ with_x_arg="$with_x"
++
+ if test -z "$CFLAGS"; then
+ CFLAGS="-O"
+ test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
+***************
+*** 9003,9008 ****
+--- 9005,9014 ----
+ fi
+ fi
+
++ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
++ as_fn_error $? "could not configure X" "$LINENO" 5
++ fi
++
+ test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
+*** ../vim-8.1.0214/src/version.c 2018-07-27 22:08:54.088115090 +0200
+--- src/version.c 2018-07-27 22:34:24.421319751 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 215,
+ /**/
+
+--
+Why doesn't Tarzan have a beard?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0216 b/data/vim/patches/8.1.0216
new file mode 100644
index 000000000..317e0e8ab
--- /dev/null
+++ b/data/vim/patches/8.1.0216
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0216
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0216
+Problem: Part of file not indented properly.
+Solution: Adjust the indent. (Ken Takata)
+Files: src/getchar.c
+
+
+*** ../vim-8.1.0215/src/getchar.c 2018-07-03 14:48:11.877218375 +0200
+--- src/getchar.c 2018-07-27 23:15:01.563375509 +0200
+***************
+*** 1710,1727 ****
+ * its ASCII equivalent */
+ switch (c)
+ {
+! case K_KPLUS: c = '+'; break;
+! case K_KMINUS: c = '-'; break;
+! case K_KDIVIDE: c = '/'; break;
+ case K_KMULTIPLY: c = '*'; break;
+! case K_KENTER: c = CAR; break;
+ case K_KPOINT:
+ #ifdef WIN32
+! /* Can be either '.' or a ',', *
+! * depending on the type of keypad. */
+! c = MapVirtualKey(VK_DECIMAL, 2); break;
+ #else
+! c = '.'; break;
+ #endif
+ case K_K0: c = '0'; break;
+ case K_K1: c = '1'; break;
+--- 1710,1727 ----
+ * its ASCII equivalent */
+ switch (c)
+ {
+! case K_KPLUS: c = '+'; break;
+! case K_KMINUS: c = '-'; break;
+! case K_KDIVIDE: c = '/'; break;
+ case K_KMULTIPLY: c = '*'; break;
+! case K_KENTER: c = CAR; break;
+ case K_KPOINT:
+ #ifdef WIN32
+! // Can be either '.' or a ',',
+! // depending on the type of keypad.
+! c = MapVirtualKey(VK_DECIMAL, 2); break;
+ #else
+! c = '.'; break;
+ #endif
+ case K_K0: c = '0'; break;
+ case K_K1: c = '1'; break;
+*** ../vim-8.1.0215/src/version.c 2018-07-27 22:35:12.309014484 +0200
+--- src/version.c 2018-07-27 23:15:46.891104698 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 216,
+ /**/
+
+--
+FIRST GUARD: Ah! Now ... we're not allowed to ...
+ SIR LAUNCELOT runs him through, grabs his spear and stabs the other
+ guard who collapses in a heap. Hiccoughs quietly.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0217 b/data/vim/patches/8.1.0217
new file mode 100644
index 000000000..c953b8fa2
--- /dev/null
+++ b/data/vim/patches/8.1.0217
@@ -0,0 +1,85 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0217
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0217
+Problem: Compiler warning for variable set but not used.
+Solution: Move tilde_file inside #ifdef. (Hirohito Higashi, closes #3255)
+Files: src/ex_docmd.c
+
+
+*** ../vim-8.1.0216/src/ex_docmd.c 2018-07-25 21:19:09.355657022 +0200
+--- src/ex_docmd.c 2018-07-28 16:10:48.740329275 +0200
+***************
+*** 10654,10662 ****
+ int resultlen;
+ buf_T *buf;
+ int valid = VALID_HEAD + VALID_PATH; /* assume valid result */
+- int tilde_file = FALSE;
+ int spec_idx;
+ #ifdef FEAT_MODIFY_FNAME
+ int skip_mod = FALSE;
+ #endif
+ char_u strbuf[30];
+--- 10654,10662 ----
+ int resultlen;
+ buf_T *buf;
+ int valid = VALID_HEAD + VALID_PATH; /* assume valid result */
+ int spec_idx;
+ #ifdef FEAT_MODIFY_FNAME
++ int tilde_file = FALSE;
+ int skip_mod = FALSE;
+ #endif
+ char_u strbuf[30];
+***************
+*** 10723,10729 ****
+--- 10723,10731 ----
+ else
+ {
+ result = curbuf->b_fname;
++ #ifdef FEAT_MODIFY_FNAME
+ tilde_file = STRCMP(result, "~") == 0;
++ #endif
+ }
+ break;
+
+***************
+*** 10790,10796 ****
+--- 10792,10800 ----
+ else
+ {
+ result = buf->b_fname;
++ #ifdef FEAT_MODIFY_FNAME
+ tilde_file = STRCMP(result, "~") == 0;
++ #endif
+ }
+ }
+ break;
+*** ../vim-8.1.0216/src/version.c 2018-07-27 23:16:40.922781670 +0200
+--- src/version.c 2018-07-28 16:12:47.415624995 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 217,
+ /**/
+
+--
+ [clop clop]
+GUARD #1: Halt! Who goes there?
+ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of
+ Camelot. King of the Britons, defeator of the Saxons, sovereign of
+ all England!
+GUARD #1: Pull the other one!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0218 b/data/vim/patches/8.1.0218
new file mode 100644
index 000000000..27d77d5d0
--- /dev/null
+++ b/data/vim/patches/8.1.0218
@@ -0,0 +1,253 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0218
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0218
+Problem: Cannot add matches to another window. (Qiming Zhao)
+Solution: Add the "window" argument to matchadd() and matchaddpos().
+ (closes #3260)
+Files: src/evalfunc.c, runtime/doc/eval.txt, src/testdir/test_match.vim
+
+
+*** ../vim-8.1.0217/src/evalfunc.c 2018-07-27 22:08:54.084115114 +0200
+--- src/evalfunc.c 2018-07-28 16:38:54.045497084 +0200
+***************
+*** 7988,7993 ****
+--- 7988,8023 ----
+ find_some_match(argvars, rettv, MATCH_MATCH);
+ }
+
++ #ifdef FEAT_SEARCH_EXTRA
++ static int
++ matchadd_dict_arg(typval_T *tv, char_u **conceal_char, win_T **win)
++ {
++ dictitem_T *di;
++
++ if (tv->v_type != VAR_DICT)
++ {
++ EMSG(_(e_dictreq));
++ return FAIL;
++ }
++
++ if (dict_find(tv->vval.v_dict, (char_u *)"conceal", -1) != NULL)
++ *conceal_char = get_dict_string(tv->vval.v_dict,
++ (char_u *)"conceal", FALSE);
++
++ if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL)
++ {
++ *win = find_win_by_nr(&di->di_tv, NULL);
++ if (*win == NULL)
++ {
++ EMSG(_("E957: Invalid window number"));
++ return FAIL;
++ }
++ }
++
++ return OK;
++ }
++ #endif
++
+ /*
+ * "matchadd()" function
+ */
+***************
+*** 8002,8007 ****
+--- 8032,8038 ----
+ int id = -1;
+ int error = FALSE;
+ char_u *conceal_char = NULL;
++ win_T *win = curwin;
+
+ rettv->vval.v_number = -1;
+
+***************
+*** 8013,8030 ****
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+ id = (int)get_tv_number_chk(&argvars[3], &error);
+! if (argvars[4].v_type != VAR_UNKNOWN)
+! {
+! if (argvars[4].v_type != VAR_DICT)
+! {
+! EMSG(_(e_dictreq));
+! return;
+! }
+! if (dict_find(argvars[4].vval.v_dict,
+! (char_u *)"conceal", -1) != NULL)
+! conceal_char = get_dict_string(argvars[4].vval.v_dict,
+! (char_u *)"conceal", FALSE);
+! }
+ }
+ }
+ if (error == TRUE)
+--- 8044,8052 ----
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+ id = (int)get_tv_number_chk(&argvars[3], &error);
+! if (argvars[4].v_type != VAR_UNKNOWN
+! && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL)
+! return;
+ }
+ }
+ if (error == TRUE)
+***************
+*** 8035,8041 ****
+ return;
+ }
+
+! rettv->vval.v_number = match_add(curwin, grp, pat, prio, id, NULL,
+ conceal_char);
+ #endif
+ }
+--- 8057,8063 ----
+ return;
+ }
+
+! rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL,
+ conceal_char);
+ #endif
+ }
+***************
+*** 8054,8059 ****
+--- 8076,8082 ----
+ int error = FALSE;
+ list_T *l;
+ char_u *conceal_char = NULL;
++ win_T *win = curwin;
+
+ rettv->vval.v_number = -1;
+
+***************
+*** 8076,8093 ****
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+ id = (int)get_tv_number_chk(&argvars[3], &error);
+! if (argvars[4].v_type != VAR_UNKNOWN)
+! {
+! if (argvars[4].v_type != VAR_DICT)
+! {
+! EMSG(_(e_dictreq));
+! return;
+! }
+! if (dict_find(argvars[4].vval.v_dict,
+! (char_u *)"conceal", -1) != NULL)
+! conceal_char = get_dict_string(argvars[4].vval.v_dict,
+! (char_u *)"conceal", FALSE);
+! }
+ }
+ }
+ if (error == TRUE)
+--- 8099,8108 ----
+ if (argvars[3].v_type != VAR_UNKNOWN)
+ {
+ id = (int)get_tv_number_chk(&argvars[3], &error);
+!
+! if (argvars[4].v_type != VAR_UNKNOWN
+! && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL)
+! return;
+ }
+ }
+ if (error == TRUE)
+***************
+*** 8100,8106 ****
+ return;
+ }
+
+! rettv->vval.v_number = match_add(curwin, group, NULL, prio, id, l,
+ conceal_char);
+ #endif
+ }
+--- 8115,8121 ----
+ return;
+ }
+
+! rettv->vval.v_number = match_add(win, group, NULL, prio, id, l,
+ conceal_char);
+ #endif
+ }
+*** ../vim-8.1.0217/runtime/doc/eval.txt 2018-07-15 17:01:06.361425488 +0200
+--- runtime/doc/eval.txt 2018-07-28 16:54:21.839764726 +0200
+***************
+*** 6015,6021 ****
+ the pattern. 'smartcase' is NOT used. The matching is always
+ done like 'magic' is set and 'cpoptions' is empty.
+
+! *matchadd()* *E798* *E799* *E801*
+ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
+ Defines a pattern to be highlighted in the current window (a
+ "match"). It will be highlighted with {group}. Returns an
+--- 6016,6022 ----
+ the pattern. 'smartcase' is NOT used. The matching is always
+ done like 'magic' is set and 'cpoptions' is empty.
+
+! *matchadd()* *E798* *E799* *E801* *E957*
+ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
+ Defines a pattern to be highlighted in the current window (a
+ "match"). It will be highlighted with {group}. Returns an
+***************
+*** 6054,6059 ****
+--- 6055,6062 ----
+ conceal Special character to show instead of the
+ match (only for |hl-Conceal| highlighted
+ matches, see |:syn-cchar|)
++ window Instead of the current window use the
++ window with this number or window ID.
+
+ The number of matches is not limited, as it is the case with
+ the |:match| commands.
+*** ../vim-8.1.0217/src/testdir/test_match.vim 2017-09-14 14:16:37.000000000 +0200
+--- src/testdir/test_match.vim 2018-07-28 16:51:59.280637174 +0200
+***************
+*** 192,197 ****
+--- 192,219 ----
+ set hlsearch&
+ endfunc
+
++ func Test_matchaddpos_otherwin()
++ syntax on
++ new
++ call setline(1, ['12345', 'NP'])
++ let winid = win_getid()
++
++ wincmd w
++ call matchadd('Search', '4', 10, -1, {'window': winid})
++ call matchaddpos('Error', [[1,2], [2,2]], 10, -1, {'window': winid})
++ redraw!
++ call assert_notequal(screenattr(1,2), 0)
++ call assert_notequal(screenattr(1,4), 0)
++ call assert_notequal(screenattr(2,2), 0)
++ call assert_equal(screenattr(1,2), screenattr(2,2))
++ call assert_notequal(screenattr(1,2), screenattr(1,4))
++
++ wincmd w
++ bwipe!
++ call clearmatches()
++ syntax off
++ endfunc
++
+ func Test_matchaddpos_using_negative_priority()
+ set hlsearch
+
+*** ../vim-8.1.0217/src/version.c 2018-07-28 16:14:26.131040141 +0200
+--- src/version.c 2018-07-28 16:40:26.416917394 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 218,
+ /**/
+
+--
+'I generally avoid temptation unless I can't resist it."
+ -- Mae West
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0219 b/data/vim/patches/8.1.0219
new file mode 100644
index 000000000..eae18c16a
--- /dev/null
+++ b/data/vim/patches/8.1.0219
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0219
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0219
+Problem: Expanding ## fails to escape backtick.
+Solution: Escape a backtick in a file name. (closes #3257)
+Files: src/ex_docmd.c, src/testdir/test_edit.vim
+
+
+*** ../vim-8.1.0218/src/ex_docmd.c 2018-07-28 16:14:26.131040141 +0200
+--- src/ex_docmd.c 2018-07-28 17:02:45.729605564 +0200
+***************
+*** 10954,10960 ****
+ #ifndef BACKSLASH_IN_FILENAME
+ || *p == '\\'
+ #endif
+! )
+ {
+ /* insert a backslash */
+ if (retval != NULL)
+--- 10954,10960 ----
+ #ifndef BACKSLASH_IN_FILENAME
+ || *p == '\\'
+ #endif
+! || *p == '`')
+ {
+ /* insert a backslash */
+ if (retval != NULL)
+*** ../vim-8.1.0218/src/testdir/test_edit.vim 2018-06-06 21:03:57.780523901 +0200
+--- src/testdir/test_edit.vim 2018-07-28 17:05:00.900978753 +0200
+***************
+*** 1375,1380 ****
+--- 1375,1388 ----
+ set swapfile&
+ endfunc
+
++ func Test_edit_backtick()
++ next a\`b c
++ call assert_equal('a`b', expand('%'))
++ next
++ call assert_equal('c', expand('%'))
++ call assert_equal('a\`b c', expand('##'))
++ endfunc
++
+ func Test_edit_quit()
+ edit foo.txt
+ split
+*** ../vim-8.1.0218/src/version.c 2018-07-28 16:55:51.439217124 +0200
+--- src/version.c 2018-07-28 17:07:37.140211824 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 219,
+ /**/
+
+--
+Veni, Vidi, Video -- I came, I saw, I taped what I saw.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0220 b/data/vim/patches/8.1.0220
new file mode 100644
index 000000000..523cbc277
--- /dev/null
+++ b/data/vim/patches/8.1.0220
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0220
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0220
+Problem: Ruby converts v:true and v:false to a number.
+Solution: Use Qtrue and Qfalse instead. (Masataka Pocke Kuwabara,
+ closes #3259)
+Files: src/if_ruby.c, src/testdir/test_ruby.vim
+
+
+*** ../vim-8.1.0219/src/if_ruby.c 2018-07-25 22:02:32.231966301 +0200
+--- src/if_ruby.c 2018-07-28 17:12:56.698546960 +0200
+***************
+*** 1085,1092 ****
+ }
+ else if (tv->v_type == VAR_SPECIAL)
+ {
+! if (tv->vval.v_number <= VVAL_TRUE)
+! result = INT2NUM(tv->vval.v_number);
+ } /* else return Qnil; */
+
+ return result;
+--- 1085,1094 ----
+ }
+ else if (tv->v_type == VAR_SPECIAL)
+ {
+! if (tv->vval.v_number == VVAL_TRUE)
+! result = Qtrue;
+! else if (tv->vval.v_number == VVAL_FALSE)
+! result = Qfalse;
+ } /* else return Qnil; */
+
+ return result;
+*** ../vim-8.1.0219/src/testdir/test_ruby.vim 2018-07-25 22:02:32.235966277 +0200
+--- src/testdir/test_ruby.vim 2018-07-28 17:12:56.698546960 +0200
+***************
+*** 33,38 ****
+--- 33,46 ----
+ call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n"))
+ endfunc
+
++ func Test_ruby_evaluate_special_var()
++ let l = [v:true, v:false, v:null, v:none]
++ redir => l:out
++ ruby d = Vim.evaluate("l"); print d
++ redir END
++ call assert_equal(['[true, false, nil, nil]'], split(l:out, "\n"))
++ endfunc
++
+ func Test_rubydo()
+ " Check deleting lines does not trigger ml_get error.
+ new
+*** ../vim-8.1.0219/src/version.c 2018-07-28 17:07:48.608154066 +0200
+--- src/version.c 2018-07-28 17:14:20.930093228 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 220,
+ /**/
+
+--
+A real patriot is the fellow who gets a parking ticket and rejoices
+that the system works.
+
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0221 b/data/vim/patches/8.1.0221
new file mode 100644
index 000000000..cef2ca8ce
--- /dev/null
+++ b/data/vim/patches/8.1.0221
@@ -0,0 +1,463 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0221
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0221
+Problem: Not enough testing for the Ruby interface.
+Solution: Add more tests. (Dominique Pelle, closes #3252)
+Files: runtime/doc/if_ruby.txt, src/testdir/test_ruby.vim
+
+
+*** ../vim-8.1.0220/runtime/doc/if_ruby.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/if_ruby.txt 2018-07-28 17:20:52.903932857 +0200
+***************
+*** 145,151 ****
+
+ Methods:
+
+! name Returns the name of the buffer.
+ number Returns the number of the buffer.
+ count Returns the number of lines.
+ length Returns the number of lines.
+--- 145,151 ----
+
+ Methods:
+
+! name Returns the full name of the buffer.
+ number Returns the number of the buffer.
+ count Returns the number of lines.
+ length Returns the number of lines.
+***************
+*** 181,186 ****
+--- 181,187 ----
+ width Returns the width of the window.
+ width = {n} Sets the window width to {n}.
+ cursor Returns a [row, col] array for the cursor position.
++ First line number is 1 and first column number is 0.
+ cursor = [{row}, {col}]
+ Sets the cursor position to {row} and {col}.
+
+*** ../vim-8.1.0220/src/testdir/test_ruby.vim 2018-07-28 17:18:05.164865356 +0200
+--- src/testdir/test_ruby.vim 2018-07-28 17:27:53.037565797 +0200
+***************
+*** 4,9 ****
+--- 4,16 ----
+ finish
+ end
+
++ " Helper function as there is no builtin rubyeval() function similar
++ " to perleval, luaevel() or pyeval().
++ func RubyEval(ruby_expr)
++ let s = split(execute('ruby print ' . a:ruby_expr), "\n")
++ return (len(s) == 0) ? '' : s[-1]
++ endfunc
++
+ func Test_ruby_change_buffer()
+ call setline(line('$'), ['1 line 1'])
+ ruby Vim.command("normal /^1\n")
+***************
+*** 11,46 ****
+ call assert_equal('1 changed line 1', getline('$'))
+ endfunc
+
+- func Test_ruby_evaluate_list()
+- call setline(line('$'), ['2 line 2'])
+- ruby Vim.command("normal /^2\n")
+- let l = ["abc", "def"]
+- ruby << EOF
+- curline = $curbuf.line_number
+- l = Vim.evaluate("l");
+- $curbuf.append(curline, l.join("\n"))
+- EOF
+- normal j
+- .rubydo $_ = $_.gsub(/\n/, '/')
+- call assert_equal('abc/def', getline('$'))
+- endfunc
+-
+- func Test_ruby_evaluate_dict()
+- let d = {'a': 'foo', 'b': 123}
+- redir => l:out
+- ruby d = Vim.evaluate("d"); print d
+- redir END
+- call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n"))
+- endfunc
+-
+- func Test_ruby_evaluate_special_var()
+- let l = [v:true, v:false, v:null, v:none]
+- redir => l:out
+- ruby d = Vim.evaluate("l"); print d
+- redir END
+- call assert_equal(['[true, false, nil, nil]'], split(l:out, "\n"))
+- endfunc
+-
+ func Test_rubydo()
+ " Check deleting lines does not trigger ml_get error.
+ new
+--- 18,23 ----
+***************
+*** 54,61 ****
+ call setline(1, ['one', 'two', 'three'])
+ rubydo Vim.command("new")
+ call assert_equal(wincount + 1, winnr('$'))
+! bwipe!
+! bwipe!
+ endfunc
+
+ func Test_rubyfile()
+--- 31,37 ----
+ call setline(1, ['one', 'two', 'three'])
+ rubydo Vim.command("new")
+ call assert_equal(wincount + 1, winnr('$'))
+! %bwipe!
+ endfunc
+
+ func Test_rubyfile()
+***************
+*** 73,80 ****
+--- 49,366 ----
+ normal gg
+ rubydo $curwin.cursor = [1, 5]
+ call assert_equal([1, 6], [line('.'), col('.')])
++ call assert_equal('[1, 5]', RubyEval('$curwin.cursor'))
+
+ " Check that movement after setting cursor position keeps current column.
+ normal j
+ call assert_equal([2, 6], [line('.'), col('.')])
++ call assert_equal('[2, 5]', RubyEval('$curwin.cursor'))
++
++ call assert_fails('ruby $curwin.cursor = [1]',
++ \ 'ArgumentError: array length must be 2')
++ bwipe!
++ endfunc
++
++ " Test buffer.count and buffer.length (number of lines in buffer)
++ func Test_buffer_count()
++ new
++ call setline(1, ['one', 'two', 'three'])
++ call assert_equal('3', RubyEval('$curbuf.count'))
++ call assert_equal('3', RubyEval('$curbuf.length'))
++ bwipe!
++ endfunc
++
++ " Test buffer.name (buffer name)
++ func Test_buffer_name()
++ new Xfoo
++ call assert_equal(expand('%:p'), RubyEval('$curbuf.name'))
++ bwipe
++ call assert_equal('', RubyEval('$curbuf.name'))
++ endfunc
++
++ " Test buffer.number (number of the buffer).
++ func Test_buffer_number()
++ new
++ call assert_equal(string(bufnr('%')), RubyEval('$curbuf.number'))
++ new
++ call assert_equal(string(bufnr('%')), RubyEval('$curbuf.number'))
++
++ %bwipe
++ endfunc
++
++ " Test buffer.delete({n}) (delete line {n})
++ func Test_buffer_delete()
++ new
++ call setline(1, ['one', 'two', 'three'])
++ ruby $curbuf.delete(2)
++ call assert_equal(['one', 'three'], getline(1, '$'))
++
++ call assert_fails('ruby $curbuf.delete(0)', 'IndexError: line number 0 out of range')
++ call assert_fails('ruby $curbuf.delete(3)', 'IndexError: line number 3 out of range')
++
++ bwipe!
++ endfunc
++
++ " Test buffer.append({str}, str) (append line {str} after line {n})
++ func Test_buffer_append()
++ new
++ ruby $curbuf.append(0, 'one')
++ ruby $curbuf.append(1, 'three')
++ ruby $curbuf.append(1, 'two')
++ ruby $curbuf.append(4, 'four')
++
++ call assert_equal(['one', 'two', 'three', '', 'four'], getline(1, '$'))
++
++ call assert_fails('ruby $curbuf.append(-1, "x")',
++ \ 'IndexError: line number -1 out of range')
++ call assert_fails('ruby $curbuf.append(6, "x")',
++ \ 'IndexError: line number 6 out of range')
++
++ bwipe!
++ endfunc
++
++ " Test buffer.line (get or set the current line)
++ func Test_buffer_line()
++ new
++ call setline(1, ['one', 'two', 'three'])
++ 2
++ call assert_equal('two', RubyEval('$curbuf.line'))
++
++ ruby $curbuf.line = 'TWO'
++ call assert_equal(['one', 'TWO', 'three'], getline(1, '$'))
++
++ bwipe!
++ endfunc
++
++ " Test buffer.line_number (get current line number)
++ func Test_buffer_line_number()
++ new
++ call setline(1, ['one', 'two', 'three'])
++ 2
++ call assert_equal('2', RubyEval('$curbuf.line_number'))
++
++ bwipe!
++ endfunc
++
++ func Test_buffer_get()
++ new
++ call setline(1, ['one', 'two'])
++ call assert_equal('one', RubyEval('$curbuf[1]'))
++ call assert_equal('two', RubyEval('$curbuf[2]'))
++
++ call assert_fails('ruby $curbuf[0]',
++ \ 'IndexError: line number 0 out of range')
++ call assert_fails('ruby $curbuf[3]',
++ \ 'IndexError: line number 3 out of range')
++
++ bwipe!
++ endfunc
++
++ func Test_buffer_set()
++ new
++ call setline(1, ['one', 'two'])
++ ruby $curbuf[2] = 'TWO'
++ ruby $curbuf[1] = 'ONE'
++
++ call assert_fails('ruby $curbuf[0] = "ZERO"',
++ \ 'IndexError: line number 0 out of range')
++ call assert_fails('ruby $curbuf[3] = "THREE"',
++ \ 'IndexError: line number 3 out of range')
++ bwipe!
++ endfunc
++
++ " Test window.width (get or set window height).
++ func Test_window_height()
++ new
++
++ " Test setting window height
++ ruby $curwin.height = 2
++ call assert_equal(2, winheight(0))
++
++ " Test getting window height
++ call assert_equal('2', RubyEval('$curwin.height'))
++
++ bwipe
++ endfunc
++
++ " Test window.width (get or set window width).
++ func Test_window_width()
++ vnew
++
++ " Test setting window width
++ ruby $curwin.width = 2
++ call assert_equal(2, winwidth(0))
++
++ " Test getting window width
++ call assert_equal('2', RubyEval('$curwin.width'))
++
++ bwipe
++ endfunc
++
++ " Test window.buffer (get buffer object of a window object).
++ func Test_window_buffer()
++ new Xfoo1
++ new Xfoo2
++ ruby $b2 = $curwin.buffer
++ ruby $w2 = $curwin
++ wincmd j
++ ruby $b1 = $curwin.buffer
++ ruby $w1 = $curwin
++
++ call assert_equal(RubyEval('$b1'), RubyEval('$w1.buffer'))
++ call assert_equal(RubyEval('$b2'), RubyEval('$w2.buffer'))
++ call assert_equal(string(bufnr('Xfoo1')), RubyEval('$w1.buffer.number'))
++ call assert_equal(string(bufnr('Xfoo2')), RubyEval('$w2.buffer.number'))
++
++ ruby $b1, $w1, $b2, $w2 = nil
++ %bwipe
++ endfunc
++
++ " Test Vim::Window.current (get current window object)
++ func Test_Vim_window_current()
++ let cw = RubyEval('$curwin')
++ call assert_equal(cw, RubyEval('Vim::Window.current'))
++ call assert_match('^#<Vim::Window:0x\x\+>$', cw)
++ endfunc
++
++ " Test Vim::Window.count (number of windows)
++ func Test_Vim_window_count()
++ new Xfoo1
++ new Xfoo2
++ split
++ call assert_equal('4', RubyEval('Vim::Window.count'))
++ %bwipe
++ call assert_equal('1', RubyEval('Vim::Window.count'))
++ endfunc
++
++ " Test Vim::Window[n] (get window object of window n)
++ func Test_Vim_window_get()
++ new Xfoo1
++ new Xfoo2
++ call assert_match('Xfoo2$', RubyEval('Vim::Window[0].buffer.name'))
++ wincmd j
++ call assert_match('Xfoo1$', RubyEval('Vim::Window[1].buffer.name'))
++ wincmd j
++ call assert_equal('', RubyEval('Vim::Window[2].buffer.name'))
++ %bwipe
++ endfunc
++
++ " Test Vim::Buffer.current (return the buffer object of current buffer)
++ func Test_Vim_buffer_current()
++ let cb = RubyEval('$curbuf')
++ call assert_equal(cb, RubyEval('Vim::Buffer.current'))
++ call assert_match('^#<Vim::Buffer:0x\x\+>$', cb)
++ endfunc
++
++ " Test Vim::Buffer:.count (return the number of buffers)
++ func Test_Vim_buffer_count()
++ new Xfoo1
++ new Xfoo2
++ call assert_equal('3', RubyEval('Vim::Buffer.count'))
++ %bwipe
++ call assert_equal('1', RubyEval('Vim::Buffer.count'))
++ endfunc
++
++ " Test Vim::buffer[n] (return the buffer object of buffer number n)
++ func Test_Vim_buffer_get()
++ new Xfoo1
++ new Xfoo2
++
++ " Index of Vim::Buffer[n] goes from 0 to the number of buffers.
++ call assert_equal('', RubyEval('Vim::Buffer[0].name'))
++ call assert_match('Xfoo1$', RubyEval('Vim::Buffer[1].name'))
++ call assert_match('Xfoo2$', RubyEval('Vim::Buffer[2].name'))
++ call assert_fails('ruby print Vim::Buffer[3].name',
++ \ "NoMethodError: undefined method `name' for nil:NilClass")
++ %bwipe
++ endfunc
++
++ " Test Vim::command({cmd}) (execute a Ex command))
++ " Test Vim::command({cmd})
++ func Test_Vim_command()
++ new
++ call setline(1, ['one', 'two', 'three', 'four'])
++ ruby Vim::command('2,3d')
++ call assert_equal(['one', 'four'], getline(1, '$'))
++ bwipe!
++ endfunc
++
++ " Test Vim::set_option (set a vim option)
++ func Test_Vim_set_option()
++ call assert_equal(0, &number)
++ ruby Vim::set_option('number')
++ call assert_equal(1, &number)
++ ruby Vim::set_option('nonumber')
++ call assert_equal(0, &number)
++ endfunc
++
++ func Test_Vim_evaluate()
++ call assert_equal('123', RubyEval('Vim::evaluate("123")'))
++ " Vim::evaluate("123").class gives Integer or Fixnum depending
++ " on versions of Ruby.
++ call assert_match('^Integer\|Fixnum$', RubyEval('Vim::evaluate("123").class'))
++
++ call assert_equal('1.23', RubyEval('Vim::evaluate("1.23")'))
++ call assert_equal('Float', RubyEval('Vim::evaluate("1.23").class'))
++
++ call assert_equal('foo', RubyEval('Vim::evaluate("\"foo\"")'))
++ call assert_equal('String', RubyEval('Vim::evaluate("\"foo\"").class'))
++
++ call assert_equal('[1, 2]', RubyEval('Vim::evaluate("[1, 2]")'))
++ call assert_equal('Array', RubyEval('Vim::evaluate("[1, 2]").class'))
++
++ call assert_equal('{"1"=>2}', RubyEval('Vim::evaluate("{1:2}")'))
++ call assert_equal('Hash', RubyEval('Vim::evaluate("{1:2}").class'))
++
++ call assert_equal('', RubyEval('Vim::evaluate("v:null")'))
++ call assert_equal('NilClass', RubyEval('Vim::evaluate("v:null").class'))
++
++ call assert_equal('', RubyEval('Vim::evaluate("v:none")'))
++ call assert_equal('NilClass', RubyEval('Vim::evaluate("v:none").class'))
++
++ call assert_equal('true', RubyEval('Vim::evaluate("v:true")'))
++ call assert_equal('TrueClass', RubyEval('Vim::evaluate("v:true").class'))
++ call assert_equal('false', RubyEval('Vim::evaluate("v:false")'))
++ call assert_equal('FalseClass',RubyEval('Vim::evaluate("v:false").class'))
++ endfunc
++
++ func Test_Vim_evaluate_list()
++ call setline(line('$'), ['2 line 2'])
++ ruby Vim.command("normal /^2\n")
++ let l = ["abc", "def"]
++ ruby << EOF
++ curline = $curbuf.line_number
++ l = Vim.evaluate("l");
++ $curbuf.append(curline, l.join("\n"))
++ EOF
++ normal j
++ .rubydo $_ = $_.gsub(/\n/, '/')
++ call assert_equal('abc/def', getline('$'))
++ endfunc
++
++ func Test_Vim_evaluate_dict()
++ let d = {'a': 'foo', 'b': 123}
++ redir => l:out
++ ruby d = Vim.evaluate("d"); print d
++ redir END
++ call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n"))
++ endfunc
++
++ " Test Vim::message({msg}) (display message {msg})
++ func Test_Vim_message()
++ ruby Vim::message('A message')
++ let messages = split(execute('message'), "\n")
++ call assert_equal('A message', messages[-1])
++ endfunc
++
++ func Test_print()
++ ruby print "Hello World!"
++ let messages = split(execute('message'), "\n")
++ call assert_equal('Hello World!', messages[-1])
++ endfunc
++
++ func Test_p()
++ ruby p 'Just a test'
++ let messages = split(execute('message'), "\n")
++ call assert_equal('"Just a test"', messages[-1])
+ endfunc
+*** ../vim-8.1.0220/src/version.c 2018-07-28 17:18:05.164865356 +0200
+--- src/version.c 2018-07-28 17:22:07.999512544 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 221,
+ /**/
+
+--
+GUARD #1: What, ridden on a horse?
+ARTHUR: Yes!
+GUARD #1: You're using coconuts!
+ARTHUR: What?
+GUARD #1: You've got two empty halves of coconut and you're bangin' 'em
+ together.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0222 b/data/vim/patches/8.1.0222
new file mode 100644
index 000000000..1ee0bfcd5
--- /dev/null
+++ b/data/vim/patches/8.1.0222
@@ -0,0 +1,145 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0222
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0222
+Problem: Errors are reported for "make install".
+Solution: Skip missing language files. (Christian Brabandt, closes #3254)
+Files: src/installman.sh
+
+
+*** ../vim-8.1.0221/src/installman.sh 2017-04-21 22:52:39.000000000 +0200
+--- src/installman.sh 2018-07-28 18:10:51.863723506 +0200
+***************
+*** 48,88 ****
+
+ if test $what = "install"; then
+ # vim.1
+! echo installing $destdir/$exename.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+! -e s+$vimloc/doc+$helpsubloc+ \
+! -e s+$vimloc/print+$printsubloc+ \
+! -e s+$vimloc/syntax+$synsubloc+ \
+! -e s+$vimloc/tutor+$tutorsubloc+ \
+! -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \
+! -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \
+! -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \
+! -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \
+! -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \
+! -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \
+! -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \
+! -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \
+! $helpsource/vim$langadd.1 > $destdir/$exename.1
+! chmod $manmod $destdir/$exename.1
+
+ # vimtutor.1
+! echo installing $destdir/$exename""tutor.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+! -e s+$vimloc/tutor+$tutorsubloc+ \
+! $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1
+! chmod $manmod $destdir/$exename""tutor.1
+
+ # vimdiff.1
+! echo installing $destdir/$vimdiffname.1
+! cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1
+! chmod $manmod $destdir/$vimdiffname.1
+
+ # evim.1
+! echo installing $destdir/$evimname.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+! -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \
+! $helpsource/evim$langadd.1 > $destdir/$evimname.1
+! chmod $manmod $destdir/$evimname.1
+ fi
+
+ if test $what = "uninstall"; then
+--- 48,96 ----
+
+ if test $what = "install"; then
+ # vim.1
+! if test -r $helpsource/vim$langadd.1; then
+! echo installing $destdir/$exename.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+! -e s+$vimloc/doc+$helpsubloc+ \
+! -e s+$vimloc/print+$printsubloc+ \
+! -e s+$vimloc/syntax+$synsubloc+ \
+! -e s+$vimloc/tutor+$tutorsubloc+ \
+! -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \
+! -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \
+! -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \
+! -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \
+! -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \
+! -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \
+! -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \
+! -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \
+! $helpsource/vim$langadd.1 > $destdir/$exename.1
+! chmod $manmod $destdir/$exename.1
+! fi
+
+ # vimtutor.1
+! if test -r $helpsource/vimtutor$langadd.1; then
+! echo installing $destdir/$exename""tutor.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+! -e s+$vimloc/tutor+$tutorsubloc+ \
+! $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1
+! chmod $manmod $destdir/$exename""tutor.1
+! fi
+
+ # vimdiff.1
+! if test -r $helpsource/vimdiff$langadd.1; then
+! echo installing $destdir/$vimdiffname.1
+! cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1
+! chmod $manmod $destdir/$vimdiffname.1
+! fi
+
+ # evim.1
+! if test -r $helpsource/evim$langadd.1; then
+! echo installing $destdir/$evimname.1
+! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \
+! -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \
+! $helpsource/evim$langadd.1 > $destdir/$evimname.1
+! chmod $manmod $destdir/$evimname.1
+! fi
+ fi
+
+ if test $what = "uninstall"; then
+***************
+*** 105,111 ****
+ fi
+ fi
+
+! if test $what = "xxd"; then
+ echo installing $destdir/xxd.1
+ cp $helpsource/xxd$langadd.1 $destdir/xxd.1
+ chmod $manmod $destdir/xxd.1
+--- 113,119 ----
+ fi
+ fi
+
+! if test $what = "xxd" -a -r "$helpsource/xxd${langadd}.1"; then
+ echo installing $destdir/xxd.1
+ cp $helpsource/xxd$langadd.1 $destdir/xxd.1
+ chmod $manmod $destdir/xxd.1
+*** ../vim-8.1.0221/src/version.c 2018-07-28 17:29:15.757096343 +0200
+--- src/version.c 2018-07-28 18:15:50.441981506 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 222,
+ /**/
+
+--
+"A mouse can be just as dangerous as a bullet or a bomb."
+ (US Representative Lamar Smith, R-Texas)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0223 b/data/vim/patches/8.1.0223
new file mode 100644
index 000000000..febc4715b
--- /dev/null
+++ b/data/vim/patches/8.1.0223
@@ -0,0 +1,142 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0223
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0223
+Problem: Completing shell command finds sub-directories in $PATH.
+Solution: Remove EW_DIR when completing an item in $PATH. (Jason Franklin)
+Files: src/ex_getln.c, src/tetdir/test_cmdline.vim
+
+
+*** ../vim-8.1.0222/src/ex_getln.c 2018-06-12 22:05:10.656251565 +0200
+--- src/ex_getln.c 2018-07-28 19:01:02.150240882 +0200
+***************
+*** 5193,5208 ****
+ hash_init(&found_ht);
+ for (s = path; ; s = e)
+ {
+- if (*s == NUL)
+- {
+- if (did_curdir)
+- break;
+- /* Find directories in the current directory, path is empty. */
+- did_curdir = TRUE;
+- }
+- else if (*s == '.')
+- did_curdir = TRUE;
+-
+ #if defined(MSWIN)
+ e = vim_strchr(s, ';');
+ #else
+--- 5193,5198 ----
+***************
+*** 5211,5216 ****
+--- 5201,5223 ----
+ if (e == NULL)
+ e = s + STRLEN(s);
+
++ if (*s == NUL)
++ {
++ if (did_curdir)
++ break;
++ // Find directories in the current directory, path is empty.
++ did_curdir = TRUE;
++ flags |= EW_DIR;
++ }
++ else if (STRNCMP(s, ".", (int)(e - s)) == 0)
++ {
++ did_curdir = TRUE;
++ flags |= EW_DIR;
++ }
++ else
++ // Do not match directories inside a $PATH item.
++ flags &= ~EW_DIR;
++
+ l = e - s;
+ if (l > MAXPATHL - 5)
+ break;
+***************
+*** 5266,5273 ****
+
+
+ # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL)
+- static void * call_user_expand_func(void *(*user_expand_func)(char_u *, int, typval_T *, int), expand_T *xp, int *num_file, char_u ***file);
+-
+ /*
+ * Call "user_expand_func()" to invoke a user defined Vim script function and
+ * return the result (either a string or a List).
+--- 5273,5278 ----
+*** ../vim-8.1.0222/src/testdir/test_cmdline.vim 2018-06-23 14:55:00.146628803 +0200
+--- src/testdir/test_cmdline.vim 2018-07-28 19:11:04.354676084 +0200
+***************
+*** 231,237 ****
+ call assert_equal([], l)
+
+ let l = getcompletion('.', 'shellcmd')
+! call assert_equal(['./', '../'], l[0:1])
+ call assert_equal(-1, match(l[2:], '^\.\.\?/$'))
+ let root = has('win32') ? 'C:\\' : '/'
+ let l = getcompletion(root, 'shellcmd')
+--- 231,237 ----
+ call assert_equal([], l)
+
+ let l = getcompletion('.', 'shellcmd')
+! call assert_equal(['./', '../'], filter(l, 'v:val =~ "\\./"'))
+ call assert_equal(-1, match(l[2:], '^\.\.\?/$'))
+ let root = has('win32') ? 'C:\\' : '/'
+ let l = getcompletion(root, 'shellcmd')
+***************
+*** 290,295 ****
+--- 290,318 ----
+ call assert_fails('call getcompletion("", "burp")', 'E475:')
+ endfunc
+
++ func Test_shellcmd_completion()
++ let save_path = $PATH
++
++ call mkdir('Xpathdir/Xpathsubdir', 'p')
++ call writefile([''], 'Xpathdir/Xfile.exe')
++ call setfperm('Xpathdir/Xfile.exe', 'rwx------')
++
++ " Set PATH to example directory without trailing slash.
++ let $PATH = getcwd() . '/Xpathdir'
++
++ " Test for the ":!<TAB>" case. Previously, this would include subdirs of
++ " dirs in the PATH, even though they won't be executed. We check that only
++ " subdirs of the PWD and executables from the PATH are included in the
++ " suggestions.
++ let actual = getcompletion('X', 'shellcmd')
++ let expected = map(filter(glob('*', 0, 1), 'isdirectory(v:val) && v:val[0] == "X"'), 'v:val . "/"')
++ call insert(expected, 'Xfile.exe')
++ call assert_equal(expected, actual)
++
++ call delete('Xpathdir', 'rf')
++ let $PATH = save_path
++ endfunc
++
+ func Test_expand_star_star()
+ call mkdir('a/b', 'p')
+ call writefile(['asdfasdf'], 'a/b/fileXname')
+*** ../vim-8.1.0222/src/version.c 2018-07-28 18:16:44.285662961 +0200
+--- src/version.c 2018-07-28 19:09:36.547197615 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 223,
+ /**/
+
+--
+Futility Factor: No experiment is ever a complete failure - it can always
+serve as a negative example.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0224 b/data/vim/patches/8.1.0224
new file mode 100644
index 000000000..814fae06b
--- /dev/null
+++ b/data/vim/patches/8.1.0224
@@ -0,0 +1,110 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0224
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0224
+Problem: Hang in bracketed paste mode when t_PE not encountered.
+Solution: Break out of the loop when got_int is set. (suggested by Christian
+ Brabandt, closes #3146)
+Files: src/edit.c
+
+
+*** ../vim-8.1.0223/src/edit.c 2018-07-08 16:50:33.103216858 +0200
+--- src/edit.c 2018-07-28 23:11:32.282300523 +0200
+***************
+*** 9685,9706 ****
+ int ret_char = -1;
+ int save_allow_keys = allow_keys;
+ int save_paste = p_paste;
+- int save_ai = curbuf->b_p_ai;
+
+ /* If the end code is too long we can't detect it, read everything. */
+ if (STRLEN(end) >= NUMBUFLEN)
+ end = NULL;
+ ++no_mapping;
+ allow_keys = 0;
+! p_paste = TRUE;
+! curbuf->b_p_ai = FALSE;
+
+ for (;;)
+ {
+! /* When the end is not defined read everything. */
+ if (end == NULL && vpeekc() == NUL)
+ break;
+! c = plain_vgetc();
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ idx += (*mb_char2bytes)(c, buf + idx);
+--- 9685,9715 ----
+ int ret_char = -1;
+ int save_allow_keys = allow_keys;
+ int save_paste = p_paste;
+
+ /* If the end code is too long we can't detect it, read everything. */
+ if (STRLEN(end) >= NUMBUFLEN)
+ end = NULL;
+ ++no_mapping;
+ allow_keys = 0;
+! if (!p_paste)
+! // Also have the side effects of setting 'paste' to make it work much
+! // faster.
+! set_option_value((char_u *)"paste", TRUE, NULL, 0);
+
+ for (;;)
+ {
+! // When the end is not defined read everything there is.
+ if (end == NULL && vpeekc() == NUL)
+ break;
+! do
+! {
+! c = vgetc();
+! } while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+! if (c == NUL || got_int)
+! // When CTRL-C was encountered the typeahead will be flushed and we
+! // won't get the end sequence.
+! break;
+!
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ idx += (*mb_char2bytes)(c, buf + idx);
+***************
+*** 9763,9770 ****
+
+ --no_mapping;
+ allow_keys = save_allow_keys;
+! p_paste = save_paste;
+! curbuf->b_p_ai = save_ai;
+
+ return ret_char;
+ }
+--- 9772,9779 ----
+
+ --no_mapping;
+ allow_keys = save_allow_keys;
+! if (!save_paste)
+! set_option_value((char_u *)"paste", FALSE, NULL, 0);
+
+ return ret_char;
+ }
+*** ../vim-8.1.0223/src/version.c 2018-07-28 19:20:09.787586245 +0200
+--- src/version.c 2018-07-28 23:08:55.583319931 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 224,
+ /**/
+
+--
+Computers are not intelligent. They only think they are.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0225 b/data/vim/patches/8.1.0225
new file mode 100644
index 000000000..d52a89249
--- /dev/null
+++ b/data/vim/patches/8.1.0225
@@ -0,0 +1,176 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0225
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0225
+Problem: Mode() does not indicate using CTRL-O from Insert mode.
+Solution: Add "niI", "niR" and "niV" to mode() result. (closes #3000)
+Files: runtime/doc/eval.txt, src/evalfunc.c,
+ src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0224/runtime/doc/eval.txt 2018-07-28 16:55:51.435217148 +0200
+--- runtime/doc/eval.txt 2018-07-29 15:22:39.416519885 +0200
+***************
+*** 6223,6254 ****
+ a non-empty String (|non-zero-arg|), then the full mode is
+ returned, otherwise only the first letter is returned.
+
+! n Normal, Terminal-Normal
+! no Operator-pending
+! v Visual by character
+! V Visual by line
+! CTRL-V Visual blockwise
+! s Select by character
+! S Select by line
+! CTRL-S Select blockwise
+! i Insert
+! ic Insert mode completion |compl-generic|
+! ix Insert mode |i_CTRL-X| completion
+! R Replace |R|
+! Rc Replace mode completion |compl-generic|
+! Rv Virtual Replace |gR|
+! Rx Replace mode |i_CTRL-X| completion
+! c Command-line editing
+! cv Vim Ex mode |gQ|
+! ce Normal Ex mode |Q|
+! r Hit-enter prompt
+! rm The -- more -- prompt
+! r? A |:confirm| query of some sort
+! ! Shell or external command is executing
+! t Terminal-Job mode: keys go to the job
+ This is useful in the 'statusline' option or when used
+ with |remote_expr()| In most other places it always returns
+ "c" or "n".
+ Also see |visualmode()|.
+
+ mzeval({expr}) *mzeval()*
+--- 6224,6261 ----
+ a non-empty String (|non-zero-arg|), then the full mode is
+ returned, otherwise only the first letter is returned.
+
+! n Normal, Terminal-Normal
+! no Operator-pending
+! niI Normal using |i_CTRL-O| in |Insert-mode|
+! niR Normal using |i_CTRL-O| in |Replace-mode|
+! niV Normal using |i_CTRL-O| in |Virtual-Replace-mode|
+! v Visual by character
+! V Visual by line
+! CTRL-V Visual blockwise
+! s Select by character
+! S Select by line
+! CTRL-S Select blockwise
+! i Insert
+! ic Insert mode completion |compl-generic|
+! ix Insert mode |i_CTRL-X| completion
+! R Replace |R|
+! Rc Replace mode completion |compl-generic|
+! Rv Virtual Replace |gR|
+! Rx Replace mode |i_CTRL-X| completion
+! c Command-line editing
+! cv Vim Ex mode |gQ|
+! ce Normal Ex mode |Q|
+! r Hit-enter prompt
+! rm The -- more -- prompt
+! r? A |:confirm| query of some sort
+! ! Shell or external command is executing
+! t Terminal-Job mode: keys go to the job
+ This is useful in the 'statusline' option or when used
+ with |remote_expr()| In most other places it always returns
+ "c" or "n".
++ Note that in the future more modes and more specific modes may
++ be added. It's better not to compare the whole string but only
++ the leading character(s).
+ Also see |visualmode()|.
+
+ mzeval({expr}) *mzeval()*
+*** ../vim-8.1.0224/src/evalfunc.c 2018-07-28 16:55:51.435217148 +0200
+--- src/evalfunc.c 2018-07-29 15:23:57.768058068 +0200
+***************
+*** 8366,8375 ****
+ static void
+ f_mode(typval_T *argvars, typval_T *rettv)
+ {
+! char_u buf[3];
+
+! buf[1] = NUL;
+! buf[2] = NUL;
+
+ if (time_for_testing == 93784)
+ {
+--- 8366,8374 ----
+ static void
+ f_mode(typval_T *argvars, typval_T *rettv)
+ {
+! char_u buf[4];
+
+! vim_memset(buf, 0, sizeof(buf));
+
+ if (time_for_testing == 93784)
+ {
+***************
+*** 8435,8440 ****
+--- 8434,8445 ----
+ buf[0] = 'n';
+ if (finish_op)
+ buf[1] = 'o';
++ else if (restart_edit == 'I' || restart_edit == 'R'
++ || restart_edit == 'V')
++ {
++ buf[1] = 'i';
++ buf[2] = restart_edit;
++ }
+ }
+
+ /* Clear out the minor mode when the argument is not a non-zero number or
+*** ../vim-8.1.0224/src/testdir/test_functions.vim 2018-07-22 19:36:29.251125855 +0200
+--- src/testdir/test_functions.vim 2018-07-29 15:31:26.897360022 +0200
+***************
+*** 464,469 ****
+--- 464,481 ----
+ call assert_equal('n', mode(0))
+ call assert_equal('n', mode(1))
+
++ " i_CTRL-O
++ exe "normal i\<C-O>:call Save_mode()\<Cr>\<Esc>"
++ call assert_equal("n-niI", g:current_modes)
++
++ " R_CTRL-O
++ exe "normal R\<C-O>:call Save_mode()\<Cr>\<Esc>"
++ call assert_equal("n-niR", g:current_modes)
++
++ " gR_CTRL-O
++ exe "normal gR\<C-O>:call Save_mode()\<Cr>\<Esc>"
++ call assert_equal("n-niV", g:current_modes)
++
+ " How to test operator-pending mode?
+
+ call feedkeys("v", 'xt')
+*** ../vim-8.1.0224/src/version.c 2018-07-28 23:12:01.578163697 +0200
+--- src/version.c 2018-07-29 15:17:05.914434445 +0200
+***************
+*** 800,801 ****
+--- 800,803 ----
+ { /* Add new patch number below this line */
++ /**/
++ 225,
+ /**/
+
+--
+MORTICIAN: What?
+CUSTOMER: Nothing -- here's your nine pence.
+DEAD PERSON: I'm not dead!
+MORTICIAN: Here -- he says he's not dead!
+CUSTOMER: Yes, he is.
+DEAD PERSON: I'm not!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0226 b/data/vim/patches/8.1.0226
new file mode 100644
index 000000000..126cfac1f
--- /dev/null
+++ b/data/vim/patches/8.1.0226
@@ -0,0 +1,1135 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0226
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0226
+Problem: Too many #ifdefs.
+Solution: Graduate the +vreplace feature, it's not much code and quite a few
+ #ifdefs.
+Files: runtime/doc/change.txt, runtime/doc/various.txt, src/edit.c,
+ src/evalfunc.c, src/gui.c, src/misc1.c, src/misc2.c, src/normal.c,
+ src/ops.c, src/screen.c, src/version.c, src/feature.h,
+ src/globals.h, src/macros.h, src/vim.h
+
+
+*** ../vim-8.1.0225/runtime/doc/change.txt 2018-06-23 19:22:45.594486390 +0200
+--- runtime/doc/change.txt 2018-07-29 15:38:09.666898986 +0200
+***************
+*** 177,184 ****
+ <Tab> may replace several characters at once.
+ Repeat the entered text [count]-1 times. See
+ |Virtual-Replace-mode| for more details.
+- {not available when compiled without the |+vreplace|
+- feature}
+
+ *c*
+ ["x]c{motion} Delete {motion} text [into register x] and start
+--- 177,182 ----
+***************
+*** 303,310 ****
+ space. See |gR| and |Virtual-Replace-mode| for more
+ details. As with |r| a count may be given.
+ {char} can be entered like with |r|.
+- {not available when compiled without the |+vreplace|
+- feature}
+
+ *digraph-arg*
+ The argument for Normal mode commands like |r| and |t| is a single character.
+--- 301,306 ----
+*** ../vim-8.1.0225/runtime/doc/various.txt 2018-06-23 19:22:45.598486362 +0200
+--- runtime/doc/various.txt 2018-07-29 15:38:59.894590610 +0200
+***************
+*** 461,467 ****
+ N *+virtualedit* |'virtualedit'|
+ S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
+ N *+visualextra* extra Visual mode commands |blockwise-operators|
+! N *+vreplace* |gR| and |gr|
+ *+vtp* on MS-Windows console: support for 'termguicolors'
+ N *+wildignore* |'wildignore'|
+ N *+wildmenu* |'wildmenu'|
+--- 461,467 ----
+ N *+virtualedit* |'virtualedit'|
+ S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
+ N *+visualextra* extra Visual mode commands |blockwise-operators|
+! T *+vreplace* |gR| and |gr|
+ *+vtp* on MS-Windows console: support for 'termguicolors'
+ N *+wildignore* |'wildignore'|
+ N *+wildmenu* |'wildmenu'|
+*** ../vim-8.1.0225/src/edit.c 2018-07-28 23:12:01.578163697 +0200
+--- src/edit.c 2018-07-29 15:43:22.341227944 +0200
+***************
+*** 463,469 ****
+ {
+ ResetRedobuff();
+ AppendNumberToRedobuff(count);
+- #ifdef FEAT_VREPLACE
+ if (cmdchar == 'V' || cmdchar == 'v')
+ {
+ /* "gR" or "gr" command */
+--- 463,468 ----
+***************
+*** 471,477 ****
+ AppendCharToRedobuff((cmdchar == 'v') ? 'r' : 'R');
+ }
+ else
+- #endif
+ {
+ if (cmdchar == K_PS)
+ AppendCharToRedobuff('a');
+--- 470,475 ----
+***************
+*** 497,503 ****
+ #endif
+ State = REPLACE;
+ }
+- #ifdef FEAT_VREPLACE
+ else if (cmdchar == 'V' || cmdchar == 'v')
+ {
+ State = VREPLACE;
+--- 495,500 ----
+***************
+*** 505,511 ****
+ orig_line_count = curbuf->b_ml.ml_line_count;
+ vr_lines_changed = 1;
+ }
+- #endif
+ else
+ State = INSERT;
+
+--- 502,507 ----
+***************
+*** 2042,2048 ****
+ int save_p_list;
+ int start_col;
+ colnr_T vc;
+- #ifdef FEAT_VREPLACE
+ colnr_T orig_col = 0; /* init for GCC */
+ char_u *new_line, *orig_line = NULL; /* init for GCC */
+
+--- 2038,2043 ----
+***************
+*** 2052,2058 ****
+ orig_line = vim_strsave(ml_get_curline()); /* Deal with NULL below */
+ orig_col = curwin->w_cursor.col;
+ }
+- #endif
+
+ /* for the following tricks we don't want list mode */
+ save_p_list = curwin->w_p_list;
+--- 2047,2052 ----
+***************
+*** 2091,2107 ****
+ (void)set_indent(amount, call_changed_bytes ? SIN_CHANGED : 0);
+ else
+ {
+- #ifdef FEAT_VREPLACE
+ int save_State = State;
+
+ /* Avoid being called recursively. */
+ if (State & VREPLACE_FLAG)
+ State = INSERT;
+- #endif
+ shift_line(type == INDENT_DEC, round, 1, call_changed_bytes);
+- #ifdef FEAT_VREPLACE
+ State = save_State;
+- #endif
+ }
+ insstart_less -= curwin->w_cursor.col;
+
+--- 2085,2097 ----
+***************
+*** 2233,2239 ****
+ }
+ }
+
+- #ifdef FEAT_VREPLACE
+ /*
+ * For VREPLACE mode, we also have to fix the replace stack. In this case
+ * it is always possible because we backspace over the whole line and then
+--- 2223,2228 ----
+***************
+*** 2266,2272 ****
+
+ vim_free(new_line);
+ }
+- #endif
+ }
+
+ /*
+--- 2255,2260 ----
+***************
+*** 2288,2295 ****
+ line[i + 1] = NUL;
+ }
+
+- #if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) \
+- || defined(FEAT_COMMENTS) || defined(PROTO)
+ /*
+ * Backspace the cursor until the given column. Handles REPLACE and VREPLACE
+ * modes correctly. May also be used when not in insert mode at all.
+--- 2276,2281 ----
+***************
+*** 2308,2314 ****
+ break;
+ }
+ }
+- #endif
+
+ /*
+ * Like del_char(), but make sure not to go before column "limit_col".
+--- 2294,2299 ----
+***************
+*** 6224,6232 ****
+ && (force_format
+ || (!VIM_ISWHITE(c)
+ && !((State & REPLACE_FLAG)
+- #ifdef FEAT_VREPLACE
+ && !(State & VREPLACE_FLAG)
+- #endif
+ && *ml_get_cursor() != NUL)
+ && (curwin->w_cursor.lnum != Insstart.lnum
+ || ((!has_format_option(FO_INS_LONG)
+--- 6209,6215 ----
+***************
+*** 6471,6481 ****
+ * When 'ai' is off we don't want a space under the cursor to be
+ * deleted. Replace it with an 'x' temporarily.
+ */
+! if (!curbuf->b_p_ai
+! #ifdef FEAT_VREPLACE
+! && !(State & VREPLACE_FLAG)
+! #endif
+! )
+ {
+ cc = gchar_cursor();
+ if (VIM_ISWHITE(cc))
+--- 6454,6460 ----
+ * When 'ai' is off we don't want a space under the cursor to be
+ * deleted. Replace it with an 'x' temporarily.
+ */
+! if (!curbuf->b_p_ai && !(State & VREPLACE_FLAG))
+ {
+ cc = gchar_cursor();
+ if (VIM_ISWHITE(cc))
+***************
+*** 6496,6505 ****
+ int end_foundcol = 0; /* column for start of word */
+ colnr_T len;
+ colnr_T virtcol;
+- #ifdef FEAT_VREPLACE
+ int orig_col = 0;
+ char_u *saved_text = NULL;
+- #endif
+ colnr_T col;
+ colnr_T end_col;
+
+--- 6475,6482 ----
+***************
+*** 6669,6679 ****
+ * stack functions. VREPLACE does not use this, and backspaces
+ * over the text instead.
+ */
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ orig_col = startcol; /* Will start backspacing from here */
+ else
+- #endif
+ replace_offset = startcol - end_foundcol;
+
+ /*
+--- 6646,6654 ----
+***************
+*** 6688,6694 ****
+ if (startcol < 0)
+ startcol = 0;
+
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ /*
+--- 6663,6668 ----
+***************
+*** 6706,6712 ****
+ backspace_until_column(foundcol);
+ }
+ else
+- #endif
+ {
+ /* put cursor after pos. to break line */
+ if (!fo_white_par)
+--- 6680,6685 ----
+***************
+*** 6744,6755 ****
+ get_number_indent(curwin->w_cursor.lnum - 1);
+ if (second_indent >= 0)
+ {
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ change_indent(INDENT_SET, second_indent,
+ FALSE, NUL, TRUE);
+ else
+- #endif
+ #ifdef FEAT_COMMENTS
+ if (leader_len > 0 && second_indent - leader_len > 0)
+ {
+--- 6717,6726 ----
+***************
+*** 6778,6784 ****
+ first_line = FALSE;
+ }
+
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ /*
+--- 6749,6754 ----
+***************
+*** 6789,6795 ****
+ vim_free(saved_text);
+ }
+ else
+- #endif
+ {
+ /*
+ * Check if cursor is not past the NUL off the line, cindent
+--- 6759,6764 ----
+***************
+*** 7140,7152 ****
+ }
+
+ ai_col = 0;
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ orig_line_count = curbuf->b_ml.ml_line_count;
+ vr_lines_changed = 1;
+ }
+- #endif
+ ResetRedobuff();
+ AppendToRedobuff((char_u *)"1i"); /* pretend we start an insertion */
+ new_insert_skip = 2;
+--- 7109,7119 ----
+***************
+*** 7983,7989 ****
+ replace_do_bs(int limit_col)
+ {
+ int cc;
+- #ifdef FEAT_VREPLACE
+ int orig_len = 0;
+ int ins_len;
+ int orig_vcols = 0;
+--- 7950,7955 ----
+***************
+*** 7991,8002 ****
+ char_u *p;
+ int i;
+ int vcol;
+- #endif
+
+ cc = replace_pop();
+ if (cc > 0)
+ {
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ /* Get the number of screen cells used by the character we are
+--- 7957,7966 ----
+***************
+*** 8004,8032 ****
+ getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL);
+ orig_vcols = chartabsize(ml_get_cursor(), start_vcol);
+ }
+- #endif
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ (void)del_char_after_col(limit_col);
+- # ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ orig_len = (int)STRLEN(ml_get_cursor());
+- # endif
+ replace_push(cc);
+ }
+ else
+ #endif
+ {
+ pchar_cursor(cc);
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ orig_len = (int)STRLEN(ml_get_cursor()) - 1;
+- #endif
+ }
+ replace_pop_ins();
+
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ /* Get the number of screen cells used by the inserted characters */
+--- 7968,7990 ----
+***************
+*** 8052,8058 ****
+ }
+ curwin->w_cursor.col -= ins_len;
+ }
+- #endif
+
+ /* mark the buffer as changed and prepare for displaying */
+ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
+--- 8010,8015 ----
+***************
+*** 8966,8976 ****
+
+ # ifdef FEAT_EVAL
+ set_vim_var_string(VV_INSERTMODE,
+! (char_u *)((State & REPLACE_FLAG) ? "i" :
+! # ifdef FEAT_VREPLACE
+! replaceState == VREPLACE ? "v" :
+! # endif
+! "r"), 1);
+ # endif
+ apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf);
+ if (State & REPLACE_FLAG)
+--- 8923,8931 ----
+
+ # ifdef FEAT_EVAL
+ set_vim_var_string(VV_INSERTMODE,
+! (char_u *)((State & REPLACE_FLAG) ? "i"
+! : replaceState == VREPLACE ? "v"
+! : "r"), 1);
+ # endif
+ apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf);
+ if (State & REPLACE_FLAG)
+***************
+*** 8990,9000 ****
+ static void
+ ins_ctrl_o(void)
+ {
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ restart_edit = 'V';
+ else
+- #endif
+ if (State & REPLACE_FLAG)
+ restart_edit = 'R';
+ else
+--- 8945,8953 ----
+***************
+*** 9067,9080 ****
+ else
+ {
+ curwin->w_cursor.col = temp;
+- #ifdef FEAT_VREPLACE
+ /* Adjust orig_line_count in case more lines have been deleted than
+ * have been added. That makes sure, that open_line() later
+ * can access all buffer lines correctly */
+ if (State & VREPLACE_FLAG &&
+ orig_line_count > curbuf->b_ml.ml_line_count)
+ orig_line_count = curbuf->b_ml.ml_line_count;
+- #endif
+ }
+ }
+ else if (del_char(FALSE) == FAIL) /* delete char under cursor */
+--- 9020,9031 ----
+***************
+*** 9229,9238 ****
+ }
+ else
+ {
+- #ifdef FEAT_VREPLACE
+ if (!(State & VREPLACE_FLAG)
+ || curwin->w_cursor.lnum > orig_line_count)
+- #endif
+ {
+ temp = gchar_cursor(); /* remember current char */
+ --curwin->w_cursor.lnum;
+--- 9180,9187 ----
+***************
+*** 9256,9265 ****
+ if (temp == NUL && gchar_cursor() != NUL)
+ inc_cursor();
+ }
+- #ifdef FEAT_VREPLACE
+ else
+ dec_cursor();
+- #endif
+
+ /*
+ * In REPLACE mode we have to put back the text that was replaced
+--- 9205,9212 ----
+***************
+*** 9386,9396 ****
+ && curwin->w_cursor.col < Insstart_orig.col)
+ Insstart_orig.col = curwin->w_cursor.col;
+
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ ins_char(' ');
+ else
+- #endif
+ {
+ ins_str((char_u *)" ");
+ if ((State & REPLACE_FLAG))
+--- 9333,9341 ----
+***************
+*** 10231,10241 ****
+ ins_char(' ');
+ while (--temp > 0)
+ {
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ ins_char(' ');
+ else
+- #endif
+ {
+ ins_str((char_u *)" ");
+ if (State & REPLACE_FLAG) /* no char replaced */
+--- 10176,10184 ----
+***************
+*** 10255,10264 ****
+ #endif
+ {
+ char_u *ptr;
+- #ifdef FEAT_VREPLACE
+ char_u *saved_line = NULL; /* init for GCC */
+ pos_T pos;
+- #endif
+ pos_T fpos;
+ pos_T *cursor;
+ colnr_T want_vcol, vcol;
+--- 10198,10205 ----
+***************
+*** 10269,10275 ****
+ * Get the current line. For VREPLACE mode, don't make real changes
+ * yet, just work on a copy of the line.
+ */
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ pos = curwin->w_cursor;
+--- 10210,10215 ----
+***************
+*** 10280,10286 ****
+ ptr = saved_line + pos.col;
+ }
+ else
+- #endif
+ {
+ ptr = ml_get_cursor();
+ cursor = &curwin->w_cursor;
+--- 10220,10225 ----
+***************
+*** 10360,10370 ****
+ {
+ STRMOVE(ptr, ptr + i);
+ /* correct replace stack. */
+! if ((State & REPLACE_FLAG)
+! #ifdef FEAT_VREPLACE
+! && !(State & VREPLACE_FLAG)
+! #endif
+! )
+ for (temp = i; --temp >= 0; )
+ replace_join(repl_off);
+ }
+--- 10299,10305 ----
+ {
+ STRMOVE(ptr, ptr + i);
+ /* correct replace stack. */
+! if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG))
+ for (temp = i; --temp >= 0; )
+ replace_join(repl_off);
+ }
+***************
+*** 10378,10384 ****
+ #endif
+ cursor->col -= i;
+
+- #ifdef FEAT_VREPLACE
+ /*
+ * In VREPLACE mode, we haven't changed anything yet. Do it now by
+ * backspacing over the changed spacing and then inserting the new
+--- 10313,10318 ----
+***************
+*** 10394,10406 ****
+ ins_bytes_len(saved_line + change_col,
+ cursor->col - change_col);
+ }
+- #endif
+ }
+
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ vim_free(saved_line);
+- #endif
+ curwin->w_p_list = save_list;
+ }
+
+--- 10328,10337 ----
+***************
+*** 10427,10437 ****
+ * character under the cursor. Only push a NUL on the replace stack,
+ * nothing to put back when the NL is deleted.
+ */
+! if ((State & REPLACE_FLAG)
+! #ifdef FEAT_VREPLACE
+! && !(State & VREPLACE_FLAG)
+! #endif
+! )
+ replace_push(NUL);
+
+ /*
+--- 10358,10364 ----
+ * character under the cursor. Only push a NUL on the replace stack,
+ * nothing to put back when the NL is deleted.
+ */
+! if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG))
+ replace_push(NUL);
+
+ /*
+***************
+*** 10700,10710 ****
+ curwin->w_cursor = *pos;
+ i = get_indent();
+ curwin->w_cursor = old_pos;
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ change_indent(INDENT_SET, i, FALSE, NUL, TRUE);
+ else
+- #endif
+ (void)set_indent(i, SIN_CHANGED);
+ }
+ else if (curwin->w_cursor.col > 0)
+--- 10627,10635 ----
+*** ../vim-8.1.0225/src/evalfunc.c 2018-07-29 15:34:20.868300075 +0200
+--- src/evalfunc.c 2018-07-29 15:43:54.165096144 +0200
+***************
+*** 6450,6458 ****
+ #ifdef FEAT_VISUALEXTRA
+ "visualextra",
+ #endif
+- #ifdef FEAT_VREPLACE
+ "vreplace",
+- #endif
+ #ifdef FEAT_VTP
+ "vtp",
+ #endif
+--- 6450,6456 ----
+***************
+*** 8400,8413 ****
+ buf[0] = '!';
+ else if (State & INSERT)
+ {
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ buf[0] = 'R';
+ buf[1] = 'v';
+ }
+ else
+- #endif
+ {
+ if (State & REPLACE_FLAG)
+ buf[0] = 'R';
+--- 8398,8409 ----
+*** ../vim-8.1.0225/src/gui.c 2018-06-28 12:05:07.089006904 +0200
+--- src/gui.c 2018-07-29 15:44:03.357057435 +0200
+***************
+*** 3181,3190 ****
+ case SELECTMODE: checkfor = MOUSE_VISUAL; break;
+ case REPLACE:
+ case REPLACE+LANGMAP:
+- # ifdef FEAT_VREPLACE
+ case VREPLACE:
+ case VREPLACE+LANGMAP:
+- # endif
+ case INSERT:
+ case INSERT+LANGMAP: checkfor = MOUSE_INSERT; break;
+ case ASKMORE:
+--- 3181,3188 ----
+*** ../vim-8.1.0225/src/misc1.c 2018-07-25 21:19:09.363656976 +0200
+--- src/misc1.c 2018-07-29 15:45:58.180552032 +0200
+***************
+*** 784,793 ****
+ char_u *leader = NULL; /* copy of comment leader */
+ #endif
+ char_u *allocated = NULL; /* allocated memory */
+- #if defined(FEAT_SMARTINDENT) || defined(FEAT_VREPLACE) || defined(FEAT_LISP) \
+- || defined(FEAT_CINDENT) || defined(FEAT_COMMENTS)
+ char_u *p;
+- #endif
+ int saved_char = NUL; /* init for GCC */
+ #if defined(FEAT_SMARTINDENT) || defined(FEAT_COMMENTS)
+ pos_T *pos;
+--- 784,790 ----
+***************
+*** 804,810 ****
+ int no_si = FALSE; /* reset did_si afterwards */
+ int first_char = NUL; /* init for GCC */
+ #endif
+! #if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT))
+ int vreplace_mode;
+ #endif
+ int did_append; /* appended a new line */
+--- 801,807 ----
+ int no_si = FALSE; /* reset did_si afterwards */
+ int first_char = NUL; /* init for GCC */
+ #endif
+! #if defined(FEAT_LISP) || defined(FEAT_CINDENT)
+ int vreplace_mode;
+ #endif
+ int did_append; /* appended a new line */
+***************
+*** 817,823 ****
+ if (saved_line == NULL) /* out of memory! */
+ return FALSE;
+
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ /*
+--- 814,819 ----
+***************
+*** 857,869 ****
+ }
+ saved_line[curwin->w_cursor.col] = NUL;
+ }
+- #endif
+
+! if ((State & INSERT)
+! #ifdef FEAT_VREPLACE
+! && !(State & VREPLACE_FLAG)
+! #endif
+! )
+ {
+ p_extra = saved_line + curwin->w_cursor.col;
+ #ifdef FEAT_SMARTINDENT
+--- 853,860 ----
+ }
+ saved_line[curwin->w_cursor.col] = NUL;
+ }
+
+! if ((State & INSERT) && !(State & VREPLACE_FLAG))
+ {
+ p_extra = saved_line + curwin->w_cursor.col;
+ #ifdef FEAT_SMARTINDENT
+***************
+*** 1601,1609 ****
+ old_cursor = curwin->w_cursor;
+ if (dir == BACKWARD)
+ --curwin->w_cursor.lnum;
+- #ifdef FEAT_VREPLACE
+ if (!(State & VREPLACE_FLAG) || old_cursor.lnum >= orig_line_count)
+- #endif
+ {
+ if (ml_append(curwin->w_cursor.lnum, p_extra, (colnr_T)0, FALSE)
+ == FAIL)
+--- 1592,1598 ----
+***************
+*** 1620,1626 ****
+ mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
+ did_append = TRUE;
+ }
+- #ifdef FEAT_VREPLACE
+ else
+ {
+ /*
+--- 1609,1614 ----
+***************
+*** 1640,1646 ****
+ curwin->w_cursor.lnum--;
+ did_append = FALSE;
+ }
+- #endif
+
+ if (newindent
+ #ifdef FEAT_SMARTINDENT
+--- 1628,1633 ----
+***************
+*** 1744,1750 ****
+ curwin->w_cursor.coladd = 0;
+ #endif
+
+! #if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT))
+ /*
+ * In VREPLACE mode, we are handling the replace stack ourselves, so stop
+ * fixthisline() from doing it (via change_indent()) by telling it we're in
+--- 1731,1737 ----
+ curwin->w_cursor.coladd = 0;
+ #endif
+
+! #if defined(FEAT_LISP) || defined(FEAT_CINDENT)
+ /*
+ * In VREPLACE mode, we are handling the replace stack ourselves, so stop
+ * fixthisline() from doing it (via change_indent()) by telling it we're in
+***************
+*** 1791,1802 ****
+ ai_col = (colnr_T)getwhitecols_curline();
+ }
+ #endif
+! #if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT))
+ if (vreplace_mode != 0)
+ State = vreplace_mode;
+ #endif
+
+- #ifdef FEAT_VREPLACE
+ /*
+ * Finally, VREPLACE gets the stuff on the new line, then puts back the
+ * original line, and inserts the new stuff char by char, pushing old stuff
+--- 1778,1788 ----
+ ai_col = (colnr_T)getwhitecols_curline();
+ }
+ #endif
+! #if defined(FEAT_LISP) || defined(FEAT_CINDENT)
+ if (vreplace_mode != 0)
+ State = vreplace_mode;
+ #endif
+
+ /*
+ * Finally, VREPLACE gets the stuff on the new line, then puts back the
+ * original line, and inserts the new stuff char by char, pushing old stuff
+***************
+*** 1821,1827 ****
+ vim_free(p_extra);
+ next_line = NULL;
+ }
+- #endif
+
+ retval = OK; /* success! */
+ theend:
+--- 1807,1812 ----
+***************
+*** 2307,2313 ****
+ return (count);
+ }
+
+- #if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) || defined(PROTO)
+ /*
+ * Insert string "p" at the cursor position. Stops at a NUL byte.
+ * Handles Replace mode and multi-byte characters.
+--- 2292,2297 ----
+***************
+*** 2317,2326 ****
+ {
+ ins_bytes_len(p, (int)STRLEN(p));
+ }
+- #endif
+
+- #if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) \
+- || defined(FEAT_COMMENTS) || defined(FEAT_MBYTE) || defined(PROTO)
+ /*
+ * Insert string "p" with length "len" at the cursor position.
+ * Handles Replace mode and multi-byte characters.
+--- 2301,2307 ----
+***************
+*** 2329,2335 ****
+ ins_bytes_len(char_u *p, int len)
+ {
+ int i;
+! # ifdef FEAT_MBYTE
+ int n;
+
+ if (has_mbyte)
+--- 2310,2316 ----
+ ins_bytes_len(char_u *p, int len)
+ {
+ int i;
+! #ifdef FEAT_MBYTE
+ int n;
+
+ if (has_mbyte)
+***************
+*** 2343,2353 ****
+ ins_char_bytes(p + i, n);
+ }
+ else
+! # endif
+ for (i = 0; i < len; ++i)
+ ins_char(p[i]);
+ }
+- #endif
+
+ /*
+ * Insert or replace a single character at the cursor position.
+--- 2324,2333 ----
+ ins_char_bytes(p + i, n);
+ }
+ else
+! #endif
+ for (i = 0; i < len; ++i)
+ ins_char(p[i]);
+ }
+
+ /*
+ * Insert or replace a single character at the cursor position.
+***************
+*** 2406,2412 ****
+
+ if (State & REPLACE_FLAG)
+ {
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ {
+ colnr_T new_vcol = 0; /* init for GCC */
+--- 2386,2391 ----
+***************
+*** 2456,2462 ****
+ curwin->w_p_list = old_list;
+ }
+ else
+- #endif
+ if (oldp[col] != NUL)
+ {
+ /* normal replace */
+--- 2435,2440 ----
+*** ../vim-8.1.0225/src/misc2.c 2018-06-29 20:28:27.505661796 +0200
+--- src/misc2.c 2018-07-29 15:46:23.876433899 +0200
+***************
+*** 3766,3775 ****
+ #endif
+ if (!mouse && State == SHOWMATCH)
+ return SHAPE_IDX_SM;
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ return SHAPE_IDX_R;
+- #endif
+ if (State & REPLACE_FLAG)
+ return SHAPE_IDX_R;
+ if (State & INSERT)
+--- 3766,3773 ----
+*** ../vim-8.1.0225/src/normal.c 2018-07-25 22:36:48.987518583 +0200
+--- src/normal.c 2018-07-29 15:46:49.824312935 +0200
+***************
+*** 111,119 ****
+ static void nv_undo(cmdarg_T *cap);
+ static void nv_kundo(cmdarg_T *cap);
+ static void nv_Replace(cmdarg_T *cap);
+- #ifdef FEAT_VREPLACE
+ static void nv_vreplace(cmdarg_T *cap);
+- #endif
+ static void v_swap_corners(int cmdchar);
+ static void nv_replace(cmdarg_T *cap);
+ static void n_swapchar(cmdarg_T *cap);
+--- 111,117 ----
+***************
+*** 7300,7306 ****
+ }
+ }
+
+- #ifdef FEAT_VREPLACE
+ /*
+ * "gr".
+ */
+--- 7298,7303 ----
+***************
+*** 7323,7337 ****
+ cap->extra_char = get_literal();
+ stuffcharReadbuff(cap->extra_char);
+ stuffcharReadbuff(ESC);
+! # ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ coladvance(getviscol());
+! # endif
+ invoke_edit(cap, TRUE, 'v', FALSE);
+ }
+ }
+ }
+- #endif
+
+ /*
+ * Swap case for "~" command, when it does not work like an operator.
+--- 7320,7333 ----
+ cap->extra_char = get_literal();
+ stuffcharReadbuff(cap->extra_char);
+ stuffcharReadbuff(ESC);
+! #ifdef FEAT_VIRTUALEDIT
+ if (virtual_active())
+ coladvance(getviscol());
+! #endif
+ invoke_edit(cap, TRUE, 'v', FALSE);
+ }
+ }
+ }
+
+ /*
+ * Swap case for "~" command, when it does not work like an operator.
+***************
+*** 7944,7950 ****
+ clearopbeep(oap);
+ break;
+
+- #ifdef FEAT_VREPLACE
+ /*
+ * "gR": Enter virtual replace mode.
+ */
+--- 7940,7945 ----
+***************
+*** 7956,7962 ****
+ case 'r':
+ nv_vreplace(cap);
+ break;
+- #endif
+
+ case '&':
+ do_cmdline_cmd((char_u *)"%s//~/&");
+--- 7951,7956 ----
+*** ../vim-8.1.0225/src/ops.c 2018-07-08 16:50:33.107216836 +0200
+--- src/ops.c 2018-07-29 15:47:03.452248760 +0200
+***************
+*** 376,386 ****
+ }
+
+ /* Set new indent */
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ change_indent(INDENT_SET, count, FALSE, NUL, call_changed_bytes);
+ else
+- #endif
+ (void)set_indent(count, call_changed_bytes ? SIN_CHANGED : 0);
+ }
+
+--- 376,384 ----
+*** ../vim-8.1.0225/src/screen.c 2018-06-28 22:22:56.233315600 +0200
+--- src/screen.c 2018-07-29 15:47:23.308154491 +0200
+***************
+*** 10375,10386 ****
+ else
+ #endif
+ {
+- #ifdef FEAT_VREPLACE
+ if (State & VREPLACE_FLAG)
+ MSG_PUTS_ATTR(_(" VREPLACE"), attr);
+! else
+! #endif
+! if (State & REPLACE_FLAG)
+ MSG_PUTS_ATTR(_(" REPLACE"), attr);
+ else if (State & INSERT)
+ {
+--- 10375,10383 ----
+ else
+ #endif
+ {
+ if (State & VREPLACE_FLAG)
+ MSG_PUTS_ATTR(_(" VREPLACE"), attr);
+! else if (State & REPLACE_FLAG)
+ MSG_PUTS_ATTR(_(" REPLACE"), attr);
+ else if (State & INSERT)
+ {
+*** ../vim-8.1.0225/src/version.c 2018-07-29 15:34:20.868300075 +0200
+--- src/version.c 2018-07-29 15:50:26.887245482 +0200
+***************
+*** 714,724 ****
+ #else
+ "-viminfo",
+ #endif
+- #ifdef FEAT_VREPLACE
+ "+vreplace",
+- #else
+- "-vreplace",
+- #endif
+ #ifdef WIN3264
+ # ifdef FEAT_VTP
+ "+vtp",
+--- 714,720 ----
+*** ../vim-8.1.0225/src/feature.h 2018-06-23 19:22:45.606486311 +0200
+--- src/feature.h 2018-07-29 15:47:53.028011765 +0200
+***************
+*** 207,219 ****
+ #endif
+
+ /*
+- * +vreplace "gR" and "gr" commands.
+- */
+- #ifdef FEAT_NORMAL
+- # define FEAT_VREPLACE
+- #endif
+-
+- /*
+ * +cmdline_info 'showcmd' and 'ruler' options.
+ */
+ #ifdef FEAT_NORMAL
+--- 207,212 ----
+*** ../vim-8.1.0225/src/globals.h 2018-06-23 16:12:15.780258265 +0200
+--- src/globals.h 2018-07-29 15:48:07.903939623 +0200
+***************
+*** 778,790 ****
+ * op_insert(), to detect correctly where inserting by the user started. */
+ EXTERN pos_T Insstart_orig;
+
+- #ifdef FEAT_VREPLACE
+ /*
+ * Stuff for VREPLACE mode.
+ */
+ EXTERN int orig_line_count INIT(= 0); /* Line count when "gR" started */
+ EXTERN int vr_lines_changed INIT(= 0); /* #Lines changed by "gR" so far */
+- #endif
+
+ #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
+ /* argument to SETJMP() for handling X IO errors */
+--- 778,788 ----
+*** ../vim-8.1.0225/src/macros.h 2018-06-28 19:26:24.321655175 +0200
+--- src/macros.h 2018-07-29 15:48:34.883807640 +0200
+***************
+*** 235,245 ****
+ # define TIME_MSG(s) do { /**/ } while (0)
+ #endif
+
+! #ifdef FEAT_VREPLACE
+! # define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG))
+! #else
+! # define REPLACE_NORMAL(s) ((s) & REPLACE_FLAG)
+! #endif
+
+ #ifdef FEAT_ARABIC
+ # define UTF_COMPOSINGLIKE(p1, p2) utf_composinglike((p1), (p2))
+--- 235,241 ----
+ # define TIME_MSG(s) do { /**/ } while (0)
+ #endif
+
+! #define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG))
+
+ #ifdef FEAT_ARABIC
+ # define UTF_COMPOSINGLIKE(p1, p2) utf_composinglike((p1), (p2))
+*** ../vim-8.1.0225/src/vim.h 2018-06-23 14:21:38.467484932 +0200
+--- src/vim.h 2018-07-29 15:48:48.695739525 +0200
+***************
+*** 675,684 ****
+
+ #define REPLACE_FLAG 0x40 /* Replace mode flag */
+ #define REPLACE (REPLACE_FLAG + INSERT)
+! #ifdef FEAT_VREPLACE
+! # define VREPLACE_FLAG 0x80 /* Virtual-replace mode flag */
+! # define VREPLACE (REPLACE_FLAG + VREPLACE_FLAG + INSERT)
+! #endif
+ #define LREPLACE (REPLACE_FLAG + LANGMAP)
+
+ #define NORMAL_BUSY (0x100 + NORMAL) /* Normal mode, busy with a command */
+--- 675,682 ----
+
+ #define REPLACE_FLAG 0x40 /* Replace mode flag */
+ #define REPLACE (REPLACE_FLAG + INSERT)
+! #define VREPLACE_FLAG 0x80 /* Virtual-replace mode flag */
+! #define VREPLACE (REPLACE_FLAG + VREPLACE_FLAG + INSERT)
+ #define LREPLACE (REPLACE_FLAG + LANGMAP)
+
+ #define NORMAL_BUSY (0x100 + NORMAL) /* Normal mode, busy with a command */
+*** ../vim-8.1.0225/src/version.c 2018-07-29 15:34:20.868300075 +0200
+--- src/version.c 2018-07-29 15:50:26.887245482 +0200
+***************
+*** 800,801 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 226,
+ /**/
+
+--
+Shit makes the flowers grow and that's beautiful
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0227 b/data/vim/patches/8.1.0227
new file mode 100644
index 000000000..91e81d40d
--- /dev/null
+++ b/data/vim/patches/8.1.0227
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0227
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0227
+Problem: Spaces instead of tabs in makefile.
+Solution: Use tabs and fix sorting. (Ken Takata)
+Files: src/po/Make_all.mak
+
+
+*** ../vim-8.1.0226/src/po/Make_all.mak 2018-06-24 15:52:37.075719437 +0200
+--- src/po/Make_all.mak 2018-07-29 16:10:57.264347570 +0200
+***************
+*** 21,26 ****
+--- 21,27 ----
+ ja.sjis \
+ ko \
+ ko.UTF-8 \
++ lv \
+ nb \
+ nl \
+ no \
+***************
+*** 42,48 ****
+ zh_CN.cp936 \
+ zh_TW \
+ zh_TW.UTF-8 \
+- lv \
+
+
+ MOFILES = \
+--- 43,48 ----
+***************
+*** 61,66 ****
+--- 61,67 ----
+ ja.mo \
+ ko.UTF-8.mo \
+ ko.mo \
++ lv.mo \
+ nb.mo \
+ nl.mo \
+ no.mo \
+***************
+*** 76,82 ****
+ zh_CN.mo \
+ zh_TW.UTF-8.mo \
+ zh_TW.mo \
+- lv.mo \
+
+
+ MOCONVERTED = \
+--- 77,82 ----
+*** ../vim-8.1.0226/src/version.c 2018-07-29 16:09:14.644945560 +0200
+--- src/version.c 2018-07-29 16:12:16.627884068 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 227,
+ /**/
+
+--
+Have you heard about the new Barbie doll? It's called Divorce
+Barbie. It comes with all of Ken's stuff.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0228 b/data/vim/patches/8.1.0228
new file mode 100644
index 000000000..6c1ab54c7
--- /dev/null
+++ b/data/vim/patches/8.1.0228
@@ -0,0 +1,569 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0228
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0228
+Problem: Dropping files is ignored while Vim is busy.
+Solution: Postpone the effect of dropping files until it's safe.
+Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/gui.c, src/gui.h,
+ src/screen.c, src/main.c, src/gui_mac.c
+
+
+*** ../vim-8.1.0227/src/ex_docmd.c 2018-07-28 17:07:48.608154066 +0200
+--- src/ex_docmd.c 2018-07-29 17:22:20.940320176 +0200
+***************
+*** 7859,7915 ****
+ do_shell(NULL, 0);
+ }
+
+! #if defined(HAVE_DROP_FILE) \
+! || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \
+! || defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MAC) \
+! || defined(PROTO)
+
+! /*
+! * Handle a file drop. The code is here because a drop is *nearly* like an
+! * :args command, but not quite (we have a list of exact filenames, so we
+! * don't want to (a) parse a command line, or (b) expand wildcards. So the
+! * code is very similar to :args and hence needs access to a lot of the static
+! * functions in this file.
+! *
+! * The list should be allocated using alloc(), as should each item in the
+! * list. This function takes over responsibility for freeing the list.
+! *
+! * XXX The list is made into the argument list. This is freed using
+! * FreeWild(), which does a series of vim_free() calls.
+! */
+! void
+! handle_drop(
+! int filec, /* the number of files dropped */
+! char_u **filev, /* the list of files dropped */
+! int split) /* force splitting the window */
+ {
+ exarg_T ea;
+ int save_msg_scroll = msg_scroll;
+
+! /* Postpone this while editing the command line. */
+! if (text_locked())
+! return;
+! if (curbuf_locked())
+! return;
+!
+! /* When the screen is being updated we should not change buffers and
+! * windows structures, it may cause freed memory to be used. */
+! if (updating_screen)
+! return;
+
+ /* Check whether the current buffer is changed. If so, we will need
+ * to split the current window or data could be lost.
+ * We don't need to check if the 'hidden' option is set, as in this
+ * case the buffer won't be lost.
+ */
+! if (!buf_hide(curbuf) && !split)
+ {
+ ++emsg_off;
+! split = check_changed(curbuf, CCGD_AW);
+ --emsg_off;
+ }
+! if (split)
+ {
+ if (win_split(0, 0) == FAIL)
+ return;
+--- 7859,7895 ----
+ do_shell(NULL, 0);
+ }
+
+! #if defined(HAVE_DROP_FILE) || defined(PROTO)
+
+! static int drop_busy = FALSE;
+! static int drop_filec;
+! static char_u **drop_filev = NULL;
+! static int drop_split;
+! static void (*drop_callback)(void *);
+! static void *drop_cookie;
+!
+! static void
+! handle_drop_internal(void)
+ {
+ exarg_T ea;
+ int save_msg_scroll = msg_scroll;
+
+! // Setting the argument list may cause screen updates and being called
+! // recursively. Avoid that by setting drop_busy.
+! drop_busy = TRUE;
+
+ /* Check whether the current buffer is changed. If so, we will need
+ * to split the current window or data could be lost.
+ * We don't need to check if the 'hidden' option is set, as in this
+ * case the buffer won't be lost.
+ */
+! if (!buf_hide(curbuf) && !drop_split)
+ {
+ ++emsg_off;
+! drop_split = check_changed(curbuf, CCGD_AW);
+ --emsg_off;
+ }
+! if (drop_split)
+ {
+ if (win_split(0, 0) == FAIL)
+ return;
+***************
+*** 7924,7930 ****
+ /*
+ * Set up the new argument list.
+ */
+! alist_set(ALIST(curwin), filec, filev, FALSE, NULL, 0);
+
+ /*
+ * Move to the first file.
+--- 7904,7910 ----
+ /*
+ * Set up the new argument list.
+ */
+! alist_set(ALIST(curwin), drop_filec, drop_filev, FALSE, NULL, 0);
+
+ /*
+ * Move to the first file.
+***************
+*** 7942,7947 ****
+--- 7922,7999 ----
+ * unexpectedly. The screen will be redrawn by the caller, thus
+ * msg_scroll being set by displaying a message is irrelevant. */
+ msg_scroll = save_msg_scroll;
++
++ if (drop_callback != NULL)
++ drop_callback(drop_cookie);
++
++ drop_filev = NULL;
++ drop_busy = FALSE;
++ }
++
++ /*
++ * Handle a file drop. The code is here because a drop is *nearly* like an
++ * :args command, but not quite (we have a list of exact filenames, so we
++ * don't want to (a) parse a command line, or (b) expand wildcards. So the
++ * code is very similar to :args and hence needs access to a lot of the static
++ * functions in this file.
++ *
++ * The "filev" list must have been allocated using alloc(), as should each item
++ * in the list. This function takes over responsibility for freeing the "filev"
++ * list.
++ */
++ void
++ handle_drop(
++ int filec, // the number of files dropped
++ char_u **filev, // the list of files dropped
++ int split, // force splitting the window
++ void (*callback)(void *), // to be called after setting the argument
++ // list
++ void *cookie) // argument for "callback" (allocated)
++ {
++ // Cannot handle recursive drops, finish the pending one.
++ if (drop_busy)
++ {
++ FreeWild(filec, filev);
++ vim_free(cookie);
++ return;
++ }
++
++ // When calling handle_drop() more than once in a row we only use the last
++ // one.
++ if (drop_filev != NULL)
++ {
++ FreeWild(drop_filec, drop_filev);
++ vim_free(drop_cookie);
++ }
++
++ drop_filec = filec;
++ drop_filev = filev;
++ drop_split = split;
++ drop_callback = callback;
++ drop_cookie = cookie;
++
++ // Postpone this when:
++ // - editing the command line
++ // - not possible to change the current buffer
++ // - updating the screen
++ // As it may change buffers and window structures that are in use and cause
++ // freed memory to be used.
++ if (text_locked() || curbuf_locked() || updating_screen)
++ return;
++
++ handle_drop_internal();
++ }
++
++ /*
++ * To be called when text is unlocked, curbuf is unlocked or updating_screen is
++ * reset: Handle a postponed drop.
++ */
++ void
++ handle_any_postponed_drop(void)
++ {
++ if (!drop_busy && drop_filev != NULL
++ && !text_locked() && !curbuf_locked() && !updating_screen)
++ handle_drop_internal();
+ }
+ #endif
+
+*** ../vim-8.1.0227/src/proto/ex_docmd.pro 2018-05-17 13:52:34.000000000 +0200
+--- src/proto/ex_docmd.pro 2018-07-29 16:58:19.612440949 +0200
+***************
+*** 31,37 ****
+ void tabpage_close(int forceit);
+ void tabpage_close_other(tabpage_T *tp, int forceit);
+ void ex_all(exarg_T *eap);
+! void handle_drop(int filec, char_u **filev, int split);
+ void alist_clear(alist_T *al);
+ void alist_init(alist_T *al);
+ void alist_unlink(alist_T *al);
+--- 31,38 ----
+ void tabpage_close(int forceit);
+ void tabpage_close_other(tabpage_T *tp, int forceit);
+ void ex_all(exarg_T *eap);
+! void handle_drop(int filec, char_u **filev, int split, void (*callback)(void *), void *cookie);
+! void handle_any_postponed_drop(void);
+ void alist_clear(alist_T *al);
+ void alist_init(alist_T *al);
+ void alist_unlink(alist_T *al);
+*** ../vim-8.1.0227/src/gui.c 2018-07-29 16:09:14.636945607 +0200
+--- src/gui.c 2018-07-29 16:52:45.218249227 +0200
+***************
+*** 5383,5392 ****
+
+ #endif
+
+! #if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
+! || defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MAC) \
+! || defined(PROTO)
+
+ static void gui_wingoto_xy(int x, int y);
+
+--- 5383,5389 ----
+
+ #endif
+
+! #if defined(HAVE_DROP_FILE) || defined(PROTO)
+
+ static void gui_wingoto_xy(int x, int y);
+
+***************
+*** 5409,5414 ****
+--- 5406,5447 ----
+ }
+
+ /*
++ * Function passed to handle_drop() for the actions to be done after the
++ * argument list has been updated.
++ */
++ static void
++ drop_callback(void *cookie)
++ {
++ char_u *p = cookie;
++
++ /* If Shift held down, change to first file's directory. If the first
++ * item is a directory, change to that directory (and let the explorer
++ * plugin show the contents). */
++ if (p != NULL)
++ {
++ if (mch_isdir(p))
++ {
++ if (mch_chdir((char *)p) == 0)
++ shorten_fnames(TRUE);
++ }
++ else if (vim_chdirfile(p, "drop") == OK)
++ shorten_fnames(TRUE);
++ vim_free(p);
++ }
++
++ /* Update the screen display */
++ update_screen(NOT_VALID);
++ # ifdef FEAT_MENU
++ gui_update_menus(0);
++ # endif
++ #ifdef FEAT_TITLE
++ maketitle();
++ #endif
++ setcursor();
++ out_flush_cursor(FALSE, FALSE);
++ }
++
++ /*
+ * Process file drop. Mouse cursor position, key modifiers, name of files
+ * and count of files are given. Argument "fnames[count]" has full pathnames
+ * of dropped files, they will be freed in this function, and caller can't use
+***************
+*** 5488,5520 ****
+ vim_free(fnames);
+ }
+ else
+! handle_drop(count, fnames, (modifiers & MOUSE_CTRL) != 0);
+!
+! /* If Shift held down, change to first file's directory. If the first
+! * item is a directory, change to that directory (and let the explorer
+! * plugin show the contents). */
+! if (p != NULL)
+! {
+! if (mch_isdir(p))
+! {
+! if (mch_chdir((char *)p) == 0)
+! shorten_fnames(TRUE);
+! }
+! else if (vim_chdirfile(p, "drop") == OK)
+! shorten_fnames(TRUE);
+! vim_free(p);
+! }
+!
+! /* Update the screen display */
+! update_screen(NOT_VALID);
+! # ifdef FEAT_MENU
+! gui_update_menus(0);
+! # endif
+! #ifdef FEAT_TITLE
+! maketitle();
+! #endif
+! setcursor();
+! out_flush_cursor(FALSE, FALSE);
+ }
+
+ entered = FALSE;
+--- 5521,5528 ----
+ vim_free(fnames);
+ }
+ else
+! handle_drop(count, fnames, (modifiers & MOUSE_CTRL) != 0,
+! drop_callback, (void *)p);
+ }
+
+ entered = FALSE;
+*** ../vim-8.1.0227/src/gui.h 2018-05-05 18:42:37.000000000 +0200
+--- src/gui.h 2018-07-29 16:52:19.418385701 +0200
+***************
+*** 65,72 ****
+ /*
+ * GUIs that support dropping files on a running Vim.
+ */
+! #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) \
+! || defined(FEAT_GUI_GTK)
+ # define HAVE_DROP_FILE
+ #endif
+
+--- 65,73 ----
+ /*
+ * GUIs that support dropping files on a running Vim.
+ */
+! #if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \
+! || defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MAC)
+ # define HAVE_DROP_FILE
+ #endif
+
+*** ../vim-8.1.0227/src/screen.c 2018-07-29 16:09:14.644945560 +0200
+--- src/screen.c 2018-07-29 16:51:41.606584708 +0200
+***************
+*** 526,531 ****
+--- 526,537 ----
+ #ifdef FEAT_TERMINAL
+ term_check_channel_closed_recently();
+ #endif
++
++ #ifdef HAVE_DROP_FILE
++ // If handle_drop() was called while updating_screen was TRUE need to
++ // handle the drop now.
++ handle_any_postponed_drop();
++ #endif
+ }
+
+ /*
+*** ../vim-8.1.0227/src/main.c 2018-06-23 16:12:15.784258242 +0200
+--- src/main.c 2018-07-29 17:02:36.091020303 +0200
+***************
+*** 911,917 ****
+
+ /*
+ * Call the main command loop. This never returns.
+! */
+ main_loop(FALSE, FALSE);
+
+ #endif /* NO_VIM_MAIN */
+--- 911,917 ----
+
+ /*
+ * Call the main command loop. This never returns.
+! */
+ main_loop(FALSE, FALSE);
+
+ #endif /* NO_VIM_MAIN */
+***************
+*** 1155,1163 ****
+ else if (do_redraw || stuff_empty())
+ {
+ #ifdef FEAT_GUI
+! /* If ui_breakcheck() was used a resize may have been postponed. */
+ gui_may_resize_shell();
+ #endif
+ /* Trigger CursorMoved if the cursor moved. */
+ if (!finish_op && (
+ has_cursormoved()
+--- 1155,1169 ----
+ else if (do_redraw || stuff_empty())
+ {
+ #ifdef FEAT_GUI
+! // If ui_breakcheck() was used a resize may have been postponed.
+ gui_may_resize_shell();
+ #endif
++ #ifdef HAVE_DROP_FILE
++ // If files were dropped while text was locked or the curbuf was
++ // locked, this would be a good time to handle the drop.
++ handle_any_postponed_drop();
++ #endif
++
+ /* Trigger CursorMoved if the cursor moved. */
+ if (!finish_op && (
+ has_cursormoved()
+*** ../vim-8.1.0227/src/gui_mac.c 2018-03-06 18:53:06.000000000 +0100
+--- src/gui_mac.c 2018-07-29 17:33:07.670760672 +0200
+***************
+*** 1007,1012 ****
+--- 1007,1061 ----
+ long theDate; // modification date/time
+ };
+
++ static long drop_numFiles;
++ static short drop_gotPosition;
++ static SelectionRange drop_thePosition;
++
++ static void
++ drop_callback(void *cookie UNUSED)
++ {
++ /* TODO: Handle the goto/select line more cleanly */
++ if ((drop_numFiles == 1) & (drop_gotPosition))
++ {
++ if (drop_thePosition.lineNum >= 0)
++ {
++ lnum = drop_thePosition.lineNum + 1;
++ /* oap->motion_type = MLINE;
++ setpcmark();*/
++ if (lnum < 1L)
++ lnum = 1L;
++ else if (lnum > curbuf->b_ml.ml_line_count)
++ lnum = curbuf->b_ml.ml_line_count;
++ curwin->w_cursor.lnum = lnum;
++ curwin->w_cursor.col = 0;
++ /* beginline(BL_SOL | BL_FIX);*/
++ }
++ else
++ goto_byte(drop_thePosition.startRange + 1);
++ }
++
++ /* Update the screen display */
++ update_screen(NOT_VALID);
++
++ /* Select the text if possible */
++ if (drop_gotPosition)
++ {
++ VIsual_active = TRUE;
++ VIsual_select = FALSE;
++ VIsual = curwin->w_cursor;
++ if (drop_thePosition.lineNum < 0)
++ {
++ VIsual_mode = 'v';
++ goto_byte(drop_thePosition.endRange);
++ }
++ else
++ {
++ VIsual_mode = 'V';
++ VIsual.col = 0;
++ }
++ }
++ }
++
+ /* The IDE uses the optional keyAEPosition parameter to tell the ed-
+ itor the selection range. If lineNum is zero or greater, scroll the text
+ to the specified line. If lineNum is less than zero, use the values in
+***************
+*** 1113,1160 ****
+ }
+
+ /* Handle the drop, :edit to get to the file */
+! handle_drop(numFiles, fnames, FALSE);
+!
+! /* TODO: Handle the goto/select line more cleanly */
+! if ((numFiles == 1) & (gotPosition))
+! {
+! if (thePosition.lineNum >= 0)
+! {
+! lnum = thePosition.lineNum + 1;
+! /* oap->motion_type = MLINE;
+! setpcmark();*/
+! if (lnum < 1L)
+! lnum = 1L;
+! else if (lnum > curbuf->b_ml.ml_line_count)
+! lnum = curbuf->b_ml.ml_line_count;
+! curwin->w_cursor.lnum = lnum;
+! curwin->w_cursor.col = 0;
+! /* beginline(BL_SOL | BL_FIX);*/
+! }
+! else
+! goto_byte(thePosition.startRange + 1);
+! }
+!
+! /* Update the screen display */
+! update_screen(NOT_VALID);
+!
+! /* Select the text if possible */
+! if (gotPosition)
+! {
+! VIsual_active = TRUE;
+! VIsual_select = FALSE;
+! VIsual = curwin->w_cursor;
+! if (thePosition.lineNum < 0)
+! {
+! VIsual_mode = 'v';
+! goto_byte(thePosition.endRange);
+! }
+! else
+! {
+! VIsual_mode = 'V';
+! VIsual.col = 0;
+! }
+! }
+
+ setcursor();
+ out_flush();
+--- 1162,1171 ----
+ }
+
+ /* Handle the drop, :edit to get to the file */
+! drop_numFiles = numFiles;
+! drop_gotPosition = gotPosition;
+! drop_thePosition = thePosition;
+! handle_drop(numFiles, fnames, FALSE, drop_callback, NULL);
+
+ setcursor();
+ out_flush();
+*** ../vim-8.1.0227/src/version.c 2018-07-29 16:13:13.431551849 +0200
+--- src/version.c 2018-07-29 16:44:55.344870301 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 228,
+ /**/
+
+
+--
+We do not stumble over mountains, but over molehills.
+ Confucius
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0229 b/data/vim/patches/8.1.0229
new file mode 100644
index 000000000..089e17bea
--- /dev/null
+++ b/data/vim/patches/8.1.0229
@@ -0,0 +1,124 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0229
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0229
+Problem: Crash when dumping profiling data.
+Solution: Reset flag indicating that initialization was done.
+Files: src/userfunc.c
+
+
+*** ../vim-8.1.0228/src/userfunc.c 2018-07-10 19:39:14.994973018 +0200
+--- src/userfunc.c 2018-07-22 03:43:14.268242302 +0200
+***************
+*** 1102,1107 ****
+--- 1102,1122 ----
+ return FALSE;
+ }
+
++ static void
++ func_clear_items(ufunc_T *fp)
++ {
++ ga_clear_strings(&(fp->uf_args));
++ ga_clear_strings(&(fp->uf_lines));
++ #ifdef FEAT_PROFILE
++ vim_free(fp->uf_tml_count);
++ fp->uf_tml_count = NULL;
++ vim_free(fp->uf_tml_total);
++ fp->uf_tml_total = NULL;
++ vim_free(fp->uf_tml_self);
++ fp->uf_tml_self = NULL;
++ #endif
++ }
++
+ /*
+ * Free all things that a function contains. Does not free the function
+ * itself, use func_free() for that.
+***************
+*** 1115,1127 ****
+ fp->uf_cleared = TRUE;
+
+ /* clear this function */
+! ga_clear_strings(&(fp->uf_args));
+! ga_clear_strings(&(fp->uf_lines));
+! #ifdef FEAT_PROFILE
+! vim_free(fp->uf_tml_count);
+! vim_free(fp->uf_tml_total);
+! vim_free(fp->uf_tml_self);
+! #endif
+ funccal_unref(fp->uf_scoped, fp, force);
+ }
+
+--- 1130,1136 ----
+ fp->uf_cleared = TRUE;
+
+ /* clear this function */
+! func_clear_items(fp);
+ funccal_unref(fp->uf_scoped, fp, force);
+ }
+
+***************
+*** 2312,2320 ****
+ else
+ {
+ /* redefine existing function */
+- ga_clear_strings(&(fp->uf_args));
+- ga_clear_strings(&(fp->uf_lines));
+ VIM_CLEAR(name);
+ }
+ }
+ }
+--- 2321,2332 ----
+ else
+ {
+ /* redefine existing function */
+ VIM_CLEAR(name);
++ func_clear_items(fp);
++ #ifdef FEAT_PROFILE
++ fp->uf_profiling = FALSE;
++ fp->uf_prof_initialized = FALSE;
++ #endif
+ }
+ }
+ }
+***************
+*** 2434,2443 ****
+ fp->uf_scoped = NULL;
+
+ #ifdef FEAT_PROFILE
+- fp->uf_tml_count = NULL;
+- fp->uf_tml_total = NULL;
+- fp->uf_tml_self = NULL;
+- fp->uf_profiling = FALSE;
+ if (prof_def_func())
+ func_do_profile(fp);
+ #endif
+--- 2446,2451 ----
+*** ../vim-8.1.0228/src/version.c 2018-07-29 17:35:19.497750288 +0200
+--- src/version.c 2018-07-29 17:40:20.711582375 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 229,
+ /**/
+
+--
+CUSTOMER: Well, can you hang around a couple of minutes? He won't be
+ long.
+MORTICIAN: Naaah, I got to go on to Robinson's -- they've lost nine today.
+CUSTOMER: Well, when is your next round?
+MORTICIAN: Thursday.
+DEAD PERSON: I think I'll go for a walk.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0230 b/data/vim/patches/8.1.0230
new file mode 100644
index 000000000..315207b0f
--- /dev/null
+++ b/data/vim/patches/8.1.0230
@@ -0,0 +1,156 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0230
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0230
+Problem: Directly checking 'buftype' value.
+Solution: Add the bt_normal() function. (Yegappan Lakshmanan)
+Files: src/buffer.c, src/ex_docmd.c, src/fileio.c, src/proto/buffer.pro,
+ src/quickfix.c
+
+*** ../vim-8.1.0229/src/buffer.c 2018-06-23 19:22:45.598486362 +0200
+--- src/buffer.c 2018-08-01 17:39:05.854918677 +0200
+***************
+*** 5627,5632 ****
+--- 5627,5641 ----
+ #endif
+
+ /*
++ * Return TRUE if "buf" is a normal buffer, 'buftype' is empty.
++ */
++ int
++ bt_normal(buf_T *buf)
++ {
++ return buf != NULL && buf->b_p_bt[0] == NUL;
++ }
++
++ /*
+ * Return TRUE if "buf" is the quickfix buffer.
+ */
+ int
+*** ../vim-8.1.0229/src/ex_docmd.c 2018-07-29 17:35:19.493750319 +0200
+--- src/ex_docmd.c 2018-08-01 17:37:07.895552456 +0200
+***************
+*** 11768,11774 ****
+ */
+ if ((*flagp & SSOP_FOLDS)
+ && wp->w_buffer->b_ffname != NULL
+! && (*wp->w_buffer->b_p_bt == NUL || bt_help(wp->w_buffer)))
+ {
+ if (put_folds(fd, wp) == FAIL)
+ return FAIL;
+--- 11768,11774 ----
+ */
+ if ((*flagp & SSOP_FOLDS)
+ && wp->w_buffer->b_ffname != NULL
+! && (bt_normal(wp->w_buffer) || bt_help(wp->w_buffer)))
+ {
+ if (put_folds(fd, wp) == FAIL)
+ return FAIL;
+*** ../vim-8.1.0229/src/fileio.c 2018-07-07 18:34:08.430551330 +0200
+--- src/fileio.c 2018-08-01 17:37:07.899552434 +0200
+***************
+*** 6897,6903 ****
+ * this buffer. */
+ if (buf->b_ffname == NULL
+ || buf->b_ml.ml_mfp == NULL
+! || *buf->b_p_bt != NUL
+ || buf->b_saving
+ || busy
+ #ifdef FEAT_NETBEANS_INTG
+--- 6897,6903 ----
+ * this buffer. */
+ if (buf->b_ffname == NULL
+ || buf->b_ml.ml_mfp == NULL
+! || !bt_normal(buf)
+ || buf->b_saving
+ || busy
+ #ifdef FEAT_NETBEANS_INTG
+*** ../vim-8.1.0229/src/proto/buffer.pro 2018-06-03 14:42:17.848505102 +0200
+--- src/proto/buffer.pro 2018-08-01 17:39:55.638650591 +0200
+***************
+*** 56,61 ****
+--- 56,62 ----
+ void do_modelines(int flags);
+ int read_viminfo_bufferlist(vir_T *virp, int writing);
+ void write_viminfo_bufferlist(FILE *fp);
++ int bt_normal(buf_T *buf);
+ int bt_quickfix(buf_T *buf);
+ int bt_terminal(buf_T *buf);
+ int bt_help(buf_T *buf);
+*** ../vim-8.1.0229/src/quickfix.c 2018-07-25 22:36:48.991518559 +0200
+--- src/quickfix.c 2018-08-01 17:37:07.899552434 +0200
+***************
+*** 2487,2493 ****
+ win_T *wp;
+
+ FOR_ALL_WINDOWS(wp)
+! if (wp->w_buffer->b_p_bt[0] == NUL)
+ return wp;
+
+ return NULL;
+--- 2487,2493 ----
+ win_T *wp;
+
+ FOR_ALL_WINDOWS(wp)
+! if (bt_normal(wp->w_buffer))
+ return wp;
+
+ return NULL;
+***************
+*** 2563,2569 ****
+ win = curwin;
+ do
+ {
+! if (win->w_buffer->b_p_bt[0] == NUL)
+ break;
+ if (win->w_prev == NULL)
+ win = lastwin; /* wrap around the top */
+--- 2563,2569 ----
+ win = curwin;
+ do
+ {
+! if (bt_normal(win->w_buffer))
+ break;
+ if (win->w_prev == NULL)
+ win = lastwin; /* wrap around the top */
+***************
+*** 2620,2627 ****
+ }
+
+ /* Remember a usable window. */
+! if (altwin == NULL && !win->w_p_pvw
+! && win->w_buffer->b_p_bt[0] == NUL)
+ altwin = win;
+ }
+
+--- 2620,2626 ----
+ }
+
+ /* Remember a usable window. */
+! if (altwin == NULL && !win->w_p_pvw && bt_normal(win->w_buffer))
+ altwin = win;
+ }
+
+*** ../vim-8.1.0229/src/version.c 2018-07-29 17:40:37.239467625 +0200
+--- src/version.c 2018-08-01 17:38:23.335147376 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 230,
+ /**/
+
+--
+Individualists unite!
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0231 b/data/vim/patches/8.1.0231
new file mode 100644
index 000000000..00ee879a4
--- /dev/null
+++ b/data/vim/patches/8.1.0231
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0231
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0231
+Problem: :help -? goes to help for -+.
+Solution: Add -? to list of special cases. (Hirohito Higashi)
+Files: src/ex_cmds.c, src/testdir/test_help_tagjump.vim
+
+
+*** ../vim-8.1.0230/src/ex_cmds.c 2018-06-28 22:22:56.225315645 +0200
+--- src/ex_cmds.c 2018-08-01 17:59:36.447037278 +0200
+***************
+*** 6583,6589 ****
+ static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
+ "/*", "/\\*", "\"*", "**",
+ "cpo-*", "/\\(\\)", "/\\%(\\)",
+! "?", ":?", "?<CR>", "g?", "g?g?", "g??",
+ "/\\?", "/\\z(\\)", "\\=", ":s\\=",
+ "[count]", "[quotex]",
+ "[range]", ":[range]",
+--- 6583,6589 ----
+ static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
+ "/*", "/\\*", "\"*", "**",
+ "cpo-*", "/\\(\\)", "/\\%(\\)",
+! "?", ":?", "-?", "?<CR>", "g?", "g?g?", "g??",
+ "/\\?", "/\\z(\\)", "\\=", ":s\\=",
+ "[count]", "[quotex]",
+ "[range]", ":[range]",
+***************
+*** 6593,6599 ****
+ static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
+ "/star", "/\\\\star", "quotestar", "starstar",
+ "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)",
+! "?", ":?", "?<CR>", "g?", "g?g?", "g??",
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]",
+ "\\[range]", ":\\[range]",
+--- 6593,6599 ----
+ static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
+ "/star", "/\\\\star", "quotestar", "starstar",
+ "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)",
+! "?", ":?", "-?", "?<CR>", "g?", "g?g?", "g??",
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]",
+ "\\[range]", ":\\[range]",
+*** ../vim-8.1.0230/src/testdir/test_help_tagjump.vim 2017-03-16 22:15:33.000000000 +0100
+--- src/testdir/test_help_tagjump.vim 2018-08-01 17:59:36.447037278 +0200
+***************
+*** 26,31 ****
+--- 26,36 ----
+ call assert_true(getline('.') =~ '\*:?\*')
+ helpclose
+
++ help -?
++ call assert_equal("help", &filetype)
++ call assert_true(getline('.') =~ '\*-?\*')
++ helpclose
++
+ help FileW*Post
+ call assert_equal("help", &filetype)
+ call assert_true(getline('.') =~ '\*FileWritePost\*')
+*** ../vim-8.1.0230/src/version.c 2018-08-01 17:53:04.693381270 +0200
+--- src/version.c 2018-08-01 18:01:08.102499244 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 231,
+ /**/
+
+--
+ARTHUR: Then who is your lord?
+WOMAN: We don't have a lord.
+ARTHUR: What?
+DENNIS: I told you. We're an anarcho-syndicalist commune. We take it in
+ turns to act as a sort of executive officer for the week.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0232 b/data/vim/patches/8.1.0232
new file mode 100644
index 000000000..b7ae0f036
--- /dev/null
+++ b/data/vim/patches/8.1.0232
@@ -0,0 +1,188 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0232
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0232
+Problem: Ruby error does not include backtrace.
+Solution: Add an error backtrace. (Masataka Pocke Kuwabara, closes #3267)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0231/src/if_ruby.c 2018-07-28 17:18:05.164865356 +0200
+--- src/if_ruby.c 2018-08-01 18:41:37.613550764 +0200
+***************
+*** 93,98 ****
+--- 93,103 ----
+ # define RUBY20_OR_LATER 1
+ #endif
+
++ #if (defined(RUBY_VERSION) && RUBY_VERSION >= 21) \
++ || (defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 21)
++ # define RUBY21_OR_LATER 1
++ #endif
++
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
+ /* Ruby 1.9 defines a number of static functions which use rb_num2long and
+ * rb_int2big */
+***************
+*** 238,248 ****
+--- 243,263 ----
+ # define rb_eRuntimeError (*dll_rb_eRuntimeError)
+ # define rb_eStandardError (*dll_rb_eStandardError)
+ # define rb_eval_string_protect dll_rb_eval_string_protect
++ # ifdef RUBY21_OR_LATER
++ # define rb_funcallv dll_rb_funcallv
++ # else
++ # define rb_funcall2 dll_rb_funcall2
++ # endif
+ # define rb_global_variable dll_rb_global_variable
+ # define rb_hash_aset dll_rb_hash_aset
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
++ # ifdef RUBY19_OR_LATER
++ # define rb_intern2 dll_rb_intern2
++ # else
++ # define rb_intern dll_rb_intern
++ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
+ # define rb_fix2int dll_rb_fix2int
+***************
+*** 367,377 ****
+--- 382,402 ----
+ static VALUE *dll_rb_eRuntimeError;
+ static VALUE *dll_rb_eStandardError;
+ static VALUE (*dll_rb_eval_string_protect) (const char*, int*);
++ # ifdef RUBY21_OR_LATER
++ static VALUE (*dll_rb_funcallv) (VALUE, ID, int, const VALUE*);
++ # else
++ static VALUE (*dll_rb_funcall2) (VALUE, ID, int, const VALUE*);
++ # endif
+ static void (*dll_rb_global_variable) (VALUE*);
+ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
+ static VALUE (*dll_rb_hash_new) (void);
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
++ # ifdef RUBY19_OR_LATER
++ static ID (*dll_rb_intern2) (const char*, long);
++ # else
++ static ID (*dll_rb_intern) (const char*);
++ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ static long (*dll_rb_fix2int) (VALUE);
+ static long (*dll_rb_num2int) (VALUE);
+***************
+*** 561,571 ****
+--- 586,606 ----
+ {"rb_eRuntimeError", (RUBY_PROC*)&dll_rb_eRuntimeError},
+ {"rb_eStandardError", (RUBY_PROC*)&dll_rb_eStandardError},
+ {"rb_eval_string_protect", (RUBY_PROC*)&dll_rb_eval_string_protect},
++ # ifdef RUBY21_OR_LATER
++ {"rb_funcallv", (RUBY_PROC*)&dll_rb_funcallv},
++ # else
++ {"rb_funcall2", (RUBY_PROC*)&dll_rb_funcall2},
++ # endif
+ {"rb_global_variable", (RUBY_PROC*)&dll_rb_global_variable},
+ {"rb_hash_aset", (RUBY_PROC*)&dll_rb_hash_aset},
+ {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
++ # ifdef RUBY19_OR_LATER
++ {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
++ # else
++ {"rb_intern", (RUBY_PROC*)&dll_rb_intern},
++ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
+ {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
+***************
+*** 926,934 ****
+--- 961,973 ----
+ RUBYEXTERN VALUE ruby_errinfo;
+ #endif
+ #endif
++ VALUE error;
+ VALUE eclass;
+ VALUE einfo;
++ VALUE bt;
++ int attr;
+ char buff[BUFSIZ];
++ long i;
+
+ #define TAG_RETURN 0x1
+ #define TAG_BREAK 0x2
+***************
+*** 960,971 ****
+ case TAG_RAISE:
+ case TAG_FATAL:
+ #ifdef RUBY19_OR_LATER
+! eclass = CLASS_OF(rb_errinfo());
+! einfo = rb_obj_as_string(rb_errinfo());
+ #else
+! eclass = CLASS_OF(ruby_errinfo);
+! einfo = rb_obj_as_string(ruby_errinfo);
+ #endif
+ if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0)
+ {
+ EMSG(_("E272: unhandled exception"));
+--- 999,1010 ----
+ case TAG_RAISE:
+ case TAG_FATAL:
+ #ifdef RUBY19_OR_LATER
+! error = rb_errinfo();
+ #else
+! error = ruby_errinfo;
+ #endif
++ eclass = CLASS_OF(error);
++ einfo = rb_obj_as_string(error);
+ if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0)
+ {
+ EMSG(_("E272: unhandled exception"));
+***************
+*** 982,987 ****
+--- 1021,1037 ----
+ if (p) *p = '\0';
+ EMSG(buff);
+ }
++
++ attr = syn_name2attr((char_u *)"Error");
++ # ifdef RUBY21_OR_LATER
++ bt = rb_funcallv(error, rb_intern("backtrace"), 0, 0);
++ for (i = 0; i < RARRAY_LEN(bt); i++)
++ msg_attr((char_u *)RSTRING_PTR(RARRAY_AREF(bt, i)), attr);
++ # else
++ bt = rb_funcall2(error, rb_intern("backtrace"), 0, 0);
++ for (i = 0; i < RARRAY_LEN(bt); i++)
++ msg_attr((char_u *)RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
++ # endif
+ break;
+ default:
+ vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state);
+*** ../vim-8.1.0231/src/version.c 2018-08-01 18:02:57.493860532 +0200
+--- src/version.c 2018-08-01 18:39:43.442285284 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 232,
+ /**/
+
+--
+ARTHUR: Be quiet!
+DENNIS: --but by a two-thirds majority in the case of more--
+ARTHUR: Be quiet! I order you to be quiet!
+WOMAN: Order, eh -- who does he think he is?
+ARTHUR: I am your king!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0233 b/data/vim/patches/8.1.0233
new file mode 100644
index 000000000..92eddef3b
--- /dev/null
+++ b/data/vim/patches/8.1.0233
@@ -0,0 +1,317 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0233
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0233
+Problem: "safe" argument of call_vim_function() is always FALSE.
+Solution: Remove the argument.
+Files: src/eval.c, src/proto/eval.pro, src/edit.c, src/mbyte.c,
+ src/normal.c, src/ex_getln.c
+
+
+*** ../vim-8.1.0232/src/eval.c 2018-07-25 21:19:09.359656999 +0200
+--- src/eval.c 2018-08-01 19:01:56.055522006 +0200
+***************
+*** 1021,1049 ****
+ char_u *func,
+ int argc,
+ typval_T *argv,
+! typval_T *rettv,
+! int safe) /* use the sandbox */
+ {
+ int doesrange;
+- void *save_funccalp = NULL;
+ int ret;
+
+- if (safe)
+- {
+- save_funccalp = save_funccal();
+- ++sandbox;
+- }
+-
+ rettv->v_type = VAR_UNKNOWN; /* clear_tv() uses this */
+ ret = call_func(func, (int)STRLEN(func), rettv, argc, argv, NULL,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &doesrange, TRUE, NULL, NULL);
+- if (safe)
+- {
+- --sandbox;
+- restore_funccal(save_funccalp);
+- }
+-
+ if (ret == FAIL)
+ clear_tv(rettv);
+
+--- 1021,1035 ----
+ char_u *func,
+ int argc,
+ typval_T *argv,
+! typval_T *rettv)
+ {
+ int doesrange;
+ int ret;
+
+ rettv->v_type = VAR_UNKNOWN; /* clear_tv() uses this */
+ ret = call_func(func, (int)STRLEN(func), rettv, argc, argv, NULL,
+ curwin->w_cursor.lnum, curwin->w_cursor.lnum,
+ &doesrange, TRUE, NULL, NULL);
+ if (ret == FAIL)
+ clear_tv(rettv);
+
+***************
+*** 1060,1072 ****
+ call_func_retnr(
+ char_u *func,
+ int argc,
+! typval_T *argv,
+! int safe) /* use the sandbox */
+ {
+ typval_T rettv;
+ varnumber_T retval;
+
+! if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL)
+ return -1;
+
+ retval = get_tv_number_chk(&rettv, NULL);
+--- 1046,1057 ----
+ call_func_retnr(
+ char_u *func,
+ int argc,
+! typval_T *argv)
+ {
+ typval_T rettv;
+ varnumber_T retval;
+
+! if (call_vim_function(func, argc, argv, &rettv) == FAIL)
+ return -1;
+
+ retval = get_tv_number_chk(&rettv, NULL);
+***************
+*** 1088,1100 ****
+ call_func_retstr(
+ char_u *func,
+ int argc,
+! typval_T *argv,
+! int safe) /* use the sandbox */
+ {
+ typval_T rettv;
+ char_u *retval;
+
+! if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL)
+ return NULL;
+
+ retval = vim_strsave(get_tv_string(&rettv));
+--- 1073,1084 ----
+ call_func_retstr(
+ char_u *func,
+ int argc,
+! typval_T *argv)
+ {
+ typval_T rettv;
+ char_u *retval;
+
+! if (call_vim_function(func, argc, argv, &rettv) == FAIL)
+ return NULL;
+
+ retval = vim_strsave(get_tv_string(&rettv));
+***************
+*** 1113,1124 ****
+ call_func_retlist(
+ char_u *func,
+ int argc,
+! typval_T *argv,
+! int safe) /* use the sandbox */
+ {
+ typval_T rettv;
+
+! if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL)
+ return NULL;
+
+ if (rettv.v_type != VAR_LIST)
+--- 1097,1107 ----
+ call_func_retlist(
+ char_u *func,
+ int argc,
+! typval_T *argv)
+ {
+ typval_T rettv;
+
+! if (call_vim_function(func, argc, argv, &rettv) == FAIL)
+ return NULL;
+
+ if (rettv.v_type != VAR_LIST)
+*** ../vim-8.1.0232/src/proto/eval.pro 2018-07-25 21:19:09.359656999 +0200
+--- src/proto/eval.pro 2018-08-01 19:01:23.155692745 +0200
+***************
+*** 19,28 ****
+ list_T *eval_spell_expr(char_u *badword, char_u *expr);
+ int get_spellword(list_T *list, char_u **pp);
+ typval_T *eval_expr(char_u *arg, char_u **nextcmd);
+! int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv, int safe);
+! varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv, int safe);
+! void *call_func_retstr(char_u *func, int argc, typval_T *argv, int safe);
+! void *call_func_retlist(char_u *func, int argc, typval_T *argv, int safe);
+ int eval_foldexpr(char_u *arg, int *cp);
+ void ex_let(exarg_T *eap);
+ void list_hashtable_vars(hashtab_T *ht, char_u *prefix, int empty, int *first);
+--- 19,28 ----
+ list_T *eval_spell_expr(char_u *badword, char_u *expr);
+ int get_spellword(list_T *list, char_u **pp);
+ typval_T *eval_expr(char_u *arg, char_u **nextcmd);
+! int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv);
+! varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv);
+! void *call_func_retstr(char_u *func, int argc, typval_T *argv);
+! void *call_func_retlist(char_u *func, int argc, typval_T *argv);
+ int eval_foldexpr(char_u *arg, int *cp);
+ void ex_let(exarg_T *eap);
+ void list_hashtable_vars(hashtab_T *ht, char_u *prefix, int empty, int *first);
+*** ../vim-8.1.0232/src/edit.c 2018-07-29 16:09:14.632945629 +0200
+--- src/edit.c 2018-08-01 19:00:45.703885362 +0200
+***************
+*** 4239,4245 ****
+ curbuf_save = curbuf;
+
+ /* Call a function, which returns a list or dict. */
+! if (call_vim_function(funcname, 2, args, &rettv, FALSE) == OK)
+ {
+ switch (rettv.v_type)
+ {
+--- 4239,4245 ----
+ curbuf_save = curbuf;
+
+ /* Call a function, which returns a list or dict. */
+! if (call_vim_function(funcname, 2, args, &rettv) == OK)
+ {
+ switch (rettv.v_type)
+ {
+***************
+*** 5569,5575 ****
+ pos = curwin->w_cursor;
+ curwin_save = curwin;
+ curbuf_save = curbuf;
+! col = call_func_retnr(funcname, 2, args, FALSE);
+ if (curwin_save != curwin || curbuf_save != curbuf)
+ {
+ EMSG(_(e_complwin));
+--- 5569,5575 ----
+ pos = curwin->w_cursor;
+ curwin_save = curwin;
+ curbuf_save = curbuf;
+! col = call_func_retnr(funcname, 2, args);
+ if (curwin_save != curwin || curbuf_save != curbuf)
+ {
+ EMSG(_(e_complwin));
+*** ../vim-8.1.0232/src/mbyte.c 2018-07-14 19:30:32.320395535 +0200
+--- src/mbyte.c 2018-08-01 18:58:55.524439870 +0200
+***************
+*** 4825,4831 ****
+ argv[0].v_type = VAR_NUMBER;
+ argv[0].vval.v_number = active ? 1 : 0;
+ argv[1].v_type = VAR_UNKNOWN;
+! (void)call_func_retnr(p_imaf, 1, argv, FALSE);
+ }
+
+ static int
+--- 4825,4831 ----
+ argv[0].v_type = VAR_NUMBER;
+ argv[0].vval.v_number = active ? 1 : 0;
+ argv[1].v_type = VAR_UNKNOWN;
+! (void)call_func_retnr(p_imaf, 1, argv);
+ }
+
+ static int
+***************
+*** 4839,4845 ****
+ /* FIXME: :py print 'xxx' is shown duplicate result.
+ * Use silent to avoid it. */
+ ++msg_silent;
+! is_active = call_func_retnr(p_imsf, 0, NULL, FALSE);
+ --msg_silent;
+ return (is_active > 0);
+ }
+--- 4839,4845 ----
+ /* FIXME: :py print 'xxx' is shown duplicate result.
+ * Use silent to avoid it. */
+ ++msg_silent;
+! is_active = call_func_retnr(p_imsf, 0, NULL);
+ --msg_silent;
+ return (is_active > 0);
+ }
+*** ../vim-8.1.0232/src/normal.c 2018-07-29 16:09:14.640945583 +0200
+--- src/normal.c 2018-08-01 18:59:09.360371320 +0200
+***************
+*** 2248,2254 ****
+ virtual_op = MAYBE;
+ # endif
+
+! (void)call_func_retnr(p_opfunc, 1, argv, FALSE);
+
+ # ifdef FEAT_VIRTUALEDIT
+ virtual_op = save_virtual_op;
+--- 2248,2254 ----
+ virtual_op = MAYBE;
+ # endif
+
+! (void)call_func_retnr(p_opfunc, 1, argv);
+
+ # ifdef FEAT_VIRTUALEDIT
+ virtual_op = save_virtual_op;
+*** ../vim-8.1.0232/src/ex_getln.c 2018-07-28 19:20:09.787586245 +0200
+--- src/ex_getln.c 2018-08-01 19:00:06.272086002 +0200
+***************
+*** 5279,5285 ****
+ */
+ static void *
+ call_user_expand_func(
+! void *(*user_expand_func)(char_u *, int, typval_T *, int),
+ expand_T *xp,
+ int *num_file,
+ char_u ***file)
+--- 5279,5285 ----
+ */
+ static void *
+ call_user_expand_func(
+! void *(*user_expand_func)(char_u *, int, typval_T *),
+ expand_T *xp,
+ int *num_file,
+ char_u ***file)
+***************
+*** 5318,5324 ****
+ ccline.cmdprompt = NULL;
+ current_SID = xp->xp_scriptID;
+
+! ret = user_expand_func(xp->xp_arg, 3, args, FALSE);
+
+ ccline = save_ccline;
+ current_SID = save_current_SID;
+--- 5318,5324 ----
+ ccline.cmdprompt = NULL;
+ current_SID = xp->xp_scriptID;
+
+! ret = user_expand_func(xp->xp_arg, 3, args);
+
+ ccline = save_ccline;
+ current_SID = save_current_SID;
+*** ../vim-8.1.0232/src/version.c 2018-08-01 18:42:09.837344296 +0200
+--- src/version.c 2018-08-01 19:05:21.534428381 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 233,
+ /**/
+
+--
+Some say the world will end in fire; some say in segfaults.
+I say it will end in a curly bracket.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0234 b/data/vim/patches/8.1.0234
new file mode 100644
index 000000000..bf2ab75e6
--- /dev/null
+++ b/data/vim/patches/8.1.0234
@@ -0,0 +1,160 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0234
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0234
+Problem: Incorrect reference counting in Perl interface.
+Solution: Call SvREFCNT_inc more often, add a test. (Damien)
+Files: src/if_perl.xs, src/testdir/test_perl.vim
+
+
+*** ../vim-8.1.0233/src/if_perl.xs 2018-07-25 22:02:32.231966301 +0200
+--- src/if_perl.xs 2018-08-02 21:43:01.012805454 +0200
+***************
+*** 831,838 ****
+ ptr->w_perl_private = newSV(0);
+ sv_setiv(ptr->w_perl_private, PTR2IV(ptr));
+ }
+! else
+! SvREFCNT_inc_void_NN(ptr->w_perl_private);
+ SvRV(rv) = ptr->w_perl_private;
+ SvROK_on(rv);
+ return sv_bless(rv, gv_stashpv("VIWIN", TRUE));
+--- 831,837 ----
+ ptr->w_perl_private = newSV(0);
+ sv_setiv(ptr->w_perl_private, PTR2IV(ptr));
+ }
+! SvREFCNT_inc_void_NN(ptr->w_perl_private);
+ SvRV(rv) = ptr->w_perl_private;
+ SvROK_on(rv);
+ return sv_bless(rv, gv_stashpv("VIWIN", TRUE));
+***************
+*** 847,854 ****
+ ptr->b_perl_private = newSV(0);
+ sv_setiv(ptr->b_perl_private, PTR2IV(ptr));
+ }
+! else
+! SvREFCNT_inc_void_NN(ptr->b_perl_private);
+ SvRV(rv) = ptr->b_perl_private;
+ SvROK_on(rv);
+ return sv_bless(rv, gv_stashpv("VIBUF", TRUE));
+--- 846,852 ----
+ ptr->b_perl_private = newSV(0);
+ sv_setiv(ptr->b_perl_private, PTR2IV(ptr));
+ }
+! SvREFCNT_inc_void_NN(ptr->b_perl_private);
+ SvRV(rv) = ptr->b_perl_private;
+ SvROK_on(rv);
+ return sv_bless(rv, gv_stashpv("VIBUF", TRUE));
+***************
+*** 918,929 ****
+ else
+ rv = newBUFrv(newSV(0), curbuf);
+
+! if (SvRV(sv) == SvRV(rv))
+! SvREFCNT_dec(SvRV(rv));
+! else // XXX: Not sure if the `else` condition are right
+! // Test_SvREFCNT() pass in all case.
+ sv_setsv(sv, rv);
+
+ return 0;
+ }
+ #endif /* !PROTO */
+--- 916,928 ----
+ else
+ rv = newBUFrv(newSV(0), curbuf);
+
+! if (SvRV(sv) != SvRV(rv))
+! // XXX: This magic variable is a bit confusing...
+! // Is curently refcounted ?
+ sv_setsv(sv, rv);
+
++ SvREFCNT_dec(rv);
++
+ return 0;
+ }
+ #endif /* !PROTO */
+*** ../vim-8.1.0233/src/testdir/test_perl.vim 2018-07-25 22:02:32.235966277 +0200
+--- src/testdir/test_perl.vim 2018-08-02 21:39:46.757852657 +0200
+***************
+*** 4,9 ****
+--- 4,12 ----
+ finish
+ end
+
++ " FIXME: RunTest don't see any error when Perl abort...
++ perl $SIG{__WARN__} = sub { die "Unexpected warnings from perl: @_" };
++
+ func Test_change_buffer()
+ call setline(line('$'), ['1 line 1'])
+ perl VIM::DoCommand("normal /^1\n")
+***************
+*** 229,234 ****
+--- 232,246 ----
+ #line 5 "Test_000_SvREFCNT()"
+ my ($b, $w);
+
++ my $num = 0;
++ for ( 0 .. 100 ) {
++ if ( ++$num >= 8 ) { $num = 0 }
++ VIM::DoCommand("buffer X$num");
++ $b = $curbuf;
++ }
++
++ VIM::DoCommand("buffer t");
++
+ $b = $curbuf for 0 .. 100;
+ $w = $curwin for 0 .. 100;
+ () = VIM::Buffers for 0 .. 100;
+***************
+*** 240,251 ****
+ my $cw = Internals::SvREFCNT($$w);
+ VIM::Eval("assert_equal(2, $cb, 'T1')");
+ VIM::Eval("assert_equal(2, $cw, 'T2')");
+ foreach ( VIM::Buffers, VIM::Windows ) {
+ my $c = Internals::SvREFCNT($_);
+ VIM::Eval("assert_equal(2, $c, 'T3')");
+ $c = Internals::SvREFCNT($$_);
+! # Why only one ref?
+! # Look wrong but work. Maybe not portable...
+ VIM::Eval("assert_equal(1, $c, 'T4')");
+ }
+ $cb = Internals::SvREFCNT($$curbuf);
+--- 252,264 ----
+ my $cw = Internals::SvREFCNT($$w);
+ VIM::Eval("assert_equal(2, $cb, 'T1')");
+ VIM::Eval("assert_equal(2, $cw, 'T2')");
++ my $strongref;
+ foreach ( VIM::Buffers, VIM::Windows ) {
++ VIM::DoCommand("%bw!");
+ my $c = Internals::SvREFCNT($_);
+ VIM::Eval("assert_equal(2, $c, 'T3')");
+ $c = Internals::SvREFCNT($$_);
+! next if $c == 2 && !$strongref++;
+ VIM::Eval("assert_equal(1, $c, 'T4')");
+ }
+ $cb = Internals::SvREFCNT($$curbuf);
+*** ../vim-8.1.0233/src/version.c 2018-08-01 19:05:59.286223185 +0200
+--- src/version.c 2018-08-02 21:44:31.440307634 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 234,
+ /**/
+
+--
+I'm sure that I asked CBuilder to do a "full" install. Looks like I got
+a "fool" install, instead. Charles E Campbell, Jr, PhD
+
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0235 b/data/vim/patches/8.1.0235
new file mode 100644
index 000000000..ecc85a937
--- /dev/null
+++ b/data/vim/patches/8.1.0235
@@ -0,0 +1,171 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0235
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0235 (after 8.1.0231)
+Problem: More help tags that jump to the wrong location.
+Solution: Add more exceptions and a table for "expr-" tags. (Hirohito
+ Higashi)
+Files: src/ex_cmds.c, src/testdir/test_help_tagjump.vim
+
+
+*** ../vim-8.1.0234/src/ex_cmds.c 2018-08-01 18:02:57.493860532 +0200
+--- src/ex_cmds.c 2018-08-02 22:21:56.015278660 +0200
+***************
+*** 6583,6589 ****
+ static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
+ "/*", "/\\*", "\"*", "**",
+ "cpo-*", "/\\(\\)", "/\\%(\\)",
+! "?", ":?", "-?", "?<CR>", "g?", "g?g?", "g??",
+ "/\\?", "/\\z(\\)", "\\=", ":s\\=",
+ "[count]", "[quotex]",
+ "[range]", ":[range]",
+--- 6583,6590 ----
+ static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
+ "/*", "/\\*", "\"*", "**",
+ "cpo-*", "/\\(\\)", "/\\%(\\)",
+! "?", ":?", "?<CR>", "g?", "g?g?", "g??",
+! "-?", "q?", "v_g?",
+ "/\\?", "/\\z(\\)", "\\=", ":s\\=",
+ "[count]", "[quotex]",
+ "[range]", ":[range]",
+***************
+*** 6593,6619 ****
+ static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
+ "/star", "/\\\\star", "quotestar", "starstar",
+ "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)",
+! "?", ":?", "-?", "?<CR>", "g?", "g?g?", "g??",
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]",
+ "\\[range]", ":\\[range]",
+ "\\[pattern]", "\\\\bar", "/\\\\%\\$",
+ "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
+ "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"};
+ int flags;
+
+ d = IObuff; /* assume IObuff is long enough! */
+
+! /*
+! * Recognize a few exceptions to the rule. Some strings that contain '*'
+! * with "star". Otherwise '*' is recognized as a wildcard.
+! */
+! for (i = (int)(sizeof(mtable) / sizeof(char *)); --i >= 0; )
+! if (STRCMP(arg, mtable[i]) == 0)
+! {
+! STRCPY(d, rtable[i]);
+! break;
+! }
+
+ if (i < 0) /* no match in table */
+ {
+--- 6594,6636 ----
+ static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star",
+ "/star", "/\\\\star", "quotestar", "starstar",
+ "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)",
+! "?", ":?", "?<CR>", "g?", "g?g?", "g??",
+! "-?", "q?", "v_g?",
+ "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
+ "\\[count]", "\\[quotex]",
+ "\\[range]", ":\\[range]",
+ "\\[pattern]", "\\\\bar", "/\\\\%\\$",
+ "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
+ "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"};
++ static char *(expr_table[]) = {"!=?", "!~?", "<=?", "<?", "==?", "=~?",
++ ">=?", ">?", "is?", "isnot?"};
+ int flags;
+
+ d = IObuff; /* assume IObuff is long enough! */
+
+! if (STRNICMP(arg, "expr-", 5) == 0)
+! {
+! // When the string starting with "expr-" and containing '?' and matches
+! // the table, it is taken literally. Otherwise '?' is recognized as a
+! // wildcard.
+! for (i = (int)(sizeof(expr_table) / sizeof(char *)); --i >= 0; )
+! if (STRCMP(arg + 5, expr_table[i]) == 0)
+! {
+! STRCPY(d, arg);
+! break;
+! }
+! }
+! else
+! {
+! // Recognize a few exceptions to the rule. Some strings that contain
+! // '*' with "star". Otherwise '*' is recognized as a wildcard.
+! for (i = (int)(sizeof(mtable) / sizeof(char *)); --i >= 0; )
+! if (STRCMP(arg, mtable[i]) == 0)
+! {
+! STRCPY(d, rtable[i]);
+! break;
+! }
+! }
+
+ if (i < 0) /* no match in table */
+ {
+*** ../vim-8.1.0234/src/testdir/test_help_tagjump.vim 2018-08-01 18:02:57.493860532 +0200
+--- src/testdir/test_help_tagjump.vim 2018-08-02 22:16:50.581068403 +0200
+***************
+*** 26,36 ****
+--- 26,59 ----
+ call assert_true(getline('.') =~ '\*:?\*')
+ helpclose
+
++ help q?
++ call assert_equal("help", &filetype)
++ call assert_true(getline('.') =~ '\*q?\*')
++ call assert_true(expand('<cword>') == 'q?')
++ helpclose
++
+ help -?
+ call assert_equal("help", &filetype)
+ call assert_true(getline('.') =~ '\*-?\*')
+ helpclose
+
++ help v_g?
++ call assert_equal("help", &filetype)
++ call assert_true(getline('.') =~ '\*v_g?\*')
++ helpclose
++
++ help expr-!=?
++ call assert_equal("help", &filetype)
++ call assert_true(getline('.') =~ '\*expr-!=?\*')
++ call assert_true(expand('<cword>') == 'expr-!=?')
++ helpclose
++
++ help expr-isnot?
++ call assert_equal("help", &filetype)
++ call assert_true(getline('.') =~ '\*expr-isnot?\*')
++ call assert_true(expand('<cword>') == 'expr-isnot?')
++ helpclose
++
+ help FileW*Post
+ call assert_equal("help", &filetype)
+ call assert_true(getline('.') =~ '\*FileWritePost\*')
+*** ../vim-8.1.0234/src/version.c 2018-08-02 21:46:47.579548771 +0200
+--- src/version.c 2018-08-02 22:18:16.740563501 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 235,
+ /**/
+
+--
+ARTHUR: Be quiet!
+DENNIS: Well you can't expect to wield supreme executive power just 'cause
+ some watery tart threw a sword at you!
+ARTHUR: Shut up!
+DENNIS: I mean, if I went around sayin' I was an empereror just because some
+ moistened bint had lobbed a scimitar at me they'd put me away!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0236 b/data/vim/patches/8.1.0236
new file mode 100644
index 000000000..519fda126
--- /dev/null
+++ b/data/vim/patches/8.1.0236
@@ -0,0 +1,108 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0236
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0236 (after 8.1.0232)
+Problem: Ruby build fails when ruby_intern is missing.
+Solution: Do not use ruby_intern2. (Ken Takata)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0235/src/if_ruby.c 2018-08-01 18:42:09.837344296 +0200
+--- src/if_ruby.c 2018-08-03 21:59:40.035744771 +0200
+***************
+*** 253,263 ****
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+! # ifdef RUBY19_OR_LATER
+! # define rb_intern2 dll_rb_intern2
+! # else
+ # define rb_intern dll_rb_intern
+ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
+ # define rb_fix2int dll_rb_fix2int
+--- 253,264 ----
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+! # ifndef rb_intern
+ # define rb_intern dll_rb_intern
+ # endif
++ # ifdef RUBY_CONST_ID_CACHE
++ # define rb_intern2 dll_rb_intern2
++ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
+ # define rb_fix2int dll_rb_fix2int
+***************
+*** 392,401 ****
+ static VALUE (*dll_rb_hash_new) (void);
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
+- # ifdef RUBY19_OR_LATER
+- static ID (*dll_rb_intern2) (const char*, long);
+- # else
+ static ID (*dll_rb_intern) (const char*);
+ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ static long (*dll_rb_fix2int) (VALUE);
+--- 393,401 ----
+ static VALUE (*dll_rb_hash_new) (void);
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
+ static ID (*dll_rb_intern) (const char*);
++ # ifdef RUBY_CONST_ID_CACHE
++ static ID (*dll_rb_intern2) (const char*, long);
+ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ static long (*dll_rb_fix2int) (VALUE);
+***************
+*** 596,605 ****
+ {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
+- # ifdef RUBY19_OR_LATER
+- {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
+- # else
+ {"rb_intern", (RUBY_PROC*)&dll_rb_intern},
+ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
+--- 596,604 ----
+ {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
+ {"rb_intern", (RUBY_PROC*)&dll_rb_intern},
++ # ifdef RUBY_CONST_ID_CACHE
++ {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
+ # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
+*** ../vim-8.1.0235/src/version.c 2018-08-02 22:23:53.342591238 +0200
+--- src/version.c 2018-08-03 21:51:04.635516492 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 236,
+ /**/
+
+--
+ARTHUR: A scratch? Your arm's off!
+BLACK KNIGHT: No, it isn't.
+ARTHUR: Well, what's that then?
+BLACK KNIGHT: I've had worse.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0237 b/data/vim/patches/8.1.0237
new file mode 100644
index 000000000..35830bc86
--- /dev/null
+++ b/data/vim/patches/8.1.0237
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0237
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0237
+Problem: Ruby on Cygwin doesn't always work.
+Solution: Use LIBRUBY_SO if LIBRUBY_ALIASES isn't set. (Ken Takata)
+Files: src/configure.ac, src/auto/configure
+
+
+*** ../vim-8.1.0236/src/configure.ac 2018-07-27 22:35:12.305014510 +0200
+--- src/configure.ac 2018-08-04 15:10:33.240017113 +0200
+***************
+*** 1956,1961 ****
+--- 1956,1964 ----
+ AC_DEFINE(FEAT_RUBY)
+ if test "$enable_rubyinterp" = "dynamic"; then
+ libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_ALIASES']].split[[0]]"`
++ if test -z "$libruby_soname"; then
++ libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_SO']]"`
++ fi
+ AC_DEFINE(DYNAMIC_RUBY)
+ RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
+ RUBY_LIBS=
+*** ../vim-8.1.0236/src/auto/configure 2018-07-27 22:35:12.309014484 +0200
+--- src/auto/configure 2018-08-04 15:10:39.099973736 +0200
+***************
+*** 7606,7611 ****
+--- 7606,7614 ----
+
+ if test "$enable_rubyinterp" = "dynamic"; then
+ libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
++ if test -z "$libruby_soname"; then
++ libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
++ fi
+ $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
+
+ RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
+*** ../vim-8.1.0236/src/version.c 2018-08-03 22:03:13.178295933 +0200
+--- src/version.c 2018-08-04 15:12:44.107057819 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 237,
+ /**/
+
+--
+"It's so simple to be wise. Just think of something stupid to say
+and then don't say it." -- Sam Levenson
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0238 b/data/vim/patches/8.1.0238
new file mode 100644
index 000000000..47ad40e60
--- /dev/null
+++ b/data/vim/patches/8.1.0238
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0238
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0238
+Problem: 'buftype' is cleared when using ":term ++hidden cat". (Marcin
+ Szamotulski)
+Solution: Set the "options initialized" flag earlier. (closes #3278)
+Files: src/terminal.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0237/src/terminal.c 2018-07-08 20:49:03.427359658 +0200
+--- src/terminal.c 2018-08-04 16:52:59.228476711 +0200
+***************
+*** 529,534 ****
+--- 529,536 ----
+
+ set_string_option_direct((char_u *)"buftype", -1,
+ (char_u *)"terminal", OPT_FREE|OPT_LOCAL, 0);
++ // Avoid that 'buftype' is reset when this buffer is entered.
++ curbuf->b_p_initialized = TRUE;
+
+ /* Mark the buffer as not modifiable. It can only be made modifiable after
+ * the job finished. */
+*** ../vim-8.1.0237/src/testdir/test_terminal.vim 2018-07-08 20:49:03.427359658 +0200
+--- src/testdir/test_terminal.vim 2018-08-04 16:51:08.821245793 +0200
+***************
+*** 1605,1607 ****
+--- 1605,1623 ----
+ set guioptions&
+ call delete(filename)
+ endfunc
++
++ func Test_terminal_hidden()
++ if !has('unix')
++ return
++ endif
++ term ++hidden cat
++ let bnr = bufnr('$')
++ call assert_equal('terminal', getbufvar(bnr, '&buftype'))
++ exe 'sbuf ' . bnr
++ call assert_equal('terminal', &buftype)
++ call term_sendkeys(bnr, "asdf\<CR>")
++ call WaitForAssert({-> assert_match('asdf', term_getline(bnr, 2))})
++ call term_sendkeys(bnr, "\<C-D>")
++ call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))})
++ bwipe!
++ endfunc
+*** ../vim-8.1.0237/src/version.c 2018-08-04 15:13:31.034718130 +0200
+--- src/version.c 2018-08-04 16:53:18.336344327 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 238,
+ /**/
+
+--
+-rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed
+-rwxr-xr-t 4 root 131720 Jan 1 1970 /usr/ucb/vi
+-rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0239 b/data/vim/patches/8.1.0239
new file mode 100644
index 000000000..55becc277
--- /dev/null
+++ b/data/vim/patches/8.1.0239
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0239
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0239 (after 8.1.0236)
+Problem: Now Ruby build fails on other systems.
+Solution: Always define rb_intern. (Ken Takata, closes #3275)
+Files: src/if_ruby.c
+
+
+*** ../vim-8.1.0238/src/if_ruby.c 2018-08-03 22:03:13.178295933 +0200
+--- src/if_ruby.c 2018-08-04 17:21:11.448378660 +0200
+***************
+*** 253,264 ****
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+! # ifndef rb_intern
+! # define rb_intern dll_rb_intern
+! # endif
+! # ifdef RUBY_CONST_ID_CACHE
+! # define rb_intern2 dll_rb_intern2
+! # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
+ # define rb_fix2int dll_rb_fix2int
+--- 253,264 ----
+ # define rb_hash_new dll_rb_hash_new
+ # define rb_inspect dll_rb_inspect
+ # define rb_int2inum dll_rb_int2inum
+!
+! // ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
+! // work. Not using the cache appears to be the best solution.
+! # undef rb_intern
+! # define rb_intern dll_rb_intern
+!
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
+ # define rb_fix2int dll_rb_fix2int
+***************
+*** 394,402 ****
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
+ static ID (*dll_rb_intern) (const char*);
+- # ifdef RUBY_CONST_ID_CACHE
+- static ID (*dll_rb_intern2) (const char*, long);
+- # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ static long (*dll_rb_fix2int) (VALUE);
+ static long (*dll_rb_num2int) (VALUE);
+--- 394,399 ----
+***************
+*** 597,605 ****
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
+ {"rb_intern", (RUBY_PROC*)&dll_rb_intern},
+- # ifdef RUBY_CONST_ID_CACHE
+- {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
+- # endif
+ # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
+ {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
+--- 594,599 ----
+*** ../vim-8.1.0238/src/version.c 2018-08-04 16:54:06.348012520 +0200
+--- src/version.c 2018-08-04 17:22:36.283738635 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 239,
+ /**/
+
+--
+FATHER: You killed eight wedding guests in all!
+LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
+FATHER: I can understand that.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0240 b/data/vim/patches/8.1.0240
new file mode 100644
index 000000000..6ad3a0da8
--- /dev/null
+++ b/data/vim/patches/8.1.0240
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0240
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0240
+Problem: g:actual_curbuf set in wrong scope. (Daniel Hahler)
+Solution: Prepend the "g:" name space. (closes #3279)
+Files: src/buffer.c
+
+
+*** ../vim-8.1.0239/src/buffer.c 2018-08-01 17:53:04.685381319 +0200
+--- src/buffer.c 2018-08-05 13:16:10.469261957 +0200
+***************
+*** 4229,4235 ****
+
+ #ifdef FEAT_EVAL
+ vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
+! set_internal_string_var((char_u *)"actual_curbuf", tmp);
+
+ save_curbuf = curbuf;
+ save_curwin = curwin;
+--- 4229,4235 ----
+
+ #ifdef FEAT_EVAL
+ vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
+! set_internal_string_var((char_u *)"g:actual_curbuf", tmp);
+
+ save_curbuf = curbuf;
+ save_curwin = curwin;
+*** ../vim-8.1.0239/src/version.c 2018-08-04 17:24:39.062825210 +0200
+--- src/version.c 2018-08-05 13:21:12.363049597 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 240,
+ /**/
+
+--
+FATHER: You only killed the bride's father - that's all -
+LAUNCELOT: Oh dear, I didn't really mean to...
+FATHER: Didn't mean to? You put your sword right through his head!
+LAUNCELOT: Gosh - Is he all right?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0241 b/data/vim/patches/8.1.0241
new file mode 100644
index 000000000..a22c2e955
--- /dev/null
+++ b/data/vim/patches/8.1.0241
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0241
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0241
+Problem: Effect of ":tabmove N" is not clear.
+Solution: Add a test that shows the behavior. (Christian Brabandt,
+ closes #3288)
+Files: src/testdir/test_tabpage.vim
+
+
+*** ../vim-8.1.0240/src/testdir/test_tabpage.vim 2018-05-20 14:57:19.117429791 +0200
+--- src/testdir/test_tabpage.vim 2018-08-07 13:12:02.469260514 +0200
+***************
+*** 105,110 ****
+--- 105,123 ----
+ call assert_equal(4, tabpagenr())
+ 7tabmove 5
+ call assert_equal(5, tabpagenr())
++
++ " The following are a no-op
++ norm! 2gt
++ call assert_equal(2, tabpagenr())
++ tabmove 2
++ call assert_equal(2, tabpagenr())
++ 2tabmove
++ call assert_equal(2, tabpagenr())
++ tabmove 1
++ call assert_equal(2, tabpagenr())
++ 1tabmove
++ call assert_equal(2, tabpagenr())
++
+ call assert_fails("99tabmove", 'E16:')
+ call assert_fails("+99tabmove", 'E16:')
+ call assert_fails("-99tabmove", 'E16:')
+*** ../vim-8.1.0240/src/version.c 2018-08-05 13:22:22.474562651 +0200
+--- src/version.c 2018-08-07 13:13:11.940836186 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 241,
+ /**/
+
+--
+MESKIMEN'S LAW
+ There's never time to do it right, but always time to do it over.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0242 b/data/vim/patches/8.1.0242
new file mode 100644
index 000000000..2f8d1cc7c
--- /dev/null
+++ b/data/vim/patches/8.1.0242
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0242
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0242
+Problem: Insert mode completion may use an invalid buffer pointer.
+Solution: Check for ins_buf to be valid. (closes #3290)
+Files: src/edit.c
+
+
+*** ../vim-8.1.0241/src/edit.c 2018-08-01 19:05:59.282223206 +0200
+--- src/edit.c 2018-08-07 14:53:05.865949346 +0200
+***************
+*** 4419,4428 ****
+ ? (char_u *)"." : curbuf->b_p_cpt;
+ last_match_pos = first_match_pos = *ini;
+ }
+
+ compl_old_match = compl_curr_match; /* remember the last current match */
+ pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos;
+! /* For ^N/^P loop over all the flags/windows/buffers in 'complete' */
+ for (;;)
+ {
+ found_new_match = FAIL;
+--- 4419,4433 ----
+ ? (char_u *)"." : curbuf->b_p_cpt;
+ last_match_pos = first_match_pos = *ini;
+ }
++ else if (ins_buf != curbuf && !buf_valid(ins_buf))
++ ins_buf = curbuf; // In case the buffer was wiped out.
+
+ compl_old_match = compl_curr_match; /* remember the last current match */
+ pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos;
+!
+! /*
+! * For ^N/^P loop over all the flags/windows/buffers in 'complete'.
+! */
+ for (;;)
+ {
+ found_new_match = FAIL;
+*** ../vim-8.1.0241/src/version.c 2018-08-07 13:14:05.644508497 +0200
+--- src/version.c 2018-08-07 14:54:09.961578224 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 242,
+ /**/
+
+--
+Did you ever stop to think... and forget to start again?
+ -- Steven Wright
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0243 b/data/vim/patches/8.1.0243
new file mode 100644
index 000000000..3a497d139
--- /dev/null
+++ b/data/vim/patches/8.1.0243
@@ -0,0 +1,89 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0243
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0243
+Problem: Using :term ++close ++hidden closes a window. (Marcin Szamotulski)
+Solution: Don't close the window if only using it temporarily for unloading
+ the terminal buffer. (closes #3287)
+Files: src/terminal.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0242/src/terminal.c 2018-08-04 16:54:06.348012520 +0200
+--- src/terminal.c 2018-08-07 16:27:03.373988690 +0200
+***************
+*** 2818,2828 ****
+ if (term->tl_finish == TL_FINISH_CLOSE)
+ {
+ aco_save_T aco;
+
+! /* ++close or term_finish == "close" */
+ ch_log(NULL, "terminal job finished, closing window");
+ aucmd_prepbuf(&aco, term->tl_buffer);
+ do_bufdel(DOBUF_WIPE, (char_u *)"", 1, fnum, fnum, FALSE);
+ aucmd_restbuf(&aco);
+ return TRUE;
+ }
+--- 2818,2834 ----
+ if (term->tl_finish == TL_FINISH_CLOSE)
+ {
+ aco_save_T aco;
++ int do_set_w_closing = term->tl_buffer->b_nwindows == 0;
+
+! // ++close or term_finish == "close"
+ ch_log(NULL, "terminal job finished, closing window");
+ aucmd_prepbuf(&aco, term->tl_buffer);
++ // Avoid closing the window if we temporarily use it.
++ if (do_set_w_closing)
++ curwin->w_closing = TRUE;
+ do_bufdel(DOBUF_WIPE, (char_u *)"", 1, fnum, fnum, FALSE);
++ if (do_set_w_closing)
++ curwin->w_closing = FALSE;
+ aucmd_restbuf(&aco);
+ return TRUE;
+ }
+*** ../vim-8.1.0242/src/testdir/test_terminal.vim 2018-08-04 16:54:06.348012520 +0200
+--- src/testdir/test_terminal.vim 2018-08-07 16:32:04.084157368 +0200
+***************
+*** 1621,1623 ****
+--- 1621,1635 ----
+ call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))})
+ bwipe!
+ endfunc
++
++ func Test_terminal_hidden_and_close()
++ if !has('unix')
++ return
++ endif
++ call assert_equal(1, winnr('$'))
++ term ++hidden ++close ls
++ let bnr = bufnr('$')
++ call assert_equal('terminal', getbufvar(bnr, '&buftype'))
++ call WaitForAssert({-> assert_false(bufexists(bnr))})
++ call assert_equal(1, winnr('$'))
++ endfunc
+*** ../vim-8.1.0242/src/version.c 2018-08-07 14:55:04.905259782 +0200
+--- src/version.c 2018-08-07 16:28:42.681379863 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 243,
+ /**/
+
+--
+ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery,
+ my friend and I will ... we will say "Ni!"
+CRONE: Do your worst!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0244 b/data/vim/patches/8.1.0244
new file mode 100644
index 000000000..bf3231465
--- /dev/null
+++ b/data/vim/patches/8.1.0244
@@ -0,0 +1,245 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0244
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0244
+Problem: No redraw when using a STOP signal on Vim and then a CONT signal.
+Solution: Catch the CONT signal and force a redraw. (closes #3285)
+Files: src/os_unix.c, src/term.c, src/proto/term.pro
+
+
+*** ../vim-8.1.0243/src/os_unix.c 2018-06-19 19:59:15.244704285 +0200
+--- src/os_unix.c 2018-08-07 17:38:27.387722889 +0200
+***************
+*** 1227,1233 ****
+ SIGRETURN;
+ }
+
+! #if defined(_REENTRANT) && defined(SIGCONT)
+ /*
+ * On Solaris with multi-threading, suspending might not work immediately.
+ * Catch the SIGCONT signal, which will be used as an indication whether the
+--- 1227,1249 ----
+ SIGRETURN;
+ }
+
+! static void
+! after_sigcont(void)
+! {
+! # ifdef FEAT_TITLE
+! // Set oldtitle to NULL, so the current title is obtained again.
+! VIM_CLEAR(oldtitle);
+! # endif
+! settmode(TMODE_RAW);
+! need_check_timestamps = TRUE;
+! did_check_timestamps = FALSE;
+! }
+!
+! #if defined(SIGCONT)
+! static RETSIGTYPE sigcont_handler SIGPROTOARG;
+! static int in_mch_suspend = FALSE;
+!
+! # if defined(_REENTRANT) && defined(SIGCONT)
+ /*
+ * On Solaris with multi-threading, suspending might not work immediately.
+ * Catch the SIGCONT signal, which will be used as an indication whether the
+***************
+*** 1239,1245 ****
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+ static volatile int sigcont_received;
+! static RETSIGTYPE sigcont_handler SIGPROTOARG;
+
+ /*
+ * signal handler for SIGCONT
+--- 1255,1261 ----
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+ static volatile int sigcont_received;
+! # endif
+
+ /*
+ * signal handler for SIGCONT
+***************
+*** 1247,1253 ****
+ static RETSIGTYPE
+ sigcont_handler SIGDEFARG(sigarg)
+ {
+! sigcont_received = TRUE;
+ SIGRETURN;
+ }
+ #endif
+--- 1263,1300 ----
+ static RETSIGTYPE
+ sigcont_handler SIGDEFARG(sigarg)
+ {
+! if (in_mch_suspend)
+! {
+! # if defined(_REENTRANT) && defined(SIGCONT)
+! sigcont_received = TRUE;
+! # endif
+! }
+! else
+! {
+! // We didn't suspend ourselves, assume we were stopped by a SIGSTOP
+! // signal (which can't be intercepted) and get a SIGCONT. Need to get
+! // back to a sane mode and redraw.
+! after_sigcont();
+!
+! update_screen(CLEAR);
+! if (State & CMDLINE)
+! redrawcmdline();
+! else if (State == HITRETURN || State == SETWSIZE || State == ASKMORE
+! || State == EXTERNCMD || State == CONFIRM || exmode_active)
+! repeat_message();
+! else if (redrawing())
+! setcursor();
+! #if defined(FEAT_INS_EXPAND)
+! if (pum_visible())
+! {
+! redraw_later(NOT_VALID);
+! ins_compl_show_pum();
+! }
+! #endif
+! cursor_on_force();
+! out_flush();
+! }
+!
+ SIGRETURN;
+ }
+ #endif
+***************
+*** 1330,1335 ****
+--- 1377,1384 ----
+ {
+ /* BeOS does have SIGTSTP, but it doesn't work. */
+ #if defined(SIGTSTP) && !defined(__BEOS__)
++ in_mch_suspend = TRUE;
++
+ out_flush(); /* needed to make cursor visible on some systems */
+ settmode(TMODE_COOK);
+ out_flush(); /* needed to disable mouse on some systems */
+***************
+*** 1361,1376 ****
+ mch_delay(wait_time, FALSE);
+ }
+ # endif
+
+! # ifdef FEAT_TITLE
+! /*
+! * Set oldtitle to NULL, so the current title is obtained again.
+! */
+! VIM_CLEAR(oldtitle);
+! # endif
+! settmode(TMODE_RAW);
+! need_check_timestamps = TRUE;
+! did_check_timestamps = FALSE;
+ #else
+ suspend_shell();
+ #endif
+--- 1410,1418 ----
+ mch_delay(wait_time, FALSE);
+ }
+ # endif
++ in_mch_suspend = FALSE;
+
+! after_sigcont();
+ #else
+ suspend_shell();
+ #endif
+***************
+*** 1410,1416 ****
+ #ifdef SIGTSTP
+ signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
+ #endif
+! #if defined(_REENTRANT) && defined(SIGCONT)
+ signal(SIGCONT, sigcont_handler);
+ #endif
+
+--- 1452,1458 ----
+ #ifdef SIGTSTP
+ signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
+ #endif
+! #if defined(SIGCONT)
+ signal(SIGCONT, sigcont_handler);
+ #endif
+
+*** ../vim-8.1.0243/src/term.c 2018-07-10 17:33:41.825155261 +0200
+--- src/term.c 2018-08-07 17:22:23.328496700 +0200
+***************
+*** 3789,3804 ****
+ static int cursor_is_off = FALSE;
+
+ /*
+ * Enable the cursor.
+ */
+ void
+ cursor_on(void)
+ {
+ if (cursor_is_off)
+! {
+! out_str(T_VE);
+! cursor_is_off = FALSE;
+! }
+ }
+
+ /*
+--- 3789,3811 ----
+ static int cursor_is_off = FALSE;
+
+ /*
++ * Enable the cursor without checking if it's already enabled.
++ */
++ void
++ cursor_on_force(void)
++ {
++ out_str(T_VE);
++ cursor_is_off = FALSE;
++ }
++
++ /*
+ * Enable the cursor.
+ */
+ void
+ cursor_on(void)
+ {
+ if (cursor_is_off)
+! cursor_on_force();
+ }
+
+ /*
+*** ../vim-8.1.0243/src/proto/term.pro 2018-05-17 13:52:53.000000000 +0200
+--- src/proto/term.pro 2018-08-07 17:28:27.358277122 +0200
+***************
+*** 50,55 ****
+--- 50,56 ----
+ int mouse_has(int c);
+ int mouse_model_popup(void);
+ void scroll_start(void);
++ void cursor_on_force(void);
+ void cursor_on(void);
+ void cursor_off(void);
+ void term_cursor_mode(int forced);
+*** ../vim-8.1.0243/src/version.c 2018-08-07 16:33:15.255728441 +0200
+--- src/version.c 2018-08-07 17:35:43.784518901 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 244,
+ /**/
+
+--
+When I look deep into your eyes, I see JPEG artifacts.
+I can tell by the pixels that we're wrong for each other. (xkcd)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0245 b/data/vim/patches/8.1.0245
new file mode 100644
index 000000000..04698cb19
--- /dev/null
+++ b/data/vim/patches/8.1.0245
@@ -0,0 +1,114 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0245
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0245
+Problem: Calling setline() in TextChangedI autocmd breaks undo. (Jason
+ Felice)
+Solution: Don't save lines for undo when already saved. (closes #3291)
+Files: src/edit.c, src/testdir/test_autocmd.vim
+
+
+*** ../vim-8.1.0244/src/edit.c 2018-08-07 14:55:04.905259782 +0200
+--- src/edit.c 2018-08-07 18:26:35.026760346 +0200
+***************
+*** 1722,1732 ****
+--- 1722,1740 ----
+ {
+ aco_save_T aco;
+
++ // Sync undo when the autocommand calls setline() or append(), so that
++ // it can be undone separately.
++ u_sync_once = 2;
++
+ // save and restore curwin and curbuf, in case the autocmd changes them
+ aucmd_prepbuf(&aco, curbuf);
+ apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
+ aucmd_restbuf(&aco);
+ curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
++
++ if (u_sync_once == 1)
++ ins_need_undo = TRUE;
++ u_sync_once = 0;
+ }
+
+ #ifdef FEAT_INS_EXPAND
+*** ../vim-8.1.0244/src/testdir/test_autocmd.vim 2018-04-28 20:01:18.000000000 +0200
+--- src/testdir/test_autocmd.vim 2018-08-07 18:58:19.655939116 +0200
+***************
+*** 587,593 ****
+ " Cleanup
+ au! OptionSet
+ for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp']
+! exe printf(":set %s&vi", opt)
+ endfor
+ call test_override('starting', 0)
+ delfunc! AutoCommandOptionSet
+--- 587,593 ----
+ " Cleanup
+ au! OptionSet
+ for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp']
+! exe printf(":set %s&vim", opt)
+ endfor
+ call test_override('starting', 0)
+ delfunc! AutoCommandOptionSet
+***************
+*** 1313,1318 ****
+--- 1313,1343 ----
+ bw!
+ endfunc
+
++ let g:setline_handled = v:false
++ func! SetLineOne()
++ if !g:setline_handled
++ call setline(1, "(x)")
++ let g:setline_handled = v:true
++ endif
++ endfunc
++
++ func Test_TextChangedI_with_setline()
++ new
++ call test_override('char_avail', 1)
++ autocmd TextChangedI <buffer> call SetLineOne()
++ call feedkeys("i(\<CR>\<Esc>", 'tx')
++ call assert_equal('(', getline(1))
++ call assert_equal('x)', getline(2))
++ undo
++ call assert_equal('(', getline(1))
++ call assert_equal('', getline(2))
++ undo
++ call assert_equal('', getline(1))
++
++ call test_override('starting', 0)
++ bwipe!
++ endfunc
++
+ func Test_Changed_FirstTime()
+ if !has('terminal') || has('gui_running')
+ return
+*** ../vim-8.1.0244/src/version.c 2018-08-07 17:38:36.995674625 +0200
+--- src/version.c 2018-08-07 19:04:25.389813721 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 245,
+ /**/
+
+--
+ARTHUR: Ni!
+BEDEVERE: Nu!
+ARTHUR: No. Ni! More like this. "Ni"!
+BEDEVERE: Ni, ni, ni!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0246 b/data/vim/patches/8.1.0246
new file mode 100644
index 000000000..7b6869270
--- /dev/null
+++ b/data/vim/patches/8.1.0246
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0246
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0246 (after 8.1.0245)
+Problem: Build failure without the +eval feature.
+Solution: Add #ifdef
+Files: src/edit.c
+
+
+*** ../vim-8.1.0245/src/edit.c 2018-08-07 19:04:57.409627129 +0200
+--- src/edit.c 2018-08-07 19:31:01.308285633 +0200
+***************
+*** 1722,1730 ****
+--- 1722,1732 ----
+ {
+ aco_save_T aco;
+
++ #ifdef FEAT_EVAL
+ // Sync undo when the autocommand calls setline() or append(), so that
+ // it can be undone separately.
+ u_sync_once = 2;
++ #endif
+
+ // save and restore curwin and curbuf, in case the autocmd changes them
+ aucmd_prepbuf(&aco, curbuf);
+***************
+*** 1732,1740 ****
+--- 1734,1744 ----
+ aucmd_restbuf(&aco);
+ curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
+
++ #ifdef FEAT_EVAL
+ if (u_sync_once == 1)
+ ins_need_undo = TRUE;
+ u_sync_once = 0;
++ #endif
+ }
+
+ #ifdef FEAT_INS_EXPAND
+*** ../vim-8.1.0245/src/version.c 2018-08-07 19:04:57.409627129 +0200
+--- src/version.c 2018-08-07 19:31:44.160031830 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 246,
+ /**/
+
+--
+Michael: There is no such thing as a dump question.
+Bernard: Sure there is. For example "what is a core dump?"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0247 b/data/vim/patches/8.1.0247
new file mode 100644
index 000000000..0e481d271
--- /dev/null
+++ b/data/vim/patches/8.1.0247
@@ -0,0 +1,318 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0247
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0247
+Problem: Python: error message for failing import is incorrect.
+Solution: Adjust how modules are loaded. (Ozaki Kiichi, closes #3162)
+Files: src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok
+
+
+*** ../vim-8.1.0246/src/if_py_both.h 2018-07-25 22:02:32.231966301 +0200
+--- src/if_py_both.h 2018-08-07 19:38:33.041613725 +0200
+***************
+*** 544,570 ****
+ }
+
+ #if PY_VERSION_HEX < 0x030700f0
+ typedef struct
+ {
+ PyObject_HEAD
+! PyObject *module;
+ } LoaderObject;
+ static PyTypeObject LoaderType;
+
+ static void
+ LoaderDestructor(LoaderObject *self)
+ {
+! Py_DECREF(self->module);
+ DESTRUCTOR_FINISH(self);
+ }
+
+ static PyObject *
+ LoaderLoadModule(LoaderObject *self, PyObject *args UNUSED)
+ {
+! PyObject *ret = self->module;
+
+! Py_INCREF(ret);
+! return ret;
+ }
+
+ static struct PyMethodDef LoaderMethods[] = {
+--- 544,600 ----
+ }
+
+ #if PY_VERSION_HEX < 0x030700f0
++ static PyObject *call_load_module(char *name, int len, PyObject *find_module_result);
++
+ typedef struct
+ {
+ PyObject_HEAD
+! char *fullname;
+! PyObject *result;
+ } LoaderObject;
+ static PyTypeObject LoaderType;
+
+ static void
+ LoaderDestructor(LoaderObject *self)
+ {
+! vim_free(self->fullname);
+! Py_XDECREF(self->result);
+ DESTRUCTOR_FINISH(self);
+ }
+
+ static PyObject *
+ LoaderLoadModule(LoaderObject *self, PyObject *args UNUSED)
+ {
+! char *fullname = self->fullname;
+! PyObject *result = self->result;
+! PyObject *module;
+
+! if (!fullname)
+! {
+! module = result ? result : Py_None;
+! Py_INCREF(module);
+! return module;
+! }
+!
+! module = call_load_module(fullname, (int)STRLEN(fullname), result);
+!
+! self->fullname = NULL;
+! self->result = module;
+!
+! vim_free(fullname);
+! Py_DECREF(result);
+!
+! if (!module)
+! {
+! if (PyErr_Occurred())
+! return NULL;
+!
+! Py_INCREF(Py_None);
+! return Py_None;
+! }
+!
+! Py_INCREF(module);
+! return module;
+ }
+
+ static struct PyMethodDef LoaderMethods[] = {
+***************
+*** 1252,1258 ****
+--- 1282,1292 ----
+
+ if (!(find_module_result = PyObject_CallFunction(py_find_module,
+ "s#O", tail, partlen, new_path)))
++ {
++ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_ImportError))
++ PyErr_Clear();
+ return NULL;
++ }
+
+ if (!(module = call_load_module(
+ fullname,
+***************
+*** 1273,1302 ****
+
+ Py_DECREF(module);
+
+! module = find_module(fullname, dot + 1, newest_path);
+
+ Py_DECREF(newest_path);
+
+! return module;
+ }
+ else
+ {
+ if (!(find_module_result = PyObject_CallFunction(py_find_module,
+ "sO", tail, new_path)))
+- return NULL;
+-
+- if (!(module = call_load_module(
+- fullname,
+- (int)STRLEN(fullname),
+- find_module_result)))
+ {
+! Py_DECREF(find_module_result);
+ return NULL;
+ }
+
+! Py_DECREF(find_module_result);
+!
+! return module;
+ }
+ }
+
+--- 1307,1329 ----
+
+ Py_DECREF(module);
+
+! find_module_result = find_module(fullname, dot + 1, newest_path);
+
+ Py_DECREF(newest_path);
+
+! return find_module_result;
+ }
+ else
+ {
+ if (!(find_module_result = PyObject_CallFunction(py_find_module,
+ "sO", tail, new_path)))
+ {
+! if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_ImportError))
+! PyErr_Clear();
+ return NULL;
+ }
+
+! return find_module_result;
+ }
+ }
+
+***************
+*** 1304,1310 ****
+ FinderFindModule(PyObject *self, PyObject *args)
+ {
+ char *fullname;
+! PyObject *module;
+ PyObject *new_path;
+ LoaderObject *loader;
+
+--- 1331,1337 ----
+ FinderFindModule(PyObject *self, PyObject *args)
+ {
+ char *fullname;
+! PyObject *result;
+ PyObject *new_path;
+ LoaderObject *loader;
+
+***************
+*** 1314,1344 ****
+ if (!(new_path = Vim_GetPaths(self)))
+ return NULL;
+
+! module = find_module(fullname, fullname, new_path);
+
+ Py_DECREF(new_path);
+
+! if (!module)
+ {
+ if (PyErr_Occurred())
+! {
+! if (PyErr_ExceptionMatches(PyExc_ImportError))
+! PyErr_Clear();
+! else
+! return NULL;
+! }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ if (!(loader = PyObject_NEW(LoaderObject, &LoaderType)))
+ {
+! Py_DECREF(module);
+ return NULL;
+ }
+
+! loader->module = module;
+
+ return (PyObject *) loader;
+ }
+--- 1341,1375 ----
+ if (!(new_path = Vim_GetPaths(self)))
+ return NULL;
+
+! result = find_module(fullname, fullname, new_path);
+
+ Py_DECREF(new_path);
+
+! if (!result)
+ {
+ if (PyErr_Occurred())
+! return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
++ if (!(fullname = (char *)vim_strsave((char_u *)fullname)))
++ {
++ Py_DECREF(result);
++ PyErr_NoMemory();
++ return NULL;
++ }
++
+ if (!(loader = PyObject_NEW(LoaderObject, &LoaderType)))
+ {
+! vim_free(fullname);
+! Py_DECREF(result);
+ return NULL;
+ }
+
+! loader->fullname = fullname;
+! loader->result = result;
+
+ return (PyObject *) loader;
+ }
+*** ../vim-8.1.0246/src/testdir/test86.ok 2018-06-10 13:55:48.527949068 +0200
+--- src/testdir/test86.ok 2018-08-07 19:38:33.041613725 +0200
+***************
+*** 701,707 ****
+ vim.foreach_rtp(int, 2):TypeError:('foreach_rtp() takes exactly one argument (2 given)',)
+ > import
+ import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
+! import failing_import:ImportError:('No module named failing_import',)
+ import failing:NotImplementedError:()
+ > Options
+ >> OptionsItem
+--- 701,707 ----
+ vim.foreach_rtp(int, 2):TypeError:('foreach_rtp() takes exactly one argument (2 given)',)
+ > import
+ import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
+! import failing_import:ImportError:()
+ import failing:NotImplementedError:()
+ > Options
+ >> OptionsItem
+*** ../vim-8.1.0246/src/testdir/test87.ok 2018-06-10 13:55:48.527949068 +0200
+--- src/testdir/test87.ok 2018-08-07 19:38:33.045613701 +0200
+***************
+*** 701,707 ****
+ vim.foreach_rtp(int, 2):(<class 'TypeError'>, TypeError('foreach_rtp() takes exactly one argument (2 given)',))
+ > import
+ import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
+! import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
+ import failing:(<class 'NotImplementedError'>, NotImplementedError())
+ > Options
+ >> OptionsItem
+--- 701,707 ----
+ vim.foreach_rtp(int, 2):(<class 'TypeError'>, TypeError('foreach_rtp() takes exactly one argument (2 given)',))
+ > import
+ import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
+! import failing_import:(<class 'ImportError'>, ImportError())
+ import failing:(<class 'NotImplementedError'>, NotImplementedError())
+ > Options
+ >> OptionsItem
+*** ../vim-8.1.0246/src/version.c 2018-08-07 19:32:48.371651690 +0200
+--- src/version.c 2018-08-07 19:41:29.784569837 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 247,
+ /**/
+
+--
+ARTHUR: Did you say shrubberies?
+ROGER: Yes. Shrubberies are my trade. I am a shrubber. My name is Roger
+ the Shrubber. I arrange, design, and sell shrubberies.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0248 b/data/vim/patches/8.1.0248
new file mode 100644
index 000000000..ca371b423
--- /dev/null
+++ b/data/vim/patches/8.1.0248
@@ -0,0 +1,147 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0248
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0248
+Problem: duplicated quickfix code.
+Solution: Move the code to a function.
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0247/src/quickfix.c 2018-08-01 17:53:04.693381270 +0200
+--- src/quickfix.c 2018-08-01 20:00:00.659109066 +0200
+***************
+*** 4126,4131 ****
+--- 4126,4145 ----
+ }
+
+ /*
++ * Jump to the first entry if there is one.
++ */
++ static void
++ qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit)
++ {
++ // If autocommands changed the current list, then restore it
++ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
++ qi->qf_curlist = qf_id2nr(qi, save_qfid);
++
++ if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
++ qf_jump(qi, 0, 0, forceit);
++ }
++
++ /*
+ * Return TRUE when using ":vimgrep" for ":grep".
+ */
+ int
+***************
+*** 4247,4258 ****
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+ if (res > 0 && !eap->forceit && qflist_valid(wp, save_qfid))
+! {
+! // If autocommands changed the current list, then restore it
+! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+! qi->qf_curlist = qf_id2nr(qi, save_qfid);
+! qf_jump(qi, 0, 0, FALSE); /* display first error */
+! }
+
+ cleanup:
+ mch_remove(fname);
+--- 4261,4268 ----
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+ if (res > 0 && !eap->forceit && qflist_valid(wp, save_qfid))
+! // display the first error
+! qf_jump_first(qi, save_qfid, FALSE);
+
+ cleanup:
+ mch_remove(fname);
+***************
+*** 4650,4659 ****
+ if (res > 0 && (eap->cmdidx == CMD_cfile || eap->cmdidx == CMD_lfile)
+ && qflist_valid(wp, save_qfid))
+ {
+! // If autocommands changed the current list, then restore it
+! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+! qi->qf_curlist = qf_id2nr(qi, save_qfid);
+! qf_jump(qi, 0, 0, eap->forceit); /* display first error */
+ }
+ }
+
+--- 4660,4667 ----
+ if (res > 0 && (eap->cmdidx == CMD_cfile || eap->cmdidx == CMD_lfile)
+ && qflist_valid(wp, save_qfid))
+ {
+! // display the first error
+! qf_jump_first(qi, save_qfid, eap->forceit);
+ }
+ }
+
+***************
+*** 6361,6370 ****
+ eap->cmdidx == CMD_lbuffer)
+ && qflist_valid(wp, save_qfid))
+ {
+! // If autocommands changed the current list, then restore it
+! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+! qi->qf_curlist = qf_id2nr(qi, save_qfid);
+! qf_jump(qi, 0, 0, eap->forceit); /* display first error */
+ }
+ }
+ }
+--- 6369,6376 ----
+ eap->cmdidx == CMD_lbuffer)
+ && qflist_valid(wp, save_qfid))
+ {
+! // display the first error
+! qf_jump_first(qi, save_qfid, eap->forceit);
+ }
+ }
+ }
+***************
+*** 6443,6452 ****
+ || eap->cmdidx == CMD_lexpr)
+ && qflist_valid(wp, save_qfid))
+ {
+! // If autocommands changed the current list, then restore it
+! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+! qi->qf_curlist = qf_id2nr(qi, save_qfid);
+! qf_jump(qi, 0, 0, eap->forceit);
+ }
+ }
+ else
+--- 6449,6456 ----
+ || eap->cmdidx == CMD_lexpr)
+ && qflist_valid(wp, save_qfid))
+ {
+! // display the first error
+! qf_jump_first(qi, save_qfid, eap->forceit);
+ }
+ }
+ else
+*** ../vim-8.1.0247/src/version.c 2018-08-07 19:45:22.623218411 +0200
+--- src/version.c 2018-08-07 19:47:15.006608513 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 248,
+ /**/
+
+--
+TALL KNIGHT: We are now no longer the Knights Who Say Ni!
+ONE KNIGHT: Ni!
+OTHERS: Sh!
+ONE KNIGHT: (whispers) Sorry.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0249 b/data/vim/patches/8.1.0249
new file mode 100644
index 000000000..772cd519e
--- /dev/null
+++ b/data/vim/patches/8.1.0249
@@ -0,0 +1,88 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0249
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0249
+Problem: GTK: when screen DPI changes Vim does not handle it.
+Solution: Handle the gtk-xft-dpi signal. (Roel van de Kraats,
+ closes #2357)
+Files: src/gui_gtk_x11.c
+
+
+*** ../vim-8.1.0248/src/gui_gtk_x11.c 2018-04-14 13:54:46.000000000 +0200
+--- src/gui_gtk_x11.c 2018-08-07 20:00:51.725991750 +0200
+***************
+*** 788,793 ****
+--- 788,816 ----
+ }
+ #endif /* defined(FEAT_CLIENTSERVER) */
+
++ /*
++ * Handle changes to the "Xft/DPI" setting
++ */
++ static void
++ gtk_settings_xft_dpi_changed_cb(GtkSettings *gtk_settings UNUSED,
++ GParamSpec *pspec UNUSED,
++ gpointer data UNUSED)
++ {
++ // Create a new PangoContext for this screen, and initialize it
++ // with the current font if necessary.
++ if (gui.text_context != NULL)
++ g_object_unref(gui.text_context);
++
++ gui.text_context = gtk_widget_create_pango_context(gui.mainwin);
++ pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR);
++
++ if (gui.norm_font != NULL)
++ {
++ // force default font
++ gui_mch_init_font(*p_guifont == NUL ? NULL : p_guifont, FALSE);
++ gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
++ }
++ }
+
+ #if GTK_CHECK_VERSION(3,0,0)
+ typedef gboolean timeout_cb_type;
+***************
+*** 4383,4388 ****
+--- 4406,4420 ----
+ /* Pretend we don't have input focus, we will get an event if we do. */
+ gui.in_focus = FALSE;
+
++ // Handle changes to the "Xft/DPI" setting.
++ {
++ GtkSettings *gtk_settings =
++ gtk_settings_get_for_screen(gdk_screen_get_default());
++
++ g_signal_connect(gtk_settings, "notify::gtk-xft-dpi",
++ G_CALLBACK(gtk_settings_xft_dpi_changed_cb), NULL);
++ }
++
+ return OK;
+ }
+
+*** ../vim-8.1.0248/src/version.c 2018-08-07 19:47:46.746434541 +0200
+--- src/version.c 2018-08-07 19:59:06.534596911 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 249,
+ /**/
+
+--
+TALL KNIGHT: Firstly. You must get us another shrubbery!
+OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni!
+ARTHUR: Not another shrubbery -
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0250 b/data/vim/patches/8.1.0250
new file mode 100644
index 000000000..50c7f4be1
--- /dev/null
+++ b/data/vim/patches/8.1.0250
@@ -0,0 +1,142 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0250
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0250
+Problem: MS-Windows using VTP: windows size change incorrect.
+Solution: Call SetConsoleScreenBufferSize() first. (Nobuhiro Takasaki,
+ closes #3164)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0249/src/os_win32.c 2018-06-19 19:59:15.244704285 +0200
+--- src/os_win32.c 2018-08-07 20:45:29.601418126 +0200
+***************
+*** 3967,3972 ****
+--- 3967,4014 ----
+ }
+
+ /*
++ * Resize console buffer to 'COORD'
++ */
++ static void
++ ResizeConBuf(
++ HANDLE hConsole,
++ COORD coordScreen)
++ {
++ if (!SetConsoleScreenBufferSize(hConsole, coordScreen))
++ {
++ #ifdef MCH_WRITE_DUMP
++ if (fdDump)
++ {
++ fprintf(fdDump, "SetConsoleScreenBufferSize failed: %lx\n",
++ GetLastError());
++ fflush(fdDump);
++ }
++ #endif
++ }
++ }
++
++ /*
++ * Resize console window size to 'srWindowRect'
++ */
++ static void
++ ResizeWindow(
++ HANDLE hConsole,
++ SMALL_RECT srWindowRect)
++ {
++ if (!SetConsoleWindowInfo(hConsole, TRUE, &srWindowRect))
++ {
++ #ifdef MCH_WRITE_DUMP
++ if (fdDump)
++ {
++ fprintf(fdDump, "SetConsoleWindowInfo failed: %lx\n",
++ GetLastError());
++ fflush(fdDump);
++ }
++ #endif
++ }
++ }
++
++ /*
+ * Set a console window to `xSize' * `ySize'
+ */
+ static void
+***************
+*** 4019,4050 ****
+ }
+ }
+
+! if (!SetConsoleWindowInfo(g_hConOut, TRUE, &srWindowRect))
+! {
+! #ifdef MCH_WRITE_DUMP
+! if (fdDump)
+! {
+! fprintf(fdDump, "SetConsoleWindowInfo failed: %lx\n",
+! GetLastError());
+! fflush(fdDump);
+! }
+! #endif
+! }
+!
+! /* define the new console buffer size */
+ coordScreen.X = xSize;
+ coordScreen.Y = ySize;
+
+! if (!SetConsoleScreenBufferSize(hConsole, coordScreen))
+ {
+! #ifdef MCH_WRITE_DUMP
+! if (fdDump)
+! {
+! fprintf(fdDump, "SetConsoleScreenBufferSize failed: %lx\n",
+! GetLastError());
+! fflush(fdDump);
+! }
+! #endif
+ }
+ }
+
+--- 4061,4080 ----
+ }
+ }
+
+! // define the new console buffer size
+ coordScreen.X = xSize;
+ coordScreen.Y = ySize;
+
+! // In the new console call API in reverse order
+! if (!vtp_working)
+ {
+! ResizeWindow(hConsole, srWindowRect);
+! ResizeConBuf(hConsole, coordScreen);
+! }
+! else
+! {
+! ResizeConBuf(hConsole, coordScreen);
+! ResizeWindow(hConsole, srWindowRect);
+ }
+ }
+
+*** ../vim-8.1.0249/src/version.c 2018-08-07 20:01:34.245746660 +0200
+--- src/version.c 2018-08-07 20:44:49.633662912 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 250,
+ /**/
+
+--
+Vi beats Emacs to death, and then again!
+ http://linuxtoday.com/stories/5764.html
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0251 b/data/vim/patches/8.1.0251
new file mode 100644
index 000000000..f5b927a09
--- /dev/null
+++ b/data/vim/patches/8.1.0251
@@ -0,0 +1,365 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0251
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0251
+Problem: Using a full path is supported for 'directory' but not for
+ 'backupdir'. (Mikolaj Machowski)
+Solution: Support 'backupdir' as well. (Christian Brabandt, closes #179)
+Files: runtime/doc/options.txt, src/fileio.c, src/memline.c,
+ src/proto/memline.pro, src/testdir/test_alot.vim,
+ src/testdir/test_backup.vim, src/Make_all.mak
+
+
+*** ../vim-8.1.0250/runtime/doc/options.txt 2018-06-23 19:22:45.598486362 +0200
+--- runtime/doc/options.txt 2018-08-07 21:04:11.238964573 +0200
+***************
+*** 1052,1057 ****
+--- 1054,1067 ----
+ name, precede it with a backslash.
+ - To include a comma in a directory name precede it with a backslash.
+ - A directory name may end in an '/'.
++ - For Unix and Win32, if a directory ends in two path separators "//",
++ the swap file name will be built from the complete path to the file
++ with all path separators changed to percent '%' signs. This will
++ ensure file name uniqueness in the backup directory.
++ On Win32, it is also possible to end with "\\". However, When a
++ separating comma is following, you must use "//", since "\\" will
++ include the comma in the file name. Therefore it is recommended to
++ use '//', instead of '\\'.
+ - Environment variables are expanded |:set_env|.
+ - Careful with '\' characters, type one before a space, type two to
+ get one in the option (see |option-backslash|), for example: >
+***************
+*** 2678,2689 ****
+ - A directory starting with "./" (or ".\" for MS-DOS et al.) means to
+ put the swap file relative to where the edited file is. The leading
+ "." is replaced with the path name of the edited file.
+! - For Unix and Win32, if a directory ends in two path separators "//"
+! or "\\", the swap file name will be built from the complete path to
+! the file with all path separators substituted to percent '%' signs.
+! This will ensure file name uniqueness in the preserve directory.
+! On Win32, when a separating comma is following, you must use "//",
+! since "\\" will include the comma in the file name.
+ - Spaces after the comma are ignored, other spaces are considered part
+ of the directory name. To have a space at the start of a directory
+ name, precede it with a backslash.
+--- 2688,2701 ----
+ - A directory starting with "./" (or ".\" for MS-DOS et al.) means to
+ put the swap file relative to where the edited file is. The leading
+ "." is replaced with the path name of the edited file.
+! - For Unix and Win32, if a directory ends in two path separators "//",
+! the swap file name will be built from the complete path to the file
+! with all path separators substituted to percent '%' signs. This will
+! ensure file name uniqueness in the preserve directory.
+! On Win32, it is also possible to end with "\\". However, When a
+! separating comma is following, you must use "//", since "\\" will
+! include the comma in the file name. Therefore it is recommended to
+! use '//', instead of '\\'.
+ - Spaces after the comma are ignored, other spaces are considered part
+ of the directory name. To have a space at the start of a directory
+ name, precede it with a backslash.
+*** ../vim-8.1.0250/src/fileio.c 2018-08-01 17:53:04.689381294 +0200
+--- src/fileio.c 2018-08-07 21:36:54.903803767 +0200
+***************
+*** 3850,3855 ****
+--- 3850,3858 ----
+ stat_T st_new;
+ char_u *dirp;
+ char_u *rootname;
++ #if defined(UNIX) || defined(WIN3264)
++ char_u *p;
++ #endif
+ #if defined(UNIX)
+ int did_set_shortname;
+ mode_t umask_save;
+***************
+*** 3887,3892 ****
+--- 3890,3906 ----
+ * Isolate one directory name, using an entry in 'bdir'.
+ */
+ (void)copy_option_part(&dirp, copybuf, BUFSIZE, ",");
++
++ #if defined(UNIX) || defined(WIN3264)
++ p = copybuf + STRLEN(copybuf);
++ if (after_pathsep(copybuf, p) && p[-1] == p[-2])
++ // Ends with '//', use full path
++ if ((p = make_percent_swname(copybuf, fname)) != NULL)
++ {
++ backup = modname(p, backup_ext, FALSE);
++ vim_free(p);
++ }
++ #endif
+ rootname = get_file_in_dir(fname, copybuf);
+ if (rootname == NULL)
+ {
+***************
+*** 3904,3912 ****
+ for (;;)
+ {
+ /*
+! * Make backup file name.
+ */
+! backup = buf_modname((buf->b_p_sn || buf->b_shortname),
+ rootname, backup_ext, FALSE);
+ if (backup == NULL)
+ {
+--- 3918,3927 ----
+ for (;;)
+ {
+ /*
+! * Make the backup file name.
+ */
+! if (backup == NULL)
+! backup = buf_modname((buf->b_p_sn || buf->b_shortname),
+ rootname, backup_ext, FALSE);
+ if (backup == NULL)
+ {
+***************
+*** 4108,4121 ****
+ * Isolate one directory name and make the backup file name.
+ */
+ (void)copy_option_part(&dirp, IObuff, IOSIZE, ",");
+! rootname = get_file_in_dir(fname, IObuff);
+! if (rootname == NULL)
+! backup = NULL;
+! else
+ {
+! backup = buf_modname((buf->b_p_sn || buf->b_shortname),
+! rootname, backup_ext, FALSE);
+! vim_free(rootname);
+ }
+
+ if (backup != NULL)
+--- 4123,4151 ----
+ * Isolate one directory name and make the backup file name.
+ */
+ (void)copy_option_part(&dirp, IObuff, IOSIZE, ",");
+!
+! #if defined(UNIX) || defined(WIN3264)
+! p = IObuff + STRLEN(IObuff);
+! if (after_pathsep(IObuff, p) && p[-1] == p[-2])
+! // path ends with '//', use full path
+! if ((p = make_percent_swname(IObuff, fname)) != NULL)
+! {
+! backup = modname(p, backup_ext, FALSE);
+! vim_free(p);
+! }
+! #endif
+! if (backup == NULL)
+ {
+! rootname = get_file_in_dir(fname, IObuff);
+! if (rootname == NULL)
+! backup = NULL;
+! else
+! {
+! backup = buf_modname(
+! (buf->b_p_sn || buf->b_shortname),
+! rootname, backup_ext, FALSE);
+! vim_free(rootname);
+! }
+ }
+
+ if (backup != NULL)
+***************
+*** 6252,6258 ****
+ #endif
+
+ /*
+! * add extension to file name - change path/fo.o.h to path/fo.o.h.ext or
+ * fo_o_h.ext for MSDOS or when shortname option set.
+ *
+ * Assumed that fname is a valid name found in the filesystem we assure that
+--- 6282,6288 ----
+ #endif
+
+ /*
+! * Add extension to file name - change path/fo.o.h to path/fo.o.h.ext or
+ * fo_o_h.ext for MSDOS or when shortname option set.
+ *
+ * Assumed that fname is a valid name found in the filesystem we assure that
+*** ../vim-8.1.0250/src/memline.c 2018-05-26 17:35:19.717625256 +0200
+--- src/memline.c 2018-08-07 21:32:43.441160597 +0200
+***************
+*** 262,270 ****
+ #endif
+ static void long_to_char(long, char_u *);
+ static long char_to_long(char_u *);
+- #if defined(UNIX) || defined(WIN3264)
+- static char_u *make_percent_swname(char_u *dir, char_u *name);
+- #endif
+ #ifdef FEAT_CRYPT
+ static cryptstate_T *ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading);
+ #endif
+--- 262,267 ----
+***************
+*** 2007,2024 ****
+ return file_count;
+ }
+
+! #if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */
+ /*
+ * Append the full path to name with path separators made into percent
+ * signs, to dir. An unnamed buffer is handled as "" (<currentdir>/"")
+ */
+! static char_u *
+ make_percent_swname(char_u *dir, char_u *name)
+ {
+! char_u *d, *s, *f;
+
+! f = fix_fname(name != NULL ? name : (char_u *) "");
+! d = NULL;
+ if (f != NULL)
+ {
+ s = alloc((unsigned)(STRLEN(f) + 1));
+--- 2004,2021 ----
+ return file_count;
+ }
+
+! #if defined(UNIX) || defined(WIN3264) || defined(PROTO)
+ /*
++ * Need _very_ long file names.
+ * Append the full path to name with path separators made into percent
+ * signs, to dir. An unnamed buffer is handled as "" (<currentdir>/"")
+ */
+! char_u *
+ make_percent_swname(char_u *dir, char_u *name)
+ {
+! char_u *d = NULL, *s, *f;
+
+! f = fix_fname(name != NULL ? name : (char_u *)"");
+ if (f != NULL)
+ {
+ s = alloc((unsigned)(STRLEN(f) + 1));
+***************
+*** 4070,4077 ****
+ }
+
+ #if defined(FEAT_EVAL)
+- static int do_swapexists(buf_T *buf, char_u *fname);
+-
+ /*
+ * Trigger the SwapExists autocommands.
+ * Returns a value for equivalent to do_dialog() (see below):
+--- 4067,4072 ----
+*** ../vim-8.1.0250/src/proto/memline.pro 2018-05-17 13:52:44.000000000 +0200
+--- src/proto/memline.pro 2018-08-07 20:56:46.217467718 +0200
+***************
+*** 34,37 ****
+--- 34,38 ----
+ void ml_decrypt_data(memfile_T *mfp, char_u *data, off_T offset, unsigned size);
+ long ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp);
+ void goto_byte(long cnt);
++ char_u *make_percent_swname (char_u *dir, char_u *name);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0250/src/testdir/test_alot.vim 2018-07-23 04:11:37.648969780 +0200
+--- src/testdir/test_alot.vim 2018-08-07 20:57:34.725202003 +0200
+***************
+*** 2,7 ****
+--- 2,8 ----
+ " This makes testing go faster, since Vim doesn't need to restart.
+
+ source test_assign.vim
++ source test_backup.vim
+ source test_bufline.vim
+ source test_cd.vim
+ source test_changedtick.vim
+*** ../vim-8.1.0250/src/testdir/test_backup.vim 2018-08-07 21:37:56.879462014 +0200
+--- src/testdir/test_backup.vim 2018-08-07 21:21:16.656940451 +0200
+***************
+*** 0 ****
+--- 1,58 ----
++ " Tests for the backup function
++
++ func Test_backup()
++ set backup backupdir=.
++ new
++ call setline(1, ['line1', 'line2'])
++ :f Xbackup.txt
++ :w! Xbackup.txt
++ " backup file is only created after
++ " writing a second time (before overwriting)
++ :w! Xbackup.txt
++ let l = readfile('Xbackup.txt~')
++ call assert_equal(['line1', 'line2'], l)
++ bw!
++ set backup&vim backupdir&vim
++ call delete('Xbackup.txt')
++ call delete('Xbackup.txt~')
++ endfunc
++
++ func Test_backup2()
++ set backup backupdir=.//
++ new
++ call setline(1, ['line1', 'line2', 'line3'])
++ :f Xbackup.txt
++ :w! Xbackup.txt
++ " backup file is only created after
++ " writing a second time (before overwriting)
++ :w! Xbackup.txt
++ sp *Xbackup.txt~
++ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
++ let f=expand('%')
++ call assert_match('src%testdir%Xbackup.txt\~', f)
++ bw!
++ bw!
++ call delete('Xbackup.txt')
++ call delete(f)
++ set backup&vim backupdir&vim
++ endfunc
++
++ func Test_backup2_backupcopy()
++ set backup backupdir=.// backupcopy=yes
++ new
++ call setline(1, ['line1', 'line2', 'line3'])
++ :f Xbackup.txt
++ :w! Xbackup.txt
++ " backup file is only created after
++ " writing a second time (before overwriting)
++ :w! Xbackup.txt
++ sp *Xbackup.txt~
++ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
++ let f=expand('%')
++ call assert_match('src%testdir%Xbackup.txt\~', f)
++ bw!
++ bw!
++ call delete('Xbackup.txt')
++ call delete(f)
++ set backup&vim backupdir&vim backupcopy&vim
++ endfunc
+*** ../vim-8.1.0250/src/Make_all.mak 2018-07-23 04:11:37.644969804 +0200
+--- src/Make_all.mak 2018-08-07 21:17:31.690274783 +0200
+***************
+*** 12,17 ****
+--- 12,18 ----
+ test_autocmd \
+ test_autoload \
+ test_backspace_opt \
++ test_backup \
+ test_blockedit \
+ test_breakindent \
+ test_bufline \
+*** ../vim-8.1.0250/src/version.c 2018-08-07 20:47:02.756848221 +0200
+--- src/version.c 2018-08-07 20:59:39.444509393 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 251,
+ /**/
+
+--
+TALL KNIGHT: When you have found the shrubbery, then you must cut down the
+ mightiest tree in the forest ... with a herring.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0252 b/data/vim/patches/8.1.0252
new file mode 100644
index 000000000..f72f55a0d
--- /dev/null
+++ b/data/vim/patches/8.1.0252
@@ -0,0 +1,1540 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0252
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0252
+Problem: Quickfix functions are too long.
+Solution: Refactor. (Yegappan Lakshmanan, closes #2950)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0251/src/quickfix.c 2018-08-07 19:47:46.746434541 +0200
+--- src/quickfix.c 2018-08-07 21:52:51.654369210 +0200
+***************
+*** 201,306 ****
+
+ /*
+ * Convert an errorformat pattern to a regular expression pattern.
+! * See fmt_pat definition above for the list of supported patterns.
+ */
+ static char_u *
+! fmtpat_to_regpat(
+! char_u *efmp,
+! efm_T *fmt_ptr,
+ int idx,
+ int round,
+- char_u *ptr,
+ char_u *errmsg)
+ {
+ char_u *srcptr;
+
+! if (fmt_ptr->addr[idx])
+ {
+ /* Each errorformat pattern can occur only once */
+ sprintf((char *)errmsg,
+! _("E372: Too many %%%c in format string"), *efmp);
+ EMSG(errmsg);
+ return NULL;
+ }
+ if ((idx && idx < 6
+! && vim_strchr((char_u *)"DXOPQ", fmt_ptr->prefix) != NULL)
+ || (idx == 6
+! && vim_strchr((char_u *)"OPQ", fmt_ptr->prefix) == NULL))
+ {
+ sprintf((char *)errmsg,
+! _("E373: Unexpected %%%c in format string"), *efmp);
+ EMSG(errmsg);
+ return NULL;
+ }
+! fmt_ptr->addr[idx] = (char_u)++round;
+! *ptr++ = '\\';
+! *ptr++ = '(';
+ #ifdef BACKSLASH_IN_FILENAME
+! if (*efmp == 'f')
+ {
+ /* Also match "c:" in the file name, even when
+ * checking for a colon next: "%f:".
+ * "\%(\a:\)\=" */
+! STRCPY(ptr, "\\%(\\a:\\)\\=");
+! ptr += 10;
+ }
+ #endif
+! if (*efmp == 'f' && efmp[1] != NUL)
+ {
+! if (efmp[1] != '\\' && efmp[1] != '%')
+ {
+ /* A file name may contain spaces, but this isn't
+ * in "\f". For "%f:%l:%m" there may be a ":" in
+ * the file name. Use ".\{-1,}x" instead (x is
+ * the next character), the requirement that :999:
+ * follows should work. */
+! STRCPY(ptr, ".\\{-1,}");
+! ptr += 7;
+ }
+ else
+ {
+ /* File name followed by '\\' or '%': include as
+ * many file name chars as possible. */
+! STRCPY(ptr, "\\f\\+");
+! ptr += 4;
+ }
+ }
+ else
+ {
+ srcptr = (char_u *)fmt_pat[idx].pattern;
+! while ((*ptr = *srcptr++) != NUL)
+! ++ptr;
+ }
+! *ptr++ = '\\';
+! *ptr++ = ')';
+
+! return ptr;
+ }
+
+ /*
+ * Convert a scanf like format in 'errorformat' to a regular expression.
+ */
+ static char_u *
+ scanf_fmt_to_regpat(
+ char_u *efm,
+ int len,
+! char_u **pefmp,
+! char_u *ptr,
+ char_u *errmsg)
+ {
+ char_u *efmp = *pefmp;
+
+! if (*++efmp == '[' || *efmp == '\\')
+ {
+! if ((*ptr++ = *efmp) == '[') /* %*[^a-z0-9] etc. */
+ {
+ if (efmp[1] == '^')
+! *ptr++ = *++efmp;
+ if (efmp < efm + len)
+ {
+! *ptr++ = *++efmp; /* could be ']' */
+ while (efmp < efm + len
+! && (*ptr++ = *++efmp) != ']')
+ /* skip */;
+ if (efmp == efm + len)
+ {
+--- 201,309 ----
+
+ /*
+ * Convert an errorformat pattern to a regular expression pattern.
+! * See fmt_pat definition above for the list of supported patterns. The
+! * pattern specifier is supplied in "efmpat". The converted pattern is stored
+! * in "regpat". Returns a pointer to the location after the pattern.
+ */
+ static char_u *
+! efmpat_to_regpat(
+! char_u *efmpat,
+! char_u *regpat,
+! efm_T *efminfo,
+ int idx,
+ int round,
+ char_u *errmsg)
+ {
+ char_u *srcptr;
+
+! if (efminfo->addr[idx])
+ {
+ /* Each errorformat pattern can occur only once */
+ sprintf((char *)errmsg,
+! _("E372: Too many %%%c in format string"), *efmpat);
+ EMSG(errmsg);
+ return NULL;
+ }
+ if ((idx && idx < 6
+! && vim_strchr((char_u *)"DXOPQ", efminfo->prefix) != NULL)
+ || (idx == 6
+! && vim_strchr((char_u *)"OPQ", efminfo->prefix) == NULL))
+ {
+ sprintf((char *)errmsg,
+! _("E373: Unexpected %%%c in format string"), *efmpat);
+ EMSG(errmsg);
+ return NULL;
+ }
+! efminfo->addr[idx] = (char_u)++round;
+! *regpat++ = '\\';
+! *regpat++ = '(';
+ #ifdef BACKSLASH_IN_FILENAME
+! if (*efmpat == 'f')
+ {
+ /* Also match "c:" in the file name, even when
+ * checking for a colon next: "%f:".
+ * "\%(\a:\)\=" */
+! STRCPY(regpat, "\\%(\\a:\\)\\=");
+! regpat += 10;
+ }
+ #endif
+! if (*efmpat == 'f' && efmpat[1] != NUL)
+ {
+! if (efmpat[1] != '\\' && efmpat[1] != '%')
+ {
+ /* A file name may contain spaces, but this isn't
+ * in "\f". For "%f:%l:%m" there may be a ":" in
+ * the file name. Use ".\{-1,}x" instead (x is
+ * the next character), the requirement that :999:
+ * follows should work. */
+! STRCPY(regpat, ".\\{-1,}");
+! regpat += 7;
+ }
+ else
+ {
+ /* File name followed by '\\' or '%': include as
+ * many file name chars as possible. */
+! STRCPY(regpat, "\\f\\+");
+! regpat += 4;
+ }
+ }
+ else
+ {
+ srcptr = (char_u *)fmt_pat[idx].pattern;
+! while ((*regpat = *srcptr++) != NUL)
+! ++regpat;
+ }
+! *regpat++ = '\\';
+! *regpat++ = ')';
+
+! return regpat;
+ }
+
+ /*
+ * Convert a scanf like format in 'errorformat' to a regular expression.
++ * Returns a pointer to the location after the pattern.
+ */
+ static char_u *
+ scanf_fmt_to_regpat(
++ char_u **pefmp,
+ char_u *efm,
+ int len,
+! char_u *regpat,
+ char_u *errmsg)
+ {
+ char_u *efmp = *pefmp;
+
+! if (*efmp == '[' || *efmp == '\\')
+ {
+! if ((*regpat++ = *efmp) == '[') /* %*[^a-z0-9] etc. */
+ {
+ if (efmp[1] == '^')
+! *regpat++ = *++efmp;
+ if (efmp < efm + len)
+ {
+! *regpat++ = *++efmp; /* could be ']' */
+ while (efmp < efm + len
+! && (*regpat++ = *++efmp) != ']')
+ /* skip */;
+ if (efmp == efm + len)
+ {
+***************
+*** 310,318 ****
+ }
+ }
+ else if (efmp < efm + len) /* %*\D, %*\s etc. */
+! *ptr++ = *++efmp;
+! *ptr++ = '\\';
+! *ptr++ = '+';
+ }
+ else
+ {
+--- 313,321 ----
+ }
+ }
+ else if (efmp < efm + len) /* %*\D, %*\s etc. */
+! *regpat++ = *++efmp;
+! *regpat++ = '\\';
+! *regpat++ = '+';
+ }
+ else
+ {
+***************
+*** 325,360 ****
+
+ *pefmp = efmp;
+
+! return ptr;
+ }
+
+ /*
+ * Analyze/parse an errorformat prefix.
+ */
+! static int
+! efm_analyze_prefix(char_u **pefmp, efm_T *fmt_ptr, char_u *errmsg)
+ {
+- char_u *efmp = *pefmp;
+-
+ if (vim_strchr((char_u *)"+-", *efmp) != NULL)
+! fmt_ptr->flags = *efmp++;
+ if (vim_strchr((char_u *)"DXAEWICZGOPQ", *efmp) != NULL)
+! fmt_ptr->prefix = *efmp;
+ else
+ {
+ sprintf((char *)errmsg,
+ _("E376: Invalid %%%c in format string prefix"), *efmp);
+ EMSG(errmsg);
+! return FAIL;
+ }
+
+! *pefmp = efmp;
+!
+! return OK;
+ }
+
+ /*
+! * Converts a 'errorformat' string to regular expression pattern
+ */
+ static int
+ efm_to_regpat(
+--- 328,362 ----
+
+ *pefmp = efmp;
+
+! return regpat;
+ }
+
+ /*
+ * Analyze/parse an errorformat prefix.
+ */
+! static char_u *
+! efm_analyze_prefix(char_u *efmp, efm_T *efminfo, char_u *errmsg)
+ {
+ if (vim_strchr((char_u *)"+-", *efmp) != NULL)
+! efminfo->flags = *efmp++;
+ if (vim_strchr((char_u *)"DXAEWICZGOPQ", *efmp) != NULL)
+! efminfo->prefix = *efmp;
+ else
+ {
+ sprintf((char *)errmsg,
+ _("E376: Invalid %%%c in format string prefix"), *efmp);
+ EMSG(errmsg);
+! return NULL;
+ }
+
+! return efmp;
+ }
+
+ /*
+! * Converts a 'errorformat' string part in 'efm' to a regular expression
+! * pattern. The resulting regex pattern is returned in "regpat". Additional
+! * information about the 'erroformat' pattern is returned in "fmt_ptr".
+! * Returns OK or FAIL.
+ */
+ static int
+ efm_to_regpat(
+***************
+*** 370,376 ****
+ int idx = 0;
+
+ /*
+! * Build regexp pattern from current 'errorformat' option
+ */
+ ptr = regpat;
+ *ptr++ = '^';
+--- 372,378 ----
+ int idx = 0;
+
+ /*
+! * Build a regexp pattern for a 'errorformat' option part
+ */
+ ptr = regpat;
+ *ptr++ = '^';
+***************
+*** 385,401 ****
+ break;
+ if (idx < FMT_PATTERNS)
+ {
+! ptr = fmtpat_to_regpat(efmp, fmt_ptr, idx, round, ptr,
+ errmsg);
+ if (ptr == NULL)
+! return -1;
+ round++;
+ }
+ else if (*efmp == '*')
+ {
+! ptr = scanf_fmt_to_regpat(efm, len, &efmp, ptr, errmsg);
+ if (ptr == NULL)
+! return -1;
+ }
+ else if (vim_strchr((char_u *)"%\\.^$~[", *efmp) != NULL)
+ *ptr++ = *efmp; /* regexp magic characters */
+--- 387,404 ----
+ break;
+ if (idx < FMT_PATTERNS)
+ {
+! ptr = efmpat_to_regpat(efmp, ptr, fmt_ptr, idx, round,
+ errmsg);
+ if (ptr == NULL)
+! return FAIL;
+ round++;
+ }
+ else if (*efmp == '*')
+ {
+! ++efmp;
+! ptr = scanf_fmt_to_regpat(&efmp, efm, len, ptr, errmsg);
+ if (ptr == NULL)
+! return FAIL;
+ }
+ else if (vim_strchr((char_u *)"%\\.^$~[", *efmp) != NULL)
+ *ptr++ = *efmp; /* regexp magic characters */
+***************
+*** 405,419 ****
+ fmt_ptr->conthere = TRUE;
+ else if (efmp == efm + 1) /* analyse prefix */
+ {
+! if (efm_analyze_prefix(&efmp, fmt_ptr, errmsg) == FAIL)
+! return -1;
+ }
+ else
+ {
+ sprintf((char *)errmsg,
+ _("E377: Invalid %%%c in format string"), *efmp);
+ EMSG(errmsg);
+! return -1;
+ }
+ }
+ else /* copy normal character */
+--- 408,427 ----
+ fmt_ptr->conthere = TRUE;
+ else if (efmp == efm + 1) /* analyse prefix */
+ {
+! /*
+! * prefix is allowed only at the beginning of the errorformat
+! * option part
+! */
+! efmp = efm_analyze_prefix(efmp, fmt_ptr, errmsg);
+! if (efmp == NULL)
+! return FAIL;
+ }
+ else
+ {
+ sprintf((char *)errmsg,
+ _("E377: Invalid %%%c in format string"), *efmp);
+ EMSG(errmsg);
+! return FAIL;
+ }
+ }
+ else /* copy normal character */
+***************
+*** 429,437 ****
+ *ptr++ = '$';
+ *ptr = NUL;
+
+! return 0;
+ }
+
+ static void
+ free_efm_list(efm_T **efm_first)
+ {
+--- 437,448 ----
+ *ptr++ = '$';
+ *ptr = NUL;
+
+! return OK;
+ }
+
++ /*
++ * Free the 'errorformat' information list
++ */
+ static void
+ free_efm_list(efm_T **efm_first)
+ {
+***************
+*** 446,452 ****
+ fmt_start = NULL;
+ }
+
+! /* Parse 'errorformat' option */
+ static efm_T *
+ parse_efm_option(char_u *efm)
+ {
+--- 457,504 ----
+ fmt_start = NULL;
+ }
+
+! /*
+! * Compute the size of the buffer used to convert a 'errorformat' pattern into
+! * a regular expression pattern.
+! */
+! static int
+! efm_regpat_bufsz(char_u *efm)
+! {
+! int sz;
+! int i;
+!
+! sz = (FMT_PATTERNS * 3) + ((int)STRLEN(efm) << 2);
+! for (i = FMT_PATTERNS; i > 0; )
+! sz += (int)STRLEN(fmt_pat[--i].pattern);
+! #ifdef BACKSLASH_IN_FILENAME
+! sz += 12; /* "%f" can become twelve chars longer (see efm_to_regpat) */
+! #else
+! sz += 2; /* "%f" can become two chars longer */
+! #endif
+!
+! return sz;
+! }
+!
+! /*
+! * Return the length of a 'errorformat' option part (separated by ",").
+! */
+! static int
+! efm_option_part_len(char_u *efm)
+! {
+! int len;
+!
+! for (len = 0; efm[len] != NUL && efm[len] != ','; ++len)
+! if (efm[len] == '\\' && efm[len + 1] != NUL)
+! ++len;
+!
+! return len;
+! }
+!
+! /*
+! * Parse the 'errorformat' option. Multiple parts in the 'errorformat' option
+! * are parsed and converted to regular expressions. Returns information about
+! * the parsed 'errorformat' option.
+! */
+ static efm_T *
+ parse_efm_option(char_u *efm)
+ {
+***************
+*** 457,464 ****
+ efm_T *fmt_last = NULL;
+ char_u *fmtstr = NULL;
+ int len;
+! int i;
+! int round;
+
+ errmsglen = CMDBUFFSIZE + 1;
+ errmsg = alloc_id(errmsglen, aid_qf_errmsg);
+--- 509,515 ----
+ efm_T *fmt_last = NULL;
+ char_u *fmtstr = NULL;
+ int len;
+! int sz;
+
+ errmsglen = CMDBUFFSIZE + 1;
+ errmsg = alloc_id(errmsglen, aid_qf_errmsg);
+***************
+*** 473,487 ****
+ /*
+ * Get some space to modify the format string into.
+ */
+! i = (FMT_PATTERNS * 3) + ((int)STRLEN(efm) << 2);
+! for (round = FMT_PATTERNS; round > 0; )
+! i += (int)STRLEN(fmt_pat[--round].pattern);
+! #ifdef BACKSLASH_IN_FILENAME
+! i += 12; /* "%f" can become twelve chars longer (see efm_to_regpat) */
+! #else
+! i += 2; /* "%f" can become two chars longer */
+! #endif
+! if ((fmtstr = alloc(i)) == NULL)
+ goto parse_efm_error;
+
+ while (efm[0] != NUL)
+--- 524,531 ----
+ /*
+ * Get some space to modify the format string into.
+ */
+! sz = efm_regpat_bufsz(efm);
+! if ((fmtstr = alloc(sz)) == NULL)
+ goto parse_efm_error;
+
+ while (efm[0] != NUL)
+***************
+*** 501,511 ****
+ /*
+ * Isolate one part in the 'errorformat' option
+ */
+! for (len = 0; efm[len] != NUL && efm[len] != ','; ++len)
+! if (efm[len] == '\\' && efm[len + 1] != NUL)
+! ++len;
+
+! if (efm_to_regpat(efm, len, fmt_ptr, fmtstr, errmsg) == -1)
+ goto parse_efm_error;
+ if ((fmt_ptr->prog = vim_regcomp(fmtstr, RE_MAGIC + RE_STRING)) == NULL)
+ goto parse_efm_error;
+--- 545,553 ----
+ /*
+ * Isolate one part in the 'errorformat' option
+ */
+! len = efm_option_part_len(efm);
+
+! if (efm_to_regpat(efm, len, fmt_ptr, fmtstr, errmsg) == FAIL)
+ goto parse_efm_error;
+ if ((fmt_ptr->prog = vim_regcomp(fmtstr, RE_MAGIC + RE_STRING)) == NULL)
+ goto parse_efm_error;
+***************
+*** 539,544 ****
+--- 581,590 ----
+ QF_MULTISCAN = 5,
+ };
+
++ /*
++ * State information used to parse lines and add entries to a quickfix/location
++ * list.
++ */
+ typedef struct {
+ char_u *linebuf;
+ int linelen;
+***************
+*** 554,559 ****
+--- 600,608 ----
+ vimconv_T vc;
+ } qfstate_T;
+
++ /*
++ * Allocate more memory for the line buffer used for parsing lines.
++ */
+ static char_u *
+ qf_grow_linebuf(qfstate_T *state, int newsz)
+ {
+***************
+*** 861,870 ****
+ } qffields_T;
+
+ /*
+! * Parse the error format matches in 'regmatch' and set the values in 'fields'.
+! * fmt_ptr contains the 'efm' format specifiers/prefixes that have a match.
+! * Returns QF_OK if all the matches are successfully parsed. On failure,
+! * returns QF_FAIL or QF_NOMEM.
+ */
+ static int
+ qf_parse_match(
+--- 910,1160 ----
+ } qffields_T;
+
+ /*
+! * Parse the match for filename ('%f') pattern in regmatch.
+! * Return the matched value in "fields->namebuf".
+! */
+! static int
+! qf_parse_fmt_f(regmatch_T *rmp, int midx, qffields_T *fields, int prefix)
+! {
+! int c;
+!
+! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL)
+! return QF_FAIL;
+!
+! /* Expand ~/file and $HOME/file to full path. */
+! c = *rmp->endp[midx];
+! *rmp->endp[midx] = NUL;
+! expand_env(rmp->startp[midx], fields->namebuf, CMDBUFFSIZE);
+! *rmp->endp[midx] = c;
+!
+! /*
+! * For separate filename patterns (%O, %P and %Q), the specified file
+! * should exist.
+! */
+! if (vim_strchr((char_u *)"OPQ", prefix) != NULL
+! && mch_getperm(fields->namebuf) == -1)
+! return QF_FAIL;
+!
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for error number ('%n') pattern in regmatch.
+! * Return the matched value in "fields->enr".
+! */
+! static int
+! qf_parse_fmt_n(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! if (rmp->startp[midx] == NULL)
+! return QF_FAIL;
+! fields->enr = (int)atol((char *)rmp->startp[midx]);
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for line number (%l') pattern in regmatch.
+! * Return the matched value in "fields->lnum".
+! */
+! static int
+! qf_parse_fmt_l(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! if (rmp->startp[midx] == NULL)
+! return QF_FAIL;
+! fields->lnum = atol((char *)rmp->startp[midx]);
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for column number ('%c') pattern in regmatch.
+! * Return the matched value in "fields->col".
+! */
+! static int
+! qf_parse_fmt_c(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! if (rmp->startp[midx] == NULL)
+! return QF_FAIL;
+! fields->col = (int)atol((char *)rmp->startp[midx]);
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for error type ('%t') pattern in regmatch.
+! * Return the matched value in "fields->type".
+! */
+! static int
+! qf_parse_fmt_t(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! if (rmp->startp[midx] == NULL)
+! return QF_FAIL;
+! fields->type = *rmp->startp[midx];
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for '%+' format pattern. The whole matching line is included
+! * in the error string. Return the matched line in "fields->errmsg".
+! */
+! static int
+! qf_parse_fmt_plus(char_u *linebuf, int linelen, qffields_T *fields)
+! {
+! char_u *p;
+!
+! if (linelen >= fields->errmsglen)
+! {
+! /* linelen + null terminator */
+! if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL)
+! return QF_NOMEM;
+! fields->errmsg = p;
+! fields->errmsglen = linelen + 1;
+! }
+! vim_strncpy(fields->errmsg, linebuf, linelen);
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for error message ('%m') pattern in regmatch.
+! * Return the matched value in "fields->errmsg".
+! */
+! static int
+! qf_parse_fmt_m(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! char_u *p;
+! int len;
+!
+! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL)
+! return QF_FAIL;
+! len = (int)(rmp->endp[midx] - rmp->startp[midx]);
+! if (len >= fields->errmsglen)
+! {
+! /* len + null terminator */
+! if ((p = vim_realloc(fields->errmsg, len + 1)) == NULL)
+! return QF_NOMEM;
+! fields->errmsg = p;
+! fields->errmsglen = len + 1;
+! }
+! vim_strncpy(fields->errmsg, rmp->startp[midx], len);
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for rest of a single-line file message ('%r') pattern.
+! * Return the matched value in "tail".
+! */
+! static int
+! qf_parse_fmt_r(regmatch_T *rmp, int midx, char_u **tail)
+! {
+! if (rmp->startp[midx] == NULL)
+! return QF_FAIL;
+! *tail = rmp->startp[midx];
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for the pointer line ('%p') pattern in regmatch.
+! * Return the matched value in "fields->col".
+! */
+! static int
+! qf_parse_fmt_p(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! char_u *match_ptr;
+!
+! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL)
+! return QF_FAIL;
+! fields->col = 0;
+! for (match_ptr = rmp->startp[midx]; match_ptr != rmp->endp[midx];
+! ++match_ptr)
+! {
+! ++fields->col;
+! if (*match_ptr == TAB)
+! {
+! fields->col += 7;
+! fields->col -= fields->col % 8;
+! }
+! }
+! ++fields->col;
+! fields->use_viscol = TRUE;
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for the virtual column number ('%v') pattern in regmatch.
+! * Return the matched value in "fields->col".
+! */
+! static int
+! qf_parse_fmt_v(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! if (rmp->startp[midx] == NULL)
+! return QF_FAIL;
+! fields->col = (int)atol((char *)rmp->startp[midx]);
+! fields->use_viscol = TRUE;
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for the search text ('%s') pattern in regmatch.
+! * Return the matched value in "fields->pattern".
+! */
+! static int
+! qf_parse_fmt_s(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! int len;
+!
+! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL)
+! return QF_FAIL;
+! len = (int)(rmp->endp[midx] - rmp->startp[midx]);
+! if (len > CMDBUFFSIZE - 5)
+! len = CMDBUFFSIZE - 5;
+! STRCPY(fields->pattern, "^\\V");
+! STRNCAT(fields->pattern, rmp->startp[midx], len);
+! fields->pattern[len + 3] = '\\';
+! fields->pattern[len + 4] = '$';
+! fields->pattern[len + 5] = NUL;
+! return QF_OK;
+! }
+!
+! /*
+! * Parse the match for the module ('%o') pattern in regmatch.
+! * Return the matched value in "fields->module".
+! */
+! static int
+! qf_parse_fmt_o(regmatch_T *rmp, int midx, qffields_T *fields)
+! {
+! int len;
+!
+! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL)
+! return QF_FAIL;
+! len = (int)(rmp->endp[midx] - rmp->startp[midx]);
+! if (len > CMDBUFFSIZE)
+! len = CMDBUFFSIZE;
+! STRNCAT(fields->module, rmp->startp[midx], len);
+! return QF_OK;
+! }
+!
+! /*
+! * 'errorformat' format pattern parser functions.
+! * The '%f' and '%r' formats are parsed differently from other formats.
+! * See qf_parse_match() for details.
+! */
+! static int (*qf_parse_fmt[FMT_PATTERNS])(regmatch_T *, int, qffields_T *) =
+! {
+! NULL,
+! qf_parse_fmt_n,
+! qf_parse_fmt_l,
+! qf_parse_fmt_c,
+! qf_parse_fmt_t,
+! qf_parse_fmt_m,
+! NULL,
+! qf_parse_fmt_p,
+! qf_parse_fmt_v,
+! qf_parse_fmt_s,
+! qf_parse_fmt_o
+! };
+!
+! /*
+! * Parse the error format pattern matches in "regmatch" and set the values in
+! * "fields". fmt_ptr contains the 'efm' format specifiers/prefixes that have a
+! * match. Returns QF_OK if all the matches are successfully parsed. On
+! * failure, returns QF_FAIL or QF_NOMEM.
+ */
+ static int
+ qf_parse_match(
+***************
+*** 877,886 ****
+ int qf_multiscan,
+ char_u **tail)
+ {
+- char_u *p;
+ int idx = fmt_ptr->prefix;
+ int i;
+! int len;
+
+ if ((idx == 'C' || idx == 'Z') && !qf_multiline)
+ return QF_FAIL;
+--- 1167,1176 ----
+ int qf_multiscan,
+ char_u **tail)
+ {
+ int idx = fmt_ptr->prefix;
+ int i;
+! int midx;
+! int status;
+
+ if ((idx == 'C' || idx == 'Z') && !qf_multiline)
+ return QF_FAIL;
+***************
+*** 893,1020 ****
+ * We check for an actual submatch, because "\[" and "\]" in
+ * the 'errorformat' may cause the wrong submatch to be used.
+ */
+! if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */
+ {
+! int c;
+
+! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL)
+! return QF_FAIL;
+!
+! /* Expand ~/file and $HOME/file to full path. */
+! c = *regmatch->endp[i];
+! *regmatch->endp[i] = NUL;
+! expand_env(regmatch->startp[i], fields->namebuf, CMDBUFFSIZE);
+! *regmatch->endp[i] = c;
+!
+! if (vim_strchr((char_u *)"OPQ", idx) != NULL
+! && mch_getperm(fields->namebuf) == -1)
+! return QF_FAIL;
+! }
+! if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */
+! {
+! if (regmatch->startp[i] == NULL)
+! return QF_FAIL;
+! fields->enr = (int)atol((char *)regmatch->startp[i]);
+! }
+! if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */
+! {
+! if (regmatch->startp[i] == NULL)
+! return QF_FAIL;
+! fields->lnum = atol((char *)regmatch->startp[i]);
+! }
+! if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */
+! {
+! if (regmatch->startp[i] == NULL)
+! return QF_FAIL;
+! fields->col = (int)atol((char *)regmatch->startp[i]);
+! }
+! if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */
+! {
+! if (regmatch->startp[i] == NULL)
+! return QF_FAIL;
+! fields->type = *regmatch->startp[i];
+! }
+! if (fmt_ptr->flags == '+' && !qf_multiscan) /* %+ */
+! {
+! if (linelen >= fields->errmsglen)
+! {
+! /* linelen + null terminator */
+! if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL)
+! return QF_NOMEM;
+! fields->errmsg = p;
+! fields->errmsglen = linelen + 1;
+! }
+! vim_strncpy(fields->errmsg, linebuf, linelen);
+! }
+! else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */
+! {
+! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL)
+! return QF_FAIL;
+! len = (int)(regmatch->endp[i] - regmatch->startp[i]);
+! if (len >= fields->errmsglen)
+! {
+! /* len + null terminator */
+! if ((p = vim_realloc(fields->errmsg, len + 1)) == NULL)
+! return QF_NOMEM;
+! fields->errmsg = p;
+! fields->errmsglen = len + 1;
+! }
+! vim_strncpy(fields->errmsg, regmatch->startp[i], len);
+! }
+! if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */
+! {
+! if (regmatch->startp[i] == NULL)
+! return QF_FAIL;
+! *tail = regmatch->startp[i];
+! }
+! if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */
+! {
+! char_u *match_ptr;
+!
+! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL)
+! return QF_FAIL;
+! fields->col = 0;
+! for (match_ptr = regmatch->startp[i];
+! match_ptr != regmatch->endp[i]; ++match_ptr)
+! {
+! ++fields->col;
+! if (*match_ptr == TAB)
+! {
+! fields->col += 7;
+! fields->col -= fields->col % 8;
+! }
+! }
+! ++fields->col;
+! fields->use_viscol = TRUE;
+! }
+! if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */
+! {
+! if (regmatch->startp[i] == NULL)
+! return QF_FAIL;
+! fields->col = (int)atol((char *)regmatch->startp[i]);
+! fields->use_viscol = TRUE;
+! }
+! if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */
+! {
+! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL)
+! return QF_FAIL;
+! len = (int)(regmatch->endp[i] - regmatch->startp[i]);
+! if (len > CMDBUFFSIZE - 5)
+! len = CMDBUFFSIZE - 5;
+! STRCPY(fields->pattern, "^\\V");
+! STRNCAT(fields->pattern, regmatch->startp[i], len);
+! fields->pattern[len + 3] = '\\';
+! fields->pattern[len + 4] = '$';
+! fields->pattern[len + 5] = NUL;
+! }
+! if ((i = (int)fmt_ptr->addr[10]) > 0) /* %o */
+! {
+! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL)
+! return QF_FAIL;
+! len = (int)(regmatch->endp[i] - regmatch->startp[i]);
+! if (len > CMDBUFFSIZE)
+! len = CMDBUFFSIZE;
+! STRNCAT(fields->module, regmatch->startp[i], len);
+ }
+
+ return QF_OK;
+--- 1183,1208 ----
+ * We check for an actual submatch, because "\[" and "\]" in
+ * the 'errorformat' may cause the wrong submatch to be used.
+ */
+! for (i = 0; i < FMT_PATTERNS; i++)
+ {
+! status = QF_OK;
+! midx = (int)fmt_ptr->addr[i];
+! if (i == 0 && midx > 0) /* %f */
+! status = qf_parse_fmt_f(regmatch, midx, fields, idx);
+! else if (i == 5)
+! {
+! if (fmt_ptr->flags == '+' && !qf_multiscan) /* %+ */
+! status = qf_parse_fmt_plus(linebuf, linelen, fields);
+! else if (midx > 0) /* %m */
+! status = qf_parse_fmt_m(regmatch, midx, fields);
+! }
+! else if (i == 6 && midx > 0) /* %r */
+! status = qf_parse_fmt_r(regmatch, midx, tail);
+! else if (midx > 0) /* others */
+! status = (qf_parse_fmt[i])(regmatch, midx, fields);
+
+! if (status != QF_OK)
+! return status;
+ }
+
+ return QF_OK;
+***************
+*** 1308,1313 ****
+--- 1496,1513 ----
+ }
+
+ /*
++ * Returns TRUE if the specified quickfix/location list is empty.
++ */
++ static int
++ qf_list_empty(qf_info_T *qi, int qf_idx)
++ {
++ if (qi == NULL || qf_idx < 0 || qf_idx >= LISTCOUNT)
++ return TRUE;
++ return qi->qf_lists[qf_idx].qf_count <= 0;
++ }
++
++
++ /*
+ * Allocate the fields used for parsing lines and populating a quickfix list.
+ */
+ static int
+***************
+*** 1450,1456 ****
+ {
+ /* Adding to existing list, use last entry. */
+ adding = TRUE;
+! if (qi->qf_lists[qf_idx].qf_count > 0)
+ old_last = qi->qf_lists[qf_idx].qf_last;
+ }
+
+--- 1650,1656 ----
+ {
+ /* Adding to existing list, use last entry. */
+ adding = TRUE;
+! if (!qf_list_empty(qi, qf_idx))
+ old_last = qi->qf_lists[qf_idx].qf_last;
+ }
+
+***************
+*** 1777,1784 ****
+ qfp->qf_valid = valid;
+
+ lastp = &qi->qf_lists[qf_idx].qf_last;
+! if (qi->qf_lists[qf_idx].qf_count == 0)
+! /* first element in the list */
+ {
+ qi->qf_lists[qf_idx].qf_start = qfp;
+ qi->qf_lists[qf_idx].qf_ptr = qfp;
+--- 1977,1983 ----
+ qfp->qf_valid = valid;
+
+ lastp = &qi->qf_lists[qf_idx].qf_last;
+! if (qf_list_empty(qi, qf_idx)) /* first element in the list */
+ {
+ qi->qf_lists[qf_idx].qf_start = qfp;
+ qi->qf_lists[qf_idx].qf_ptr = qfp;
+***************
+*** 1875,1881 ****
+ to->w_llist->qf_listcount = qi->qf_listcount;
+
+ /* Copy the location lists one at a time */
+! for (idx = 0; idx < qi->qf_listcount; idx++)
+ {
+ qf_list_T *from_qfl;
+ qf_list_T *to_qfl;
+--- 2074,2080 ----
+ to->w_llist->qf_listcount = qi->qf_listcount;
+
+ /* Copy the location lists one at a time */
+! for (idx = 0; idx < qi->qf_listcount; ++idx)
+ {
+ qf_list_T *from_qfl;
+ qf_list_T *to_qfl;
+***************
+*** 2907,2913 ****
+ qi = &ql_info;
+
+ if (qi->qf_curlist >= qi->qf_listcount
+! || qi->qf_lists[qi->qf_curlist].qf_count == 0)
+ {
+ EMSG(_(e_quickfix));
+ return;
+--- 3106,3112 ----
+ qi = &ql_info;
+
+ if (qi->qf_curlist >= qi->qf_listcount
+! || qf_list_empty(qi, qi->qf_curlist))
+ {
+ EMSG(_(e_quickfix));
+ return;
+***************
+*** 3033,3056 ****
+ }
+
+ /*
+ * ":clist": list all errors
+ * ":llist": list all locations
+ */
+ void
+ qf_list(exarg_T *eap)
+ {
+- buf_T *buf;
+- char_u *fname;
+ qfline_T *qfp;
+ int i;
+ int idx1 = 1;
+ int idx2 = -1;
+ char_u *arg = eap->arg;
+ int plus = FALSE;
+- int qfFileAttr;
+- int qfSepAttr;
+- int qfLineAttr;
+- int filter_entry;
+ int all = eap->forceit; /* if not :cl!, only show
+ recognised errors */
+ qf_info_T *qi = &ql_info;
+--- 3232,3336 ----
+ }
+
+ /*
++ * Highlight attributes used for displaying entries from the quickfix list.
++ */
++ static int qfFileAttr;
++ static int qfSepAttr;
++ static int qfLineAttr;
++
++ /*
++ * Display information about a single entry from the quickfix/location list.
++ * Used by ":clist/:llist" commands.
++ */
++ static void
++ qf_list_entry(qf_info_T *qi, qfline_T *qfp, int qf_idx)
++ {
++ char_u *fname;
++ buf_T *buf;
++ int filter_entry;
++
++ fname = NULL;
++ if (qfp->qf_module != NULL && *qfp->qf_module != NUL)
++ vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", qf_idx,
++ (char *)qfp->qf_module);
++ else {
++ if (qfp->qf_fnum != 0
++ && (buf = buflist_findnr(qfp->qf_fnum)) != NULL)
++ {
++ fname = buf->b_fname;
++ if (qfp->qf_type == 1) /* :helpgrep */
++ fname = gettail(fname);
++ }
++ if (fname == NULL)
++ sprintf((char *)IObuff, "%2d", qf_idx);
++ else
++ vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
++ qf_idx, (char *)fname);
++ }
++
++ // Support for filtering entries using :filter /pat/ clist
++ // Match against the module name, file name, search pattern and
++ // text of the entry.
++ filter_entry = TRUE;
++ if (qfp->qf_module != NULL && *qfp->qf_module != NUL)
++ filter_entry &= message_filtered(qfp->qf_module);
++ if (filter_entry && fname != NULL)
++ filter_entry &= message_filtered(fname);
++ if (filter_entry && qfp->qf_pattern != NULL)
++ filter_entry &= message_filtered(qfp->qf_pattern);
++ if (filter_entry)
++ filter_entry &= message_filtered(qfp->qf_text);
++ if (filter_entry)
++ return;
++
++ msg_putchar('\n');
++ msg_outtrans_attr(IObuff, qf_idx == qi->qf_lists[qi->qf_curlist].qf_index
++ ? HL_ATTR(HLF_QFL) : qfFileAttr);
++
++ if (qfp->qf_lnum != 0)
++ msg_puts_attr((char_u *)":", qfSepAttr);
++ if (qfp->qf_lnum == 0)
++ IObuff[0] = NUL;
++ else if (qfp->qf_col == 0)
++ sprintf((char *)IObuff, "%ld", qfp->qf_lnum);
++ else
++ sprintf((char *)IObuff, "%ld col %d",
++ qfp->qf_lnum, qfp->qf_col);
++ sprintf((char *)IObuff + STRLEN(IObuff), "%s",
++ (char *)qf_types(qfp->qf_type, qfp->qf_nr));
++ msg_puts_attr(IObuff, qfLineAttr);
++ msg_puts_attr((char_u *)":", qfSepAttr);
++ if (qfp->qf_pattern != NULL)
++ {
++ qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE);
++ msg_puts(IObuff);
++ msg_puts_attr((char_u *)":", qfSepAttr);
++ }
++ msg_puts((char_u *)" ");
++
++ /* Remove newlines and leading whitespace from the text. For an
++ * unrecognized line keep the indent, the compiler may mark a word
++ * with ^^^^. */
++ qf_fmt_text((fname != NULL || qfp->qf_lnum != 0)
++ ? skipwhite(qfp->qf_text) : qfp->qf_text,
++ IObuff, IOSIZE);
++ msg_prt_line(IObuff, FALSE);
++ out_flush(); /* show one line at a time */
++ }
++
++ /*
+ * ":clist": list all errors
+ * ":llist": list all locations
+ */
+ void
+ qf_list(exarg_T *eap)
+ {
+ qfline_T *qfp;
+ int i;
+ int idx1 = 1;
+ int idx2 = -1;
+ char_u *arg = eap->arg;
+ int plus = FALSE;
+ int all = eap->forceit; /* if not :cl!, only show
+ recognised errors */
+ qf_info_T *qi = &ql_info;
+***************
+*** 3066,3072 ****
+ }
+
+ if (qi->qf_curlist >= qi->qf_listcount
+! || qi->qf_lists[qi->qf_curlist].qf_count == 0)
+ {
+ EMSG(_(e_quickfix));
+ return;
+--- 3346,3352 ----
+ }
+
+ if (qi->qf_curlist >= qi->qf_listcount
+! || qf_list_empty(qi, qi->qf_curlist))
+ {
+ EMSG(_(e_quickfix));
+ return;
+***************
+*** 3123,3197 ****
+ if (got_int)
+ break;
+
+! fname = NULL;
+! if (qfp->qf_module != NULL && *qfp->qf_module != NUL)
+! vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", i, (char *)qfp->qf_module);
+! else {
+! if (qfp->qf_fnum != 0
+! && (buf = buflist_findnr(qfp->qf_fnum)) != NULL)
+! {
+! fname = buf->b_fname;
+! if (qfp->qf_type == 1) /* :helpgrep */
+! fname = gettail(fname);
+! }
+! if (fname == NULL)
+! sprintf((char *)IObuff, "%2d", i);
+! else
+! vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
+! i, (char *)fname);
+! }
+!
+! // Support for filtering entries using :filter /pat/ clist
+! // Match against the module name, file name, search pattern and
+! // text of the entry.
+! filter_entry = TRUE;
+! if (qfp->qf_module != NULL && *qfp->qf_module != NUL)
+! filter_entry &= message_filtered(qfp->qf_module);
+! if (filter_entry && fname != NULL)
+! filter_entry &= message_filtered(fname);
+! if (filter_entry && qfp->qf_pattern != NULL)
+! filter_entry &= message_filtered(qfp->qf_pattern);
+! if (filter_entry)
+! filter_entry &= message_filtered(qfp->qf_text);
+! if (filter_entry)
+! goto next_entry;
+!
+! msg_putchar('\n');
+! msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index
+! ? HL_ATTR(HLF_QFL) : qfFileAttr);
+!
+! if (qfp->qf_lnum != 0)
+! msg_puts_attr((char_u *)":", qfSepAttr);
+! if (qfp->qf_lnum == 0)
+! IObuff[0] = NUL;
+! else if (qfp->qf_col == 0)
+! sprintf((char *)IObuff, "%ld", qfp->qf_lnum);
+! else
+! sprintf((char *)IObuff, "%ld col %d",
+! qfp->qf_lnum, qfp->qf_col);
+! sprintf((char *)IObuff + STRLEN(IObuff), "%s",
+! (char *)qf_types(qfp->qf_type, qfp->qf_nr));
+! msg_puts_attr(IObuff, qfLineAttr);
+! msg_puts_attr((char_u *)":", qfSepAttr);
+! if (qfp->qf_pattern != NULL)
+! {
+! qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE);
+! msg_puts(IObuff);
+! msg_puts_attr((char_u *)":", qfSepAttr);
+! }
+! msg_puts((char_u *)" ");
+!
+! /* Remove newlines and leading whitespace from the text. For an
+! * unrecognized line keep the indent, the compiler may mark a word
+! * with ^^^^. */
+! qf_fmt_text((fname != NULL || qfp->qf_lnum != 0)
+! ? skipwhite(qfp->qf_text) : qfp->qf_text,
+! IObuff, IOSIZE);
+! msg_prt_line(IObuff, FALSE);
+! out_flush(); /* show one line at a time */
+ }
+
+- next_entry:
+ qfp = qfp->qf_next;
+ if (qfp == NULL)
+ break;
+--- 3403,3411 ----
+ if (got_int)
+ break;
+
+! qf_list_entry(qi, qfp, i);
+ }
+
+ qfp = qfp->qf_next;
+ if (qfp == NULL)
+ break;
+***************
+*** 3320,3326 ****
+ if (eap->cmdidx == CMD_lhistory)
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL || (qi->qf_listcount == 0
+! && qi->qf_lists[qi->qf_curlist].qf_count == 0))
+ MSG(_("No entries"));
+ else
+ for (i = 0; i < qi->qf_listcount; ++i)
+--- 3534,3540 ----
+ if (eap->cmdidx == CMD_lhistory)
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL || (qi->qf_listcount == 0
+! && qf_list_empty(qi, qi->qf_curlist)))
+ MSG(_("No entries"));
+ else
+ for (i = 0; i < qi->qf_listcount; ++i)
+***************
+*** 3421,3427 ****
+ }
+
+ for (idx = 0; idx < qi->qf_listcount; ++idx)
+! if (qi->qf_lists[idx].qf_count)
+ for (i = 0, qfp = qi->qf_lists[idx].qf_start;
+ i < qi->qf_lists[idx].qf_count && qfp != NULL;
+ ++i, qfp = qfp->qf_next)
+--- 3635,3641 ----
+ }
+
+ for (idx = 0; idx < qi->qf_listcount; ++idx)
+! if (!qf_list_empty(qi, idx))
+ for (i = 0, qfp = qi->qf_lists[idx].qf_start;
+ i < qi->qf_lists[idx].qf_count && qfp != NULL;
+ ++i, qfp = qfp->qf_next)
+***************
+*** 3552,3558 ****
+ * it if we have errors; otherwise, leave it closed.
+ */
+ if (qi->qf_lists[qi->qf_curlist].qf_nonevalid
+! || qi->qf_lists[qi->qf_curlist].qf_count == 0
+ || qi->qf_curlist >= qi->qf_listcount)
+ {
+ if (win != NULL)
+--- 3766,3772 ----
+ * it if we have errors; otherwise, leave it closed.
+ */
+ if (qi->qf_lists[qi->qf_curlist].qf_nonevalid
+! || qf_list_empty(qi, qi->qf_curlist)
+ || qi->qf_curlist >= qi->qf_listcount)
+ {
+ if (win != NULL)
+***************
+*** 5154,5160 ****
+ qi->qf_curlist = qf_id2nr(qi, save_qfid);
+
+ /* Jump to first match. */
+! if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
+ {
+ if ((flags & VGR_NOJUMP) == 0)
+ vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy,
+--- 5368,5374 ----
+ qi->qf_curlist = qf_id2nr(qi, save_qfid);
+
+ /* Jump to first match. */
+! if (!qf_list_empty(qi, qi->qf_curlist))
+ {
+ if ((flags & VGR_NOJUMP) == 0)
+ vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy,
+***************
+*** 5387,5394 ****
+ if (qf_idx == INVALID_QFIDX)
+ qf_idx = qi->qf_curlist;
+
+! if (qf_idx >= qi->qf_listcount
+! || qi->qf_lists[qf_idx].qf_count == 0)
+ return FAIL;
+
+ qfp = qi->qf_lists[qf_idx].qf_start;
+--- 5601,5607 ----
+ if (qf_idx == INVALID_QFIDX)
+ qf_idx = qi->qf_curlist;
+
+! if (qf_idx >= qi->qf_listcount || qf_list_empty(qi, qf_idx))
+ return FAIL;
+
+ qfp = qi->qf_lists[qf_idx].qf_start;
+***************
+*** 5709,5715 ****
+ qf_getprop_idx(qf_info_T *qi, int qf_idx, dict_T *retdict)
+ {
+ int idx = qi->qf_lists[qf_idx].qf_index;
+! if (qi->qf_lists[qf_idx].qf_count == 0)
+ /* For empty lists, qf_index is set to 1 */
+ idx = 0;
+ return dict_add_number(retdict, "idx", idx);
+--- 5922,5928 ----
+ qf_getprop_idx(qf_info_T *qi, int qf_idx, dict_T *retdict)
+ {
+ int idx = qi->qf_lists[qf_idx].qf_index;
+! if (qf_list_empty(qi, qf_idx))
+ /* For empty lists, qf_index is set to 1 */
+ idx = 0;
+ return dict_add_number(retdict, "idx", idx);
+***************
+*** 5798,5804 ****
+ qf_new_list(qi, title);
+ qf_idx = qi->qf_curlist;
+ }
+! else if (action == 'a' && qi->qf_lists[qf_idx].qf_count > 0)
+ /* Adding to existing list, use last entry. */
+ old_last = qi->qf_lists[qf_idx].qf_last;
+ else if (action == 'r')
+--- 6011,6017 ----
+ qf_new_list(qi, title);
+ qf_idx = qi->qf_curlist;
+ }
+! else if (action == 'a' && !qf_list_empty(qi, qf_idx))
+ /* Adding to existing list, use last entry. */
+ old_last = qi->qf_lists[qf_idx].qf_last;
+ else if (action == 'r')
+***************
+*** 5887,5893 ****
+ {
+ qi->qf_lists[qf_idx].qf_ptr =
+ qi->qf_lists[qf_idx].qf_start;
+! if (qi->qf_lists[qf_idx].qf_count > 0)
+ qi->qf_lists[qf_idx].qf_index = 1;
+ }
+
+--- 6100,6106 ----
+ {
+ qi->qf_lists[qf_idx].qf_ptr =
+ qi->qf_lists[qf_idx].qf_start;
+! if (!qf_list_empty(qi, qf_idx))
+ qi->qf_lists[qf_idx].qf_index = 1;
+ }
+
+***************
+*** 6746,6752 ****
+ }
+
+ /* Jump to first match. */
+! if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
+ qf_jump(qi, 0, 0, FALSE);
+ else
+ EMSG2(_(e_nomatch2), eap->arg);
+--- 6959,6965 ----
+ }
+
+ /* Jump to first match. */
+! if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, FALSE);
+ else
+ EMSG2(_(e_nomatch2), eap->arg);
+*** ../vim-8.1.0251/src/version.c 2018-08-07 21:39:09.251060096 +0200
+--- src/version.c 2018-08-07 21:43:08.981711510 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 252,
+ /**/
+
+--
+Q: How do you tell the difference between a female cat and a male cat?
+A: You ask it a question and if HE answers, it's a male but, if SHE
+ answers, it's a female.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0253 b/data/vim/patches/8.1.0253
new file mode 100644
index 000000000..a77bf4f89
--- /dev/null
+++ b/data/vim/patches/8.1.0253
@@ -0,0 +1,475 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0253
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0253
+Problem: Saving and restoring window title does not always work.
+Solution: Use the stack push and pop commands. (Kouichi Iwamoto,
+ closes #3059)
+Files: runtime/doc/term.txt, src/main.c, src/option.c, src/os_unix.c,
+ src/proto/term.pro, src/term.c, src/term.h, src/vim.h,
+ src/buffer.c, src/ex_docmd.c, src/os_amiga.c,
+ src/os_mswin.c, src/os_win32.c
+
+*** ../vim-8.1.0252/runtime/doc/term.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/term.txt 2018-08-07 22:02:48.947042241 +0200
+***************
+*** 342,347 ****
+--- 352,361 ----
+ t_SH set cursor shape *t_SH* *'t_SH'*
+ t_RC request terminal cursor blinking *t_RC* *'t_RC'*
+ t_RS request terminal cursor style *t_RS* *'t_RS'*
++ t_ST save window title to stack *t_ST* *'t_ST'*
++ t_RT restore window title from stack *t_RT* *'t_RT'*
++ t_Si save icon text to stack *t_Si* *'t_Si'*
++ t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
+
+ Some codes have a start, middle and end part. The start and end are defined
+ by the termcap option, the middle part is text.
+*** ../vim-8.1.0252/src/main.c 2018-07-29 17:35:19.497750288 +0200
+--- src/main.c 2018-08-07 22:11:50.444370658 +0200
+***************
+*** 706,711 ****
+--- 706,715 ----
+ scroll_region_reset(); /* In case Rows changed */
+ scroll_start(); /* may scroll the screen to the right position */
+
++ #ifdef FEAT_TITLE
++ term_push_title(SAVE_RESTORE_BOTH);
++ #endif
++
+ /*
+ * Don't clear the screen when starting in Ex mode, unless using the GUI.
+ */
+*** ../vim-8.1.0252/src/option.c 2018-07-23 04:11:37.652969757 +0200
+--- src/option.c 2018-08-07 22:26:59.391401674 +0200
+***************
+*** 3192,3198 ****
+--- 3192,3200 ----
+ p_term("t_RB", T_RBG)
+ p_term("t_RC", T_CRC)
+ p_term("t_RI", T_CRI)
++ p_term("t_Ri", T_SRI)
+ p_term("t_RS", T_CRS)
++ p_term("t_RT", T_CRT)
+ p_term("t_RV", T_CRV)
+ p_term("t_Sb", T_CSB)
+ p_term("t_SC", T_CSC)
+***************
+*** 3200,3208 ****
+--- 3202,3212 ----
+ p_term("t_Sf", T_CSF)
+ p_term("t_SH", T_CSH)
+ p_term("t_SI", T_CSI)
++ p_term("t_Si", T_SSI)
+ p_term("t_so", T_SO)
+ p_term("t_SR", T_CSR)
+ p_term("t_sr", T_SR)
++ p_term("t_ST", T_CST)
+ p_term("t_Te", T_STE)
+ p_term("t_te", T_TE)
+ p_term("t_ti", T_TI)
+***************
+*** 10414,10420 ****
+ mch_setmouse(FALSE); /* switch mouse off */
+ #endif
+ #ifdef FEAT_TITLE
+! mch_restore_title(3); /* restore window titles */
+ #endif
+ #if defined(FEAT_XCLIPBOARD) && defined(FEAT_GUI)
+ /* When starting the GUI close the display opened for the clipboard.
+--- 10418,10424 ----
+ mch_setmouse(FALSE); /* switch mouse off */
+ #endif
+ #ifdef FEAT_TITLE
+! mch_restore_title(SAVE_RESTORE_BOTH); /* restore window titles */
+ #endif
+ #if defined(FEAT_XCLIPBOARD) && defined(FEAT_GUI)
+ /* When starting the GUI close the display opened for the clipboard.
+***************
+*** 11219,11226 ****
+ buf->b_p_isk = NULL;
+ }
+ /*
+! * Always free the allocated strings.
+! * If not already initialized, set 'readonly' and copy 'fileformat'.
+ */
+ if (!buf->b_p_initialized)
+ {
+--- 11223,11230 ----
+ buf->b_p_isk = NULL;
+ }
+ /*
+! * Always free the allocated strings. If not already initialized,
+! * reset 'readonly' and copy 'fileformat'.
+ */
+ if (!buf->b_p_initialized)
+ {
+*** ../vim-8.1.0252/src/os_unix.c 2018-08-07 17:38:36.991674646 +0200
+--- src/os_unix.c 2018-08-07 22:15:19.147259744 +0200
+***************
+*** 2336,2352 ****
+ /*
+ * Restore the window/icon title.
+ * "which" is one of:
+! * 1 only restore title
+! * 2 only restore icon
+! * 3 restore title and icon
+ */
+ void
+ mch_restore_title(int which)
+ {
+ /* only restore the title or icon when it has been set */
+! mch_settitle(((which & 1) && did_set_title) ?
+ (oldtitle ? oldtitle : p_titleold) : NULL,
+! ((which & 2) && did_set_icon) ? oldicon : NULL);
+ }
+
+ #endif /* FEAT_TITLE */
+--- 2336,2356 ----
+ /*
+ * Restore the window/icon title.
+ * "which" is one of:
+! * SAVE_RESTORE_TITLE only restore title
+! * SAVE_RESTORE_ICON only restore icon
+! * SAVE_RESTORE_BOTH restore title and icon
+ */
+ void
+ mch_restore_title(int which)
+ {
+ /* only restore the title or icon when it has been set */
+! mch_settitle(((which & SAVE_RESTORE_TITLE) && did_set_title) ?
+ (oldtitle ? oldtitle : p_titleold) : NULL,
+! ((which & SAVE_RESTORE_ICON) && did_set_icon) ? oldicon : NULL);
+!
+! // pop and push from/to the stack
+! term_pop_title(which);
+! term_push_title(which);
+ }
+
+ #endif /* FEAT_TITLE */
+***************
+*** 3412,3418 ****
+ {
+ settmode(TMODE_COOK);
+ #ifdef FEAT_TITLE
+! mch_restore_title(3); /* restore xterm title and icon name */
+ #endif
+ /*
+ * When t_ti is not empty but it doesn't cause swapping terminal
+--- 3416,3424 ----
+ {
+ settmode(TMODE_COOK);
+ #ifdef FEAT_TITLE
+! // restore xterm title and icon name
+! mch_restore_title(SAVE_RESTORE_BOTH);
+! term_pop_title(SAVE_RESTORE_BOTH);
+ #endif
+ /*
+ * When t_ti is not empty but it doesn't cause swapping terminal
+*** ../vim-8.1.0252/src/proto/term.pro 2018-08-07 17:38:36.995674625 +0200
+--- src/proto/term.pro 2018-08-07 22:14:11.971620330 +0200
+***************
+*** 31,36 ****
+--- 31,38 ----
+ void term_fg_rgb_color(guicolor_T rgb);
+ void term_bg_rgb_color(guicolor_T rgb);
+ void term_settitle(char_u *title);
++ void term_push_title(int which);
++ void term_pop_title(int which);
+ void ttest(int pairs);
+ void add_long_to_buf(long_u val, char_u *dst);
+ void check_shellsize(void);
+*** ../vim-8.1.0252/src/term.c 2018-08-07 17:38:36.995674625 +0200
+--- src/term.c 2018-08-07 22:13:41.603782475 +0200
+***************
+*** 922,927 ****
+--- 922,931 ----
+ # endif
+ {(int)KS_CBE, IF_EB("\033[?2004h", ESC_STR "[?2004h")},
+ {(int)KS_CBD, IF_EB("\033[?2004l", ESC_STR "[?2004l")},
++ {(int)KS_CST, IF_EB("\033[22;2t", ESC_STR "[22;2t")},
++ {(int)KS_CRT, IF_EB("\033[23;2t", ESC_STR "[23;2t")},
++ {(int)KS_SSI, IF_EB("\033[22;1t", ESC_STR "[22;1t")},
++ {(int)KS_SRI, IF_EB("\033[23;1t", ESC_STR "[23;1t")},
+
+ {K_UP, IF_EB("\033O*A", ESC_STR "O*A")},
+ {K_DOWN, IF_EB("\033O*B", ESC_STR "O*B")},
+***************
+*** 1600,1605 ****
+--- 1604,1611 ----
+ {KS_8F, "8f"}, {KS_8B, "8b"},
+ {KS_CBE, "BE"}, {KS_CBD, "BD"},
+ {KS_CPS, "PS"}, {KS_CPE, "PE"},
++ {KS_CST, "ST"}, {KS_CRT, "RT"},
++ {KS_SSI, "Si"}, {KS_SRI, "Ri"},
+ {(enum SpecialKey)0, NULL}
+ };
+ int i;
+***************
+*** 2974,2979 ****
+--- 2980,3024 ----
+ out_str(T_FS); /* set title end */
+ out_flush();
+ }
++
++ /*
++ * Tell the terminal to push (save) the title and/or icon, so that it can be
++ * popped (restored) later.
++ */
++ void
++ term_push_title(int which)
++ {
++ if ((which & SAVE_RESTORE_TITLE) && *T_CST != NUL)
++ {
++ OUT_STR(T_CST);
++ out_flush();
++ }
++
++ if ((which & SAVE_RESTORE_ICON) && *T_SSI != NUL)
++ {
++ OUT_STR(T_SSI);
++ out_flush();
++ }
++ }
++
++ /*
++ * Tell the terminal to pop the title and/or icon.
++ */
++ void
++ term_pop_title(int which)
++ {
++ if ((which & SAVE_RESTORE_TITLE) && *T_CRT != NUL)
++ {
++ OUT_STR(T_CRT);
++ out_flush();
++ }
++
++ if ((which & SAVE_RESTORE_ICON) && *T_SRI != NUL)
++ {
++ OUT_STR(T_SRI);
++ out_flush();
++ }
++ }
+ #endif
+
+ /*
+*** ../vim-8.1.0252/src/term.h 2017-10-14 22:14:45.000000000 +0200
+--- src/term.h 2018-08-07 22:02:48.951042224 +0200
+***************
+*** 101,110 ****
+ KS_CBE, /* enable bracketed paste mode */
+ KS_CBD, /* disable bracketed paste mode */
+ KS_CPS, /* start of bracketed paste */
+! KS_CPE /* end of bracketed paste */
+ };
+
+! #define KS_LAST KS_CPE
+
+ /*
+ * the terminal capabilities are stored in this array
+--- 101,114 ----
+ KS_CBE, /* enable bracketed paste mode */
+ KS_CBD, /* disable bracketed paste mode */
+ KS_CPS, /* start of bracketed paste */
+! KS_CPE, /* end of bracketed paste */
+! KS_CST, /* save window title */
+! KS_CRT, /* restore window title */
+! KS_SSI, /* save icon text */
+! KS_SRI /* restore icon text */
+ };
+
+! #define KS_LAST KS_SRI
+
+ /*
+ * the terminal capabilities are stored in this array
+***************
+*** 196,201 ****
+--- 200,209 ----
+ #define T_BD (TERM_STR(KS_CBD)) /* disable bracketed paste mode */
+ #define T_PS (TERM_STR(KS_CPS)) /* start of bracketed paste */
+ #define T_PE (TERM_STR(KS_CPE)) /* end of bracketed paste */
++ #define T_CST (TERM_STR(KS_CST)) /* save window title */
++ #define T_CRT (TERM_STR(KS_CRT)) /* restore window title */
++ #define T_SSI (TERM_STR(KS_SSI)) /* save icon text */
++ #define T_SRI (TERM_STR(KS_SRI)) /* restore icon text */
+
+ #define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */
+ #define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */
+*** ../vim-8.1.0252/src/vim.h 2018-07-29 16:09:14.644945560 +0200
+--- src/vim.h 2018-08-07 22:14:06.727648372 +0200
+***************
+*** 2548,2551 ****
+--- 2548,2563 ----
+ #define TERM_START_FORCEIT 2
+ #define TERM_START_SYSTEM 4
+
++ #if defined(HAVE_DROP_FILE) \
++ || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \
++ || defined(FEAT_GUI_MSWIN) \
++ || defined(FEAT_GUI_MAC)
++ # define HAVE_HANDLE_DROP
++ #endif
++
++ // Used for icon/title save and restore.
++ #define SAVE_RESTORE_TITLE 1
++ #define SAVE_RESTORE_ICON 2
++ #define SAVE_RESTORE_BOTH (SAVE_RESTORE_TITLE | SAVE_RESTORE_ICON)
++
+ #endif /* VIM__H */
+*** ../vim-8.1.0252/src/buffer.c 2018-08-05 13:22:22.474562651 +0200
+--- src/buffer.c 2018-08-07 22:15:46.499112220 +0200
+***************
+*** 3798,3804 ****
+ if (str == NULL)
+ {
+ *last = NULL;
+! mch_restore_title(last == &lasttitle ? 1 : 2);
+ }
+ else
+ {
+--- 3798,3805 ----
+ if (str == NULL)
+ {
+ *last = NULL;
+! mch_restore_title(
+! last == &lasttitle ? SAVE_RESTORE_TITLE : SAVE_RESTORE_ICON);
+ }
+ else
+ {
+*** ../vim-8.1.0252/src/ex_docmd.c 2018-08-01 17:53:04.689381294 +0200
+--- src/ex_docmd.c 2018-08-07 22:16:05.727008287 +0200
+***************
+*** 7750,7756 ****
+ stoptermcap();
+ out_flush(); /* needed for SUN to restore xterm buffer */
+ #ifdef FEAT_TITLE
+! mch_restore_title(3); /* restore window titles */
+ #endif
+ ui_suspend(); /* call machine specific function */
+ #ifdef FEAT_TITLE
+--- 7750,7756 ----
+ stoptermcap();
+ out_flush(); /* needed for SUN to restore xterm buffer */
+ #ifdef FEAT_TITLE
+! mch_restore_title(SAVE_RESTORE_BOTH); /* restore window titles */
+ #endif
+ ui_suspend(); /* call machine specific function */
+ #ifdef FEAT_TITLE
+*** ../vim-8.1.0252/src/os_amiga.c 2018-03-04 16:16:34.000000000 +0100
+--- src/os_amiga.c 2018-08-07 22:17:36.474515466 +0200
+***************
+*** 617,630 ****
+ /*
+ * Restore the window/icon title.
+ * which is one of:
+! * 1 Just restore title
+! * 2 Just restore icon (which we don't have)
+! * 3 Restore title and icon (which we don't have)
+ */
+ void
+ mch_restore_title(int which)
+ {
+! if (which & 1)
+ mch_settitle(oldwindowtitle, NULL);
+ }
+
+--- 617,630 ----
+ /*
+ * Restore the window/icon title.
+ * which is one of:
+! * SAVE_RESTORE_TITLE Just restore title
+! * SAVE_RESTORE_ICON Just restore icon (which we don't have)
+! * SAVE_RESTORE_BOTH Restore title and icon (which we don't have)
+ */
+ void
+ mch_restore_title(int which)
+ {
+! if (which & SAVE_RESTORE_TITLE)
+ mch_settitle(oldwindowtitle, NULL);
+ }
+
+***************
+*** 907,913 ****
+ }
+
+ #ifdef FEAT_TITLE
+! mch_restore_title(3); /* restore window title */
+ #endif
+
+ ml_close_all(TRUE); /* remove all memfiles */
+--- 907,913 ----
+ }
+
+ #ifdef FEAT_TITLE
+! mch_restore_title(SAVE_RESTORE_BOTH); /* restore window title */
+ #endif
+
+ ml_close_all(TRUE); /* remove all memfiles */
+*** ../vim-8.1.0252/src/os_mswin.c 2018-05-13 17:28:51.000000000 +0200
+--- src/os_mswin.c 2018-08-07 22:18:09.022337873 +0200
+***************
+*** 304,312 ****
+ /*
+ * Restore the window/icon title.
+ * which is one of:
+! * 1: Just restore title
+! * 2: Just restore icon (which we don't have)
+! * 3: Restore title and icon (which we don't have)
+ */
+ void
+ mch_restore_title(int which UNUSED)
+--- 304,312 ----
+ /*
+ * Restore the window/icon title.
+ * which is one of:
+! * SAVE_RESTORE_TITLE: Just restore title
+! * SAVE_RESTORE_ICON: Just restore icon (which we don't have)
+! * SAVE_RESTORE_BOTH: Restore title and icon (which we don't have)
+ */
+ void
+ mch_restore_title(int which UNUSED)
+*** ../vim-8.1.0252/src/os_win32.c 2018-08-07 20:47:02.756848221 +0200
+--- src/os_win32.c 2018-08-07 22:18:29.258227246 +0200
+***************
+*** 2695,2701 ****
+ if (g_fWindInitCalled)
+ {
+ #ifdef FEAT_TITLE
+! mch_restore_title(3);
+ /*
+ * Restore both the small and big icons of the console window to
+ * what they were at startup. Don't do this when the window is
+--- 2695,2701 ----
+ if (g_fWindInitCalled)
+ {
+ #ifdef FEAT_TITLE
+! mch_restore_title(SAVE_RESTORE_BOTH);
+ /*
+ * Restore both the small and big icons of the console window to
+ * what they were at startup. Don't do this when the window is
+*** ../vim-8.1.0252/src/version.c 2018-08-07 21:54:27.725813349 +0200
+--- src/version.c 2018-08-07 22:04:25.166600764 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 253,
+ /**/
+
+--
+ [Autumn changed into Winter ... Winter changed into Spring ... Spring
+ changed back into Autumn and Autumn gave Winter and Spring a miss and
+ went straight on into Summer ... Until one day ...]
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0254 b/data/vim/patches/8.1.0254
new file mode 100644
index 000000000..6be43ae0e
--- /dev/null
+++ b/data/vim/patches/8.1.0254
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0254
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0254 (after 8.1.0253)
+Problem: Cannot build on MS-Windows; Unused macro HAVE_HANDLE_DROP.
+Solution: Adjust #ifdef. Delete the macro.
+Files: src/main.c, src/vim.h
+
+
+*** ../vim-8.1.0253/src/main.c 2018-08-07 22:30:26.662240885 +0200
+--- src/main.c 2018-08-07 22:41:19.402019109 +0200
+***************
+*** 706,712 ****
+ scroll_region_reset(); /* In case Rows changed */
+ scroll_start(); /* may scroll the screen to the right position */
+
+! #ifdef FEAT_TITLE
+ term_push_title(SAVE_RESTORE_BOTH);
+ #endif
+
+--- 706,712 ----
+ scroll_region_reset(); /* In case Rows changed */
+ scroll_start(); /* may scroll the screen to the right position */
+
+! #if defined(FEAT_TITLE) && (defined(UNIX) || defined(VMS) || defined(MACOS_X))
+ term_push_title(SAVE_RESTORE_BOTH);
+ #endif
+
+*** ../vim-8.1.0253/src/vim.h 2018-08-07 22:30:26.666240863 +0200
+--- src/vim.h 2018-08-07 22:37:17.179721167 +0200
+***************
+*** 2548,2560 ****
+ #define TERM_START_FORCEIT 2
+ #define TERM_START_SYSTEM 4
+
+- #if defined(HAVE_DROP_FILE) \
+- || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \
+- || defined(FEAT_GUI_MSWIN) \
+- || defined(FEAT_GUI_MAC)
+- # define HAVE_HANDLE_DROP
+- #endif
+-
+ // Used for icon/title save and restore.
+ #define SAVE_RESTORE_TITLE 1
+ #define SAVE_RESTORE_ICON 2
+--- 2548,2553 ----
+*** ../vim-8.1.0253/src/version.c 2018-08-07 22:30:26.674240818 +0200
+--- src/version.c 2018-08-07 22:38:21.219258973 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 254,
+ /**/
+
+--
+TIM: To the north there lies a cave, the cave of Caerbannog, wherein, carved
+ in mystic runes, upon the very living rock, the last words of Olfin
+ Bedwere of Rheged make plain the last resting place of the most Holy
+ Grail.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0255 b/data/vim/patches/8.1.0255
new file mode 100644
index 000000000..a4ce7f3c2
--- /dev/null
+++ b/data/vim/patches/8.1.0255
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0255
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0255 (after 8.1.0251)
+Problem: Backup test fails when using shadow directory.
+Solution: Remove check for "src".
+Files: src/testdir/test_backup.vim
+
+
+*** ../vim-8.1.0254/src/testdir/test_backup.vim 2018-08-07 21:39:09.251060096 +0200
+--- src/testdir/test_backup.vim 2018-08-08 11:00:33.345896867 +0200
+***************
+*** 29,35 ****
+ sp *Xbackup.txt~
+ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
+ let f=expand('%')
+! call assert_match('src%testdir%Xbackup.txt\~', f)
+ bw!
+ bw!
+ call delete('Xbackup.txt')
+--- 29,35 ----
+ sp *Xbackup.txt~
+ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
+ let f=expand('%')
+! call assert_match('%testdir%Xbackup.txt\~', f)
+ bw!
+ bw!
+ call delete('Xbackup.txt')
+***************
+*** 49,55 ****
+ sp *Xbackup.txt~
+ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
+ let f=expand('%')
+! call assert_match('src%testdir%Xbackup.txt\~', f)
+ bw!
+ bw!
+ call delete('Xbackup.txt')
+--- 49,55 ----
+ sp *Xbackup.txt~
+ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$'))
+ let f=expand('%')
+! call assert_match('%testdir%Xbackup.txt\~', f)
+ bw!
+ bw!
+ call delete('Xbackup.txt')
+*** ../vim-8.1.0254/src/version.c 2018-08-07 22:42:48.965416564 +0200
+--- src/version.c 2018-08-08 11:01:24.270573213 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 255,
+ /**/
+
+--
+TIM: Too late.
+ARTHUR: What?
+TIM: There he is!
+ [They all turn, and see a large white RABBIT lollop a few yards out of the
+ cave. Accompanied by terrifying chord and jarring metallic monster noise.]
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0256 b/data/vim/patches/8.1.0256
new file mode 100644
index 000000000..55d8eef40
--- /dev/null
+++ b/data/vim/patches/8.1.0256
@@ -0,0 +1,286 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0256
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0256 (after 8.1.0245)
+Problem: Using setline() in TextChangedI splits undo.
+Solution: Use another solution for undo not working properly.
+Files: src/edit.c, src/testdir/test_autocmd.vim
+
+
+*** ../vim-8.1.0255/src/edit.c 2018-08-07 19:32:48.371651690 +0200
+--- src/edit.c 2018-08-08 22:07:51.235091964 +0200
+***************
+*** 279,284 ****
+--- 279,285 ----
+ #if defined(FEAT_EVAL)
+ static char_u *do_insert_char_pre(int c);
+ #endif
++ static int ins_apply_autocmds(event_T event);
+
+ static colnr_T Insstart_textlen; /* length of line when insert started */
+ static colnr_T Insstart_blank_vcol; /* vcol for first inserted blank */
+***************
+*** 411,417 ****
+ set_vim_var_string(VV_INSERTMODE, ptr, 1);
+ set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */
+ #endif
+! apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
+
+ /* Make sure the cursor didn't move. Do call check_cursor_col() in
+ * case the text was modified. Since Insert mode was not started yet
+--- 412,418 ----
+ set_vim_var_string(VV_INSERTMODE, ptr, 1);
+ set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */
+ #endif
+! ins_apply_autocmds(EVENT_INSERTENTER);
+
+ /* Make sure the cursor didn't move. Do call check_cursor_col() in
+ * case the text was modified. Since Insert mode was not started yet
+***************
+*** 1061,1068 ****
+ if (ins_esc(&count, cmdchar, nomove))
+ {
+ if (cmdchar != 'r' && cmdchar != 'v')
+! apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL,
+! FALSE, curbuf);
+ did_cursorhold = FALSE;
+ return (c == Ctrl_O);
+ }
+--- 1062,1068 ----
+ if (ins_esc(&count, cmdchar, nomove))
+ {
+ if (cmdchar != 'r' && cmdchar != 'v')
+! ins_apply_autocmds(EVENT_INSERTLEAVE);
+ did_cursorhold = FALSE;
+ return (c == Ctrl_O);
+ }
+***************
+*** 1275,1281 ****
+ break;
+
+ case K_CURSORHOLD: /* Didn't type something for a while. */
+! apply_autocmds(EVENT_CURSORHOLDI, NULL, NULL, FALSE, curbuf);
+ did_cursorhold = TRUE;
+ break;
+
+--- 1275,1281 ----
+ break;
+
+ case K_CURSORHOLD: /* Didn't type something for a while. */
+! ins_apply_autocmds(EVENT_CURSORHOLDI);
+ did_cursorhold = TRUE;
+ break;
+
+***************
+*** 1698,1704 ****
+ /* Make sure curswant is correct, an autocommand may call
+ * getcurpos(). */
+ update_curswant();
+! apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+ }
+ # ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0)
+--- 1698,1704 ----
+ /* Make sure curswant is correct, an autocommand may call
+ * getcurpos(). */
+ update_curswant();
+! ins_apply_autocmds(EVENT_CURSORMOVEDI);
+ }
+ # ifdef FEAT_CONCEAL
+ if (curwin->w_p_cole > 0)
+***************
+*** 1721,1744 ****
+ )
+ {
+ aco_save_T aco;
+!
+! #ifdef FEAT_EVAL
+! // Sync undo when the autocommand calls setline() or append(), so that
+! // it can be undone separately.
+! u_sync_once = 2;
+! #endif
+
+ // save and restore curwin and curbuf, in case the autocmd changes them
+ aucmd_prepbuf(&aco, curbuf);
+ apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
+ aucmd_restbuf(&aco);
+ curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
+!
+! #ifdef FEAT_EVAL
+! if (u_sync_once == 1)
+! ins_need_undo = TRUE;
+! u_sync_once = 0;
+! #endif
+ }
+
+ #ifdef FEAT_INS_EXPAND
+--- 1721,1736 ----
+ )
+ {
+ aco_save_T aco;
+! varnumber_T tick = CHANGEDTICK(curbuf);
+
+ // save and restore curwin and curbuf, in case the autocmd changes them
+ aucmd_prepbuf(&aco, curbuf);
+ apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
+ aucmd_restbuf(&aco);
+ curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
+! if (tick != CHANGEDTICK(curbuf)) // see ins_apply_autocmds()
+! u_save(curwin->w_cursor.lnum,
+! (linenr_T)(curwin->w_cursor.lnum + 1));
+ }
+
+ #ifdef FEAT_INS_EXPAND
+***************
+*** 1750,1761 ****
+--- 1742,1757 ----
+ && pum_visible())
+ {
+ aco_save_T aco;
++ varnumber_T tick = CHANGEDTICK(curbuf);
+
+ // save and restore curwin and curbuf, in case the autocmd changes them
+ aucmd_prepbuf(&aco, curbuf);
+ apply_autocmds(EVENT_TEXTCHANGEDP, NULL, NULL, FALSE, curbuf);
+ aucmd_restbuf(&aco);
+ curbuf->b_last_changedtick_pum = CHANGEDTICK(curbuf);
++ if (tick != CHANGEDTICK(curbuf)) // see ins_apply_autocmds()
++ u_save(curwin->w_cursor.lnum,
++ (linenr_T)(curwin->w_cursor.lnum + 1));
+ }
+ #endif
+
+***************
+*** 4124,4136 ****
+ #endif
+ /* Trigger the CompleteDone event to give scripts a chance to act
+ * upon the completion. */
+! apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
+ }
+ }
+ else if (ctrl_x_mode == CTRL_X_LOCAL_MSG)
+ /* Trigger the CompleteDone event to give scripts a chance to act
+ * upon the (possibly failed) completion. */
+! apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
+
+ /* reset continue_* if we left expansion-mode, if we stay they'll be
+ * (re)set properly in ins_complete() */
+--- 4120,4132 ----
+ #endif
+ /* Trigger the CompleteDone event to give scripts a chance to act
+ * upon the completion. */
+! ins_apply_autocmds(EVENT_COMPLETEDONE);
+ }
+ }
+ else if (ctrl_x_mode == CTRL_X_LOCAL_MSG)
+ /* Trigger the CompleteDone event to give scripts a chance to act
+ * upon the (possibly failed) completion. */
+! ins_apply_autocmds(EVENT_COMPLETEDONE);
+
+ /* reset continue_* if we left expansion-mode, if we stay they'll be
+ * (re)set properly in ins_complete() */
+***************
+*** 8944,8950 ****
+ : replaceState == VREPLACE ? "v"
+ : "r"), 1);
+ # endif
+! apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf);
+ if (State & REPLACE_FLAG)
+ State = INSERT | (State & LANGMAP);
+ else
+--- 8940,8946 ----
+ : replaceState == VREPLACE ? "v"
+ : "r"), 1);
+ # endif
+! ins_apply_autocmds(EVENT_INSERTCHANGE);
+ if (State & REPLACE_FLAG)
+ State = INSERT | (State & LANGMAP);
+ else
+***************
+*** 10738,10744 ****
+ set_vim_var_string(VV_CHAR, buf, -1); /* set v:char */
+
+ res = NULL;
+! if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, FALSE, curbuf))
+ {
+ /* Get the value of v:char. It may be empty or more than one
+ * character. Only use it when changed, otherwise continue with the
+--- 10734,10740 ----
+ set_vim_var_string(VV_CHAR, buf, -1); /* set v:char */
+
+ res = NULL;
+! if (ins_apply_autocmds(EVENT_INSERTCHARPRE))
+ {
+ /* Get the value of v:char. It may be empty or more than one
+ * character. Only use it when changed, otherwise continue with the
+***************
+*** 10753,10755 ****
+--- 10749,10770 ----
+ return res;
+ }
+ #endif
++
++ /*
++ * Trigger "event" and take care of fixing undo.
++ */
++ static int
++ ins_apply_autocmds(event_T event)
++ {
++ varnumber_T tick = CHANGEDTICK(curbuf);
++ int r;
++
++ r = apply_autocmds(event, NULL, NULL, FALSE, curbuf);
++
++ // If u_savesub() was called then we are not prepared to start
++ // a new line. Call u_save() with no contents to fix that.
++ if (tick != CHANGEDTICK(curbuf))
++ u_save(curwin->w_cursor.lnum, (linenr_T)(curwin->w_cursor.lnum + 1));
++
++ return r;
++ }
+*** ../vim-8.1.0255/src/testdir/test_autocmd.vim 2018-08-07 19:04:57.409627129 +0200
+--- src/testdir/test_autocmd.vim 2018-08-08 21:43:44.368570016 +0200
+***************
+*** 1329,1338 ****
+ call assert_equal('(', getline(1))
+ call assert_equal('x)', getline(2))
+ undo
+- call assert_equal('(', getline(1))
+- call assert_equal('', getline(2))
+- undo
+ call assert_equal('', getline(1))
+
+ call test_override('starting', 0)
+ bwipe!
+--- 1329,1336 ----
+ call assert_equal('(', getline(1))
+ call assert_equal('x)', getline(2))
+ undo
+ call assert_equal('', getline(1))
++ call assert_equal('', getline(2))
+
+ call test_override('starting', 0)
+ bwipe!
+*** ../vim-8.1.0255/src/version.c 2018-08-08 11:02:26.855415573 +0200
+--- src/version.c 2018-08-08 21:43:06.112860972 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 256,
+ /**/
+
+--
+If "R" is Reverse, how come "D" is FORWARD?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0257 b/data/vim/patches/8.1.0257
new file mode 100644
index 000000000..17f3de197
--- /dev/null
+++ b/data/vim/patches/8.1.0257
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0257
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0257
+Problem: No test for pathshorten().
+Solution: Add a test. (Dominique Pelle, closes #3295)
+Files: src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0256/src/testdir/test_functions.vim 2018-07-29 15:34:20.868300075 +0200
+--- src/testdir/test_functions.vim 2018-08-08 22:26:53.791238105 +0200
+***************
+*** 208,213 ****
+--- 208,228 ----
+ call assert_fails('call simplify(1.2)', 'E806:')
+ endfunc
+
++ func Test_pathshorten()
++ call assert_equal('', pathshorten(''))
++ call assert_equal('foo', pathshorten('foo'))
++ call assert_equal('/foo', pathshorten('/foo'))
++ call assert_equal('f/', pathshorten('foo/'))
++ call assert_equal('f/bar', pathshorten('foo/bar'))
++ call assert_equal('f/b/foobar', pathshorten('foo/bar/foobar'))
++ call assert_equal('/f/b/foobar', pathshorten('/foo/bar/foobar'))
++ call assert_equal('.f/bar', pathshorten('.foo/bar'))
++ call assert_equal('~f/bar', pathshorten('~foo/bar'))
++ call assert_equal('~.f/bar', pathshorten('~.foo/bar'))
++ call assert_equal('.~f/bar', pathshorten('.~foo/bar'))
++ call assert_equal('~/f/bar', pathshorten('~/foo/bar'))
++ endfunc
++
+ func Test_strpart()
+ call assert_equal('de', strpart('abcdefg', 3, 2))
+ call assert_equal('ab', strpart('abcdefg', -2, 4))
+*** ../vim-8.1.0256/src/version.c 2018-08-08 22:08:28.326846653 +0200
+--- src/version.c 2018-08-08 22:24:55.740064770 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 257,
+ /**/
+
+--
+Why isn't there mouse-flavored cat food?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0258 b/data/vim/patches/8.1.0258
new file mode 100644
index 000000000..b1b1e4c70
--- /dev/null
+++ b/data/vim/patches/8.1.0258
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0258
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0258
+Problem: Not enough testing for the CompleteDone event.
+Solution: Add a test. (closes #3297)
+Files: src/testdir/test_ins_complete.vim
+
+
+*** ../vim-8.1.0257/src/testdir/test_ins_complete.vim 2018-06-13 21:27:20.213366293 +0200
+--- src/testdir/test_ins_complete.vim 2018-08-08 22:48:57.633314237 +0200
+***************
+*** 262,267 ****
+--- 262,280 ----
+ au! CompleteDone
+ endfunc
+
++ func Test_CompleteDone_undo()
++ au CompleteDone * call append(0, "prepend1")
++ new
++ call setline(1, ["line1", "line2"])
++ call feedkeys("Go\<C-X>\<C-N>\<CR>\<ESC>", "tx")
++ call assert_equal(["prepend1", "line1", "line2", "line1", ""],
++ \ getline(1, '$'))
++ undo
++ call assert_equal(["line1", "line2"], getline(1, '$'))
++ bwipe!
++ au! CompleteDone
++ endfunc
++
+ " Check that when using feedkeys() typeahead does not interrupt searching for
+ " completions.
+ func Test_compl_feedkeys()
+*** ../vim-8.1.0257/src/version.c 2018-08-08 22:27:27.043005000 +0200
+--- src/version.c 2018-08-08 22:53:55.883157583 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 258,
+ /**/
+
+--
+If cars evolved at the same rate as computers have, they'd cost five euro,
+run for a year on a couple of liters of petrol, and explode once a day.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0259 b/data/vim/patches/8.1.0259
new file mode 100644
index 000000000..32e09e50d
--- /dev/null
+++ b/data/vim/patches/8.1.0259
@@ -0,0 +1,161 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0259
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0259
+Problem: No test for fixed quickfix issue.
+Solution: Add a test. Clean up the code a bit. (Yegappan Lakshmanan)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0258/src/quickfix.c 2018-08-07 21:54:27.725813349 +0200
+--- src/quickfix.c 2018-08-09 21:14:43.248703692 +0200
+***************
+*** 1506,1512 ****
+ return qi->qf_lists[qf_idx].qf_count <= 0;
+ }
+
+-
+ /*
+ * Allocate the fields used for parsing lines and populating a quickfix list.
+ */
+--- 1506,1511 ----
+***************
+*** 3717,3723 ****
+ if (IS_LL_WINDOW(curwin))
+ qi = GET_LOC_LIST(curwin);
+
+! if (qi == NULL || qi->qf_lists[qi->qf_curlist].qf_count == 0)
+ {
+ EMSG(_(e_quickfix));
+ return;
+--- 3716,3722 ----
+ if (IS_LL_WINDOW(curwin))
+ qi = GET_LOC_LIST(curwin);
+
+! if (qf_list_empty(qi, qi->qf_curlist))
+ {
+ EMSG(_(e_quickfix));
+ return;
+***************
+*** 4349,4355 ****
+ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+ qi->qf_curlist = qf_id2nr(qi, save_qfid);
+
+! if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
+ qf_jump(qi, 0, 0, forceit);
+ }
+
+--- 4348,4355 ----
+ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+ qi->qf_curlist = qf_id2nr(qi, save_qfid);
+
+! // Autocommands might have cleared the list, check for it
+! if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, forceit);
+ }
+
+***************
+*** 4873,4882 ****
+ // free the list.
+ if (res > 0 && (eap->cmdidx == CMD_cfile || eap->cmdidx == CMD_lfile)
+ && qflist_valid(wp, save_qfid))
+- {
+ // display the first error
+ qf_jump_first(qi, save_qfid, eap->forceit);
+- }
+ }
+
+ /*
+--- 4873,4880 ----
+***************
+*** 6581,6590 ****
+ if (res > 0 && (eap->cmdidx == CMD_cbuffer ||
+ eap->cmdidx == CMD_lbuffer)
+ && qflist_valid(wp, save_qfid))
+- {
+ // display the first error
+ qf_jump_first(qi, save_qfid, eap->forceit);
+- }
+ }
+ }
+ }
+--- 6579,6586 ----
+***************
+*** 6661,6670 ****
+ if (res > 0 && (eap->cmdidx == CMD_cexpr
+ || eap->cmdidx == CMD_lexpr)
+ && qflist_valid(wp, save_qfid))
+- {
+ // display the first error
+ qf_jump_first(qi, save_qfid, eap->forceit);
+- }
+ }
+ else
+ EMSG(_("E777: String or List expected"));
+--- 6657,6664 ----
+*** ../vim-8.1.0258/src/testdir/test_quickfix.vim 2018-07-25 22:36:48.991518559 +0200
+--- src/testdir/test_quickfix.vim 2018-08-09 21:14:43.248703692 +0200
+***************
+*** 3478,3483 ****
+--- 3478,3507 ----
+ call assert_equal(5, line('.'))
+ autocmd! QuickFixCmdPost
+
++ " Test for autocommands clearing the quickfix list before jumping to the
++ " first error. This should not result in an error
++ autocmd QuickFixCmdPost * call g:Xsetlist([], 'r')
++ let v:errmsg = ''
++ " Test for cfile/lfile
++ Xfile Xerr
++ call assert_true(v:errmsg !~# 'E42:')
++ " Test for cbuffer/lbuffer
++ edit Xerr
++ Xbuffer
++ call assert_true(v:errmsg !~# 'E42:')
++ " Test for cexpr/lexpr
++ Xexpr 'Xtestfile2:4:Line4'
++ call assert_true(v:errmsg !~# 'E42:')
++ " Test for grep/lgrep
++ " The grepprg may not be set on non-Unix systems
++ if has('unix')
++ silent Xgrep Line5 Xtestfile2
++ call assert_true(v:errmsg !~# 'E42:')
++ endif
++ " Test for vimgrep/lvimgrep
++ call assert_fails('silent Xvimgrep Line5 Xtestfile2', 'E480:')
++ autocmd! QuickFixCmdPost
++
+ call delete('Xerr')
+ call delete('Xtestfile1')
+ call delete('Xtestfile2')
+*** ../vim-8.1.0258/src/version.c 2018-08-08 22:55:38.034420872 +0200
+--- src/version.c 2018-08-09 21:17:42.991183590 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 259,
+ /**/
+
+--
+BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
+ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O
+ Lord bless this thy hand grenade that with it thou mayest
+ blow thine enemies to tiny bits, in thy mercy. "and the Lord
+ did grin and people did feast upon the lambs and sloths and
+ carp and anchovies and orang-utans and breakfast cereals and
+ fruit bats and...
+BROTHER MAYNARD: Skip a bit brother ...
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0260 b/data/vim/patches/8.1.0260
new file mode 100644
index 000000000..6dbc9d1b1
--- /dev/null
+++ b/data/vim/patches/8.1.0260
@@ -0,0 +1,44 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0260
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0260
+Problem: No LGTM logo in README file.
+Solution: Add one. (Bas van Schaik, closes #3305)
+Files: README.md
+
+
+*** ../vim-8.1.0259/README.md 2018-06-18 22:31:07.858573774 +0200
+--- README.md 2018-08-09 21:32:10.016728368 +0200
+***************
+*** 5,10 ****
+--- 5,11 ----
+ [![Coverage Status](https://coveralls.io/repos/vim/vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/vim/vim?branch=master)
+ [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim)
+ [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim)
++ [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp)
+ [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim)
+
+
+*** ../vim-8.1.0259/src/version.c 2018-08-09 21:19:15.778436046 +0200
+--- src/version.c 2018-08-09 21:33:01.336368524 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 260,
+ /**/
+
+--
+I wonder, do vegetarians eat fruit bats?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0261 b/data/vim/patches/8.1.0261
new file mode 100644
index 000000000..161598204
--- /dev/null
+++ b/data/vim/patches/8.1.0261
@@ -0,0 +1,177 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0261
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0261
+Problem: Coverity complains about a negative array index.
+Solution: When qf_id2nr() cannot find the list then don't set qf_curlist.
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0260/src/quickfix.c 2018-08-09 21:19:15.774436077 +0200
+--- src/quickfix.c 2018-08-09 21:49:36.929501416 +0200
+***************
+*** 2011,2023 ****
+ {
+ qf_info_T *qi;
+
+! qi = (qf_info_T *)alloc((unsigned)sizeof(qf_info_T));
+ if (qi != NULL)
+- {
+- vim_memset(qi, 0, (size_t)(sizeof(qf_info_T)));
+ qi->qf_refcount++;
+- }
+-
+ return qi;
+ }
+
+--- 2011,2019 ----
+ {
+ qf_info_T *qi;
+
+! qi = (qf_info_T *)alloc_clear((unsigned)sizeof(qf_info_T));
+ if (qi != NULL)
+ qi->qf_refcount++;
+ return qi;
+ }
+
+***************
+*** 4339,4352 ****
+ }
+
+ /*
+ * Jump to the first entry if there is one.
+ */
+ static void
+ qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit)
+ {
+! // If autocommands changed the current list, then restore it
+! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+! qi->qf_curlist = qf_id2nr(qi, save_qfid);
+
+ // Autocommands might have cleared the list, check for it
+ if (!qf_list_empty(qi, qi->qf_curlist))
+--- 4335,4365 ----
+ }
+
+ /*
++ * If the current list is not "save_qfid" and we can find the list with that ID
++ * then make it the current list.
++ * This is used when autocommands may have changed the current list.
++ */
++ static void
++ qf_restore_list(qf_info_T *qi, int_u save_qfid)
++ {
++ int curlist;
++
++ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
++ {
++ curlist = qf_id2nr(qi, save_qfid);
++ if (curlist >= 0)
++ qi->qf_curlist = curlist;
++ // else: what if the list can't be found?
++ }
++ }
++
++ /*
+ * Jump to the first entry if there is one.
+ */
+ static void
+ qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit)
+ {
+! qf_restore_list(qi, save_qfid);
+
+ // Autocommands might have cleared the list, check for it
+ if (!qf_list_empty(qi, qi->qf_curlist))
+***************
+*** 5012,5021 ****
+ }
+ }
+
+! if (qi->qf_lists[qi->qf_curlist].qf_id != qfid)
+! /* Autocommands changed the quickfix list. Find the one we were
+! * using and restore it. */
+! qi->qf_curlist = qf_id2nr(qi, qfid);
+
+ return TRUE;
+ }
+--- 5025,5031 ----
+ }
+ }
+
+! qf_restore_list(qi, qfid);
+
+ return TRUE;
+ }
+***************
+*** 5361,5369 ****
+ if (!qflist_valid(wp, save_qfid))
+ goto theend;
+
+! // If autocommands changed the current list, then restore it
+! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+! qi->qf_curlist = qf_id2nr(qi, save_qfid);
+
+ /* Jump to first match. */
+ if (!qf_list_empty(qi, qi->qf_curlist))
+--- 5371,5377 ----
+ if (!qflist_valid(wp, save_qfid))
+ goto theend;
+
+! qf_restore_list(qi, save_qfid);
+
+ /* Jump to first match. */
+ if (!qf_list_empty(qi, qi->qf_curlist))
+***************
+*** 5684,5695 ****
+ if (l == NULL)
+ return FAIL;
+
+! qi = (qf_info_T *)alloc((unsigned)sizeof(qf_info_T));
+ if (qi != NULL)
+ {
+- vim_memset(qi, 0, (size_t)(sizeof(qf_info_T)));
+- qi->qf_refcount++;
+-
+ if (qf_init_ext(qi, 0, NULL, NULL, &di->di_tv, errorformat,
+ TRUE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0)
+ {
+--- 5692,5700 ----
+ if (l == NULL)
+ return FAIL;
+
+! qi = ll_new_list();
+ if (qi != NULL)
+ {
+ if (qf_init_ext(qi, 0, NULL, NULL, &di->di_tv, errorformat,
+ TRUE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0)
+ {
+*** ../vim-8.1.0260/src/version.c 2018-08-09 21:33:34.800134541 +0200
+--- src/version.c 2018-08-09 21:50:45.609022776 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 261,
+ /**/
+
+--
+MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
+ then shalt thou count to three, no more, no less. Three shalt be the
+ number thou shalt count, and the number of the counting shalt be three.
+ Four shalt thou not count, neither count thou two, excepting that thou
+ then proceed to three. Five is right out. Once the number three, being
+ the third number, be reached, then lobbest thou thy Holy Hand Grenade of
+ Antioch towards thou foe, who being naughty in my sight, shall snuff it.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0262 b/data/vim/patches/8.1.0262
new file mode 100644
index 000000000..f24c5fffe
--- /dev/null
+++ b/data/vim/patches/8.1.0262
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0262
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0262
+Problem: Not enough testing for getftype().
+Solution: Add a test. (Dominique Pelle, closes #3300)
+Files: src/evalfunc.c, src/testdir/test_stat.vim
+
+
+*** ../vim-8.1.0261/src/evalfunc.c 2018-07-29 16:09:14.632945629 +0200
+--- src/evalfunc.c 2018-08-09 22:00:49.920858612 +0200
+***************
+*** 5111,5117 ****
+ # endif
+ # ifdef S_ISSOCK
+ else if (S_ISSOCK(st.st_mode))
+! t = "fifo";
+ # endif
+ else
+ t = "other";
+--- 5111,5117 ----
+ # endif
+ # ifdef S_ISSOCK
+ else if (S_ISSOCK(st.st_mode))
+! t = "socket";
+ # endif
+ else
+ t = "other";
+*** ../vim-8.1.0261/src/testdir/test_stat.vim 2018-07-07 18:34:08.430551330 +0200
+--- src/testdir/test_stat.vim 2018-08-09 22:00:49.924858584 +0200
+***************
+*** 122,127 ****
+--- 122,162 ----
+ call assert_equal('', getfperm(fname))
+ endfunc
+
++ func Test_getftype()
++ call assert_equal('file', getftype(v:progpath))
++ call assert_equal('dir', getftype('.'))
++
++ if !has('unix')
++ return
++ endif
++
++ silent !ln -s Xfile Xlink
++ call assert_equal('link', getftype('Xlink'))
++ call delete('Xlink')
++
++ if executable('mkfifo')
++ silent !mkfifo Xfifo
++ call assert_equal('fifo', getftype('Xfifo'))
++ call delete('Xfifo')
++ endif
++
++ for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
++ call assert_equal('cdev', getftype(cdevfile))
++ endfor
++
++ for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
++ call assert_equal('bdev', getftype(bdevfile))
++ endfor
++
++ " The /run/ directory typically contains socket files.
++ " If it does not, test won't fail but will not test socket files.
++ for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
++ call assert_equal('socket', getftype(socketfile))
++ endfor
++
++ " TODO: file type 'other' is not tested. How can we test it?
++ endfunc
++
+ func Test_win32_symlink_dir()
+ " On Windows, non-admin users cannot create symlinks.
+ " So we use an existing symlink for this test.
+*** ../vim-8.1.0261/src/version.c 2018-08-09 21:52:20.716362389 +0200
+--- src/version.c 2018-08-09 22:08:41.385639374 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 262,
+ /**/
+
+--
+User: I'm having problems with my text editor.
+Help desk: Which editor are you using?
+User: I don't know, but it's version VI (pronounced: 6).
+Help desk: Oh, then you should upgrade to version VIM (pronounced: 994).
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0263 b/data/vim/patches/8.1.0263
new file mode 100644
index 000000000..0fd56af88
--- /dev/null
+++ b/data/vim/patches/8.1.0263
@@ -0,0 +1,142 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0263
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0263
+Problem: Channel log doesn't show part of channel.
+Solution: Add "sock", "out", "err" or "in". (Ozaki Kiichi, closes #3303)
+Files: src/channel.c
+
+
+*** ../vim-8.1.0262/src/channel.c 2018-07-08 17:18:58.416462371 +0200
+--- src/channel.c 2018-08-09 22:13:36.575628935 +0200
+***************
+*** 138,144 ****
+ }
+
+ static void
+! ch_log_lead(const char *what, channel_T *ch)
+ {
+ if (log_fd != NULL)
+ {
+--- 138,144 ----
+ }
+
+ static void
+! ch_log_lead(const char *what, channel_T *ch, ch_part_T part)
+ {
+ if (log_fd != NULL)
+ {
+***************
+*** 150,156 ****
+ fprintf(log_fd, "%s ", profile_msg(&log_now));
+ #endif
+ if (ch != NULL)
+! fprintf(log_fd, "%son %d: ", what, ch->ch_id);
+ else
+ fprintf(log_fd, "%s: ", what);
+ }
+--- 150,162 ----
+ fprintf(log_fd, "%s ", profile_msg(&log_now));
+ #endif
+ if (ch != NULL)
+! {
+! if (part < PART_COUNT)
+! fprintf(log_fd, "%son %d(%s): ",
+! what, ch->ch_id, part_names[part]);
+! else
+! fprintf(log_fd, "%son %d: ", what, ch->ch_id);
+! }
+ else
+ fprintf(log_fd, "%s: ", what);
+ }
+***************
+*** 166,172 ****
+ {
+ va_list ap;
+
+! ch_log_lead("", ch);
+ va_start(ap, fmt);
+ vfprintf(log_fd, fmt, ap);
+ va_end(ap);
+--- 172,178 ----
+ {
+ va_list ap;
+
+! ch_log_lead("", ch, PART_COUNT);
+ va_start(ap, fmt);
+ vfprintf(log_fd, fmt, ap);
+ va_end(ap);
+***************
+*** 191,197 ****
+ {
+ va_list ap;
+
+! ch_log_lead("ERR ", ch);
+ va_start(ap, fmt);
+ vfprintf(log_fd, fmt, ap);
+ va_end(ap);
+--- 197,203 ----
+ {
+ va_list ap;
+
+! ch_log_lead("ERR ", ch, PART_COUNT);
+ va_start(ap, fmt);
+ vfprintf(log_fd, fmt, ap);
+ va_end(ap);
+***************
+*** 1849,1855 ****
+
+ if (ch_log_active() && lead != NULL)
+ {
+! ch_log_lead(lead, channel);
+ fprintf(log_fd, "'");
+ ignored = (int)fwrite(buf, len, 1, log_fd);
+ fprintf(log_fd, "'\n");
+--- 1855,1861 ----
+
+ if (ch_log_active() && lead != NULL)
+ {
+! ch_log_lead(lead, channel, part);
+ fprintf(log_fd, "'");
+ ignored = (int)fwrite(buf, len, 1, log_fd);
+ fprintf(log_fd, "'\n");
+***************
+*** 3718,3724 ****
+
+ if (ch_log_active())
+ {
+! ch_log_lead("SEND ", channel);
+ fprintf(log_fd, "'");
+ ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd);
+ fprintf(log_fd, "'\n");
+--- 3724,3730 ----
+
+ if (ch_log_active())
+ {
+! ch_log_lead("SEND ", channel, part);
+ fprintf(log_fd, "'");
+ ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd);
+ fprintf(log_fd, "'\n");
+*** ../vim-8.1.0262/src/version.c 2018-08-09 22:08:53.017560100 +0200
+--- src/version.c 2018-08-09 22:14:51.103121696 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 263,
+ /**/
+
+--
+Veni, Vidi, VW -- I came, I saw, I drove around in a little car.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0264 b/data/vim/patches/8.1.0264
new file mode 100644
index 000000000..4c9dc214c
--- /dev/null
+++ b/data/vim/patches/8.1.0264
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0264
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0264
+Problem: Backup tests fail when CWD is in /tmp.
+Solution: Make 'backupskip' empty. (Christian Brabandt, closes #3301)
+Files: src/testdir/test_backup.vim
+
+
+*** ../vim-8.1.0263/src/testdir/test_backup.vim 2018-08-08 11:02:26.855415573 +0200
+--- src/testdir/test_backup.vim 2018-08-09 22:24:06.808025958 +0200
+***************
+*** 1,7 ****
+ " Tests for the backup function
+
+ func Test_backup()
+! set backup backupdir=.
+ new
+ call setline(1, ['line1', 'line2'])
+ :f Xbackup.txt
+--- 1,7 ----
+ " Tests for the backup function
+
+ func Test_backup()
+! set backup backupdir=. backupskip=
+ new
+ call setline(1, ['line1', 'line2'])
+ :f Xbackup.txt
+***************
+*** 12,24 ****
+ let l = readfile('Xbackup.txt~')
+ call assert_equal(['line1', 'line2'], l)
+ bw!
+! set backup&vim backupdir&vim
+ call delete('Xbackup.txt')
+ call delete('Xbackup.txt~')
+ endfunc
+
+ func Test_backup2()
+! set backup backupdir=.//
+ new
+ call setline(1, ['line1', 'line2', 'line3'])
+ :f Xbackup.txt
+--- 12,24 ----
+ let l = readfile('Xbackup.txt~')
+ call assert_equal(['line1', 'line2'], l)
+ bw!
+! set backup&vim backupdir&vim backupskip&vim
+ call delete('Xbackup.txt')
+ call delete('Xbackup.txt~')
+ endfunc
+
+ func Test_backup2()
+! set backup backupdir=.// backupskip=
+ new
+ call setline(1, ['line1', 'line2', 'line3'])
+ :f Xbackup.txt
+***************
+*** 34,44 ****
+ bw!
+ call delete('Xbackup.txt')
+ call delete(f)
+! set backup&vim backupdir&vim
+ endfunc
+
+ func Test_backup2_backupcopy()
+! set backup backupdir=.// backupcopy=yes
+ new
+ call setline(1, ['line1', 'line2', 'line3'])
+ :f Xbackup.txt
+--- 34,44 ----
+ bw!
+ call delete('Xbackup.txt')
+ call delete(f)
+! set backup&vim backupdir&vim backupskip&vim
+ endfunc
+
+ func Test_backup2_backupcopy()
+! set backup backupdir=.// backupcopy=yes backupskip=
+ new
+ call setline(1, ['line1', 'line2', 'line3'])
+ :f Xbackup.txt
+***************
+*** 54,58 ****
+ bw!
+ call delete('Xbackup.txt')
+ call delete(f)
+! set backup&vim backupdir&vim backupcopy&vim
+ endfunc
+--- 54,58 ----
+ bw!
+ call delete('Xbackup.txt')
+ call delete(f)
+! set backup&vim backupdir&vim backupcopy&vim backupskip&vim
+ endfunc
+*** ../vim-8.1.0263/src/version.c 2018-08-09 22:15:30.042856715 +0200
+--- src/version.c 2018-08-09 22:25:20.839776785 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 264,
+ /**/
+
+--
+BEDEVERE: Oooooh!
+LAUNCELOT: No "Aaaaarrrrrrggghhh ... " at the back of the throat.
+BEDEVERE: No! "Oooooh!" in surprise and alarm!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0265 b/data/vim/patches/8.1.0265
new file mode 100644
index 000000000..bd59897ea
--- /dev/null
+++ b/data/vim/patches/8.1.0265
@@ -0,0 +1,875 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0265
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0265
+Problem: The getcmdline() function is way too big.
+Solution: Factor out the incremental search highlighting.
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0264/src/ex_getln.c 2018-08-01 19:05:59.286223185 +0200
+--- src/ex_getln.c 2018-08-10 22:05:38.646652603 +0200
+***************
+*** 141,149 ****
+ #endif
+ sort_func_compare(const void *s1, const void *s2);
+ #endif
+- #ifdef FEAT_SEARCH_EXTRA
+- static void set_search_match(pos_T *t);
+- #endif
+
+
+ static void
+--- 141,146 ----
+***************
+*** 185,193 ****
+ n -= 2;
+ return n == 0 || (n >= 2 && p[n - 2] == '\\' && p[n - 1] == '|');
+ }
+- #endif
+
+! #ifdef FEAT_SEARCH_EXTRA
+ typedef struct {
+ colnr_T vs_curswant;
+ colnr_T vs_leftcol;
+--- 182,189 ----
+ n -= 2;
+ return n == 0 || (n >= 2 && p[n - 2] == '\\' && p[n - 1] == '|');
+ }
+
+! // Struct to store the viewstate during 'incsearch' highlighting.
+ typedef struct {
+ colnr_T vs_curswant;
+ colnr_T vs_leftcol;
+***************
+*** 224,229 ****
+--- 220,553 ----
+ curwin->w_botline = vs->vs_botline;
+ curwin->w_empty_rows = vs->vs_empty_rows;
+ }
++
++ // Struct to store the state of 'incsearch' highlighting.
++ typedef struct {
++ pos_T search_start; // where 'incsearch' starts searching
++ pos_T save_cursor;
++ viewstate_T init_viewstate;
++ viewstate_T old_viewstate;
++ pos_T match_start;
++ pos_T match_end;
++ int did_incsearch;
++ int incsearch_postponed;
++ } incsearch_state_T;
++
++ static void
++ init_incsearch_state(incsearch_state_T *is_state)
++ {
++ is_state->match_start = curwin->w_cursor;
++ is_state->did_incsearch = FALSE;
++ is_state->incsearch_postponed = FALSE;
++ CLEAR_POS(&is_state->match_end);
++ is_state->save_cursor = curwin->w_cursor; // may be restored later
++ is_state->search_start = curwin->w_cursor;
++ save_viewstate(&is_state->init_viewstate);
++ save_viewstate(&is_state->old_viewstate);
++ }
++
++ /*
++ * First move cursor to end of match, then to the start. This
++ * moves the whole match onto the screen when 'nowrap' is set.
++ */
++ static void
++ set_search_match(pos_T *t)
++ {
++ t->lnum += search_match_lines;
++ t->col = search_match_endcol;
++ if (t->lnum > curbuf->b_ml.ml_line_count)
++ {
++ t->lnum = curbuf->b_ml.ml_line_count;
++ coladvance((colnr_T)MAXCOL);
++ }
++ }
++
++ /*
++ * Return TRUE when 'incsearch' highlighting is to be done.
++ */
++ static int
++ do_incsearch_highlighting(int firstc)
++ {
++ return p_is && !cmd_silent && (firstc == '/' || firstc == '?');
++ }
++
++ /*
++ * Do 'incsearch' highlighting if desired.
++ */
++ static void
++ may_do_incsearch_highlighting(
++ int firstc,
++ long count,
++ incsearch_state_T *is_state)
++ {
++ int i;
++ pos_T end_pos;
++ struct cmdline_info save_ccline;
++ #ifdef FEAT_RELTIME
++ proftime_T tm;
++ #endif
++
++ if (!do_incsearch_highlighting(firstc))
++ return;
++
++ // If there is a character waiting, search and redraw later.
++ if (char_avail())
++ {
++ is_state->incsearch_postponed = TRUE;
++ return;
++ }
++ is_state->incsearch_postponed = FALSE;
++
++ // start at old position
++ curwin->w_cursor = is_state->search_start;
++ save_last_search_pattern();
++
++ // If there is no command line, don't do anything.
++ if (ccline.cmdlen == 0)
++ {
++ i = 0;
++ set_no_hlsearch(TRUE); // turn off previous highlight
++ redraw_all_later(SOME_VALID);
++ }
++ else
++ {
++ int search_flags = SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK;
++
++ cursor_off(); // so the user knows we're busy
++ out_flush();
++ ++emsg_off; // so it doesn't beep if bad expr
++ #ifdef FEAT_RELTIME
++ // Set the time limit to half a second.
++ profile_setlimit(500L, &tm);
++ #endif
++ if (!p_hls)
++ search_flags += SEARCH_KEEP;
++ i = do_search(NULL, firstc, ccline.cmdbuff, count, search_flags,
++ #ifdef FEAT_RELTIME
++ &tm, NULL
++ #else
++ NULL, NULL
++ #endif
++ );
++ --emsg_off;
++
++ // if interrupted while searching, behave like it failed
++ if (got_int)
++ {
++ (void)vpeekc(); // remove <C-C> from input stream
++ got_int = FALSE; // don't abandon the command line
++ i = 0;
++ }
++ else if (char_avail())
++ // cancelled searching because a char was typed
++ is_state->incsearch_postponed = TRUE;
++ }
++ if (i != 0)
++ highlight_match = TRUE; // highlight position
++ else
++ highlight_match = FALSE; // remove highlight
++
++ // First restore the old curwin values, so the screen is positioned in the
++ // same way as the actual search command.
++ restore_viewstate(&is_state->old_viewstate);
++ changed_cline_bef_curs();
++ update_topline();
++
++ if (i != 0)
++ {
++ pos_T save_pos = curwin->w_cursor;
++
++ is_state->match_start = curwin->w_cursor;
++ set_search_match(&curwin->w_cursor);
++ validate_cursor();
++ end_pos = curwin->w_cursor;
++ is_state->match_end = end_pos;
++ curwin->w_cursor = save_pos;
++ }
++ else
++ end_pos = curwin->w_cursor; // shutup gcc 4
++
++ // Disable 'hlsearch' highlighting if the pattern matches everything.
++ // Avoids a flash when typing "foo\|".
++ if (empty_pattern(ccline.cmdbuff))
++ set_no_hlsearch(TRUE);
++
++ validate_cursor();
++ // May redraw the status line to show the cursor position.
++ if (p_ru && curwin->w_status_height > 0)
++ curwin->w_redr_status = TRUE;
++
++ save_cmdline(&save_ccline);
++ update_screen(SOME_VALID);
++ restore_cmdline(&save_ccline);
++ restore_last_search_pattern();
++
++ // Leave it at the end to make CTRL-R CTRL-W work.
++ if (i != 0)
++ curwin->w_cursor = end_pos;
++
++ msg_starthere();
++ redrawcmdline();
++ is_state->did_incsearch = TRUE;
++ }
++
++ /*
++ * May adjust 'incsearch' highlighting for typing CTRL-G and CTRL-T, go to next
++ * or previous match.
++ * Returns FAIL when jumping to cmdline_not_changed;
++ */
++ static int
++ may_adjust_incsearch_highlighting(
++ int firstc,
++ long count,
++ incsearch_state_T *is_state,
++ int c)
++ {
++ pos_T t;
++ char_u *pat;
++ int search_flags = SEARCH_NOOF;
++ int i;
++
++ if (!do_incsearch_highlighting(firstc))
++ return OK;
++ if (ccline.cmdlen == 0)
++ return FAIL;
++
++ if (firstc == ccline.cmdbuff[0])
++ pat = last_search_pattern();
++ else
++ pat = ccline.cmdbuff;
++
++ save_last_search_pattern();
++ cursor_off();
++ out_flush();
++ if (c == Ctrl_G)
++ {
++ t = is_state->match_end;
++ if (LT_POS(is_state->match_start, is_state->match_end))
++ // Start searching at the end of the match not at the beginning of
++ // the next column.
++ (void)decl(&t);
++ search_flags += SEARCH_COL;
++ }
++ else
++ t = is_state->match_start;
++ if (!p_hls)
++ search_flags += SEARCH_KEEP;
++ ++emsg_off;
++ i = searchit(curwin, curbuf, &t,
++ c == Ctrl_G ? FORWARD : BACKWARD,
++ pat, count, search_flags,
++ RE_SEARCH, 0, NULL, NULL);
++ --emsg_off;
++ if (i)
++ {
++ is_state->search_start = is_state->match_start;
++ is_state->match_end = t;
++ is_state->match_start = t;
++ if (c == Ctrl_T && firstc == '/')
++ {
++ // Move just before the current match, so that when nv_search
++ // finishes the cursor will be put back on the match.
++ is_state->search_start = t;
++ (void)decl(&is_state->search_start);
++ }
++ else if (c == Ctrl_G && firstc == '?')
++ {
++ // Move just after the current match, so that when nv_search
++ // finishes the cursor will be put back on the match.
++ is_state->search_start = t;
++ (void)incl(&is_state->search_start);
++ }
++ if (LT_POS(t, is_state->search_start) && c == Ctrl_G)
++ {
++ // wrap around
++ is_state->search_start = t;
++ if (firstc == '?')
++ (void)incl(&is_state->search_start);
++ else
++ (void)decl(&is_state->search_start);
++ }
++
++ set_search_match(&is_state->match_end);
++ curwin->w_cursor = is_state->match_start;
++ changed_cline_bef_curs();
++ update_topline();
++ validate_cursor();
++ highlight_match = TRUE;
++ save_viewstate(&is_state->old_viewstate);
++ update_screen(NOT_VALID);
++ redrawcmdline();
++ }
++ else
++ vim_beep(BO_ERROR);
++ restore_last_search_pattern();
++ return FAIL;
++ }
++
++ /*
++ * When CTRL-L typed: add character from the match to the pattern.
++ * May set "*c" to the added character.
++ * Return OK when jumping to cmdline_not_changed.
++ */
++ static int
++ may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state)
++ {
++ if (!do_incsearch_highlighting(firstc))
++ return FAIL;
++
++ // Add a character from under the cursor for 'incsearch'.
++ if (is_state->did_incsearch)
++ {
++ curwin->w_cursor = is_state->match_end;
++ if (!EQUAL_POS(curwin->w_cursor, is_state->search_start))
++ {
++ *c = gchar_cursor();
++
++ // If 'ignorecase' and 'smartcase' are set and the
++ // command line has no uppercase characters, convert
++ // the character to lowercase.
++ if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff))
++ *c = MB_TOLOWER(*c);
++ if (*c != NUL)
++ {
++ if (*c == firstc || vim_strchr((char_u *)(
++ p_magic ? "\\~^$.*[" : "\\^$"), *c) != NULL)
++ {
++ // put a backslash before special characters
++ stuffcharReadbuff(*c);
++ *c = '\\';
++ }
++ return FAIL;
++ }
++ }
++ }
++ return OK;
++ }
++
++ static void
++ finish_incsearch_highlighting(int gotesc, incsearch_state_T *is_state)
++ {
++ if (is_state->did_incsearch)
++ {
++ if (gotesc)
++ curwin->w_cursor = is_state->save_cursor;
++ else
++ {
++ if (!EQUAL_POS(is_state->save_cursor, is_state->search_start))
++ {
++ // put the '" mark at the original position
++ curwin->w_cursor = is_state->save_cursor;
++ setpcmark();
++ }
++ curwin->w_cursor = is_state->search_start;
++ }
++ restore_viewstate(&is_state->old_viewstate);
++ highlight_match = FALSE;
++ validate_cursor(); /* needed for TAB */
++ redraw_all_later(SOME_VALID);
++ }
++ }
+ #endif
+
+ /*
+***************
+*** 262,275 ****
+ int histype; /* history type to be used */
+ #endif
+ #ifdef FEAT_SEARCH_EXTRA
+! pos_T search_start; /* where 'incsearch' starts searching */
+! pos_T save_cursor;
+! viewstate_T init_viewstate;
+! viewstate_T old_viewstate;
+! pos_T match_start = curwin->w_cursor;
+! pos_T match_end;
+! int did_incsearch = FALSE;
+! int incsearch_postponed = FALSE;
+ #endif
+ int did_wild_list = FALSE; /* did wild_list() recently */
+ int wim_index = 0; /* index in wim_flags[] */
+--- 586,592 ----
+ int histype; /* history type to be used */
+ #endif
+ #ifdef FEAT_SEARCH_EXTRA
+! incsearch_state_T is_state;
+ #endif
+ int did_wild_list = FALSE; /* did wild_list() recently */
+ int wim_index = 0; /* index in wim_flags[] */
+***************
+*** 287,293 ****
+ #endif
+ expand_T xpc;
+ long *b_im_ptr = NULL;
+! #if defined(FEAT_WILDMENU) || defined(FEAT_EVAL) || defined(FEAT_SEARCH_EXTRA)
+ /* Everything that may work recursively should save and restore the
+ * current command line in save_ccline. That includes update_screen(), a
+ * custom status line may invoke ":normal". */
+--- 604,610 ----
+ #endif
+ expand_T xpc;
+ long *b_im_ptr = NULL;
+! #if defined(FEAT_WILDMENU) || defined(FEAT_EVAL)
+ /* Everything that may work recursively should save and restore the
+ * current command line in save_ccline. That includes update_screen(), a
+ * custom status line may invoke ":normal". */
+***************
+*** 309,320 ****
+ #endif
+
+ ccline.overstrike = FALSE; /* always start in insert mode */
+ #ifdef FEAT_SEARCH_EXTRA
+! CLEAR_POS(&match_end);
+! save_cursor = curwin->w_cursor; /* may be restored later */
+! search_start = curwin->w_cursor;
+! save_viewstate(&init_viewstate);
+! save_viewstate(&old_viewstate);
+ #endif
+
+ /*
+--- 626,634 ----
+ #endif
+
+ ccline.overstrike = FALSE; /* always start in insert mode */
++
+ #ifdef FEAT_SEARCH_EXTRA
+! init_incsearch_state(&is_state);
+ #endif
+
+ /*
+***************
+*** 1089,1098 ****
+ #ifdef FEAT_SEARCH_EXTRA
+ if (ccline.cmdlen == 0)
+ {
+! search_start = save_cursor;
+ /* save view settings, so that the screen
+ * won't be restored at the wrong position */
+! old_viewstate = init_viewstate;
+ }
+ #endif
+ redrawcmd();
+--- 1403,1412 ----
+ #ifdef FEAT_SEARCH_EXTRA
+ if (ccline.cmdlen == 0)
+ {
+! is_state.search_start = is_state.save_cursor;
+ /* save view settings, so that the screen
+ * won't be restored at the wrong position */
+! is_state.old_viewstate = is_state.init_viewstate;
+ }
+ #endif
+ redrawcmd();
+***************
+*** 1121,1127 ****
+ }
+ #ifdef FEAT_SEARCH_EXTRA
+ if (ccline.cmdlen == 0)
+! search_start = save_cursor;
+ #endif
+ redraw_cmdline = TRUE;
+ goto returncmd; /* back to cmd mode */
+--- 1435,1441 ----
+ }
+ #ifdef FEAT_SEARCH_EXTRA
+ if (ccline.cmdlen == 0)
+! is_state.search_start = is_state.save_cursor;
+ #endif
+ redraw_cmdline = TRUE;
+ goto returncmd; /* back to cmd mode */
+***************
+*** 1208,1214 ****
+ ccline.cmdbuff[ccline.cmdlen] = NUL;
+ #ifdef FEAT_SEARCH_EXTRA
+ if (ccline.cmdlen == 0)
+! search_start = save_cursor;
+ #endif
+ redrawcmd();
+ goto cmdline_changed;
+--- 1522,1528 ----
+ ccline.cmdbuff[ccline.cmdlen] = NUL;
+ #ifdef FEAT_SEARCH_EXTRA
+ if (ccline.cmdlen == 0)
+! is_state.search_start = is_state.save_cursor;
+ #endif
+ redrawcmd();
+ goto cmdline_changed;
+***************
+*** 1545,1582 ****
+
+ case Ctrl_L:
+ #ifdef FEAT_SEARCH_EXTRA
+! if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
+! {
+! /* Add a character from under the cursor for 'incsearch' */
+! if (did_incsearch)
+! {
+! curwin->w_cursor = match_end;
+! if (!EQUAL_POS(curwin->w_cursor, search_start))
+! {
+! c = gchar_cursor();
+! /* If 'ignorecase' and 'smartcase' are set and the
+! * command line has no uppercase characters, convert
+! * the character to lowercase */
+! if (p_ic && p_scs
+! && !pat_has_uppercase(ccline.cmdbuff))
+! c = MB_TOLOWER(c);
+! if (c != NUL)
+! {
+! if (c == firstc || vim_strchr((char_u *)(
+! p_magic ? "\\~^$.*[" : "\\^$"), c)
+! != NULL)
+! {
+! /* put a backslash before special
+! * characters */
+! stuffcharReadbuff(c);
+! c = '\\';
+! }
+! break;
+! }
+! }
+! }
+ goto cmdline_not_changed;
+- }
+ #endif
+
+ /* completion: longest common part */
+--- 1859,1866 ----
+
+ case Ctrl_L:
+ #ifdef FEAT_SEARCH_EXTRA
+! if (may_add_char_to_search(firstc, &c, &is_state) == OK)
+ goto cmdline_not_changed;
+ #endif
+
+ /* completion: longest common part */
+***************
+*** 1742,1829 ****
+ #ifdef FEAT_SEARCH_EXTRA
+ case Ctrl_G: /* next match */
+ case Ctrl_T: /* previous match */
+! if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
+! {
+! pos_T t;
+! char_u *pat;
+! int search_flags = SEARCH_NOOF;
+!
+! if (ccline.cmdlen == 0)
+! goto cmdline_not_changed;
+!
+! if (firstc == ccline.cmdbuff[0])
+! pat = last_search_pattern();
+! else
+! pat = ccline.cmdbuff;
+!
+! save_last_search_pattern();
+! cursor_off();
+! out_flush();
+! if (c == Ctrl_G)
+! {
+! t = match_end;
+! if (LT_POS(match_start, match_end))
+! /* start searching at the end of the match
+! * not at the beginning of the next column */
+! (void)decl(&t);
+! search_flags += SEARCH_COL;
+! }
+! else
+! t = match_start;
+! if (!p_hls)
+! search_flags += SEARCH_KEEP;
+! ++emsg_off;
+! i = searchit(curwin, curbuf, &t,
+! c == Ctrl_G ? FORWARD : BACKWARD,
+! pat, count, search_flags,
+! RE_SEARCH, 0, NULL, NULL);
+! --emsg_off;
+! if (i)
+! {
+! search_start = match_start;
+! match_end = t;
+! match_start = t;
+! if (c == Ctrl_T && firstc == '/')
+! {
+! /* move just before the current match, so that
+! * when nv_search finishes the cursor will be
+! * put back on the match */
+! search_start = t;
+! (void)decl(&search_start);
+! }
+! else if (c == Ctrl_G && firstc == '?')
+! {
+! /* move just after the current match, so that
+! * when nv_search finishes the cursor will be
+! * put back on the match */
+! search_start = t;
+! (void)incl(&search_start);
+! }
+! if (LT_POS(t, search_start) && c == Ctrl_G)
+! {
+! /* wrap around */
+! search_start = t;
+! if (firstc == '?')
+! (void)incl(&search_start);
+! else
+! (void)decl(&search_start);
+! }
+!
+! set_search_match(&match_end);
+! curwin->w_cursor = match_start;
+! changed_cline_bef_curs();
+! update_topline();
+! validate_cursor();
+! highlight_match = TRUE;
+! save_viewstate(&old_viewstate);
+! update_screen(NOT_VALID);
+! redrawcmdline();
+! }
+! else
+! vim_beep(BO_ERROR);
+! restore_last_search_pattern();
+ goto cmdline_not_changed;
+- }
+ break;
+ #endif
+
+--- 2026,2034 ----
+ #ifdef FEAT_SEARCH_EXTRA
+ case Ctrl_G: /* next match */
+ case Ctrl_T: /* previous match */
+! if (may_adjust_incsearch_highlighting(
+! firstc, count, &is_state, c) == FAIL)
+ goto cmdline_not_changed;
+ break;
+ #endif
+
+***************
+*** 1951,1957 ****
+ */
+ cmdline_not_changed:
+ #ifdef FEAT_SEARCH_EXTRA
+! if (!incsearch_postponed)
+ continue;
+ #endif
+
+--- 2156,2162 ----
+ */
+ cmdline_not_changed:
+ #ifdef FEAT_SEARCH_EXTRA
+! if (!is_state.incsearch_postponed)
+ continue;
+ #endif
+
+***************
+*** 1960,2074 ****
+ trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED);
+
+ #ifdef FEAT_SEARCH_EXTRA
+! /*
+! * 'incsearch' highlighting.
+! */
+! if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
+! {
+! pos_T end_pos;
+! #ifdef FEAT_RELTIME
+! proftime_T tm;
+! #endif
+!
+! /* if there is a character waiting, search and redraw later */
+! if (char_avail())
+! {
+! incsearch_postponed = TRUE;
+! continue;
+! }
+! incsearch_postponed = FALSE;
+! curwin->w_cursor = search_start; /* start at old position */
+! save_last_search_pattern();
+!
+! /* If there is no command line, don't do anything */
+! if (ccline.cmdlen == 0)
+! {
+! i = 0;
+! set_no_hlsearch(TRUE); /* turn off previous highlight */
+! redraw_all_later(SOME_VALID);
+! }
+! else
+! {
+! int search_flags = SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK;
+! cursor_off(); /* so the user knows we're busy */
+! out_flush();
+! ++emsg_off; /* So it doesn't beep if bad expr */
+! #ifdef FEAT_RELTIME
+! /* Set the time limit to half a second. */
+! profile_setlimit(500L, &tm);
+! #endif
+! if (!p_hls)
+! search_flags += SEARCH_KEEP;
+! i = do_search(NULL, firstc, ccline.cmdbuff, count,
+! search_flags,
+! #ifdef FEAT_RELTIME
+! &tm, NULL
+! #else
+! NULL, NULL
+! #endif
+! );
+! --emsg_off;
+! /* if interrupted while searching, behave like it failed */
+! if (got_int)
+! {
+! (void)vpeekc(); /* remove <C-C> from input stream */
+! got_int = FALSE; /* don't abandon the command line */
+! i = 0;
+! }
+! else if (char_avail())
+! /* cancelled searching because a char was typed */
+! incsearch_postponed = TRUE;
+! }
+! if (i != 0)
+! highlight_match = TRUE; /* highlight position */
+! else
+! highlight_match = FALSE; /* remove highlight */
+!
+! /* first restore the old curwin values, so the screen is
+! * positioned in the same way as the actual search command */
+! restore_viewstate(&old_viewstate);
+! changed_cline_bef_curs();
+! update_topline();
+!
+! if (i != 0)
+! {
+! pos_T save_pos = curwin->w_cursor;
+!
+! match_start = curwin->w_cursor;
+! set_search_match(&curwin->w_cursor);
+! validate_cursor();
+! end_pos = curwin->w_cursor;
+! match_end = end_pos;
+! curwin->w_cursor = save_pos;
+! }
+! else
+! end_pos = curwin->w_cursor; /* shutup gcc 4 */
+!
+! /* Disable 'hlsearch' highlighting if the pattern matches
+! * everything. Avoids a flash when typing "foo\|". */
+! if (empty_pattern(ccline.cmdbuff))
+! set_no_hlsearch(TRUE);
+!
+! validate_cursor();
+! /* May redraw the status line to show the cursor position. */
+! if (p_ru && curwin->w_status_height > 0)
+! curwin->w_redr_status = TRUE;
+!
+! save_cmdline(&save_ccline);
+! update_screen(SOME_VALID);
+! restore_cmdline(&save_ccline);
+! restore_last_search_pattern();
+!
+! /* Leave it at the end to make CTRL-R CTRL-W work. */
+! if (i != 0)
+! curwin->w_cursor = end_pos;
+!
+! msg_starthere();
+! redrawcmdline();
+! did_incsearch = TRUE;
+! }
+! #else /* FEAT_SEARCH_EXTRA */
+! ;
+ #endif
+
+ #ifdef FEAT_RIGHTLEFT
+--- 2165,2171 ----
+ trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED);
+
+ #ifdef FEAT_SEARCH_EXTRA
+! may_do_incsearch_highlighting(firstc, count, &is_state);
+ #endif
+
+ #ifdef FEAT_RIGHTLEFT
+***************
+*** 2100,2124 ****
+ ccline.xpc = NULL;
+
+ #ifdef FEAT_SEARCH_EXTRA
+! if (did_incsearch)
+! {
+! if (gotesc)
+! curwin->w_cursor = save_cursor;
+! else
+! {
+! if (!EQUAL_POS(save_cursor, search_start))
+! {
+! /* put the '" mark at the original position */
+! curwin->w_cursor = save_cursor;
+! setpcmark();
+! }
+! curwin->w_cursor = search_start;
+! }
+! restore_viewstate(&old_viewstate);
+! highlight_match = FALSE;
+! validate_cursor(); /* needed for TAB */
+! redraw_all_later(SOME_VALID);
+! }
+ #endif
+
+ if (ccline.cmdbuff != NULL)
+--- 2197,2203 ----
+ ccline.xpc = NULL;
+
+ #ifdef FEAT_SEARCH_EXTRA
+! finish_incsearch_highlighting(gotesc, &is_state);
+ #endif
+
+ if (ccline.cmdbuff != NULL)
+***************
+*** 7239,7259 ****
+
+ return (char_u *)ga.ga_data;
+ }
+-
+- #ifdef FEAT_SEARCH_EXTRA
+- static void
+- set_search_match(pos_T *t)
+- {
+- /*
+- * First move cursor to end of match, then to the start. This
+- * moves the whole match onto the screen when 'nowrap' is set.
+- */
+- t->lnum += search_match_lines;
+- t->col = search_match_endcol;
+- if (t->lnum > curbuf->b_ml.ml_line_count)
+- {
+- t->lnum = curbuf->b_ml.ml_line_count;
+- coladvance((colnr_T)MAXCOL);
+- }
+- }
+- #endif
+--- 7318,7320 ----
+*** ../vim-8.1.0264/src/version.c 2018-08-09 22:26:34.259501130 +0200
+--- src/version.c 2018-08-10 22:07:22.817944576 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 265,
+ /**/
+
+--
+Sorry, no fortune today.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0266 b/data/vim/patches/8.1.0266
new file mode 100644
index 000000000..5ba3a1286
--- /dev/null
+++ b/data/vim/patches/8.1.0266
@@ -0,0 +1,436 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0266
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0266
+Problem: Parsing Ex address range is not a separate function.
+Solution: Refactor do_one_cmd() to separate address parsing.
+Files: src/ex_docmd.c, src/proto/ex_docmd.pro
+
+
+*** ../vim-8.1.0265/src/ex_docmd.c 2018-08-07 22:30:26.670240840 +0200
+--- src/ex_docmd.c 2018-08-10 23:08:38.139696671 +0200
+***************
+*** 1719,1725 ****
+ cmdmod_T save_cmdmod;
+ int ni; /* set when Not Implemented */
+ char_u *cmd;
+- int address_count = 1;
+
+ vim_memset(&ea, 0, sizeof(ea));
+ ea.line1 = 1;
+--- 1719,1724 ----
+***************
+*** 2045,2212 ****
+ get_wincmd_addr_type(skipwhite(p), &ea);
+ }
+
+- /* repeat for all ',' or ';' separated addresses */
+ ea.cmd = cmd;
+! for (;;)
+! {
+! ea.line1 = ea.line2;
+! switch (ea.addr_type)
+! {
+! case ADDR_LINES:
+! /* default is current line number */
+! ea.line2 = curwin->w_cursor.lnum;
+! break;
+! case ADDR_WINDOWS:
+! ea.line2 = CURRENT_WIN_NR;
+! break;
+! case ADDR_ARGUMENTS:
+! ea.line2 = curwin->w_arg_idx + 1;
+! if (ea.line2 > ARGCOUNT)
+! ea.line2 = ARGCOUNT;
+! break;
+! case ADDR_LOADED_BUFFERS:
+! case ADDR_BUFFERS:
+! ea.line2 = curbuf->b_fnum;
+! break;
+! case ADDR_TABS:
+! ea.line2 = CURRENT_TAB_NR;
+! break;
+! case ADDR_TABS_RELATIVE:
+! ea.line2 = 1;
+! break;
+! #ifdef FEAT_QUICKFIX
+! case ADDR_QUICKFIX:
+! ea.line2 = qf_get_cur_valid_idx(&ea);
+! break;
+! #endif
+! }
+! ea.cmd = skipwhite(ea.cmd);
+! lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip,
+! ea.addr_count == 0, address_count++);
+! if (ea.cmd == NULL) /* error detected */
+! goto doend;
+! if (lnum == MAXLNUM)
+! {
+! if (*ea.cmd == '%') /* '%' - all lines */
+! {
+! ++ea.cmd;
+! switch (ea.addr_type)
+! {
+! case ADDR_LINES:
+! ea.line1 = 1;
+! ea.line2 = curbuf->b_ml.ml_line_count;
+! break;
+! case ADDR_LOADED_BUFFERS:
+! {
+! buf_T *buf = firstbuf;
+!
+! while (buf->b_next != NULL
+! && buf->b_ml.ml_mfp == NULL)
+! buf = buf->b_next;
+! ea.line1 = buf->b_fnum;
+! buf = lastbuf;
+! while (buf->b_prev != NULL
+! && buf->b_ml.ml_mfp == NULL)
+! buf = buf->b_prev;
+! ea.line2 = buf->b_fnum;
+! break;
+! }
+! case ADDR_BUFFERS:
+! ea.line1 = firstbuf->b_fnum;
+! ea.line2 = lastbuf->b_fnum;
+! break;
+! case ADDR_WINDOWS:
+! case ADDR_TABS:
+! if (IS_USER_CMDIDX(ea.cmdidx))
+! {
+! ea.line1 = 1;
+! ea.line2 = ea.addr_type == ADDR_WINDOWS
+! ? LAST_WIN_NR : LAST_TAB_NR;
+! }
+! else
+! {
+! /* there is no Vim command which uses '%' and
+! * ADDR_WINDOWS or ADDR_TABS */
+! errormsg = (char_u *)_(e_invrange);
+! goto doend;
+! }
+! break;
+! case ADDR_TABS_RELATIVE:
+! errormsg = (char_u *)_(e_invrange);
+! goto doend;
+! break;
+! case ADDR_ARGUMENTS:
+! if (ARGCOUNT == 0)
+! ea.line1 = ea.line2 = 0;
+! else
+! {
+! ea.line1 = 1;
+! ea.line2 = ARGCOUNT;
+! }
+! break;
+! #ifdef FEAT_QUICKFIX
+! case ADDR_QUICKFIX:
+! ea.line1 = 1;
+! ea.line2 = qf_get_size(&ea);
+! if (ea.line2 == 0)
+! ea.line2 = 1;
+! break;
+! #endif
+! }
+! ++ea.addr_count;
+! }
+! /* '*' - visual area */
+! else if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL)
+! {
+! pos_T *fp;
+!
+! if (ea.addr_type != ADDR_LINES)
+! {
+! errormsg = (char_u *)_(e_invrange);
+! goto doend;
+! }
+!
+! ++ea.cmd;
+! if (!ea.skip)
+! {
+! fp = getmark('<', FALSE);
+! if (check_mark(fp) == FAIL)
+! goto doend;
+! ea.line1 = fp->lnum;
+! fp = getmark('>', FALSE);
+! if (check_mark(fp) == FAIL)
+! goto doend;
+! ea.line2 = fp->lnum;
+! ++ea.addr_count;
+! }
+! }
+! }
+! else
+! ea.line2 = lnum;
+! ea.addr_count++;
+!
+! if (*ea.cmd == ';')
+! {
+! if (!ea.skip)
+! {
+! curwin->w_cursor.lnum = ea.line2;
+! /* don't leave the cursor on an illegal line or column */
+! check_cursor();
+! }
+! }
+! else if (*ea.cmd != ',')
+! break;
+! ++ea.cmd;
+! }
+!
+! /* One address given: set start and end lines */
+! if (ea.addr_count == 1)
+! {
+! ea.line1 = ea.line2;
+! /* ... but only implicit: really no address given */
+! if (lnum == MAXLNUM)
+! ea.addr_count = 0;
+! }
+
+ /*
+ * 5. Parse the command.
+--- 2044,2052 ----
+ get_wincmd_addr_type(skipwhite(p), &ea);
+ }
+
+ ea.cmd = cmd;
+! if (parse_cmd_address(&ea, &errormsg) == FAIL)
+! goto doend;
+
+ /*
+ * 5. Parse the command.
+***************
+*** 2989,2994 ****
+--- 2829,3007 ----
+ #endif
+
+ /*
++ * Parse the address range, if any, in "eap".
++ * Return FAIL and set "errormsg" or return OK.
++ */
++ int
++ parse_cmd_address(exarg_T *eap, char_u **errormsg)
++ {
++ int address_count = 1;
++ linenr_T lnum;
++
++ // Repeat for all ',' or ';' separated addresses.
++ for (;;)
++ {
++ eap->line1 = eap->line2;
++ switch (eap->addr_type)
++ {
++ case ADDR_LINES:
++ // default is current line number
++ eap->line2 = curwin->w_cursor.lnum;
++ break;
++ case ADDR_WINDOWS:
++ eap->line2 = CURRENT_WIN_NR;
++ break;
++ case ADDR_ARGUMENTS:
++ eap->line2 = curwin->w_arg_idx + 1;
++ if (eap->line2 > ARGCOUNT)
++ eap->line2 = ARGCOUNT;
++ break;
++ case ADDR_LOADED_BUFFERS:
++ case ADDR_BUFFERS:
++ eap->line2 = curbuf->b_fnum;
++ break;
++ case ADDR_TABS:
++ eap->line2 = CURRENT_TAB_NR;
++ break;
++ case ADDR_TABS_RELATIVE:
++ eap->line2 = 1;
++ break;
++ #ifdef FEAT_QUICKFIX
++ case ADDR_QUICKFIX:
++ eap->line2 = qf_get_cur_valid_idx(eap);
++ break;
++ #endif
++ }
++ eap->cmd = skipwhite(eap->cmd);
++ lnum = get_address(eap, &eap->cmd, eap->addr_type, eap->skip,
++ eap->addr_count == 0, address_count++);
++ if (eap->cmd == NULL) // error detected
++ return FAIL;
++ if (lnum == MAXLNUM)
++ {
++ if (*eap->cmd == '%') // '%' - all lines
++ {
++ ++eap->cmd;
++ switch (eap->addr_type)
++ {
++ case ADDR_LINES:
++ eap->line1 = 1;
++ eap->line2 = curbuf->b_ml.ml_line_count;
++ break;
++ case ADDR_LOADED_BUFFERS:
++ {
++ buf_T *buf = firstbuf;
++
++ while (buf->b_next != NULL
++ && buf->b_ml.ml_mfp == NULL)
++ buf = buf->b_next;
++ eap->line1 = buf->b_fnum;
++ buf = lastbuf;
++ while (buf->b_prev != NULL
++ && buf->b_ml.ml_mfp == NULL)
++ buf = buf->b_prev;
++ eap->line2 = buf->b_fnum;
++ break;
++ }
++ case ADDR_BUFFERS:
++ eap->line1 = firstbuf->b_fnum;
++ eap->line2 = lastbuf->b_fnum;
++ break;
++ case ADDR_WINDOWS:
++ case ADDR_TABS:
++ if (IS_USER_CMDIDX(eap->cmdidx))
++ {
++ eap->line1 = 1;
++ eap->line2 = eap->addr_type == ADDR_WINDOWS
++ ? LAST_WIN_NR : LAST_TAB_NR;
++ }
++ else
++ {
++ // there is no Vim command which uses '%' and
++ // ADDR_WINDOWS or ADDR_TABS
++ *errormsg = (char_u *)_(e_invrange);
++ return FAIL;
++ }
++ break;
++ case ADDR_TABS_RELATIVE:
++ *errormsg = (char_u *)_(e_invrange);
++ return FAIL;
++ case ADDR_ARGUMENTS:
++ if (ARGCOUNT == 0)
++ eap->line1 = eap->line2 = 0;
++ else
++ {
++ eap->line1 = 1;
++ eap->line2 = ARGCOUNT;
++ }
++ break;
++ #ifdef FEAT_QUICKFIX
++ case ADDR_QUICKFIX:
++ eap->line1 = 1;
++ eap->line2 = qf_get_size(eap);
++ if (eap->line2 == 0)
++ eap->line2 = 1;
++ break;
++ #endif
++ }
++ ++eap->addr_count;
++ }
++ else if (*eap->cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL)
++ {
++ pos_T *fp;
++
++ // '*' - visual area
++ if (eap->addr_type != ADDR_LINES)
++ {
++ *errormsg = (char_u *)_(e_invrange);
++ return FAIL;
++ }
++
++ ++eap->cmd;
++ if (!eap->skip)
++ {
++ fp = getmark('<', FALSE);
++ if (check_mark(fp) == FAIL)
++ return FAIL;
++ eap->line1 = fp->lnum;
++ fp = getmark('>', FALSE);
++ if (check_mark(fp) == FAIL)
++ return FAIL;
++ eap->line2 = fp->lnum;
++ ++eap->addr_count;
++ }
++ }
++ }
++ else
++ eap->line2 = lnum;
++ eap->addr_count++;
++
++ if (*eap->cmd == ';')
++ {
++ if (!eap->skip)
++ {
++ curwin->w_cursor.lnum = eap->line2;
++ // don't leave the cursor on an illegal line or column
++ check_cursor();
++ }
++ }
++ else if (*eap->cmd != ',')
++ break;
++ ++eap->cmd;
++ }
++
++ // One address given: set start and end lines.
++ if (eap->addr_count == 1)
++ {
++ eap->line1 = eap->line2;
++ // ... but only implicit: really no address given
++ if (lnum == MAXLNUM)
++ eap->addr_count = 0;
++ }
++ return OK;
++ }
++
++ /*
+ * Check for an Ex command with optional tail.
+ * If there is a match advance "pp" to the argument and return TRUE.
+ */
+***************
+*** 4292,4298 ****
+ }
+
+ /*
+! * skip a range specifier of the form: addr [,addr] [;addr] ..
+ *
+ * Backslashed delimiters after / or ? will be skipped, and commands will
+ * not be expanded between /'s and ?'s or after "'".
+--- 4305,4311 ----
+ }
+
+ /*
+! * Skip a range specifier of the form: addr [,addr] [;addr] ..
+ *
+ * Backslashed delimiters after / or ? will be skipped, and commands will
+ * not be expanded between /'s and ?'s or after "'".
+*** ../vim-8.1.0265/src/proto/ex_docmd.pro 2018-07-29 17:35:19.493750319 +0200
+--- src/proto/ex_docmd.pro 2018-08-10 23:08:41.983672969 +0200
+***************
+*** 4,9 ****
+--- 4,10 ----
+ int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags);
+ int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int));
+ void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
++ int parse_cmd_address(exarg_T *eap, char_u **errormsg);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+ int cmd_exists(char_u *name);
+*** ../vim-8.1.0265/src/version.c 2018-08-10 22:07:28.821903829 +0200
+--- src/version.c 2018-08-10 22:39:25.770183225 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 266,
+ /**/
+
+--
+Permission is granted to read this message out aloud on Kings Cross Road,
+London, under the condition that the orator is properly dressed.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0267 b/data/vim/patches/8.1.0267
new file mode 100644
index 000000000..7d332c333
--- /dev/null
+++ b/data/vim/patches/8.1.0267
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0267
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0267
+Problem: No good check if restoring quickfix list worked.
+Solution: Let qf_restore_list() return OK/FAIL. (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0266/src/quickfix.c 2018-08-09 21:52:20.716362389 +0200
+--- src/quickfix.c 2018-08-11 13:35:15.874757811 +0200
+***************
+*** 4338,4345 ****
+ * If the current list is not "save_qfid" and we can find the list with that ID
+ * then make it the current list.
+ * This is used when autocommands may have changed the current list.
+ */
+! static void
+ qf_restore_list(qf_info_T *qi, int_u save_qfid)
+ {
+ int curlist;
+--- 4338,4347 ----
+ * If the current list is not "save_qfid" and we can find the list with that ID
+ * then make it the current list.
+ * This is used when autocommands may have changed the current list.
++ * Returns OK if successfully restored the list. Returns FAIL if the list with
++ * the specified identifier (save_qfid) is not found in the stack.
+ */
+! static int
+ qf_restore_list(qf_info_T *qi, int_u save_qfid)
+ {
+ int curlist;
+***************
+*** 4347,4356 ****
+ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+ {
+ curlist = qf_id2nr(qi, save_qfid);
+! if (curlist >= 0)
+! qi->qf_curlist = curlist;
+! // else: what if the list can't be found?
+ }
+ }
+
+ /*
+--- 4349,4360 ----
+ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid)
+ {
+ curlist = qf_id2nr(qi, save_qfid);
+! if (curlist < 0)
+! // list is not present
+! return FAIL;
+! qi->qf_curlist = curlist;
+ }
++ return OK;
+ }
+
+ /*
+***************
+*** 4359,4367 ****
+ static void
+ qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit)
+ {
+! qf_restore_list(qi, save_qfid);
+
+! // Autocommands might have cleared the list, check for it
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, forceit);
+ }
+--- 4363,4372 ----
+ static void
+ qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit)
+ {
+! if (qf_restore_list(qi, save_qfid) == FAIL)
+! return;
+
+! // Autocommands might have cleared the list, check for that.
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, forceit);
+ }
+***************
+*** 5025,5031 ****
+ }
+ }
+
+! qf_restore_list(qi, qfid);
+
+ return TRUE;
+ }
+--- 5030,5037 ----
+ }
+ }
+
+! if (qf_restore_list(qi, qfid) == FAIL)
+! return FALSE;
+
+ return TRUE;
+ }
+***************
+*** 5371,5377 ****
+ if (!qflist_valid(wp, save_qfid))
+ goto theend;
+
+! qf_restore_list(qi, save_qfid);
+
+ /* Jump to first match. */
+ if (!qf_list_empty(qi, qi->qf_curlist))
+--- 5377,5384 ----
+ if (!qflist_valid(wp, save_qfid))
+ goto theend;
+
+! if (qf_restore_list(qi, save_qfid) == FAIL)
+! goto theend;
+
+ /* Jump to first match. */
+ if (!qf_list_empty(qi, qi->qf_curlist))
+*** ../vim-8.1.0266/src/version.c 2018-08-10 23:13:07.934024645 +0200
+--- src/version.c 2018-08-11 13:32:28.919832152 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 267,
+ /**/
+
+--
+BRIDGEKEEPER: What is your favorite editor?
+GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm!
+ "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 ///
diff --git a/data/vim/patches/8.1.0268 b/data/vim/patches/8.1.0268
new file mode 100644
index 000000000..5776b5d7a
--- /dev/null
+++ b/data/vim/patches/8.1.0268
@@ -0,0 +1,380 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0268
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0268
+Problem: File type checking has too many #ifdef.
+Solution: Always define the S_IF macros. (Ken Takata, closes #3306)
+Files: src/buffer.c, src/evalfunc.c, src/fileio.c, src/if_cscope.c,
+ src/os_unix.c, src/os_unix.h, src/vim.h
+
+
+*** ../vim-8.1.0267/src/buffer.c 2018-08-07 22:30:26.670240840 +0200
+--- src/buffer.c 2018-08-11 13:48:31.531925854 +0200
+***************
+*** 204,216 ****
+ #endif
+ #ifdef UNIX
+ perm = mch_getperm(curbuf->b_ffname);
+! if (perm >= 0 && (0
+! # ifdef S_ISFIFO
+! || S_ISFIFO(perm)
+! # endif
+! # ifdef S_ISSOCK
+ || S_ISSOCK(perm)
+- # endif
+ # ifdef OPEN_CHR_FILES
+ || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname))
+ # endif
+--- 204,211 ----
+ #endif
+ #ifdef UNIX
+ perm = mch_getperm(curbuf->b_ffname);
+! if (perm >= 0 && (S_ISFIFO(perm)
+ || S_ISSOCK(perm)
+ # ifdef OPEN_CHR_FILES
+ || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname))
+ # endif
+*** ../vim-8.1.0267/src/evalfunc.c 2018-08-09 22:08:53.017560100 +0200
+--- src/evalfunc.c 2018-08-11 13:48:31.535925823 +0200
+***************
+*** 5088,5150 ****
+ rettv->v_type = VAR_STRING;
+ if (mch_lstat((char *)fname, &st) >= 0)
+ {
+- #ifdef S_ISREG
+ if (S_ISREG(st.st_mode))
+ t = "file";
+ else if (S_ISDIR(st.st_mode))
+ t = "dir";
+- # ifdef S_ISLNK
+ else if (S_ISLNK(st.st_mode))
+ t = "link";
+- # endif
+- # ifdef S_ISBLK
+ else if (S_ISBLK(st.st_mode))
+ t = "bdev";
+- # endif
+- # ifdef S_ISCHR
+ else if (S_ISCHR(st.st_mode))
+ t = "cdev";
+- # endif
+- # ifdef S_ISFIFO
+ else if (S_ISFIFO(st.st_mode))
+ t = "fifo";
+- # endif
+- # ifdef S_ISSOCK
+ else if (S_ISSOCK(st.st_mode))
+ t = "socket";
+- # endif
+ else
+ t = "other";
+- #else
+- # ifdef S_IFMT
+- switch (st.st_mode & S_IFMT)
+- {
+- case S_IFREG: t = "file"; break;
+- case S_IFDIR: t = "dir"; break;
+- # ifdef S_IFLNK
+- case S_IFLNK: t = "link"; break;
+- # endif
+- # ifdef S_IFBLK
+- case S_IFBLK: t = "bdev"; break;
+- # endif
+- # ifdef S_IFCHR
+- case S_IFCHR: t = "cdev"; break;
+- # endif
+- # ifdef S_IFIFO
+- case S_IFIFO: t = "fifo"; break;
+- # endif
+- # ifdef S_IFSOCK
+- case S_IFSOCK: t = "socket"; break;
+- # endif
+- default: t = "other";
+- }
+- # else
+- if (mch_isdir(fname))
+- t = "dir";
+- else
+- t = "file";
+- # endif
+- #endif
+ type = vim_strsave((char_u *)t);
+ }
+ rettv->vval.v_string = type;
+--- 5088,5109 ----
+*** ../vim-8.1.0267/src/fileio.c 2018-08-07 21:39:09.247060119 +0200
+--- src/fileio.c 2018-08-11 13:48:31.535925823 +0200
+***************
+*** 424,435 ****
+ */
+ perm = mch_getperm(fname);
+ if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
+- # ifdef S_ISFIFO
+ && !S_ISFIFO(perm) /* ... or fifo */
+- # endif
+- # ifdef S_ISSOCK
+ && !S_ISSOCK(perm) /* ... or socket */
+- # endif
+ # ifdef OPEN_CHR_FILES
+ && !(S_ISCHR(perm) && is_dev_fd_file(fname))
+ /* ... or a character special file named /dev/fd/<n> */
+--- 424,431 ----
+***************
+*** 2497,2524 ****
+ c = FALSE;
+
+ #ifdef UNIX
+! # ifdef S_ISFIFO
+! if (S_ISFIFO(perm)) /* fifo or socket */
+! {
+! STRCAT(IObuff, _("[fifo/socket]"));
+! c = TRUE;
+! }
+! # else
+! # ifdef S_IFIFO
+! if ((perm & S_IFMT) == S_IFIFO) /* fifo */
+ {
+ STRCAT(IObuff, _("[fifo]"));
+ c = TRUE;
+ }
+! # endif
+! # ifdef S_IFSOCK
+! if ((perm & S_IFMT) == S_IFSOCK) /* or socket */
+ {
+ STRCAT(IObuff, _("[socket]"));
+ c = TRUE;
+ }
+- # endif
+- # endif
+ # ifdef OPEN_CHR_FILES
+ if (S_ISCHR(perm)) /* or character special */
+ {
+--- 2493,2508 ----
+ c = FALSE;
+
+ #ifdef UNIX
+! if (S_ISFIFO(perm)) /* fifo */
+ {
+ STRCAT(IObuff, _("[fifo]"));
+ c = TRUE;
+ }
+! if (S_ISSOCK(perm)) /* or socket */
+ {
+ STRCAT(IObuff, _("[socket]"));
+ c = TRUE;
+ }
+ # ifdef OPEN_CHR_FILES
+ if (S_ISCHR(perm)) /* or character special */
+ {
+*** ../vim-8.1.0267/src/if_cscope.c 2018-07-25 21:19:09.363656976 +0200
+--- src/if_cscope.c 2018-08-11 13:48:31.539925791 +0200
+***************
+*** 550,556 ****
+ }
+
+ /* if filename is a directory, append the cscope database name to it */
+! if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
+ {
+ fname2 = (char *)alloc((unsigned)(strlen(CSCOPE_DBFILE) + strlen(fname) + 2));
+ if (fname2 == NULL)
+--- 550,556 ----
+ }
+
+ /* if filename is a directory, append the cscope database name to it */
+! if (S_ISDIR(statbuf.st_mode))
+ {
+ fname2 = (char *)alloc((unsigned)(strlen(CSCOPE_DBFILE) + strlen(fname) + 2));
+ if (fname2 == NULL)
+***************
+*** 581,592 ****
+
+ i = cs_insert_filelist(fname2, ppath, flags, &statbuf);
+ }
+- #if defined(UNIX)
+ else if (S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode))
+- #else
+- /* WIN32 - substitute define S_ISREG from os_unix.h */
+- else if (((statbuf.st_mode) & S_IFMT) == S_IFREG)
+- #endif
+ {
+ i = cs_insert_filelist(fname, ppath, flags, &statbuf);
+ }
+--- 581,587 ----
+*** ../vim-8.1.0267/src/os_unix.c 2018-08-07 22:30:26.666240863 +0200
+--- src/os_unix.c 2018-08-11 13:48:31.539925791 +0200
+***************
+*** 3138,3148 ****
+ return FALSE;
+ if (stat((char *)name, &statb))
+ return FALSE;
+- #ifdef _POSIX_SOURCE
+ return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
+- #else
+- return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE);
+- #endif
+ }
+
+ /*
+--- 3138,3144 ----
+***************
+*** 3159,3169 ****
+ return FALSE;
+ if (mch_lstat((char *)name, &statb))
+ return FALSE;
+- #ifdef _POSIX_SOURCE
+ return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
+- #else
+- return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE);
+- #endif
+ }
+
+ static int executable_file(char_u *name);
+--- 3155,3161 ----
+*** ../vim-8.1.0267/src/os_unix.h 2018-02-28 23:12:59.000000000 +0100
+--- src/os_unix.h 2018-08-11 13:48:31.539925791 +0200
+***************
+*** 458,482 ****
+ # endif
+ #endif
+
+- #if !defined(S_ISDIR) && defined(S_IFDIR)
+- # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+- #endif
+- #if !defined(S_ISREG) && defined(S_IFREG)
+- # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+- #endif
+- #if !defined(S_ISBLK) && defined(S_IFBLK)
+- # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+- #endif
+- #if !defined(S_ISSOCK) && defined(S_IFSOCK)
+- # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+- #endif
+- #if !defined(S_ISFIFO) && defined(S_IFIFO)
+- # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+- #endif
+- #if !defined(S_ISCHR) && defined(S_IFCHR)
+- # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+- #endif
+-
+ /* Note: Some systems need both string.h and strings.h (Savage). However,
+ * some systems can't handle both, only use string.h in that case. */
+ #ifdef HAVE_STRING_H
+--- 458,463 ----
+*** ../vim-8.1.0267/src/vim.h 2018-08-07 22:42:48.965416564 +0200
+--- src/vim.h 2018-08-11 13:48:31.539925791 +0200
+***************
+*** 2290,2304 ****
+
+ #endif
+
+- /* ISSYMLINK(mode) tests if a file is a symbolic link. */
+- #if (defined(S_IFMT) && defined(S_IFLNK)) || defined(S_ISLNK)
+- # define HAVE_ISSYMLINK
+- # if defined(S_IFMT) && defined(S_IFLNK)
+- # define ISSYMLINK(mode) (((mode) & S_IFMT) == S_IFLNK)
+- # else
+- # define ISSYMLINK(mode) S_ISLNK(mode)
+- # endif
+- #endif
+
+ #define SIGN_BYTE 1 /* byte value used where sign is displayed;
+ attribute value is sign type */
+--- 2290,2295 ----
+***************
+*** 2517,2526 ****
+
+ /* BSD is supposed to cover FreeBSD and similar systems. */
+ #if (defined(SUN_SYSTEM) || defined(BSD) || defined(__FreeBSD_kernel__)) \
+! && defined(S_ISCHR)
+ # define OPEN_CHR_FILES
+ #endif
+
+ #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
+ # define ELAPSED_TIMEVAL
+ # define ELAPSED_INIT(v) gettimeofday(&v, NULL)
+--- 2508,2568 ----
+
+ /* BSD is supposed to cover FreeBSD and similar systems. */
+ #if (defined(SUN_SYSTEM) || defined(BSD) || defined(__FreeBSD_kernel__)) \
+! && (defined(S_ISCHR) || defined(S_IFCHR))
+ # define OPEN_CHR_FILES
+ #endif
+
++ /* stat macros */
++ #ifndef S_ISDIR
++ # ifdef S_IFDIR
++ # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
++ # else
++ # define S_ISDIR(m) 0
++ # endif
++ #endif
++ #ifndef S_ISREG
++ # ifdef S_IFREG
++ # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
++ # else
++ # define S_ISREG(m) 0
++ # endif
++ #endif
++ #ifndef S_ISBLK
++ # ifdef S_IFBLK
++ # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
++ # else
++ # define S_ISBLK(m) 0
++ # endif
++ #endif
++ #ifndef S_ISSOCK
++ # ifdef S_IFSOCK
++ # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
++ # else
++ # define S_ISSOCK(m) 0
++ # endif
++ #endif
++ #ifndef S_ISFIFO
++ # ifdef S_IFIFO
++ # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
++ # else
++ # define S_ISFIFO(m) 0
++ # endif
++ #endif
++ #ifndef S_ISCHR
++ # ifdef S_IFCHR
++ # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
++ # else
++ # define S_ISCHR(m) 0
++ # endif
++ #endif
++ #ifndef S_ISLNK
++ # ifdef S_IFLNK
++ # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
++ # else
++ # define S_ISLNK(m) 0
++ # endif
++ #endif
++
+ #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
+ # define ELAPSED_TIMEVAL
+ # define ELAPSED_INIT(v) gettimeofday(&v, NULL)
+*** ../vim-8.1.0267/src/version.c 2018-08-11 13:36:51.806140673 +0200
+--- src/version.c 2018-08-11 13:49:48.951318065 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 268,
+ /**/
+
+--
+Q: What kind of stuff do you do?
+A: I collect hobbies.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0269 b/data/vim/patches/8.1.0269
new file mode 100644
index 000000000..d516f7c30
--- /dev/null
+++ b/data/vim/patches/8.1.0269
@@ -0,0 +1,127 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0269
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0269
+Problem: Ruby Kernel.#p method always returns nil.
+Solution: Copy p method implementation from Ruby code. (Masataka Pocke
+ Kuwabara, closes #3315)
+Files: src/if_ruby.c, src/testdir/test_ruby.vim
+
+
+*** ../vim-8.1.0268/src/if_ruby.c 2018-08-04 17:24:39.062825210 +0200
+--- src/if_ruby.c 2018-08-11 14:23:48.613860602 +0200
+***************
+*** 299,304 ****
+--- 299,309 ----
+ # define rb_string_value_ptr dll_rb_string_value_ptr
+ # define rb_float_new dll_rb_float_new
+ # define rb_ary_new dll_rb_ary_new
++ # ifdef rb_ary_new4
++ # define RB_ARY_NEW4_MACRO 1
++ # undef rb_ary_new4
++ # endif
++ # define rb_ary_new4 dll_rb_ary_new4
+ # define rb_ary_push dll_rb_ary_push
+ # if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
+ # ifdef __ia64
+***************
+*** 441,446 ****
+--- 446,452 ----
+ static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
+ static VALUE (*dll_rb_float_new) (double);
+ static VALUE (*dll_rb_ary_new) (void);
++ static VALUE (*dll_rb_ary_new4) (long n, const VALUE *elts);
+ static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
+ # if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
+ # ifdef __ia64
+***************
+*** 647,652 ****
+--- 653,663 ----
+ {"rb_float_new_in_heap", (RUBY_PROC*)&dll_rb_float_new},
+ # endif
+ {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new},
++ # ifdef RB_ARY_NEW4_MACRO
++ {"rb_ary_new_from_values", (RUBY_PROC*)&dll_rb_ary_new4},
++ # else
++ {"rb_ary_new4", (RUBY_PROC*)&dll_rb_ary_new4},
++ # endif
+ {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
+ # endif
+ # ifdef RUBY19_OR_LATER
+***************
+*** 1577,1582 ****
+--- 1588,1594 ----
+ {
+ int i;
+ VALUE str = rb_str_new("", 0);
++ VALUE ret = Qnil;
+
+ for (i = 0; i < argc; i++)
+ {
+***************
+*** 1584,1590 ****
+ rb_str_concat(str, rb_inspect(argv[i]));
+ }
+ MSG(RSTRING_PTR(str));
+! return Qnil;
+ }
+
+ static void ruby_io_init(void)
+--- 1596,1607 ----
+ rb_str_concat(str, rb_inspect(argv[i]));
+ }
+ MSG(RSTRING_PTR(str));
+!
+! if (argc == 1)
+! ret = argv[0];
+! else if (argc > 1)
+! ret = rb_ary_new4(argc, argv);
+! return ret;
+ }
+
+ static void ruby_io_init(void)
+*** ../vim-8.1.0268/src/testdir/test_ruby.vim 2018-07-28 17:29:15.757096343 +0200
+--- src/testdir/test_ruby.vim 2018-08-11 14:17:07.396211894 +0200
+***************
+*** 363,366 ****
+--- 363,379 ----
+ ruby p 'Just a test'
+ let messages = split(execute('message'), "\n")
+ call assert_equal('"Just a test"', messages[-1])
++
++ " Check return values of p method
++
++ call assert_equal('123', RubyEval('p(123)'))
++ call assert_equal('[1, 2, 3]', RubyEval('p(1, 2, 3)'))
++
++ " Avoid the "message maintainer" line.
++ let $LANG = ''
++ messages clear
++ call assert_equal('true', RubyEval('p() == nil'))
++
++ let messages = split(execute('message'), "\n")
++ call assert_equal(0, len(messages))
+ endfunc
+*** ../vim-8.1.0268/src/version.c 2018-08-11 13:57:16.215969777 +0200
+--- src/version.c 2018-08-11 14:22:56.922175770 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 269,
+ /**/
+
+--
+SIGFUN -- signature too funny (core dumped)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0270 b/data/vim/patches/8.1.0270
new file mode 100644
index 000000000..63d9e3a86
--- /dev/null
+++ b/data/vim/patches/8.1.0270
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0270
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0270
+Problem: Checking for a Tab in a line could be faster.
+Solution: Use strchr() instead of strrchr(). (closes #3312)
+Files: src/ex_cmds.c
+
+
+*** ../vim-8.1.0269/src/ex_cmds.c 2018-08-02 22:23:53.342591238 +0200
+--- src/ex_cmds.c 2018-08-11 14:39:13.611943727 +0200
+***************
+*** 281,287 ****
+ *last = NUL;
+ len = linetabsize(line); /* get line length */
+ if (has_tab != NULL) /* check for embedded TAB */
+! *has_tab = (vim_strrchr(first, TAB) != NULL);
+ *last = save;
+
+ return len;
+--- 281,287 ----
+ *last = NUL;
+ len = linetabsize(line); /* get line length */
+ if (has_tab != NULL) /* check for embedded TAB */
+! *has_tab = (vim_strchr(first, TAB) != NULL);
+ *last = save;
+
+ return len;
+*** ../vim-8.1.0269/src/version.c 2018-08-11 14:24:06.945748177 +0200
+--- src/version.c 2018-08-11 14:41:05.107212697 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 270,
+ /**/
+
+--
+BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
+ARTHUR: What do you mean? An African or European swallow?
+BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh!
+ BRIDGEKEEPER is cast into the gorge.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0271 b/data/vim/patches/8.1.0271
new file mode 100644
index 000000000..53b7c4942
--- /dev/null
+++ b/data/vim/patches/8.1.0271
@@ -0,0 +1,489 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0271
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0271
+Problem: 'incsearch' doesn't work for :s, :g or :v.
+Solution: Also use 'incsearch' for other commands that use a pattern.
+Files: src/ex_getln.c, src/globals.h, src/screen.c,
+ src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0270/src/ex_getln.c 2018-08-10 22:07:28.821903829 +0200
+--- src/ex_getln.c 2018-08-11 16:16:52.578317070 +0200
+***************
+*** 264,274 ****
+
+ /*
+ * Return TRUE when 'incsearch' highlighting is to be done.
+ */
+ static int
+! do_incsearch_highlighting(int firstc)
+ {
+! return p_is && !cmd_silent && (firstc == '/' || firstc == '?');
+ }
+
+ /*
+--- 264,341 ----
+
+ /*
+ * Return TRUE when 'incsearch' highlighting is to be done.
++ * Sets search_first_line and search_last_line to the address range.
+ */
+ static int
+! do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
+! int *skiplen, int *patlen)
+ {
+! *skiplen = 0;
+! *patlen = ccline.cmdlen;
+!
+! if (p_is && !cmd_silent)
+! {
+! // by default search all lines
+! search_first_line = 0;
+! search_last_line = MAXLNUM;
+!
+! if (firstc == '/' || firstc == '?')
+! return TRUE;
+! if (firstc == ':')
+! {
+! char_u *cmd = skip_range(ccline.cmdbuff, NULL);
+! char_u *p;
+! int delim;
+! char_u *end;
+!
+! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v')
+! {
+! // Skip over "substitute" to find the pattern separator.
+! for (p = cmd; ASCII_ISALPHA(*p); ++p)
+! ;
+! if (*p != NUL)
+! {
+! delim = *p++;
+! end = skip_regexp(p, delim, p_magic, NULL);
+! if (end > p)
+! {
+! char_u *dummy;
+! exarg_T ea;
+! pos_T save_cursor = curwin->w_cursor;
+!
+! // found a non-empty pattern
+! *skiplen = (int)(p - ccline.cmdbuff);
+! *patlen = (int)(end - p);
+!
+! // parse the address range
+! vim_memset(&ea, 0, sizeof(ea));
+! ea.line1 = 1;
+! ea.line2 = 1;
+! ea.cmd = ccline.cmdbuff;
+! ea.addr_type = ADDR_LINES;
+! parse_cmd_address(&ea, &dummy);
+! curwin->w_cursor = is_state->search_start;
+! if (ea.addr_count > 0)
+! {
+! search_first_line = ea.line1;
+! search_last_line = ea.line2;
+! }
+! else if (*cmd == 's')
+! {
+! // :s defaults to the current line
+! search_first_line = curwin->w_cursor.lnum;
+! search_last_line = curwin->w_cursor.lnum;
+! }
+!
+! curwin->w_cursor = save_cursor;
+! return TRUE;
+! }
+! }
+! }
+! }
+! }
+!
+! return FALSE;
+ }
+
+ /*
+***************
+*** 280,293 ****
+ long count,
+ incsearch_state_T *is_state)
+ {
+ int i;
+ pos_T end_pos;
+ struct cmdline_info save_ccline;
+ #ifdef FEAT_RELTIME
+ proftime_T tm;
+ #endif
+
+! if (!do_incsearch_highlighting(firstc))
+ return;
+
+ // If there is a character waiting, search and redraw later.
+--- 347,362 ----
+ long count,
+ incsearch_state_T *is_state)
+ {
++ int skiplen, patlen;
+ int i;
+ pos_T end_pos;
+ struct cmdline_info save_ccline;
+ #ifdef FEAT_RELTIME
+ proftime_T tm;
+ #endif
++ int c;
+
+! if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+ return;
+
+ // If there is a character waiting, search and redraw later.
+***************
+*** 298,309 ****
+ }
+ is_state->incsearch_postponed = FALSE;
+
+! // start at old position
+! curwin->w_cursor = is_state->search_start;
+ save_last_search_pattern();
+
+ // If there is no command line, don't do anything.
+! if (ccline.cmdlen == 0)
+ {
+ i = 0;
+ set_no_hlsearch(TRUE); // turn off previous highlight
+--- 367,385 ----
+ }
+ is_state->incsearch_postponed = FALSE;
+
+! if (search_first_line == 0)
+! // start at the original cursor position
+! curwin->w_cursor = is_state->search_start;
+! else
+! {
+! // start at the first line in the range
+! curwin->w_cursor.lnum = search_first_line;
+! curwin->w_cursor.col = 0;
+! }
+ save_last_search_pattern();
+
+ // If there is no command line, don't do anything.
+! if (patlen == 0)
+ {
+ i = 0;
+ set_no_hlsearch(TRUE); // turn off previous highlight
+***************
+*** 322,336 ****
+ #endif
+ if (!p_hls)
+ search_flags += SEARCH_KEEP;
+! i = do_search(NULL, firstc, ccline.cmdbuff, count, search_flags,
+ #ifdef FEAT_RELTIME
+ &tm, NULL
+ #else
+ NULL, NULL
+ #endif
+ );
+ --emsg_off;
+
+ // if interrupted while searching, behave like it failed
+ if (got_int)
+ {
+--- 398,421 ----
+ #endif
+ if (!p_hls)
+ search_flags += SEARCH_KEEP;
+! c = ccline.cmdbuff[skiplen + patlen];
+! ccline.cmdbuff[skiplen + patlen] = NUL;
+! i = do_search(NULL, firstc == ':' ? '/' : firstc,
+! ccline.cmdbuff + skiplen, count, search_flags,
+ #ifdef FEAT_RELTIME
+ &tm, NULL
+ #else
+ NULL, NULL
+ #endif
+ );
++ ccline.cmdbuff[skiplen + patlen] = c;
+ --emsg_off;
+
++ if (curwin->w_cursor.lnum < search_first_line
++ || curwin->w_cursor.lnum > search_last_line)
++ // match outside of address range
++ i = 0;
++
+ // if interrupted while searching, behave like it failed
+ if (got_int)
+ {
+***************
+*** 369,376 ****
+--- 454,464 ----
+
+ // Disable 'hlsearch' highlighting if the pattern matches everything.
+ // Avoids a flash when typing "foo\|".
++ c = ccline.cmdbuff[skiplen + patlen];
++ ccline.cmdbuff[skiplen + patlen] = NUL;
+ if (empty_pattern(ccline.cmdbuff))
+ set_no_hlsearch(TRUE);
++ ccline.cmdbuff[skiplen + patlen] = c;
+
+ validate_cursor();
+ // May redraw the status line to show the cursor position.
+***************
+*** 398,422 ****
+ */
+ static int
+ may_adjust_incsearch_highlighting(
+! int firstc,
+! long count,
+ incsearch_state_T *is_state,
+! int c)
+ {
+ pos_T t;
+ char_u *pat;
+ int search_flags = SEARCH_NOOF;
+ int i;
+
+! if (!do_incsearch_highlighting(firstc))
+ return OK;
+! if (ccline.cmdlen == 0)
+ return FAIL;
+
+! if (firstc == ccline.cmdbuff[0])
+ pat = last_search_pattern();
+ else
+! pat = ccline.cmdbuff;
+
+ save_last_search_pattern();
+ cursor_off();
+--- 486,512 ----
+ */
+ static int
+ may_adjust_incsearch_highlighting(
+! int firstc,
+! long count,
+ incsearch_state_T *is_state,
+! int c)
+ {
++ int skiplen, patlen;
+ pos_T t;
+ char_u *pat;
+ int search_flags = SEARCH_NOOF;
+ int i;
++ int save;
+
+! if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+ return OK;
+! if (patlen == 0 && ccline.cmdbuff[skiplen] == NUL)
+ return FAIL;
+
+! if (firstc == ccline.cmdbuff[skiplen])
+ pat = last_search_pattern();
+ else
+! pat = ccline.cmdbuff + skiplen;
+
+ save_last_search_pattern();
+ cursor_off();
+***************
+*** 435,451 ****
+ if (!p_hls)
+ search_flags += SEARCH_KEEP;
+ ++emsg_off;
+ i = searchit(curwin, curbuf, &t,
+ c == Ctrl_G ? FORWARD : BACKWARD,
+ pat, count, search_flags,
+ RE_SEARCH, 0, NULL, NULL);
+ --emsg_off;
+ if (i)
+ {
+ is_state->search_start = is_state->match_start;
+ is_state->match_end = t;
+ is_state->match_start = t;
+! if (c == Ctrl_T && firstc == '/')
+ {
+ // Move just before the current match, so that when nv_search
+ // finishes the cursor will be put back on the match.
+--- 525,544 ----
+ if (!p_hls)
+ search_flags += SEARCH_KEEP;
+ ++emsg_off;
++ save = pat[patlen];
++ pat[patlen] = NUL;
+ i = searchit(curwin, curbuf, &t,
+ c == Ctrl_G ? FORWARD : BACKWARD,
+ pat, count, search_flags,
+ RE_SEARCH, 0, NULL, NULL);
+ --emsg_off;
++ pat[patlen] = save;
+ if (i)
+ {
+ is_state->search_start = is_state->match_start;
+ is_state->match_end = t;
+ is_state->match_start = t;
+! if (c == Ctrl_T && firstc != '?')
+ {
+ // Move just before the current match, so that when nv_search
+ // finishes the cursor will be put back on the match.
+***************
+*** 493,499 ****
+ static int
+ may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state)
+ {
+! if (!do_incsearch_highlighting(firstc))
+ return FAIL;
+
+ // Add a character from under the cursor for 'incsearch'.
+--- 586,594 ----
+ static int
+ may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state)
+ {
+! int skiplen, patlen;
+!
+! if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+ return FAIL;
+
+ // Add a character from under the cursor for 'incsearch'.
+***************
+*** 507,513 ****
+ // If 'ignorecase' and 'smartcase' are set and the
+ // command line has no uppercase characters, convert
+ // the character to lowercase.
+! if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff))
+ *c = MB_TOLOWER(*c);
+ if (*c != NUL)
+ {
+--- 602,608 ----
+ // If 'ignorecase' and 'smartcase' are set and the
+ // command line has no uppercase characters, convert
+ // the character to lowercase.
+! if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff + skiplen))
+ *c = MB_TOLOWER(*c);
+ if (*c != NUL)
+ {
+*** ../vim-8.1.0270/src/globals.h 2018-07-29 16:09:14.644945560 +0200
+--- src/globals.h 2018-08-11 15:13:44.359706095 +0200
+***************
+*** 345,353 ****
+ * a match within one line), search_match_endcol the column number of the
+ * character just after the match in the last line.
+ */
+! EXTERN int highlight_match INIT(= FALSE); /* show search match pos */
+! EXTERN linenr_T search_match_lines; /* lines of of matched string */
+! EXTERN colnr_T search_match_endcol; /* col nr of match end */
+
+ EXTERN int no_smartcase INIT(= FALSE); /* don't use 'smartcase' once */
+
+--- 345,357 ----
+ * a match within one line), search_match_endcol the column number of the
+ * character just after the match in the last line.
+ */
+! EXTERN int highlight_match INIT(= FALSE); // show search match pos
+! EXTERN linenr_T search_match_lines; // lines of of matched string
+! EXTERN colnr_T search_match_endcol; // col nr of match end
+! #ifdef FEAT_SEARCH_EXTRA
+! EXTERN linenr_T search_first_line INIT(= 0); // for :{FIRST},{last}s/pat
+! EXTERN linenr_T search_last_line INIT(= MAXLNUM); // for :{first},{LAST}s/pat
+! #endif
+
+ EXTERN int no_smartcase INIT(= FALSE); /* don't use 'smartcase' once */
+
+*** ../vim-8.1.0270/src/screen.c 2018-07-29 17:35:19.493750319 +0200
+--- src/screen.c 2018-08-11 15:26:39.760558152 +0200
+***************
+*** 7892,7897 ****
+--- 7892,7904 ----
+ long nmatched;
+ int save_called_emsg = called_emsg;
+
++ // for :{range}s/pat only highlight inside the range
++ if (lnum < search_first_line || lnum > search_last_line)
++ {
++ shl->lnum = 0;
++ return;
++ }
++
+ if (shl->lnum != 0)
+ {
+ /* Check for three situations:
+*** ../vim-8.1.0270/src/testdir/test_search.vim 2018-07-14 17:24:57.681329029 +0200
+--- src/testdir/test_search.vim 2018-08-11 16:27:47.757683001 +0200
+***************
+*** 362,367 ****
+--- 362,419 ----
+ bw!
+ endfunc
+
++ func Cmdline3_prep()
++ " need to disable char_avail,
++ " so that expansion of commandline works
++ call test_override("char_avail", 1)
++ new
++ call setline(1, [' 1', ' 2 the~e', ' 3 the theother'])
++ set incsearch
++ endfunc
++
++ func Cmdline3_cleanup()
++ set noincsearch
++ call test_override("char_avail", 0)
++ bw!
++ endfunc
++
++ func Test_search_cmdline3s()
++ if !exists('+incsearch')
++ return
++ endif
++ call Cmdline3_prep()
++ 1
++ call feedkeys(":%s/the\<c-l>/xxx\<cr>", 'tx')
++ call assert_equal(' 2 xxxe', getline('.'))
++
++ call Cmdline3_cleanup()
++ endfunc
++
++ func Test_search_cmdline3g()
++ if !exists('+incsearch')
++ return
++ endif
++ call Cmdline3_prep()
++ 1
++ call feedkeys(":g/the\<c-l>/d\<cr>", 'tx')
++ call assert_equal(' 3 the theother', getline(2))
++
++ call Cmdline3_cleanup()
++ endfunc
++
++ func Test_search_cmdline3v()
++ if !exists('+incsearch')
++ return
++ endif
++ call Cmdline3_prep()
++ 1
++ call feedkeys(":v/the\<c-l>/d\<cr>", 'tx')
++ call assert_equal(1, line('$'))
++ call assert_equal(' 2 the~e', getline(1))
++
++ call Cmdline3_cleanup()
++ endfunc
++
+ func Test_search_cmdline4()
+ if !exists('+incsearch')
+ return
+*** ../vim-8.1.0270/src/version.c 2018-08-11 14:41:48.326928864 +0200
+--- src/version.c 2018-08-11 16:29:55.060807807 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 271,
+ /**/
+
+--
+Every exit is an entrance into something else.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0272 b/data/vim/patches/8.1.0272
new file mode 100644
index 000000000..3269f6134
--- /dev/null
+++ b/data/vim/patches/8.1.0272
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0272
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0272
+Problem: Options test fails if temp var ends in slash. (Tom Briden)
+Solution: Check for optional slash. (closes #3308)
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0271/src/testdir/test_options.vim 2018-06-24 16:53:31.649909925 +0200
+--- src/testdir/test_options.vim 2018-08-11 17:50:19.189469171 +0200
+***************
+*** 344,350 ****
+ for var in ['$TEMPDIR', '$TMP', '$TEMP']
+ if exists(var)
+ let varvalue = substitute(expand(var), '\\', '/', 'g')
+! call assert_match(varvalue . '.\*', bskvalue)
+ endif
+ endfor
+ endfunc
+--- 344,350 ----
+ for var in ['$TEMPDIR', '$TMP', '$TEMP']
+ if exists(var)
+ let varvalue = substitute(expand(var), '\\', '/', 'g')
+! call assert_match(varvalue . '/\=\*', bskvalue)
+ endif
+ endfor
+ endfunc
+*** ../vim-8.1.0271/src/version.c 2018-08-11 16:40:39.068311966 +0200
+--- src/version.c 2018-08-11 17:51:47.096827991 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 272,
+ /**/
+
+--
+It is illegal for a driver to be blindfolded while operating a vehicle.
+ [real standing law in Alabama, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0273 b/data/vim/patches/8.1.0273
new file mode 100644
index 000000000..afaf1822b
--- /dev/null
+++ b/data/vim/patches/8.1.0273
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0273
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0273
+Problem: Invalid memory access when using 'incsearch'.
+Solution: Reset "patlen" when using previous search pattern.
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0272/src/ex_getln.c 2018-08-11 16:40:39.064311995 +0200
+--- src/ex_getln.c 2018-08-11 18:56:30.997198115 +0200
+***************
+*** 504,510 ****
+--- 504,514 ----
+ return FAIL;
+
+ if (firstc == ccline.cmdbuff[skiplen])
++ {
+ pat = last_search_pattern();
++ skiplen = 0;
++ patlen = STRLEN(pat);
++ }
+ else
+ pat = ccline.cmdbuff + skiplen;
+
+*** ../vim-8.1.0272/src/version.c 2018-08-11 17:52:57.848311971 +0200
+--- src/version.c 2018-08-11 19:01:58.394713331 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 273,
+ /**/
+
+--
+It is illegal for anyone to try and stop a child from playfully jumping over
+puddles of water.
+ [real standing law in California, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0274 b/data/vim/patches/8.1.0274
new file mode 100644
index 000000000..d63003f4d
--- /dev/null
+++ b/data/vim/patches/8.1.0274
@@ -0,0 +1,166 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0274
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0274
+Problem: 'incsearch' triggers on ":source".
+Solution: Check for the whole command name.
+Files: src/ex_getln.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0273/src/ex_getln.c 2018-08-11 19:02:18.038566056 +0200
+--- src/ex_getln.c 2018-08-11 19:08:55.639612407 +0200
+***************
+*** 293,299 ****
+ // Skip over "substitute" to find the pattern separator.
+ for (p = cmd; ASCII_ISALPHA(*p); ++p)
+ ;
+! if (*p != NUL)
+ {
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+--- 293,302 ----
+ // Skip over "substitute" to find the pattern separator.
+ for (p = cmd; ASCII_ISALPHA(*p); ++p)
+ ;
+! if (*p != NUL
+! && (STRNCMP(cmd, "substitute", p - cmd) == 0
+! || STRNCMP(cmd, "global", p - cmd) == 0
+! || STRNCMP(cmd, "vglobal", p - cmd) == 0))
+ {
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+*** ../vim-8.1.0273/src/testdir/test_search.vim 2018-08-11 16:40:39.068311966 +0200
+--- src/testdir/test_search.vim 2018-08-11 19:11:57.066276471 +0200
+***************
+*** 342,367 ****
+ bw!
+ endfunc
+
+- func Test_search_cmdline3()
+- if !exists('+incsearch')
+- return
+- endif
+- " need to disable char_avail,
+- " so that expansion of commandline works
+- call test_override("char_avail", 1)
+- new
+- call setline(1, [' 1', ' 2 the~e', ' 3 the theother'])
+- set incsearch
+- 1
+- " first match
+- call feedkeys("/the\<c-l>\<cr>", 'tx')
+- call assert_equal(' 2 the~e', getline('.'))
+- " clean up
+- set noincsearch
+- call test_override("char_avail", 0)
+- bw!
+- endfunc
+-
+ func Cmdline3_prep()
+ " need to disable char_avail,
+ " so that expansion of commandline works
+--- 342,347 ----
+***************
+*** 377,382 ****
+--- 357,375 ----
+ bw!
+ endfunc
+
++ func Test_search_cmdline3()
++ if !exists('+incsearch')
++ return
++ endif
++ call Cmdline3_prep()
++ 1
++ " first match
++ call feedkeys("/the\<c-l>\<cr>", 'tx')
++ call assert_equal(' 2 the~e', getline('.'))
++
++ call Cmdline3_cleanup()
++ endfunc
++
+ func Test_search_cmdline3s()
+ if !exists('+incsearch')
+ return
+***************
+*** 385,390 ****
+--- 378,389 ----
+ 1
+ call feedkeys(":%s/the\<c-l>/xxx\<cr>", 'tx')
+ call assert_equal(' 2 xxxe', getline('.'))
++ undo
++ call feedkeys(":%subs/the\<c-l>/xxx\<cr>", 'tx')
++ call assert_equal(' 2 xxxe', getline('.'))
++ undo
++ call feedkeys(":%substitute/the\<c-l>/xxx\<cr>", 'tx')
++ call assert_equal(' 2 xxxe', getline('.'))
+
+ call Cmdline3_cleanup()
+ endfunc
+***************
+*** 397,402 ****
+--- 396,404 ----
+ 1
+ call feedkeys(":g/the\<c-l>/d\<cr>", 'tx')
+ call assert_equal(' 3 the theother', getline(2))
++ undo
++ call feedkeys(":global/the\<c-l>/d\<cr>", 'tx')
++ call assert_equal(' 3 the theother', getline(2))
+
+ call Cmdline3_cleanup()
+ endfunc
+***************
+*** 410,415 ****
+--- 412,421 ----
+ call feedkeys(":v/the\<c-l>/d\<cr>", 'tx')
+ call assert_equal(1, line('$'))
+ call assert_equal(' 2 the~e', getline(1))
++ undo
++ call feedkeys(":vglobal/the\<c-l>/d\<cr>", 'tx')
++ call assert_equal(1, line('$'))
++ call assert_equal(' 2 the~e', getline(1))
+
+ call Cmdline3_cleanup()
+ endfunc
+***************
+*** 518,524 ****
+ " so that expansion of commandline works
+ call test_override("char_avail", 1)
+ new
+! let @/='b'
+ call setline(1, [' bbvimb', ''])
+ set incsearch
+ " first match
+--- 524,530 ----
+ " so that expansion of commandline works
+ call test_override("char_avail", 1)
+ new
+! let @/ = 'b'
+ call setline(1, [' bbvimb', ''])
+ set incsearch
+ " first match
+*** ../vim-8.1.0273/src/version.c 2018-08-11 19:02:18.038566056 +0200
+--- src/version.c 2018-08-11 19:11:29.546478790 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 274,
+ /**/
+
+--
+You can be stopped by the police for biking over 65 miles per hour.
+You are not allowed to walk across a street on your hands.
+ [real standing laws in Connecticut, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0275 b/data/vim/patches/8.1.0275
new file mode 100644
index 000000000..6617c72f0
--- /dev/null
+++ b/data/vim/patches/8.1.0275
@@ -0,0 +1,185 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0275
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0275
+Problem: 'incsearch' with :s doesn't start at cursor line.
+Solution: Set cursor before parsing address. (closes #3318)
+ Also accept a match at the start of the first line.
+Files: src/ex_getln.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0274/src/ex_getln.c 2018-08-11 19:20:45.042561404 +0200
+--- src/ex_getln.c 2018-08-12 15:48:20.176044564 +0200
+***************
+*** 316,323 ****
+ ea.line2 = 1;
+ ea.cmd = ccline.cmdbuff;
+ ea.addr_type = ADDR_LINES;
+- parse_cmd_address(&ea, &dummy);
+ curwin->w_cursor = is_state->search_start;
+ if (ea.addr_count > 0)
+ {
+ search_first_line = ea.line1;
+--- 316,323 ----
+ ea.line2 = 1;
+ ea.cmd = ccline.cmdbuff;
+ ea.addr_type = ADDR_LINES;
+ curwin->w_cursor = is_state->search_start;
++ parse_cmd_address(&ea, &dummy);
+ if (ea.addr_count > 0)
+ {
+ search_first_line = ea.line1;
+***************
+*** 401,406 ****
+--- 401,408 ----
+ #endif
+ if (!p_hls)
+ search_flags += SEARCH_KEEP;
++ if (search_first_line != 0)
++ search_flags += SEARCH_START;
+ c = ccline.cmdbuff[skiplen + patlen];
+ ccline.cmdbuff[skiplen + patlen] = NUL;
+ i = do_search(NULL, firstc == ':' ? '/' : firstc,
+*** ../vim-8.1.0274/src/testdir/test_search.vim 2018-08-11 19:20:45.042561404 +0200
+--- src/testdir/test_search.vim 2018-08-12 15:24:06.430745257 +0200
+***************
+*** 351,357 ****
+ set incsearch
+ endfunc
+
+! func Cmdline3_cleanup()
+ set noincsearch
+ call test_override("char_avail", 0)
+ bw!
+--- 351,357 ----
+ set incsearch
+ endfunc
+
+! func Incsearch_cleanup()
+ set noincsearch
+ call test_override("char_avail", 0)
+ bw!
+***************
+*** 367,373 ****
+ call feedkeys("/the\<c-l>\<cr>", 'tx')
+ call assert_equal(' 2 the~e', getline('.'))
+
+! call Cmdline3_cleanup()
+ endfunc
+
+ func Test_search_cmdline3s()
+--- 367,373 ----
+ call feedkeys("/the\<c-l>\<cr>", 'tx')
+ call assert_equal(' 2 the~e', getline('.'))
+
+! call Incsearch_cleanup()
+ endfunc
+
+ func Test_search_cmdline3s()
+***************
+*** 385,391 ****
+ call feedkeys(":%substitute/the\<c-l>/xxx\<cr>", 'tx')
+ call assert_equal(' 2 xxxe', getline('.'))
+
+! call Cmdline3_cleanup()
+ endfunc
+
+ func Test_search_cmdline3g()
+--- 385,391 ----
+ call feedkeys(":%substitute/the\<c-l>/xxx\<cr>", 'tx')
+ call assert_equal(' 2 xxxe', getline('.'))
+
+! call Incsearch_cleanup()
+ endfunc
+
+ func Test_search_cmdline3g()
+***************
+*** 400,406 ****
+ call feedkeys(":global/the\<c-l>/d\<cr>", 'tx')
+ call assert_equal(' 3 the theother', getline(2))
+
+! call Cmdline3_cleanup()
+ endfunc
+
+ func Test_search_cmdline3v()
+--- 400,406 ----
+ call feedkeys(":global/the\<c-l>/d\<cr>", 'tx')
+ call assert_equal(' 3 the theother', getline(2))
+
+! call Incsearch_cleanup()
+ endfunc
+
+ func Test_search_cmdline3v()
+***************
+*** 417,423 ****
+ call assert_equal(1, line('$'))
+ call assert_equal(' 2 the~e', getline(1))
+
+! call Cmdline3_cleanup()
+ endfunc
+
+ func Test_search_cmdline4()
+--- 417,423 ----
+ call assert_equal(1, line('$'))
+ call assert_equal(' 2 the~e', getline(1))
+
+! call Incsearch_cleanup()
+ endfunc
+
+ func Test_search_cmdline4()
+***************
+*** 797,802 ****
+--- 797,823 ----
+ call delete('Xscript')
+ endfunc
+
++ func Test_incsearch_substitute()
++ if !exists('+incsearch')
++ return
++ endif
++ call test_override("char_avail", 1)
++ new
++ set incsearch
++ for n in range(1, 10)
++ call setline(n, 'foo ' . n)
++ endfor
++ 4
++ call feedkeys(":.,.+2s/foo\<BS>o\<BS>o/xxx\<cr>", 'tx')
++ call assert_equal('foo 3', getline(3))
++ call assert_equal('xxx 4', getline(4))
++ call assert_equal('xxx 5', getline(5))
++ call assert_equal('xxx 6', getline(6))
++ call assert_equal('foo 7', getline(7))
++
++ call Incsearch_cleanup()
++ endfunc
++
+ func Test_search_undefined_behaviour()
+ if !has("terminal")
+ return
+*** ../vim-8.1.0274/src/version.c 2018-08-11 19:20:45.042561404 +0200
+--- src/version.c 2018-08-12 15:29:30.772309260 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 275,
+ /**/
+
+--
+Any sufficiently advanced technology is indistinguishable from magic.
+ Arthur C. Clarke
+Any sufficiently advanced bug is indistinguishable from a feature.
+ Rich Kulawiec
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0276 b/data/vim/patches/8.1.0276
new file mode 100644
index 000000000..469907c7a
--- /dev/null
+++ b/data/vim/patches/8.1.0276
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0276
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0276
+Problem: No test for 'incsearch' highlighting with :s.
+Solution: Add a screendump test.
+Files: src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_01.dump
+
+
+*** ../vim-8.1.0275/src/testdir/test_search.vim 2018-08-12 15:49:33.555438382 +0200
+--- src/testdir/test_search.vim 2018-08-12 16:25:27.296040799 +0200
+***************
+*** 818,823 ****
+--- 818,858 ----
+ call Incsearch_cleanup()
+ endfunc
+
++ " Similar to Test_incsearch_substitute() but with a screendump halfway.
++ func Test_incsearch_substitute_dump()
++ if !exists('+incsearch')
++ return
++ endif
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ 'set incsearch hlsearch scrolloff=0',
++ \ 'for n in range(1, 10)',
++ \ ' call setline(n, "foo " . n)',
++ \ 'endfor',
++ \ '3',
++ \ ], 'Xis_subst_script')
++ let buf = RunVimInTerminal('-S Xis_subst_script', {'rows': 9, 'cols': 70})
++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
++ " the 'ambiwidth' check.
++ sleep 100m
++
++ " Need to send one key at a time to force a redraw.
++ call term_sendkeys(buf, ':.,.+2s/')
++ sleep 100m
++ call term_sendkeys(buf, 'f')
++ sleep 100m
++ call term_sendkeys(buf, 'o')
++ sleep 100m
++ call term_sendkeys(buf, 'o')
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {})
++
++ call term_sendkeys(buf, "\<Esc>")
++ call StopVimInTerminal(buf)
++ call delete('Xis_subst_script')
++ endfunc
++
+ func Test_search_undefined_behaviour()
+ if !has("terminal")
+ return
+*** ../vim-8.1.0275/src/testdir/dumps/Test_incsearch_substitute_01.dump 2018-08-12 16:26:20.299815699 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_01.dump 2018-08-12 16:14:00.068277624 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |1| @64
++ |f|o@1| |2| @64
++ |f+1&&|o@1| +0&&|3| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |:|.|,|.|+|2|s|/|f|o@1> @58
+*** ../vim-8.1.0275/src/version.c 2018-08-12 15:49:33.555438382 +0200
+--- src/version.c 2018-08-12 16:25:53.031933127 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 276,
+ /**/
+
+--
+It is illegal for anyone to give lighted cigars to dogs, cats, and other
+domesticated animal kept as pets.
+ [real standing law in Illinois, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0277 b/data/vim/patches/8.1.0277
new file mode 100644
index 000000000..a084393e4
--- /dev/null
+++ b/data/vim/patches/8.1.0277
@@ -0,0 +1,316 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0277
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0277
+Problem: 'incsearch' highlighting wrong in a few cases.
+Solution: Fix using last search pattern. Restore highlighting when changing
+ command. (issue #3321)
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_02.dump,
+ src/testdir/dumps/Test_incsearch_substitute_03.dump
+
+
+*** ../vim-8.1.0276/src/ex_getln.c 2018-08-12 15:49:33.551438415 +0200
+--- src/ex_getln.c 2018-08-12 17:27:32.113306665 +0200
+***************
+*** 300,306 ****
+ {
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+! if (end > p)
+ {
+ char_u *dummy;
+ exarg_T ea;
+--- 300,306 ----
+ {
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+! if (end > p || *end == delim)
+ {
+ char_u *dummy;
+ exarg_T ea;
+***************
+*** 341,346 ****
+--- 341,377 ----
+ return FALSE;
+ }
+
++ static void
++ finish_incsearch_highlighting(
++ int gotesc,
++ incsearch_state_T *is_state,
++ int call_update_screen)
++ {
++ if (is_state->did_incsearch)
++ {
++ is_state->did_incsearch = FALSE;
++ if (gotesc)
++ curwin->w_cursor = is_state->save_cursor;
++ else
++ {
++ if (!EQUAL_POS(is_state->save_cursor, is_state->search_start))
++ {
++ // put the '" mark at the original position
++ curwin->w_cursor = is_state->save_cursor;
++ setpcmark();
++ }
++ curwin->w_cursor = is_state->search_start;
++ }
++ restore_viewstate(&is_state->old_viewstate);
++ highlight_match = FALSE;
++ validate_cursor(); /* needed for TAB */
++ if (call_update_screen)
++ update_screen(SOME_VALID);
++ else
++ redraw_all_later(SOME_VALID);
++ }
++ }
++
+ /*
+ * Do 'incsearch' highlighting if desired.
+ */
+***************
+*** 357,366 ****
+ #ifdef FEAT_RELTIME
+ proftime_T tm;
+ #endif
+! int c;
+
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+ return;
+
+ // If there is a character waiting, search and redraw later.
+ if (char_avail())
+--- 388,401 ----
+ #ifdef FEAT_RELTIME
+ proftime_T tm;
+ #endif
+! int next_char;
+! int use_last_pat;
+
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
++ {
++ finish_incsearch_highlighting(FALSE, is_state, TRUE);
+ return;
++ }
+
+ // If there is a character waiting, search and redraw later.
+ if (char_avail())
+***************
+*** 381,388 ****
+ }
+ save_last_search_pattern();
+
+! // If there is no command line, don't do anything.
+! if (patlen == 0)
+ {
+ i = 0;
+ set_no_hlsearch(TRUE); // turn off previous highlight
+--- 416,428 ----
+ }
+ save_last_search_pattern();
+
+! // Use the previous pattern for ":s//".
+! next_char = ccline.cmdbuff[skiplen + patlen];
+! use_last_pat = patlen == 0 && skiplen > 0
+! && ccline.cmdbuff[skiplen - 1] == next_char;
+!
+! // If there is no pattern, don't do anything.
+! if (patlen == 0 && !use_last_pat)
+ {
+ i = 0;
+ set_no_hlsearch(TRUE); // turn off previous highlight
+***************
+*** 403,409 ****
+ search_flags += SEARCH_KEEP;
+ if (search_first_line != 0)
+ search_flags += SEARCH_START;
+- c = ccline.cmdbuff[skiplen + patlen];
+ ccline.cmdbuff[skiplen + patlen] = NUL;
+ i = do_search(NULL, firstc == ':' ? '/' : firstc,
+ ccline.cmdbuff + skiplen, count, search_flags,
+--- 443,448 ----
+***************
+*** 413,419 ****
+ NULL, NULL
+ #endif
+ );
+! ccline.cmdbuff[skiplen + patlen] = c;
+ --emsg_off;
+
+ if (curwin->w_cursor.lnum < search_first_line
+--- 452,458 ----
+ NULL, NULL
+ #endif
+ );
+! ccline.cmdbuff[skiplen + patlen] = next_char;
+ --emsg_off;
+
+ if (curwin->w_cursor.lnum < search_first_line
+***************
+*** 459,469 ****
+
+ // Disable 'hlsearch' highlighting if the pattern matches everything.
+ // Avoids a flash when typing "foo\|".
+! c = ccline.cmdbuff[skiplen + patlen];
+! ccline.cmdbuff[skiplen + patlen] = NUL;
+! if (empty_pattern(ccline.cmdbuff))
+! set_no_hlsearch(TRUE);
+! ccline.cmdbuff[skiplen + patlen] = c;
+
+ validate_cursor();
+ // May redraw the status line to show the cursor position.
+--- 498,511 ----
+
+ // Disable 'hlsearch' highlighting if the pattern matches everything.
+ // Avoids a flash when typing "foo\|".
+! if (!use_last_pat)
+! {
+! next_char = ccline.cmdbuff[skiplen + patlen];
+! ccline.cmdbuff[skiplen + patlen] = NUL;
+! if (empty_pattern(ccline.cmdbuff))
+! set_no_hlsearch(TRUE);
+! ccline.cmdbuff[skiplen + patlen] = next_char;
+! }
+
+ validate_cursor();
+ // May redraw the status line to show the cursor position.
+***************
+*** 628,657 ****
+ }
+ return OK;
+ }
+-
+- static void
+- finish_incsearch_highlighting(int gotesc, incsearch_state_T *is_state)
+- {
+- if (is_state->did_incsearch)
+- {
+- if (gotesc)
+- curwin->w_cursor = is_state->save_cursor;
+- else
+- {
+- if (!EQUAL_POS(is_state->save_cursor, is_state->search_start))
+- {
+- // put the '" mark at the original position
+- curwin->w_cursor = is_state->save_cursor;
+- setpcmark();
+- }
+- curwin->w_cursor = is_state->search_start;
+- }
+- restore_viewstate(&is_state->old_viewstate);
+- highlight_match = FALSE;
+- validate_cursor(); /* needed for TAB */
+- redraw_all_later(SOME_VALID);
+- }
+- }
+ #endif
+
+ /*
+--- 670,675 ----
+***************
+*** 2301,2307 ****
+ ccline.xpc = NULL;
+
+ #ifdef FEAT_SEARCH_EXTRA
+! finish_incsearch_highlighting(gotesc, &is_state);
+ #endif
+
+ if (ccline.cmdbuff != NULL)
+--- 2319,2325 ----
+ ccline.xpc = NULL;
+
+ #ifdef FEAT_SEARCH_EXTRA
+! finish_incsearch_highlighting(gotesc, &is_state, FALSE);
+ #endif
+
+ if (ccline.cmdbuff != NULL)
+*** ../vim-8.1.0276/src/testdir/test_search.vim 2018-08-12 16:26:43.427713531 +0200
+--- src/testdir/test_search.vim 2018-08-12 17:33:19.978924077 +0200
+***************
+*** 839,844 ****
+--- 839,845 ----
+ sleep 100m
+
+ " Need to send one key at a time to force a redraw.
++ " Select three lines at the cursor with typed pattern.
+ call term_sendkeys(buf, ':.,.+2s/')
+ sleep 100m
+ call term_sendkeys(buf, 'f')
+***************
+*** 846,852 ****
+--- 847,867 ----
+ call term_sendkeys(buf, 'o')
+ sleep 100m
+ call term_sendkeys(buf, 'o')
++ sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " Select three lines at the cursor using previous pattern.
++ call term_sendkeys(buf, "/foo\<CR>")
++ sleep 100m
++ call term_sendkeys(buf, ':.,.+2s//')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_02', {})
++
++ " Deleting last slash should remove the match.
++ call term_sendkeys(buf, "\<BS>")
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {})
+
+ call term_sendkeys(buf, "\<Esc>")
+ call StopVimInTerminal(buf)
+*** ../vim-8.1.0276/src/testdir/dumps/Test_incsearch_substitute_02.dump 2018-08-12 17:37:49.457116653 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_02.dump 2018-08-12 17:02:58.756857477 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |1| @64
++ |f|o@1| |2| @64
++ |f|o@1| |3| @64
++ |f+1&&|o@1| +0&&|4| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |:|.|,|.|+|2|s|/@1> @60
+*** ../vim-8.1.0276/src/testdir/dumps/Test_incsearch_substitute_03.dump 2018-08-12 17:37:49.465116598 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_03.dump 2018-08-12 17:33:35.062824462 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffff4012|o@1| +0&#ffffff0|1| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|2| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|3| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|6| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|7| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|8| @64
++ |:|.|,|.|+|2|s|/> @61
+*** ../vim-8.1.0276/src/version.c 2018-08-12 16:26:43.427713531 +0200
+--- src/version.c 2018-08-12 16:57:04.292430111 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 277,
+ /**/
+
+--
+Citizens are not allowed to attend a movie house or theater nor ride in a
+public streetcar within at least four hours after eating garlic.
+ [real standing law in Indiana, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0278 b/data/vim/patches/8.1.0278
new file mode 100644
index 000000000..e11c7ee2e
--- /dev/null
+++ b/data/vim/patches/8.1.0278
@@ -0,0 +1,95 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0278
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0278
+Problem: 'incsearch' highlighting does not accept reverse range.
+Solution: Swap the range when needed. (issue #3321)
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_04.dump
+
+
+*** ../vim-8.1.0277/src/ex_getln.c 2018-08-12 17:38:50.544700253 +0200
+--- src/ex_getln.c 2018-08-12 21:46:02.876827779 +0200
+***************
+*** 320,327 ****
+ parse_cmd_address(&ea, &dummy);
+ if (ea.addr_count > 0)
+ {
+! search_first_line = ea.line1;
+! search_last_line = ea.line2;
+ }
+ else if (*cmd == 's')
+ {
+--- 320,336 ----
+ parse_cmd_address(&ea, &dummy);
+ if (ea.addr_count > 0)
+ {
+! // Allow for reverse match.
+! if (ea.line2 < ea.line1)
+! {
+! search_first_line = ea.line2;
+! search_last_line = ea.line1;
+! }
+! else
+! {
+! search_first_line = ea.line1;
+! search_last_line = ea.line2;
+! }
+ }
+ else if (*cmd == 's')
+ {
+*** ../vim-8.1.0277/src/testdir/test_search.vim 2018-08-12 17:38:50.544700253 +0200
+--- src/testdir/test_search.vim 2018-08-12 21:47:42.928159249 +0200
+***************
+*** 862,867 ****
+--- 862,873 ----
+ call term_sendkeys(buf, "\<BS>")
+ sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " Reverse range is accepted
++ call term_sendkeys(buf, ':5,2s/foo')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {})
+
+ call term_sendkeys(buf, "\<Esc>")
+ call StopVimInTerminal(buf)
+*** ../vim-8.1.0277/src/testdir/dumps/Test_incsearch_substitute_04.dump 2018-08-12 21:51:53.814482196 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_04.dump 2018-08-12 21:48:10.107977608 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |1| @64
++ |f+1&&|o@1| +0&&|2| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|3| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |:|5|,|2|s|/|f|o@1> @60
+*** ../vim-8.1.0277/src/version.c 2018-08-12 17:38:50.544700253 +0200
+--- src/version.c 2018-08-12 21:50:56.598864724 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 278,
+ /**/
+
+--
+Kisses may last for as much as, but no more than, five minutes.
+ [real standing law in Iowa, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0279 b/data/vim/patches/8.1.0279
new file mode 100644
index 000000000..f34949ad1
--- /dev/null
+++ b/data/vim/patches/8.1.0279
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0279
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0279
+Problem: 'incsearch' highlighting does not skip white space.
+Solution: Skip white space after the command. (issue #3321)
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_05.dump
+
+
+*** ../vim-8.1.0278/src/ex_getln.c 2018-08-12 21:52:56.078065882 +0200
+--- src/ex_getln.c 2018-08-12 21:56:40.340566130 +0200
+***************
+*** 293,303 ****
+ // Skip over "substitute" to find the pattern separator.
+ for (p = cmd; ASCII_ISALPHA(*p); ++p)
+ ;
+! if (*p != NUL
+ && (STRNCMP(cmd, "substitute", p - cmd) == 0
+ || STRNCMP(cmd, "global", p - cmd) == 0
+ || STRNCMP(cmd, "vglobal", p - cmd) == 0))
+ {
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+ if (end > p || *end == delim)
+--- 293,304 ----
+ // Skip over "substitute" to find the pattern separator.
+ for (p = cmd; ASCII_ISALPHA(*p); ++p)
+ ;
+! if (*skipwhite(p) != NUL
+ && (STRNCMP(cmd, "substitute", p - cmd) == 0
+ || STRNCMP(cmd, "global", p - cmd) == 0
+ || STRNCMP(cmd, "vglobal", p - cmd) == 0))
+ {
++ p = skipwhite(p);
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+ if (end > p || *end == delim)
+*** ../vim-8.1.0278/src/testdir/test_search.vim 2018-08-12 21:52:56.078065882 +0200
+--- src/testdir/test_search.vim 2018-08-12 22:00:15.759125243 +0200
+***************
+*** 868,875 ****
+--- 868,881 ----
+ call term_sendkeys(buf, ':5,2s/foo')
+ sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {})
++ call term_sendkeys(buf, "\<Esc>")
+
++ " White space after the command is skipped
++ call term_sendkeys(buf, ':2,3sub /fo')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {})
+ call term_sendkeys(buf, "\<Esc>")
++
+ call StopVimInTerminal(buf)
+ call delete('Xis_subst_script')
+ endfunc
+*** ../vim-8.1.0278/src/testdir/dumps/Test_incsearch_substitute_05.dump 2018-08-12 22:02:46.162119119 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_05.dump 2018-08-12 22:00:31.507019900 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |1| @64
++ |f+1&&|o|o+0&&| |2| @64
++ |f+0&#ffff4012|o|o+0&#ffffff0| |3| @64
++ |f|o@1| |4| @64
++ |f|o@1| |5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |:|2|,|3|s|u|b| @1|/|f|o> @57
+*** ../vim-8.1.0278/src/version.c 2018-08-12 21:52:56.078065882 +0200
+--- src/version.c 2018-08-12 21:58:09.031972919 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 279,
+ /**/
+
+--
+It is illegal to rob a bank and then shoot at the bank teller with a water
+pistol.
+ [real standing law in Louisana, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0280 b/data/vim/patches/8.1.0280
new file mode 100644
index 000000000..0203c3b8f
--- /dev/null
+++ b/data/vim/patches/8.1.0280
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0280
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0280
+Problem: 'incsearch' highlighting does not work for ":g!/".
+Solution: Skip the exclamation mark. (Hirohito Higashi)
+Files: src/ex_getln.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0279/src/ex_getln.c 2018-08-12 22:02:55.494056691 +0200
+--- src/ex_getln.c 2018-08-13 22:53:06.873250045 +0200
+***************
+*** 298,303 ****
+--- 298,310 ----
+ || STRNCMP(cmd, "global", p - cmd) == 0
+ || STRNCMP(cmd, "vglobal", p - cmd) == 0))
+ {
++ // Check for "global!/".
++ if (*cmd == 'g' && *p == '!')
++ {
++ p++;
++ if (*skipwhite(p) == NUL)
++ return FALSE;
++ }
+ p = skipwhite(p);
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+*** ../vim-8.1.0279/src/testdir/test_search.vim 2018-08-12 22:02:55.494056691 +0200
+--- src/testdir/test_search.vim 2018-08-13 22:50:49.374202563 +0200
+***************
+*** 399,404 ****
+--- 399,412 ----
+ undo
+ call feedkeys(":global/the\<c-l>/d\<cr>", 'tx')
+ call assert_equal(' 3 the theother', getline(2))
++ undo
++ call feedkeys(":g!/the\<c-l>/d\<cr>", 'tx')
++ call assert_equal(1, line('$'))
++ call assert_equal(' 2 the~e', getline(1))
++ undo
++ call feedkeys(":global!/the\<c-l>/d\<cr>", 'tx')
++ call assert_equal(1, line('$'))
++ call assert_equal(' 2 the~e', getline(1))
+
+ call Incsearch_cleanup()
+ endfunc
+*** ../vim-8.1.0279/src/version.c 2018-08-12 22:02:55.494056691 +0200
+--- src/version.c 2018-08-13 22:51:49.437786199 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 280,
+ /**/
+
+--
+A parent can be arrested if his child cannot hold back a burp during a church
+service.
+ [real standing law in Nebraska, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0281 b/data/vim/patches/8.1.0281
new file mode 100644
index 000000000..9efb07608
--- /dev/null
+++ b/data/vim/patches/8.1.0281
@@ -0,0 +1,738 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0281
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0281
+Problem: Parsing command modifiers is not separated.
+Solution: Move command modifier parsing to a separate function.
+Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/ex_cmds.h,
+ src/globals.h, src/feature.h
+
+
+*** ../vim-8.1.0280/src/ex_docmd.c 2018-08-10 23:13:07.934024645 +0200
+--- src/ex_docmd.c 2018-08-13 23:27:03.980298529 +0200
+***************
+*** 1709,1721 ****
+ char_u *errormsg = NULL; /* error message */
+ char_u *after_modifier = NULL;
+ exarg_T ea; /* Ex command arguments */
+- long verbose_save = -1;
+ int save_msg_scroll = msg_scroll;
+- int save_msg_silent = -1;
+- int did_esilent = 0;
+- #ifdef HAVE_SANDBOX
+- int did_sandbox = FALSE;
+- #endif
+ cmdmod_T save_cmdmod;
+ int ni; /* set when Not Implemented */
+ char_u *cmd;
+--- 1709,1715 ----
+***************
+*** 1742,1748 ****
+ * recursive calls.
+ */
+ save_cmdmod = cmdmod;
+- vim_memset(&cmdmod, 0, sizeof(cmdmod));
+
+ /* "#!anything" is handled like a comment. */
+ if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!')
+--- 1736,1741 ----
+***************
+*** 1750,1977 ****
+
+ /*
+ * Repeat until no more command modifiers are found.
+ */
+ ea.cmd = *cmdlinep;
+! for (;;)
+! {
+! /*
+! * 1. Skip comment lines and leading white space and colons.
+! */
+! while (*ea.cmd == ' ' || *ea.cmd == '\t' || *ea.cmd == ':')
+! ++ea.cmd;
+!
+! /* in ex mode, an empty line works like :+ */
+! if (*ea.cmd == NUL && exmode_active
+! && (getline_equal(fgetline, cookie, getexmodeline)
+! || getline_equal(fgetline, cookie, getexline))
+! && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+! {
+! ea.cmd = (char_u *)"+";
+! ex_pressedreturn = TRUE;
+! }
+!
+! /* ignore comment and empty lines */
+! if (*ea.cmd == '"')
+! goto doend;
+! if (*ea.cmd == NUL)
+! {
+! ex_pressedreturn = TRUE;
+! goto doend;
+! }
+!
+! /*
+! * 2. Handle command modifiers.
+! */
+! p = skip_range(ea.cmd, NULL);
+! switch (*p)
+! {
+! /* When adding an entry, also modify cmd_exists(). */
+! case 'a': if (!checkforcmd(&ea.cmd, "aboveleft", 3))
+! break;
+! cmdmod.split |= WSP_ABOVE;
+! continue;
+!
+! case 'b': if (checkforcmd(&ea.cmd, "belowright", 3))
+! {
+! cmdmod.split |= WSP_BELOW;
+! continue;
+! }
+! if (checkforcmd(&ea.cmd, "browse", 3))
+! {
+! #ifdef FEAT_BROWSE_CMD
+! cmdmod.browse = TRUE;
+! #endif
+! continue;
+! }
+! if (!checkforcmd(&ea.cmd, "botright", 2))
+! break;
+! cmdmod.split |= WSP_BOT;
+! continue;
+!
+! case 'c': if (!checkforcmd(&ea.cmd, "confirm", 4))
+! break;
+! #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+! cmdmod.confirm = TRUE;
+! #endif
+! continue;
+!
+! case 'k': if (checkforcmd(&ea.cmd, "keepmarks", 3))
+! {
+! cmdmod.keepmarks = TRUE;
+! continue;
+! }
+! if (checkforcmd(&ea.cmd, "keepalt", 5))
+! {
+! cmdmod.keepalt = TRUE;
+! continue;
+! }
+! if (checkforcmd(&ea.cmd, "keeppatterns", 5))
+! {
+! cmdmod.keeppatterns = TRUE;
+! continue;
+! }
+! if (!checkforcmd(&ea.cmd, "keepjumps", 5))
+! break;
+! cmdmod.keepjumps = TRUE;
+! continue;
+!
+! case 'f': /* only accept ":filter {pat} cmd" */
+! {
+! char_u *reg_pat;
+!
+! if (!checkforcmd(&p, "filter", 4)
+! || *p == NUL || ends_excmd(*p))
+! break;
+! if (*p == '!')
+! {
+! cmdmod.filter_force = TRUE;
+! p = skipwhite(p + 1);
+! if (*p == NUL || ends_excmd(*p))
+! break;
+! }
+! p = skip_vimgrep_pat(p, &reg_pat, NULL);
+! if (p == NULL || *p == NUL)
+! break;
+! cmdmod.filter_regmatch.regprog =
+! vim_regcomp(reg_pat, RE_MAGIC);
+! if (cmdmod.filter_regmatch.regprog == NULL)
+! break;
+! ea.cmd = p;
+! continue;
+! }
+!
+! /* ":hide" and ":hide | cmd" are not modifiers */
+! case 'h': if (p != ea.cmd || !checkforcmd(&p, "hide", 3)
+! || *p == NUL || ends_excmd(*p))
+! break;
+! ea.cmd = p;
+! cmdmod.hide = TRUE;
+! continue;
+!
+! case 'l': if (checkforcmd(&ea.cmd, "lockmarks", 3))
+! {
+! cmdmod.lockmarks = TRUE;
+! continue;
+! }
+!
+! if (!checkforcmd(&ea.cmd, "leftabove", 5))
+! break;
+! cmdmod.split |= WSP_ABOVE;
+! continue;
+!
+! case 'n': if (checkforcmd(&ea.cmd, "noautocmd", 3))
+! {
+! if (cmdmod.save_ei == NULL)
+! {
+! /* Set 'eventignore' to "all". Restore the
+! * existing option value later. */
+! cmdmod.save_ei = vim_strsave(p_ei);
+! set_string_option_direct((char_u *)"ei", -1,
+! (char_u *)"all", OPT_FREE, SID_NONE);
+! }
+! continue;
+! }
+! if (!checkforcmd(&ea.cmd, "noswapfile", 3))
+! break;
+! cmdmod.noswapfile = TRUE;
+! continue;
+!
+! case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6))
+! break;
+! cmdmod.split |= WSP_BELOW;
+! continue;
+!
+! case 's': if (checkforcmd(&ea.cmd, "sandbox", 3))
+! {
+! #ifdef HAVE_SANDBOX
+! if (!did_sandbox)
+! ++sandbox;
+! did_sandbox = TRUE;
+ #endif
+! continue;
+! }
+! if (!checkforcmd(&ea.cmd, "silent", 3))
+! break;
+! if (save_msg_silent == -1)
+! save_msg_silent = msg_silent;
+! ++msg_silent;
+! if (*ea.cmd == '!' && !VIM_ISWHITE(ea.cmd[-1]))
+! {
+! /* ":silent!", but not "silent !cmd" */
+! ea.cmd = skipwhite(ea.cmd + 1);
+! ++emsg_silent;
+! ++did_esilent;
+! }
+! continue;
+!
+! case 't': if (checkforcmd(&p, "tab", 3))
+! {
+! long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS,
+! ea.skip, FALSE, 1);
+! if (tabnr == MAXLNUM)
+! cmdmod.tab = tabpage_index(curtab) + 1;
+! else
+! {
+! if (tabnr < 0 || tabnr > LAST_TAB_NR)
+! {
+! errormsg = (char_u *)_(e_invrange);
+! goto doend;
+! }
+! cmdmod.tab = tabnr + 1;
+! }
+! ea.cmd = p;
+! continue;
+! }
+! if (!checkforcmd(&ea.cmd, "topleft", 2))
+! break;
+! cmdmod.split |= WSP_TOP;
+! continue;
+!
+! case 'u': if (!checkforcmd(&ea.cmd, "unsilent", 3))
+! break;
+! if (save_msg_silent == -1)
+! save_msg_silent = msg_silent;
+! msg_silent = 0;
+! continue;
+
+- case 'v': if (checkforcmd(&ea.cmd, "vertical", 4))
+- {
+- cmdmod.split |= WSP_VERT;
+- continue;
+- }
+- if (!checkforcmd(&p, "verbose", 4))
+- break;
+- if (verbose_save < 0)
+- verbose_save = p_verbose;
+- if (vim_isdigit(*ea.cmd))
+- p_verbose = atoi((char *)ea.cmd);
+- else
+- p_verbose = 1;
+- ea.cmd = p;
+- continue;
+- }
+- break;
+- }
+ after_modifier = ea.cmd;
+
+ #ifdef FEAT_EVAL
+--- 1743,1760 ----
+
+ /*
+ * Repeat until no more command modifiers are found.
++ * The "ea" structure holds the arguments that can be used.
+ */
+ ea.cmd = *cmdlinep;
+! ea.cmdlinep = cmdlinep;
+! ea.getline = fgetline;
+! ea.cookie = cookie;
+! #ifdef FEAT_EVAL
+! ea.cstack = cstack;
+ #endif
+! if (parse_command_modifiers(&ea, &errormsg) == FAIL)
+! goto doend;
+
+ after_modifier = ea.cmd;
+
+ #ifdef FEAT_EVAL
+***************
+*** 2688,2712 ****
+
+ /* The :try command saves the emsg_silent flag, reset it here when
+ * ":silent! try" was used, it should only apply to :try itself. */
+! if (ea.cmdidx == CMD_try && did_esilent > 0)
+ {
+! emsg_silent -= did_esilent;
+ if (emsg_silent < 0)
+ emsg_silent = 0;
+! did_esilent = 0;
+ }
+
+ /*
+ * 7. Execute the command.
+- *
+- * The "ea" structure holds the arguments that can be used.
+ */
+- ea.cmdlinep = cmdlinep;
+- ea.getline = fgetline;
+- ea.cookie = cookie;
+- #ifdef FEAT_EVAL
+- ea.cstack = cstack;
+- #endif
+
+ #ifdef FEAT_USR_CMDS
+ if (IS_USER_CMDIDX(ea.cmdidx))
+--- 2471,2487 ----
+
+ /* The :try command saves the emsg_silent flag, reset it here when
+ * ":silent! try" was used, it should only apply to :try itself. */
+! if (ea.cmdidx == CMD_try && ea.did_esilent > 0)
+ {
+! emsg_silent -= ea.did_esilent;
+ if (emsg_silent < 0)
+ emsg_silent = 0;
+! ea.did_esilent = 0;
+ }
+
+ /*
+ * 7. Execute the command.
+ */
+
+ #ifdef FEAT_USR_CMDS
+ if (IS_USER_CMDIDX(ea.cmdidx))
+***************
+*** 2775,2782 ****
+ ? cmdnames[(int)ea.cmdidx].cmd_name : (char_u *)NULL);
+ #endif
+
+! if (verbose_save >= 0)
+! p_verbose = verbose_save;
+
+ if (cmdmod.save_ei != NULL)
+ {
+--- 2550,2557 ----
+ ? cmdnames[(int)ea.cmdidx].cmd_name : (char_u *)NULL);
+ #endif
+
+! if (ea.verbose_save >= 0)
+! p_verbose = ea.verbose_save;
+
+ if (cmdmod.save_ei != NULL)
+ {
+***************
+*** 2791,2803 ****
+
+ cmdmod = save_cmdmod;
+
+! if (save_msg_silent != -1)
+ {
+ /* messages could be enabled for a serious error, need to check if the
+ * counters don't become negative */
+! if (!did_emsg || msg_silent > save_msg_silent)
+! msg_silent = save_msg_silent;
+! emsg_silent -= did_esilent;
+ if (emsg_silent < 0)
+ emsg_silent = 0;
+ /* Restore msg_scroll, it's set by file I/O commands, even when no
+--- 2566,2578 ----
+
+ cmdmod = save_cmdmod;
+
+! if (ea.save_msg_silent != -1)
+ {
+ /* messages could be enabled for a serious error, need to check if the
+ * counters don't become negative */
+! if (!did_emsg || msg_silent > ea.save_msg_silent)
+! msg_silent = ea.save_msg_silent;
+! emsg_silent -= ea.did_esilent;
+ if (emsg_silent < 0)
+ emsg_silent = 0;
+ /* Restore msg_scroll, it's set by file I/O commands, even when no
+***************
+*** 2811,2817 ****
+ }
+
+ #ifdef HAVE_SANDBOX
+! if (did_sandbox)
+ --sandbox;
+ #endif
+
+--- 2586,2592 ----
+ }
+
+ #ifdef HAVE_SANDBOX
+! if (ea.did_sandbox)
+ --sandbox;
+ #endif
+
+***************
+*** 2829,2834 ****
+--- 2604,2853 ----
+ #endif
+
+ /*
++ * Parse and skip over command modifiers:
++ * - update eap->cmd
++ * - store flags in "cmdmod".
++ * - Set ex_pressedreturn for an empty command line.
++ * - set msg_silent for ":silent"
++ * - set p_verbose for ":verbose"
++ * - Increment "sandbox" for ":sandbox"
++ * Return FAIL when the command is not to be executed.
++ * May set "errormsg" to an error message.
++ */
++ int
++ parse_command_modifiers(exarg_T *eap, char_u **errormsg)
++ {
++ char_u *p;
++
++ vim_memset(&cmdmod, 0, sizeof(cmdmod));
++ eap->verbose_save = -1;
++ eap->save_msg_silent = -1;
++
++ for (;;)
++ {
++ /*
++ * 1. Skip comment lines and leading white space and colons.
++ */
++ while (*eap->cmd == ' ' || *eap->cmd == '\t' || *eap->cmd == ':')
++ ++eap->cmd;
++
++ /* in ex mode, an empty line works like :+ */
++ if (*eap->cmd == NUL && exmode_active
++ && (getline_equal(eap->getline, eap->cookie, getexmodeline)
++ || getline_equal(eap->getline, eap->cookie, getexline))
++ && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
++ {
++ eap->cmd = (char_u *)"+";
++ ex_pressedreturn = TRUE;
++ }
++
++ /* ignore comment and empty lines */
++ if (*eap->cmd == '"')
++ return FAIL;
++ if (*eap->cmd == NUL)
++ {
++ ex_pressedreturn = TRUE;
++ return FAIL;
++ }
++
++ /*
++ * 2. Handle command modifiers.
++ */
++ p = skip_range(eap->cmd, NULL);
++ switch (*p)
++ {
++ /* When adding an entry, also modify cmd_exists(). */
++ case 'a': if (!checkforcmd(&eap->cmd, "aboveleft", 3))
++ break;
++ cmdmod.split |= WSP_ABOVE;
++ continue;
++
++ case 'b': if (checkforcmd(&eap->cmd, "belowright", 3))
++ {
++ cmdmod.split |= WSP_BELOW;
++ continue;
++ }
++ if (checkforcmd(&eap->cmd, "browse", 3))
++ {
++ #ifdef FEAT_BROWSE_CMD
++ cmdmod.browse = TRUE;
++ #endif
++ continue;
++ }
++ if (!checkforcmd(&eap->cmd, "botright", 2))
++ break;
++ cmdmod.split |= WSP_BOT;
++ continue;
++
++ case 'c': if (!checkforcmd(&eap->cmd, "confirm", 4))
++ break;
++ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
++ cmdmod.confirm = TRUE;
++ #endif
++ continue;
++
++ case 'k': if (checkforcmd(&eap->cmd, "keepmarks", 3))
++ {
++ cmdmod.keepmarks = TRUE;
++ continue;
++ }
++ if (checkforcmd(&eap->cmd, "keepalt", 5))
++ {
++ cmdmod.keepalt = TRUE;
++ continue;
++ }
++ if (checkforcmd(&eap->cmd, "keeppatterns", 5))
++ {
++ cmdmod.keeppatterns = TRUE;
++ continue;
++ }
++ if (!checkforcmd(&eap->cmd, "keepjumps", 5))
++ break;
++ cmdmod.keepjumps = TRUE;
++ continue;
++
++ case 'f': /* only accept ":filter {pat} cmd" */
++ {
++ char_u *reg_pat;
++
++ if (!checkforcmd(&p, "filter", 4)
++ || *p == NUL || ends_excmd(*p))
++ break;
++ if (*p == '!')
++ {
++ cmdmod.filter_force = TRUE;
++ p = skipwhite(p + 1);
++ if (*p == NUL || ends_excmd(*p))
++ break;
++ }
++ p = skip_vimgrep_pat(p, &reg_pat, NULL);
++ if (p == NULL || *p == NUL)
++ break;
++ cmdmod.filter_regmatch.regprog =
++ vim_regcomp(reg_pat, RE_MAGIC);
++ if (cmdmod.filter_regmatch.regprog == NULL)
++ break;
++ eap->cmd = p;
++ continue;
++ }
++
++ /* ":hide" and ":hide | cmd" are not modifiers */
++ case 'h': if (p != eap->cmd || !checkforcmd(&p, "hide", 3)
++ || *p == NUL || ends_excmd(*p))
++ break;
++ eap->cmd = p;
++ cmdmod.hide = TRUE;
++ continue;
++
++ case 'l': if (checkforcmd(&eap->cmd, "lockmarks", 3))
++ {
++ cmdmod.lockmarks = TRUE;
++ continue;
++ }
++
++ if (!checkforcmd(&eap->cmd, "leftabove", 5))
++ break;
++ cmdmod.split |= WSP_ABOVE;
++ continue;
++
++ case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3))
++ {
++ if (cmdmod.save_ei == NULL)
++ {
++ /* Set 'eventignore' to "all". Restore the
++ * existing option value later. */
++ cmdmod.save_ei = vim_strsave(p_ei);
++ set_string_option_direct((char_u *)"ei", -1,
++ (char_u *)"all", OPT_FREE, SID_NONE);
++ }
++ continue;
++ }
++ if (!checkforcmd(&eap->cmd, "noswapfile", 3))
++ break;
++ cmdmod.noswapfile = TRUE;
++ continue;
++
++ case 'r': if (!checkforcmd(&eap->cmd, "rightbelow", 6))
++ break;
++ cmdmod.split |= WSP_BELOW;
++ continue;
++
++ case 's': if (checkforcmd(&eap->cmd, "sandbox", 3))
++ {
++ #ifdef HAVE_SANDBOX
++ if (!eap->did_sandbox)
++ ++sandbox;
++ eap->did_sandbox = TRUE;
++ #endif
++ continue;
++ }
++ if (!checkforcmd(&eap->cmd, "silent", 3))
++ break;
++ if (eap->save_msg_silent == -1)
++ eap->save_msg_silent = msg_silent;
++ ++msg_silent;
++ if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1]))
++ {
++ /* ":silent!", but not "silent !cmd" */
++ eap->cmd = skipwhite(eap->cmd + 1);
++ ++emsg_silent;
++ ++eap->did_esilent;
++ }
++ continue;
++
++ case 't': if (checkforcmd(&p, "tab", 3))
++ {
++ long tabnr = get_address(eap, &eap->cmd, ADDR_TABS,
++ eap->skip, FALSE, 1);
++ if (tabnr == MAXLNUM)
++ cmdmod.tab = tabpage_index(curtab) + 1;
++ else
++ {
++ if (tabnr < 0 || tabnr > LAST_TAB_NR)
++ {
++ *errormsg = (char_u *)_(e_invrange);
++ return FAIL;
++ }
++ cmdmod.tab = tabnr + 1;
++ }
++ eap->cmd = p;
++ continue;
++ }
++ if (!checkforcmd(&eap->cmd, "topleft", 2))
++ break;
++ cmdmod.split |= WSP_TOP;
++ continue;
++
++ case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3))
++ break;
++ if (eap->save_msg_silent == -1)
++ eap->save_msg_silent = msg_silent;
++ msg_silent = 0;
++ continue;
++
++ case 'v': if (checkforcmd(&eap->cmd, "vertical", 4))
++ {
++ cmdmod.split |= WSP_VERT;
++ continue;
++ }
++ if (!checkforcmd(&p, "verbose", 4))
++ break;
++ if (eap->verbose_save < 0)
++ eap->verbose_save = p_verbose;
++ if (vim_isdigit(*eap->cmd))
++ p_verbose = atoi((char *)eap->cmd);
++ else
++ p_verbose = 1;
++ eap->cmd = p;
++ continue;
++ }
++ break;
++ }
++
++ return OK;
++ }
++
++ /*
+ * Parse the address range, if any, in "eap".
+ * Return FAIL and set "errormsg" or return OK.
+ */
+*** ../vim-8.1.0280/src/proto/ex_docmd.pro 2018-08-10 23:13:07.934024645 +0200
+--- src/proto/ex_docmd.pro 2018-08-13 23:24:18.797373050 +0200
+***************
+*** 4,9 ****
+--- 4,10 ----
+ int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags);
+ int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int));
+ void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
++ int parse_command_modifiers(exarg_T *eap, char_u **errormsg);
+ int parse_cmd_address(exarg_T *eap, char_u **errormsg);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+*** ../vim-8.1.0280/src/ex_cmds.h 2018-07-10 19:39:14.994973018 +0200
+--- src/ex_cmds.h 2018-08-13 23:25:36.236870329 +0200
+***************
+*** 1792,1797 ****
+--- 1792,1803 ----
+ #ifdef FEAT_EVAL
+ struct condstack *cstack; /* condition stack for ":if" etc. */
+ #endif
++ long verbose_save; // saved value of p_verbose
++ int save_msg_silent; // saved value of msg_silent
++ int did_esilent; // how many times emsg_silent was incremented
++ #ifdef HAVE_SANDBOX
++ int did_sandbox; // when TRUE did ++sandbox
++ #endif
+ };
+
+ #define FORCE_BIN 1 /* ":edit ++bin file" */
+*** ../vim-8.1.0280/src/globals.h 2018-08-11 16:40:39.064311995 +0200
+--- src/globals.h 2018-08-13 23:18:14.323704509 +0200
+***************
+*** 678,685 ****
+ * changed, no buffer can be deleted and
+ * current directory can't be changed.
+ * Used for SwapExists et al. */
+! #ifdef FEAT_EVAL
+! # define HAVE_SANDBOX
+ EXTERN int sandbox INIT(= 0);
+ /* Non-zero when evaluating an expression in a
+ * "sandbox". Several things are not allowed
+--- 678,684 ----
+ * changed, no buffer can be deleted and
+ * current directory can't be changed.
+ * Used for SwapExists et al. */
+! #ifdef HAVE_SANDBOX
+ EXTERN int sandbox INIT(= 0);
+ /* Non-zero when evaluating an expression in a
+ * "sandbox". Several things are not allowed
+*** ../vim-8.1.0280/src/feature.h 2018-07-29 16:09:14.644945560 +0200
+--- src/feature.h 2018-08-13 23:19:07.623368124 +0200
+***************
+*** 355,360 ****
+--- 355,364 ----
+ # endif
+ #endif
+
++ #ifdef FEAT_EVAL
++ # define HAVE_SANDBOX
++ #endif
++
+ /*
+ * +profile Profiling for functions and scripts.
+ */
+*** ../vim-8.1.0280/src/version.c 2018-08-13 22:54:31.456665135 +0200
+--- src/version.c 2018-08-13 23:04:38.032484283 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 281,
+ /**/
+
+--
+Violators can be fined, arrested or jailed for making ugly faces at a dog.
+ [real standing law in Oklahoma, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0282 b/data/vim/patches/8.1.0282
new file mode 100644
index 000000000..7b827f49f
--- /dev/null
+++ b/data/vim/patches/8.1.0282
@@ -0,0 +1,507 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0282
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0282
+Problem: 'incsearch' does not work with command modifiers.
+Solution: Skip command modifiers.
+Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/ex_getln.c,
+ src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0281/src/ex_docmd.c 2018-08-14 13:38:12.744559267 +0200
+--- src/ex_docmd.c 2018-08-14 16:00:53.341893598 +0200
+***************
+*** 68,73 ****
+--- 68,74 ----
+ static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie);
+ static int if_level = 0; /* depth in :if */
+ #endif
++ static void free_cmdmod(void);
+ static void append_command(char_u *cmd);
+ static char_u *find_command(exarg_T *eap, int *full);
+
+***************
+*** 1741,1750 ****
+ if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!')
+ goto doend;
+
+! /*
+! * Repeat until no more command modifiers are found.
+! * The "ea" structure holds the arguments that can be used.
+! */
+ ea.cmd = *cmdlinep;
+ ea.cmdlinep = cmdlinep;
+ ea.getline = fgetline;
+--- 1742,1752 ----
+ if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!')
+ goto doend;
+
+! /*
+! * 1. Skip comment lines and leading white space and colons.
+! * 2. Handle command modifiers.
+! */
+! // The "ea" structure holds the arguments that can be used.
+ ea.cmd = *cmdlinep;
+ ea.cmdlinep = cmdlinep;
+ ea.getline = fgetline;
+***************
+*** 1752,1758 ****
+ #ifdef FEAT_EVAL
+ ea.cstack = cstack;
+ #endif
+! if (parse_command_modifiers(&ea, &errormsg) == FAIL)
+ goto doend;
+
+ after_modifier = ea.cmd;
+--- 1754,1760 ----
+ #ifdef FEAT_EVAL
+ ea.cstack = cstack;
+ #endif
+! if (parse_command_modifiers(&ea, &errormsg, FALSE) == FAIL)
+ goto doend;
+
+ after_modifier = ea.cmd;
+***************
+*** 2553,2569 ****
+ if (ea.verbose_save >= 0)
+ p_verbose = ea.verbose_save;
+
+! if (cmdmod.save_ei != NULL)
+! {
+! /* Restore 'eventignore' to the value before ":noautocmd". */
+! set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei,
+! OPT_FREE, SID_NONE);
+! free_string_option(cmdmod.save_ei);
+! }
+!
+! if (cmdmod.filter_regmatch.regprog != NULL)
+! vim_regfree(cmdmod.filter_regmatch.regprog);
+!
+ cmdmod = save_cmdmod;
+
+ if (ea.save_msg_silent != -1)
+--- 2555,2561 ----
+ if (ea.verbose_save >= 0)
+ p_verbose = ea.verbose_save;
+
+! free_cmdmod();
+ cmdmod = save_cmdmod;
+
+ if (ea.save_msg_silent != -1)
+***************
+*** 2609,2621 ****
+ * - store flags in "cmdmod".
+ * - Set ex_pressedreturn for an empty command line.
+ * - set msg_silent for ":silent"
+ * - set p_verbose for ":verbose"
+ * - Increment "sandbox" for ":sandbox"
+ * Return FAIL when the command is not to be executed.
+ * May set "errormsg" to an error message.
+ */
+ int
+! parse_command_modifiers(exarg_T *eap, char_u **errormsg)
+ {
+ char_u *p;
+
+--- 2601,2616 ----
+ * - store flags in "cmdmod".
+ * - Set ex_pressedreturn for an empty command line.
+ * - set msg_silent for ":silent"
++ * - set 'eventignore' to "all" for ":noautocmd"
+ * - set p_verbose for ":verbose"
+ * - Increment "sandbox" for ":sandbox"
++ * When "skip_only" is TRUE the global variables are not changed, except for
++ * "cmdmod".
+ * Return FAIL when the command is not to be executed.
+ * May set "errormsg" to an error message.
+ */
+ int
+! parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only)
+ {
+ char_u *p;
+
+***************
+*** 2623,2633 ****
+ eap->verbose_save = -1;
+ eap->save_msg_silent = -1;
+
+ for (;;)
+ {
+- /*
+- * 1. Skip comment lines and leading white space and colons.
+- */
+ while (*eap->cmd == ' ' || *eap->cmd == '\t' || *eap->cmd == ':')
+ ++eap->cmd;
+
+--- 2618,2626 ----
+ eap->verbose_save = -1;
+ eap->save_msg_silent = -1;
+
++ // Repeat until no more command modifiers are found.
+ for (;;)
+ {
+ while (*eap->cmd == ' ' || *eap->cmd == '\t' || *eap->cmd == ':')
+ ++eap->cmd;
+
+***************
+*** 2638,2644 ****
+ && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+ {
+ eap->cmd = (char_u *)"+";
+! ex_pressedreturn = TRUE;
+ }
+
+ /* ignore comment and empty lines */
+--- 2631,2638 ----
+ && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
+ {
+ eap->cmd = (char_u *)"+";
+! if (!skip_only)
+! ex_pressedreturn = TRUE;
+ }
+
+ /* ignore comment and empty lines */
+***************
+*** 2646,2658 ****
+ return FAIL;
+ if (*eap->cmd == NUL)
+ {
+! ex_pressedreturn = TRUE;
+ return FAIL;
+ }
+
+- /*
+- * 2. Handle command modifiers.
+- */
+ p = skip_range(eap->cmd, NULL);
+ switch (*p)
+ {
+--- 2640,2650 ----
+ return FAIL;
+ if (*eap->cmd == NUL)
+ {
+! if (!skip_only)
+! ex_pressedreturn = TRUE;
+ return FAIL;
+ }
+
+ p = skip_range(eap->cmd, NULL);
+ switch (*p)
+ {
+***************
+*** 2720,2732 ****
+ if (*p == NUL || ends_excmd(*p))
+ break;
+ }
+! p = skip_vimgrep_pat(p, &reg_pat, NULL);
+ if (p == NULL || *p == NUL)
+ break;
+! cmdmod.filter_regmatch.regprog =
+ vim_regcomp(reg_pat, RE_MAGIC);
+! if (cmdmod.filter_regmatch.regprog == NULL)
+! break;
+ eap->cmd = p;
+ continue;
+ }
+--- 2712,2731 ----
+ if (*p == NUL || ends_excmd(*p))
+ break;
+ }
+! if (skip_only)
+! p = skip_vimgrep_pat(p, NULL, NULL);
+! else
+! // NOTE: This puts a NUL after the pattern.
+! p = skip_vimgrep_pat(p, &reg_pat, NULL);
+ if (p == NULL || *p == NUL)
+ break;
+! if (!skip_only)
+! {
+! cmdmod.filter_regmatch.regprog =
+ vim_regcomp(reg_pat, RE_MAGIC);
+! if (cmdmod.filter_regmatch.regprog == NULL)
+! break;
+! }
+ eap->cmd = p;
+ continue;
+ }
+***************
+*** 2752,2758 ****
+
+ case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3))
+ {
+! if (cmdmod.save_ei == NULL)
+ {
+ /* Set 'eventignore' to "all". Restore the
+ * existing option value later. */
+--- 2751,2757 ----
+
+ case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3))
+ {
+! if (cmdmod.save_ei == NULL && !skip_only)
+ {
+ /* Set 'eventignore' to "all". Restore the
+ * existing option value later. */
+***************
+*** 2775,2797 ****
+ case 's': if (checkforcmd(&eap->cmd, "sandbox", 3))
+ {
+ #ifdef HAVE_SANDBOX
+! if (!eap->did_sandbox)
+! ++sandbox;
+! eap->did_sandbox = TRUE;
+ #endif
+ continue;
+ }
+ if (!checkforcmd(&eap->cmd, "silent", 3))
+ break;
+! if (eap->save_msg_silent == -1)
+! eap->save_msg_silent = msg_silent;
+! ++msg_silent;
+ if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1]))
+ {
+ /* ":silent!", but not "silent !cmd" */
+ eap->cmd = skipwhite(eap->cmd + 1);
+! ++emsg_silent;
+! ++eap->did_esilent;
+ }
+ continue;
+
+--- 2774,2805 ----
+ case 's': if (checkforcmd(&eap->cmd, "sandbox", 3))
+ {
+ #ifdef HAVE_SANDBOX
+! if (!skip_only)
+! {
+! if (!eap->did_sandbox)
+! ++sandbox;
+! eap->did_sandbox = TRUE;
+! }
+ #endif
+ continue;
+ }
+ if (!checkforcmd(&eap->cmd, "silent", 3))
+ break;
+! if (!skip_only)
+! {
+! if (eap->save_msg_silent == -1)
+! eap->save_msg_silent = msg_silent;
+! ++msg_silent;
+! }
+ if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1]))
+ {
+ /* ":silent!", but not "silent !cmd" */
+ eap->cmd = skipwhite(eap->cmd + 1);
+! if (!skip_only)
+! {
+! ++emsg_silent;
+! ++eap->did_esilent;
+! }
+ }
+ continue;
+
+***************
+*** 2820,2828 ****
+
+ case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3))
+ break;
+! if (eap->save_msg_silent == -1)
+! eap->save_msg_silent = msg_silent;
+! msg_silent = 0;
+ continue;
+
+ case 'v': if (checkforcmd(&eap->cmd, "vertical", 4))
+--- 2828,2839 ----
+
+ case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3))
+ break;
+! if (!skip_only)
+! {
+! if (eap->save_msg_silent == -1)
+! eap->save_msg_silent = msg_silent;
+! msg_silent = 0;
+! }
+ continue;
+
+ case 'v': if (checkforcmd(&eap->cmd, "vertical", 4))
+***************
+*** 2832,2843 ****
+ }
+ if (!checkforcmd(&p, "verbose", 4))
+ break;
+! if (eap->verbose_save < 0)
+! eap->verbose_save = p_verbose;
+! if (vim_isdigit(*eap->cmd))
+! p_verbose = atoi((char *)eap->cmd);
+! else
+! p_verbose = 1;
+ eap->cmd = p;
+ continue;
+ }
+--- 2843,2857 ----
+ }
+ if (!checkforcmd(&p, "verbose", 4))
+ break;
+! if (!skip_only)
+! {
+! if (eap->verbose_save < 0)
+! eap->verbose_save = p_verbose;
+! if (vim_isdigit(*eap->cmd))
+! p_verbose = atoi((char *)eap->cmd);
+! else
+! p_verbose = 1;
+! }
+ eap->cmd = p;
+ continue;
+ }
+***************
+*** 2848,2853 ****
+--- 2862,2885 ----
+ }
+
+ /*
++ * Free contents of "cmdmod".
++ */
++ static void
++ free_cmdmod(void)
++ {
++ if (cmdmod.save_ei != NULL)
++ {
++ /* Restore 'eventignore' to the value before ":noautocmd". */
++ set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei,
++ OPT_FREE, SID_NONE);
++ free_string_option(cmdmod.save_ei);
++ }
++
++ if (cmdmod.filter_regmatch.regprog != NULL)
++ vim_regfree(cmdmod.filter_regmatch.regprog);
++ }
++
++ /*
+ * Parse the address range, if any, in "eap".
+ * Return FAIL and set "errormsg" or return OK.
+ */
+*** ../vim-8.1.0281/src/proto/ex_docmd.pro 2018-08-14 13:38:12.744559267 +0200
+--- src/proto/ex_docmd.pro 2018-08-14 15:27:07.371906192 +0200
+***************
+*** 4,10 ****
+ int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags);
+ int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int));
+ void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
+! int parse_command_modifiers(exarg_T *eap, char_u **errormsg);
+ int parse_cmd_address(exarg_T *eap, char_u **errormsg);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+--- 4,10 ----
+ int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags);
+ int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int));
+ void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
+! int parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only);
+ int parse_cmd_address(exarg_T *eap, char_u **errormsg);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+*** ../vim-8.1.0281/src/ex_getln.c 2018-08-13 22:54:31.456665135 +0200
+--- src/ex_getln.c 2018-08-14 15:27:03.303934870 +0200
+***************
+*** 283,293 ****
+ return TRUE;
+ if (firstc == ':')
+ {
+! char_u *cmd = skip_range(ccline.cmdbuff, NULL);
+! char_u *p;
+! int delim;
+! char_u *end;
+
+ if (*cmd == 's' || *cmd == 'g' || *cmd == 'v')
+ {
+ // Skip over "substitute" to find the pattern separator.
+--- 283,306 ----
+ return TRUE;
+ if (firstc == ':')
+ {
+! char_u *cmd;
+! cmdmod_T save_cmdmod = cmdmod;
+! char_u *p;
+! int delim;
+! char_u *end;
+! char_u *dummy;
+! exarg_T ea;
+
++ vim_memset(&ea, 0, sizeof(ea));
++ ea.line1 = 1;
++ ea.line2 = 1;
++ ea.cmd = ccline.cmdbuff;
++ ea.addr_type = ADDR_LINES;
++
++ parse_command_modifiers(&ea, &dummy, TRUE);
++ cmdmod = save_cmdmod;
++
++ cmd = skip_range(ea.cmd, NULL);
+ if (*cmd == 's' || *cmd == 'g' || *cmd == 'v')
+ {
+ // Skip over "substitute" to find the pattern separator.
+***************
+*** 310,317 ****
+ end = skip_regexp(p, delim, p_magic, NULL);
+ if (end > p || *end == delim)
+ {
+- char_u *dummy;
+- exarg_T ea;
+ pos_T save_cursor = curwin->w_cursor;
+
+ // found a non-empty pattern
+--- 323,328 ----
+***************
+*** 319,329 ****
+ *patlen = (int)(end - p);
+
+ // parse the address range
+- vim_memset(&ea, 0, sizeof(ea));
+- ea.line1 = 1;
+- ea.line2 = 1;
+- ea.cmd = ccline.cmdbuff;
+- ea.addr_type = ADDR_LINES;
+ curwin->w_cursor = is_state->search_start;
+ parse_cmd_address(&ea, &dummy);
+ if (ea.addr_count > 0)
+--- 330,335 ----
+*** ../vim-8.1.0281/src/testdir/test_search.vim 2018-08-13 22:54:31.456665135 +0200
+--- src/testdir/test_search.vim 2018-08-14 16:01:44.561537663 +0200
+***************
+*** 884,889 ****
+--- 884,895 ----
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {})
+ call term_sendkeys(buf, "\<Esc>")
+
++ " Command modifiers are skipped
++ call term_sendkeys(buf, ':above below browse botr confirm keepmar keepalt keeppat keepjum filter xxx hide lockm leftabove noau noswap rightbel sandbox silent silent! $tab top unsil vert verbose 4,5s/fo.')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_06', {})
++ call term_sendkeys(buf, "\<Esc>")
++
+ call StopVimInTerminal(buf)
+ call delete('Xis_subst_script')
+ endfunc
+*** ../vim-8.1.0281/src/version.c 2018-08-14 13:38:12.748559237 +0200
+--- src/version.c 2018-08-14 16:02:48.537093003 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 282,
+ /**/
+
+--
+It is illegal to take more than three sips of beer at a time while standing.
+ [real standing law in Texas, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0283 b/data/vim/patches/8.1.0283
new file mode 100644
index 000000000..ce5c1081e
--- /dev/null
+++ b/data/vim/patches/8.1.0283
@@ -0,0 +1,48 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0283
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0283 (after 8.1.0282)
+Problem: Missing test dump.
+Solution: Add the dump file
+Files: src/testdir/dumps/Test_incsearch_substitute_06.dump
+
+
+*** ../vim-8.1.0282/src/testdir/dumps/Test_incsearch_substitute_06.dump 2018-08-14 17:28:14.092380326 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_06.dump 2018-08-14 16:01:48.877507668 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |3| @64
++ |f+1&&|o@1| +0&&|4| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |:|a|b|o|v|e| |b|e|l|o|w| |b|r|o|w|s|e| |b|o|t|r| |c|o|n|f|i|r|m| |k|e@1|p|m|a|r| |k|e@1|p|a|l|t| |k|e@1|p@1|a|t| |k|e@1|p|j|u|m| |f|i|l|t|e
++ |r| |x@2| |h|i|d|e| |l|o|c|k|m| |l|e|f|t|a|b|o|v|e| |n|o|a|u| |n|o|s|w|a|p| |r|i|g|h|t|b|e|l| |s|a|n|d|b|o|x| |s|i|l|e|n|t| |s|i|l|e|n|t|!
++ | |$|t|a|b| |t|o|p| |u|n|s|i|l| |v|e|r|t| |v|e|r|b|o|s|e| |4|,|5|s|/|f|o|.> @32
+*** ../vim-8.1.0282/src/version.c 2018-08-14 16:06:09.455696035 +0200
+--- src/version.c 2018-08-14 17:27:02.916917347 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 283,
+ /**/
+
+--
+Lawmakers made it obligatory for everybody to take at least one bath
+each week -- on Saturday night.
+ [real standing law in Vermont, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0284 b/data/vim/patches/8.1.0284
new file mode 100644
index 000000000..a9e230594
--- /dev/null
+++ b/data/vim/patches/8.1.0284
@@ -0,0 +1,115 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0284
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0284
+Problem: 'cursorline' highlighting wrong with 'incsearch'.
+Solution: Move the cursor back if the match is outside the range.
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_07.dump
+ src/testdir/dumps/Test_incsearch_substitute_08.dump
+
+
+*** ../vim-8.1.0283/src/ex_getln.c 2018-08-14 16:06:09.455696035 +0200
+--- src/ex_getln.c 2018-08-14 18:14:34.864316635 +0200
+***************
+*** 480,487 ****
+--- 480,490 ----
+
+ if (curwin->w_cursor.lnum < search_first_line
+ || curwin->w_cursor.lnum > search_last_line)
++ {
+ // match outside of address range
+ i = 0;
++ curwin->w_cursor = is_state->search_start;
++ }
+
+ // if interrupted while searching, behave like it failed
+ if (got_int)
+*** ../vim-8.1.0283/src/testdir/test_search.vim 2018-08-14 16:06:09.455696035 +0200
+--- src/testdir/test_search.vim 2018-08-14 18:10:01.346273292 +0200
+***************
+*** 839,844 ****
+--- 839,845 ----
+ \ 'for n in range(1, 10)',
+ \ ' call setline(n, "foo " . n)',
+ \ 'endfor',
++ \ 'call setline(11, "bar 11")',
+ \ '3',
+ \ ], 'Xis_subst_script')
+ let buf = RunVimInTerminal('-S Xis_subst_script', {'rows': 9, 'cols': 70})
+***************
+*** 890,895 ****
+--- 891,910 ----
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_06', {})
+ call term_sendkeys(buf, "\<Esc>")
+
++ " Cursorline highlighting at match
++ call term_sendkeys(buf, ":set cursorline\<CR>")
++ call term_sendkeys(buf, 'G9G')
++ call term_sendkeys(buf, ':9,11s/bar')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_07', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ " Cursorline highlighting at cursor when no match
++ call term_sendkeys(buf, ':9,10s/bar')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {})
++ call term_sendkeys(buf, "\<Esc>")
++
+ call StopVimInTerminal(buf)
+ call delete('Xis_subst_script')
+ endfunc
+*** ../vim-8.1.0283/src/testdir/dumps/Test_incsearch_substitute_07.dump 2018-08-14 18:16:06.747659260 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_07.dump 2018-08-14 18:12:01.497413817 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |4| @64
++ |f|o@1| |5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |f|o@1| |9| @64
++ |f|o@1| |1|0| @63
++ |b+9&&|a|r| +8&&|1@1| @63
++ |:+0&&|9|,|1@1|s|/|b|a|r> @59
+*** ../vim-8.1.0283/src/testdir/dumps/Test_incsearch_substitute_08.dump 2018-08-14 18:16:06.755659202 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_08.dump 2018-08-14 18:14:43.136257456 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |4| @64
++ |f|o@1| |5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |f+8&&|o@1| |9| @64
++ |f+0&&|o@1| |1|0| @63
++ |b|a|r| |1@1| @63
++ |:|9|,|1|0|s|/|b|a|r> @59
+*** ../vim-8.1.0283/src/version.c 2018-08-14 17:28:42.408167699 +0200
+--- src/version.c 2018-08-14 18:11:55.033460059 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 284,
+ /**/
+
+
+--
+If you only have a hammer, you tend to see every problem as a nail.
+If you only have MS-Windows, you tend to solve every problem by rebooting.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0285 b/data/vim/patches/8.1.0285
new file mode 100644
index 000000000..c0eff3b5f
--- /dev/null
+++ b/data/vim/patches/8.1.0285
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0285
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0285
+Problem: Compiler warning for conversion.
+Solution: Add a type cast. (Mike Williams)
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0284/src/ex_getln.c 2018-08-14 18:16:30.683488007 +0200
+--- src/ex_getln.c 2018-08-14 20:12:43.682942699 +0200
+***************
+*** 580,586 ****
+ {
+ pat = last_search_pattern();
+ skiplen = 0;
+! patlen = STRLEN(pat);
+ }
+ else
+ pat = ccline.cmdbuff + skiplen;
+--- 580,586 ----
+ {
+ pat = last_search_pattern();
+ skiplen = 0;
+! patlen = (int)STRLEN(pat);
+ }
+ else
+ pat = ccline.cmdbuff + skiplen;
+*** ../vim-8.1.0284/src/version.c 2018-08-14 18:16:30.683488007 +0200
+--- src/version.c 2018-08-14 20:13:26.694695333 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 285,
+ /**/
+
+--
+Living on Earth includes an annual free trip around the Sun.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0286 b/data/vim/patches/8.1.0286
new file mode 100644
index 000000000..d6507bdf9
--- /dev/null
+++ b/data/vim/patches/8.1.0286
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0286
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0286
+Problem: 'incsearch' does not apply to :smagic and :snomagic.
+Solution: Add support. (Hirohito Higashi)
+Files: src/ex_getln.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0285/src/ex_getln.c 2018-08-14 20:18:22.680907439 +0200
+--- src/ex_getln.c 2018-08-14 21:10:45.311635658 +0200
+***************
+*** 231,236 ****
+--- 231,237 ----
+ pos_T match_end;
+ int did_incsearch;
+ int incsearch_postponed;
++ int magic_save;
+ } incsearch_state_T;
+
+ static void
+***************
+*** 239,244 ****
+--- 240,246 ----
+ is_state->match_start = curwin->w_cursor;
+ is_state->did_incsearch = FALSE;
+ is_state->incsearch_postponed = FALSE;
++ is_state->magic_save = p_magic;
+ CLEAR_POS(&is_state->match_end);
+ is_state->save_cursor = curwin->w_cursor; // may be restored later
+ is_state->search_start = curwin->w_cursor;
+***************
+*** 308,316 ****
+--- 310,325 ----
+ ;
+ if (*skipwhite(p) != NUL
+ && (STRNCMP(cmd, "substitute", p - cmd) == 0
++ || STRNCMP(cmd, "smagic", p - cmd) == 0
++ || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0
+ || STRNCMP(cmd, "global", p - cmd) == 0
+ || STRNCMP(cmd, "vglobal", p - cmd) == 0))
+ {
++ if (*cmd == 's' && cmd[1] == 'm')
++ p_magic = TRUE;
++ else if (*cmd == 's' && cmd[1] == 'n')
++ p_magic = FALSE;
++
+ // Check for "global!/".
+ if (*cmd == 'g' && *p == '!')
+ {
+***************
+*** 392,397 ****
+--- 401,407 ----
+ update_screen(SOME_VALID);
+ else
+ redraw_all_later(SOME_VALID);
++ p_magic = is_state->magic_save;
+ }
+ }
+
+*** ../vim-8.1.0285/src/testdir/test_search.vim 2018-08-14 18:16:30.683488007 +0200
+--- src/testdir/test_search.vim 2018-08-14 21:10:45.315635631 +0200
+***************
+*** 384,389 ****
+--- 384,397 ----
+ undo
+ call feedkeys(":%substitute/the\<c-l>/xxx\<cr>", 'tx')
+ call assert_equal(' 2 xxxe', getline('.'))
++ undo
++ call feedkeys(":%smagic/the.e/xxx\<cr>", 'tx')
++ call assert_equal(' 2 xxx', getline('.'))
++ undo
++ call assert_fails(":%snomagic/the.e/xxx\<cr>", 'E486')
++ "
++ call feedkeys(":%snomagic/the\\.e/xxx\<cr>", 'tx')
++ call assert_equal(' 2 xxx', getline('.'))
+
+ call Incsearch_cleanup()
+ endfunc
+*** ../vim-8.1.0285/src/version.c 2018-08-14 20:18:22.680907439 +0200
+--- src/version.c 2018-08-14 21:11:49.531195730 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 286,
+ /**/
+
+--
+ARTHUR: If you do not open these doors, we will take this castle by force ...
+ [A bucket of slops land on ARTHUR. He tries to retain his dignity.]
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0287 b/data/vim/patches/8.1.0287
new file mode 100644
index 000000000..39b473cf5
--- /dev/null
+++ b/data/vim/patches/8.1.0287
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0287
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0287
+Problem: MAX is not defined everywhere.
+Solution: Define MAX where needed.
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0286/src/ex_getln.c 2018-08-14 21:32:17.618865046 +0200
+--- src/ex_getln.c 2018-08-14 22:06:55.372214929 +0200
+***************
+*** 13,18 ****
+--- 13,22 ----
+
+ #include "vim.h"
+
++ #ifndef MAX
++ # define MAX(x,y) ((x) > (y) ? (x) : (y))
++ #endif
++
+ /*
+ * Variables shared between getcmdline(), redrawcmdline() and others.
+ * These need to be saved when using CTRL-R |, that's why they are in a
+*** ../vim-8.1.0286/src/version.c 2018-08-14 21:32:17.622865020 +0200
+--- src/version.c 2018-08-14 22:07:40.275897998 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 287,
+ /**/
+
+--
+BEDEVERE: Stand by for attack!!
+ [CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege
+ towers, pennants flying, shouts of "Stand by for attack!" Traditional
+ army build-up shots. The shouts echo across the ranks of the army.
+ We see various groups reacting, and stirring themselves in readiness.]
+ARTHUR: Who are they?
+BEDEVERE: Oh, just some friends!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0288 b/data/vim/patches/8.1.0288
new file mode 100644
index 000000000..60c71cca8
--- /dev/null
+++ b/data/vim/patches/8.1.0288
@@ -0,0 +1,498 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0288
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0288
+Problem: Quickfix code uses cmdidx too often.
+Solution: Add is_loclist_cmd(). (Yegappan Lakshmanan)
+Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/quickfix.c
+
+
+*** ../vim-8.1.0287/src/ex_docmd.c 2018-08-14 16:06:09.451696062 +0200
+--- src/ex_docmd.c 2018-08-15 20:53:22.429089025 +0200
+***************
+*** 12529,12534 ****
+--- 12529,12548 ----
+ }
+ #endif
+
++ #ifdef FEAT_QUICKFIX
++ /*
++ * Returns TRUE if the supplied Ex cmdidx is for a location list command
++ * instead of a quickfix command.
++ */
++ int
++ is_loclist_cmd(int cmdidx)
++ {
++ if (cmdidx < 0 || cmdidx > CMD_SIZE)
++ return FALSE;
++ return cmdnames[cmdidx].cmd_name[0] == 'l';
++ }
++ #endif
++
+ # if defined(FEAT_TIMERS) || defined(PROTO)
+ int
+ get_pressedreturn(void)
+*** ../vim-8.1.0287/src/proto/ex_docmd.pro 2018-08-14 16:06:09.451696062 +0200
+--- src/proto/ex_docmd.pro 2018-08-15 20:50:10.242164053 +0200
+***************
+*** 70,75 ****
+--- 70,76 ----
+ char_u *get_messages_arg(expand_T *xp, int idx);
+ char_u *get_mapclear_arg(expand_T *xp, int idx);
+ void set_no_hlsearch(int flag);
++ int is_loclist_cmd(int cmdidx);
+ int get_pressedreturn(void);
+ void set_pressedreturn(int val);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0287/src/quickfix.c 2018-08-11 13:36:51.806140673 +0200
+--- src/quickfix.c 2018-08-15 20:50:10.242164053 +0200
+***************
+*** 3330,3336 ****
+ recognised errors */
+ qf_info_T *qi = &ql_info;
+
+! if (eap->cmdidx == CMD_llist)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 3330,3336 ----
+ recognised errors */
+ qf_info_T *qi = &ql_info;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 3478,3484 ****
+ qf_info_T *qi = &ql_info;
+ int count;
+
+! if (eap->cmdidx == CMD_lolder || eap->cmdidx == CMD_lnewer)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 3478,3484 ----
+ qf_info_T *qi = &ql_info;
+ int count;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 3526,3532 ****
+ qf_info_T *qi = &ql_info;
+ int i;
+
+! if (eap->cmdidx == CMD_lhistory)
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL || (qi->qf_listcount == 0
+ && qf_list_empty(qi, qi->qf_curlist)))
+--- 3526,3532 ----
+ qf_info_T *qi = &ql_info;
+ int i;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL || (qi->qf_listcount == 0
+ && qf_list_empty(qi, qi->qf_curlist)))
+***************
+*** 3745,3751 ****
+ qf_info_T *qi = &ql_info;
+ win_T *win;
+
+! if (eap->cmdidx == CMD_lwindow)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 3745,3751 ----
+ qf_info_T *qi = &ql_info;
+ win_T *win;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 3781,3787 ****
+ win_T *win = NULL;
+ qf_info_T *qi = &ql_info;
+
+! if (eap->cmdidx == CMD_lclose || eap->cmdidx == CMD_lwindow)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 3781,3787 ----
+ win_T *win = NULL;
+ qf_info_T *qi = &ql_info;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 3808,3814 ****
+ buf_T *qf_buf;
+ win_T *oldwin = curwin;
+
+! if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 3808,3814 ----
+ buf_T *qf_buf;
+ win_T *oldwin = curwin;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 3953,3964 ****
+ * :cbottom/:lbottom commands.
+ */
+ void
+! ex_cbottom(exarg_T *eap UNUSED)
+ {
+ qf_info_T *qi = &ql_info;
+ win_T *win;
+
+! if (eap->cmdidx == CMD_lbottom)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 3953,3964 ----
+ * :cbottom/:lbottom commands.
+ */
+ void
+! ex_cbottom(exarg_T *eap)
+ {
+ qf_info_T *qi = &ql_info;
+ win_T *win;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 4430,4437 ****
+ enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
+ #endif
+
+! if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep
+! || eap->cmdidx == CMD_lgrepadd)
+ wp = curwin;
+
+ autowrite_all();
+--- 4430,4436 ----
+ enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
+ #endif
+
+! if (is_loclist_cmd(eap->cmdidx))
+ wp = curwin;
+
+ autowrite_all();
+***************
+*** 4570,4576 ****
+ int i, sz = 0;
+ int prev_fnum = 0;
+
+! if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo)
+ {
+ /* Location list */
+ qi = GET_LOC_LIST(curwin);
+--- 4569,4575 ----
+ int i, sz = 0;
+ int prev_fnum = 0;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ /* Location list */
+ qi = GET_LOC_LIST(curwin);
+***************
+*** 4607,4613 ****
+ {
+ qf_info_T *qi = &ql_info;
+
+! if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo)
+ {
+ /* Location list */
+ qi = GET_LOC_LIST(curwin);
+--- 4606,4612 ----
+ {
+ qf_info_T *qi = &ql_info;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ /* Location list */
+ qi = GET_LOC_LIST(curwin);
+***************
+*** 4631,4637 ****
+ int i, eidx = 0;
+ int prev_fnum = 0;
+
+! if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo)
+ {
+ /* Location list */
+ qi = GET_LOC_LIST(curwin);
+--- 4630,4636 ----
+ int i, eidx = 0;
+ int prev_fnum = 0;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ /* Location list */
+ qi = GET_LOC_LIST(curwin);
+***************
+*** 4724,4735 ****
+ qf_info_T *qi = &ql_info;
+ int errornr;
+
+! if (eap->cmdidx == CMD_ll
+! || eap->cmdidx == CMD_lrewind
+! || eap->cmdidx == CMD_lfirst
+! || eap->cmdidx == CMD_llast
+! || eap->cmdidx == CMD_ldo
+! || eap->cmdidx == CMD_lfdo)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 4723,4729 ----
+ qf_info_T *qi = &ql_info;
+ int errornr;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 4743,4755 ****
+ errornr = (int)eap->line2;
+ else
+ {
+! if (eap->cmdidx == CMD_cc || eap->cmdidx == CMD_ll)
+! errornr = 0;
+! else if (eap->cmdidx == CMD_crewind || eap->cmdidx == CMD_lrewind
+! || eap->cmdidx == CMD_cfirst || eap->cmdidx == CMD_lfirst)
+! errornr = 1;
+! else
+! errornr = 32767;
+ }
+
+ /* For cdo and ldo commands, jump to the nth valid error.
+--- 4737,4754 ----
+ errornr = (int)eap->line2;
+ else
+ {
+! switch (eap->cmdidx)
+! {
+! case CMD_cc: case CMD_ll:
+! errornr = 0;
+! break;
+! case CMD_crewind: case CMD_lrewind: case CMD_cfirst:
+! case CMD_lfirst:
+! errornr = 1;
+! break;
+! default:
+! errornr = 32767;
+! }
+ }
+
+ /* For cdo and ldo commands, jump to the nth valid error.
+***************
+*** 4774,4788 ****
+ {
+ qf_info_T *qi = &ql_info;
+ int errornr;
+
+! if (eap->cmdidx == CMD_lnext
+! || eap->cmdidx == CMD_lNext
+! || eap->cmdidx == CMD_lprevious
+! || eap->cmdidx == CMD_lnfile
+! || eap->cmdidx == CMD_lNfile
+! || eap->cmdidx == CMD_lpfile
+! || eap->cmdidx == CMD_ldo
+! || eap->cmdidx == CMD_lfdo)
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+--- 4773,4781 ----
+ {
+ qf_info_T *qi = &ql_info;
+ int errornr;
++ int dir;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+***************
+*** 4799,4815 ****
+ else
+ errornr = 1;
+
+! qf_jump(qi, (eap->cmdidx == CMD_cnext || eap->cmdidx == CMD_lnext
+! || eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo)
+! ? FORWARD
+! : (eap->cmdidx == CMD_cnfile || eap->cmdidx == CMD_lnfile
+! || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
+! ? FORWARD_FILE
+! : (eap->cmdidx == CMD_cpfile || eap->cmdidx == CMD_lpfile
+! || eap->cmdidx == CMD_cNfile || eap->cmdidx == CMD_lNfile)
+! ? BACKWARD_FILE
+! : BACKWARD,
+! errornr, eap->forceit);
+ }
+
+ /*
+--- 4792,4819 ----
+ else
+ errornr = 1;
+
+! // Depending on the command jump to either next or previous entry/file.
+! switch (eap->cmdidx)
+! {
+! case CMD_cnext: case CMD_lnext: case CMD_cdo: case CMD_ldo:
+! dir = FORWARD;
+! break;
+! case CMD_cprevious: case CMD_lprevious: case CMD_cNext:
+! case CMD_lNext:
+! dir = BACKWARD;
+! break;
+! case CMD_cnfile: case CMD_lnfile: case CMD_cfdo: case CMD_lfdo:
+! dir = FORWARD_FILE;
+! break;
+! case CMD_cpfile: case CMD_lpfile: case CMD_cNfile: case CMD_lNfile:
+! dir = BACKWARD_FILE;
+! break;
+! default:
+! dir = FORWARD;
+! break;
+! }
+!
+! qf_jump(qi, dir, errornr, eap->forceit);
+ }
+
+ /*
+***************
+*** 4857,4865 ****
+ if (*eap->arg != NUL)
+ set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0);
+
+! if (eap->cmdidx == CMD_lfile
+! || eap->cmdidx == CMD_lgetfile
+! || eap->cmdidx == CMD_laddfile)
+ wp = curwin;
+
+ /*
+--- 4861,4867 ----
+ if (*eap->arg != NUL)
+ set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0);
+
+! if (is_loclist_cmd(eap->cmdidx))
+ wp = curwin;
+
+ /*
+***************
+*** 5178,5187 ****
+ #endif
+ }
+
+! if (eap->cmdidx == CMD_lgrep
+! || eap->cmdidx == CMD_lvimgrep
+! || eap->cmdidx == CMD_lgrepadd
+! || eap->cmdidx == CMD_lvimgrepadd)
+ {
+ qi = ll_get_or_alloc_list(curwin);
+ if (qi == NULL)
+--- 5180,5186 ----
+ #endif
+ }
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = ll_get_or_alloc_list(curwin);
+ if (qi == NULL)
+***************
+*** 6525,6533 ****
+ }
+
+ /* Must come after autocommands. */
+! if (eap->cmdidx == CMD_lbuffer
+! || eap->cmdidx == CMD_lgetbuffer
+! || eap->cmdidx == CMD_laddbuffer)
+ {
+ qi = ll_get_or_alloc_list(curwin);
+ if (qi == NULL)
+--- 6524,6530 ----
+ }
+
+ /* Must come after autocommands. */
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = ll_get_or_alloc_list(curwin);
+ if (qi == NULL)
+***************
+*** 6631,6639 ****
+ #endif
+ }
+
+! if (eap->cmdidx == CMD_lexpr
+! || eap->cmdidx == CMD_lgetexpr
+! || eap->cmdidx == CMD_laddexpr)
+ {
+ qi = ll_get_or_alloc_list(curwin);
+ if (qi == NULL)
+--- 6628,6634 ----
+ #endif
+ }
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = ll_get_or_alloc_list(curwin);
+ if (qi == NULL)
+***************
+*** 6922,6928 ****
+ save_cpo = p_cpo;
+ p_cpo = empty_option;
+
+! if (eap->cmdidx == CMD_lhelpgrep)
+ {
+ qi = hgr_get_ll(&new_qi);
+ if (qi == NULL)
+--- 6917,6923 ----
+ save_cpo = p_cpo;
+ p_cpo = empty_option;
+
+! if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = hgr_get_ll(&new_qi);
+ if (qi == NULL)
+*** ../vim-8.1.0287/src/version.c 2018-08-14 22:08:20.211616525 +0200
+--- src/version.c 2018-08-15 20:51:09.609828450 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 288,
+ /**/
+
+--
+INSPECTOR END OF FILM: Move along. There's nothing to see! Keep moving!
+ [Suddenly he notices the cameras.]
+INSPECTOR END OF FILM: (to Camera) All right, put that away sonny.
+ [He walks over to it and puts his hand over the lens.]
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0289 b/data/vim/patches/8.1.0289
new file mode 100644
index 000000000..0a3133a45
--- /dev/null
+++ b/data/vim/patches/8.1.0289
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0289
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0289
+Problem: Cursor moves to wrong column after quickfix jump.
+Solution: Set the curswant flag. (Andy Massimino, closes #3331)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0288/src/quickfix.c 2018-08-15 20:59:44.227025009 +0200
+--- src/quickfix.c 2018-08-15 22:24:24.487511768 +0200
+***************
+*** 3010,3015 ****
+--- 3010,3016 ----
+ ++screen_col;
+ }
+ }
++ curwin->w_set_curswant = TRUE;
+ check_cursor();
+ }
+ else
+*** ../vim-8.1.0288/src/testdir/test_quickfix.vim 2018-08-09 21:19:15.778436046 +0200
+--- src/testdir/test_quickfix.vim 2018-08-15 22:24:24.487511768 +0200
+***************
+*** 3546,3548 ****
+--- 3546,3557 ----
+ call Xview_result_split_tests('c')
+ call Xview_result_split_tests('l')
+ endfunc
++
++ " Test that :cc sets curswant
++ func Test_curswant()
++ helpgrep quickfix
++ normal! llll
++ 1cc
++ call assert_equal(getcurpos()[4], virtcol('.'))
++ cclose | helpclose
++ endfunc
+*** ../vim-8.1.0288/src/version.c 2018-08-15 20:59:44.227025009 +0200
+--- src/version.c 2018-08-15 22:26:32.450753305 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 289,
+ /**/
+
+--
+TERRY GILLIAM PLAYED: PATSY (ARTHUR'S TRUSTY STEED), THE GREEN KNIGHT
+ SOOTHSAYER, BRIDGEKEEPER, SIR GAWAIN (THE FIRST TO BE
+ KILLED BY THE RABBIT)
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0290 b/data/vim/patches/8.1.0290
new file mode 100644
index 000000000..75aea620e
--- /dev/null
+++ b/data/vim/patches/8.1.0290
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0290
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0290
+Problem: "cit" on an empty HTML tag changes the whole tag.
+Solution: Only adjust the area in Visual mode. (Andy Massimino,
+ closes #3332)
+Files: src/search.c, src/testdir/test_textobjects.vim
+
+
+*** ../vim-8.1.0289/src/search.c 2018-06-19 18:27:38.271694008 +0200
+--- src/search.c 2018-08-16 21:29:39.554118770 +0200
+***************
+*** 4106,4114 ****
+ }
+ curwin->w_cursor = end_pos;
+
+! /* If we now have the same text as before reset "do_include" and try
+! * again. */
+! if (EQUAL_POS(start_pos, old_start) && EQUAL_POS(end_pos, old_end))
+ {
+ do_include = TRUE;
+ curwin->w_cursor = old_start;
+--- 4106,4115 ----
+ }
+ curwin->w_cursor = end_pos;
+
+! // If we are in Visual mode and now have the same text as before set
+! // "do_include" and try again.
+! if (VIsual_active && EQUAL_POS(start_pos, old_start)
+! && EQUAL_POS(end_pos, old_end))
+ {
+ do_include = TRUE;
+ curwin->w_cursor = old_start;
+*** ../vim-8.1.0289/src/testdir/test_textobjects.vim 2018-06-19 18:27:38.271694008 +0200
+--- src/testdir/test_textobjects.vim 2018-08-16 21:33:07.376701569 +0200
+***************
+*** 121,126 ****
+--- 121,143 ----
+ enew!
+ endfunc
+
++ func Test_empty_html_tag()
++ new
++ call setline(1, '<div></div>')
++ normal 0citxxx
++ call assert_equal('<div>xxx</div>', getline(1))
++
++ call setline(1, '<div></div>')
++ normal 0f<cityyy
++ call assert_equal('<div>yyy</div>', getline(1))
++
++ call setline(1, '<div></div>')
++ normal 0f<vitsaaa
++ call assert_equal('aaa', getline(1))
++
++ bwipe!
++ endfunc
++
+ " Tests for match() and matchstr()
+ func Test_match()
+ call assert_equal("b", matchstr("abcd", ".", 0, 2))
+*** ../vim-8.1.0289/src/version.c 2018-08-15 22:29:46.977604162 +0200
+--- src/version.c 2018-08-16 21:34:22.102172128 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 290,
+ /**/
+
+--
+NEIL INNES PLAYED: THE FIRST SELF-DESTRUCTIVE MONK, ROBIN'S LEAST FAVORITE
+ MINSTREL, THE PAGE CRUSHED BY A RABBIT, THE OWNER OF A DUCK
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0291 b/data/vim/patches/8.1.0291
new file mode 100644
index 000000000..0ef2f6623
--- /dev/null
+++ b/data/vim/patches/8.1.0291
@@ -0,0 +1,137 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0291
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0291
+Problem: 'incsearch' highlighting not used for :sort.
+Solution: Handle pattern in :sort command.
+Files: src/ex_getln.c, src/testdir/test_search.vim
+ src/testdir/dumps/Test_incsearch_sort_01.dump
+
+
+*** ../vim-8.1.0290/src/ex_getln.c 2018-08-14 22:08:20.211616525 +0200
+--- src/ex_getln.c 2018-08-18 16:02:12.989443789 +0200
+***************
+*** 316,321 ****
+--- 316,322 ----
+ && (STRNCMP(cmd, "substitute", p - cmd) == 0
+ || STRNCMP(cmd, "smagic", p - cmd) == 0
+ || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0
++ || STRNCMP(cmd, "sort", p - cmd) == 0
+ || STRNCMP(cmd, "global", p - cmd) == 0
+ || STRNCMP(cmd, "vglobal", p - cmd) == 0))
+ {
+***************
+*** 331,336 ****
+--- 332,347 ----
+ if (*skipwhite(p) == NUL)
+ return FALSE;
+ }
++
++ // For ":sort" skip over flags.
++ if (cmd[0] == 's' && cmd[1] == 'o')
++ {
++ while (ASCII_ISALPHA(*(p = skipwhite(p))))
++ ++p;
++ if (*p == NUL)
++ return FALSE;
++ }
++
+ p = skipwhite(p);
+ delim = *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+***************
+*** 359,365 ****
+ search_last_line = ea.line2;
+ }
+ }
+! else if (*cmd == 's')
+ {
+ // :s defaults to the current line
+ search_first_line = curwin->w_cursor.lnum;
+--- 370,376 ----
+ search_last_line = ea.line2;
+ }
+ }
+! else if (cmd[0] == 's' && cmd[1] != 'o')
+ {
+ // :s defaults to the current line
+ search_first_line = curwin->w_cursor.lnum;
+*** ../vim-8.1.0290/src/testdir/test_search.vim 2018-08-14 21:32:17.618865046 +0200
+--- src/testdir/test_search.vim 2018-08-18 16:03:40.248302161 +0200
+***************
+*** 917,922 ****
+--- 917,949 ----
+ call delete('Xis_subst_script')
+ endfunc
+
++ " Similar to Test_incsearch_substitute_dump() for :sort
++ func Test_incsearch_ssort_dump()
++ if !exists('+incsearch')
++ return
++ endif
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ 'set incsearch hlsearch scrolloff=0',
++ \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])',
++ \ ], 'Xis_sort_script')
++ let buf = RunVimInTerminal('-S Xis_sort_script', {'rows': 9, 'cols': 70})
++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
++ " the 'ambiwidth' check.
++ sleep 100m
++
++ " Need to send one key at a time to force a redraw.
++ call term_sendkeys(buf, ':sort ni u /on')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call StopVimInTerminal(buf)
++ call delete('Xis_sort_script')
++ endfunc
++
+ func Test_search_undefined_behaviour()
+ if !has("terminal")
+ return
+*** ../vim-8.1.0290/src/testdir/dumps/Test_incsearch_sort_01.dump 2018-08-18 16:10:12.014816068 +0200
+--- src/testdir/dumps/Test_incsearch_sort_01.dump 2018-08-18 16:03:45.812228115 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56
++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59
++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60
++ |~+0#4040ff13&| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |:+0#0000000&|s|o|r|t| |n|i| |u| |/|o|n> @55
+*** ../vim-8.1.0290/src/version.c 2018-08-16 21:37:46.389318767 +0200
+--- src/version.c 2018-08-18 16:09:14.599647949 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 291,
+ /**/
+
+--
+The MS-Windows registry is no more hostile than any other bunch of state
+information... that is held in a binary format... a format that nobody
+understands... and is replicated and cached in a complex and largely
+undocumented way... and contains large amounts of duplicate and obfuscated
+information... (Ben Peterson)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0292 b/data/vim/patches/8.1.0292
new file mode 100644
index 000000000..12c55dbfa
--- /dev/null
+++ b/data/vim/patches/8.1.0292
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0292
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0292
+Problem: MS-Windows: the text "self-installing" confuses some users.
+Solution: Remove the text from the uninstall entry. (closes #3337)
+Files: src/dosinst.c
+
+
+*** ../vim-8.1.0291/src/dosinst.c 2018-06-26 23:18:40.593167147 +0200
+--- src/dosinst.c 2018-08-18 18:39:00.554972683 +0200
+***************
+*** 1575,1592 ****
+ }
+
+ printf("Creating an uninstall entry\n");
+
+ /* For the NSIS installer use the generated uninstaller. */
+ if (interactive)
+- {
+- sprintf(display_name, "Vim " VIM_VERSION_SHORT);
+ sprintf(uninstall_string, "%s\\uninstal.exe", installdir);
+- }
+ else
+- {
+- sprintf(display_name, "Vim " VIM_VERSION_SHORT " (self-installing)");
+ sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir);
+- }
+
+ lRet = register_uninstall(
+ HKEY_LOCAL_MACHINE,
+--- 1575,1587 ----
+ }
+
+ printf("Creating an uninstall entry\n");
++ sprintf(display_name, "Vim " VIM_VERSION_SHORT);
+
+ /* For the NSIS installer use the generated uninstaller. */
+ if (interactive)
+ sprintf(uninstall_string, "%s\\uninstal.exe", installdir);
+ else
+ sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir);
+
+ lRet = register_uninstall(
+ HKEY_LOCAL_MACHINE,
+*** ../vim-8.1.0291/src/version.c 2018-08-18 16:10:57.086158061 +0200
+--- src/version.c 2018-08-18 18:40:09.909908817 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 292,
+ /**/
+
+--
+A year spent in artificial intelligence is enough to make one
+believe in God.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0293 b/data/vim/patches/8.1.0293
new file mode 100644
index 000000000..f3a45c01e
--- /dev/null
+++ b/data/vim/patches/8.1.0293
@@ -0,0 +1,186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0293
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0293
+Problem: Checks for type of stack is cryptic.
+Solution: Define IS_QF_STACK() and IS_LL_STACK(). (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0292/src/quickfix.c 2018-08-15 22:29:46.977604162 +0200
+--- src/quickfix.c 2018-08-18 19:51:21.810177230 +0200
+***************
+*** 159,164 ****
+--- 159,169 ----
+ #define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL)
+ /* Location list window check helper macro */
+ #define IS_LL_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL)
++
++ // Quickfix and location list stack check helper macros
++ #define IS_QF_STACK(qi) (qi == &ql_info)
++ #define IS_LL_STACK(qi) (qi != &ql_info)
++
+ /*
+ * Return location list for window 'wp'
+ * For location list window, return the referenced location list
+***************
+*** 1940,1946 ****
+ qfp->qf_fnum = bufnum;
+ if (buf != NULL)
+ buf->b_has_qf_entry |=
+! (qi == &ql_info) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ }
+ else
+ qfp->qf_fnum = qf_get_fnum(qi, qf_idx, dir, fname);
+--- 1945,1951 ----
+ qfp->qf_fnum = bufnum;
+ if (buf != NULL)
+ buf->b_has_qf_entry |=
+! IS_QF_STACK(qi) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ }
+ else
+ qfp->qf_fnum = qf_get_fnum(qi, qf_idx, dir, fname);
+***************
+*** 2224,2230 ****
+ return 0;
+
+ buf->b_has_qf_entry =
+! (qi == &ql_info) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ return buf->b_fnum;
+ }
+
+--- 2229,2235 ----
+ return 0;
+
+ buf->b_has_qf_entry =
+! IS_QF_STACK(qi) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ return buf->b_fnum;
+ }
+
+***************
+*** 2631,2637 ****
+ if (cmdmod.split == 0 && curwin->w_width != Columns
+ && curwin->w_width < 80)
+ flags |= WSP_TOP;
+! if (qi != &ql_info)
+ flags |= WSP_NEWLOC; /* don't copy the location list */
+
+ if (win_split(0, flags) == FAIL)
+--- 2636,2642 ----
+ if (cmdmod.split == 0 && curwin->w_width != Columns
+ && curwin->w_width < 80)
+ flags |= WSP_TOP;
+! if (IS_LL_STACK(qi))
+ flags |= WSP_NEWLOC; /* don't copy the location list */
+
+ if (win_split(0, flags) == FAIL)
+***************
+*** 2642,2648 ****
+ if (curwin->w_height < p_hh)
+ win_setheight((int)p_hh);
+
+! if (qi != &ql_info) /* not a quickfix list */
+ {
+ /* The new window should use the supplied location list */
+ curwin->w_llist = qi;
+--- 2647,2653 ----
+ if (curwin->w_height < p_hh)
+ win_setheight((int)p_hh);
+
+! if (IS_LL_STACK(qi)) // not a quickfix list
+ {
+ /* The new window should use the supplied location list */
+ curwin->w_llist = qi;
+***************
+*** 2918,2924 ****
+ retval = buflist_getfile(qf_ptr->qf_fnum,
+ (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+
+! if (qi != &ql_info)
+ {
+ /*
+ * Location list. Check whether the associated window is still
+--- 2923,2929 ----
+ retval = buflist_getfile(qf_ptr->qf_fnum,
+ (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+
+! if (IS_LL_STACK(qi))
+ {
+ /*
+ * Location list. Check whether the associated window is still
+***************
+*** 2939,2945 ****
+ else if (old_qf_curlist != qi->qf_curlist
+ || !is_qf_entry_present(qi, qf_ptr))
+ {
+! if (qi == &ql_info)
+ EMSG(_("E925: Current quickfix was changed"));
+ else
+ EMSG(_(e_loc_list_changed));
+--- 2944,2950 ----
+ else if (old_qf_curlist != qi->qf_curlist
+ || !is_qf_entry_present(qi, qf_ptr))
+ {
+! if (IS_QF_STACK(qi))
+ EMSG(_("E925: Current quickfix was changed"));
+ else
+ EMSG(_(e_loc_list_changed));
+***************
+*** 4040,4047 ****
+ * pointing to the location list.
+ */
+ if (bt_quickfix(win->w_buffer))
+! if ((qi == &ql_info && win->w_llist_ref == NULL)
+! || (qi != &ql_info && win->w_llist_ref == qi))
+ return TRUE;
+
+ return FALSE;
+--- 4045,4052 ----
+ * pointing to the location list.
+ */
+ if (bt_quickfix(win->w_buffer))
+! if ((IS_QF_STACK(qi) && win->w_llist_ref == NULL)
+! || (IS_LL_STACK(qi) && win->w_llist_ref == qi))
+ return TRUE;
+
+ return FALSE;
+***************
+*** 6955,6961 ****
+ {
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+! if (!new_qi && qi != &ql_info && qf_find_buf(qi) == NULL)
+ /* autocommands made "qi" invalid */
+ return;
+ }
+--- 6960,6966 ----
+ {
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+! if (!new_qi && IS_LL_STACK(qi) && qf_find_buf(qi) == NULL)
+ /* autocommands made "qi" invalid */
+ return;
+ }
+*** ../vim-8.1.0292/src/version.c 2018-08-18 19:04:32.462231841 +0200
+--- src/version.c 2018-08-18 19:58:34.263431696 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 293,
+ /**/
+
+--
+FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0294 b/data/vim/patches/8.1.0294
new file mode 100644
index 000000000..bcd97946c
--- /dev/null
+++ b/data/vim/patches/8.1.0294
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0294
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0294
+Problem: MS-Windows: sometimes uses short directory name.
+Solution: Expand to long file name with correct caps. (Nobuhiro Takasaki,
+ closes #3334)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0293/src/os_win32.c 2018-08-07 22:30:26.674240818 +0200
+--- src/os_win32.c 2018-08-18 20:17:32.174060746 +0200
+***************
+*** 3108,3113 ****
+--- 3108,3115 ----
+ char_u *buf,
+ int len)
+ {
++ char_u abuf[_MAX_PATH + 1];
++
+ /*
+ * Originally this was:
+ * return (getcwd(buf, len) != NULL ? OK : FAIL);
+***************
+*** 3121,3127 ****
+
+ if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0)
+ {
+! char_u *p = utf16_to_enc(wbuf, NULL);
+
+ if (p != NULL)
+ {
+--- 3123,3135 ----
+
+ if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0)
+ {
+! WCHAR wcbuf[_MAX_PATH + 1];
+! char_u *p;
+!
+! if (GetLongPathNameW(wbuf, wcbuf, _MAX_PATH) != 0)
+! p = utf16_to_enc(wcbuf, NULL);
+! else
+! p = utf16_to_enc(wbuf, NULL);
+
+ if (p != NULL)
+ {
+***************
+*** 3133,3139 ****
+ return FAIL;
+ }
+ #endif
+! return (GetCurrentDirectory(len, (LPSTR)buf) != 0 ? OK : FAIL);
+ }
+
+ /*
+--- 3141,3154 ----
+ return FAIL;
+ }
+ #endif
+! if (GetCurrentDirectory(len, (LPSTR)buf) == 0)
+! return FAIL;
+! if (GetLongPathNameA((LPSTR)buf, (LPSTR)abuf, _MAX_PATH) == 0)
+! // return the short path name
+! return OK;
+!
+! vim_strncpy(abuf, buf, len - 1);
+! return OK;
+ }
+
+ /*
+*** ../vim-8.1.0293/src/version.c 2018-08-18 19:59:48.418322409 +0200
+--- src/version.c 2018-08-18 20:19:26.912289008 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 294,
+ /**/
+
+--
+A fool must search for a greater fool to find admiration.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0295 b/data/vim/patches/8.1.0295
new file mode 100644
index 000000000..52a56b81e
--- /dev/null
+++ b/data/vim/patches/8.1.0295
@@ -0,0 +1,294 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0295
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0295
+Problem: No 'incsearch' highlighting for :vimgrep and similar commands.
+Solution: Parse the :vimgrep command and similar ones to locate the search
+ pattern. (Hirohito Higashi, closes #3344)
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_vimgrep_01.dump,
+ src/testdir/dumps/Test_incsearch_vimgrep_02.dump,
+ src/testdir/dumps/Test_incsearch_vimgrep_03.dump,
+ src/testdir/dumps/Test_incsearch_vimgrep_04.dump,
+ src/testdir/dumps/Test_incsearch_vimgrep_05.dump
+
+
+*** ../vim-8.1.0294/src/ex_getln.c 2018-08-18 16:10:57.086158061 +0200
+--- src/ex_getln.c 2018-08-18 20:54:23.233372360 +0200
+***************
+*** 307,355 ****
+ cmdmod = save_cmdmod;
+
+ cmd = skip_range(ea.cmd, NULL);
+! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v')
+ {
+ // Skip over "substitute" to find the pattern separator.
+ for (p = cmd; ASCII_ISALPHA(*p); ++p)
+ ;
+! if (*skipwhite(p) != NUL
+! && (STRNCMP(cmd, "substitute", p - cmd) == 0
+! || STRNCMP(cmd, "smagic", p - cmd) == 0
+! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "sort", p - cmd) == 0
+! || STRNCMP(cmd, "global", p - cmd) == 0
+! || STRNCMP(cmd, "vglobal", p - cmd) == 0))
+ {
+! if (*cmd == 's' && cmd[1] == 'm')
+! p_magic = TRUE;
+! else if (*cmd == 's' && cmd[1] == 'n')
+! p_magic = FALSE;
+!
+! // Check for "global!/".
+! if (*cmd == 'g' && *p == '!')
+ {
+! p++;
+! if (*skipwhite(p) == NUL)
+! return FALSE;
+ }
+!
+! // For ":sort" skip over flags.
+! if (cmd[0] == 's' && cmd[1] == 'o')
+ {
+! while (ASCII_ISALPHA(*(p = skipwhite(p))))
+! ++p;
+! if (*p == NUL)
+! return FALSE;
+ }
+
+- p = skipwhite(p);
+- delim = *p++;
+- end = skip_regexp(p, delim, p_magic, NULL);
+ if (end > p || *end == delim)
+ {
+ pos_T save_cursor = curwin->w_cursor;
+
+! // found a non-empty pattern
+ *skiplen = (int)(p - ccline.cmdbuff);
+ *patlen = (int)(end - p);
+
+--- 307,379 ----
+ cmdmod = save_cmdmod;
+
+ cmd = skip_range(ea.cmd, NULL);
+! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v' || *cmd == 'l')
+ {
+ // Skip over "substitute" to find the pattern separator.
+ for (p = cmd; ASCII_ISALPHA(*p); ++p)
+ ;
+! if (*skipwhite(p) != NUL)
+ {
+! if (STRNCMP(cmd, "substitute", p - cmd) == 0
+! || STRNCMP(cmd, "smagic", p - cmd) == 0
+! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "global", p - cmd) == 0
+! || STRNCMP(cmd, "vglobal", p - cmd) == 0)
+ {
+! if (*cmd == 's' && cmd[1] == 'm')
+! p_magic = TRUE;
+! else if (*cmd == 's' && cmd[1] == 'n')
+! p_magic = FALSE;
+!
+! // Check for "global!/".
+! if (*cmd == 'g' && *p == '!')
+! {
+! p++;
+! if (*skipwhite(p) == NUL)
+! return FALSE;
+! }
+!
+! // For ":sort" skip over flags.
+! if (cmd[0] == 's' && cmd[1] == 'o')
+! {
+! while (ASCII_ISALPHA(*(p = skipwhite(p))))
+! ++p;
+! if (*p == NUL)
+! return FALSE;
+! }
+!
+! p = skipwhite(p);
+! delim = *p++;
+! end = skip_regexp(p, delim, p_magic, NULL);
+ }
+! else if (STRNCMP(cmd, "vimgrep", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "vimgrepadd", MAX(p - cmd, 8)) == 0
+! || STRNCMP(cmd, "lvimgrep", MAX(p - cmd, 2)) == 0
+! || STRNCMP(cmd, "lvimgrepadd", MAX(p - cmd, 9)) == 0)
+! {
+! // Check for "!/".
+! if (*p == '!')
+! {
+! p++;
+! if (*skipwhite(p) == NUL)
+! return FALSE;
+! }
+! p = skipwhite(p);
+! delim = (vim_isIDc(*p)) ? ' ' : *p++;
+! end = skip_regexp(p, delim, p_magic, NULL);
+! }
+! else
+ {
+! end = p;
+! delim = -1;
+ }
+
+ if (end > p || *end == delim)
+ {
+ pos_T save_cursor = curwin->w_cursor;
+
+! // found a non-empty pattern or //
+ *skiplen = (int)(p - ccline.cmdbuff);
+ *patlen = (int)(end - p);
+
+*** ../vim-8.1.0294/src/testdir/test_search.vim 2018-08-18 16:10:57.086158061 +0200
+--- src/testdir/test_search.vim 2018-08-18 20:41:36.648615963 +0200
+***************
+*** 944,949 ****
+--- 944,996 ----
+ call delete('Xis_sort_script')
+ endfunc
+
++ " Similar to Test_incsearch_substitute_dump() for :vimgrep famiry
++ func Test_incsearch_vimgrep_dump()
++ if !exists('+incsearch')
++ return
++ endif
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ 'set incsearch hlsearch scrolloff=0',
++ \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])',
++ \ ], 'Xis_vimgrep_script')
++ let buf = RunVimInTerminal('-S Xis_vimgrep_script', {'rows': 9, 'cols': 70})
++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
++ " the 'ambiwidth' check.
++ sleep 100m
++
++ " Need to send one key at a time to force a redraw.
++ call term_sendkeys(buf, ':vimgrep on')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_01', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call term_sendkeys(buf, ':vimg /on/ *.txt')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_02', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call term_sendkeys(buf, ':vimgrepadd "\<on')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_03', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call term_sendkeys(buf, ':lv "tha')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_04', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call term_sendkeys(buf, ':lvimgrepa "the" **/*.txt')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_05', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call StopVimInTerminal(buf)
++ call delete('Xis_vimgrep_script')
++ endfunc
++
+ func Test_search_undefined_behaviour()
+ if !has("terminal")
+ return
+*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_01.dump 2018-08-18 21:04:47.792014166 +0200
+--- src/testdir/dumps/Test_incsearch_vimgrep_01.dump 2018-08-18 20:41:36.648615963 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56
++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59
++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60
++ |~+0#4040ff13&| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |:+0#0000000&|v|i|m|g|r|e|p| |o|n> @58
+*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_02.dump 2018-08-18 21:04:47.796014105 +0200
+--- src/testdir/dumps/Test_incsearch_vimgrep_02.dump 2018-08-18 20:41:36.648615963 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56
++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59
++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60
++ |~+0#4040ff13&| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |:+0#0000000&|v|i|m|g| |/|o|n|/| |*|.|t|x|t> @53
+*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_03.dump 2018-08-18 21:04:47.804013985 +0200
+--- src/testdir/dumps/Test_incsearch_vimgrep_03.dump 2018-08-18 20:41:36.648615963 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56
++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59
++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60
++ |~+0#4040ff13&| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |:+0#0000000&|v|i|m|g|r|e|p|a|d@1| |"|\|<|o|n> @52
+*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_04.dump 2018-08-18 21:04:47.808013925 +0200
+--- src/testdir/dumps/Test_incsearch_vimgrep_04.dump 2018-08-18 20:41:36.648615963 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |a+0&#ffffff0|n|o|t|h|e|r| |o|n|e| |2| @56
++ |t+1&&|h|a|t+0&&| |o|n|e| |3| @59
++ |t|h|e| |o|n|e| |1| @60
++ |~+0#4040ff13&| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |:+0#0000000&|l|v| |"|t|h|a> @61
+*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_05.dump 2018-08-18 21:04:47.816013804 +0200
+--- src/testdir/dumps/Test_incsearch_vimgrep_05.dump 2018-08-18 20:41:36.648615963 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |a+0&#ffffff0|n|o|t+1&&|h|e|r+0&&| |o|n|e| |2| @56
++ |t|h|a|t| |o|n|e| |3| @59
++ |t+0&#ffff4012|h|e| +0&#ffffff0|o|n|e| |1| @60
++ |~+0#4040ff13&| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |~| @68
++ |:+0#0000000&|l|v|i|m|g|r|e|p|a| |"|t|h|e|"| |*@1|/|*|.|t|x|t> @44
+*** ../vim-8.1.0294/src/version.c 2018-08-18 20:20:23.335417254 +0200
+--- src/version.c 2018-08-18 21:01:32.666945603 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 295,
+ /**/
+
+--
+Wi n0t trei a h0liday in Sweden thi yer?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0296 b/data/vim/patches/8.1.0296
new file mode 100644
index 000000000..26acf8115
--- /dev/null
+++ b/data/vim/patches/8.1.0296
@@ -0,0 +1,306 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0296
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0296
+Problem: Command parsing for 'incsearch' is a bit ugly.
+Solution: Return when there is no pattern. Put common checks together.
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0295/src/ex_getln.c 2018-08-18 21:04:57.743864534 +0200
+--- src/ex_getln.c 2018-08-18 21:20:59.041314761 +0200
+***************
+*** 276,415 ****
+ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
+ int *skiplen, int *patlen)
+ {
+ *skiplen = 0;
+ *patlen = ccline.cmdlen;
+
+! if (p_is && !cmd_silent)
+ {
+! // by default search all lines
+! search_first_line = 0;
+! search_last_line = MAXLNUM;
+!
+! if (firstc == '/' || firstc == '?')
+! return TRUE;
+! if (firstc == ':')
+ {
+! char_u *cmd;
+! cmdmod_T save_cmdmod = cmdmod;
+! char_u *p;
+! int delim;
+! char_u *end;
+! char_u *dummy;
+! exarg_T ea;
+!
+! vim_memset(&ea, 0, sizeof(ea));
+! ea.line1 = 1;
+! ea.line2 = 1;
+! ea.cmd = ccline.cmdbuff;
+! ea.addr_type = ADDR_LINES;
+!
+! parse_command_modifiers(&ea, &dummy, TRUE);
+! cmdmod = save_cmdmod;
+!
+! cmd = skip_range(ea.cmd, NULL);
+! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v' || *cmd == 'l')
+! {
+! // Skip over "substitute" to find the pattern separator.
+! for (p = cmd; ASCII_ISALPHA(*p); ++p)
+! ;
+! if (*skipwhite(p) != NUL)
+! {
+! if (STRNCMP(cmd, "substitute", p - cmd) == 0
+! || STRNCMP(cmd, "smagic", p - cmd) == 0
+! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "global", p - cmd) == 0
+! || STRNCMP(cmd, "vglobal", p - cmd) == 0)
+! {
+! if (*cmd == 's' && cmd[1] == 'm')
+! p_magic = TRUE;
+! else if (*cmd == 's' && cmd[1] == 'n')
+! p_magic = FALSE;
+!
+! // Check for "global!/".
+! if (*cmd == 'g' && *p == '!')
+! {
+! p++;
+! if (*skipwhite(p) == NUL)
+! return FALSE;
+! }
+!
+! // For ":sort" skip over flags.
+! if (cmd[0] == 's' && cmd[1] == 'o')
+! {
+! while (ASCII_ISALPHA(*(p = skipwhite(p))))
+! ++p;
+! if (*p == NUL)
+! return FALSE;
+! }
+!
+! p = skipwhite(p);
+! delim = *p++;
+! end = skip_regexp(p, delim, p_magic, NULL);
+! }
+! else if (STRNCMP(cmd, "vimgrep", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "vimgrepadd", MAX(p - cmd, 8)) == 0
+! || STRNCMP(cmd, "lvimgrep", MAX(p - cmd, 2)) == 0
+! || STRNCMP(cmd, "lvimgrepadd", MAX(p - cmd, 9)) == 0)
+! {
+! // Check for "!/".
+! if (*p == '!')
+! {
+! p++;
+! if (*skipwhite(p) == NUL)
+! return FALSE;
+! }
+! p = skipwhite(p);
+! delim = (vim_isIDc(*p)) ? ' ' : *p++;
+! end = skip_regexp(p, delim, p_magic, NULL);
+! }
+! else
+! {
+! end = p;
+! delim = -1;
+! }
+!
+! if (end > p || *end == delim)
+! {
+! pos_T save_cursor = curwin->w_cursor;
+!
+! // found a non-empty pattern or //
+! *skiplen = (int)(p - ccline.cmdbuff);
+! *patlen = (int)(end - p);
+!
+! // parse the address range
+! curwin->w_cursor = is_state->search_start;
+! parse_cmd_address(&ea, &dummy);
+! if (ea.addr_count > 0)
+! {
+! // Allow for reverse match.
+! if (ea.line2 < ea.line1)
+! {
+! search_first_line = ea.line2;
+! search_last_line = ea.line1;
+! }
+! else
+! {
+! search_first_line = ea.line1;
+! search_last_line = ea.line2;
+! }
+! }
+! else if (cmd[0] == 's' && cmd[1] != 'o')
+! {
+! // :s defaults to the current line
+! search_first_line = curwin->w_cursor.lnum;
+! search_last_line = curwin->w_cursor.lnum;
+! }
+!
+! curwin->w_cursor = save_cursor;
+! return TRUE;
+! }
+! }
+! }
+ }
+ }
+
+! return FALSE;
+ }
+
+ static void
+--- 276,400 ----
+ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
+ int *skiplen, int *patlen)
+ {
++ char_u *cmd;
++ cmdmod_T save_cmdmod = cmdmod;
++ char_u *p;
++ int delim_optional = FALSE;
++ int delim;
++ char_u *end;
++ char_u *dummy;
++ exarg_T ea;
++ pos_T save_cursor;
++
+ *skiplen = 0;
+ *patlen = ccline.cmdlen;
+
+! if (!p_is || cmd_silent)
+! return FALSE;
+!
+! // by default search all lines
+! search_first_line = 0;
+! search_last_line = MAXLNUM;
+!
+! if (firstc == '/' || firstc == '?')
+! return TRUE;
+! if (firstc != ':')
+! return FALSE;
+!
+! vim_memset(&ea, 0, sizeof(ea));
+! ea.line1 = 1;
+! ea.line2 = 1;
+! ea.cmd = ccline.cmdbuff;
+! ea.addr_type = ADDR_LINES;
+!
+! parse_command_modifiers(&ea, &dummy, TRUE);
+! cmdmod = save_cmdmod;
+!
+! cmd = skip_range(ea.cmd, NULL);
+! if (vim_strchr((char_u *)"sgvl", *cmd) == NULL)
+! return FALSE;
+!
+! // Skip over "substitute" to find the pattern separator.
+! for (p = cmd; ASCII_ISALPHA(*p); ++p)
+! ;
+! if (*skipwhite(p) == NUL)
+! return FALSE;
+!
+! if (STRNCMP(cmd, "substitute", p - cmd) == 0
+! || STRNCMP(cmd, "smagic", p - cmd) == 0
+! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "vglobal", p - cmd) == 0)
+! {
+! if (*cmd == 's' && cmd[1] == 'm')
+! p_magic = TRUE;
+! else if (*cmd == 's' && cmd[1] == 'n')
+! p_magic = FALSE;
+! }
+! else if (STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0)
+ {
+! // skip over flags
+! while (ASCII_ISALPHA(*(p = skipwhite(p))))
+! ++p;
+! if (*p == NUL)
+! return FALSE;
+! }
+! else if (STRNCMP(cmd, "vimgrep", MAX(p - cmd, 3)) == 0
+! || STRNCMP(cmd, "vimgrepadd", MAX(p - cmd, 8)) == 0
+! || STRNCMP(cmd, "lvimgrep", MAX(p - cmd, 2)) == 0
+! || STRNCMP(cmd, "lvimgrepadd", MAX(p - cmd, 9)) == 0
+! || STRNCMP(cmd, "global", p - cmd) == 0)
+! {
+! // skip over "!"
+! if (*p == '!')
+ {
+! p++;
+! if (*skipwhite(p) == NUL)
+! return FALSE;
+ }
++ if (*cmd != 'g')
++ delim_optional = TRUE;
++ }
++ else
++ return FALSE;
++
++ p = skipwhite(p);
++ delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++;
++ end = skip_regexp(p, delim, p_magic, NULL);
++
++ if (end == p && *end != delim)
++ return FALSE;
++ // found a non-empty pattern or //
++
++ *skiplen = (int)(p - ccline.cmdbuff);
++ *patlen = (int)(end - p);
++
++ // parse the address range
++ save_cursor = curwin->w_cursor;
++ curwin->w_cursor = is_state->search_start;
++ parse_cmd_address(&ea, &dummy);
++ if (ea.addr_count > 0)
++ {
++ // Allow for reverse match.
++ if (ea.line2 < ea.line1)
++ {
++ search_first_line = ea.line2;
++ search_last_line = ea.line1;
++ }
++ else
++ {
++ search_first_line = ea.line1;
++ search_last_line = ea.line2;
++ }
++ }
++ else if (cmd[0] == 's' && cmd[1] != 'o')
++ {
++ // :s defaults to the current line
++ search_first_line = curwin->w_cursor.lnum;
++ search_last_line = curwin->w_cursor.lnum;
+ }
+
+! curwin->w_cursor = save_cursor;
+! return TRUE;
+ }
+
+ static void
+*** ../vim-8.1.0295/src/version.c 2018-08-18 21:04:57.743864534 +0200
+--- src/version.c 2018-08-18 21:22:23.748034012 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 296,
+ /**/
+
+--
+The Characters and incidents portrayed and the names used are fictitious and
+any similarity to the names, characters, or history of any person is entirely
+accidental and unintentional.
+ Signed RICHARD M. NIXON
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0297 b/data/vim/patches/8.1.0297
new file mode 100644
index 000000000..c91b19222
--- /dev/null
+++ b/data/vim/patches/8.1.0297
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0297
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0297 (after 8.1.0294)
+Problem: MS-Windows: tests fail, Vim crashes.
+Solution: Fix long file name handling.
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0296/src/os_win32.c 2018-08-18 20:20:23.335417254 +0200
+--- src/os_win32.c 2018-08-19 14:36:25.032599518 +0200
+***************
+*** 3109,3114 ****
+--- 3109,3115 ----
+ int len)
+ {
+ char_u abuf[_MAX_PATH + 1];
++ DWORD lfnlen;
+
+ /*
+ * Originally this was:
+***************
+*** 3124,3134 ****
+ if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0)
+ {
+ WCHAR wcbuf[_MAX_PATH + 1];
+! char_u *p;
+
+ if (GetLongPathNameW(wbuf, wcbuf, _MAX_PATH) != 0)
+ p = utf16_to_enc(wcbuf, NULL);
+! else
+ p = utf16_to_enc(wbuf, NULL);
+
+ if (p != NULL)
+--- 3125,3143 ----
+ if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0)
+ {
+ WCHAR wcbuf[_MAX_PATH + 1];
+! char_u *p = NULL;
+
+ if (GetLongPathNameW(wbuf, wcbuf, _MAX_PATH) != 0)
++ {
+ p = utf16_to_enc(wcbuf, NULL);
+! if (STRLEN(p) >= (size_t)len)
+! {
+! // long path name is too long, fall back to short one
+! vim_free(p);
+! p = NULL;
+! }
+! }
+! if (p == NULL)
+ p = utf16_to_enc(wbuf, NULL);
+
+ if (p != NULL)
+***************
+*** 3143,3153 ****
+ #endif
+ if (GetCurrentDirectory(len, (LPSTR)buf) == 0)
+ return FAIL;
+! if (GetLongPathNameA((LPSTR)buf, (LPSTR)abuf, _MAX_PATH) == 0)
+! // return the short path name
+ return OK;
+
+! vim_strncpy(abuf, buf, len - 1);
+ return OK;
+ }
+
+--- 3152,3164 ----
+ #endif
+ if (GetCurrentDirectory(len, (LPSTR)buf) == 0)
+ return FAIL;
+! lfnlen = GetLongPathNameA((LPCSTR)buf, (LPSTR)abuf, _MAX_PATH);
+! if (lfnlen == 0 || lfnlen >= (DWORD)len)
+! // Failed to get long path name or it's too long: fall back to the
+! // short path name.
+ return OK;
+
+! STRCPY(buf, abuf);
+ return OK;
+ }
+
+*** ../vim-8.1.0296/src/version.c 2018-08-18 21:23:00.787474060 +0200
+--- src/version.c 2018-08-19 14:33:49.277455703 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 297,
+ /**/
+
+--
+The most powerful force in the universe is gossip.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0298 b/data/vim/patches/8.1.0298
new file mode 100644
index 000000000..5e1c59529
--- /dev/null
+++ b/data/vim/patches/8.1.0298
@@ -0,0 +1,44 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0298
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0298
+Problem: Window resize test sometimes fails on Mac.
+Solution: Add Test_popup_and_window_resize() to flaky tests.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0297/src/testdir/runtest.vim 2018-06-12 14:58:35.566840630 +0200
+--- src/testdir/runtest.vim 2018-08-19 15:46:43.666107201 +0200
+***************
+*** 272,277 ****
+--- 272,278 ----
+ \ 'Test_paused()',
+ \ 'Test_pipe_through_sort_all()',
+ \ 'Test_pipe_through_sort_some()',
++ \ 'Test_popup_and_window_resize()', " sometimes fails on Mac
+ \ 'Test_quoteplus()',
+ \ 'Test_quotestar()',
+ \ 'Test_reltime()',
+*** ../vim-8.1.0297/src/version.c 2018-08-19 14:38:38.979859032 +0200
+--- src/version.c 2018-08-19 15:47:31.893813723 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 298,
+ /**/
+
+--
+Mushrooms always grow in damp places and so they look like umbrellas.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0299 b/data/vim/patches/8.1.0299
new file mode 100644
index 000000000..cbb29531f
--- /dev/null
+++ b/data/vim/patches/8.1.0299
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0299
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0299 (after 8.1.0298)
+Problem: misplaced comment
+Solution: Remove comment
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0298/src/testdir/runtest.vim 2018-08-19 16:09:15.374103260 +0200
+--- src/testdir/runtest.vim 2018-08-19 16:52:33.834574032 +0200
+***************
+*** 272,278 ****
+ \ 'Test_paused()',
+ \ 'Test_pipe_through_sort_all()',
+ \ 'Test_pipe_through_sort_some()',
+! \ 'Test_popup_and_window_resize()', " sometimes fails on Mac
+ \ 'Test_quoteplus()',
+ \ 'Test_quotestar()',
+ \ 'Test_reltime()',
+--- 272,278 ----
+ \ 'Test_paused()',
+ \ 'Test_pipe_through_sort_all()',
+ \ 'Test_pipe_through_sort_some()',
+! \ 'Test_popup_and_window_resize()',
+ \ 'Test_quoteplus()',
+ \ 'Test_quotestar()',
+ \ 'Test_reltime()',
+*** ../vim-8.1.0298/src/version.c 2018-08-19 16:09:15.378103236 +0200
+--- src/version.c 2018-08-19 16:53:09.818358203 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 299,
+ /**/
+
+--
+To keep milk from turning sour: Keep it in the cow.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0300 b/data/vim/patches/8.1.0300
new file mode 100644
index 000000000..45f5bd25f
--- /dev/null
+++ b/data/vim/patches/8.1.0300
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0300
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0300
+Problem: The old window title might be freed twice. (Dominique Pelle)
+Solution: Do not free "oldtitle" in a signal handler but set a flag to have
+ it freed later.
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0299/src/os_unix.c 2018-08-11 13:57:16.215969777 +0200
+--- src/os_unix.c 2018-08-19 22:13:19.187362836 +0200
+***************
+*** 161,166 ****
+--- 161,167 ----
+ static int get_x11_icon(int);
+
+ static char_u *oldtitle = NULL;
++ static volatile int oldtitle_outdated = FALSE;
+ static int did_set_title = FALSE;
+ static char_u *oldicon = NULL;
+ static int did_set_icon = FALSE;
+***************
+*** 1231,1238 ****
+ after_sigcont(void)
+ {
+ # ifdef FEAT_TITLE
+! // Set oldtitle to NULL, so the current title is obtained again.
+! VIM_CLEAR(oldtitle);
+ # endif
+ settmode(TMODE_RAW);
+ need_check_timestamps = TRUE;
+--- 1232,1240 ----
+ after_sigcont(void)
+ {
+ # ifdef FEAT_TITLE
+! // Don't change "oldtitle" in a signal handler, set a flag to obtain it
+! // again later.
+! oldtitle_outdated = TRUE;
+ # endif
+ settmode(TMODE_RAW);
+ need_check_timestamps = TRUE;
+***************
+*** 2281,2286 ****
+--- 2283,2293 ----
+ */
+ if ((type || *T_TS != NUL) && title != NULL)
+ {
++ if (oldtitle_outdated)
++ {
++ oldtitle_outdated = FALSE;
++ VIM_CLEAR(oldtitle);
++ }
+ if (oldtitle == NULL
+ #ifdef FEAT_GUI
+ && !gui.in_use
+*** ../vim-8.1.0299/src/version.c 2018-08-19 17:03:57.369405009 +0200
+--- src/version.c 2018-08-19 22:11:53.003778230 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 300,
+ /**/
+
+--
+System administrators are just like women: You can't live with them and you
+can't live without them.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0301 b/data/vim/patches/8.1.0301
new file mode 100644
index 000000000..71730f0a9
--- /dev/null
+++ b/data/vim/patches/8.1.0301
@@ -0,0 +1,261 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0301
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0301
+Problem: GTK: Input method popup displayed on wrong screen.
+Solution: Add the screen position offset. (Ken Takata, closes #3268)
+Files: src/gui_beval.c, src/gui_gtk_x11.c, src/mbyte.c,
+ src/proto/gui_gtk_x11.pro
+
+
+*** ../vim-8.1.0300/src/gui_beval.c 2018-06-28 12:05:07.085006926 +0200
+--- src/gui_beval.c 2018-08-19 22:45:48.731522222 +0200
+***************
+*** 944,949 ****
+--- 944,951 ----
+ GtkRequisition requisition;
+ int screen_w;
+ int screen_h;
++ int screen_x;
++ int screen_y;
+ int x;
+ int y;
+ int x_offset = EVAL_OFFSET_X;
+***************
+*** 956,963 ****
+ screen = gtk_widget_get_screen(beval->target);
+ gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
+ # endif
+! gui_gtk_get_screen_size_of_win(beval->balloonShell,
+! &screen_w, &screen_h);
+ # if !GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_ensure_style(beval->balloonShell);
+ gtk_widget_ensure_style(beval->balloonLabel);
+--- 958,965 ----
+ screen = gtk_widget_get_screen(beval->target);
+ gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
+ # endif
+! gui_gtk_get_screen_geom_of_win(beval->balloonShell,
+! &screen_x, &screen_y, &screen_w, &screen_h);
+ # if !GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_ensure_style(beval->balloonShell);
+ gtk_widget_ensure_style(beval->balloonLabel);
+***************
+*** 998,1011 ****
+ y += beval->y;
+
+ /* Get out of the way of the mouse pointer */
+! if (x + x_offset + requisition.width > screen_w)
+ y_offset += 15;
+! if (y + y_offset + requisition.height > screen_h)
+ y_offset = -requisition.height - EVAL_OFFSET_Y;
+
+ /* Sanitize values */
+! x = CLAMP(x + x_offset, 0, MAX(0, screen_w - requisition.width));
+! y = CLAMP(y + y_offset, 0, MAX(0, screen_h - requisition.height));
+
+ /* Show the balloon */
+ # if GTK_CHECK_VERSION(3,0,0)
+--- 1000,1015 ----
+ y += beval->y;
+
+ /* Get out of the way of the mouse pointer */
+! if (x + x_offset + requisition.width > screen_x + screen_w)
+ y_offset += 15;
+! if (y + y_offset + requisition.height > screen_y + screen_h)
+ y_offset = -requisition.height - EVAL_OFFSET_Y;
+
+ /* Sanitize values */
+! x = CLAMP(x + x_offset, 0,
+! MAX(0, screen_x + screen_w - requisition.width));
+! y = CLAMP(y + y_offset, 0,
+! MAX(0, screen_y + screen_h - requisition.height));
+
+ /* Show the balloon */
+ # if GTK_CHECK_VERSION(3,0,0)
+*** ../vim-8.1.0300/src/gui_gtk_x11.c 2018-08-07 20:01:34.245746660 +0200
+--- src/gui_gtk_x11.c 2018-08-19 22:54:38.120976094 +0200
+***************
+*** 5008,5034 ****
+ }
+
+ void
+! gui_gtk_get_screen_size_of_win(GtkWidget *wid, int *width, int *height)
+ {
+ #if GTK_CHECK_VERSION(3,22,0)
+ GdkDisplay *dpy = gtk_widget_get_display(wid);
+- GdkWindow *win = gtk_widget_get_window(wid);
+ GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
+- GdkRectangle geometry;
+
+ gdk_monitor_get_geometry(monitor, &geometry);
+- *width = geometry.width;
+- *height = geometry.height;
+ #else
+ GdkScreen* screen;
+
+ if (wid != NULL && gtk_widget_has_screen(wid))
+ screen = gtk_widget_get_screen(wid);
+ else
+ screen = gdk_screen_get_default();
+! *width = gdk_screen_get_width(screen);
+! *height = gdk_screen_get_height(screen);
+ #endif
+ }
+
+ /*
+--- 5008,5042 ----
+ }
+
+ void
+! gui_gtk_get_screen_geom_of_win(
+! GtkWidget *wid,
+! int *screen_x,
+! int *screen_y,
+! int *width,
+! int *height)
+ {
++ GdkRectangle geometry;
++ GdkWindow *win = gtk_widget_get_window(wid);
+ #if GTK_CHECK_VERSION(3,22,0)
+ GdkDisplay *dpy = gtk_widget_get_display(wid);
+ GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
+
+ gdk_monitor_get_geometry(monitor, &geometry);
+ #else
+ GdkScreen* screen;
++ int monitor;
+
+ if (wid != NULL && gtk_widget_has_screen(wid))
+ screen = gtk_widget_get_screen(wid);
+ else
+ screen = gdk_screen_get_default();
+! monitor = gdk_screen_get_monitor_at_window(screen, win);
+! gdk_screen_get_monitor_geometry(screen, monitor, &geometry);
+ #endif
++ *screen_x = geometry.x;
++ *screen_y = geometry.y;
++ *width = geometry.width;
++ *height = geometry.height;
+ }
+
+ /*
+***************
+*** 5039,5045 ****
+ void
+ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
+ {
+! gui_gtk_get_screen_size_of_win(gui.mainwin, screen_w, screen_h);
+
+ /* Subtract 'guiheadroom' from the height to allow some room for the
+ * window manager (task list and window title bar). */
+--- 5047,5055 ----
+ void
+ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
+ {
+! int x, y;
+!
+! gui_gtk_get_screen_geom_of_win(gui.mainwin, &x, &y, screen_w, screen_h);
+
+ /* Subtract 'guiheadroom' from the height to allow some room for the
+ * window manager (task list and window title bar). */
+*** ../vim-8.1.0300/src/mbyte.c 2018-08-01 19:05:59.282223206 +0200
+--- src/mbyte.c 2018-08-19 22:57:01.724150866 +0200
+***************
+*** 4951,4974 ****
+ static void
+ im_preedit_window_set_position(void)
+ {
+! int x, y, w, h, sw, sh;
+
+ if (preedit_window == NULL)
+ return;
+
+! gui_gtk_get_screen_size_of_win(preedit_window, &sw, &sh);
+ #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), &x, &y);
+ #else
+ gdk_window_get_origin(gui.drawarea->window, &x, &y);
+ #endif
+! gtk_window_get_size(GTK_WINDOW(preedit_window), &w, &h);
+ x = x + FILL_X(gui.col);
+ y = y + FILL_Y(gui.row);
+! if (x + w > sw)
+! x = sw - w;
+! if (y + h > sh)
+! y = sh - h;
+ gtk_window_move(GTK_WINDOW(preedit_window), x, y);
+ }
+
+--- 4951,4976 ----
+ static void
+ im_preedit_window_set_position(void)
+ {
+! int x, y, width, height;
+! int screen_x, screen_y, screen_width, screen_height;
+
+ if (preedit_window == NULL)
+ return;
+
+! gui_gtk_get_screen_geom_of_win(gui.drawarea,
+! &screen_x, &screen_y, &screen_width, &screen_height);
+ #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), &x, &y);
+ #else
+ gdk_window_get_origin(gui.drawarea->window, &x, &y);
+ #endif
+! gtk_window_get_size(GTK_WINDOW(preedit_window), &width, &height);
+ x = x + FILL_X(gui.col);
+ y = y + FILL_Y(gui.row);
+! if (x + width > screen_x + screen_width)
+! x = screen_x + screen_width - width;
+! if (y + height > screen_y + screen_height)
+! y = screen_y + screen_height - height;
+ gtk_window_move(GTK_WINDOW(preedit_window), x, y);
+ }
+
+*** ../vim-8.1.0300/src/proto/gui_gtk_x11.pro 2018-05-17 13:53:00.000000000 +0200
+--- src/proto/gui_gtk_x11.pro 2018-08-19 22:57:22.476028708 +0200
+***************
+*** 25,31 ****
+ void gui_mch_unmaximize(void);
+ void gui_mch_newfont(void);
+ void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
+! void gui_gtk_get_screen_size_of_win(GtkWidget *wid, int *width, int *height);
+ void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h);
+ void gui_mch_settitle(char_u *title, char_u *icon);
+ void gui_mch_enable_menu(int showit);
+--- 25,31 ----
+ void gui_mch_unmaximize(void);
+ void gui_mch_newfont(void);
+ void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
+! void gui_gtk_get_screen_geom_of_win(GtkWidget *wid, int *screen_x, int *screen_y, int *width, int *height);
+ void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h);
+ void gui_mch_settitle(char_u *title, char_u *icon);
+ void gui_mch_enable_menu(int showit);
+*** ../vim-8.1.0300/src/version.c 2018-08-19 22:20:11.628993678 +0200
+--- src/version.c 2018-08-19 22:48:57.714733757 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 301,
+ /**/
+
+--
+SUPERIMPOSE "England AD 787". After a few more seconds we hear hoofbeats in
+the distance. They come slowly closer. Then out of the mist comes KING
+ARTHUR followed by a SERVANT who is banging two half coconuts together.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0302 b/data/vim/patches/8.1.0302
new file mode 100644
index 000000000..7d44902ca
--- /dev/null
+++ b/data/vim/patches/8.1.0302
@@ -0,0 +1,247 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0302
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0302
+Problem: Crash when using :suspend and "fg".
+Solution: Undo patch 8.1.244.
+Files: src/os_unix.c, src/term.c, src/proto/term.pro
+
+
+*** ../vim-8.1.0301/src/os_unix.c 2018-08-19 22:20:11.628993678 +0200
+--- src/os_unix.c 2018-08-20 21:54:06.847128443 +0200
+***************
+*** 1228,1251 ****
+ SIGRETURN;
+ }
+
+! static void
+! after_sigcont(void)
+! {
+! # ifdef FEAT_TITLE
+! // Don't change "oldtitle" in a signal handler, set a flag to obtain it
+! // again later.
+! oldtitle_outdated = TRUE;
+! # endif
+! settmode(TMODE_RAW);
+! need_check_timestamps = TRUE;
+! did_check_timestamps = FALSE;
+! }
+!
+! #if defined(SIGCONT)
+! static RETSIGTYPE sigcont_handler SIGPROTOARG;
+! static int in_mch_suspend = FALSE;
+!
+! # if defined(_REENTRANT) && defined(SIGCONT)
+ /*
+ * On Solaris with multi-threading, suspending might not work immediately.
+ * Catch the SIGCONT signal, which will be used as an indication whether the
+--- 1228,1234 ----
+ SIGRETURN;
+ }
+
+! #if defined(_REENTRANT) && defined(SIGCONT)
+ /*
+ * On Solaris with multi-threading, suspending might not work immediately.
+ * Catch the SIGCONT signal, which will be used as an indication whether the
+***************
+*** 1257,1263 ****
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+ static volatile int sigcont_received;
+! # endif
+
+ /*
+ * signal handler for SIGCONT
+--- 1240,1246 ----
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+ static volatile int sigcont_received;
+! static RETSIGTYPE sigcont_handler SIGPROTOARG;
+
+ /*
+ * signal handler for SIGCONT
+***************
+*** 1265,1302 ****
+ static RETSIGTYPE
+ sigcont_handler SIGDEFARG(sigarg)
+ {
+! if (in_mch_suspend)
+! {
+! # if defined(_REENTRANT) && defined(SIGCONT)
+! sigcont_received = TRUE;
+! # endif
+! }
+! else
+! {
+! // We didn't suspend ourselves, assume we were stopped by a SIGSTOP
+! // signal (which can't be intercepted) and get a SIGCONT. Need to get
+! // back to a sane mode and redraw.
+! after_sigcont();
+!
+! update_screen(CLEAR);
+! if (State & CMDLINE)
+! redrawcmdline();
+! else if (State == HITRETURN || State == SETWSIZE || State == ASKMORE
+! || State == EXTERNCMD || State == CONFIRM || exmode_active)
+! repeat_message();
+! else if (redrawing())
+! setcursor();
+! #if defined(FEAT_INS_EXPAND)
+! if (pum_visible())
+! {
+! redraw_later(NOT_VALID);
+! ins_compl_show_pum();
+! }
+! #endif
+! cursor_on_force();
+! out_flush();
+! }
+!
+ SIGRETURN;
+ }
+ #endif
+--- 1248,1254 ----
+ static RETSIGTYPE
+ sigcont_handler SIGDEFARG(sigarg)
+ {
+! sigcont_received = TRUE;
+ SIGRETURN;
+ }
+ #endif
+***************
+*** 1379,1386 ****
+ {
+ /* BeOS does have SIGTSTP, but it doesn't work. */
+ #if defined(SIGTSTP) && !defined(__BEOS__)
+- in_mch_suspend = TRUE;
+-
+ out_flush(); /* needed to make cursor visible on some systems */
+ settmode(TMODE_COOK);
+ out_flush(); /* needed to disable mouse on some systems */
+--- 1331,1336 ----
+***************
+*** 1412,1420 ****
+ mch_delay(wait_time, FALSE);
+ }
+ # endif
+- in_mch_suspend = FALSE;
+
+! after_sigcont();
+ #else
+ suspend_shell();
+ #endif
+--- 1362,1377 ----
+ mch_delay(wait_time, FALSE);
+ }
+ # endif
+
+! # ifdef FEAT_TITLE
+! /*
+! * Set oldtitle to NULL, so the current title is obtained again.
+! */
+! VIM_CLEAR(oldtitle);
+! # endif
+! settmode(TMODE_RAW);
+! need_check_timestamps = TRUE;
+! did_check_timestamps = FALSE;
+ #else
+ suspend_shell();
+ #endif
+***************
+*** 1454,1460 ****
+ #ifdef SIGTSTP
+ signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
+ #endif
+! #if defined(SIGCONT)
+ signal(SIGCONT, sigcont_handler);
+ #endif
+
+--- 1411,1417 ----
+ #ifdef SIGTSTP
+ signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
+ #endif
+! #if defined(_REENTRANT) && defined(SIGCONT)
+ signal(SIGCONT, sigcont_handler);
+ #endif
+
+*** ../vim-8.1.0301/src/term.c 2018-08-07 22:30:26.666240863 +0200
+--- src/term.c 2018-08-20 21:47:17.833581580 +0200
+***************
+*** 3834,3856 ****
+ static int cursor_is_off = FALSE;
+
+ /*
+- * Enable the cursor without checking if it's already enabled.
+- */
+- void
+- cursor_on_force(void)
+- {
+- out_str(T_VE);
+- cursor_is_off = FALSE;
+- }
+-
+- /*
+ * Enable the cursor.
+ */
+ void
+ cursor_on(void)
+ {
+ if (cursor_is_off)
+! cursor_on_force();
+ }
+
+ /*
+--- 3834,3849 ----
+ static int cursor_is_off = FALSE;
+
+ /*
+ * Enable the cursor.
+ */
+ void
+ cursor_on(void)
+ {
+ if (cursor_is_off)
+! {
+! out_str(T_VE);
+! cursor_is_off = FALSE;
+! }
+ }
+
+ /*
+*** ../vim-8.1.0301/src/proto/term.pro 2018-08-07 22:30:26.666240863 +0200
+--- src/proto/term.pro 2018-08-20 21:47:24.961538793 +0200
+***************
+*** 52,58 ****
+ int mouse_has(int c);
+ int mouse_model_popup(void);
+ void scroll_start(void);
+- void cursor_on_force(void);
+ void cursor_on(void);
+ void cursor_off(void);
+ void term_cursor_mode(int forced);
+--- 52,57 ----
+*** ../vim-8.1.0301/src/version.c 2018-08-19 22:58:39.783568118 +0200
+--- src/version.c 2018-08-20 21:49:38.956734730 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 302,
+ /**/
+
+--
+SOLDIER: What? A swallow carrying a coconut?
+ARTHUR: It could grip it by the husk ...
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0303 b/data/vim/patches/8.1.0303
new file mode 100644
index 000000000..48d20bf7d
--- /dev/null
+++ b/data/vim/patches/8.1.0303
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0303
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0303
+Problem: line2byte() is wrong for last line with 'noeol' and 'nofixeol'.
+Solution: Fix off-by-one error. (Shane Harper, closes #3351)
+Files: src/memline.c, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0302/src/memline.c 2018-08-07 21:39:09.251060096 +0200
+--- src/memline.c 2018-08-20 22:49:13.023489795 +0200
+***************
+*** 5267,5273 ****
+ /* Don't count the last line break if 'noeol' and ('bin' or
+ * 'nofixeol'). */
+ if ((!buf->b_p_fixeol || buf->b_p_bin) && !buf->b_p_eol
+! && buf->b_ml.ml_line_count == lnum)
+ size -= ffdos + 1;
+ }
+
+--- 5267,5273 ----
+ /* Don't count the last line break if 'noeol' and ('bin' or
+ * 'nofixeol'). */
+ if ((!buf->b_p_fixeol || buf->b_p_bin) && !buf->b_p_eol
+! && lnum > buf->b_ml.ml_line_count)
+ size -= ffdos + 1;
+ }
+
+*** ../vim-8.1.0302/src/testdir/test_functions.vim 2018-08-08 22:27:27.043005000 +0200
+--- src/testdir/test_functions.vim 2018-08-20 22:48:48.891637382 +0200
+***************
+*** 682,687 ****
+--- 682,688 ----
+
+ func Test_byte2line_line2byte()
+ new
++ set endofline
+ call setline(1, ['a', 'bc', 'd'])
+
+ set fileformat=unix
+***************
+*** 702,708 ****
+ call assert_equal([-1, -1, 1, 4, 8, 11, -1],
+ \ map(range(-1, 5), 'line2byte(v:val)'))
+
+! set fileformat&
+ bw!
+ endfunc
+
+--- 703,718 ----
+ call assert_equal([-1, -1, 1, 4, 8, 11, -1],
+ \ map(range(-1, 5), 'line2byte(v:val)'))
+
+! bw!
+! set noendofline nofixendofline
+! normal a-
+! for ff in ["unix", "mac", "dos"]
+! let &fileformat = ff
+! call assert_equal(1, line2byte(1))
+! call assert_equal(2, line2byte(2)) " line2byte(line("$") + 1) is the buffer size plus one (as per :help line2byte).
+! endfor
+!
+! set endofline& fixendofline& fileformat&
+ bw!
+ endfunc
+
+*** ../vim-8.1.0302/src/version.c 2018-08-20 21:58:53.509410779 +0200
+--- src/version.c 2018-08-20 22:51:02.218823269 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 303,
+ /**/
+
+--
+FIRST SOLDIER: So they wouldn't be able to bring a coconut back anyway.
+SECOND SOLDIER: Wait a minute! Suppose two swallows carried it together?
+FIRST SOLDIER: No, they'd have to have it on a line.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0304 b/data/vim/patches/8.1.0304
new file mode 100644
index 000000000..734e72fa7
--- /dev/null
+++ b/data/vim/patches/8.1.0304
@@ -0,0 +1,315 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0304
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0304
+Problem: No redraw when using a STOP signal on Vim and then a CONT signal.
+Solution: Catch the CONT signal and set the terminal to raw mode. This is
+ like 8.1.0244 but without the screen redraw and a fix for
+ multi-threading suggested by Dominique Pelle.
+Files: src/os_unix.c, src/term.c, src/proto/term.pro
+
+
+*** ../vim-8.1.0303/src/os_unix.c 2018-08-20 21:58:53.505410802 +0200
+--- src/os_unix.c 2018-08-21 13:01:23.341522963 +0200
+***************
+*** 1228,1241 ****
+ SIGRETURN;
+ }
+
+- #if defined(_REENTRANT) && defined(SIGCONT)
+ /*
+! * On Solaris with multi-threading, suspending might not work immediately.
+! * Catch the SIGCONT signal, which will be used as an indication whether the
+! * suspending has been done or not.
+ *
+ * On Linux, signal is not always handled immediately either.
+ * See https://bugs.launchpad.net/bugs/291373
+ *
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+--- 1228,1262 ----
+ SIGRETURN;
+ }
+
+ /*
+! * Invoked after receiving SIGCONT. We don't know what happened while
+! * sleeping, deal with part of that.
+! */
+! static void
+! after_sigcont(void)
+! {
+! # ifdef FEAT_TITLE
+! // Don't change "oldtitle" in a signal handler, set a flag to obtain it
+! // again later.
+! oldtitle_outdated = TRUE;
+! # endif
+! settmode(TMODE_RAW);
+! need_check_timestamps = TRUE;
+! did_check_timestamps = FALSE;
+! }
+!
+! #if defined(SIGCONT)
+! static RETSIGTYPE sigcont_handler SIGPROTOARG;
+! static volatile int in_mch_suspend = FALSE;
+!
+! /*
+! * With multi-threading, suspending might not work immediately. Catch the
+! * SIGCONT signal, which will be used as an indication whether the suspending
+! * has been done or not.
+ *
+ * On Linux, signal is not always handled immediately either.
+ * See https://bugs.launchpad.net/bugs/291373
++ * Probably because the signal is handled in another thread.
+ *
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+***************
+*** 1248,1254 ****
+ static RETSIGTYPE
+ sigcont_handler SIGDEFARG(sigarg)
+ {
+! sigcont_received = TRUE;
+ SIGRETURN;
+ }
+ #endif
+--- 1269,1290 ----
+ static RETSIGTYPE
+ sigcont_handler SIGDEFARG(sigarg)
+ {
+! if (in_mch_suspend)
+! {
+! sigcont_received = TRUE;
+! }
+! else
+! {
+! // We didn't suspend ourselves, assume we were stopped by a SIGSTOP
+! // signal (which can't be intercepted) and get a SIGCONT. Need to get
+! // back to a sane mode. We should redraw, but we can't really do that
+! // in a signal handler, do a redraw later.
+! after_sigcont();
+! redraw_later(CLEAR);
+! cursor_on_force();
+! out_flush();
+! }
+!
+ SIGRETURN;
+ }
+ #endif
+***************
+*** 1331,1336 ****
+--- 1367,1374 ----
+ {
+ /* BeOS does have SIGTSTP, but it doesn't work. */
+ #if defined(SIGTSTP) && !defined(__BEOS__)
++ in_mch_suspend = TRUE;
++
+ out_flush(); /* needed to make cursor visible on some systems */
+ settmode(TMODE_COOK);
+ out_flush(); /* needed to disable mouse on some systems */
+***************
+*** 1338,1377 ****
+ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
+ loose_clipboard();
+ # endif
+!
+! # if defined(_REENTRANT) && defined(SIGCONT)
+ sigcont_received = FALSE;
+ # endif
+ kill(0, SIGTSTP); /* send ourselves a STOP signal */
+! # if defined(_REENTRANT) && defined(SIGCONT)
+ /*
+ * Wait for the SIGCONT signal to be handled. It generally happens
+! * immediately, but somehow not all the time. Do not call pause()
+! * because there would be race condition which would hang Vim if
+! * signal happened in between the test of sigcont_received and the
+! * call to pause(). If signal is not yet received, call sleep(0)
+! * to just yield CPU. Signal should then be received. If somehow
+! * it's still not received, sleep 1, 2, 3 ms. Don't bother waiting
+! * further if signal is not received after 1+2+3+4 ms (not expected
+! * to happen).
+ */
+ {
+ long wait_time;
+ for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++)
+- /* Loop is not entered most of the time */
+ mch_delay(wait_time, FALSE);
+ }
+ # endif
+
+! # ifdef FEAT_TITLE
+! /*
+! * Set oldtitle to NULL, so the current title is obtained again.
+! */
+! VIM_CLEAR(oldtitle);
+! # endif
+! settmode(TMODE_RAW);
+! need_check_timestamps = TRUE;
+! did_check_timestamps = FALSE;
+ #else
+ suspend_shell();
+ #endif
+--- 1376,1407 ----
+ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
+ loose_clipboard();
+ # endif
+! # if defined(SIGCONT)
+ sigcont_received = FALSE;
+ # endif
++
+ kill(0, SIGTSTP); /* send ourselves a STOP signal */
+!
+! # if defined(SIGCONT)
+ /*
+ * Wait for the SIGCONT signal to be handled. It generally happens
+! * immediately, but somehow not all the time, probably because it's handled
+! * in another thread. Do not call pause() because there would be race
+! * condition which would hang Vim if signal happened in between the test of
+! * sigcont_received and the call to pause(). If signal is not yet received,
+! * sleep 0, 1, 2, 3 ms. Don't bother waiting further if signal is not
+! * received after 1+2+3 ms (not expected to happen).
+ */
+ {
+ long wait_time;
++
+ for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++)
+ mch_delay(wait_time, FALSE);
+ }
+ # endif
++ in_mch_suspend = FALSE;
+
+! after_sigcont();
+ #else
+ suspend_shell();
+ #endif
+***************
+*** 1411,1417 ****
+ #ifdef SIGTSTP
+ signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
+ #endif
+! #if defined(_REENTRANT) && defined(SIGCONT)
+ signal(SIGCONT, sigcont_handler);
+ #endif
+
+--- 1441,1447 ----
+ #ifdef SIGTSTP
+ signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL);
+ #endif
+! #if defined(SIGCONT)
+ signal(SIGCONT, sigcont_handler);
+ #endif
+
+***************
+*** 1470,1476 ****
+ reset_signals(void)
+ {
+ catch_signals(SIG_DFL, SIG_DFL);
+! #if defined(_REENTRANT) && defined(SIGCONT)
+ /* SIGCONT isn't in the list, because its default action is ignore */
+ signal(SIGCONT, SIG_DFL);
+ #endif
+--- 1500,1506 ----
+ reset_signals(void)
+ {
+ catch_signals(SIG_DFL, SIG_DFL);
+! #if defined(SIGCONT)
+ /* SIGCONT isn't in the list, because its default action is ignore */
+ signal(SIGCONT, SIG_DFL);
+ #endif
+***************
+*** 1533,1539 ****
+ for (i = 0; signal_info[i].sig != -1; i++)
+ sigaddset(&newset, signal_info[i].sig);
+
+! # if defined(_REENTRANT) && defined(SIGCONT)
+ /* SIGCONT isn't in the list, because its default action is ignore */
+ sigaddset(&newset, SIGCONT);
+ # endif
+--- 1563,1569 ----
+ for (i = 0; signal_info[i].sig != -1; i++)
+ sigaddset(&newset, signal_info[i].sig);
+
+! # if defined(SIGCONT)
+ /* SIGCONT isn't in the list, because its default action is ignore */
+ sigaddset(&newset, SIGCONT);
+ # endif
+*** ../vim-8.1.0303/src/term.c 2018-08-20 21:58:53.505410802 +0200
+--- src/term.c 2018-08-21 12:55:46.236289405 +0200
+***************
+*** 3834,3849 ****
+ static int cursor_is_off = FALSE;
+
+ /*
+! * Enable the cursor.
+ */
+ void
+ cursor_on(void)
+ {
+ if (cursor_is_off)
+! {
+! out_str(T_VE);
+! cursor_is_off = FALSE;
+! }
+ }
+
+ /*
+--- 3834,3856 ----
+ static int cursor_is_off = FALSE;
+
+ /*
+! * Enable the cursor without checking if it's already enabled.
+! */
+! void
+! cursor_on_force(void)
+! {
+! out_str(T_VE);
+! cursor_is_off = FALSE;
+! }
+!
+! /*
+! * Enable the cursor if it's currently off.
+ */
+ void
+ cursor_on(void)
+ {
+ if (cursor_is_off)
+! cursor_on_force();
+ }
+
+ /*
+*** ../vim-8.1.0303/src/proto/term.pro 2018-08-20 21:58:53.509410779 +0200
+--- src/proto/term.pro 2018-08-21 12:55:54.468217234 +0200
+***************
+*** 52,57 ****
+--- 52,58 ----
+ int mouse_has(int c);
+ int mouse_model_popup(void);
+ void scroll_start(void);
++ void cursor_on_force(void);
+ void cursor_on(void);
+ void cursor_off(void);
+ void term_cursor_mode(int forced);
+*** ../vim-8.1.0303/src/version.c 2018-08-20 22:53:00.210105086 +0200
+--- src/version.c 2018-08-21 12:40:20.807634438 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 304,
+ /**/
+
+--
+I used to wonder about the meaning of life. But I looked it
+up in the dictionary under "L" and there it was - the meaning
+of life. It was less than I expected. - Dogbert
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0305 b/data/vim/patches/8.1.0305
new file mode 100644
index 000000000..2fd893655
--- /dev/null
+++ b/data/vim/patches/8.1.0305
@@ -0,0 +1,85 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0305
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0305
+Problem: Missing support for Lua 5.4 32 bits on Unix.
+Solution: Define lua_newuserdatauv. (Kazunobu Kuriyama)
+Files: src/if_lua.c
+
+
+*** ../vim-8.1.0304/src/if_lua.c 2018-07-25 22:02:32.227966325 +0200
+--- src/if_lua.c 2018-08-21 14:00:16.783006997 +0200
+***************
+*** 164,170 ****
+ #define lua_rawget dll_lua_rawget
+ #define lua_rawgeti dll_lua_rawgeti
+ #define lua_createtable dll_lua_createtable
+! #define lua_newuserdata dll_lua_newuserdata
+ #define lua_getmetatable dll_lua_getmetatable
+ #define lua_setfield dll_lua_setfield
+ #define lua_rawset dll_lua_rawset
+--- 164,174 ----
+ #define lua_rawget dll_lua_rawget
+ #define lua_rawgeti dll_lua_rawgeti
+ #define lua_createtable dll_lua_createtable
+! #if LUA_VERSION_NUM >= 504
+! #define lua_newuserdatauv dll_lua_newuserdatauv
+! #else
+! #define lua_newuserdata dll_lua_newuserdata
+! #endif
+ #define lua_getmetatable dll_lua_getmetatable
+ #define lua_setfield dll_lua_setfield
+ #define lua_rawset dll_lua_rawset
+***************
+*** 261,267 ****
+--- 265,275 ----
+ int (*dll_lua_rawgeti) (lua_State *L, int idx, lua_Integer n);
+ #endif
+ void (*dll_lua_createtable) (lua_State *L, int narr, int nrec);
++ #if LUA_VERSION_NUM >= 504
++ void *(*dll_lua_newuserdatauv) (lua_State *L, size_t sz, int nuvalue);
++ #else
+ void *(*dll_lua_newuserdata) (lua_State *L, size_t sz);
++ #endif
+ int (*dll_lua_getmetatable) (lua_State *L, int objindex);
+ void (*dll_lua_setfield) (lua_State *L, int idx, const char *k);
+ void (*dll_lua_rawset) (lua_State *L, int idx);
+***************
+*** 362,368 ****
+--- 370,380 ----
+ {"lua_rawget", (luaV_function) &dll_lua_rawget},
+ {"lua_rawgeti", (luaV_function) &dll_lua_rawgeti},
+ {"lua_createtable", (luaV_function) &dll_lua_createtable},
++ #if LUA_VERSION_NUM >= 504
++ {"lua_newuserdatauv", (luaV_function) &dll_lua_newuserdatauv},
++ #else
+ {"lua_newuserdata", (luaV_function) &dll_lua_newuserdata},
++ #endif
+ {"lua_getmetatable", (luaV_function) &dll_lua_getmetatable},
+ {"lua_setfield", (luaV_function) &dll_lua_setfield},
+ {"lua_rawset", (luaV_function) &dll_lua_rawset},
+*** ../vim-8.1.0304/src/version.c 2018-08-21 13:09:06.254115882 +0200
+--- src/version.c 2018-08-21 14:03:03.910066481 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 305,
+ /**/
+
+--
+Why I like vim:
+> I like VIM because, when I ask a question in this newsgroup, I get a
+> one-line answer. With xemacs, I get a 1Kb lisp script with bugs in it ;-)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0306 b/data/vim/patches/8.1.0306
new file mode 100644
index 000000000..e2d9e3079
--- /dev/null
+++ b/data/vim/patches/8.1.0306
@@ -0,0 +1,498 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0306
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0306
+Problem: Plural messages are not translated properly.
+Solution: Add more usage of NGETTEXT(). (Sergey Alyoshin)
+Files: src/vim.h, src/buffer.c, src/ex_cmds.c, src/ex_docmd.c,
+ src/fileio.c, src/misc1.c, src/ops.c
+
+
+*** ../vim-8.1.0305/src/vim.h 2018-08-11 13:57:16.215969777 +0200
+--- src/vim.h 2018-08-21 14:34:37.322333098 +0200
+***************
+*** 553,558 ****
+--- 553,562 ----
+ /*
+ * The _() stuff is for using gettext(). It is a no-op when libintl.h is not
+ * found or the +multilang feature is disabled.
++ * Use NGETTEXT(single, multi, number) to get plural behavior:
++ * - single - message for singular form
++ * - multi - message for plural form
++ * - number - the count
+ */
+ #ifdef FEAT_GETTEXT
+ # ifdef DYNAMIC_GETTEXT
+*** ../vim-8.1.0305/src/buffer.c 2018-08-11 13:57:16.207969835 +0200
+--- src/buffer.c 2018-08-21 14:39:25.584435950 +0200
+***************
+*** 1174,1199 ****
+ else if (deleted >= p_report)
+ {
+ if (command == DOBUF_UNLOAD)
+! {
+! if (deleted == 1)
+! MSG(_("1 buffer unloaded"));
+! else
+! smsg((char_u *)_("%d buffers unloaded"), deleted);
+! }
+ else if (command == DOBUF_DEL)
+! {
+! if (deleted == 1)
+! MSG(_("1 buffer deleted"));
+! else
+! smsg((char_u *)_("%d buffers deleted"), deleted);
+! }
+ else
+! {
+! if (deleted == 1)
+! MSG(_("1 buffer wiped out"));
+! else
+! smsg((char_u *)_("%d buffers wiped out"), deleted);
+! }
+ }
+ }
+
+--- 1174,1187 ----
+ else if (deleted >= p_report)
+ {
+ if (command == DOBUF_UNLOAD)
+! smsg((char_u *)NGETTEXT("%d buffer unloaded",
+! "%d buffers unloaded", deleted), deleted);
+ else if (command == DOBUF_DEL)
+! smsg((char_u *)NGETTEXT("%d buffer deleted",
+! "%d buffers deleted", deleted), deleted);
+ else
+! smsg((char_u *)NGETTEXT("%d buffer wiped out",
+! "%d buffers wiped out", deleted), deleted);
+ }
+ }
+
+***************
+*** 3485,3503 ****
+ n = (int)(((long)curwin->w_cursor.lnum * 100L) /
+ (long)curbuf->b_ml.ml_line_count);
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+- {
+ vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg));
+- }
+ #ifdef FEAT_CMDL_INFO
+ else if (p_ru)
+- {
+ /* Current line and column are already on the screen -- webb */
+! if (curbuf->b_ml.ml_line_count == 1)
+! vim_snprintf_add((char *)buffer, IOSIZE, _("1 line --%d%%--"), n);
+! else
+! vim_snprintf_add((char *)buffer, IOSIZE, _("%ld lines --%d%%--"),
+! (long)curbuf->b_ml.ml_line_count, n);
+! }
+ #endif
+ else
+ {
+--- 3473,3486 ----
+ n = (int)(((long)curwin->w_cursor.lnum * 100L) /
+ (long)curbuf->b_ml.ml_line_count);
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+ vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg));
+ #ifdef FEAT_CMDL_INFO
+ else if (p_ru)
+ /* Current line and column are already on the screen -- webb */
+! vim_snprintf_add((char *)buffer, IOSIZE,
+! NGETTEXT("%ld line --%d%%--", "%ld lines --%d%%--",
+! curbuf->b_ml.ml_line_count),
+! (long)curbuf->b_ml.ml_line_count, n);
+ #endif
+ else
+ {
+*** ../vim-8.1.0305/src/ex_cmds.c 2018-08-11 14:41:48.326928864 +0200
+--- src/ex_cmds.c 2018-08-21 15:09:35.720800340 +0200
+***************
+*** 985,996 ****
+ ml_delete(line1 + extra, TRUE);
+
+ if (!global_busy && num_lines > p_report)
+! {
+! if (num_lines == 1)
+! MSG(_("1 line moved"));
+! else
+! smsg((char_u *)_("%ld lines moved"), num_lines);
+! }
+
+ /*
+ * Leave the cursor on the last of the moved lines.
+--- 985,992 ----
+ ml_delete(line1 + extra, TRUE);
+
+ if (!global_busy && num_lines > p_report)
+! smsg((char_u *)NGETTEXT("%ld line moved", "%ld lines moved", num_lines),
+! (long)num_lines);
+
+ /*
+ * Leave the cursor on the last of the moved lines.
+***************
+*** 5940,5962 ****
+ || count_only)
+ && messaging())
+ {
+ if (got_int)
+ STRCPY(msg_buf, _("(Interrupted) "));
+ else
+ *msg_buf = NUL;
+! if (sub_nsubs == 1)
+! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
+! "%s", count_only ? _("1 match") : _("1 substitution"));
+! else
+! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
+! count_only ? _("%ld matches") : _("%ld substitutions"),
+! sub_nsubs);
+! if (sub_nlines == 1)
+! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
+! "%s", _(" on 1 line"));
+! else
+! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
+! _(" on %ld lines"), (long)sub_nlines);
+ if (msg(msg_buf))
+ /* save message to display it after redraw */
+ set_keep_msg(msg_buf, 0);
+--- 5936,5964 ----
+ || count_only)
+ && messaging())
+ {
++ char *msg_single;
++ char *msg_plural;
++
+ if (got_int)
+ STRCPY(msg_buf, _("(Interrupted) "));
+ else
+ *msg_buf = NUL;
+!
+! msg_single = count_only
+! ? NGETTEXT("%ld match on %ld line",
+! "%ld matches on %ld line", sub_nsubs)
+! : NGETTEXT("%ld substitution on %ld line",
+! "%ld substitutions on %ld line", sub_nsubs);
+! msg_plural = count_only
+! ? NGETTEXT("%ld match on %ld lines",
+! "%ld matches on %ld lines", sub_nsubs)
+! : NGETTEXT("%ld substitution on %ld lines",
+! "%ld substitutions on %ld lines", sub_nsubs);
+!
+! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
+! NGETTEXT(msg_single, msg_plural, sub_nlines),
+! sub_nsubs, (long)sub_nlines);
+!
+ if (msg(msg_buf))
+ /* save message to display it after redraw */
+ set_keep_msg(msg_buf, 0);
+*** ../vim-8.1.0305/src/ex_docmd.c 2018-08-15 20:59:44.227025009 +0200
+--- src/ex_docmd.c 2018-08-21 14:35:02.210167853 +0200
+***************
+*** 5749,5770 ****
+ {
+ char_u buff[DIALOG_MSG_SIZE];
+
+! if (n == 1)
+! vim_strncpy(buff,
+! (char_u *)_("1 more file to edit. Quit anyway?"),
+! DIALOG_MSG_SIZE - 1);
+! else
+! vim_snprintf((char *)buff, DIALOG_MSG_SIZE,
+! _("%d more files to edit. Quit anyway?"), n);
+ if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES)
+ return OK;
+ return FAIL;
+ }
+ #endif
+! if (n == 1)
+! EMSG(_("E173: 1 more file to edit"));
+! else
+! EMSGN(_("E173: %ld more files to edit"), n);
+ quitmore = 2; /* next try to quit is allowed */
+ }
+ return FAIL;
+--- 5749,5764 ----
+ {
+ char_u buff[DIALOG_MSG_SIZE];
+
+! vim_snprintf((char *)buff, DIALOG_MSG_SIZE,
+! NGETTEXT("%d more file to edit. Quit anyway?",
+! "%d more files to edit. Quit anyway?", n), n);
+ if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES)
+ return OK;
+ return FAIL;
+ }
+ #endif
+! EMSGN(NGETTEXT("E173: %ld more file to edit",
+! "E173: %ld more files to edit", n), n);
+ quitmore = 2; /* next try to quit is allowed */
+ }
+ return FAIL;
+*** ../vim-8.1.0305/src/fileio.c 2018-08-11 13:57:16.211969806 +0200
+--- src/fileio.c 2018-08-21 14:35:02.214167827 +0200
+***************
+*** 5349,5364 ****
+ "%ldL, %lldC", lnum, (long long)nchars);
+ else
+ {
+! if (lnum == 1)
+! STRCPY(p, _("1 line, "));
+! else
+! sprintf((char *)p, _("%ld lines, "), lnum);
+ p += STRLEN(p);
+! if (nchars == 1)
+! STRCPY(p, _("1 character"));
+! else
+! vim_snprintf((char *)p, IOSIZE - (p - IObuff),
+! _("%lld characters"), (long long)nchars);
+ }
+ }
+
+--- 5349,5359 ----
+ "%ldL, %lldC", lnum, (long long)nchars);
+ else
+ {
+! sprintf((char *)p, NGETTEXT("%ld line, ", "%ld lines, ", lnum), lnum);
+ p += STRLEN(p);
+! vim_snprintf((char *)p, IOSIZE - (p - IObuff),
+! NGETTEXT("%lld character", "%lld characters", nchars),
+! (long long)nchars);
+ }
+ }
+
+*** ../vim-8.1.0305/src/misc1.c 2018-07-29 16:09:14.636945607 +0200
+--- src/misc1.c 2018-08-21 14:35:02.214167827 +0200
+***************
+*** 3802,3825 ****
+
+ if (pn > p_report)
+ {
+! if (pn == 1)
+! {
+! if (n > 0)
+! vim_strncpy(msg_buf, (char_u *)_("1 more line"),
+! MSG_BUF_LEN - 1);
+! else
+! vim_strncpy(msg_buf, (char_u *)_("1 line less"),
+! MSG_BUF_LEN - 1);
+! }
+ else
+! {
+! if (n > 0)
+! vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+! _("%ld more lines"), pn);
+! else
+! vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+! _("%ld fewer lines"), pn);
+! }
+ if (got_int)
+ vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN);
+ if (msg(msg_buf))
+--- 3802,3813 ----
+
+ if (pn > p_report)
+ {
+! if (n > 0)
+! vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+! NGETTEXT("%ld more line", "%ld more lines", pn), pn);
+ else
+! vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+! NGETTEXT("%ld line less", "%ld fewer lines", pn), pn);
+ if (got_int)
+ vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN);
+ if (msg(msg_buf))
+*** ../vim-8.1.0305/src/ops.c 2018-07-29 16:09:14.640945583 +0200
+--- src/ops.c 2018-08-21 15:02:16.907624684 +0200
+***************
+*** 244,250 ****
+ {
+ long i;
+ int first_char;
+- char_u *s;
+ int block_col = 0;
+
+ if (u_save((linenr_T)(oap->start.lnum - 1),
+--- 244,249 ----
+***************
+*** 297,322 ****
+
+ if (oap->line_count > p_report)
+ {
+ if (oap->op_type == OP_RSHIFT)
+! s = (char_u *)">";
+! else
+! s = (char_u *)"<";
+! if (oap->line_count == 1)
+! {
+! if (amount == 1)
+! sprintf((char *)IObuff, _("1 line %sed 1 time"), s);
+! else
+! sprintf((char *)IObuff, _("1 line %sed %d times"), s, amount);
+! }
+ else
+! {
+! if (amount == 1)
+! sprintf((char *)IObuff, _("%ld lines %sed 1 time"),
+! oap->line_count, s);
+! else
+! sprintf((char *)IObuff, _("%ld lines %sed %d times"),
+! oap->line_count, s, amount);
+! }
+ msg(IObuff);
+ }
+
+--- 296,316 ----
+
+ if (oap->line_count > p_report)
+ {
++ char *op;
++ char *msg_line_single;
++ char *msg_line_plural;
++
+ if (oap->op_type == OP_RSHIFT)
+! op = ">";
+ else
+! op = "<";
+! msg_line_single = NGETTEXT("%ld line %sed %d time",
+! "%ld line %sed %d times", amount);
+! msg_line_plural = NGETTEXT("%ld lines %sed %d time",
+! "%ld lines %sed %d times", amount);
+! vim_snprintf((char *)IObuff, IOSIZE,
+! NGETTEXT(msg_line_single, msg_line_plural, oap->line_count),
+! oap->line_count, op, amount);
+ msg(IObuff);
+ }
+
+***************
+*** 789,798 ****
+ if (oap->line_count > p_report)
+ {
+ i = oap->line_count - (i + 1);
+! if (i == 1)
+! MSG(_("1 line indented "));
+! else
+! smsg((char_u *)_("%ld lines indented "), i);
+ }
+ /* set '[ and '] marks */
+ curbuf->b_op_start = oap->start;
+--- 783,790 ----
+ if (oap->line_count > p_report)
+ {
+ i = oap->line_count - (i + 1);
+! smsg((char_u *)NGETTEXT("%ld line indented ",
+! "%ld lines indented ", i), i);
+ }
+ /* set '[ and '] marks */
+ curbuf->b_op_start = oap->start;
+***************
+*** 2529,2540 ****
+ curbuf->b_op_end = oap->end;
+
+ if (oap->line_count > p_report)
+! {
+! if (oap->line_count == 1)
+! MSG(_("1 line changed"));
+! else
+! smsg((char_u *)_("%ld lines changed"), oap->line_count);
+! }
+ }
+
+ /*
+--- 2521,2528 ----
+ curbuf->b_op_end = oap->end;
+
+ if (oap->line_count > p_report)
+! smsg((char_u *)NGETTEXT("%ld line changed", "%ld lines changed",
+! oap->line_count), oap->line_count);
+ }
+
+ /*
+***************
+*** 3348,3366 ****
+
+ /* redisplay now, so message is not deleted */
+ update_topline_redraw();
+! if (yanklines == 1)
+ {
+! if (oap->block_mode)
+! smsg((char_u *)_("block of 1 line yanked%s"), namebuf);
+! else
+! smsg((char_u *)_("1 line yanked%s"), namebuf);
+ }
+- else if (oap->block_mode)
+- smsg((char_u *)_("block of %ld lines yanked%s"),
+- yanklines, namebuf);
+ else
+! smsg((char_u *)_("%ld lines yanked%s"), yanklines,
+! namebuf);
+ }
+ }
+
+--- 3336,3353 ----
+
+ /* redisplay now, so message is not deleted */
+ update_topline_redraw();
+! if (oap->block_mode)
+ {
+! smsg((char_u *)NGETTEXT("block of %ld line yanked%s",
+! "block of %ld lines yanked%s", yanklines),
+! yanklines, namebuf);
+ }
+ else
+! {
+! smsg((char_u *)NGETTEXT("%ld line yanked%s",
+! "%ld lines yanked%s", yanklines),
+! yanklines, namebuf);
+! }
+ }
+ }
+
+***************
+*** 5653,5664 ****
+ curbuf->b_op_start = startpos;
+
+ if (change_cnt > p_report)
+! {
+! if (change_cnt == 1)
+! MSG(_("1 line changed"));
+! else
+! smsg((char_u *)_("%ld lines changed"), change_cnt);
+! }
+ }
+ }
+
+--- 5640,5647 ----
+ curbuf->b_op_start = startpos;
+
+ if (change_cnt > p_report)
+! smsg((char_u *)NGETTEXT("%ld line changed", "%ld lines changed",
+! change_cnt), change_cnt);
+ }
+ }
+
+*** ../vim-8.1.0305/src/version.c 2018-08-21 14:23:31.418606007 +0200
+--- src/version.c 2018-08-21 15:02:32.359526078 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 306,
+ /**/
+
+--
+LARGE MAN: Who's that then?
+CART DRIVER: (Grudgingly) I dunno, Must be a king.
+LARGE MAN: Why?
+CART DRIVER: He hasn't got shit all over him.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0307 b/data/vim/patches/8.1.0307
new file mode 100644
index 000000000..95342de6e
--- /dev/null
+++ b/data/vim/patches/8.1.0307
@@ -0,0 +1,233 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0307
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0307
+Problem: There is no good way to get the window layout.
+Solution: Add the winlayout() function. (Yegappan Lakshmanan)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/proto/window.pro,
+ src/window.c, src/testdir/test_window_id.vim
+
+
+*** ../vim-8.1.0306/runtime/doc/eval.txt 2018-07-29 15:34:20.864300100 +0200
+--- runtime/doc/eval.txt 2018-08-21 16:35:43.299154086 +0200
+***************
+*** 2497,2502 ****
+--- 2504,2510 ----
+ winbufnr({nr}) Number buffer number of window {nr}
+ wincol() Number window column of the cursor
+ winheight({nr}) Number height of window {nr}
++ winlayout([{tabnr}]) List layout of windows in tab {tabnr}
+ winline() Number window line of the cursor
+ winnr([{expr}]) Number number of current window
+ winrestcmd() String returns command to restore window sizes
+***************
+*** 9087,9092 ****
+--- 9096,9130 ----
+ Examples: >
+ :echo "The current window has " . winheight(0) . " lines."
+ <
++ winlayout([{tabnr}]) *winlayout()*
++ The result is a nested List containing the layout of windows
++ in a tabpage.
++
++ Without {tabnr} use the current tabpage, otherwise the tabpage
++ with number {tabnr}. If the tabpage {tabnr} is not found,
++ returns an empty list.
++
++ For a leaf window, it returns:
++ ['leaf', {winid}]
++ For horizontally split windows, which form a column, it
++ returns:
++ ['col', [{nested list of windows}]]
++ For vertically split windows, which form a row, it returns:
++ ['row', [{nested list of windows}]]
++
++ Example: >
++ " Only one window in the tab page
++ :echo winlayout()
++ ['leaf', 1000]
++ " Two horizontally split windows
++ :echo winlayout()
++ ['col', [['leaf', 1000], ['leaf', 1001]]]
++ " Three horizontally split windows, with two
++ " vertically split windows in the middle window
++ :echo winlayout(2)
++ ['col', [['leaf', 1002], ['row', ['leaf', 1003],
++ ['leaf', 1001]]], ['leaf', 1000]]
++ <
+ *winline()*
+ winline() The result is a Number, which is the screen line of the cursor
+ in the window. This is counting screen lines from the top of
+*** ../vim-8.1.0306/src/evalfunc.c 2018-08-11 13:57:16.211969806 +0200
+--- src/evalfunc.c 2018-08-21 16:19:29.914566586 +0200
+***************
+*** 463,468 ****
+--- 463,469 ----
+ static void f_winbufnr(typval_T *argvars, typval_T *rettv);
+ static void f_wincol(typval_T *argvars, typval_T *rettv);
+ static void f_winheight(typval_T *argvars, typval_T *rettv);
++ static void f_winlayout(typval_T *argvars, typval_T *rettv);
+ static void f_winline(typval_T *argvars, typval_T *rettv);
+ static void f_winnr(typval_T *argvars, typval_T *rettv);
+ static void f_winrestcmd(typval_T *argvars, typval_T *rettv);
+***************
+*** 952,957 ****
+--- 953,959 ----
+ {"winbufnr", 1, 1, f_winbufnr},
+ {"wincol", 0, 0, f_wincol},
+ {"winheight", 1, 1, f_winheight},
++ {"winlayout", 0, 1, f_winlayout},
+ {"winline", 0, 0, f_winline},
+ {"winnr", 0, 1, f_winnr},
+ {"winrestcmd", 0, 0, f_winrestcmd},
+***************
+*** 13743,13748 ****
+--- 13745,13773 ----
+ }
+
+ /*
++ * "winlayout()" function
++ */
++ static void
++ f_winlayout(typval_T *argvars, typval_T *rettv)
++ {
++ tabpage_T *tp;
++
++ if (rettv_list_alloc(rettv) != OK)
++ return;
++
++ if (argvars[0].v_type == VAR_UNKNOWN)
++ tp = curtab;
++ else
++ {
++ tp = find_tabpage((int)get_tv_number(&argvars[0]));
++ if (tp == NULL)
++ return;
++ }
++
++ get_framelayout(tp->tp_topframe, rettv->vval.v_list, TRUE);
++ }
++
++ /*
+ * "winline()" function
+ */
+ static void
+*** ../vim-8.1.0306/src/proto/window.pro 2018-06-12 16:49:26.366028607 +0200
+--- src/proto/window.pro 2018-08-21 16:38:15.282101882 +0200
+***************
+*** 94,97 ****
+--- 94,98 ----
+ win_T *win_id2wp(typval_T *argvars);
+ int win_id2win(typval_T *argvars);
+ void win_findbuf(typval_T *argvars, list_T *list);
++ void get_framelayout(frame_T *fr, list_T *l, int topframe);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0306/src/window.c 2018-07-25 22:36:48.991518559 +0200
+--- src/window.c 2018-08-21 16:43:30.963948179 +0200
+***************
+*** 7236,7239 ****
+--- 7236,7288 ----
+ list_append_number(list, wp->w_id);
+ }
+
++ /*
++ * Get the layout of the given tab page for winlayout().
++ */
++ void
++ get_framelayout(frame_T *fr, list_T *l, int outer)
++ {
++ frame_T *child;
++ list_T *fr_list;
++ list_T *win_list;
++
++ if (fr == NULL)
++ return;
++
++ if (outer)
++ // outermost call from f_winlayout()
++ fr_list = l;
++ else
++ {
++ fr_list = list_alloc();
++ if (fr_list == NULL)
++ return;
++ list_append_list(l, fr_list);
++ }
++
++ if (fr->fr_layout == FR_LEAF)
++ {
++ if (fr->fr_win != NULL)
++ {
++ list_append_string(fr_list, (char_u *)"leaf", -1);
++ list_append_number(fr_list, fr->fr_win->w_id);
++ }
++ }
++ else
++ {
++ list_append_string(fr_list,
++ fr->fr_layout == FR_ROW ? (char_u *)"row" : (char_u *)"col", -1);
++
++ win_list = list_alloc();
++ if (win_list == NULL)
++ return;
++ list_append_list(fr_list, win_list);
++ child = fr->fr_child;
++ while (child != NULL)
++ {
++ get_framelayout(child, win_list, FALSE);
++ child = child->fr_next;
++ }
++ }
++ }
+ #endif
+*** ../vim-8.1.0306/src/testdir/test_window_id.vim 2016-11-13 14:25:47.000000000 +0100
+--- src/testdir/test_window_id.vim 2018-08-21 16:47:00.102536647 +0200
+***************
+*** 101,103 ****
+--- 101,123 ----
+ call assert_equal(win_getid(1), win_getid(1, 1))
+ tabclose!
+ endfunc
++
++ func Test_winlayout()
++ let w1 = win_getid()
++ call assert_equal(['leaf', w1], winlayout())
++
++ split
++ let w2 = win_getid()
++ call assert_equal(['col', [['leaf', w2], ['leaf', w1]]], winlayout())
++
++ split
++ let w3 = win_getid()
++ call assert_equal(['col', [['leaf', w3], ['leaf', w2], ['leaf', w1]]], winlayout())
++
++ 2wincmd w
++ vsplit
++ let w4 = win_getid()
++ call assert_equal(['col', [['leaf', w3], ['row', [['leaf', w4], ['leaf', w2]]], ['leaf', w1]]], winlayout())
++
++ only!
++ endfunc
+*** ../vim-8.1.0306/src/version.c 2018-08-21 15:12:10.843801621 +0200
+--- src/version.c 2018-08-21 16:54:45.515933731 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 307,
+ /**/
+
+--
+Friends? I have lots of friends! In fact, I have all episodes ever made.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0308 b/data/vim/patches/8.1.0308
new file mode 100644
index 000000000..34230ea65
--- /dev/null
+++ b/data/vim/patches/8.1.0308
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0308
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0308
+Problem: A quick undo shows "1 seconds ago". (Tony Mechelynck)
+Solution: Add singular/plural message.
+Files: src/undo.c
+
+
+*** ../vim-8.1.0307/src/undo.c 2018-07-13 16:31:11.952226727 +0200
+--- src/undo.c 2018-08-21 17:05:23.300046260 +0200
+***************
+*** 3124,3131 ****
+ }
+ else
+ #endif
+! vim_snprintf((char *)buf, buflen, _("%ld seconds ago"),
+! (long)(vim_time() - tt));
+ }
+
+ /*
+--- 3124,3136 ----
+ }
+ else
+ #endif
+! {
+! long seconds = (long)(vim_time() - tt);
+!
+! vim_snprintf((char *)buf, buflen,
+! NGETTEXT("%ld second ago", "%ld seconds ago", seconds),
+! seconds);
+! }
+ }
+
+ /*
+*** ../vim-8.1.0307/src/version.c 2018-08-21 16:56:28.371325254 +0200
+--- src/version.c 2018-08-21 17:06:12.627737719 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 308,
+ /**/
+
+--
+ARTHUR: I've said I'm sorry about the old woman, but from the behind you
+ looked ...
+DENNIS: What I object to is that you automatically treat me like an inferior...
+ARTHUR: Well ... I AM king.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0309 b/data/vim/patches/8.1.0309
new file mode 100644
index 000000000..a4a36b0ae
--- /dev/null
+++ b/data/vim/patches/8.1.0309
@@ -0,0 +1,395 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0309
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0309
+Problem: Profiling does not show a count for condition lines. (Daniel
+ Hahler)
+Solution: Count lines when not skipping. (Ozaki Kiichi, closes #2499)
+Files: src/ex_docmd.c, src/testdir/test_profile.vim
+
+
+*** ../vim-8.1.0308/src/ex_docmd.c 2018-08-21 15:12:10.839801647 +0200
+--- src/ex_docmd.c 2018-08-21 17:40:31.920546399 +0200
+***************
+*** 1766,1782 ****
+ ea.skip = (if_level > 0);
+ #endif
+
+ #ifdef FEAT_EVAL
+ # ifdef FEAT_PROFILE
+! /* Count this line for profiling if ea.skip is FALSE. */
+! if (do_profiling == PROF_YES && !ea.skip)
+ {
+! if (getline_equal(fgetline, cookie, get_func_line))
+! func_line_exec(getline_cookie(fgetline, cookie));
+! else if (getline_equal(fgetline, cookie, getsourceline))
+! script_line_exec();
+ }
+! #endif
+
+ /* May go to debug mode. If this happens and the ">quit" debug command is
+ * used, throw an interrupt exception and skip the next command. */
+--- 1766,1816 ----
+ ea.skip = (if_level > 0);
+ #endif
+
++ /*
++ * 3. Skip over the range to find the command. Let "p" point to after it.
++ *
++ * We need the command to know what kind of range it uses.
++ */
++ cmd = ea.cmd;
++ ea.cmd = skip_range(ea.cmd, NULL);
++ if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL)
++ ea.cmd = skipwhite(ea.cmd + 1);
++ p = find_command(&ea, NULL);
++
+ #ifdef FEAT_EVAL
+ # ifdef FEAT_PROFILE
+! // Count this line for profiling if skip is TRUE.
+! if (do_profiling == PROF_YES
+! && (!ea.skip || cstack->cs_idx == 0 || (cstack->cs_idx > 0
+! && (cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE))))
+ {
+! int skip = did_emsg || got_int || did_throw;
+!
+! if (ea.cmdidx == CMD_catch)
+! skip = !skip && !(cstack->cs_idx >= 0
+! && (cstack->cs_flags[cstack->cs_idx] & CSF_THROWN)
+! && !(cstack->cs_flags[cstack->cs_idx] & CSF_CAUGHT));
+! else if (ea.cmdidx == CMD_else || ea.cmdidx == CMD_elseif)
+! skip = skip || !(cstack->cs_idx >= 0
+! && !(cstack->cs_flags[cstack->cs_idx]
+! & (CSF_ACTIVE | CSF_TRUE)));
+! else if (ea.cmdidx == CMD_finally)
+! skip = FALSE;
+! else if (ea.cmdidx != CMD_endif
+! && ea.cmdidx != CMD_endfor
+! && ea.cmdidx != CMD_endtry
+! && ea.cmdidx != CMD_endwhile)
+! skip = ea.skip;
+!
+! if (!skip)
+! {
+! if (getline_equal(fgetline, cookie, get_func_line))
+! func_line_exec(getline_cookie(fgetline, cookie));
+! else if (getline_equal(fgetline, cookie, getsourceline))
+! script_line_exec();
+! }
+ }
+! # endif
+
+ /* May go to debug mode. If this happens and the ">quit" debug command is
+ * used, throw an interrupt exception and skip the next command. */
+***************
+*** 1789,1805 ****
+ #endif
+
+ /*
+- * 3. Skip over the range to find the command. Let "p" point to after it.
+- *
+- * We need the command to know what kind of range it uses.
+- */
+- cmd = ea.cmd;
+- ea.cmd = skip_range(ea.cmd, NULL);
+- if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL)
+- ea.cmd = skipwhite(ea.cmd + 1);
+- p = find_command(&ea, NULL);
+-
+- /*
+ * 4. parse a range specifier of the form: addr [,addr] [;addr] ..
+ *
+ * where 'addr' is:
+--- 1823,1828 ----
+*** ../vim-8.1.0308/src/testdir/test_profile.vim 2018-06-30 21:18:10.486300954 +0200
+--- src/testdir/test_profile.vim 2018-08-21 17:35:04.318354275 +0200
+***************
+*** 67,73 ****
+ call assert_match('^\s*1\s\+.*\slet l:count = 100$', lines[13])
+ call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[14])
+ call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[15])
+! call assert_match('^\s*100\s\+.*\sendwhile$', lines[16])
+ call assert_equal('', lines[17])
+ call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[18])
+ call assert_equal('count total (s) self (s) function', lines[19])
+--- 67,73 ----
+ call assert_match('^\s*1\s\+.*\slet l:count = 100$', lines[13])
+ call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[14])
+ call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[15])
+! call assert_match('^\s*101\s\+.*\sendwhile$', lines[16])
+ call assert_equal('', lines[17])
+ call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[18])
+ call assert_equal('count total (s) self (s) function', lines[19])
+***************
+*** 84,89 ****
+--- 84,310 ----
+ call delete('Xprofile_func.log')
+ endfunc
+
++ func Test_profile_func_with_ifelse()
++ let lines = [
++ \ "func! Foo1()",
++ \ " if 1",
++ \ " let x = 0",
++ \ " elseif 1",
++ \ " let x = 1",
++ \ " else",
++ \ " let x = 2",
++ \ " endif",
++ \ "endfunc",
++ \ "func! Foo2()",
++ \ " if 0",
++ \ " let x = 0",
++ \ " elseif 1",
++ \ " let x = 1",
++ \ " else",
++ \ " let x = 2",
++ \ " endif",
++ \ "endfunc",
++ \ "func! Foo3()",
++ \ " if 0",
++ \ " let x = 0",
++ \ " elseif 0",
++ \ " let x = 1",
++ \ " else",
++ \ " let x = 2",
++ \ " endif",
++ \ "endfunc",
++ \ "call Foo1()",
++ \ "call Foo2()",
++ \ "call Foo3()",
++ \ ]
++
++ call writefile(lines, 'Xprofile_func.vim')
++ call system(v:progpath
++ \ . ' -es -u NONE -U NONE -i NONE --noplugin'
++ \ . ' -c "profile start Xprofile_func.log"'
++ \ . ' -c "profile func Foo*"'
++ \ . ' -c "so Xprofile_func.vim"'
++ \ . ' -c "qall!"')
++ call assert_equal(0, v:shell_error)
++
++ let lines = readfile('Xprofile_func.log')
++
++ " - Foo1() should pass 'if' block.
++ " - Foo2() should pass 'elseif' block.
++ " - Foo3() should pass 'else' block.
++ call assert_equal(54, len(lines))
++
++ call assert_equal('FUNCTION Foo1()', lines[0])
++ call assert_equal('Called 1 time', lines[1])
++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2])
++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3])
++ call assert_equal('', lines[4])
++ call assert_equal('count total (s) self (s)', lines[5])
++ call assert_match('^\s*1\s\+.*\sif 1$', lines[6])
++ call assert_match('^\s*1\s\+.*\s let x = 0$', lines[7])
++ call assert_match( '^\s\+elseif 1$', lines[8])
++ call assert_match( '^\s\+let x = 1$', lines[9])
++ call assert_match( '^\s\+else$', lines[10])
++ call assert_match( '^\s\+let x = 2$', lines[11])
++ call assert_match('^\s*1\s\+.*\sendif$', lines[12])
++ call assert_equal('', lines[13])
++ call assert_equal('FUNCTION Foo2()', lines[14])
++ call assert_equal('Called 1 time', lines[15])
++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[16])
++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[17])
++ call assert_equal('', lines[18])
++ call assert_equal('count total (s) self (s)', lines[19])
++ call assert_match('^\s*1\s\+.*\sif 0$', lines[20])
++ call assert_match( '^\s\+let x = 0$', lines[21])
++ call assert_match('^\s*1\s\+.*\selseif 1$', lines[22])
++ call assert_match('^\s*1\s\+.*\s let x = 1$', lines[23])
++ call assert_match( '^\s\+else$', lines[24])
++ call assert_match( '^\s\+let x = 2$', lines[25])
++ call assert_match('^\s*1\s\+.*\sendif$', lines[26])
++ call assert_equal('', lines[27])
++ call assert_equal('FUNCTION Foo3()', lines[28])
++ call assert_equal('Called 1 time', lines[29])
++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[30])
++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[31])
++ call assert_equal('', lines[32])
++ call assert_equal('count total (s) self (s)', lines[33])
++ call assert_match('^\s*1\s\+.*\sif 0$', lines[34])
++ call assert_match( '^\s\+let x = 0$', lines[35])
++ call assert_match('^\s*1\s\+.*\selseif 0$', lines[36])
++ call assert_match( '^\s\+let x = 1$', lines[37])
++ call assert_match('^\s*1\s\+.*\selse$', lines[38])
++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[39])
++ call assert_match('^\s*1\s\+.*\sendif$', lines[40])
++ call assert_equal('', lines[41])
++ call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[42])
++ call assert_equal('count total (s) self (s) function', lines[43])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[44])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[45])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[46])
++ call assert_equal('', lines[47])
++ call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[48])
++ call assert_equal('count total (s) self (s) function', lines[49])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[50])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[51])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[52])
++ call assert_equal('', lines[53])
++
++ call delete('Xprofile_func.vim')
++ call delete('Xprofile_func.log')
++ endfunc
++
++ func Test_profile_func_with_trycatch()
++ let lines = [
++ \ "func! Foo1()",
++ \ " try",
++ \ " let x = 0",
++ \ " catch",
++ \ " let x = 1",
++ \ " finally",
++ \ " let x = 2",
++ \ " endtry",
++ \ "endfunc",
++ \ "func! Foo2()",
++ \ " try",
++ \ " throw 0",
++ \ " catch",
++ \ " let x = 1",
++ \ " finally",
++ \ " let x = 2",
++ \ " endtry",
++ \ "endfunc",
++ \ "func! Foo3()",
++ \ " try",
++ \ " throw 0",
++ \ " catch",
++ \ " throw 1",
++ \ " finally",
++ \ " let x = 2",
++ \ " endtry",
++ \ "endfunc",
++ \ "call Foo1()",
++ \ "call Foo2()",
++ \ "try",
++ \ " call Foo3()",
++ \ "catch",
++ \ "endtry",
++ \ ]
++
++ call writefile(lines, 'Xprofile_func.vim')
++ call system(v:progpath
++ \ . ' -es -u NONE -U NONE -i NONE --noplugin'
++ \ . ' -c "profile start Xprofile_func.log"'
++ \ . ' -c "profile func Foo*"'
++ \ . ' -c "so Xprofile_func.vim"'
++ \ . ' -c "qall!"')
++ call assert_equal(0, v:shell_error)
++
++ let lines = readfile('Xprofile_func.log')
++
++ " - Foo1() should pass 'try' 'finally' blocks.
++ " - Foo2() should pass 'catch' 'finally' blocks.
++ " - Foo3() should not pass 'endtry'.
++ call assert_equal(54, len(lines))
++
++ call assert_equal('FUNCTION Foo1()', lines[0])
++ call assert_equal('Called 1 time', lines[1])
++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2])
++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3])
++ call assert_equal('', lines[4])
++ call assert_equal('count total (s) self (s)', lines[5])
++ call assert_match('^\s*1\s\+.*\stry$', lines[6])
++ call assert_match('^\s*1\s\+.*\s let x = 0$', lines[7])
++ call assert_match( '^\s\+catch$', lines[8])
++ call assert_match( '^\s\+let x = 1$', lines[9])
++ call assert_match('^\s*1\s\+.*\sfinally$', lines[10])
++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[11])
++ call assert_match('^\s*1\s\+.*\sendtry$', lines[12])
++ call assert_equal('', lines[13])
++ call assert_equal('FUNCTION Foo2()', lines[14])
++ call assert_equal('Called 1 time', lines[15])
++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[16])
++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[17])
++ call assert_equal('', lines[18])
++ call assert_equal('count total (s) self (s)', lines[19])
++ call assert_match('^\s*1\s\+.*\stry$', lines[20])
++ call assert_match('^\s*1\s\+.*\s throw 0$', lines[21])
++ call assert_match('^\s*1\s\+.*\scatch$', lines[22])
++ call assert_match('^\s*1\s\+.*\s let x = 1$', lines[23])
++ call assert_match('^\s*1\s\+.*\sfinally$', lines[24])
++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[25])
++ call assert_match('^\s*1\s\+.*\sendtry$', lines[26])
++ call assert_equal('', lines[27])
++ call assert_equal('FUNCTION Foo3()', lines[28])
++ call assert_equal('Called 1 time', lines[29])
++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[30])
++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[31])
++ call assert_equal('', lines[32])
++ call assert_equal('count total (s) self (s)', lines[33])
++ call assert_match('^\s*1\s\+.*\stry$', lines[34])
++ call assert_match('^\s*1\s\+.*\s throw 0$', lines[35])
++ call assert_match('^\s*1\s\+.*\scatch$', lines[36])
++ call assert_match('^\s*1\s\+.*\s throw 1$', lines[37])
++ call assert_match('^\s*1\s\+.*\sfinally$', lines[38])
++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[39])
++ call assert_match( '^\s\+endtry$', lines[40])
++ call assert_equal('', lines[41])
++ call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[42])
++ call assert_equal('count total (s) self (s) function', lines[43])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[44])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[45])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[46])
++ call assert_equal('', lines[47])
++ call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[48])
++ call assert_equal('count total (s) self (s) function', lines[49])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[50])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[51])
++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[52])
++ call assert_equal('', lines[53])
++
++ call delete('Xprofile_func.vim')
++ call delete('Xprofile_func.log')
++ endfunc
++
+ func Test_profile_file()
+ let lines = [
+ \ 'func! Foo()',
+***************
+*** 123,129 ****
+ call assert_equal(' " a comment', lines[9])
+ " if self and total are equal we only get one number
+ call assert_match('^\s*20\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[10])
+! call assert_match('^\s*20\s\+\d\+\.\d\+\s\+endfor$', lines[11])
+ " if self and total are equal we only get one number
+ call assert_match('^\s*2\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[12])
+ call assert_equal('', lines[13])
+--- 344,350 ----
+ call assert_equal(' " a comment', lines[9])
+ " if self and total are equal we only get one number
+ call assert_match('^\s*20\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[10])
+! call assert_match('^\s*22\s\+\d\+\.\d\+\s\+endfor$', lines[11])
+ " if self and total are equal we only get one number
+ call assert_match('^\s*2\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[12])
+ call assert_equal('', lines[13])
+*** ../vim-8.1.0308/src/version.c 2018-08-21 17:07:40.155188638 +0200
+--- src/version.c 2018-08-21 17:48:43.353706395 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 309,
+ /**/
+
+--
+ARTHUR: ... and I am your king ....
+OLD WOMAN: Ooooh! I didn't know we had a king. I thought we were an
+ autonomous collective ...
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0310 b/data/vim/patches/8.1.0310
new file mode 100644
index 000000000..1b992b173
--- /dev/null
+++ b/data/vim/patches/8.1.0310
@@ -0,0 +1,110 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0310
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0310
+Problem: File info message not always suppressed with 'F' in 'shortmess'.
+ (Asheq Imran)
+Solution: Save and restore msg_silent. (Christian Brabandt, closes #3221)
+Files: src/buffer.c, src/memline.c, src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0309/src/buffer.c 2018-08-21 15:12:10.831801698 +0200
+--- src/buffer.c 2018-08-21 18:36:25.882450971 +0200
+***************
+*** 1035,1041 ****
+--- 1035,1048 ----
+ buf = old_curbuf->br_buf;
+ if (buf != NULL)
+ {
++ int old_msg_silent = msg_silent;
++
++ if (shortmess(SHM_FILEINFO))
++ msg_silent = 1; // prevent fileinfo message
+ enter_buffer(buf);
++ // restore msg_silent, so that the command line will be shown
++ msg_silent = old_msg_silent;
++
+ # ifdef FEAT_SYN_HL
+ if (old_tw != curbuf->b_p_tw)
+ check_colorcolumn(curwin);
+*** ../vim-8.1.0309/src/memline.c 2018-08-20 22:53:00.210105086 +0200
+--- src/memline.c 2018-08-21 18:38:03.481885916 +0200
+***************
+*** 828,837 ****
+ */
+ void
+ check_need_swap(
+! int newfile) /* reading file into new buffer */
+ {
+ if (curbuf->b_may_swap && (!curbuf->b_p_ro || !newfile))
+ ml_open_file(curbuf);
+ }
+
+ /*
+--- 828,840 ----
+ */
+ void
+ check_need_swap(
+! int newfile) // reading file into new buffer
+ {
++ int old_msg_silent = msg_silent; // might be reset by an E325 message
++
+ if (curbuf->b_may_swap && (!curbuf->b_p_ro || !newfile))
+ ml_open_file(curbuf);
++ msg_silent = old_msg_silent;
+ }
+
+ /*
+*** ../vim-8.1.0309/src/testdir/test_options.vim 2018-08-11 17:52:57.848311971 +0200
+--- src/testdir/test_options.vim 2018-08-21 18:34:20.687161831 +0200
+***************
+*** 414,416 ****
+--- 414,437 ----
+ set shortmess&
+ bwipe
+ endfunc
++
++ func Test_shortmess_F2()
++ e file1
++ e file2
++ call assert_match('file1', execute('bn', ''))
++ call assert_match('file2', execute('bn', ''))
++ set shortmess+=F
++ call assert_true(empty(execute('bn', '')))
++ call assert_true(empty(execute('bn', '')))
++ set hidden
++ call assert_true(empty(execute('bn', '')))
++ call assert_true(empty(execute('bn', '')))
++ set nohidden
++ call assert_true(empty(execute('bn', '')))
++ call assert_true(empty(execute('bn', '')))
++ set shortmess&
++ call assert_match('file1', execute('bn', ''))
++ call assert_match('file2', execute('bn', ''))
++ bwipe
++ bwipe
++ endfunc
+*** ../vim-8.1.0309/src/version.c 2018-08-21 17:49:50.993308900 +0200
+--- src/version.c 2018-08-21 18:42:36.348269248 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 310,
+ /**/
+
+--
+"The future's already arrived - it's just not evenly distributed yet."
+ -- William Gibson
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0311 b/data/vim/patches/8.1.0311
new file mode 100644
index 000000000..3b6ece599
--- /dev/null
+++ b/data/vim/patches/8.1.0311
@@ -0,0 +1,112 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0311
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0311
+Problem: Filtering entries in a quickfix list is not easy.
+Solution: Add the cfilter plugin. (Yegappan Lakshmanan)
+Files: runtime/pack/dist/opt/cfilter/plugin/cfilter.vim,
+ runtime/doc/quickfix.txt
+
+
+*** ../vim-8.1.0310/runtime/pack/dist/opt/cfilter/plugin/cfilter.vim 1970-01-01 01:00:00.000000000 +0100
+--- runtime/pack/dist/opt/cfilter/plugin/cfilter.vim 2018-08-21 18:56:37.027118962 +0200
+***************
+*** 0 ****
+--- 1,43 ----
++ " cfilter.vim: Plugin to filter entries from a quickfix/location list
++ " Last Change: May 12, 2018
++ " Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
++ " Version: 1.0
++ "
++ " Commands to filter the quickfix list:
++ " :Cfilter[!] {pat}
++ " Create a new quickfix list from entries matching {pat} in the current
++ " quickfix list. Both the file name and the text of the entries are
++ " matched against {pat}. If ! is supplied, then entries not matching
++ " {pat} are used.
++ " :Lfilter[!] {pat}
++ " Same as :Cfilter but operates on the current location list.
++ "
++ if exists("loaded_cfilter")
++ finish
++ endif
++ let loaded_cfilter = 1
++
++ func s:Qf_filter(qf, pat, bang)
++ if a:qf
++ let Xgetlist = function('getqflist')
++ let Xsetlist = function('setqflist')
++ let cmd = ':Cfilter' . a:bang
++ else
++ let Xgetlist = function('getloclist', [0])
++ let Xsetlist = function('setloclist', [0])
++ let cmd = ':Lfilter' . a:bang
++ endif
++
++ if a:bang == '!'
++ let cond = 'v:val.text !~# a:pat && bufname(v:val.bufnr) !~# a:pat'
++ else
++ let cond = 'v:val.text =~# a:pat || bufname(v:val.bufnr) =~# a:pat'
++ endif
++
++ let items = filter(Xgetlist(), cond)
++ let title = cmd . ' ' . a:pat
++ call Xsetlist([], ' ', {'title' : title, 'items' : items})
++ endfunc
++
++ com! -nargs=+ -bang Cfilter call s:Qf_filter(1, <q-args>, <q-bang>)
++ com! -nargs=+ -bang Lfilter call s:Qf_filter(0, <q-args>, <q-bang>)
+*** ../vim-8.1.0310/runtime/doc/quickfix.txt 2018-07-08 18:20:18.111521913 +0200
+--- runtime/doc/quickfix.txt 2018-08-21 19:02:00.097112470 +0200
+***************
+*** 1551,1556 ****
+--- 1551,1572 ----
+ recognized as a command separator. The backslash before each space is
+ required for the set command.
+
++ *cfilter-plugin*
++ If you have too many matching messages, you can use the cfilter plugin to
++ reduce the number of entries. Load the plugin with: >
++ packadd cfilter
++
++ Then you can use these command: >
++ :Cfilter[!] {pat}
++ :Lfilter[!] {pat}
++
++ :Cfilter creates a new quickfix list from entries matching {pat} in the
++ current quickfix list. Both the file name and the text of the entries are
++ matched against {pat}. If ! is supplied, then entries not matching {pat} are
++ used.
++
++ :Lfilter does the same as :Cfilter but operates on the current location list.
++
+ =============================================================================
+ 8. The directory stack *quickfix-directory-stack*
+
+*** ../vim-8.1.0310/src/version.c 2018-08-21 18:50:11.153501902 +0200
+--- src/version.c 2018-08-21 19:01:28.421309486 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 311,
+ /**/
+
+--
+ARTHUR: Be quiet! I order you to shut up.
+OLD WOMAN: Order, eh -- who does he think he is?
+ARTHUR: I am your king!
+OLD WOMAN: Well, I didn't vote for you.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0312 b/data/vim/patches/8.1.0312
new file mode 100644
index 000000000..9db92c0d5
--- /dev/null
+++ b/data/vim/patches/8.1.0312
@@ -0,0 +1,226 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0312
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0312
+Problem: Wrong type for flags used in signal handlers.
+Solution: Use sig_atomic_t. (Dominique Pelle, closes #3356)
+Files: src/globals.h, src/os_unix.c, src/os_win32.h
+
+
+*** ../vim-8.1.0311/src/globals.h 2018-08-14 13:38:12.744559267 +0200
+--- src/globals.h 2018-08-21 19:32:32.566883918 +0200
+***************
+*** 518,524 ****
+ *
+ * volatile because it is used in signal handler sig_sysmouse().
+ */
+! EXTERN volatile int hold_gui_events INIT(= 0);
+
+ /*
+ * When resizing the shell is postponed, remember the new size, and call
+--- 518,524 ----
+ *
+ * volatile because it is used in signal handler sig_sysmouse().
+ */
+! EXTERN volatile sig_atomic_t hold_gui_events INIT(= 0);
+
+ /*
+ * When resizing the shell is postponed, remember the new size, and call
+***************
+*** 655,661 ****
+ /* TRUE when in or after free_all_mem() */
+ #endif
+ /* volatile because it is used in signal handler deathtrap(). */
+! EXTERN volatile int full_screen INIT(= FALSE);
+ /* TRUE when doing full-screen output
+ * otherwise only writing some messages */
+
+--- 655,661 ----
+ /* TRUE when in or after free_all_mem() */
+ #endif
+ /* volatile because it is used in signal handler deathtrap(). */
+! EXTERN volatile sig_atomic_t full_screen INIT(= FALSE);
+ /* TRUE when doing full-screen output
+ * otherwise only writing some messages */
+
+***************
+*** 800,810 ****
+ EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */
+ # ifdef SIGHASARG
+ /* volatile because it is used in signal handlers. */
+! EXTERN volatile int lc_signal; /* caught signal number, 0 when no was signal
+ caught; used for mch_libcall() */
+ # endif
+ /* volatile because it is used in signal handler deathtrap(). */
+! EXTERN volatile int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
+ #endif
+
+ #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
+--- 800,810 ----
+ EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */
+ # ifdef SIGHASARG
+ /* volatile because it is used in signal handlers. */
+! EXTERN volatile sig_atomic_t lc_signal; /* caught signal number, 0 when no was signal
+ caught; used for mch_libcall() */
+ # endif
+ /* volatile because it is used in signal handler deathtrap(). */
+! EXTERN volatile sig_atomic_t lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */
+ #endif
+
+ #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT)
+***************
+*** 1037,1043 ****
+ EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */
+
+ /* volatile because it is used in signal handler catch_sigint(). */
+! EXTERN volatile int got_int INIT(= FALSE); /* set to TRUE when interrupt
+ signal occurred */
+ #ifdef USE_TERM_CONSOLE
+ EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */
+--- 1037,1043 ----
+ EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */
+
+ /* volatile because it is used in signal handler catch_sigint(). */
+! EXTERN volatile sig_atomic_t got_int INIT(= FALSE); /* set to TRUE when interrupt
+ signal occurred */
+ #ifdef USE_TERM_CONSOLE
+ EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */
+*** ../vim-8.1.0311/src/os_unix.c 2018-08-21 13:09:06.250115910 +0200
+--- src/os_unix.c 2018-08-21 19:32:32.570883895 +0200
+***************
+*** 161,167 ****
+ static int get_x11_icon(int);
+
+ static char_u *oldtitle = NULL;
+! static volatile int oldtitle_outdated = FALSE;
+ static int did_set_title = FALSE;
+ static char_u *oldicon = NULL;
+ static int did_set_icon = FALSE;
+--- 161,167 ----
+ static int get_x11_icon(int);
+
+ static char_u *oldtitle = NULL;
+! static volatile sig_atomic_t oldtitle_outdated = FALSE;
+ static int did_set_title = FALSE;
+ static char_u *oldicon = NULL;
+ static int did_set_icon = FALSE;
+***************
+*** 205,211 ****
+ # define SET_SIG_ALARM
+ static RETSIGTYPE sig_alarm SIGPROTOARG;
+ /* volatile because it is used in signal handler sig_alarm(). */
+! static volatile int sig_alarm_called;
+ #endif
+ static RETSIGTYPE deathtrap SIGPROTOARG;
+
+--- 205,211 ----
+ # define SET_SIG_ALARM
+ static RETSIGTYPE sig_alarm SIGPROTOARG;
+ /* volatile because it is used in signal handler sig_alarm(). */
+! static volatile sig_atomic_t sig_alarm_called;
+ #endif
+ static RETSIGTYPE deathtrap SIGPROTOARG;
+
+***************
+*** 231,243 ****
+ #endif
+
+ /* volatile because it is used in signal handler sig_winch(). */
+! static volatile int do_resize = FALSE;
+ static char_u *extra_shell_arg = NULL;
+ static int show_shell_mess = TRUE;
+ /* volatile because it is used in signal handler deathtrap(). */
+! static volatile int deadly_signal = 0; /* The signal we caught */
+ /* volatile because it is used in signal handler deathtrap(). */
+! static volatile int in_mch_delay = FALSE; /* sleeping in mch_delay() */
+
+ #if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM)
+ static int dont_check_job_ended = 0;
+--- 231,243 ----
+ #endif
+
+ /* volatile because it is used in signal handler sig_winch(). */
+! static volatile sig_atomic_t do_resize = FALSE;
+ static char_u *extra_shell_arg = NULL;
+ static int show_shell_mess = TRUE;
+ /* volatile because it is used in signal handler deathtrap(). */
+! static volatile sig_atomic_t deadly_signal = 0; /* The signal we caught */
+ /* volatile because it is used in signal handler deathtrap(). */
+! static volatile sig_atomic_t in_mch_delay = FALSE; /* sleeping in mch_delay() */
+
+ #if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM)
+ static int dont_check_job_ended = 0;
+***************
+*** 1247,1253 ****
+
+ #if defined(SIGCONT)
+ static RETSIGTYPE sigcont_handler SIGPROTOARG;
+! static volatile int in_mch_suspend = FALSE;
+
+ /*
+ * With multi-threading, suspending might not work immediately. Catch the
+--- 1247,1253 ----
+
+ #if defined(SIGCONT)
+ static RETSIGTYPE sigcont_handler SIGPROTOARG;
+! static volatile sig_atomic_t in_mch_suspend = FALSE;
+
+ /*
+ * With multi-threading, suspending might not work immediately. Catch the
+***************
+*** 1260,1266 ****
+ *
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+! static volatile int sigcont_received;
+ static RETSIGTYPE sigcont_handler SIGPROTOARG;
+
+ /*
+--- 1260,1266 ----
+ *
+ * volatile because it is used in signal handler sigcont_handler().
+ */
+! static volatile sig_atomic_t sigcont_received;
+ static RETSIGTYPE sigcont_handler SIGPROTOARG;
+
+ /*
+*** ../vim-8.1.0311/src/os_win32.h 2017-02-01 13:08:19.000000000 +0100
+--- src/os_win32.h 2018-08-21 19:32:32.570883895 +0200
+***************
+*** 89,94 ****
+--- 89,95 ----
+
+ #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
+
++ #include <signal.h>
+ #include <stdlib.h>
+ #include <time.h>
+ #include <sys/types.h>
+*** ../vim-8.1.0311/src/version.c 2018-08-21 19:22:00.366591999 +0200
+--- src/version.c 2018-08-21 19:33:01.798710954 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 312,
+ /**/
+
+--
+OLD WOMAN: Well, how did you become king, then?
+ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite,
+ held Excalibur aloft from the bosom of the water to signify by Divine
+ Providence ... that I, Arthur, was to carry Excalibur ... That is
+ why I am your king!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0313 b/data/vim/patches/8.1.0313
new file mode 100644
index 000000000..e3f170127
--- /dev/null
+++ b/data/vim/patches/8.1.0313
@@ -0,0 +1,232 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0313
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0313
+Problem: Information about a swap file is unavailable.
+Solution: Add swapinfo(). (Enzo Ferber)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/memline.c,
+ src/proto/memline.pro, src/testdir/test_swap.vim
+
+
+*** ../vim-8.1.0312/runtime/doc/eval.txt 2018-08-21 16:56:28.363325301 +0200
+--- runtime/doc/eval.txt 2018-08-21 20:12:15.882157860 +0200
+***************
+*** 2409,2414 ****
+--- 2416,2422 ----
+ specific match in ":s" or substitute()
+ substitute({expr}, {pat}, {sub}, {flags})
+ String all {pat} in {expr} replaced with {sub}
++ swapinfo({fname}) Dict information about swap file {fname}
+ synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
+ synIDattr({synID}, {what} [, {mode}])
+ String attribute {what} of syntax ID {synID}
+***************
+*** 7999,8004 ****
+--- 8009,8030 ----
+ |submatch()| returns. Example: >
+ :echo substitute(s, '%\(\x\x\)', {m -> '0x' . m[1]}, 'g')
+
++ swapinfo({fname}) swapinfo()
++ The result is a dictionary, which holds information about the
++ swapfile {fname}. The available fields are:
++ version VIM version
++ user user name
++ host host name
++ fname original file name
++ pid PID of the VIM process that created the swap
++ file
++ mtime last modification time in seconds
++ inode Optional: INODE number of the file
++ In case of failure an "error" item is added with the reason:
++ Cannot open file: file not found or in accessible
++ Cannot read file: cannot read first block
++ magic number mismatch: info in first block is invalid
++
+ synID({lnum}, {col}, {trans}) *synID()*
+ The result is a Number, which is the syntax ID at the position
+ {lnum} and {col} in the current window.
+*** ../vim-8.1.0312/src/evalfunc.c 2018-08-21 16:56:28.367325278 +0200
+--- src/evalfunc.c 2018-08-21 20:26:36.876842294 +0200
+***************
+*** 398,403 ****
+--- 398,404 ----
+ static void f_strwidth(typval_T *argvars, typval_T *rettv);
+ static void f_submatch(typval_T *argvars, typval_T *rettv);
+ static void f_substitute(typval_T *argvars, typval_T *rettv);
++ static void f_swapinfo(typval_T *argvars, typval_T *rettv);
+ static void f_synID(typval_T *argvars, typval_T *rettv);
+ static void f_synIDattr(typval_T *argvars, typval_T *rettv);
+ static void f_synIDtrans(typval_T *argvars, typval_T *rettv);
+***************
+*** 859,864 ****
+--- 860,866 ----
+ {"strwidth", 1, 1, f_strwidth},
+ {"submatch", 1, 2, f_submatch},
+ {"substitute", 4, 4, f_substitute},
++ {"swapinfo", 1, 1, f_swapinfo},
+ {"synID", 3, 3, f_synID},
+ {"synIDattr", 2, 3, f_synIDattr},
+ {"synIDtrans", 1, 1, f_synIDtrans},
+***************
+*** 12314,12319 ****
+--- 12316,12331 ----
+ }
+
+ /*
++ * "swapinfo(swap_filename)" function
++ */
++ static void
++ f_swapinfo(typval_T *argvars, typval_T *rettv)
++ {
++ if (rettv_dict_alloc(rettv) == OK)
++ get_b0_dict(get_tv_string(argvars), rettv->vval.v_dict);
++ }
++
++ /*
+ * "synID(lnum, col, trans)" function
+ */
+ static void
+*** ../vim-8.1.0312/src/memline.c 2018-08-21 18:50:11.153501902 +0200
+--- src/memline.c 2018-08-21 20:18:30.815871851 +0200
+***************
+*** 2042,2047 ****
+--- 2042,2090 ----
+ #endif
+
+ /*
++ * Return information found in swapfile "fname" in dictionary "d".
++ * This is used by the swapinfo() function.
++ */
++ void
++ get_b0_dict(char_u *fname, dict_T *d)
++ {
++ int fd;
++ struct block0 b0;
++
++ if ((fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0)) >= 0)
++ {
++ if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
++ {
++ if (b0_magic_wrong(&b0))
++ {
++ dict_add_string(d, "error",
++ vim_strsave((char_u *)"magic number mismatch"));
++ }
++ else
++ {
++ /* we have swap information */
++ dict_add_string(d, "version", vim_strsave(b0.b0_version));
++ dict_add_string(d, "user", vim_strsave(b0.b0_uname));
++ dict_add_string(d, "host", vim_strsave(b0.b0_hname));
++ dict_add_string(d, "fname", vim_strsave(b0.b0_fname));
++
++ dict_add_number(d, "pid", char_to_long(b0.b0_pid));
++ dict_add_number(d, "mtime", char_to_long(b0.b0_mtime));
++ #ifdef CHECK_INODE
++ dict_add_number(d, "inode", char_to_long(b0.b0_ino));
++ #endif
++ }
++ }
++ else
++ dict_add_string(d, "error",
++ vim_strsave((char_u *)"Cannot read file"));
++ close(fd);
++ }
++ else
++ dict_add_string(d, "error", vim_strsave((char_u *)"Cannot open file"));
++ }
++
++ /*
+ * Give information about an existing swap file.
+ * Returns timestamp (0 when unknown).
+ */
+*** ../vim-8.1.0312/src/proto/memline.pro 2018-08-07 21:39:09.251060096 +0200
+--- src/proto/memline.pro 2018-08-21 20:00:58.994558112 +0200
+***************
+*** 11,16 ****
+--- 11,18 ----
+ void ml_timestamp(buf_T *buf);
+ void ml_recover(void);
+ int recover_names(char_u *fname, int list, int nr, char_u **fname_out);
++ char_u *make_percent_swname(char_u *dir, char_u *name);
++ void get_b0_dict(char_u *fname, dict_T *d);
+ void ml_sync_all(int check_file, int check_char);
+ void ml_preserve(buf_T *buf, int message);
+ char_u *ml_get(linenr_T lnum);
+***************
+*** 34,38 ****
+ void ml_decrypt_data(memfile_T *mfp, char_u *data, off_T offset, unsigned size);
+ long ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp);
+ void goto_byte(long cnt);
+- char_u *make_percent_swname (char_u *dir, char_u *name);
+ /* vim: set ft=c : */
+--- 36,39 ----
+*** ../vim-8.1.0312/src/testdir/test_swap.vim 2018-05-12 15:57:33.000000000 +0200
+--- src/testdir/test_swap.vim 2018-08-21 20:18:23.395917660 +0200
+***************
+*** 97,99 ****
+--- 97,133 ----
+ set directory&
+ call delete('Xswapdir', 'rf')
+ endfunc
++
++ func Test_swapinfo()
++ new Xswapinfo
++ call setline(1, ['one', 'two', 'three'])
++ w
++ let fname = trim(execute('swapname'))
++ call assert_match('Xswapinfo', fname)
++ let info = swapinfo(fname)
++ call assert_match('8\.', info.version)
++ call assert_match('\w', info.user)
++ call assert_equal(hostname(), info.host)
++ call assert_match('Xswapinfo', info.fname)
++ call assert_equal(getpid(), info.pid)
++ call assert_match('^\d*$', info.mtime)
++ if has_key(info, 'inode')
++ call assert_match('\d', info.inode)
++ endif
++ bwipe!
++ call delete(fname)
++ call delete('Xswapinfo')
++
++ let info = swapinfo('doesnotexist')
++ call assert_equal('Cannot open file', info.error)
++
++ call writefile(['burp'], 'Xnotaswapfile')
++ let info = swapinfo('Xnotaswapfile')
++ call assert_equal('Cannot read file', info.error)
++ call delete('Xnotaswapfile')
++
++ call writefile([repeat('x', 10000)], 'Xnotaswapfile')
++ let info = swapinfo('Xnotaswapfile')
++ call assert_equal('magic number mismatch', info.error)
++ call delete('Xnotaswapfile')
++ endfunc
+*** ../vim-8.1.0312/src/version.c 2018-08-21 19:47:44.724053803 +0200
+--- src/version.c 2018-08-21 19:54:18.937247096 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 313,
+ /**/
+
+--
+DENNIS: Look, strange women lying on their backs in ponds handing out
+ swords ... that's no basis for a system of government. Supreme
+ executive power derives from a mandate from the masses, not from some
+ farcical aquatic ceremony.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0314 b/data/vim/patches/8.1.0314
new file mode 100644
index 000000000..69dc90054
--- /dev/null
+++ b/data/vim/patches/8.1.0314
@@ -0,0 +1,158 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0314
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0314 (after 8.1.0313)
+Problem: Build failure without the +eval feature. (Brenton Horne)
+Solution: Add #ifdef. Also add the "dirty" item.
+Files: src/memline.c, runtime/doc/eval.txt, src/testdir/test_swap.vim
+
+
+*** ../vim-8.1.0313/src/memline.c 2018-08-21 20:28:49.888006612 +0200
+--- src/memline.c 2018-08-21 21:07:08.927388911 +0200
+***************
+*** 2041,2046 ****
+--- 2041,2047 ----
+ static int process_still_running;
+ #endif
+
++ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+ * Return information found in swapfile "fname" in dictionary "d".
+ * This is used by the swapinfo() function.
+***************
+*** 2055,2065 ****
+ {
+ if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
+ {
+! if (b0_magic_wrong(&b0))
+! {
+ dict_add_string(d, "error",
+! vim_strsave((char_u *)"magic number mismatch"));
+! }
+ else
+ {
+ /* we have swap information */
+--- 2056,2067 ----
+ {
+ if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
+ {
+! if (ml_check_b0_id(&b0) == FAIL)
+ dict_add_string(d, "error",
+! vim_strsave((char_u *)"Not a swap file"));
+! else if (b0_magic_wrong(&b0))
+! dict_add_string(d, "error",
+! vim_strsave((char_u *)"Magic number mismatch"));
+ else
+ {
+ /* we have swap information */
+***************
+*** 2070,2078 ****
+
+ dict_add_number(d, "pid", char_to_long(b0.b0_pid));
+ dict_add_number(d, "mtime", char_to_long(b0.b0_mtime));
+! #ifdef CHECK_INODE
+ dict_add_number(d, "inode", char_to_long(b0.b0_ino));
+! #endif
+ }
+ }
+ else
+--- 2072,2081 ----
+
+ dict_add_number(d, "pid", char_to_long(b0.b0_pid));
+ dict_add_number(d, "mtime", char_to_long(b0.b0_mtime));
+! dict_add_number(d, "dirty", b0.b0_dirty ? 1 : 0);
+! # ifdef CHECK_INODE
+ dict_add_number(d, "inode", char_to_long(b0.b0_ino));
+! # endif
+ }
+ }
+ else
+***************
+*** 2083,2088 ****
+--- 2086,2092 ----
+ else
+ dict_add_string(d, "error", vim_strsave((char_u *)"Cannot open file"));
+ }
++ #endif
+
+ /*
+ * Give information about an existing swap file.
+*** ../vim-8.1.0313/runtime/doc/eval.txt 2018-08-21 20:28:49.884006638 +0200
+--- runtime/doc/eval.txt 2018-08-21 21:06:33.431590332 +0200
+***************
+*** 8011,8020 ****
+ file
+ mtime last modification time in seconds
+ inode Optional: INODE number of the file
+ In case of failure an "error" item is added with the reason:
+ Cannot open file: file not found or in accessible
+ Cannot read file: cannot read first block
+! magic number mismatch: info in first block is invalid
+
+ synID({lnum}, {col}, {trans}) *synID()*
+ The result is a Number, which is the syntax ID at the position
+--- 8020,8031 ----
+ file
+ mtime last modification time in seconds
+ inode Optional: INODE number of the file
++ dirty 1 if file was modified, 0 if not
+ In case of failure an "error" item is added with the reason:
+ Cannot open file: file not found or in accessible
+ Cannot read file: cannot read first block
+! Not a swap file: does not contain correct block ID
+! Magic number mismatch: Info in first block is invalid
+
+ synID({lnum}, {col}, {trans}) *synID()*
+ The result is a Number, which is the syntax ID at the position
+*** ../vim-8.1.0313/src/testdir/test_swap.vim 2018-08-21 20:28:49.892006588 +0200
+--- src/testdir/test_swap.vim 2018-08-21 21:07:26.571288544 +0200
+***************
+*** 109,114 ****
+--- 109,115 ----
+ call assert_match('\w', info.user)
+ call assert_equal(hostname(), info.host)
+ call assert_match('Xswapinfo', info.fname)
++ call assert_match(0, info.dirty)
+ call assert_equal(getpid(), info.pid)
+ call assert_match('^\d*$', info.mtime)
+ if has_key(info, 'inode')
+***************
+*** 128,133 ****
+
+ call writefile([repeat('x', 10000)], 'Xnotaswapfile')
+ let info = swapinfo('Xnotaswapfile')
+! call assert_equal('magic number mismatch', info.error)
+ call delete('Xnotaswapfile')
+ endfunc
+--- 129,134 ----
+
+ call writefile([repeat('x', 10000)], 'Xnotaswapfile')
+ let info = swapinfo('Xnotaswapfile')
+! call assert_equal('Not a swap file', info.error)
+ call delete('Xnotaswapfile')
+ endfunc
+*** ../vim-8.1.0313/src/version.c 2018-08-21 20:28:49.892006588 +0200
+--- src/version.c 2018-08-21 21:08:05.951063970 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 314,
+ /**/
+
+--
+DENNIS: You can't expect to wield supreme executive power just 'cause some
+ watery tart threw a sword at you!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0315 b/data/vim/patches/8.1.0315
new file mode 100644
index 000000000..cea600e2b
--- /dev/null
+++ b/data/vim/patches/8.1.0315
@@ -0,0 +1,223 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0315
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0315
+Problem: Helpgrep with language doesn't work properly. (Takuya Fujiwara)
+Solution: Check for the language earlier. (Hirohito Higashi)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0314/src/quickfix.c 2018-08-18 19:59:48.418322409 +0200
+--- src/quickfix.c 2018-08-21 21:47:55.412902244 +0200
+***************
+*** 5385,5391 ****
+ if (qf_restore_list(qi, save_qfid) == FAIL)
+ goto theend;
+
+! /* Jump to first match. */
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ {
+ if ((flags & VGR_NOJUMP) == 0)
+--- 5385,5391 ----
+ if (qf_restore_list(qi, save_qfid) == FAIL)
+ goto theend;
+
+! // Jump to first match.
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ {
+ if ((flags & VGR_NOJUMP) == 0)
+***************
+*** 6844,6859 ****
+ /*
+ * Search for a pattern in all the help files in the 'runtimepath'
+ * and add the matches to a quickfix list.
+! * 'arg' is the language specifier. If supplied, then only matches in the
+ * specified language are found.
+ */
+ static void
+! hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *arg)
+ {
+ char_u *p;
+- #ifdef FEAT_MULTI_LANG
+- char_u *lang;
+- #endif
+
+ #ifdef FEAT_MBYTE
+ vimconv_T vc;
+--- 6844,6856 ----
+ /*
+ * Search for a pattern in all the help files in the 'runtimepath'
+ * and add the matches to a quickfix list.
+! * 'lang' is the language specifier. If supplied, then only matches in the
+ * specified language are found.
+ */
+ static void
+! hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *lang)
+ {
+ char_u *p;
+
+ #ifdef FEAT_MBYTE
+ vimconv_T vc;
+***************
+*** 6865,6874 ****
+ convert_setup(&vc, (char_u *)"utf-8", p_enc);
+ #endif
+
+- #ifdef FEAT_MULTI_LANG
+- /* Check for a specified language */
+- lang = check_help_lang(arg);
+- #endif
+
+ /* Go through all the directories in 'runtimepath' */
+ p = p_rtp;
+--- 6862,6867 ----
+***************
+*** 6903,6908 ****
+--- 6896,6902 ----
+ qf_info_T *qi = &ql_info;
+ int new_qi = FALSE;
+ char_u *au_name = NULL;
++ char_u *lang = NULL;
+
+ switch (eap->cmdidx)
+ {
+***************
+*** 6919,6925 ****
+ #endif
+ }
+
+! /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
+ save_cpo = p_cpo;
+ p_cpo = empty_option;
+
+--- 6913,6919 ----
+ #endif
+ }
+
+! // Make 'cpoptions' empty, the 'l' flag should not be used here.
+ save_cpo = p_cpo;
+ p_cpo = empty_option;
+
+***************
+*** 6930,6943 ****
+ return;
+ }
+
+ regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING);
+ regmatch.rm_ic = FALSE;
+ if (regmatch.regprog != NULL)
+ {
+! /* create a new quickfix list */
+ qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep));
+
+! hgr_search_in_rtp(qi, &regmatch, eap->arg);
+
+ vim_regfree(regmatch.regprog);
+
+--- 6924,6941 ----
+ return;
+ }
+
++ #ifdef FEAT_MULTI_LANG
++ // Check for a specified language
++ lang = check_help_lang(eap->arg);
++ #endif
+ regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING);
+ regmatch.rm_ic = FALSE;
+ if (regmatch.regprog != NULL)
+ {
+! // create a new quickfix list
+ qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep));
+
+! hgr_search_in_rtp(qi, &regmatch, lang);
+
+ vim_regfree(regmatch.regprog);
+
+***************
+*** 6950,6956 ****
+ if (p_cpo == empty_option)
+ p_cpo = save_cpo;
+ else
+! /* Darn, some plugin changed the value. */
+ free_string_option(save_cpo);
+
+ qf_list_changed(qi, qi->qf_curlist);
+--- 6948,6954 ----
+ if (p_cpo == empty_option)
+ p_cpo = save_cpo;
+ else
+! // Darn, some plugin changed the value.
+ free_string_option(save_cpo);
+
+ qf_list_changed(qi, qi->qf_curlist);
+***************
+*** 6973,6980 ****
+
+ if (eap->cmdidx == CMD_lhelpgrep)
+ {
+! /* If the help window is not opened or if it already points to the
+! * correct location list, then free the new location list. */
+ if (!bt_help(curwin->w_buffer) || curwin->w_llist == qi)
+ {
+ if (new_qi)
+--- 6971,6978 ----
+
+ if (eap->cmdidx == CMD_lhelpgrep)
+ {
+! // If the help window is not opened or if it already points to the
+! // correct location list, then free the new location list.
+ if (!bt_help(curwin->w_buffer) || curwin->w_llist == qi)
+ {
+ if (new_qi)
+*** ../vim-8.1.0314/src/testdir/test_quickfix.vim 2018-08-15 22:29:46.977604162 +0200
+--- src/testdir/test_quickfix.vim 2018-08-21 21:44:49.058013219 +0200
+***************
+*** 3091,3096 ****
+--- 3091,3110 ----
+ call Xqftick_tests('l')
+ endfunc
+
++ " Test helpgrep with lang specifier
++ func Xtest_helpgrep_with_lang_specifier(cchar)
++ call s:setup_commands(a:cchar)
++ Xhelpgrep Vim@en
++ call assert_equal('help', &filetype)
++ call assert_notequal(0, g:Xgetlist({'nr' : '$'}).nr)
++ new | only
++ endfunc
++
++ func Test_helpgrep_with_lang_specifier()
++ call Xtest_helpgrep_with_lang_specifier('c')
++ call Xtest_helpgrep_with_lang_specifier('l')
++ endfunc
++
+ " The following test used to crash Vim.
+ " Open the location list window and close the regular window associated with
+ " the location list. When the garbage collection runs now, it incorrectly
+*** ../vim-8.1.0314/src/version.c 2018-08-21 21:09:02.598739663 +0200
+--- src/version.c 2018-08-21 21:50:24.460013769 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 315,
+ /**/
+
+--
+BLACK KNIGHT: None shall pass.
+ARTHUR: I have no quarrel with you, brave Sir knight, but I must cross
+ this bridge.
+BLACK KNIGHT: Then you shall die.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0316 b/data/vim/patches/8.1.0316
new file mode 100644
index 000000000..67c07b78f
--- /dev/null
+++ b/data/vim/patches/8.1.0316
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0316
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0316
+Problem: swapinfo() test fails on Travis.
+Solution: Handle a long host name. (Ozaki Kiichi, closes #3361)
+ Also make the version check flexible. (James McCoy)
+Files: src/testdir/test_swap.vim
+
+
+*** ../vim-8.1.0315/src/testdir/test_swap.vim 2018-08-21 21:09:02.598739663 +0200
+--- src/testdir/test_swap.vim 2018-08-22 11:25:49.275645594 +0200
+***************
+*** 105,113 ****
+ let fname = trim(execute('swapname'))
+ call assert_match('Xswapinfo', fname)
+ let info = swapinfo(fname)
+! call assert_match('8\.', info.version)
+ call assert_match('\w', info.user)
+! call assert_equal(hostname(), info.host)
+ call assert_match('Xswapinfo', info.fname)
+ call assert_match(0, info.dirty)
+ call assert_equal(getpid(), info.pid)
+--- 105,117 ----
+ let fname = trim(execute('swapname'))
+ call assert_match('Xswapinfo', fname)
+ let info = swapinfo(fname)
+!
+! let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
+! call assert_equal(ver, info.version)
+!
+ call assert_match('\w', info.user)
+! " host name is truncated to 39 bytes in the swap file
+! call assert_equal(hostname()[:38], info.host)
+ call assert_match('Xswapinfo', info.fname)
+ call assert_match(0, info.dirty)
+ call assert_equal(getpid(), info.pid)
+*** ../vim-8.1.0315/src/version.c 2018-08-21 21:58:09.528674683 +0200
+--- src/version.c 2018-08-22 11:23:44.476323657 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 316,
+ /**/
+
+--
+ARTHUR: What are you going to do. bleed on me?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0317 b/data/vim/patches/8.1.0317
new file mode 100644
index 000000000..ecbe65c5f
--- /dev/null
+++ b/data/vim/patches/8.1.0317
@@ -0,0 +1,59 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0317
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0317
+Problem: Cscope test fails when using shadow directory.
+Solution: Resolve symlink in Vim. (James McCoy, closes #3364)
+Files: src/testdir/test_cscope.vim
+
+
+*** ../vim-8.1.0316/src/testdir/test_cscope.vim 2018-07-15 17:36:28.825442123 +0200
+--- src/testdir/test_cscope.vim 2018-08-22 20:04:27.869744792 +0200
+***************
+*** 259,265 ****
+ " Test ":cs add {dir}" (add the {dir}/cscope.out database)
+ func Test_cscope_add_dir()
+ call mkdir('Xcscopedir', 'p')
+! call system('cscope -bk -fXcscopedir/cscope.out ../memfile_test.c')
+ cs add Xcscopedir
+ let a = execute('cscope show')
+ let lines = split(a, "\n", 1)
+--- 259,270 ----
+ " Test ":cs add {dir}" (add the {dir}/cscope.out database)
+ func Test_cscope_add_dir()
+ call mkdir('Xcscopedir', 'p')
+!
+! " Cscope doesn't handle symlinks, so this needs to be resolved in case a
+! " shadow directory is being used.
+! let memfile = resolve('../memfile_test.c')
+! call system('cscope -bk -fXcscopedir/cscope.out ' . memfile)
+!
+ cs add Xcscopedir
+ let a = execute('cscope show')
+ let lines = split(a, "\n", 1)
+*** ../vim-8.1.0316/src/version.c 2018-08-22 11:27:57.118946770 +0200
+--- src/version.c 2018-08-22 20:05:19.677430359 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 317,
+ /**/
+
+--
+Eye have a spelling checker, it came with my PC;
+It plainly marks four my revue mistakes I cannot sea.
+I've run this poem threw it, I'm sure your please to no,
+It's letter perfect in it's weigh, my checker tolled me sew!
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0318 b/data/vim/patches/8.1.0318
new file mode 100644
index 000000000..10ecffb35
--- /dev/null
+++ b/data/vim/patches/8.1.0318
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0318
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0318
+Problem: The getftype() test may fail for char devices if the file
+ disappeared in between the listing and the getftype() call.
+Solution: Ignore empty result. (Ozaki Kiichi, closes #3360)
+Files: src/testdir/test_stat.vim
+
+
+*** ../vim-8.1.0317/src/testdir/test_stat.vim 2018-08-09 22:08:53.017560100 +0200
+--- src/testdir/test_stat.vim 2018-08-22 20:14:37.597732518 +0200
+***************
+*** 141,157 ****
+ endif
+
+ for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
+! call assert_equal('cdev', getftype(cdevfile))
+ endfor
+
+ for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
+! call assert_equal('bdev', getftype(bdevfile))
+ endfor
+
+ " The /run/ directory typically contains socket files.
+ " If it does not, test won't fail but will not test socket files.
+ for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
+! call assert_equal('socket', getftype(socketfile))
+ endfor
+
+ " TODO: file type 'other' is not tested. How can we test it?
+--- 141,169 ----
+ endif
+
+ for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
+! let type = getftype(cdevfile)
+! " ignore empty result, can happen if the file disappeared
+! if type != ''
+! call assert_equal('cdev', type)
+! endif
+ endfor
+
+ for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
+! let type = getftype(bdevfile)
+! " ignore empty result, can happen if the file disappeared
+! if type != ''
+! call assert_equal('bdev', type)
+! endif
+ endfor
+
+ " The /run/ directory typically contains socket files.
+ " If it does not, test won't fail but will not test socket files.
+ for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
+! let type = getftype(socketfile)
+! " ignore empty result, can happen if the file disappeared
+! if type != ''
+! call assert_equal('socket', type)
+! endif
+ endfor
+
+ " TODO: file type 'other' is not tested. How can we test it?
+*** ../vim-8.1.0317/src/version.c 2018-08-22 20:06:22.829022787 +0200
+--- src/version.c 2018-08-22 20:11:52.166808526 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 318,
+ /**/
+
+--
+BLACK KNIGHT: The Black Knight always triumphs. Have at you!
+ ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright.
+BLACK KNIGHT: All right, we'll call it a draw.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0319 b/data/vim/patches/8.1.0319
new file mode 100644
index 000000000..15d08e909
--- /dev/null
+++ b/data/vim/patches/8.1.0319
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0319
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0319
+Problem: bzero() function prototype doesn't work for Android.
+Solution: Add an #ifdef. (Elliott Hughes, closes #3365)
+Files: src/osdef1.h.in
+
+
+*** ../vim-8.1.0318/src/osdef1.h.in 2016-12-01 17:08:35.000000000 +0100
+--- src/osdef1.h.in 2018-08-22 21:54:20.888804176 +0200
+***************
+*** 65,72 ****
+ # endif
+ # endif
+ #endif
+! /* used inside of FD_ZERO macro: */
+ extern void bzero(void *, size_t);
+ #ifdef HAVE_SETSID
+ extern pid_t setsid(void);
+ #endif
+--- 65,74 ----
+ # endif
+ # endif
+ #endif
+! #ifndef __BIONIC__ // Android's libc #defines bzero to memset.
+! // used inside of FD_ZERO macro
+ extern void bzero(void *, size_t);
++ #endif
+ #ifdef HAVE_SETSID
+ extern pid_t setsid(void);
+ #endif
+*** ../vim-8.1.0318/src/version.c 2018-08-22 20:16:11.985125882 +0200
+--- src/version.c 2018-08-22 21:56:23.076075393 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 319,
+ /**/
+
+--
+Westheimer's Discovery:
+ A couple of months in the laboratory can
+ frequently save a couple of hours in the library.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0320 b/data/vim/patches/8.1.0320
new file mode 100644
index 000000000..dc3181114
--- /dev/null
+++ b/data/vim/patches/8.1.0320
@@ -0,0 +1,141 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0320
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0320
+Problem: Too much 'incsearch' highlight for pattern matching everything.
+Solution: Add the skiplen to the command and remove the line range.
+ (Christian Brabandt) Check for empty pattern earlier.
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_09.dump
+
+
+*** ../vim-8.1.0319/src/ex_getln.c 2018-08-18 21:23:00.787474060 +0200
+--- src/ex_getln.c 2018-08-22 22:35:09.131882839 +0200
+***************
+*** 285,290 ****
+--- 285,291 ----
+ char_u *dummy;
+ exarg_T ea;
+ pos_T save_cursor;
++ int use_last_pat;
+
+ *skiplen = 0;
+ *patlen = ccline.cmdlen;
+***************
+*** 361,370 ****
+ delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+
+! if (end == p && *end != delim)
+ return FALSE;
+- // found a non-empty pattern or //
+
+ *skiplen = (int)(p - ccline.cmdbuff);
+ *patlen = (int)(end - p);
+
+--- 362,386 ----
+ delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++;
+ end = skip_regexp(p, delim, p_magic, NULL);
+
+! use_last_pat = end == p && *end == delim;
+!
+! if (end == p && !use_last_pat)
+ return FALSE;
+
++ // Don't do 'hlsearch' highlighting if the pattern matches everything.
++ if (!use_last_pat)
++ {
++ char c = *end;
++ int empty;
++
++ *end = NUL;
++ empty = empty_pattern(p);
++ *end = c;
++ if (empty)
++ return FALSE;
++ }
++
++ // found a non-empty pattern or //
+ *skiplen = (int)(p - ccline.cmdbuff);
+ *patlen = (int)(end - p);
+
+***************
+*** 556,572 ****
+ else
+ end_pos = curwin->w_cursor; // shutup gcc 4
+
+- // Disable 'hlsearch' highlighting if the pattern matches everything.
+- // Avoids a flash when typing "foo\|".
+- if (!use_last_pat)
+- {
+- next_char = ccline.cmdbuff[skiplen + patlen];
+- ccline.cmdbuff[skiplen + patlen] = NUL;
+- if (empty_pattern(ccline.cmdbuff))
+- set_no_hlsearch(TRUE);
+- ccline.cmdbuff[skiplen + patlen] = next_char;
+- }
+-
+ validate_cursor();
+ // May redraw the status line to show the cursor position.
+ if (p_ru && curwin->w_status_height > 0)
+--- 572,577 ----
+*** ../vim-8.1.0319/src/testdir/test_search.vim 2018-08-18 21:04:57.743864534 +0200
+--- src/testdir/test_search.vim 2018-08-22 22:41:42.689971619 +0200
+***************
+*** 913,918 ****
+--- 913,926 ----
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {})
+ call term_sendkeys(buf, "\<Esc>")
+
++ " Only \v handled as empty pattern, does not move cursor
++ call term_sendkeys(buf, '3G4G')
++ call term_sendkeys(buf, ":nohlsearch\<CR>")
++ call term_sendkeys(buf, ':6,7s/\v')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {})
++ call term_sendkeys(buf, "\<Esc>")
++
+ call StopVimInTerminal(buf)
+ call delete('Xis_subst_script')
+ endfunc
+*** ../vim-8.1.0319/src/testdir/dumps/Test_incsearch_substitute_09.dump 2018-08-22 23:02:14.943209354 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_09.dump 2018-08-22 22:41:52.269923211 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |3| @64
++ |f+8&&|o@1| |4| @64
++ |f+0&&|o@1| |5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |f|o@1| |9| @64
++ |f|o@1| |1|0| @63
++ |:|6|,|7|s|/|\|v> @61
+*** ../vim-8.1.0319/src/version.c 2018-08-22 21:56:53.399893884 +0200
+--- src/version.c 2018-08-22 23:02:25.679145625 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 320,
+ /**/
+
+--
+ A village. Sound of chanting of Latin canon, punctuated by short, sharp
+ cracks. It comes nearer. We see it is a line of MONKS ala SEVENTH SEAL
+ flagellation scene, chanting and banging themselves on the foreheads with
+ wooden boards.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0321 b/data/vim/patches/8.1.0321
new file mode 100644
index 000000000..daf15822d
--- /dev/null
+++ b/data/vim/patches/8.1.0321
@@ -0,0 +1,147 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0321
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0321 (after 8.1.0320)
+Problem: 'incsearch' regression: /\v highlights everything.
+Solution: Put back the empty_pattern() check.
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_search_01.dump,
+ src/testdir/dumps/Test_incsearch_search_02.dump
+
+
+*** ../vim-8.1.0320/src/ex_getln.c 2018-08-22 23:03:19.486827548 +0200
+--- src/ex_getln.c 2018-08-23 20:51:58.597337138 +0200
+***************
+*** 572,577 ****
+--- 572,588 ----
+ else
+ end_pos = curwin->w_cursor; // shutup gcc 4
+
++ // Disable 'hlsearch' highlighting if the pattern matches everything.
++ // Avoids a flash when typing "foo\|".
++ if (!use_last_pat)
++ {
++ next_char = ccline.cmdbuff[skiplen + patlen];
++ ccline.cmdbuff[skiplen + patlen] = NUL;
++ if (empty_pattern(ccline.cmdbuff))
++ set_no_hlsearch(TRUE);
++ ccline.cmdbuff[skiplen + patlen] = next_char;
++ }
++
+ validate_cursor();
+ // May redraw the status line to show the cursor position.
+ if (p_ru && curwin->w_status_height > 0)
+*** ../vim-8.1.0320/src/testdir/test_search.vim 2018-08-22 23:03:19.486827548 +0200
+--- src/testdir/test_search.vim 2018-08-23 20:51:10.061621201 +0200
+***************
+*** 813,818 ****
+--- 813,853 ----
+ call delete('Xscript')
+ endfunc
+
++ func Test_incsearch_search_dump()
++ if !exists('+incsearch')
++ return
++ endif
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ 'set incsearch hlsearch scrolloff=0',
++ \ 'for n in range(1, 8)',
++ \ ' call setline(n, "foo " . n)',
++ \ 'endfor',
++ \ '3',
++ \ ], 'Xis_search_script')
++ let buf = RunVimInTerminal('-S Xis_search_script', {'rows': 9, 'cols': 70})
++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
++ " the 'ambiwidth' check.
++ sleep 100m
++
++ " Need to send one key at a time to force a redraw.
++ call term_sendkeys(buf, '/fo')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_search_01', {})
++ call term_sendkeys(buf, "\<Esc>")
++ sleep 100m
++
++ call term_sendkeys(buf, '/\v')
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_incsearch_search_02', {})
++ call term_sendkeys(buf, "\<Esc>")
++
++ call StopVimInTerminal(buf)
++ call delete('Xis_search_script')
++ endfunc
++
+ func Test_incsearch_substitute()
+ if !exists('+incsearch')
+ return
+***************
+*** 926,932 ****
+ endfunc
+
+ " Similar to Test_incsearch_substitute_dump() for :sort
+! func Test_incsearch_ssort_dump()
+ if !exists('+incsearch')
+ return
+ endif
+--- 961,967 ----
+ endfunc
+
+ " Similar to Test_incsearch_substitute_dump() for :sort
+! func Test_incsearch_sort_dump()
+ if !exists('+incsearch')
+ return
+ endif
+*** ../vim-8.1.0320/src/testdir/dumps/Test_incsearch_search_01.dump 2018-08-23 20:53:38.528751838 +0200
+--- src/testdir/dumps/Test_incsearch_search_01.dump 2018-08-23 20:41:15.889079877 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffff4012|o|o+0&#ffffff0| |1| @64
++ |f+0&#ffff4012|o|o+0&#ffffff0| |2| @64
++ |f+0&#ffff4012|o|o+0&#ffffff0| |3| @64
++ |f+1&&|o|o+0&&| |4| @64
++ |f+0&#ffff4012|o|o+0&#ffffff0| |5| @64
++ |f+0&#ffff4012|o|o+0&#ffffff0| |6| @64
++ |f+0&#ffff4012|o|o+0&#ffffff0| |7| @64
++ |f+0&#ffff4012|o|o+0&#ffffff0| |8| @64
++ |/|f|o> @66
+*** ../vim-8.1.0320/src/testdir/dumps/Test_incsearch_search_02.dump 2018-08-23 20:53:38.536751791 +0200
+--- src/testdir/dumps/Test_incsearch_search_02.dump 2018-08-23 20:52:11.605260981 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |1| @64
++ |f|o@1| |2| @64
++ |f|o+1&&|o+0&&| |3| @64
++ |f|o@1| |4| @64
++ |f|o@1| |5| @64
++ |f|o@1| |6| @64
++ |f|o@1| |7| @64
++ |f|o@1| |8| @64
++ |/|\|v> @66
+*** ../vim-8.1.0320/src/version.c 2018-08-22 23:03:19.486827548 +0200
+--- src/version.c 2018-08-23 20:53:21.256853038 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 321,
+ /**/
+
+--
+This computer is so slow, it takes forever to execute and endless loop!
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0322 b/data/vim/patches/8.1.0322
new file mode 100644
index 000000000..3bed5bf49
--- /dev/null
+++ b/data/vim/patches/8.1.0322
@@ -0,0 +1,153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0322
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0322
+Problem: Test_copy_winopt() does not restore 'hidden'.
+Solution: Restore the option, fix indent. (Ozaki Kiichi, closes #3367)
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0321/src/testdir/test_options.vim 2018-08-21 18:50:11.153501902 +0200
+--- src/testdir/test_options.vim 2018-08-23 22:17:40.635048688 +0200
+***************
+*** 350,404 ****
+ endfunc
+
+ func Test_copy_winopt()
+! set hidden
+
+! " Test copy option from current buffer in window
+! split
+! enew
+! setlocal numberwidth=5
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(5,&numberwidth)
+! bw!
+! call assert_equal(4,&numberwidth)
+!
+! " Test copy value from window that used to be display the buffer
+! split
+! enew
+! setlocal numberwidth=6
+! bnext
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(6,&numberwidth)
+! bw!
+!
+! " Test that if buffer is current, don't use the stale cached value
+! " from the last time the buffer was displayed.
+! split
+! enew
+! setlocal numberwidth=7
+! bnext
+! bnext
+! setlocal numberwidth=8
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(8,&numberwidth)
+! bw!
+!
+! " Test value is not copied if window already has seen the buffer
+! enew
+! split
+! setlocal numberwidth=9
+! bnext
+! setlocal numberwidth=10
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(4,&numberwidth)
+! bw!
+ endfunc
+
+ func Test_shortmess_F()
+--- 350,406 ----
+ endfunc
+
+ func Test_copy_winopt()
+! set hidden
+
+! " Test copy option from current buffer in window
+! split
+! enew
+! setlocal numberwidth=5
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(5,&numberwidth)
+! bw!
+! call assert_equal(4,&numberwidth)
+!
+! " Test copy value from window that used to be display the buffer
+! split
+! enew
+! setlocal numberwidth=6
+! bnext
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(6,&numberwidth)
+! bw!
+!
+! " Test that if buffer is current, don't use the stale cached value
+! " from the last time the buffer was displayed.
+! split
+! enew
+! setlocal numberwidth=7
+! bnext
+! bnext
+! setlocal numberwidth=8
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(8,&numberwidth)
+! bw!
+!
+! " Test value is not copied if window already has seen the buffer
+! enew
+! split
+! setlocal numberwidth=9
+! bnext
+! setlocal numberwidth=10
+! wincmd w
+! call assert_equal(4,&numberwidth)
+! bnext
+! call assert_equal(4,&numberwidth)
+! bw!
+!
+! set hidden&
+ endfunc
+
+ func Test_shortmess_F()
+*** ../vim-8.1.0321/src/version.c 2018-08-23 20:55:23.328137497 +0200
+--- src/version.c 2018-08-23 22:19:27.038296744 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 322,
+ /**/
+
+--
+BEDEVERE: Why do you think she is a witch?
+SECOND VILLAGER: She turned me into a newt.
+BEDEVERE: A newt?
+SECOND VILLAGER: (After looking at himself for some time) I got better.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0323 b/data/vim/patches/8.1.0323
new file mode 100644
index 000000000..fb1e777b2
--- /dev/null
+++ b/data/vim/patches/8.1.0323
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0323
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0323
+Problem: Reverse order of VTP calls only needed the first time.
+Solution: Add a flag to remember the state. (Nobuhiro Takasaki, closes #3366)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0322/src/os_win32.c 2018-08-19 14:38:38.979859032 +0200
+--- src/os_win32.c 2018-08-23 22:35:59.155914101 +0200
+***************
+*** 4046,4051 ****
+--- 4046,4052 ----
+ CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */
+ SMALL_RECT srWindowRect; /* hold the new console size */
+ COORD coordScreen;
++ static int resized = FALSE;
+
+ #ifdef MCH_WRITE_DUMP
+ if (fdDump)
+***************
+*** 4091,4098 ****
+ coordScreen.X = xSize;
+ coordScreen.Y = ySize;
+
+! // In the new console call API in reverse order
+! if (!vtp_working)
+ {
+ ResizeWindow(hConsole, srWindowRect);
+ ResizeConBuf(hConsole, coordScreen);
+--- 4092,4099 ----
+ coordScreen.X = xSize;
+ coordScreen.Y = ySize;
+
+! // In the new console call API, only the first time in reverse order
+! if (!vtp_working || resized)
+ {
+ ResizeWindow(hConsole, srWindowRect);
+ ResizeConBuf(hConsole, coordScreen);
+***************
+*** 4101,4106 ****
+--- 4102,4108 ----
+ {
+ ResizeConBuf(hConsole, coordScreen);
+ ResizeWindow(hConsole, srWindowRect);
++ resized = TRUE;
+ }
+ }
+
+*** ../vim-8.1.0322/src/version.c 2018-08-23 22:20:31.449852029 +0200
+--- src/version.c 2018-08-23 22:37:35.715321239 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 323,
+ /**/
+
+--
+ALL: A witch! A witch!
+WITCH: It's a fair cop.
+ALL: Burn her! Burn her! Let's make her into a ladder.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0324 b/data/vim/patches/8.1.0324
new file mode 100644
index 000000000..2d704bba1
--- /dev/null
+++ b/data/vim/patches/8.1.0324
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0324
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0324
+Problem: Off-by-one error in cmdidx check. (Coverity)
+Solution: Use ">=" instead of ">".
+Files: src/ex_docmd.c
+
+
+*** ../vim-8.1.0323/src/ex_docmd.c 2018-08-21 17:49:50.993308900 +0200
+--- src/ex_docmd.c 2018-08-23 22:43:28.505170168 +0200
+***************
+*** 12554,12560 ****
+ int
+ is_loclist_cmd(int cmdidx)
+ {
+! if (cmdidx < 0 || cmdidx > CMD_SIZE)
+ return FALSE;
+ return cmdnames[cmdidx].cmd_name[0] == 'l';
+ }
+--- 12554,12560 ----
+ int
+ is_loclist_cmd(int cmdidx)
+ {
+! if (cmdidx < 0 || cmdidx >= CMD_SIZE)
+ return FALSE;
+ return cmdnames[cmdidx].cmd_name[0] == 'l';
+ }
+*** ../vim-8.1.0323/src/version.c 2018-08-23 22:38:27.915001621 +0200
+--- src/version.c 2018-08-23 22:51:09.762302937 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 324,
+ /**/
+
+--
+Never under any circumstances take a sleeping pill
+and a laxative on the same night.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0325 b/data/vim/patches/8.1.0325
new file mode 100644
index 000000000..a11a55338
--- /dev/null
+++ b/data/vim/patches/8.1.0325
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0325
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0325
+Problem: Strings in swap file may not be NUL terminated. (Coverity)
+Solution: Limit the length of the used string.
+Files: src/memline.c
+
+
+*** ../vim-8.1.0324/src/memline.c 2018-08-21 21:09:02.598739663 +0200
+--- src/memline.c 2018-08-23 22:59:10.070904878 +0200
+***************
+*** 2065,2074 ****
+ else
+ {
+ /* we have swap information */
+! dict_add_string(d, "version", vim_strsave(b0.b0_version));
+! dict_add_string(d, "user", vim_strsave(b0.b0_uname));
+! dict_add_string(d, "host", vim_strsave(b0.b0_hname));
+! dict_add_string(d, "fname", vim_strsave(b0.b0_fname));
+
+ dict_add_number(d, "pid", char_to_long(b0.b0_pid));
+ dict_add_number(d, "mtime", char_to_long(b0.b0_mtime));
+--- 2065,2077 ----
+ else
+ {
+ /* we have swap information */
+! dict_add_string(d, "version", vim_strnsave(b0.b0_version, 10));
+! dict_add_string(d, "user",
+! vim_strnsave(b0.b0_uname, B0_UNAME_SIZE));
+! dict_add_string(d, "host",
+! vim_strnsave(b0.b0_hname, B0_HNAME_SIZE));
+! dict_add_string(d, "fname",
+! vim_strnsave(b0.b0_fname, B0_FNAME_SIZE_ORG));
+
+ dict_add_number(d, "pid", char_to_long(b0.b0_pid));
+ dict_add_number(d, "mtime", char_to_long(b0.b0_mtime));
+*** ../vim-8.1.0324/src/version.c 2018-08-23 22:51:30.882144095 +0200
+--- src/version.c 2018-08-23 23:00:19.290441550 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 325,
+ /**/
+
+--
+If you had to identify, in one word, the reason why the
+human race has not achieved, and never will achieve, its
+full potential, that word would be "meetings."
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0326 b/data/vim/patches/8.1.0326
new file mode 100644
index 000000000..667bfaeaf
--- /dev/null
+++ b/data/vim/patches/8.1.0326
@@ -0,0 +1,101 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0326
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0326
+Problem: Screen dump does not consider NUL and space equal.
+Solution: Use temp variables instead of character from cell.
+Files: src/terminal.c, src/testdir/dumps/Test_syntax_c_01.dump
+
+
+*** ../vim-8.1.0325/src/terminal.c 2018-08-07 16:33:15.255728441 +0200
+--- src/terminal.c 2018-08-24 21:12:24.363925057 +0200
+***************
+*** 3939,3947 ****
+ c = (c == NUL) ? ' ' : c;
+ pc = (pc == NUL) ? ' ' : pc;
+ }
+! if (cell.chars[i] != prev_cell.chars[i])
+ same_chars = FALSE;
+! if (cell.chars[i] == NUL || prev_cell.chars[i] == NUL)
+ break;
+ }
+ same_attr = vtermAttr2hl(cell.attrs)
+--- 3939,3947 ----
+ c = (c == NUL) ? ' ' : c;
+ pc = (pc == NUL) ? ' ' : pc;
+ }
+! if (c != pc)
+ same_chars = FALSE;
+! if (c == NUL || pc == NUL)
+ break;
+ }
+ same_attr = vtermAttr2hl(cell.attrs)
+*** ../vim-8.1.0325/src/testdir/dumps/Test_syntax_c_01.dump 2018-02-25 21:33:46.000000000 +0100
+--- src/testdir/dumps/Test_syntax_c_01.dump 2018-08-24 21:19:49.004842497 +0200
+***************
+*** 1,20 ****
+ >/+0#0000e05#ffffff0|*| |c|o|m@1|e|n|t| |l|i|n|e| |a|t| |t|h|e| |t|o|p| |*|/| +0#0000000&@45
+! | @1|i+0#00e0003&|n|t| +0#0000000&@69
+ |m|a|i|n|(|i+0#00e0003&|n|t| +0#0000000&|a|r|g|c|,| |c+0#00e0003&|h|a|r| +0#0000000&|*@1|a|r|g|v|)|/+0#0000e05&@1| |a|n|o|t|h|e|r| |c|o|m@1|e|n|t| +0#0000000&@29
+ |{| @73
+ |#+0#e000e06&|i|f| |0| +0#0000000&@69
+ | +0#0000e05&@2|i|n|t| @2|n|o|t|_|u|s|e|d|;| +0#0000000&@56
+ |#+0#e000e06&|e|l|s|e| +0#0000000&@69
+! | @2|i+0#00e0003&|n|t| +0#0000000&@2|u|s|e|d|;| @60
+ |#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
+! | @2|p|r|i|n|t|f|(|"+0#e000002&|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| |C| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27
+! | @2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&|x|0|f@1|;+0#0000000&| @58
+ |}| @73
+! | @2|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&@60
+ |m|y|F|u|n|c|t|i|o|n|(|c+0#00e0003&|o|n|s|t| +0#0000000&|d+0#00e0003&|o|u|b|l|e| +0#0000000&|c|o|u|n|t|,| |s+0#00e0003&|t|r|u|c|t| +0#0000000&|n|o|t|h|i|n|g|,| |l+0#00e0003&|o|n|g| +0#0000000&|t|h|e|r|e|)| |{| @14
+! | @1|/+0#0000e05&@1| |1+0#e000002&|2|3|:+0#0000e05&| |n|o|t|h|i|n|g| |t|o| |r|e|a|d| |h|e|r|e| +0#0000000&@44
+! | @1|f+0#af5f00255&|o|r| +0#0000000&|(|i+0#00e0003&|n|t| +0#0000000&|i| |=| |0+0#e000002&|;+0#0000000&| |i| |<| |c|o|u|n|t|;| |+@1|i|)| |{| @39
+! | @3|b+0#af5f00255&|r|e|a|k|;+0#0000000&| @64
+! | @1|}| @71
+ |}| @73
+ |"|X|t|e|s|t|.|c|"| |1|9|L|,| |3|6|4|C| @37|1|,|1| @10|A|l@1|
+--- 1,20 ----
+ >/+0#0000e05#ffffff0|*| |c|o|m@1|e|n|t| |l|i|n|e| |a|t| |t|h|e| |t|o|p| |*|/| +0#0000000&@45
+! @2|i+0#00e0003&|n|t| +0#0000000&@69
+ |m|a|i|n|(|i+0#00e0003&|n|t| +0#0000000&|a|r|g|c|,| |c+0#00e0003&|h|a|r| +0#0000000&|*@1|a|r|g|v|)|/+0#0000e05&@1| |a|n|o|t|h|e|r| |c|o|m@1|e|n|t| +0#0000000&@29
+ |{| @73
+ |#+0#e000e06&|i|f| |0| +0#0000000&@69
+ | +0#0000e05&@2|i|n|t| @2|n|o|t|_|u|s|e|d|;| +0#0000000&@56
+ |#+0#e000e06&|e|l|s|e| +0#0000000&@69
+! @3|i+0#00e0003&|n|t| +0#0000000&@2|u|s|e|d|;| @60
+ |#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
+! @3|p|r|i|n|t|f|(|"+0#e000002&|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| |C| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27
+! @3|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&|x|0|f@1|;+0#0000000&| @58
+ |}| @73
+! @3|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&@60
+ |m|y|F|u|n|c|t|i|o|n|(|c+0#00e0003&|o|n|s|t| +0#0000000&|d+0#00e0003&|o|u|b|l|e| +0#0000000&|c|o|u|n|t|,| |s+0#00e0003&|t|r|u|c|t| +0#0000000&|n|o|t|h|i|n|g|,| |l+0#00e0003&|o|n|g| +0#0000000&|t|h|e|r|e|)| |{| @14
+! @2|/+0#0000e05&@1| |1+0#e000002&|2|3|:+0#0000e05&| |n|o|t|h|i|n|g| |t|o| |r|e|a|d| |h|e|r|e| +0#0000000&@44
+! @2|f+0#af5f00255&|o|r| +0#0000000&|(|i+0#00e0003&|n|t| +0#0000000&|i| |=| |0+0#e000002&|;+0#0000000&| |i| |<| |c|o|u|n|t|;| |+@1|i|)| |{| @39
+! @4|b+0#af5f00255&|r|e|a|k|;+0#0000000&| @64
+! @2|}| @71
+ |}| @73
+ |"|X|t|e|s|t|.|c|"| |1|9|L|,| |3|6|4|C| @37|1|,|1| @10|A|l@1|
+*** ../vim-8.1.0325/src/version.c 2018-08-23 23:01:22.898019607 +0200
+--- src/version.c 2018-08-24 21:24:36.840693934 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 326,
+ /**/
+
+--
+Your company is doomed if your primary product is overhead transparencies.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0327 b/data/vim/patches/8.1.0327
new file mode 100644
index 000000000..37cdd65d7
--- /dev/null
+++ b/data/vim/patches/8.1.0327
@@ -0,0 +1,136 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0327
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0327
+Problem: The "g CTRL-G" command isn't tested much.
+Solution: Add more tests. (Dominique Pelle, closes #3369)
+Files: src/testdir/test_normal.vim
+
+
+*** ../vim-8.1.0326/src/testdir/test_normal.vim 2018-05-17 15:43:28.000000000 +0200
+--- src/testdir/test_normal.vim 2018-08-24 21:56:40.272464401 +0200
+***************
+*** 1806,1816 ****
+ call assert_equal(15, col('.'))
+ call assert_equal('l', getreg(0))
+
+- " Test for g Ctrl-G
+- set ff=unix
+- let a=execute(":norm! g\<c-g>")
+- call assert_match('Col 15 of 43; Line 2 of 2; Word 2 of 2; Byte 16 of 45', a)
+-
+ " Test for gI
+ norm! gIfoo
+ call assert_equal(['', 'fooabcdefghijk lmno0123456789AMNOPQRSTUVWXYZ'], getline(1,'$'))
+--- 1806,1811 ----
+***************
+*** 1829,1834 ****
+--- 1824,1904 ----
+ bw!
+ endfunc
+
++ func! Test_g_ctrl_g()
++ new
++
++ let a = execute(":norm! g\<c-g>")
++ call assert_equal("\n--No lines in buffer--", a)
++
++ call setline(1, ['first line', 'second line'])
++
++ " Test g CTRL-g with dos, mac and unix file type.
++ norm! gojll
++ set ff=dos
++ let a = execute(":norm! g\<c-g>")
++ call assert_equal("\nCol 3 of 11; Line 2 of 2; Word 3 of 4; Byte 15 of 25", a)
++
++ set ff=mac
++ let a = execute(":norm! g\<c-g>")
++ call assert_equal("\nCol 3 of 11; Line 2 of 2; Word 3 of 4; Byte 14 of 23", a)
++
++ set ff=unix
++ let a = execute(":norm! g\<c-g>")
++ call assert_equal("\nCol 3 of 11; Line 2 of 2; Word 3 of 4; Byte 14 of 23", a)
++
++ " Test g CTRL-g in visual mode (v)
++ let a = execute(":norm! gojllvlg\<c-g>")
++ call assert_equal("\nSelected 1 of 2 Lines; 1 of 4 Words; 2 of 23 Bytes", a)
++
++ " Test g CTRL-g in visual mode (CTRL-V) with end col > start col
++ let a = execute(":norm! \<Esc>gojll\<C-V>kllg\<c-g>")
++ call assert_equal("\nSelected 3 Cols; 2 of 2 Lines; 2 of 4 Words; 6 of 23 Bytes", a)
++
++ " Test g_CTRL-g in visual mode (CTRL-V) with end col < start col
++ let a = execute(":norm! \<Esc>goll\<C-V>jhhg\<c-g>")
++ call assert_equal("\nSelected 3 Cols; 2 of 2 Lines; 2 of 4 Words; 6 of 23 Bytes", a)
++
++ " Test g CTRL-g in visual mode (CTRL-V) with end_vcol being MAXCOL
++ let a = execute(":norm! \<Esc>gojll\<C-V>k$g\<c-g>")
++ call assert_equal("\nSelected 2 of 2 Lines; 4 of 4 Words; 17 of 23 Bytes", a)
++
++ " There should be one byte less with noeol
++ set bin noeol
++ let a = execute(":norm! \<Esc>gog\<c-g>")
++ call assert_equal("\nCol 1 of 10; Line 1 of 2; Word 1 of 4; Char 1 of 23; Byte 1 of 22", a)
++ set bin & eol&
++
++ if has('multi_byte')
++ call setline(1, ['Français', '日本語'])
++
++ let a = execute(":norm! \<Esc>gojlg\<c-g>")
++ call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20", a)
++
++ let a = execute(":norm! \<Esc>gojvlg\<c-g>")
++ call assert_equal("\nSelected 1 of 2 Lines; 1 of 2 Words; 2 of 13 Chars; 6 of 20 Bytes", a)
++
++ let a = execute(":norm! \<Esc>goll\<c-v>jlg\<c-g>")
++ call assert_equal("\nSelected 4 Cols; 2 of 2 Lines; 2 of 2 Words; 6 of 13 Chars; 11 of 20 Bytes", a)
++
++ set fenc=utf8 bomb
++ let a = execute(":norm! \<Esc>gojlg\<c-g>")
++ call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+3 for BOM)", a)
++
++ set fenc=utf16 bomb
++ let a = execute(":norm! g\<c-g>")
++ call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+2 for BOM)", a)
++
++ set fenc=utf32 bomb
++ let a = execute(":norm! g\<c-g>")
++ call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+4 for BOM)", a)
++
++ set fenc& bomb&
++ endif
++
++ set ff&
++ bwipe!
++ endfunc
++
+ fun! Test_normal34_g_cmd3()
+ if !has("multi_byte")
+ return
+*** ../vim-8.1.0326/src/version.c 2018-08-24 21:30:24.818557489 +0200
+--- src/version.c 2018-08-24 21:57:46.239693505 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 327,
+ /**/
+
+--
+For large projects, Team Leaders use sophisticated project management software
+to keep track of who's doing what. The software collects the lies and guesses
+of the project team and organizes them in to instantly outdated charts that
+are too boring to look at closely. This is called "planning".
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0328 b/data/vim/patches/8.1.0328
new file mode 100644
index 000000000..c5e957ffc
--- /dev/null
+++ b/data/vim/patches/8.1.0328
@@ -0,0 +1,167 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0328
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0328
+Problem: inputlist() doesn't work with a timer. (Dominique Pelle)
+Solution: Don't redraw when cmdline_row is zero. (Hirohito Higashi,
+ closes #3239)
+Files: src/misc1.c, src/screen.c
+
+
+*** ../vim-8.1.0327/src/misc1.c 2018-08-21 15:12:10.839801647 +0200
+--- src/misc1.c 2018-08-26 21:18:04.834809910 +0200
+***************
+*** 3747,3764 ****
+ else
+ MSG_PUTS(_("Type number and <Enter> (empty cancels): "));
+
+! /* Set the state such that text can be selected/copied/pasted and we still
+! * get mouse events. */
+ save_cmdline_row = cmdline_row;
+ cmdline_row = 0;
+ save_State = State;
+! State = ASKMORE; /* prevents a screen update when using a timer */
+ #ifdef FEAT_MOUSE
+! /* May show different mouse shape. */
+ setmouse();
+ #endif
+
+-
+ i = get_number(TRUE, mouse_used);
+ if (KeyTyped)
+ {
+--- 3747,3764 ----
+ else
+ MSG_PUTS(_("Type number and <Enter> (empty cancels): "));
+
+! // Set the state such that text can be selected/copied/pasted and we still
+! // get mouse events. redraw_after_callback() will not redraw if cmdline_row
+! // is zero.
+ save_cmdline_row = cmdline_row;
+ cmdline_row = 0;
+ save_State = State;
+! State = CMDLINE;
+ #ifdef FEAT_MOUSE
+! // May show different mouse shape.
+ setmouse();
+ #endif
+
+ i = get_number(TRUE, mouse_used);
+ if (KeyTyped)
+ {
+***************
+*** 3773,3779 ****
+ cmdline_row = save_cmdline_row;
+ State = save_State;
+ #ifdef FEAT_MOUSE
+! /* May need to restore mouse shape. */
+ setmouse();
+ #endif
+
+--- 3773,3779 ----
+ cmdline_row = save_cmdline_row;
+ State = save_State;
+ #ifdef FEAT_MOUSE
+! // May need to restore mouse shape.
+ setmouse();
+ #endif
+
+*** ../vim-8.1.0327/src/screen.c 2018-08-11 16:40:39.068311966 +0200
+--- src/screen.c 2018-08-26 21:19:58.221890668 +0200
+***************
+*** 447,478 ****
+ ++redrawing_for_callback;
+
+ if (State == HITRETURN || State == ASKMORE)
+! ; /* do nothing */
+ else if (State & CMDLINE)
+ {
+! /* Redrawing only works when the screen didn't scroll. Don't clear
+! * wildmenu entries. */
+! if (msg_scrolled == 0
+ #ifdef FEAT_WILDMENU
+! && wild_menu_showing == 0
+ #endif
+! && call_update_screen)
+! update_screen(0);
+! /* Redraw in the same position, so that the user can continue
+! * editing the command. */
+! redrawcmdline_ex(FALSE);
+ }
+ else if (State & (NORMAL | INSERT | TERMINAL))
+ {
+! /* keep the command line if possible */
+ update_screen(VALID_NO_UPDATE);
+ setcursor();
+ }
+ cursor_on();
+ #ifdef FEAT_GUI
+ if (gui.in_use && !gui_mch_is_blink_off())
+! /* Don't update the cursor when it is blinking and off to avoid
+! * flicker. */
+ out_flush_cursor(FALSE, FALSE);
+ else
+ #endif
+--- 447,483 ----
+ ++redrawing_for_callback;
+
+ if (State == HITRETURN || State == ASKMORE)
+! ; // do nothing
+ else if (State & CMDLINE)
+ {
+! // Don't redraw when in prompt_for_number().
+! if (cmdline_row > 0)
+! {
+! // Redrawing only works when the screen didn't scroll. Don't clear
+! // wildmenu entries.
+! if (msg_scrolled == 0
+ #ifdef FEAT_WILDMENU
+! && wild_menu_showing == 0
+ #endif
+! && call_update_screen)
+! update_screen(0);
+!
+! // Redraw in the same position, so that the user can continue
+! // editing the command.
+! redrawcmdline_ex(FALSE);
+! }
+ }
+ else if (State & (NORMAL | INSERT | TERMINAL))
+ {
+! // keep the command line if possible
+ update_screen(VALID_NO_UPDATE);
+ setcursor();
+ }
+ cursor_on();
+ #ifdef FEAT_GUI
+ if (gui.in_use && !gui_mch_is_blink_off())
+! // Don't update the cursor when it is blinking and off to avoid
+! // flicker.
+ out_flush_cursor(FALSE, FALSE);
+ else
+ #endif
+*** ../vim-8.1.0327/src/version.c 2018-08-24 22:07:54.094796047 +0200
+--- src/version.c 2018-08-26 21:16:30.423572538 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 328,
+ /**/
+
+--
+The budget process was invented by an alien race of sadistic beings who
+resemble large cats.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0329 b/data/vim/patches/8.1.0329
new file mode 100644
index 000000000..6173c5701
--- /dev/null
+++ b/data/vim/patches/8.1.0329
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0329
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0329
+Problem: Using inputlist() during startup results in garbage. (Dominique
+ Pelle)
+Solution: Make sure the xterm tracing is stopped when disabling the mouse.
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0328/src/os_unix.c 2018-08-21 19:47:44.724053803 +0200
+--- src/os_unix.c 2018-08-27 23:22:31.668899230 +0200
+***************
+*** 3664,3669 ****
+--- 3664,3676 ----
+ # endif
+ int xterm_mouse_vers;
+
++ # if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
++ if (!on)
++ // Make sure not tracing mouse movements. Important when a button-down
++ // was received but no release yet.
++ stop_xterm_trace();
++ # endif
++
+ if (on == mouse_ison
+ # ifdef FEAT_BEVAL_TERM
+ && p_bevalterm == bevalterm_ison
+*** ../vim-8.1.0328/src/version.c 2018-08-26 21:23:03.400383307 +0200
+--- src/version.c 2018-08-27 23:21:45.437306003 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 329,
+ /**/
+
+--
+Engineers are always delighted to share wisdom, even in areas in which they
+have no experience whatsoever. Their logic provides them with inherent
+insight into any field of expertise. This can be a problem when dealing with
+the illogical people who believe that knowledge can only be derived through
+experience.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0330 b/data/vim/patches/8.1.0330
new file mode 100644
index 000000000..0c0b9ba2c
--- /dev/null
+++ b/data/vim/patches/8.1.0330
@@ -0,0 +1,219 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0330
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0330
+Problem: The qf_add_entries() function is too long.
+Solution: Split in two parts. (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0329/src/quickfix.c 2018-08-21 21:58:09.524674714 +0200
+--- src/quickfix.c 2018-08-28 22:05:22.995585778 +0200
+***************
+*** 5997,6002 ****
+--- 5997,6079 ----
+ }
+
+ /*
++ * Add a new quickfix entry to list at 'qf_idx' in the stack 'qi' from the
++ * items in the dict 'd'.
++ */
++ static int
++ qf_add_entry_from_dict(
++ qf_info_T *qi,
++ int qf_idx,
++ dict_T *d,
++ int first_entry)
++ {
++ static int did_bufnr_emsg;
++ char_u *filename, *module, *pattern, *text, *type;
++ int bufnum, valid, status, col, vcol, nr;
++ long lnum;
++
++ if (first_entry)
++ did_bufnr_emsg = FALSE;
++
++ filename = get_dict_string(d, (char_u *)"filename", TRUE);
++ module = get_dict_string(d, (char_u *)"module", TRUE);
++ bufnum = (int)get_dict_number(d, (char_u *)"bufnr");
++ lnum = (int)get_dict_number(d, (char_u *)"lnum");
++ col = (int)get_dict_number(d, (char_u *)"col");
++ vcol = (int)get_dict_number(d, (char_u *)"vcol");
++ nr = (int)get_dict_number(d, (char_u *)"nr");
++ type = get_dict_string(d, (char_u *)"type", TRUE);
++ pattern = get_dict_string(d, (char_u *)"pattern", TRUE);
++ text = get_dict_string(d, (char_u *)"text", TRUE);
++ if (text == NULL)
++ text = vim_strsave((char_u *)"");
++
++ valid = TRUE;
++ if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL))
++ valid = FALSE;
++
++ // Mark entries with non-existing buffer number as not valid. Give the
++ // error message only once.
++ if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
++ {
++ if (!did_bufnr_emsg)
++ {
++ did_bufnr_emsg = TRUE;
++ EMSGN(_("E92: Buffer %ld not found"), bufnum);
++ }
++ valid = FALSE;
++ bufnum = 0;
++ }
++
++ // If the 'valid' field is present it overrules the detected value.
++ if ((dict_find(d, (char_u *)"valid", -1)) != NULL)
++ valid = (int)get_dict_number(d, (char_u *)"valid");
++
++ status = qf_add_entry(qi,
++ qf_idx,
++ NULL, // dir
++ filename,
++ module,
++ bufnum,
++ text,
++ lnum,
++ col,
++ vcol, // vis_col
++ pattern, // search pattern
++ nr,
++ type == NULL ? NUL : *type,
++ valid);
++
++ vim_free(filename);
++ vim_free(module);
++ vim_free(pattern);
++ vim_free(text);
++ vim_free(type);
++
++ return status;
++ }
++
++ /*
+ * Add list of entries to quickfix/location list. Each list entry is
+ * a dictionary with item information.
+ */
+***************
+*** 6010,6024 ****
+ {
+ listitem_T *li;
+ dict_T *d;
+- char_u *filename, *module, *pattern, *text, *type;
+- int bufnum;
+- long lnum;
+- int col, nr;
+- int vcol;
+ qfline_T *old_last = NULL;
+- int valid, status;
+ int retval = OK;
+- int did_bufnr_emsg = FALSE;
+
+ if (action == ' ' || qf_idx == qi->qf_listcount)
+ {
+--- 6087,6094 ----
+***************
+*** 6044,6109 ****
+ if (d == NULL)
+ continue;
+
+! filename = get_dict_string(d, (char_u *)"filename", TRUE);
+! module = get_dict_string(d, (char_u *)"module", TRUE);
+! bufnum = (int)get_dict_number(d, (char_u *)"bufnr");
+! lnum = (int)get_dict_number(d, (char_u *)"lnum");
+! col = (int)get_dict_number(d, (char_u *)"col");
+! vcol = (int)get_dict_number(d, (char_u *)"vcol");
+! nr = (int)get_dict_number(d, (char_u *)"nr");
+! type = get_dict_string(d, (char_u *)"type", TRUE);
+! pattern = get_dict_string(d, (char_u *)"pattern", TRUE);
+! text = get_dict_string(d, (char_u *)"text", TRUE);
+! if (text == NULL)
+! text = vim_strsave((char_u *)"");
+!
+! valid = TRUE;
+! if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL))
+! valid = FALSE;
+!
+! /* Mark entries with non-existing buffer number as not valid. Give the
+! * error message only once. */
+! if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
+! {
+! if (!did_bufnr_emsg)
+! {
+! did_bufnr_emsg = TRUE;
+! EMSGN(_("E92: Buffer %ld not found"), bufnum);
+! }
+! valid = FALSE;
+! bufnum = 0;
+! }
+!
+! /* If the 'valid' field is present it overrules the detected value. */
+! if ((dict_find(d, (char_u *)"valid", -1)) != NULL)
+! valid = (int)get_dict_number(d, (char_u *)"valid");
+!
+! status = qf_add_entry(qi,
+! qf_idx,
+! NULL, /* dir */
+! filename,
+! module,
+! bufnum,
+! text,
+! lnum,
+! col,
+! vcol, /* vis_col */
+! pattern, /* search pattern */
+! nr,
+! type == NULL ? NUL : *type,
+! valid);
+!
+! vim_free(filename);
+! vim_free(module);
+! vim_free(pattern);
+! vim_free(text);
+! vim_free(type);
+!
+! if (status == FAIL)
+! {
+! retval = FAIL;
+ break;
+- }
+ }
+
+ if (qi->qf_lists[qf_idx].qf_index == 0)
+--- 6114,6122 ----
+ if (d == NULL)
+ continue;
+
+! retval = qf_add_entry_from_dict(qi, qf_idx, d, li == list->lv_first);
+! if (retval == FAIL)
+ break;
+ }
+
+ if (qi->qf_lists[qf_idx].qf_index == 0)
+*** ../vim-8.1.0329/src/version.c 2018-08-27 23:24:13.064009239 +0200
+--- src/version.c 2018-08-28 22:06:20.577141281 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 330,
+ /**/
+
+--
+An alien life briefly visits earth. Just before departing it leaves a
+message in the dust on the back of a white van. The world is shocked
+and wants to know what it means. After months of studies the worlds
+best linguistic scientists are able to decipher the message: "Wash me!".
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0331 b/data/vim/patches/8.1.0331
new file mode 100644
index 000000000..ef2610ccb
--- /dev/null
+++ b/data/vim/patches/8.1.0331
@@ -0,0 +1,126 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0331
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0331
+Problem: Insufficient test coverage for :mkview and :loadview.
+Solution: Add tests. (Dominique Pelle, closes #3385)
+Files: src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0330/src/testdir/test_mksession.vim 2018-07-04 22:44:05.273544402 +0200
+--- src/testdir/test_mksession.vim 2018-08-28 22:17:22.286410573 +0200
+***************
+*** 311,315 ****
+--- 311,396 ----
+
+ endif " has('terminal')
+
++ " Test :mkview with a file argument.
++ func Test_mkview_file()
++ " Create a view with line number and a fold.
++ help :mkview
++ set number
++ norm! V}zf
++ let pos = getpos('.')
++ let linefoldclosed1 = foldclosed('.')
++ mkview! Xview
++ set nonumber
++ norm! zrj
++ " We can close the help window, as mkview with a file name should
++ " generate a command to edit the file.
++ helpclose
++
++ source Xview
++ call assert_equal(1, &number)
++ call assert_match('\*:mkview\*$', getline('.'))
++ call assert_equal(pos, getpos('.'))
++ call assert_equal(linefoldclosed1, foldclosed('.'))
++
++ " Creating a view again with the same file name should fail (file
++ " already exists). But with a !, the previous view should be
++ " overwritten without error.
++ help :loadview
++ call assert_fails('mkview Xview', 'E189:')
++ call assert_match('\*:loadview\*$', getline('.'))
++ mkview! Xview
++ call assert_match('\*:loadview\*$', getline('.'))
++
++ call delete('Xview')
++ bwipe
++ endfunc
++
++ " Test :mkview and :loadview with a custom 'viewdir'.
++ func Test_mkview_loadview_with_viewdir()
++ set viewdir=Xviewdir
++
++ help :mkview
++ set number
++ norm! V}zf
++ let pos = getpos('.')
++ let linefoldclosed1 = foldclosed('.')
++ mkview 1
++ set nonumber
++ norm! zrj
++
++ loadview 1
++
++ " The directory Xviewdir/ should have been created and the view
++ " should be stored in that directory.
++ call assert_equal('Xviewdir/' .
++ \ substitute(
++ \ substitute(
++ \ expand('%:p'), '/', '=+', 'g'), ':', '=-', 'g') . '=1.vim',
++ \ glob('Xviewdir/*'))
++ call assert_equal(1, &number)
++ call assert_match('\*:mkview\*$', getline('.'))
++ call assert_equal(pos, getpos('.'))
++ call assert_equal(linefoldclosed1, foldclosed('.'))
++
++ call delete('Xviewdir', 'rf')
++ set viewdir&
++ helpclose
++ endfunc
++
++ func Test_mkview_no_file_name()
++ new
++ " :mkview or :mkview {nr} should fail in a unnamed buffer.
++ call assert_fails('mkview', 'E32:')
++ call assert_fails('mkview 1', 'E32:')
++
++ " :mkview {file} should succeed in a unnamed buffer.
++ mkview Xview
++ help
++ source Xview
++ call assert_equal('', bufname('%'))
++
++ call delete('Xview')
++ %bwipe
++ endfunc
+
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0330/src/version.c 2018-08-28 22:07:38.574120540 +0200
+--- src/version.c 2018-08-28 22:18:55.432595716 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 331,
+ /**/
+
+--
+For society, it's probably a good thing that engineers value function over
+appearance. For example, you wouldn't want engineers to build nuclear power
+plants that only _look_ like they would keep all the radiation inside.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0332 b/data/vim/patches/8.1.0332
new file mode 100644
index 000000000..d3aced072
--- /dev/null
+++ b/data/vim/patches/8.1.0332
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0332
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0332
+Problem: Get Gdk-Critical error on first balloon show.
+Solution: Get screen geometry using the draw area widget. (Davit Samvelyan,
+ closes #3386)
+Files: src/gui_beval.c
+
+
+*** ../vim-8.1.0331/src/gui_beval.c 2018-08-19 22:58:39.775568167 +0200
+--- src/gui_beval.c 2018-08-28 23:08:03.890441876 +0200
+***************
+*** 958,964 ****
+ screen = gtk_widget_get_screen(beval->target);
+ gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
+ # endif
+! gui_gtk_get_screen_geom_of_win(beval->balloonShell,
+ &screen_x, &screen_y, &screen_w, &screen_h);
+ # if !GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_ensure_style(beval->balloonShell);
+--- 958,964 ----
+ screen = gtk_widget_get_screen(beval->target);
+ gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
+ # endif
+! gui_gtk_get_screen_geom_of_win(beval->target,
+ &screen_x, &screen_y, &screen_w, &screen_h);
+ # if !GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_ensure_style(beval->balloonShell);
+*** ../vim-8.1.0331/src/version.c 2018-08-28 22:19:27.739993071 +0200
+--- src/version.c 2018-08-28 23:07:48.122609624 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 332,
+ /**/
+
+--
+Engineers understand that their appearance only bothers other people and
+therefore it is not worth optimizing.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0333 b/data/vim/patches/8.1.0333
new file mode 100644
index 000000000..f4179ce59
--- /dev/null
+++ b/data/vim/patches/8.1.0333
@@ -0,0 +1,133 @@
+diff --git src/ex_docmd.c src/ex_docmd.c
+index d4cf6a2c0..c8a1c3f23 100644
+--- src/ex_docmd.c
++++ src/ex_docmd.c
+@@ -11706,6 +11706,18 @@ ses_do_win(win_T *wp)
+ return TRUE;
+ }
+
++ static int
++put_view_curpos(FILE *fd, win_T *wp, char *spaces)
++{
++ int r;
++
++ if (wp->w_curswant == MAXCOL)
++ r = fprintf(fd, "%snormal! $", spaces);
++ else
++ r = fprintf(fd, "%snormal! 0%d|", spaces, wp->w_virtcol + 1);
++ return r < 0 || put_eol(fd) == FAIL ? FALSE : OK;
++}
++
+ /*
+ * Write commands to "fd" to restore the view of a window.
+ * Caller must make sure 'scrolloff' is zero.
+@@ -11897,17 +11909,12 @@ put_view(
+ (long)wp->w_virtcol + 1) < 0
+ || put_eol(fd) == FAIL
+ || put_line(fd, "else") == FAIL
+- || fprintf(fd, " normal! 0%d|", wp->w_virtcol + 1) < 0
+- || put_eol(fd) == FAIL
++ || put_view_curpos(fd, wp, " ") == FAIL
+ || put_line(fd, "endif") == FAIL)
+ return FAIL;
+ }
+- else
+- {
+- if (fprintf(fd, "normal! 0%d|", wp->w_virtcol + 1) < 0
+- || put_eol(fd) == FAIL)
+- return FAIL;
+- }
++ else if (put_view_curpos(fd, wp, "") == FAIL)
++ return FAIL;
+ }
+ }
+
+diff --git src/testdir/test_mksession.vim src/testdir/test_mksession.vim
+index c0b82ffa8..ed8b10fa0 100644
+--- src/testdir/test_mksession.vim
++++ src/testdir/test_mksession.vim
+@@ -22,7 +22,8 @@ func Test_mksession()
+ \ 'two tabs in one line',
+ \ 'one ä multibyteCharacter',
+ \ 'aä Ä two multiByte characters',
+- \ 'Aäöü three mulTibyte characters'
++ \ 'Aäöü three mulTibyte characters',
++ \ 'short line',
+ \ ])
+ let tmpfile = 'Xtemp'
+ exec 'w! ' . tmpfile
+@@ -44,6 +45,8 @@ func Test_mksession()
+ norm! j16|
+ split
+ norm! j16|
++ split
++ norm! j$
+ wincmd l
+
+ set nowrap
+@@ -66,7 +69,7 @@ func Test_mksession()
+ split
+ call wincol()
+ mksession! Xtest_mks.out
+- let li = filter(readfile('Xtest_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
++ let li = filter(readfile('Xtest_mks.out'), 'v:val =~# "\\(^ *normal! [0$]\\|^ *exe ''normal!\\)"')
+ let expected = [
+ \ 'normal! 016|',
+ \ 'normal! 016|',
+@@ -76,6 +79,7 @@ func Test_mksession()
+ \ 'normal! 016|',
+ \ 'normal! 016|',
+ \ 'normal! 016|',
++ \ 'normal! $',
+ \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+ \ " normal! 016|",
+ \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
+@@ -317,7 +321,7 @@ func Test_mkview_file()
+ help :mkview
+ set number
+ norm! V}zf
+- let pos = getpos('.')
++ let pos = getcurpos()
+ let linefoldclosed1 = foldclosed('.')
+ mkview! Xview
+ set nonumber
+@@ -329,7 +333,7 @@ func Test_mkview_file()
+ source Xview
+ call assert_equal(1, &number)
+ call assert_match('\*:mkview\*$', getline('.'))
+- call assert_equal(pos, getpos('.'))
++ call assert_equal(pos, getcurpos())
+ call assert_equal(linefoldclosed1, foldclosed('.'))
+
+ " Creating a view again with the same file name should fail (file
+@@ -352,7 +356,7 @@ func Test_mkview_loadview_with_viewdir()
+ help :mkview
+ set number
+ norm! V}zf
+- let pos = getpos('.')
++ let pos = getcurpos()
+ let linefoldclosed1 = foldclosed('.')
+ mkview 1
+ set nonumber
+@@ -369,7 +373,7 @@ func Test_mkview_loadview_with_viewdir()
+ \ glob('Xviewdir/*'))
+ call assert_equal(1, &number)
+ call assert_match('\*:mkview\*$', getline('.'))
+- call assert_equal(pos, getpos('.'))
++ call assert_equal(pos, getcurpos())
+ call assert_equal(linefoldclosed1, foldclosed('.'))
+
+ call delete('Xviewdir', 'rf')
+diff --git src/version.c src/version.c
+index 243e213d2..c2f64d37a 100644
+--- src/version.c
++++ src/version.c
+@@ -795,6 +795,8 @@ static char *(features[]) =
+ static int included_patches[] =
+ { /* Add new patch number below this line */
+ /**/
++ 333,
++/**/
+ 332,
+ /**/
+ 331,
diff --git a/data/vim/patches/8.1.0334 b/data/vim/patches/8.1.0334
new file mode 100644
index 000000000..71c455c4e
--- /dev/null
+++ b/data/vim/patches/8.1.0334
@@ -0,0 +1,118 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0334
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0334
+Problem: 'autowrite' takes effect when buffer is not to be written.
+Solution: Don't write buffers that are not supposed to be written. (Even Q
+ Jones, closes #3391) Add tests for 'autowrite'.
+Files: src/ex_cmds2.c, src/testdir/test_writefile.vim
+
+
+*** ../vim-8.1.0333/src/ex_cmds2.c 2018-07-08 17:18:58.416462371 +0200
+--- src/ex_cmds2.c 2018-08-30 12:54:53.366211602 +0200
+***************
+*** 2041,2047 ****
+ }
+
+ /*
+! * flush all buffers, except the ones that are readonly
+ */
+ void
+ autowrite_all(void)
+--- 2041,2047 ----
+ }
+
+ /*
+! * Flush all buffers, except the ones that are readonly or are never written.
+ */
+ void
+ autowrite_all(void)
+***************
+*** 2051,2057 ****
+ if (!(p_aw || p_awa) || !p_write)
+ return;
+ FOR_ALL_BUFFERS(buf)
+! if (bufIsChanged(buf) && !buf->b_p_ro)
+ {
+ bufref_T bufref;
+
+--- 2051,2057 ----
+ if (!(p_aw || p_awa) || !p_write)
+ return;
+ FOR_ALL_BUFFERS(buf)
+! if (bufIsChanged(buf) && !buf->b_p_ro && !bt_dontwrite(buf))
+ {
+ bufref_T bufref;
+
+*** ../vim-8.1.0333/src/testdir/test_writefile.vim 2018-04-21 20:10:32.000000000 +0200
+--- src/testdir/test_writefile.vim 2018-08-30 13:03:35.924399170 +0200
+***************
+*** 112,114 ****
+--- 112,152 ----
+ throw 'Skipped: /dev/stdout is not writable'
+ endif
+ endfunc
++
++ func Test_writefile_autowrite()
++ set autowrite
++ new
++ next Xa Xb Xc
++ call setline(1, 'aaa')
++ next
++ call assert_equal(['aaa'], readfile('Xa'))
++ call setline(1, 'bbb')
++ call assert_fails('edit XX')
++ call assert_false(filereadable('Xb'))
++
++ set autowriteall
++ edit XX
++ call assert_equal(['bbb'], readfile('Xb'))
++
++ bwipe!
++ call delete('Xa')
++ call delete('Xb')
++ set noautowrite
++ endfunc
++
++ func Test_writefile_autowrite_nowrite()
++ set autowrite
++ new
++ next Xa Xb Xc
++ set buftype=nowrite
++ call setline(1, 'aaa')
++ let buf = bufnr('%')
++ " buffer contents silently lost
++ edit XX
++ call assert_false(filereadable('Xa'))
++ rewind
++ call assert_equal('', getline(1))
++
++ bwipe!
++ set noautowrite
++ endfunc
+*** ../vim-8.1.0333/src/version.c 2018-08-29 21:42:39.016365007 +0200
+--- src/version.c 2018-08-30 12:50:09.857472529 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 334,
+ /**/
+
+--
+I learned the customs and mannerisms of engineers by observing them, much the
+way Jane Goodall learned about the great apes, but without the hassle of
+grooming.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0335 b/data/vim/patches/8.1.0335
new file mode 100644
index 000000000..341e1c7bf
--- /dev/null
+++ b/data/vim/patches/8.1.0335
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0335
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0335
+Problem: mkview test fails on CI.
+Solution: Attempt to force recomputing curswant after folding.
+Files: src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0334/src/testdir/test_mksession.vim 2018-08-29 21:42:39.016365007 +0200
+--- src/testdir/test_mksession.vim 2018-08-30 14:03:35.770304367 +0200
+***************
+*** 320,326 ****
+ " Create a view with line number and a fold.
+ help :mkview
+ set number
+! norm! V}zf
+ let pos = getcurpos()
+ let linefoldclosed1 = foldclosed('.')
+ mkview! Xview
+--- 320,326 ----
+ " Create a view with line number and a fold.
+ help :mkview
+ set number
+! norm! V}zf0
+ let pos = getcurpos()
+ let linefoldclosed1 = foldclosed('.')
+ mkview! Xview
+*** ../vim-8.1.0334/src/version.c 2018-08-30 13:07:12.026033864 +0200
+--- src/version.c 2018-08-30 13:54:25.107638207 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 335,
+ /**/
+
+--
+If someone questions your market projections, simply point out that your
+target market is "People who are nuts" and "People who will buy any damn
+thing". Nobody is going to tell you there aren't enough of those people
+to go around.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0336 b/data/vim/patches/8.1.0336
new file mode 100644
index 000000000..47b905758
--- /dev/null
+++ b/data/vim/patches/8.1.0336
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0336
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0336
+Problem: mkview test still fails on CI.
+Solution: Ignore curswant, don't see another solution.
+Files: src/testdir/test_mksession.vim
+
+
+*** ../vim-8.1.0335/src/testdir/test_mksession.vim 2018-08-30 14:04:22.105836549 +0200
+--- src/testdir/test_mksession.vim 2018-08-30 14:14:25.455621441 +0200
+***************
+*** 321,327 ****
+ help :mkview
+ set number
+ norm! V}zf0
+! let pos = getcurpos()
+ let linefoldclosed1 = foldclosed('.')
+ mkview! Xview
+ set nonumber
+--- 321,327 ----
+ help :mkview
+ set number
+ norm! V}zf0
+! let pos = getpos('.')
+ let linefoldclosed1 = foldclosed('.')
+ mkview! Xview
+ set nonumber
+***************
+*** 333,339 ****
+ source Xview
+ call assert_equal(1, &number)
+ call assert_match('\*:mkview\*$', getline('.'))
+! call assert_equal(pos, getcurpos())
+ call assert_equal(linefoldclosed1, foldclosed('.'))
+
+ " Creating a view again with the same file name should fail (file
+--- 333,339 ----
+ source Xview
+ call assert_equal(1, &number)
+ call assert_match('\*:mkview\*$', getline('.'))
+! call assert_equal(pos, getpos('.'))
+ call assert_equal(linefoldclosed1, foldclosed('.'))
+
+ " Creating a view again with the same file name should fail (file
+***************
+*** 356,362 ****
+ help :mkview
+ set number
+ norm! V}zf
+! let pos = getcurpos()
+ let linefoldclosed1 = foldclosed('.')
+ mkview 1
+ set nonumber
+--- 356,362 ----
+ help :mkview
+ set number
+ norm! V}zf
+! let pos = getpos('.')
+ let linefoldclosed1 = foldclosed('.')
+ mkview 1
+ set nonumber
+***************
+*** 373,379 ****
+ \ glob('Xviewdir/*'))
+ call assert_equal(1, &number)
+ call assert_match('\*:mkview\*$', getline('.'))
+! call assert_equal(pos, getcurpos())
+ call assert_equal(linefoldclosed1, foldclosed('.'))
+
+ call delete('Xviewdir', 'rf')
+--- 373,379 ----
+ \ glob('Xviewdir/*'))
+ call assert_equal(1, &number)
+ call assert_match('\*:mkview\*$', getline('.'))
+! call assert_equal(pos, getpos('.'))
+ call assert_equal(linefoldclosed1, foldclosed('.'))
+
+ call delete('Xviewdir', 'rf')
+*** ../vim-8.1.0335/src/version.c 2018-08-30 14:04:22.105836549 +0200
+--- src/version.c 2018-08-30 14:13:10.464402485 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 336,
+ /**/
+
+--
+A consultant is a person who takes your money and annoys your employees while
+tirelessly searching for the best way to extend the consulting contract.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0337 b/data/vim/patches/8.1.0337
new file mode 100644
index 000000000..c816ba6ee
--- /dev/null
+++ b/data/vim/patches/8.1.0337
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0337
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0337
+Problem: :file fails in quickfix command.
+Solution: Allow :file without argument when curbuf_lock is set. (Jason
+ Franklin)
+Files: src/ex_docmd.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0336/src/ex_docmd.c 2018-08-29 21:42:39.016365007 +0200
+--- src/ex_docmd.c 2018-08-30 15:42:47.756074140 +0200
+***************
+*** 2039,2050 ****
+ errormsg = (char_u *)_(get_text_locked_msg());
+ goto doend;
+ }
+ /* Disallow editing another buffer when "curbuf_lock" is set.
+! * Do allow ":edit" (check for argument later).
+! * Do allow ":checktime" (it's postponed). */
+ if (!(ea.argt & CMDWIN)
+- && ea.cmdidx != CMD_edit
+ && ea.cmdidx != CMD_checktime
+ && !IS_USER_CMDIDX(ea.cmdidx)
+ && curbuf_locked())
+ goto doend;
+--- 2039,2053 ----
+ errormsg = (char_u *)_(get_text_locked_msg());
+ goto doend;
+ }
++
+ /* Disallow editing another buffer when "curbuf_lock" is set.
+! * Do allow ":checktime" (it is postponed).
+! * Do allow ":edit" (check for an argument later).
+! * Do allow ":file" with no arguments (check for an argument later). */
+ if (!(ea.argt & CMDWIN)
+ && ea.cmdidx != CMD_checktime
++ && ea.cmdidx != CMD_edit
++ && ea.cmdidx != CMD_file
+ && !IS_USER_CMDIDX(ea.cmdidx)
+ && curbuf_locked())
+ goto doend;
+***************
+*** 2130,2135 ****
+--- 2133,2142 ----
+ else
+ ea.arg = skipwhite(p);
+
++ // ":file" cannot be run with an argument when "curbuf_lock" is set
++ if (ea.cmdidx == CMD_file && *ea.arg != NUL && curbuf_locked())
++ goto doend;
++
+ /*
+ * Check for "++opt=val" argument.
+ * Must be first, allow ":w ++enc=utf8 !cmd"
+*** ../vim-8.1.0336/src/testdir/test_quickfix.vim 2018-08-21 21:58:09.528674683 +0200
+--- src/testdir/test_quickfix.vim 2018-08-30 15:39:06.810888474 +0200
+***************
+*** 2485,2490 ****
+--- 2485,2519 ----
+ call test_override('starting', 0)
+ endfunc
+
++ " Check that ":file" without an argument is possible even when "curbuf_lock"
++ " is set.
++ func Test_file_from_copen()
++ " Works without argument.
++ augroup QF_Test
++ au!
++ au FileType qf file
++ augroup END
++ copen
++
++ augroup QF_Test
++ au!
++ augroup END
++ cclose
++
++ " Fails with argument.
++ augroup QF_Test
++ au!
++ au FileType qf call assert_fails(':file foo', 'E788')
++ augroup END
++ copen
++ augroup QF_Test
++ au!
++ augroup END
++ cclose
++
++ augroup! QF_Test
++ endfunction
++
+ func Test_resize_from_copen()
+ augroup QF_Test
+ au!
+*** ../vim-8.1.0336/src/version.c 2018-08-30 14:15:56.858667449 +0200
+--- src/version.c 2018-08-30 15:40:27.861841127 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 337,
+ /**/
+
+--
+The process for understanding customers primarily involves sitting around with
+other marketing people and talking about what you would to if you were dumb
+enough to be a customer.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0338 b/data/vim/patches/8.1.0338
new file mode 100644
index 000000000..b8de0abfa
--- /dev/null
+++ b/data/vim/patches/8.1.0338
@@ -0,0 +1,177 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0338
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0338
+Problem: MS-Windows: VTP doesn't work properly with Powershell.
+Solution: Adjust the color index. (Nobuhiro Takasaki, closes #3347)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0337/src/os_win32.c 2018-08-23 22:38:27.915001621 +0200
+--- src/os_win32.c 2018-08-30 17:45:38.582500357 +0200
+***************
+*** 213,218 ****
+--- 213,226 ----
+ static guicolor_T save_console_bg_rgb;
+ static guicolor_T save_console_fg_rgb;
+
++ static int g_color_index_bg = 0;
++ static int g_color_index_fg = 7;
++
++ # ifdef FEAT_TERMGUICOLORS
++ static int default_console_color_bg = 0x000000; // black
++ static int default_console_color_fg = 0xc0c0c0; // white
++ # endif
++
+ # ifdef FEAT_TERMGUICOLORS
+ # define USE_VTP (vtp_working && is_term_win32() && (p_tgc || (!p_tgc && t_colors >= 256)))
+ # else
+***************
+*** 2628,2633 ****
+--- 2636,2645 ----
+ if (cterm_normal_bg_color == 0)
+ cterm_normal_bg_color = ((g_attrCurrent >> 4) & 0xf) + 1;
+
++ // Fg and Bg color index nunmber at startup
++ g_color_index_fg = g_attrDefault & 0xf;
++ g_color_index_bg = (g_attrDefault >> 4) & 0xf;
++
+ /* set termcap codes to current text attributes */
+ update_tcap(g_attrCurrent);
+
+***************
+*** 7664,7669 ****
+--- 7676,7684 ----
+ DWORD ver, mode;
+ HMODULE hKerneldll;
+ DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi;
++ # ifdef FEAT_TERMGUICOLORS
++ COLORREF fg, bg;
++ # endif
+
+ ver = get_build_number();
+ vtp_working = (ver >= VTP_FIRST_SUPPORT_BUILD) ? 1 : 0;
+***************
+*** 7690,7697 ****
+ csbi.cbSize = sizeof(csbi);
+ if (has_csbiex)
+ pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi);
+! save_console_bg_rgb = (guicolor_T)csbi.ColorTable[0];
+! save_console_fg_rgb = (guicolor_T)csbi.ColorTable[7];
+
+ set_console_color_rgb();
+ }
+--- 7705,7721 ----
+ csbi.cbSize = sizeof(csbi);
+ if (has_csbiex)
+ pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi);
+! save_console_bg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_bg];
+! save_console_fg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_fg];
+!
+! # ifdef FEAT_TERMGUICOLORS
+! bg = (COLORREF)csbi.ColorTable[g_color_index_bg];
+! fg = (COLORREF)csbi.ColorTable[g_color_index_fg];
+! bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg);
+! fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg);
+! default_console_color_bg = bg;
+! default_console_color_fg = fg;
+! #endif
+
+ set_console_color_rgb();
+ }
+***************
+*** 7788,7801 ****
+ ctermfg = -1;
+ if (id > 0)
+ syn_id2cterm_bg(id, &ctermfg, &ctermbg);
+! fg = ctermfg != -1 ? ctermtoxterm(ctermfg) : 0xc0c0c0; /* white */
+ }
+ if (bg == INVALCOLOR)
+ {
+ ctermbg = -1;
+ if (id > 0)
+ syn_id2cterm_bg(id, &ctermfg, &ctermbg);
+! bg = ctermbg != -1 ? ctermtoxterm(ctermbg) : 0x000000; /* black */
+ }
+ fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg);
+ bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg);
+--- 7812,7827 ----
+ ctermfg = -1;
+ if (id > 0)
+ syn_id2cterm_bg(id, &ctermfg, &ctermbg);
+! fg = ctermfg != -1 ? ctermtoxterm(ctermfg) : default_console_color_fg;
+! cterm_normal_fg_gui_color = fg;
+ }
+ if (bg == INVALCOLOR)
+ {
+ ctermbg = -1;
+ if (id > 0)
+ syn_id2cterm_bg(id, &ctermfg, &ctermbg);
+! bg = ctermbg != -1 ? ctermtoxterm(ctermbg) : default_console_color_bg;
+! cterm_normal_bg_gui_color = bg;
+ }
+ fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg);
+ bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg);
+***************
+*** 7807,7814 ****
+ csbi.cbSize = sizeof(csbi);
+ csbi.srWindow.Right += 1;
+ csbi.srWindow.Bottom += 1;
+! csbi.ColorTable[0] = (COLORREF)bg;
+! csbi.ColorTable[7] = (COLORREF)fg;
+ if (has_csbiex)
+ pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi);
+ # endif
+--- 7833,7840 ----
+ csbi.cbSize = sizeof(csbi);
+ csbi.srWindow.Right += 1;
+ csbi.srWindow.Bottom += 1;
+! csbi.ColorTable[g_color_index_bg] = (COLORREF)bg;
+! csbi.ColorTable[g_color_index_fg] = (COLORREF)fg;
+ if (has_csbiex)
+ pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi);
+ # endif
+***************
+*** 7827,7834 ****
+ csbi.cbSize = sizeof(csbi);
+ csbi.srWindow.Right += 1;
+ csbi.srWindow.Bottom += 1;
+! csbi.ColorTable[0] = (COLORREF)save_console_bg_rgb;
+! csbi.ColorTable[7] = (COLORREF)save_console_fg_rgb;
+ if (has_csbiex)
+ pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi);
+ # endif
+--- 7853,7860 ----
+ csbi.cbSize = sizeof(csbi);
+ csbi.srWindow.Right += 1;
+ csbi.srWindow.Bottom += 1;
+! csbi.ColorTable[g_color_index_bg] = (COLORREF)save_console_bg_rgb;
+! csbi.ColorTable[g_color_index_fg] = (COLORREF)save_console_fg_rgb;
+ if (has_csbiex)
+ pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi);
+ # endif
+*** ../vim-8.1.0337/src/version.c 2018-08-30 15:58:23.248944510 +0200
+--- src/version.c 2018-08-30 17:45:48.250391370 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 338,
+ /**/
+
+--
+The average life of an organization chart is six months. You can safely
+ignore any order from your boss that would take six months to complete.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0339 b/data/vim/patches/8.1.0339
new file mode 100644
index 000000000..26ab0843f
--- /dev/null
+++ b/data/vim/patches/8.1.0339
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0339
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0339
+Problem: Wrong highlight when 'incsearch' set and cancelling :s.
+Solution: Reset search line range. (Hirohito Higashi, Masamichi Abe)
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_10.dump
+
+
+*** ../vim-8.1.0338/src/ex_getln.c 2018-08-23 20:55:23.328137497 +0200
+--- src/ex_getln.c 2018-08-31 22:01:54.482219518 +0200
+***************
+*** 436,447 ****
+ }
+ restore_viewstate(&is_state->old_viewstate);
+ highlight_match = FALSE;
+ validate_cursor(); /* needed for TAB */
+ if (call_update_screen)
+ update_screen(SOME_VALID);
+ else
+ redraw_all_later(SOME_VALID);
+- p_magic = is_state->magic_save;
+ }
+ }
+
+--- 436,453 ----
+ }
+ restore_viewstate(&is_state->old_viewstate);
+ highlight_match = FALSE;
++
++ // by default search all lines
++ search_first_line = 0;
++ search_last_line = MAXLNUM;
++
++ p_magic = is_state->magic_save;
++
+ validate_cursor(); /* needed for TAB */
+ if (call_update_screen)
+ update_screen(SOME_VALID);
+ else
+ redraw_all_later(SOME_VALID);
+ }
+ }
+
+*** ../vim-8.1.0338/src/testdir/test_search.vim 2018-08-23 20:55:23.328137497 +0200
+--- src/testdir/test_search.vim 2018-08-31 22:06:07.867638671 +0200
+***************
+*** 956,961 ****
+--- 956,970 ----
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {})
+ call term_sendkeys(buf, "\<Esc>")
+
++ call term_sendkeys(buf, ":set nocursorline\<CR>")
++
++ " All matches are highlighted for 'hlsearch' after the incsearch canceled
++ call term_sendkeys(buf, "1G*")
++ call term_sendkeys(buf, ":2,5s/foo")
++ sleep 100m
++ call term_sendkeys(buf, "\<Esc>")
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_10', {})
++
+ call StopVimInTerminal(buf)
+ call delete('Xis_subst_script')
+ endfunc
+*** ../vim-8.1.0338/src/testdir/dumps/Test_incsearch_substitute_10.dump 2018-08-31 22:08:36.694113050 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_10.dump 2018-08-31 22:01:54.482219518 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffff4012|o@1| +0&#ffffff0|1| @64
++ >f+0&#ffff4012|o@1| +0&#ffffff0|2| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|3| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|6| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|7| @64
++ |f+0&#ffff4012|o@1| +0&#ffffff0|8| @64
++ @52|2|,|1| @10|T|o|p|
+*** ../vim-8.1.0338/src/version.c 2018-08-30 17:47:01.949560920 +0200
+--- src/version.c 2018-08-31 22:08:45.178025914 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 339,
+ /**/
+
+--
+A)bort, R)etry, D)o it right this time
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0340 b/data/vim/patches/8.1.0340
new file mode 100644
index 000000000..c63fda431
--- /dev/null
+++ b/data/vim/patches/8.1.0340
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0340
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0340
+Problem: No test for :spellinfo.
+Solution: Add a test. (Dominique Pelle, closes #3394)
+Files: src/testdir/test_spell.vim
+
+
+*** ../vim-8.1.0339/src/testdir/test_spell.vim 2018-07-20 23:36:21.171368602 +0200
+--- src/testdir/test_spell.vim 2018-08-31 22:25:03.695993566 +0200
+***************
+*** 126,131 ****
+--- 126,160 ----
+ bwipe!
+ endfunc
+
++ func Test_spellinfo()
++ new
++
++ set enc=latin1 spell spelllang=en
++ call assert_match("^\nfile: .*/runtime/spell/en.latin1.spl\n$", execute('spellinfo'))
++
++ set enc=cp1250 spell spelllang=en
++ call assert_match("^\nfile: .*/runtime/spell/en.ascii.spl\n$", execute('spellinfo'))
++
++ if has('multi_byte')
++ set enc=utf-8 spell spelllang=en
++ call assert_match("^\nfile: .*/runtime/spell/en.utf-8.spl\n$", execute('spellinfo'))
++ endif
++
++ set enc=latin1 spell spelllang=en_us,en_nz
++ call assert_match("^\n" .
++ \ "file: .*/runtime/spell/en.latin1.spl\n" .
++ \ "file: .*/runtime/spell/en.latin1.spl\n$", execute('spellinfo'))
++
++ set spell spelllang=
++ call assert_fails('spellinfo', 'E756:')
++
++ set nospell spelllang=en
++ call assert_fails('spellinfo', 'E756:')
++
++ set enc& spell& spelllang&
++ bwipe
++ endfunc
++
+ func Test_zz_basic()
+ call LoadAffAndDic(g:test_data_aff1, g:test_data_dic1)
+ call RunGoodBad("wrong OK puts. Test the end",
+*** ../vim-8.1.0339/src/version.c 2018-08-31 22:09:31.561549259 +0200
+--- src/version.c 2018-08-31 22:24:49.216141831 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 340,
+ /**/
+
+--
+A)bort, R)etry, P)lease don't bother me again
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0341 b/data/vim/patches/8.1.0341
new file mode 100644
index 000000000..fed330424
--- /dev/null
+++ b/data/vim/patches/8.1.0341
@@ -0,0 +1,312 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0341
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0341
+Problem: :argadd in empty buffer changes the buffer name. (Pavol Juhas)
+Solution: Don't re-use the current buffer when not going to edit the file.
+ (closes #3397) Do re-use the current buffer for :next.
+Files: src/ex_cmds2.c, src/testdir/test_arglist.vim,
+ src/testdir/test_command_count.vim
+
+
+*** ../vim-8.1.0340/src/ex_cmds2.c 2018-08-30 13:07:12.026033864 +0200
+--- src/ex_cmds2.c 2018-08-31 23:00:26.400150737 +0200
+***************
+*** 2445,2454 ****
+ */
+
+ static char_u *do_one_arg(char_u *str);
+! static int do_arglist(char_u *str, int what, int after);
+ static void alist_check_arg_idx(void);
+ static int editing_arg_idx(win_T *win);
+! static int alist_add_list(int count, char_u **files, int after);
+ #define AL_SET 1
+ #define AL_ADD 2
+ #define AL_DEL 3
+--- 2445,2454 ----
+ */
+
+ static char_u *do_one_arg(char_u *str);
+! static int do_arglist(char_u *str, int what, int after, int will_edit);
+ static void alist_check_arg_idx(void);
+ static int editing_arg_idx(win_T *win);
+! static void alist_add_list(int count, char_u **files, int after, int will_edit);
+ #define AL_SET 1
+ #define AL_ADD 2
+ #define AL_DEL 3
+***************
+*** 2553,2559 ****
+ void
+ set_arglist(char_u *str)
+ {
+! do_arglist(str, AL_SET, 0);
+ }
+
+ /*
+--- 2553,2559 ----
+ void
+ set_arglist(char_u *str)
+ {
+! do_arglist(str, AL_SET, 0, FALSE);
+ }
+
+ /*
+***************
+*** 2567,2573 ****
+ do_arglist(
+ char_u *str,
+ int what,
+! int after UNUSED) /* 0 means before first one */
+ {
+ garray_T new_ga;
+ int exp_count;
+--- 2567,2574 ----
+ do_arglist(
+ char_u *str,
+ int what,
+! int after UNUSED, // 0 means before first one
+! int will_edit) // will edit added argument
+ {
+ garray_T new_ga;
+ int exp_count;
+***************
+*** 2652,2662 ****
+
+ if (what == AL_ADD)
+ {
+! (void)alist_add_list(exp_count, exp_files, after);
+ vim_free(exp_files);
+ }
+ else /* what == AL_SET */
+! alist_set(ALIST(curwin), exp_count, exp_files, FALSE, NULL, 0);
+ }
+
+ alist_check_arg_idx();
+--- 2653,2663 ----
+
+ if (what == AL_ADD)
+ {
+! alist_add_list(exp_count, exp_files, after, will_edit);
+ vim_free(exp_files);
+ }
+ else /* what == AL_SET */
+! alist_set(ALIST(curwin), exp_count, exp_files, will_edit, NULL, 0);
+ }
+
+ alist_check_arg_idx();
+***************
+*** 2932,2938 ****
+ {
+ if (*eap->arg != NUL) /* redefine file list */
+ {
+! if (do_arglist(eap->arg, AL_SET, 0) == FAIL)
+ return;
+ i = 0;
+ }
+--- 2933,2939 ----
+ {
+ if (*eap->arg != NUL) /* redefine file list */
+ {
+! if (do_arglist(eap->arg, AL_SET, 0, TRUE) == FAIL)
+ return;
+ i = 0;
+ }
+***************
+*** 2952,2958 ****
+ // Whether curbuf will be reused, curbuf->b_ffname will be set.
+ int curbuf_is_reusable = curbuf_reusable();
+
+! if (do_arglist(eap->arg, AL_ADD, i) == FAIL)
+ return;
+ #ifdef FEAT_TITLE
+ maketitle();
+--- 2953,2959 ----
+ // Whether curbuf will be reused, curbuf->b_ffname will be set.
+ int curbuf_is_reusable = curbuf_reusable();
+
+! if (do_arglist(eap->arg, AL_ADD, i, TRUE) == FAIL)
+ return;
+ #ifdef FEAT_TITLE
+ maketitle();
+***************
+*** 2974,2980 ****
+ ex_argadd(exarg_T *eap)
+ {
+ do_arglist(eap->arg, AL_ADD,
+! eap->addr_count > 0 ? (int)eap->line2 : curwin->w_arg_idx + 1);
+ #ifdef FEAT_TITLE
+ maketitle();
+ #endif
+--- 2975,2982 ----
+ ex_argadd(exarg_T *eap)
+ {
+ do_arglist(eap->arg, AL_ADD,
+! eap->addr_count > 0 ? (int)eap->line2 : curwin->w_arg_idx + 1,
+! FALSE);
+ #ifdef FEAT_TITLE
+ maketitle();
+ #endif
+***************
+*** 3024,3030 ****
+ else if (*eap->arg == NUL)
+ EMSG(_(e_argreq));
+ else
+! do_arglist(eap->arg, AL_DEL, 0);
+ #ifdef FEAT_TITLE
+ maketitle();
+ #endif
+--- 3026,3032 ----
+ else if (*eap->arg == NUL)
+ EMSG(_(e_argreq));
+ else
+! do_arglist(eap->arg, AL_DEL, 0, FALSE);
+ #ifdef FEAT_TITLE
+ maketitle();
+ #endif
+***************
+*** 3269,3281 ****
+ * Add files[count] to the arglist of the current window after arg "after".
+ * The file names in files[count] must have been allocated and are taken over.
+ * Files[] itself is not taken over.
+- * Returns index of first added argument. Returns -1 when failed (out of mem).
+ */
+! static int
+ alist_add_list(
+ int count,
+ char_u **files,
+! int after) /* where to add: 0 = before first one */
+ {
+ int i;
+ int old_argcount = ARGCOUNT;
+--- 3271,3283 ----
+ * Add files[count] to the arglist of the current window after arg "after".
+ * The file names in files[count] must have been allocated and are taken over.
+ * Files[] itself is not taken over.
+ */
+! static void
+ alist_add_list(
+ int count,
+ char_u **files,
+! int after, // where to add: 0 = before first one
+! int will_edit) // will edit adding argument
+ {
+ int i;
+ int old_argcount = ARGCOUNT;
+***************
+*** 3291,3309 ****
+ (ARGCOUNT - after) * sizeof(aentry_T));
+ for (i = 0; i < count; ++i)
+ {
+ ARGLIST[after + i].ae_fname = files[i];
+! ARGLIST[after + i].ae_fnum =
+! buflist_add(files[i], BLN_LISTED | BLN_CURBUF);
+ }
+ ALIST(curwin)->al_ga.ga_len += count;
+ if (old_argcount > 0 && curwin->w_arg_idx >= after)
+ curwin->w_arg_idx += count;
+! return after;
+ }
+
+ for (i = 0; i < count; ++i)
+ vim_free(files[i]);
+- return -1;
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+--- 3293,3311 ----
+ (ARGCOUNT - after) * sizeof(aentry_T));
+ for (i = 0; i < count; ++i)
+ {
++ int flags = BLN_LISTED | (will_edit ? BLN_CURBUF : 0);
++
+ ARGLIST[after + i].ae_fname = files[i];
+! ARGLIST[after + i].ae_fnum = buflist_add(files[i], flags);
+ }
+ ALIST(curwin)->al_ga.ga_len += count;
+ if (old_argcount > 0 && curwin->w_arg_idx >= after)
+ curwin->w_arg_idx += count;
+! return;
+ }
+
+ for (i = 0; i < count; ++i)
+ vim_free(files[i]);
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+*** ../vim-8.1.0340/src/testdir/test_arglist.vim 2018-04-24 21:54:38.000000000 +0200
+--- src/testdir/test_arglist.vim 2018-08-31 22:42:29.649222626 +0200
+***************
+*** 80,85 ****
+--- 80,103 ----
+ call assert_equal(0, len(argv()))
+ endfunc
+
++ func Test_argadd_empty_curbuf()
++ new
++ let curbuf = bufnr('%')
++ call writefile(['test', 'Xargadd'], 'Xargadd')
++ " must not re-use the current buffer.
++ argadd Xargadd
++ call assert_equal(curbuf, bufnr('%'))
++ call assert_equal('', bufname('%'))
++ call assert_equal(1, line('$'))
++ rew
++ call assert_notequal(curbuf, bufnr('%'))
++ call assert_equal('Xargadd', bufname('%'))
++ call assert_equal(2, line('$'))
++
++ %argd
++ bwipe!
++ endfunc
++
+ func Init_abc()
+ args a b c
+ next
+*** ../vim-8.1.0340/src/testdir/test_command_count.vim 2018-04-24 21:47:12.000000000 +0200
+--- src/testdir/test_command_count.vim 2018-08-31 23:01:54.967036898 +0200
+***************
+*** 158,164 ****
+ func Test_command_count_4()
+ %argd
+ let bufnr = bufnr('$')
+! arga aa bb cc dd ee ff
+ 3argu
+ let args = []
+ .,$-argdo call add(args, expand('%'))
+--- 158,166 ----
+ func Test_command_count_4()
+ %argd
+ let bufnr = bufnr('$')
+! next aa bb cc dd ee ff
+! call assert_equal(bufnr, bufnr('%'))
+!
+ 3argu
+ let args = []
+ .,$-argdo call add(args, expand('%'))
+*** ../vim-8.1.0340/src/version.c 2018-08-31 22:26:49.210912007 +0200
+--- src/version.c 2018-08-31 22:44:55.551715626 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 341,
+ /**/
+
+--
+login: yes
+password: I don't know, please tell me
+password is incorrect
+login: yes
+password: incorrect
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0342 b/data/vim/patches/8.1.0342
new file mode 100644
index 000000000..3ea1ac3f5
--- /dev/null
+++ b/data/vim/patches/8.1.0342
@@ -0,0 +1,239 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0342
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0342
+Problem: Crash when a callback deletes a window that is being used.
+Solution: Do not unload a buffer that is being displayed while redrawing the
+ screen. Also avoid invoking callbacks while redrawing.
+ (closes #2107)
+Files: src/buffer.c, src/misc2.c
+
+
+*** ../vim-8.1.0341/src/buffer.c 2018-08-21 18:50:11.153501902 +0200
+--- src/buffer.c 2018-09-01 15:16:57.753412395 +0200
+***************
+*** 412,418 ****
+ hash_remove(&buf_hashtab, hi);
+ }
+
+! static char *e_buflocked = N_("E937: Attempt to delete a buffer that is in use");
+
+ /*
+ * Close the link to a buffer.
+--- 412,439 ----
+ hash_remove(&buf_hashtab, hi);
+ }
+
+! /*
+! * Return TRUE when buffer "buf" can be unloaded.
+! * Give an error message and return FALSE when the buffer is locked or the
+! * screen is being redrawn and the buffer is in a window.
+! */
+! static int
+! can_unload_buffer(buf_T *buf)
+! {
+! int can_unload = !buf->b_locked;
+!
+! if (can_unload && updating_screen)
+! {
+! win_T *wp;
+!
+! FOR_ALL_WINDOWS(wp)
+! if (wp->w_buffer == buf)
+! can_unload = FALSE;
+! }
+! if (!can_unload)
+! EMSG(_("E937: Attempt to delete a buffer that is in use"));
+! return can_unload;
+! }
+
+ /*
+ * Close the link to a buffer.
+***************
+*** 474,484 ****
+ {
+ if (wipe_buf || unload_buf)
+ {
+! if (buf->b_locked)
+! {
+! EMSG(_(e_buflocked));
+ return;
+! }
+ /* Wiping out or unloading a terminal buffer kills the job. */
+ free_terminal(buf);
+ }
+--- 495,503 ----
+ {
+ if (wipe_buf || unload_buf)
+ {
+! if (!can_unload_buffer(buf))
+ return;
+!
+ /* Wiping out or unloading a terminal buffer kills the job. */
+ free_terminal(buf);
+ }
+***************
+*** 501,511 ****
+
+ /* Disallow deleting the buffer when it is locked (already being closed or
+ * halfway a command that relies on it). Unloading is allowed. */
+! if (buf->b_locked > 0 && (del_buf || wipe_buf))
+! {
+! EMSG(_(e_buflocked));
+ return;
+- }
+
+ /* check no autocommands closed the window */
+ if (win != NULL && win_valid_any_tab(win))
+--- 520,527 ----
+
+ /* Disallow deleting the buffer when it is locked (already being closed or
+ * halfway a command that relies on it). Unloading is allowed. */
+! if ((del_buf || wipe_buf) && !can_unload_buffer(buf))
+ return;
+
+ /* check no autocommands closed the window */
+ if (win != NULL && win_valid_any_tab(win))
+***************
+*** 1196,1203 ****
+ return errormsg;
+ }
+
+- static int empty_curbuf(int close_others, int forceit, int action);
+-
+ /*
+ * Make the current buffer empty.
+ * Used when it is wiped out and it's the last buffer.
+--- 1212,1217 ----
+***************
+*** 1238,1243 ****
+--- 1252,1258 ----
+ need_fileinfo = FALSE;
+ return retval;
+ }
++
+ /*
+ * Implementation of the commands for the buffer list.
+ *
+***************
+*** 1359,1369 ****
+ int forward;
+ bufref_T bufref;
+
+! if (buf->b_locked)
+! {
+! EMSG(_(e_buflocked));
+ return FAIL;
+- }
+
+ set_bufref(&bufref, buf);
+
+--- 1374,1381 ----
+ int forward;
+ bufref_T bufref;
+
+! if (!can_unload_buffer(buf))
+ return FAIL;
+
+ set_bufref(&bufref, buf);
+
+*** ../vim-8.1.0341/src/misc2.c 2018-07-29 16:09:14.636945607 +0200
+--- src/misc2.c 2018-09-01 15:07:10.019535433 +0200
+***************
+*** 6366,6398 ****
+ {
+ win_T *old_curwin = curwin;
+
+! /* For Win32 mch_breakcheck() does not check for input, do it here. */
+ # if defined(WIN32) && defined(FEAT_JOB_CHANNEL)
+ channel_handle_events(FALSE);
+ # endif
+
+ # ifdef FEAT_NETBEANS_INTG
+! /* Process the queued netbeans messages. */
+ netbeans_parse_messages();
+ # endif
+ # ifdef FEAT_JOB_CHANNEL
+! /* Write any buffer lines still to be written. */
+ channel_write_any_lines();
+
+! /* Process the messages queued on channels. */
+ channel_parse_messages();
+ # endif
+ # if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
+! /* Process the queued clientserver messages. */
+ server_parse_messages();
+ # endif
+ # ifdef FEAT_JOB_CHANNEL
+! /* Check if any jobs have ended. */
+ job_check_ended();
+ # endif
+
+! /* If the current window changed we need to bail out of the waiting loop.
+! * E.g. when a job exit callback closes the terminal window. */
+ if (curwin != old_curwin)
+ ins_char_typebuf(K_IGNORE);
+ }
+--- 6366,6403 ----
+ {
+ win_T *old_curwin = curwin;
+
+! // Do not handle messages while redrawing, because it may cause buffers to
+! // change or be wiped while they are being redrawn.
+! if (updating_screen)
+! return;
+!
+! // For Win32 mch_breakcheck() does not check for input, do it here.
+ # if defined(WIN32) && defined(FEAT_JOB_CHANNEL)
+ channel_handle_events(FALSE);
+ # endif
+
+ # ifdef FEAT_NETBEANS_INTG
+! // Process the queued netbeans messages.
+ netbeans_parse_messages();
+ # endif
+ # ifdef FEAT_JOB_CHANNEL
+! // Write any buffer lines still to be written.
+ channel_write_any_lines();
+
+! // Process the messages queued on channels.
+ channel_parse_messages();
+ # endif
+ # if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
+! // Process the queued clientserver messages.
+ server_parse_messages();
+ # endif
+ # ifdef FEAT_JOB_CHANNEL
+! // Check if any jobs have ended.
+ job_check_ended();
+ # endif
+
+! // If the current window changed we need to bail out of the waiting loop.
+! // E.g. when a job exit callback closes the terminal window.
+ if (curwin != old_curwin)
+ ins_char_typebuf(K_IGNORE);
+ }
+*** ../vim-8.1.0341/src/version.c 2018-08-31 23:06:18.735841246 +0200
+--- src/version.c 2018-09-01 15:02:16.242604587 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 342,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+5. You find yourself brainstorming for new subjects to search.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0343 b/data/vim/patches/8.1.0343
new file mode 100644
index 000000000..db9bbf2d7
--- /dev/null
+++ b/data/vim/patches/8.1.0343
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0343
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0343
+Problem: 'shellslash' is not used for getcwd() with local directory.
+ (Daniel Hahler)
+Solution: Call slash_adjust() later. (closes #3399)
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0342/src/evalfunc.c 2018-08-21 20:28:49.888006612 +0200
+--- src/evalfunc.c 2018-09-02 14:23:21.103760517 +0200
+***************
+*** 4955,4965 ****
+ vim_free(cwd);
+ }
+ }
+ #ifdef BACKSLASH_IN_FILENAME
+! if (rettv->vval.v_string != NULL)
+! slash_adjust(rettv->vval.v_string);
+ #endif
+- }
+ }
+
+ /*
+--- 4955,4965 ----
+ vim_free(cwd);
+ }
+ }
++ }
+ #ifdef BACKSLASH_IN_FILENAME
+! if (rettv->vval.v_string != NULL)
+! slash_adjust(rettv->vval.v_string);
+ #endif
+ }
+
+ /*
+*** ../vim-8.1.0342/src/version.c 2018-09-01 15:29:58.754429402 +0200
+--- src/version.c 2018-09-02 14:24:17.503225353 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 343,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+7. You finally do take that vacation, but only after buying a USB modem
+ and a laptop.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0344 b/data/vim/patches/8.1.0344
new file mode 100644
index 000000000..a41f532af
--- /dev/null
+++ b/data/vim/patches/8.1.0344
@@ -0,0 +1,85 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0344
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0344
+Problem: 'hlsearch' highlighting has a gap after /$.
+Solution: Remove suspicious code. (Ricky Zhou, closes #3400)
+Files: src/screen.c, src/testdir/test_hlsearch.vim
+
+
+*** ../vim-8.1.0343/src/screen.c 2018-08-26 21:23:03.400383307 +0200
+--- src/screen.c 2018-09-02 15:01:39.828954706 +0200
+***************
+*** 5496,5510 ****
+ if (c == NUL)
+ {
+ #ifdef FEAT_SYN_HL
+- if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol
+- && lnum == wp->w_cursor.lnum)
+- {
+- /* highlight last char after line */
+- --col;
+- --off;
+- --vcol;
+- }
+-
+ /* Highlight 'cursorcolumn' & 'colorcolumn' past end of the line. */
+ if (wp->w_p_wrap)
+ v = wp->w_skipcol;
+--- 5496,5501 ----
+*** ../vim-8.1.0343/src/testdir/test_hlsearch.vim 2017-06-17 20:28:35.000000000 +0200
+--- src/testdir/test_hlsearch.vim 2018-09-02 15:00:49.269446213 +0200
+***************
+*** 4,10 ****
+ new
+ call setline(1, repeat(['aaa'], 10))
+ set hlsearch nolazyredraw
+- let r=[]
+ " redraw is needed to make hlsearch highlight the matches
+ exe "normal! /aaa\<CR>" | redraw
+ let r1 = screenattr(1, 1)
+--- 4,9 ----
+***************
+*** 51,53 ****
+--- 50,65 ----
+ set nohlsearch redrawtime&
+ bwipe!
+ endfunc
++
++ func Test_hlsearch_eol_highlight()
++ new
++ call append(1, repeat([''], 9))
++ set hlsearch nolazyredraw
++ exe "normal! /$\<CR>" | redraw
++ let attr = screenattr(1, 1)
++ for row in range(2, 10)
++ call assert_equal(attr, screenattr(row, 1), 'in line ' . row)
++ endfor
++ set nohlsearch
++ bwipe!
++ endfunc
+*** ../vim-8.1.0343/src/version.c 2018-09-02 14:25:02.330801508 +0200
+--- src/version.c 2018-09-02 14:58:34.506763279 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 344,
+ /**/
+
+--
+"How is your new girlfriend?"
+"90-60-90 man!"
+"What, pale purple?"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0345 b/data/vim/patches/8.1.0345
new file mode 100644
index 000000000..70cae5c1d
--- /dev/null
+++ b/data/vim/patches/8.1.0345
@@ -0,0 +1,286 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0345
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0345
+Problem: Cannot get the window id associated with the location list.
+Solution: Add the "filewinid" argument to getloclist(). (Yegappan
+ Lakshmanan, closes #3202)
+Files: runtime/doc/eval.txt, src/quickfix.c,
+ src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0344/runtime/doc/eval.txt 2018-08-21 21:09:02.598739663 +0200
+--- runtime/doc/eval.txt 2018-09-02 15:13:00.638419373 +0200
+***************
+*** 4721,4726 ****
+--- 4729,4738 ----
+ If the optional {what} dictionary argument is supplied, then
+ returns the items listed in {what} as a dictionary. Refer to
+ |getqflist()| for the supported items in {what}.
++ If {what} contains 'filewinid', then returns the id of the
++ window used to display files from the location list. This
++ field is applicable only when called from a location list
++ window.
+
+ getmatches() *getmatches()*
+ Returns a |List| with all matches previously defined by
+*** ../vim-8.1.0344/src/quickfix.c 2018-08-28 22:07:38.574120540 +0200
+--- src/quickfix.c 2018-09-02 15:13:00.638419373 +0200
+***************
+*** 5670,5676 ****
+ QF_GETLIST_IDX = 0x40,
+ QF_GETLIST_SIZE = 0x80,
+ QF_GETLIST_TICK = 0x100,
+! QF_GETLIST_ALL = 0x1FF,
+ };
+
+ /*
+--- 5670,5677 ----
+ QF_GETLIST_IDX = 0x40,
+ QF_GETLIST_SIZE = 0x80,
+ QF_GETLIST_TICK = 0x100,
+! QF_GETLIST_FILEWINID = 0x200,
+! QF_GETLIST_ALL = 0x3FF,
+ };
+
+ /*
+***************
+*** 5744,5755 ****
+ * Convert the keys in 'what' to quickfix list property flags.
+ */
+ static int
+! qf_getprop_keys2flags(dict_T *what)
+ {
+ int flags = QF_GETLIST_NONE;
+
+ if (dict_find(what, (char_u *)"all", -1) != NULL)
+ flags |= QF_GETLIST_ALL;
+
+ if (dict_find(what, (char_u *)"title", -1) != NULL)
+ flags |= QF_GETLIST_TITLE;
+--- 5745,5761 ----
+ * Convert the keys in 'what' to quickfix list property flags.
+ */
+ static int
+! qf_getprop_keys2flags(dict_T *what, int loclist)
+ {
+ int flags = QF_GETLIST_NONE;
+
+ if (dict_find(what, (char_u *)"all", -1) != NULL)
++ {
+ flags |= QF_GETLIST_ALL;
++ if (!loclist)
++ // File window ID is applicable only to location list windows
++ flags &= ~ QF_GETLIST_FILEWINID;
++ }
+
+ if (dict_find(what, (char_u *)"title", -1) != NULL)
+ flags |= QF_GETLIST_TITLE;
+***************
+*** 5778,5783 ****
+--- 5784,5792 ----
+ if (dict_find(what, (char_u *)"changedtick", -1) != NULL)
+ flags |= QF_GETLIST_TICK;
+
++ if (loclist && dict_find(what, (char_u *)"filewinid", -1) != NULL)
++ flags |= QF_GETLIST_FILEWINID;
++
+ return flags;
+ }
+
+***************
+*** 5870,5875 ****
+--- 5879,5886 ----
+ status = dict_add_number(retdict, "size", 0);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+ status = dict_add_number(retdict, "changedtick", 0);
++ if ((status == OK) && (qi != &ql_info) && (flags & QF_GETLIST_FILEWINID))
++ status = dict_add_number(retdict, "filewinid", 0);
+
+ return status;
+ }
+***************
+*** 5884,5889 ****
+--- 5895,5920 ----
+ }
+
+ /*
++ * Returns the identifier of the window used to display files from a location
++ * list. If there is no associated window, then returns 0. Useful only when
++ * called from a location list window.
++ */
++ static int
++ qf_getprop_filewinid(win_T *wp, qf_info_T *qi, dict_T *retdict)
++ {
++ int winid = 0;
++
++ if (wp != NULL && IS_LL_WINDOW(wp))
++ {
++ win_T *ll_wp = qf_find_win_with_loclist(qi);
++ if (ll_wp != NULL)
++ winid = ll_wp->w_id;
++ }
++
++ return dict_add_number(retdict, "filewinid", winid);
++ }
++
++ /*
+ * Return the quickfix list items/entries as 'items' in retdict
+ */
+ static int
+***************
+*** 5963,5969 ****
+ if (wp != NULL)
+ qi = GET_LOC_LIST(wp);
+
+! flags = qf_getprop_keys2flags(what);
+
+ if (qi != NULL && qi->qf_listcount != 0)
+ qf_idx = qf_getprop_qfidx(qi, what);
+--- 5994,6000 ----
+ if (wp != NULL)
+ qi = GET_LOC_LIST(wp);
+
+! flags = qf_getprop_keys2flags(what, (wp != NULL));
+
+ if (qi != NULL && qi->qf_listcount != 0)
+ qf_idx = qf_getprop_qfidx(qi, what);
+***************
+*** 5992,5997 ****
+--- 6023,6030 ----
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+ status = dict_add_number(retdict, "changedtick",
+ qi->qf_lists[qf_idx].qf_changedtick);
++ if ((status == OK) && (wp != NULL) && (flags & QF_GETLIST_FILEWINID))
++ status = qf_getprop_filewinid(wp, qi, retdict);
+
+ return status;
+ }
+*** ../vim-8.1.0344/src/testdir/test_quickfix.vim 2018-08-30 15:58:23.244944556 +0200
+--- src/testdir/test_quickfix.vim 2018-09-02 15:13:00.638419373 +0200
+***************
+*** 1973,1978 ****
+--- 1973,1990 ----
+ call g:Xsetlist([], 'r', {'items' : [{'filename' : 'F1', 'lnum' : 10, 'text' : 'L10'}]})
+ call assert_equal('TestTitle', g:Xgetlist({'title' : 1}).title)
+
++ " Test for getting id of window associated with a location list window
++ if a:cchar == 'l'
++ only
++ call assert_equal(0, g:Xgetlist({'all' : 1}).filewinid)
++ let wid = win_getid()
++ Xopen
++ call assert_equal(wid, g:Xgetlist({'filewinid' : 1}).filewinid)
++ wincmd w
++ call assert_equal(0, g:Xgetlist({'filewinid' : 1}).filewinid)
++ only
++ endif
++
+ " The following used to crash Vim with address sanitizer
+ call g:Xsetlist([], 'f')
+ call g:Xsetlist([], 'a', {'items' : [{'filename':'F1', 'lnum':10}]})
+***************
+*** 3000,3006 ****
+ call assert_equal('', g:Xgetlist({'title' : 0}).title)
+ call assert_equal(0, g:Xgetlist({'winid' : 0}).winid)
+ call assert_equal(0, g:Xgetlist({'changedtick' : 0}).changedtick)
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, 'changedtick': 0}, g:Xgetlist({'all' : 0}))
+
+ " Quickfix window with empty stack
+ silent! Xopen
+--- 3012,3028 ----
+ call assert_equal('', g:Xgetlist({'title' : 0}).title)
+ call assert_equal(0, g:Xgetlist({'winid' : 0}).winid)
+ call assert_equal(0, g:Xgetlist({'changedtick' : 0}).changedtick)
+! if a:cchar == 'c'
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0,
+! \ 'items' : [], 'nr' : 0, 'size' : 0,
+! \ 'title' : '', 'winid' : 0, 'changedtick': 0},
+! \ g:Xgetlist({'all' : 0}))
+! else
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0,
+! \ 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '',
+! \ 'winid' : 0, 'changedtick': 0, 'filewinid' : 0},
+! \ g:Xgetlist({'all' : 0}))
+! endif
+
+ " Quickfix window with empty stack
+ silent! Xopen
+***************
+*** 3033,3039 ****
+ call assert_equal('', g:Xgetlist({'id' : qfid, 'title' : 0}).title)
+ call assert_equal(0, g:Xgetlist({'id' : qfid, 'winid' : 0}).winid)
+ call assert_equal(0, g:Xgetlist({'id' : qfid, 'changedtick' : 0}).changedtick)
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, 'changedtick' : 0}, g:Xgetlist({'id' : qfid, 'all' : 0}))
+
+ " Non-existing quickfix list number
+ call assert_equal('', g:Xgetlist({'nr' : 5, 'context' : 0}).context)
+--- 3055,3070 ----
+ call assert_equal('', g:Xgetlist({'id' : qfid, 'title' : 0}).title)
+ call assert_equal(0, g:Xgetlist({'id' : qfid, 'winid' : 0}).winid)
+ call assert_equal(0, g:Xgetlist({'id' : qfid, 'changedtick' : 0}).changedtick)
+! if a:cchar == 'c'
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
+! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0,
+! \ 'changedtick' : 0}, g:Xgetlist({'id' : qfid, 'all' : 0}))
+! else
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
+! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0,
+! \ 'changedtick' : 0, 'filewinid' : 0},
+! \ g:Xgetlist({'id' : qfid, 'all' : 0}))
+! endif
+
+ " Non-existing quickfix list number
+ call assert_equal('', g:Xgetlist({'nr' : 5, 'context' : 0}).context)
+***************
+*** 3045,3051 ****
+ call assert_equal('', g:Xgetlist({'nr' : 5, 'title' : 0}).title)
+ call assert_equal(0, g:Xgetlist({'nr' : 5, 'winid' : 0}).winid)
+ call assert_equal(0, g:Xgetlist({'nr' : 5, 'changedtick' : 0}).changedtick)
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, 'changedtick' : 0}, g:Xgetlist({'nr' : 5, 'all' : 0}))
+ endfunc
+
+ func Test_getqflist()
+--- 3076,3091 ----
+ call assert_equal('', g:Xgetlist({'nr' : 5, 'title' : 0}).title)
+ call assert_equal(0, g:Xgetlist({'nr' : 5, 'winid' : 0}).winid)
+ call assert_equal(0, g:Xgetlist({'nr' : 5, 'changedtick' : 0}).changedtick)
+! if a:cchar == 'c'
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
+! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0,
+! \ 'changedtick' : 0}, g:Xgetlist({'nr' : 5, 'all' : 0}))
+! else
+! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [],
+! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0,
+! \ 'changedtick' : 0, 'filewinid' : 0},
+! \ g:Xgetlist({'nr' : 5, 'all' : 0}))
+! endif
+ endfunc
+
+ func Test_getqflist()
+*** ../vim-8.1.0344/src/version.c 2018-09-02 15:07:21.977655529 +0200
+--- src/version.c 2018-09-02 15:14:57.573305935 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 345,
+ /**/
+
+--
+The Feynman problem solving Algorithm:
+ 1) Write down the problem
+ 2) Think real hard
+ 3) Write down the answer
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0346 b/data/vim/patches/8.1.0346
new file mode 100644
index 000000000..49215092c
--- /dev/null
+++ b/data/vim/patches/8.1.0346
@@ -0,0 +1,1530 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0346
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0346
+Problem: Building with Aap is outdated and unused.
+Solution: Remove the Aap build files.
+Files: Filelist, src/main.aap, src/testdir/main.aap, src/config.aap.in,
+ runtime/macros/maze/main.aap
+
+
+*** ../vim-8.1.0345/Filelist 2018-07-07 17:21:49.120140280 +0200
+--- Filelist 2018-09-02 15:24:34.374543708 +0200
+***************
+*** 1,5 ****
+ # List of distributed Vim files.
+! # Used by Makefile and upload.aap.
+
+ # source files for all source archives
+ SRC_ALL = \
+--- 1,5 ----
+ # List of distributed Vim files.
+! # Used by Makefile.
+
+ # source files for all source archives
+ SRC_ALL = \
+***************
+*** 101,109 ****
+ src/window.c \
+ src/tee/tee.c \
+ src/xxd/xxd.c \
+- src/main.aap \
+ src/testdir/gen_opt_test.vim \
+- src/testdir/main.aap \
+ src/testdir/README.txt \
+ src/testdir/Make_all.mak \
+ src/testdir/*.in \
+--- 101,107 ----
+***************
+*** 291,297 ****
+ src/INSTALLx.txt \
+ src/Makefile \
+ src/auto/configure \
+- src/config.aap.in \
+ src/config.h.in \
+ src/config.mk.dist \
+ src/config.mk.in \
+--- 289,294 ----
+***************
+*** 612,618 ****
+ runtime/macros/matchit.vim \
+ runtime/macros/maze/README.txt \
+ runtime/macros/maze/[mM]akefile \
+- runtime/macros/maze/main.aap \
+ runtime/macros/maze/maze.c \
+ runtime/macros/maze/maze_5.78 \
+ runtime/macros/maze/maze_mac \
+--- 609,614 ----
+***************
+*** 640,645 ****
+--- 636,642 ----
+ runtime/tutor/tutor \
+ runtime/tutor/tutor.vim \
+ runtime/vimrc_example.vim \
++ runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
+ runtime/pack/dist/opt/dvorak/plugin/dvorak.vim \
+ runtime/pack/dist/opt/dvorak/dvorak/enable.vim \
+ runtime/pack/dist/opt/dvorak/dvorak/disable.vim \
+*** ../vim-8.1.0345/src/main.aap 2016-11-12 20:10:45.000000000 +0100
+--- src/main.aap 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,1228 ****
+- # A-A-P recipe for building Vim
+- #
+- # There are no user choices in here!
+- # Put configure arguments in the file config.arg.
+- # Later there will be a config.txt file that contains examples and
+- # explanations.
+- #
+- # Optional arguments:
+- # PREFIX=dir Overrules the install directory.
+- # Can be specified when installing only.
+- # Example: aap install PREFIX=$HOME
+- #
+- @if os.name != "posix":
+- :error Sorry, this recipe only works for Unix-like systems.
+-
+- # Skip the configure stuff when "link.sh" is executing this recipe recursively
+- # to build pathdef.c or not building something and auto/config.aap does exist.
+- @if ((_no.TARGETARG != "pathdef" and has_build_target())
+- @ or not os.path.exists("auto/config.aap")):
+-
+- #
+- # A U T O C O N F
+- #
+-
+- # Run autoconf when configure.ac has been changed since it was last run.
+- # This is skipped when the signatures in "mysign" are up-to-date. When
+- # there is no autoconf program skip this (the signature is often the only
+- # thing that's outdated)
+- auto/configure {signfile = mysign} : configure.ac
+- @if not program_path("autoconf"):
+- :print Can't find autoconf, using existing configure script.
+- @else:
+- # Move configure aside, autoconf would overwrite it
+- :move {exist} configure configure.save
+- :sys autoconf
+- :cat configure | :eval re.sub('\\./config.log', 'auto/config.log', stdin) | :eval re.sub('>config.log', '>auto/config.log', stdin) >! auto/configure
+- :chmod 755 auto/configure
+- :move configure.save configure
+- :del {force} auto/config.cache auto/config.status
+-
+- # Change the configure script to produce config.aap instead of config.mk.
+- auto/configure.aap : auto/configure
+- :print Adjusting auto/configure for A-A-P.
+- :cat auto/configure | :eval re.sub("config.mk", "config.aap", stdin)
+- >! auto/configure.aap
+- :chmod 755 auto/configure.aap
+-
+- # The configure script uses the directory where it's located, use a link.
+- configure.aap: {buildcheck=}
+- :symlink {f} auto/configure.aap configure.aap
+-
+- # Dependency: run configure.aap to update config.h and config.aap in the
+- # "auto" directory.
+- # NOTE: we can only build for one architecture, because -MM doesn't work
+- # when building for both.
+- config {virtual} auto/config.h auto/config.aap :
+- auto/configure.aap configure.aap
+- config.arg config.h.in config.aap.in
+- # Use "uname -a" to detect the architecture of the system.
+- @ok, uname = redir_system('uname -a', 0)
+- @if string.find(uname, "i386") >= 0:
+- @ arch = "i386"
+- @else:
+- @ arch = "ppc"
+- :print Building for $arch system
+- config_args = `file2string("config.arg")`
+- :sys CONFIG_STATUS=auto/config.status
+- ./configure.aap $config_args
+- --with-mac-arch=$arch
+- --cache-file=auto/config.cache
+-
+- # Configure arguments: create an empty "config.arg" file when it's missing
+- config.arg:
+- :touch {exist} config.arg
+-
+- # "auto/config.aap" contains a lot of settings, such as the name of the
+- # executable "Target".
+- # First update it, forcefully if the "reconfig" target was used.
+- @if _no.TARGETARG != "comment" and _no.TARGETARG != "make":
+- @if "reconfig" in var2list(_no.TARGETARG):
+- :del {force} auto/config.cache auto/config.status
+- :update {force} auto/config.aap
+- @else:
+- :update auto/config.aap
+-
+- # Include the recipe that autoconf generated.
+- :include auto/config.aap
+-
+- # Unfortunately "-M" doesn't work when building for two architectures. Switch
+- # back to PPC only.
+- @if string.find(_no.CPPFLAGS, "-arch i386 -arch ppc") >= 0:
+- CPPFLAGS = `string.replace(_no.CPPFLAGS, "-arch i386 -arch ppc", "-arch ppc")`
+-
+- # A "PREFIX=dir" argument overrules the value of $prefix
+- # But don't use the default "/usr/local".
+- @if _no.get("PREFIX") and _no.get("PREFIX") != '/usr/local':
+- prefix = $PREFIX
+-
+- # Don't want "~/" in prefix.
+- prefix = `os.path.expanduser(prefix)`
+-
+- # For Mac.
+- APPDIR = $(VIMNAME).app
+-
+- ### Names of the programs and targets
+- VIMTARGET = $VIMNAME$EXESUF
+- EXTARGET = $EXNAME$LNKSUF
+- VIEWTARGET = $VIEWNAME$LNKSUF
+- GVIMNAME = g$VIMNAME
+- GVIMTARGET = $GVIMNAME$LNKSUF
+- GVIEWNAME = g$VIEWNAME
+- GVIEWTARGET = $GVIEWNAME$LNKSUF
+- RVIMNAME = r$VIMNAME
+- RVIMTARGET = $RVIMNAME$LNKSUF
+- RVIEWNAME = r$VIEWNAME
+- RVIEWTARGET = $RVIEWNAME$LNKSUF
+- RGVIMNAME = r$GVIMNAME
+- RGVIMTARGET = $RGVIMNAME$LNKSUF
+- RGVIEWNAME = r$GVIEWNAME
+- RGVIEWTARGET = $RGVIEWNAME$LNKSUF
+- VIMDIFFNAME = $(VIMNAME)diff
+- GVIMDIFFNAME = g$VIMDIFFNAME
+- VIMDIFFTARGET = $VIMDIFFNAME$LNKSUF
+- GVIMDIFFTARGET = $GVIMDIFFNAME$LNKSUF
+- EVIMNAME = e$VIMNAME
+- EVIMTARGET = $EVIMNAME$LNKSUF
+- EVIEWNAME = e$VIEWNAME
+- EVIEWTARGET = $EVIEWNAME$LNKSUF
+-
+- #
+- # G U I variant
+- #
+- # The GUI is selected by configure, a lot of other things depend on it.
+- #
+- :variant GUI
+- GTK
+- GUI_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_beval.c
+- gui_gtk_f.c
+- GUI_OBJ =
+- GUI_DEFS = -DFEAT_GUI_GTK $NARROW_PROTO
+- GUI_IPATH = $GUI_INC_LOC
+- GUI_LIBS_DIR = $GUI_LIB_LOC
+- GUI_LIBS1 =
+- GUI_LIBS2 = $GTK_LIBNAME
+- GUI_INSTALL = install_normal
+- GUI_TARGETS = installglinks
+- GUI_MAN_TARGETS = yes
+- GUI_TESTTARGET = gui
+- GUI_BUNDLE =
+- GUI_TESTARG =
+- MOTIF
+- GUI_SRC = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c
+- gui_xmdlg.c gui_xmebw.c
+- GUI_OBJ =
+- GUI_DEFS = -DFEAT_GUI_MOTIF $NARROW_PROTO
+- GUI_IPATH = $GUI_INC_LOC
+- GUI_LIBS_DIR = $GUI_LIB_LOC
+- GUI_LIBS1 =
+- GUI_LIBS2 = $MOTIF_LIBNAME -lXt
+- GUI_INSTALL = install_normal
+- GUI_TARGETS = installglinks
+- GUI_MAN_TARGETS = yes
+- GUI_TESTTARGET = gui
+- GUI_BUNDLE =
+- GUI_TESTARG =
+- ATHENA
+- # XAW_LIB et al. can be overruled to use Xaw3d widgets
+- XAW_LIB ?= -lXaw
+- GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c \
+- gui_at_sb.c gui_at_fs.c
+- GUI_OBJ =
+- GUI_DEFS = -DFEAT_GUI_ATHENA $NARROW_PROTO
+- GUI_IPATH = $GUI_INC_LOC
+- GUI_LIBS_DIR = $GUI_LIB_LOC
+- GUI_LIBS1 = $XAW_LIB
+- GUI_LIBS2 = -lXt
+- GUI_INSTALL = install_normal
+- GUI_TARGETS = installglinks
+- GUI_MAN_TARGETS = yes
+- GUI_TESTTARGET = gui
+- GUI_BUNDLE =
+- GUI_TESTARG =
+- NEXTAW
+- # XAW_LIB et al. can be overruled to use Xaw3d widgets
+- XAW_LIB ?= -lXaw
+- GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c
+- gui_at_fs.c
+- GUI_OBJ =
+- GUI_DEFS = -DFEAT_GUI_ATHENA -DFEAT_GUI_NEXTAW $NARROW_PROTO
+- GUI_IPATH = $GUI_INC_LOC
+- GUI_LIBS_DIR = $GUI_LIB_LOC
+- GUI_LIBS1 = $NEXTAW_LIB
+- GUI_LIBS2 = -lXt
+- GUI_INSTALL = install_normal
+- GUI_TARGETS = installglinks
+- GUI_MAN_TARGETS = yes
+- GUI_TESTTARGET = gui
+- GUI_BUNDLE =
+- GUI_TESTARG =
+- CARBONGUI
+- GUI_SRC = gui.c gui_mac.c pty.c
+- GUI_OBJ =
+- GUI_DEFS = -DFEAT_GUI_MAC -fno-common -fpascal-strings \
+- -Wall -Wno-unknown-pragmas -mdynamic-no-pic -pipe
+- GUI_IPATH = $GUI_INC_LOC
+- GUI_LIBS_DIR = $GUI_LIB_LOC
+- GUI_LIBS1 = -framework Carbon
+- GUI_LIBS2 =
+- GUI_INSTALL = install_macosx
+- GUI_TARGETS = installglinks
+- GUI_MAN_TARGETS = yes
+- GUI_TESTTARGET = gui
+- GUI_BUNDLE = gui_bundle
+- GUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET)
+- PHOTONGUI
+- GUI_SRC = gui.c gui_photon.c pty.c
+- GUI_OBJ =
+- GUI_DEFS = -DFEAT_GUI_PHOTON
+- GUI_IPATH =
+- GUI_LIBS_DIR =
+- GUI_LIBS1 = -lph -lphexlib
+- GUI_LIBS2 =
+- GUI_INSTALL = install_normal
+- GUI_TARGETS = installglinks
+- GUI_MAN_TARGETS = yes
+- GUI_TESTTARGET = gui
+- GUI_BUNDLE =
+- GUI_TESTARG =
+- *
+- GUI_SRC =
+- GUI_OBJ =
+- GUI_DEFS =
+- GUI_IPATH =
+- GUI_LIBS_DIR =
+- GUI_LIBS1 =
+- GUI_LIBS2 =
+- GUI_INSTALL = install_normal
+- GUI_TARGETS =
+- GUI_MAN_TARGETS =
+- GUI_TESTTARGET =
+- GUI_BUNDLE =
+- GUI_TESTARG =
+-
+-
+- PRE_DEFS = -Iproto -I. $DEFS $GUI_DEFS $GUI_IPATH $CPPFLAGS $?(EXTRA_IPATHS)
+- POST_DEFS = $X_CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $?(EXTRA_DEFS)
+- CFLAGS = $PRE_DEFS $CONF_CFLAGS $?(PROFILE_CFLAGS) $POST_DEFS
+- CPPFLAGS =
+-
+- ALL_LIB_DIRS = $GUI_LIBS_DIR $X_LIBS_DIR
+- LDFLAGS = $ALL_LIB_DIRS $CONF_LDFLAGS
+- LIBS = $GUI_LIBS1 $GUI_X_LIBS $GUI_LIBS2 $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $CONF_LIBS $?(EXTRA_LIBS) $LUA_LIBS $MZSCHEME_LIBS $PERL_LIBS $PYTHON_LIBS $TCL_LIBS $RUBY_LIBS $?(PROFILE_LIBS)
+-
+- Target = $VIMNAME
+-
+- # reconfig target also builds Vim (reconfiguration is handled above).
+- reconfig {virtual}: $Target
+-
+- distclean: clean
+- :del {force} auto/config.h auto/config.aap
+- :del {force} auto/config.cache auto/config.status
+-
+-
+- # Execute the test scripts. Run these after compiling Vim, before installing.
+- #
+- # This will produce a lot of garbage on your screen, including a few error
+- # messages. Don't worry about that.
+- # If there is a real error, there will be a difference between "test.out" and
+- # a "test99.ok" file.
+- # If everything is alright, the final message will be "ALL DONE". If not you
+- # get "TEST FAILURE".
+- #
+- test check:
+- VimProg = ../$Target
+- :execute testdir/main.aap $GUI_TESTTARGET $GUI_TESTARG
+-
+- testclean {virtual}:
+- :del {force} testdir/*.out testdir/test.log
+-
+- # When no fetch target exists we are not a child of the ../main.aap recipe,
+- # Use ../main.aap to do the fetching.
+- # --- If you get an error here for wrong number of arguments, you need to
+- # update to a newer version of A-A-P.
+- @if not has_target("fetch"):
+- fetch:
+- :execute ../main.aap fetch
+-
+-
+- # All the source files that need to be compiled.
+- # Some are optional and depend on configure.
+- # "version.c" is missing, it's always compiled (see below).
+- Source =
+- blowfish.c
+- buffer.c
+- charset.c
+- diff.c
+- digraph.c
+- edit.c
+- eval.c
+- ex_cmds.c
+- ex_cmds2.c
+- ex_docmd.c
+- ex_eval.c
+- ex_getln.c
+- fileio.c
+- fold.c
+- getchar.c
+- hardcopy.c
+- hashtab.c
+- if_cscope.c
+- if_xcmdsrv.c
+- main.c
+- mark.c
+- memfile.c
+- memline.c
+- menu.c
+- message.c
+- misc1.c
+- misc2.c
+- move.c
+- mbyte.c
+- normal.c
+- ops.c
+- option.c
+- os_unix.c
+- auto/pathdef.c
+- popupmnu.c
+- quickfix.c
+- regexp.c
+- screen.c
+- search.c
+- sha256.c
+- spell.c
+- syntax.c
+- tag.c
+- term.c
+- ui.c
+- undo.c
+- window.c
+- $OS_EXTRA_SRC
+- $GUI_SRC
+- $HANGULIN_SRC
+- $LUA_SRC
+- $MZSCHEME_SRC
+- $PERL_SRC
+- $NETBEANS_SRC
+- $PYTHON_SRC
+- $TCL_SRC
+- $RUBY_SRC
+- $WORKSHOP_SRC
+-
+- Objects =
+- $GUI_OBJ
+-
+- # TODO: make is still used for subdirectories, need to write a recipe.
+- MAKE ?= make
+-
+- all: $Target $GUI_BUNDLE
+-
+- # This dependency is required to build auto/osdef.h before automatic
+- # dependencies are generated.
+- $Source version.c : auto/osdef.h
+-
+- # Need to mention that the target also depends on version.c, since it's not
+- # included in $Source
+- $Target : version.c
+-
+- # Some sources are to be found in the "auto" directory.
+- SRCPATH += auto
+-
+- # When building Vim always compile version.c to get the timestamp.
+- :filetype
+- declare my_prog
+- :attr {filetype = my_prog} $Target
+-
+- :program $Target : $Source $Objects
+-
+- :action build my_prog object
+- version_obj = `src2obj("version.c")`
+- :do compile {target = $version_obj} version.c
+- #:do build {target = $target {filetype = program}} $source $version_obj
+- link_sed = $BDIR/link.sed
+- @if os.path.exists(link_sed):
+- :move {force} $link_sed auto/link.sed
+- @else:
+- :del {force} auto/link.sed
+- :update link2.sh
+- :sys LINK="$?(PURIFY) $?(SHRPENV) $CC $LDFLAGS \
+- -o $target $source $version_obj $LIBS" \
+- MAKE="aap" sh ./link2.sh
+- :copy {force} auto/link.sed $BDIR/link.sed
+-
+- # "link.sh" must be modified for A-A-P
+- link2.sh : link.sh
+- :print Adjusting $-source for A-A-P.
+- :cat $source | :eval re.sub("objects/pathdef.o", "pathdef", stdin)
+- >! $target
+-
+- xxd/xxd$EXESUF: xxd/xxd.c
+- :sys cd xxd; CC="$CC" CFLAGS="$CPPFLAGS $CFLAGS" \
+- $MAKE -f Makefile
+-
+- # Build the language specific files if they were unpacked.
+- # Generate the converted .mo files separately, it's no problem if this fails.
+- languages {virtual}:
+- @if _no.MAKEMO:
+- :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix
+- @try:
+- :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix converted
+- @except:
+- :print Generated converted language files failed, continuing
+-
+- # Update the *.po files for changes in the sources. Only run manually.
+- update-po {virtual}:
+- cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix update-po
+-
+- auto/if_perl.c: if_perl.xs
+- :sys $PERL -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $target
+- :sys $PERL $PERLLIB/ExtUtils/xsubpp -prototypes -typemap \
+- $PERLLIB/ExtUtils/typemap if_perl.xs >> $target
+-
+- auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
+- :sys CC="$CC $CFLAGS" srcdir=$srcdir sh $srcdir/osdef.sh
+-
+- pathdef {virtual} : $BDIR/auto/pathdef$OBJSUF
+-
+- auto/pathdef.c: auto/config.aap
+- :print Creating $target
+- :print >! $target /* pathdef.c */
+- :print >> $target /* This file is automatically created by main.aap */
+- :print >> $target /* DO NOT EDIT! Change main.aap only. */
+- :print >> $target $#include "vim.h"
+- :print >> $target char_u *default_vim_dir = (char_u *)"$VIMRCLOC";
+- :print >> $target char_u *default_vimruntime_dir = (char_u *)"$?VIMRUNTIMEDIR";
+- v = $CC -c -I$srcdir $CFLAGS
+- @v = string.replace(v, '"', '\\"')
+- :print >> $target char_u *all_cflags = (char_u *)"$v";
+- linkcmd = $CC $LDFLAGS -o $VIMTARGET $LIBS
+- link_sed = $BDIR/link.sed
+- @if os.path.exists(link_sed):
+- # filter $linkcmd through $BDIR/link.sed
+- :print $linkcmd | :syseval sed -f $link_sed | :eval re.sub("\n", "", stdin) | :assign linkcmd
+- @linkcmd = string.replace(linkcmd, '"', '\\"')
+- :print >> $target char_u *all_lflags = (char_u *)"$linkcmd";
+- @if _no.get("COMPILEDBY"):
+- who = $COMPILEDBY
+- where =
+- @else:
+- :syseval whoami | :eval re.sub("\n", "", stdin) | :assign who
+-
+- :syseval hostname | :eval re.sub("\n", "", stdin) | :assign where
+- @who = string.replace(who, '"', '\\"')
+- @where = string.replace(where, '"', '\\"')
+- :print >> $target char_u *compiled_user = (char_u *)"$who";
+- :print >> $target char_u *compiled_sys = (char_u *)"$where";
+-
+-
+- ### Names of the tools that are also made
+- TOOLS = xxd/xxd$EXESUF
+-
+- # Root of the installation tree. Empty for a normal install, set to an
+- # existing path to install into a special place (for generating a package).
+- DESTDIR ?=
+-
+- ### Location of man pages under $MANTOPDIR
+- MAN1DIR = /man1
+-
+- ### Location of Vim files (should not need to be changed, and
+- ### some things might not work when they are changed!)
+- VIMDIR = /vim
+- @r = re.compile('.*VIM_VERSION_NODOT\\s*"(vim\\d\\d[^"]*)".*', re.S)
+- VIMRTDIR = /`r.match(open("version.h").read()).group(1)`
+- HELPSUBDIR = /doc
+- COLSUBDIR = /colors
+- SYNSUBDIR = /syntax
+- INDSUBDIR = /indent
+- AUTOSUBDIR = /autoload
+- PLUGSUBDIR = /plugin
+- FTPLUGSUBDIR = /ftplugin
+- LANGSUBDIR = /lang
+- COMPSUBDIR = /compiler
+- KMAPSUBDIR = /keymap
+- MACROSUBDIR = /macros
+- TOOLSSUBDIR = /tools
+- TUTORSUBDIR = /tutor
+- SPELLSUBDIR = /spell
+- PRINTSUBDIR = /print
+- PODIR = po
+-
+- ### VIMLOC common root of the Vim files (all versions)
+- ### VIMRTLOC common root of the runtime Vim files (this version)
+- ### VIMRCLOC compiled-in location for global [g]vimrc files (all versions)
+- ### VIMRUNTIMEDIR compiled-in location for runtime files (optional)
+- ### HELPSUBLOC location for help files
+- ### COLSUBLOC location for colorscheme files
+- ### SYNSUBLOC location for syntax files
+- ### INDSUBLOC location for indent files
+- ### AUTOSUBLOC location for standard autoload files
+- ### PLUGSUBLOC location for standard plugin files
+- ### FTPLUGSUBLOC location for ftplugin files
+- ### LANGSUBLOC location for language files
+- ### COMPSUBLOC location for compiler files
+- ### KMAPSUBLOC location for keymap files
+- ### MACROSUBLOC location for macro files
+- ### TOOLSSUBLOC location for tools files
+- ### TUTORSUBLOC location for tutor files
+- ### PRINTSUBLOC location for print files
+- ### SCRIPTLOC location for script files (menu.vim, bugreport.vim, ..)
+- ### You can override these if you want to install them somewhere else.
+- ### Edit feature.h for compile-time settings.
+- VIMLOC = $DATADIR$VIMDIR
+- @if not _no.get("VIMRTLOC"):
+- VIMRTLOC = $DATADIR$VIMDIR$VIMRTDIR
+- VIMRCLOC = $VIMLOC
+- HELPSUBLOC = $VIMRTLOC$HELPSUBDIR
+- COLSUBLOC = $VIMRTLOC$COLSUBDIR
+- SYNSUBLOC = $VIMRTLOC$SYNSUBDIR
+- INDSUBLOC = $VIMRTLOC$INDSUBDIR
+- AUTOSUBLOC = $VIMRTLOC$AUTOSUBDIR
+- PLUGSUBLOC = $VIMRTLOC$PLUGSUBDIR
+- FTPLUGSUBLOC = $VIMRTLOC$FTPLUGSUBDIR
+- LANGSUBLOC = $VIMRTLOC$LANGSUBDIR
+- COMPSUBLOC = $VIMRTLOC$COMPSUBDIR
+- KMAPSUBLOC = $VIMRTLOC$KMAPSUBDIR
+- MACROSUBLOC = $VIMRTLOC$MACROSUBDIR
+- TOOLSSUBLOC = $VIMRTLOC$TOOLSSUBDIR
+- TUTORSUBLOC = $VIMRTLOC$TUTORSUBDIR
+- SPELLSUBLOC = $VIMRTLOC$SPELLSUBDIR
+- PRINTSUBLOC = $VIMRTLOC$PRINTSUBDIR
+- SCRIPTLOC = $VIMRTLOC
+-
+- ### Only set VIMRUNTIMEDIR when VIMRTLOC is set to a different location and
+- ### the runtime directory is not below it.
+- #VIMRUNTIMEDIR = $VIMRTLOC
+-
+- ### Name of the evim file target.
+- EVIM_FILE = $DESTDIR$SCRIPTLOC/evim.vim
+- MSWIN_FILE = $DESTDIR$SCRIPTLOC/mswin.vim
+-
+- ### Name of the menu file target.
+- SYS_MENU_FILE = $DESTDIR$SCRIPTLOC/menu.vim
+- SYS_SYNMENU_FILE = $DESTDIR$SCRIPTLOC/synmenu.vim
+- SYS_DELMENU_FILE = $DESTDIR$SCRIPTLOC/delmenu.vim
+-
+- ### Name of the bugreport file target.
+- SYS_BUGR_FILE = $DESTDIR$SCRIPTLOC/bugreport.vim
+-
+- ### Name of the file type detection file target.
+- SYS_FILETYPE_FILE = $DESTDIR$SCRIPTLOC/filetype.vim
+-
+- ### Name of the file type detection file target.
+- SYS_FTOFF_FILE = $DESTDIR$SCRIPTLOC/ftoff.vim
+-
+- ### Name of the file type detection script file target.
+- SYS_SCRIPTS_FILE = $DESTDIR$SCRIPTLOC/scripts.vim
+-
+- ### Name of the ftplugin-on file target.
+- SYS_FTPLUGIN_FILE = $DESTDIR$SCRIPTLOC/ftplugin.vim
+-
+- ### Name of the ftplugin-off file target.
+- SYS_FTPLUGOF_FILE = $DESTDIR$SCRIPTLOC/ftplugof.vim
+-
+- ### Name of the indent-on file target.
+- SYS_INDENT_FILE = $DESTDIR$SCRIPTLOC/indent.vim
+-
+- ### Name of the indent-off file target.
+- SYS_INDOFF_FILE = $DESTDIR$SCRIPTLOC/indoff.vim
+-
+- ### Name of the option window script file target.
+- SYS_OPTWIN_FILE = $DESTDIR$SCRIPTLOC/optwin.vim
+-
+- ### Permissions for binaries
+- BINMOD = 755
+-
+- ### Permissions for man page
+- MANMOD = 644
+-
+- ### Permissions for help files
+- HELPMOD = 644
+-
+- ### Permissions for Perl and shell scripts
+- SCRIPTMOD = 755
+-
+- ### Permission for Vim script files (menu.vim, bugreport.vim, ..)
+- VIMSCRIPTMOD = 644
+-
+- ### Permissions for all directories that are created
+- DIRMOD = 755
+-
+- ### Permissions for all other files that are created
+- FILEMOD = 644
+-
+- # Where to copy the man and help files from
+- HELPSOURCE = ../runtime/doc
+-
+- # Where to copy the script files from (menu, bugreport)
+- SCRIPTSOURCE = ../runtime
+-
+- # Where to copy the colorscheme files from
+- COLSOURCE = ../runtime/colors
+-
+- # Where to copy the syntax files from
+- SYNSOURCE = ../runtime/syntax
+-
+- # Where to copy the indent files from
+- INDSOURCE = ../runtime/indent
+-
+- # Where to copy the standard plugin files from
+- AUTOSOURCE = ../runtime/autoload
+-
+- # Where to copy the standard plugin files from
+- PLUGSOURCE = ../runtime/plugin
+-
+- # Where to copy the ftplugin files from
+- FTPLUGSOURCE = ../runtime/ftplugin
+-
+- # Where to copy the macro files from
+- MACROSOURCE = ../runtime/macros
+-
+- # Where to copy the tools files from
+- TOOLSSOURCE = ../runtime/tools
+-
+- # Where to copy the tutor files from
+- TUTORSOURCE = ../runtime/tutor
+-
+- # Where to copy the spell files from
+- SPELLSOURCE = ../runtime/spell
+-
+- # Where to look for language specific files
+- LANGSOURCE = ../runtime/lang
+-
+- # Where to look for compiler files
+- COMPSOURCE = ../runtime/compiler
+-
+- # Where to look for keymap files
+- KMAPSOURCE = ../runtime/keymap
+-
+- # Where to look for print resource files
+- PRINTSOURCE = ../runtime/print
+-
+- # abbreviations
+- DEST_BIN = $DESTDIR$BINDIR
+- DEST_VIM = $DESTDIR$VIMLOC
+- DEST_RT = $DESTDIR$VIMRTLOC
+- DEST_HELP = $DESTDIR$HELPSUBLOC
+- DEST_COL = $DESTDIR$COLSUBLOC
+- DEST_SYN = $DESTDIR$SYNSUBLOC
+- DEST_IND = $DESTDIR$INDSUBLOC
+- DEST_AUTO = $DESTDIR$AUTOSUBLOC
+- DEST_PLUG = $DESTDIR$PLUGSUBLOC
+- DEST_FTP = $DESTDIR$FTPLUGSUBLOC
+- DEST_LANG = $DESTDIR$LANGSUBLOC
+- DEST_COMP = $DESTDIR$COMPSUBLOC
+- DEST_KMAP = $DESTDIR$KMAPSUBLOC
+- DEST_MACRO = $DESTDIR$MACROSUBLOC
+- DEST_TOOLS = $DESTDIR$TOOLSSUBLOC
+- DEST_TUTOR = $DESTDIR$TUTORSUBLOC
+- DEST_SPELL = $DESTDIR$SPELLSUBLOC
+- DEST_SCRIPT = $DESTDIR$SCRIPTLOC
+- DEST_PRINT = $DESTDIR$PRINTSUBLOC
+- DEST_MAN_TOP = $DESTDIR$?(MANDIR)
+-
+- # We assume that the ".../man/xx/man1/" directory is for latin1 manual pages.
+- # Some systems use UTF-8, but these should find the ".../man/xx.UTF-8/man1/"
+- # directory first.
+- # FreeBSD uses ".../man/xx.ISO8859-1/man1" for latin1, use that one too.
+- DEST_MAN = $(DEST_MAN_TOP)$(MAN1DIR)
+- DEST_MAN_FR = $(DEST_MAN_TOP)/fr$(MAN1DIR)
+- DEST_MAN_FR_I = $(DEST_MAN_TOP)/fr.ISO8859-1$(MAN1DIR)
+- DEST_MAN_FR_U = $(DEST_MAN_TOP)/fr.UTF-8$(MAN1DIR)
+- DEST_MAN_IT = $(DEST_MAN_TOP)/it$(MAN1DIR)
+- DEST_MAN_IT_I = $(DEST_MAN_TOP)/it.ISO8859-1$(MAN1DIR)
+- DEST_MAN_IT_U = $(DEST_MAN_TOP)/it.UTF-8$(MAN1DIR)
+- DEST_MAN_PL = $(DEST_MAN_TOP)/pl.ISO8859-2$(MAN1DIR)
+- DEST_MAN_PL_U = $(DEST_MAN_TOP)/pl.UTF-8$(MAN1DIR)
+- DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR)
+- DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR)
+-
+- # These are directories, create them when needed.
+- :attr {directory = $DIRMOD} $DEST_BIN $DEST_VIM $DEST_RT $DEST_HELP $DEST_COL
+- $DEST_SYN $DEST_IND $DEST_AUTO $DEST_AUTO/xml $DEST_PLUG
+- $DEST_FTP $DEST_LANG
+- $DEST_COMP $DEST_KMAP $DEST_MACRO $DEST_TOOLS $DEST_TUTOR
+- $DEST_SCRIPT $DEST_PRINT $DEST_MAN $DEST_SPELL
+- $DEST_MAN_FR $DEST_MAN_FR_I $DEST_MAN_FR_U $DEST_MAN_IT
+- $DEST_MAN_IT_I $DEST_MAN_IT_U
+- $DEST_MAN_PL $DEST_MAN_PL_U
+- $DEST_MAN_RU $DEST_MAN_RU_U
+-
+- #
+- # I N S T A L L
+- #
+- install: $GUI_INSTALL
+-
+- install_normal:
+- @if not os.path.isdir(_no.DEST_BIN):
+- @try:
+- :mkdir $DEST_BIN
+- @except:
+- @ pass
+- @if os.access(_no.DEST_BIN, os.W_OK):
+- # Bin directory is writable, install directly.
+- :update installvim installtools $INSTALL_LANGS install-icons
+- @else:
+- # Bin directory is not writable, need to become root.
+- :print The destination directory "$DEST_BIN" is not writable.
+- :print If this is the wrong directory, use PREFIX to specify another one.
+- :print Otherwise, type the root password to continue installing.
+- :asroot $AAP install
+-
+- installvim {virtual}: installvimbin installtutorbin \
+- installruntime installlinks installmanlinks
+-
+- installvimbin {virtual}{force}: $Target $DEST_BIN
+- exe = $DEST_BIN/$VIMTARGET
+- @if os.path.exists(exe):
+- # Move the old executable aside and delete it. Any other method
+- # may cause a crash if the executable is currently being used.
+- :move {force} $exe $(exe).rm
+- :del {force} $(exe).rm
+- :copy $VIMTARGET $DEST_BIN
+- :do strip $exe
+- :chmod $BINMOD $DEST_BIN/$VIMTARGET
+- # may create a link to the new executable from /usr/bin/vi
+- @if _no.get("LINKIT"):
+- :sys $LINKIT
+-
+- # Long list of arguments for the shell script that installs the manual pages
+- # for one language.
+- INSTALLMANARGS = $(VIMLOC) $(SCRIPTLOC) $(VIMRCLOC) $(HELPSOURCE) $(MANMOD) \
+- $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME)
+-
+- # Install most of the runtime files
+- installruntime {virtual}: installrtbase installmacros installtutor installspell
+-
+- # install the help files; first adjust the contents for the location
+- installrtbase {virtual}{force}: $HELPSOURCE/vim.1 $DEST_VIM
+- $DEST_RT $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND
+- $DEST_FTP $DEST_AUTO $DEST_AUTO/xml $DEST_PLUG $DEST_TUTOR
+- $DEST_COMP $DEST_SPELL $DEST_PRINT
+- :chmod 755 installman.sh
+- :sys ./installman.sh install $(DEST_MAN) "" $(INSTALLMANARGS)
+-
+- :cd $HELPSOURCE
+- @try:
+- XTRA = `glob.glob("*.??x")` `glob.glob("tags-??")`
+- @except:
+- XTRA = # It's OK if there are no matches.
+- :copy *.txt tags $XTRA $DEST_HELP
+- :cd -
+- :cd $DEST_HELP
+- :chmod $HELPMOD *.txt tags $XTRA
+- :cd -
+- :copy $HELPSOURCE/*.pl $DEST_HELP
+- :chmod $SCRIPTMOD $DEST_HELP/*.pl
+- # install the menu files
+- :copy $SCRIPTSOURCE/menu.vim $SYS_MENU_FILE
+- :chmod $VIMSCRIPTMOD $SYS_MENU_FILE
+- :copy $SCRIPTSOURCE/synmenu.vim $SYS_SYNMENU_FILE
+- :chmod $VIMSCRIPTMOD $SYS_SYNMENU_FILE
+- :copy $SCRIPTSOURCE/delmenu.vim $SYS_DELMENU_FILE
+- :chmod $VIMSCRIPTMOD $SYS_DELMENU_FILE
+- # install the evim file
+- :copy $SCRIPTSOURCE/mswin.vim $MSWIN_FILE
+- :chmod $VIMSCRIPTMOD $MSWIN_FILE
+- :copy $SCRIPTSOURCE/evim.vim $EVIM_FILE
+- :chmod $VIMSCRIPTMOD $EVIM_FILE
+- # install the bugreport file
+- :copy $SCRIPTSOURCE/bugreport.vim $SYS_BUGR_FILE
+- :chmod $VIMSCRIPTMOD $SYS_BUGR_FILE
+- # install the example vimrc files
+- :copy $SCRIPTSOURCE/vimrc_example.vim $DEST_SCRIPT
+- :chmod $VIMSCRIPTMOD $DEST_SCRIPT/vimrc_example.vim
+- :copy $SCRIPTSOURCE/gvimrc_example.vim $DEST_SCRIPT
+- :chmod $VIMSCRIPTMOD $DEST_SCRIPT/gvimrc_example.vim
+- # install the file type detection files
+- :copy $SCRIPTSOURCE/filetype.vim $SYS_FILETYPE_FILE
+- :chmod $VIMSCRIPTMOD $SYS_FILETYPE_FILE
+- :copy $SCRIPTSOURCE/ftoff.vim $SYS_FTOFF_FILE
+- :chmod $VIMSCRIPTMOD $SYS_FTOFF_FILE
+- :copy $SCRIPTSOURCE/scripts.vim $SYS_SCRIPTS_FILE
+- :chmod $VIMSCRIPTMOD $SYS_SCRIPTS_FILE
+- :copy $SCRIPTSOURCE/ftplugin.vim $SYS_FTPLUGIN_FILE
+- :chmod $VIMSCRIPTMOD $SYS_FTPLUGIN_FILE
+- :copy $SCRIPTSOURCE/ftplugof.vim $SYS_FTPLUGOF_FILE
+- :chmod $VIMSCRIPTMOD $SYS_FTPLUGOF_FILE
+- :copy $SCRIPTSOURCE/indent.vim $SYS_INDENT_FILE
+- :chmod $VIMSCRIPTMOD $SYS_INDENT_FILE
+- :copy $SCRIPTSOURCE/indoff.vim $SYS_INDOFF_FILE
+- :chmod $VIMSCRIPTMOD $SYS_INDOFF_FILE
+- :copy $SCRIPTSOURCE/optwin.vim $SYS_OPTWIN_FILE
+- :chmod $VIMSCRIPTMOD $SYS_OPTWIN_FILE
+- # install the print resource files
+- :copy $PRINTSOURCE/*.ps $DEST_PRINT
+- :chmod $FILEMOD $DEST_PRINT/*.ps
+- # install the colorscheme files
+- :copy $COLSOURCE/*.vim $COLSOURCE/README.txt $DEST_COL
+- :chmod $HELPMOD $DEST_COL/*.vim $DEST_COL/README.txt
+- # install the syntax files
+- :copy $SYNSOURCE/*.vim $SYNSOURCE/README.txt $DEST_SYN
+- :chmod $HELPMOD $DEST_SYN/*.vim $DEST_SYN/README.txt
+- # install the indent files
+- :copy $INDSOURCE/*.vim $INDSOURCE/README.txt $DEST_IND
+- :chmod $HELPMOD $DEST_IND/*.vim
+- # install the standard autoload files
+- :copy $AUTOSOURCE/*.vim $AUTOSOURCE/README.txt $DEST_AUTO
+- :chmod $HELPMOD $DEST_AUTO/*.vim $DEST_AUTO/README.txt
+- :copy $AUTOSOURCE/xml/*.vim $DEST_AUTO/xml
+- :chmod $HELPMOD $DEST_AUTO/xml/*.vim
+- # install the standard plugin files
+- :copy $PLUGSOURCE/*.vim $PLUGSOURCE/README.txt $DEST_PLUG
+- :chmod $HELPMOD $DEST_PLUG/*.vim $DEST_PLUG/README.txt
+- # install the ftplugin files
+- :copy $FTPLUGSOURCE/*.vim $FTPLUGSOURCE/README.txt $DEST_FTP
+- :chmod $HELPMOD $DEST_FTP/*.vim $DEST_FTP/README.txt
+- # install the compiler files
+- :copy $COMPSOURCE/*.vim $COMPSOURCE/README.txt $DEST_COMP
+- :chmod $HELPMOD $DEST_COMP/*.vim $DEST_COMP/README.txt
+-
+- installmacros {virtual}{force}: $MACROSOURCE $DEST_VIM $DEST_RT $DEST_MACRO
+- :copy {recursive}{force} $MACROSOURCE/* $DEST_MACRO
+- # Delete any CVS and AAPDIR directories.
+- # Use the ":tree" command if possible. It was added later, fall back
+- # to using "find" when it doesn't work.
+- @try:
+- :tree $DEST_MACRO {dirname = CVS}
+- :del {recursive} $name
+- :tree $DEST_MACRO {dirname = AAPDIR}
+- :del {recursive} $name
+- :tree $DEST_MACRO {dirname = .*}
+- :chmod $DIRMOD $name
+- :tree $DEST_MACRO {filename = .*}
+- :chmod $FILEMOD $name
+- @except:
+- @ ok, cvsdirs = redir_system('find %s -name CVS -print' % _no.DEST_MACRO)
+- @ if ok and cvsdirs:
+- :del {recursive} $cvsdirs
+- :sys chmod $DIRMOD ``find $DEST_MACRO -type d -print``
+- :sys chmod $FILEMOD ``find $DEST_MACRO -type f -print``
+- :chmod $SCRIPTMOD $DEST_MACRO/less.sh
+-
+- # install the tutor files
+- installtutorbin {virtual}{force}: $DEST_VIM
+- :copy vimtutor $DEST_BIN/$(VIMNAME)tutor
+- :chmod $SCRIPTMOD $DEST_BIN/$(VIMNAME)tutor
+-
+- installtutor {virtual}{force}: $DEST_RT $DEST_TUTOR
+- :copy $TUTORSOURCE/tutor* $TUTORSOURCE/README* $DEST_TUTOR
+- :chmod $HELPMOD $DEST_TUTOR/*
+-
+- # Install the spell files, if they exist. This assumes at least the English
+- # spell file is there.
+- installspell {virtual}: $(DEST_VIM) $(DEST_RT) $(DEST_SPELL)
+- enspl = $(SPELLSOURCE)/en.latin1.spl
+- @if os.path.exists(enspl):
+- :copy $(SPELLSOURCE)/*.spl $(SPELLSOURCE)/*.vim $(DEST_SPELL)
+- :chmod $(HELPMOD) $(DEST_SPELL)/*.spl $(DEST_SPELL)/*.vim
+- @try:
+- :copy $(SPELLSOURCE)/*.sug $(DEST_SPELL)
+- :chmod $(HELPMOD) $(DEST_SPELL)/*.sug
+- @except:
+- @ pass
+-
+- # install helper program xxd
+- installtools {virtual}{force}: $TOOLS $DEST_BIN $DEST_MAN \
+- $TOOLSSOURCE $DEST_VIM $DEST_RT $DEST_TOOLS \
+- $INSTALL_TOOL_LANGS
+- xxd = $DEST_BIN/xxd$EXESUF
+- @if os.path.exists(xxd):
+- :move {force} $xxd $(xxd).rm
+- :del $(xxd).rm
+- :copy xxd/xxd$EXESUF $DEST_BIN
+- :do strip $DEST_BIN/xxd$EXESUF
+- :chmod $BINMOD $DEST_BIN/xxd$EXESUF
+- :chmod 755 installman.sh
+- :sys ./installman.sh xxd $(DEST_MAN) "" $(INSTALLMANARGS)
+- #
+- # install the runtime tools
+- @try:
+- @ if aap_has(":tree"):
+- # New method: copy everything and delete CVS and AAPDIR dirs
+- :copy {recursive} $TOOLSSOURCE/* $DEST_TOOLS
+- :tree $DEST_TOOLS {dirname = CVS}
+- :delete {recursive} $name
+- :tree $DEST_TOOLS {dirname = AAPDIR}
+- :delete {recursive} $name
+- @except:
+- # Old method: copy only specific files and directories.
+- :copy {recursive} $TOOLSSOURCE/README.txt $TOOLSSOURCE/[a-z]* $DEST_TOOLS
+- :chmod $FILEMOD $DEST_TOOLS/*
+- # replace the path in some tools
+- :progsearch perlpath perl
+- @if perlpath:
+- :cat $TOOLSSOURCE/efm_perl.pl |
+- :eval re.sub("/usr/bin/perl", perlpath, stdin)
+- >! $DEST_TOOLS/efm_perl.pl
+- @else:
+- :copy $TOOLSSOURCE/efm_perl.pl $DEST_TOOLS
+-
+- :progsearch awkpath nawk gawk awk
+- @if awkpath:
+- :cat $TOOLSSOURCE/mve.awk |
+- :eval re.sub("/usr/bin/nawk", awkpath, stdin)
+- >! $DEST_TOOLS/mve.awk
+- @else:
+- :copy $TOOLSSOURCE/mve.awk $DEST_TOOLS
+-
+- :sys chmod $SCRIPTMOD ``grep -l "^#!" $DEST_TOOLS/*``
+-
+- # install the language specific files for tools, if they were unpacked
+- install-tool-languages:
+- :chmod 755 installman.sh
+- :sys ./installman.sh xxd $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_IT) "-it" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS)
+- :sys ./installman.sh xxd $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS)
+-
+- # install the language specific files, if they were unpacked
+- install-languages {virtual}{force}: languages $DEST_LANG $DEST_KMAP
+- :chmod 755 installman.sh
+- :sys ./installman.sh install $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_IT) "-it" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS)
+- :sys ./installman.sh install $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS)
+- :chmod 755 installml.sh
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_FR) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_FR_I) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_FR_U) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_IT) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_IT_I) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_IT_U) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_PL) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_PL_U) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_RU) $(INSTALLMLARGS)
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_RU_U) $(INSTALLMLARGS)
+-
+- @if _no.MAKEMO:
+- :sys cd $PODIR; $MAKE prefix=$DESTDIR$prefix \
+- LOCALEDIR=$DEST_LANG INSTALL_DATA=cp FILEMOD=$FILEMOD install
+- @if os.path.exists(_no.LANGSOURCE):
+- :print installing language files
+- :copy $LANGSOURCE/README.txt $LANGSOURCE/*.vim $DEST_LANG
+- :chmod $FILEMOD $DEST_LANG/*.vim
+- @if os.path.exists(_no.KMAPSOURCE):
+- :copy $KMAPSOURCE/README.txt $KMAPSOURCE/*.vim $DEST_KMAP
+- :chmod $FILEMOD $DEST_KMAP/*.vim
+-
+- # install the icons for KDE, if the directory exists and the icon doesn't.
+- ICON48PATH = $DESTDIR$DATADIR/icons/hicolor/48x48/apps
+- ICON32PATH = $DESTDIR$DATADIR/icons/locolor/32x32/apps
+- ICON16PATH = $DESTDIR$DATADIR/icons/locolor/16x16/apps
+- KDEPATH = $HOME/.kde/share/icons
+- install-icons {virtual}:
+- gp = $ICON48PATH/gvim.png
+- @if os.path.isdir(_no.ICON48PATH) and not os.path.exists(gp):
+- :copy $SCRIPTSOURCE/vim48x48.png $gp
+- gp = $ICON32PATH/gvim.png
+- @if os.path.isdir(_no.ICON32PATH) and not os.path.exists(gp):
+- :copy $SCRIPTSOURCE/vim32x32.png $gp
+- gp = $ICON16PATH/gvim.png
+- @if os.path.isdir(_no.ICON16PATH) and not os.path.exists(gp):
+- :copy $SCRIPTSOURCE/vim16x16.png $gp
+-
+-
+- $HELPSOURCE/vim.1 $MACROSOURCE $TOOLSSOURCE:
+- @if not os.path.exists(_no.TOOLSSOURCE):
+- :print Runtime files not found.
+- :error You need to unpack the runtime archive before running "make install".
+-
+- # create links from various names to vim. This is only done when the links
+- # (or executables with the same name) don't exist yet.
+- installlinks {virtual}: $GUI_TARGETS \
+- $DEST_BIN/$EXTARGET \
+- $DEST_BIN/$VIEWTARGET \
+- $DEST_BIN/$RVIMTARGET \
+- $DEST_BIN/$RVIEWTARGET \
+- $INSTALLVIMDIFF
+-
+- installglinks {virtual}: $DEST_BIN/$GVIMTARGET \
+- $DEST_BIN/$GVIEWTARGET \
+- $DEST_BIN/$RGVIMTARGET \
+- $DEST_BIN/$RGVIEWTARGET \
+- $DEST_BIN/$EVIMTARGET \
+- $DEST_BIN/$EVIEWTARGET \
+- $INSTALLGVIMDIFF
+-
+- installvimdiff {virtual}: $DEST_BIN/$VIMDIFFTARGET
+- installgvimdiff {virtual}: $DEST_BIN/$GVIMDIFFTARGET
+-
+- # These dependencies use an empty buildcheck so that they are only done when
+- # the target doesn't exist.
+- $DEST_BIN/$EXTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $EXTARGET
+-
+- $DEST_BIN/$VIEWTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $VIEWTARGET
+-
+- $DEST_BIN/$GVIMTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMTARGET
+-
+- $DEST_BIN/$GVIEWTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIEWTARGET
+-
+- $DEST_BIN/$RVIMTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIMTARGET
+-
+- $DEST_BIN/$RVIEWTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIEWTARGET
+-
+- $DEST_BIN/$RGVIMTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIMTARGET
+-
+- $DEST_BIN/$RGVIEWTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIEWTARGET
+-
+- $DEST_BIN/$VIMDIFFTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $VIMDIFFTARGET
+-
+- $DEST_BIN/$GVIMDIFFTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMDIFFTARGET
+-
+- $DEST_BIN/$EVIMTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIMTARGET
+-
+- $DEST_BIN/$EVIEWTARGET: {buildcheck = }
+- :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIEWTARGET
+-
+- # create links for the manual pages with various names to vim. This is only
+- # done when the links (or manpages with the same name) don't exist yet.
+- INSTALLMLARGS = $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME) \
+- $(EXNAME) $(VIEWNAME) $(RVIMNAME) $(RVIEWNAME) \
+- $(GVIMNAME) $(GVIEWNAME) $(RGVIMNAME) $(RGVIEWNAME) \
+- $(GVIMDIFFNAME) $(EVIEWNAME)
+-
+- installmanlinks {virtual}:
+- :chmod 755 installml.sh
+- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN) $(INSTALLMLARGS)
+-
+- #
+- # U N I N S T A L L
+- #
+- uninstall {virtual}{force}: uninstall_runtime
+- :del {force} $DEST_BIN/$VIMTARGET
+- :del {force} $DEST_BIN/vimtutor
+- :del {force} $DEST_BIN/$EXTARGET $DEST_BIN/$VIEWTARGET
+- :del {force} $DEST_BIN/$GVIMTARGET $DEST_BIN/$GVIEWTARGET
+- :del {force} $DEST_BIN/$RVIMTARGET $DEST_BIN/$RVIEWTARGET
+- :del {force} $DEST_BIN/$RGVIMTARGET $DEST_BIN/$RGVIEWTARGET
+- :del {force} $DEST_BIN/$VIMDIFFTARGET $DEST_BIN/$GVIMDIFFTARGET
+- :del {force} $DEST_BIN/$EVIMTARGET $DEST_BIN/$EVIEWTARGET
+- :del {force} $DEST_BIN/xxd$EXESUF
+-
+- # Note: "deldir" will fail if any files were added after "make install", that
+- # is intentionally: Keep files the user added.
+- uninstall_runtime {virtual}{force}:
+- :chmod 755 installman.sh
+- :sys ./installman.sh uninstall $(DEST_MAN) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_FR) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_FR_I) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_FR_U) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_IT) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_IT_I) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_IT_U) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_PL) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_PL_U) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_RU) "" $(INSTALLMANARGS)
+- :sys ./installman.sh uninstall $(DEST_MAN_RU_U) "" $(INSTALLMANARGS)
+- :chmod 755 installml.sh
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_FR) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_FR_I) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_FR_U) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_IT) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_IT_I) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_IT_U) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_PL) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_PL_U) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_RU) $(INSTALLMLARGS)
+- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+- $(DEST_MAN_RU_U) $(INSTALLMLARGS)
+- :del {force} $DEST_MAN/xxd.1
+- :del {force} $(DEST_MAN_FR)/xxd.1 $(DEST_MAN_FR_I)/xxd.1 $(DEST_MAN_FR_U)/xxd.1
+- :del {force} $(DEST_MAN_IT)/xxd.1 $(DEST_MAN_IT_I)/xxd.1 $(DEST_MAN_IT_U)/xxd.1
+- :del {force} $(DEST_MAN_PL)/xxd.1 $(DEST_MAN_PL_U)/xxd.1
+- :del {force} $(DEST_MAN_RU)/xxd.1 $(DEST_MAN_RU_U)/xxd.1
+-
+- :del {force} $DEST_HELP/*.txt $DEST_HELP/tags $DEST_HELP/*.pl
+- :del {force} $SYS_MENU_FILE $SYS_SYNMENU_FILE $SYS_DELMENU_FILE
+- :del {force} $SYS_BUGR_FILE $EVIM_FILE $MSWIN_FILE
+- :del {force} $DEST_SCRIPT/gvimrc_example.vim $DEST_SCRIPT/vimrc_example.vim
+- :del {force} $SYS_FILETYPE_FILE $SYS_FTOFF_FILE $SYS_SCRIPTS_FILE
+- :del {force} $SYS_INDOFF_FILE $SYS_INDENT_FILE
+- :del {force} $SYS_FTPLUGOF_FILE $SYS_FTPLUGIN_FILE
+- :del {force} $SYS_OPTWIN_FILE
+- :del {force} $DEST_COL/*.vim $DEST_COL/README.txt
+- :del {force} $DEST_SYN/*.vim $DEST_SYN/README.txt
+- :del {force} $DEST_IND/*.vim $DEST_IND/README.txt
+- :del {force} $DEST_PRINT/*.ps
+- :del {force}{recursive} $DEST_MACRO
+- :del {force}{recursive} $DEST_TUTOR
+- :del {force}{recursive} $DEST_SPELL
+- :del {force}{recursive} $DEST_TOOLS
+- :del {force}{recursive} $DEST_LANG
+- :del {force}{recursive} $DEST_KMAP
+- :del {force}{recursive} $DEST_COMP
+- :deldir {force} $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND
+- :del {force}{recursive} $DEST_FTP/*.vim $DEST_FTP/README.txt
+- :del {force} $DEST_AUTO/*.vim $DEST_AUTO/README.txt $DEST_AUTO/xml/*.vim
+- :del {force} $DEST_PLUG/*.vim $DEST_PLUG/README.txt
+- :deldir {force} $DEST_FTP $DEST_AUTO/xml $DEST_AUTO $DEST_PLUG $DEST_PRINT $DEST_RT
+- # This will fail when other Vim versions are installed, no worries.
+- @try:
+- :deldir $DEST_VIM
+- @except:
+- :print Cannot delete $DEST_VIM
+-
+- ###############################################################################
+- ### MacOS X installation
+- ###
+- ### This installs a runnable Vim.app in $(prefix)
+-
+- REZ = /Developer/Tools/Rez
+- RESDIR = $(APPDIR)/Contents/Resources
+- @r = re.compile('.*VIM_VERSION_SHORT\\s*"(\\d[^"]*)".*', re.S)
+- VERSION = /`r.match(open("version.h").read()).group(1)`
+-
+- ### Common flags
+- M4FLAGSX = $?(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \
+- -DAPP_VER=$(VERSION)
+-
+- # Resources used for the Mac are in one directory.
+- RSRC_DIR = os_mac_rsrc
+-
+- :attr {directory = $DIRMOD} $RESDIR
+-
+- install_macosx {virtual}: gui_bundle
+- # Remove the link to the runtime dir, don't want to copy all of that.
+- :delete {force} $(RESDIR)/vim/runtime
+- :copy {r} $APPDIR $DESTDIR$prefix
+- :tree $DESTDIR$prefix {dirname = AAPDIR}
+- :delete {recursive} $name
+- # Install the runtime files. Recursive!
+- :mkdir {r}{f} $DESTDIR$prefix/$RESDIR/vim/runtime
+- # :mkdir $(DESTDIR)$(prefix)/$(APPDIR)/bin
+- :execute main.aap PREFIX=$DESTDIR$prefix/$RESDIR/vim VIMRTLOC=$DESTDIR$prefix/$RESDIR/vim/runtime installruntime
+- # Put the link back.
+- :symlink `os.getcwd()`/../runtime $RESDIR/vim/runtime
+- # TODO: Create the vimtutor application.
+-
+- gui_bundle {virtual}: $(RESDIR) bundle-dir bundle-executable bundle-info \
+- bundle-resource bundle-language
+-
+- bundle-dir {virtual}: $(APPDIR)/Contents $(VIMTARGET)
+- # Make a link to the runtime directory, so that we can try out the executable
+- # without installing it.
+- :mkdir {r}{f} $(RESDIR)/vim
+- :symlink {quiet} `os.getcwd()`/../runtime $(RESDIR)/vim/runtime
+-
+- bundle-executable {virtual}: $(VIMTARGET)
+- :mkdir {r}{f} $(APPDIR)/Contents/MacOS
+- :copy $(VIMTARGET) $(APPDIR)/Contents/MacOS/$(VIMTARGET)
+-
+- bundle-info {virtual}: bundle-dir
+- :print Creating PkgInfo
+- :print "APPLVIM!" >! $(APPDIR)/Contents/PkgInfo
+- :print Creating Info.plist
+- :sys m4 $(M4FLAGSX) infplist.xml > $(APPDIR)/Contents/Info.plist
+-
+- bundle-resource {virtual}: bundle-dir bundle-rsrc
+- :copy {force} $(RSRC_DIR)/*.icns $(RESDIR)
+-
+- ### Classic resources
+- # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9)
+- # This file is also required for OS X Vim.
+- bundle-rsrc {virtual}: os_mac.rsr.hqx
+- :print Creating resource fork
+- :sys python dehqx.py $source
+- :del {force} gui_mac.rsrc
+- :move gui_mac.rsrc.rsrcfork $(RESDIR)/$(VIMNAME).rsrc
+-
+- # po/Make_osx.pl says something about generating a Mac message file
+- # for Ukrainian. Would somebody using Mac OS X in Ukrainian
+- # *really* be upset that Carbon Vim was not localised in
+- # Ukrainian?
+- #
+- #bundle-language: bundle-dir po/Make_osx.pl
+- # cd po && perl Make_osx.pl --outdir ../$(RESDIR) $(MULTILANG)
+- bundle-language {virtual}: bundle-dir
+-
+- $(APPDIR)/Contents:
+- :mkdir {r} $(APPDIR)/Contents/MacOS
+- :mkdir {r} $(RESDIR)/English.lproj
+-
+-
+- # vim: sts=4 sw=4 :
+--- 0 ----
+*** ../vim-8.1.0345/src/testdir/main.aap 2018-01-31 19:23:08.000000000 +0100
+--- src/testdir/main.aap 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,57 ****
+- #
+- # Makefile to run all tests for Vim
+- #
+-
+- VimProg ?= ../vim
+-
+- Scripts = test1.out test2.out test3.out test6.out
+- test11.out
+- test13.out test14.out test17.out
+- test18.out test21.out
+- test27.out test29.out test30.out
+- test37.out
+- test39.out test42.out
+- test44.out test46.out test47.out
+- test48.out test49.out test74.out
+-
+- ScriptsGUI = test16.out
+-
+- # Build "nongui" when no target was specified.
+- nongui: newlog $Scripts
+- :print
+- :cat test.log
+- :print ALL DONE
+-
+- # Build "ngui" when specified.
+- gui: newlog $Scripts $ScriptsGUI
+- :print
+- :cat test.log
+- :print ALL DONE
+-
+- $Scripts $ScriptsGUI: $VimProg
+-
+- clean:
+- :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X*
+-
+- # test1 is special, it checks for features
+- test1.out: test1.in
+- :del {force} test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim
+- :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in
+- @if os.system("diff test.out test1.ok") != 0:
+- :error test1 FAILED - Something basic is wrong
+- :move {force} test.out test1.out
+- :del {r}{force} X*
+-
+- :rule %.out : %.in
+- :del {force} $(match).failed test.ok
+- :copy $(match).ok test.ok
+- :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in $(match).in
+- @if os.system("diff test.out " + match + ".ok") != 0:
+- :print $match FAILED >>test.log
+- :move {force} test.out $(match).failed
+- @else:
+- :move {force} test.out $(match).out
+- :del {r}{force} X* test.ok
+-
+- newlog:
+- :print Test results: >! test.log
+--- 0 ----
+*** ../vim-8.1.0345/src/config.aap.in 2018-04-11 22:14:38.000000000 +0200
+--- src/config.aap.in 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,129 ****
+- # config.aap.in: recipe transformed into auto/config.aap by configure.
+-
+- VIMNAME = @VIMNAME@
+- EXNAME = @EXNAME@
+- VIEWNAME = @VIEWNAME@
+-
+- CC = @CC@
+- DEFS = @DEFS@
+- CONF_CFLAGS = @CFLAGS@
+- CPPFLAGS = @CPPFLAGS@
+- srcdir = @srcdir@
+- VPATH = @srcdir@
+- CONF_LDFLAGS = @LDFLAGS@
+- CONF_LIBS = @LIBS@
+- TAGPRG = @TAGPRG@
+-
+- CPP = @CPP@
+- CPP_MM = @CPP_MM@
+- X_CFLAGS = @X_CFLAGS@
+- X_LIBS_DIR = @X_LIBS@
+- X_PRE_LIBS = @X_PRE_LIBS@
+- X_EXTRA_LIBS = @X_EXTRA_LIBS@
+- X_LIBS = @X_LIB@
+-
+- LUA_LIBS = @LUA_LIBS@
+- LUA_SRC = @LUA_SRC@
+- LUA_OBJ = @LUA_OBJ@
+- LUA_CFLAGS = @LUA_CFLAGS@
+- LUA_PRO = @LUA_PRO@
+-
+- MZSCHEME_LIBS = @MZSCHEME_LIBS@
+- MZSCHEME_SRC = @MZSCHEME_SRC@
+- MZSCHEME_OBJ = @MZSCHEME_OBJ@
+- MZSCHEME_CFLAGS = @MZSCHEME_CFLAGS@
+- MZSCHEME_PRO = @MZSCHEME_PRO@
+-
+- PERL = @vi_cv_path_perl@
+- PERLLIB = @vi_cv_perllib@
+- PERL_LIBS = @PERL_LIBS@
+- SHRPENV = @shrpenv@
+- PERL_SRC = @PERL_SRC@
+- PERL_OBJ = @PERL_OBJ@
+- PERL_PRO = @PERL_PRO@
+- PERL_CFLAGS = @PERL_CFLAGS@
+-
+- PYTHON_SRC = @PYTHON_SRC@
+- PYTHON_OBJ = @PYTHON_OBJ@
+- PYTHON_CFLAGS = @PYTHON_CFLAGS@
+- PYTHON_LIBS = @PYTHON_LIBS@
+-
+- TCL = @vi_cv_path_tcl@
+- TCL_SRC = @TCL_SRC@
+- TCL_OBJ = @TCL_OBJ@
+- TCL_PRO = @TCL_PRO@
+- TCL_CFLAGS = @TCL_CFLAGS@
+- TCL_LIBS = @TCL_LIBS@
+-
+- HANGULIN_SRC = @HANGULIN_SRC@
+- HANGULIN_OBJ = @HANGULIN_OBJ@
+-
+- WORKSHOP_SRC = @WORKSHOP_SRC@
+- WORKSHOP_OBJ = @WORKSHOP_OBJ@
+-
+- NETBEANS_SRC = @NETBEANS_SRC@
+- NETBEANS_OBJ = @NETBEANS_OBJ@
+- CHANNEL_SRC = @CHANNEL_SRC@
+- CHANNEL_OBJ = @CHANNEL_OBJ@
+-
+- RUBY = @vi_cv_path_ruby@
+- RUBY_SRC = @RUBY_SRC@
+- RUBY_OBJ = @RUBY_OBJ@
+- RUBY_PRO = @RUBY_PRO@
+- RUBY_CFLAGS = @RUBY_CFLAGS@
+- RUBY_LIBS = @RUBY_LIBS@
+-
+- AWK = @AWK@
+-
+- STRIP = @STRIP@
+-
+- EXEEXT = @EXEEXT@
+-
+- COMPILEDBY = @compiledby@
+-
+- INSTALLVIMDIFF = @dovimdiff@
+- INSTALLGVIMDIFF = @dogvimdiff@
+- INSTALL_LANGS = @INSTALL_LANGS@
+- INSTALL_TOOL_LANGS = @INSTALL_TOOL_LANGS@
+-
+- ### Line break character as octal number for "tr"
+- NL = @line_break@
+-
+- ### Top directory for everything
+- # Can be overruled with "PREFIX=dir", thus delay using it.
+- prefix = @prefix@
+-
+- ### Top directory for the binary
+- exec_prefix $= @exec_prefix@
+-
+- ### Prefix for location of data files
+- BINDIR $= @bindir@
+-
+- ### For autoconf 2.60 and later (avoid a warning)
+- datarootdir $= @datarootdir@
+-
+- ### Prefix for location of data files
+- DATADIR $= @datadir@
+-
+- ### Prefix for location of man pages
+- MANDIR $= @mandir@
+-
+- ### Do we have a GUI
+- GUI = @GUITYPE@
+- NARROW_PROTO = @NARROW_PROTO@
+- GTK_LIBNAME = @GTK_LIBNAME@
+- MOTIF_LIBNAME = @MOTIF_LIBNAME@
+- GUI_INC_LOC = @GUI_INC_LOC@
+- GUI_LIB_LOC = @GUI_LIB_LOC@
+- GUI_X_LIBS = @GUI_X_LIBS@
+-
+- ### Any OS dependent extra source and object file
+- OS_EXTRA_SRC = @OS_EXTRA_SRC@
+- OS_EXTRA_OBJ = @OS_EXTRA_OBJ@
+-
+- ### If the *.po files are to be translated to *.mo files.
+- MAKEMO = @MAKEMO@
+-
+- # Make sure that "make first" will run "make all" once configure has done its
+- # work. This is needed when using the Makefile in the top directory.
+- first: all
+--- 0 ----
+*** ../vim-8.1.0345/runtime/macros/maze/main.aap 2010-05-15 13:04:01.000000000 +0200
+--- runtime/macros/maze/main.aap 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,4 ****
+- # Aap recipe to build the maze program
+- :program maze : mazeansi.c
+-
+- :program mazeclean : mazeclean.c
+--- 0 ----
+*** ../vim-8.1.0345/src/version.c 2018-09-02 15:18:38.910627833 +0200
+--- src/version.c 2018-09-02 15:25:50.977703769 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 346,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+11. You find yourself typing "com" after every period when using a word
+ processor.com
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0347 b/data/vim/patches/8.1.0347
new file mode 100644
index 000000000..4c45fdef8
--- /dev/null
+++ b/data/vim/patches/8.1.0347
@@ -0,0 +1,174 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0347
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0347
+Problem: Some tests fail on Solaris.
+Solution: Skip writefile test. Fix path to libc.so. Improve test for Turkish
+ case change. (Libor Bukata, Bjorn Linse, closes #3403)
+Files: src/testdir/test_functions.vim, src/testdir/test_normal.vim,
+ src/testdir/test_writefile.vim
+
+
+*** ../vim-8.1.0346/src/testdir/test_functions.vim 2018-08-20 22:53:00.210105086 +0200
+--- src/testdir/test_functions.vim 2018-09-03 22:05:48.870072965 +0200
+***************
+*** 1,4 ****
+--- 1,5 ----
+ " Tests for various functions.
++ source shared.vim
+
+ " Must be done first, since the alternate buffer must be unset.
+ func Test_00_bufexists()
+***************
+*** 1006,1011 ****
+--- 1007,1023 ----
+ let libc = 'msvcrt.dll'
+ elseif has('mac')
+ let libc = 'libSystem.B.dylib'
++ elseif system('uname -s') =~ 'SunOS'
++ " Set the path to libc.so according to the architecture.
++ let test_bits = system('file ' . GetVimProg())
++ let test_arch = system('uname -p')
++ if test_bits =~ '64-bit' && test_arch =~ 'sparc'
++ let libc = '/usr/lib/sparcv9/libc.so'
++ elseif test_bits =~ '64-bit' && test_arch =~ 'i386'
++ let libc = '/usr/lib/amd64/libc.so'
++ else
++ let libc = '/usr/lib/libc.so'
++ endif
+ else
+ " On Unix, libc.so can be in various places.
+ " Interestingly, using an empty string for the 1st argument of libcall
+*** ../vim-8.1.0346/src/testdir/test_normal.vim 2018-08-24 22:07:54.094796047 +0200
+--- src/testdir/test_normal.vim 2018-09-03 22:02:34.495974021 +0200
+***************
+*** 1630,1641 ****
+ norm! V~
+ call assert_equal('THIS IS A simple test: äüöss', getline('.'))
+
+! " Turkish ASCII turns to multi-byte. On Mac the Turkish locale is available
+! " but toupper()/tolower() don't do the right thing.
+! if !has('mac') && !has('osx')
+! try
+! lang tr_TR.UTF-8
+! set casemap=
+ call setline(1, 'iI')
+ 1normal gUU
+ call assert_equal("\u0130I", getline(1))
+--- 1630,1642 ----
+ norm! V~
+ call assert_equal('THIS IS A simple test: äüöss', getline('.'))
+
+! " Turkish ASCII turns to multi-byte. On some systems Turkish locale
+! " is available but toupper()/tolower() don't do the right thing.
+! try
+! lang tr_TR.UTF-8
+! set casemap=
+! let iupper = toupper('i')
+! if iupper == "\u0130"
+ call setline(1, 'iI')
+ 1normal gUU
+ call assert_equal("\u0130I", getline(1))
+***************
+*** 1645,1652 ****
+ 1normal guu
+ call assert_equal("i\u0131", getline(1))
+ call assert_equal("i\u0131", tolower("iI"))
+!
+! set casemap&
+ call setline(1, 'iI')
+ 1normal gUU
+ call assert_equal("II", getline(1))
+--- 1646,1652 ----
+ 1normal guu
+ call assert_equal("i\u0131", getline(1))
+ call assert_equal("i\u0131", tolower("iI"))
+! elseif iupper == "I"
+ call setline(1, 'iI')
+ 1normal gUU
+ call assert_equal("II", getline(1))
+***************
+*** 1656,1668 ****
+ 1normal guu
+ call assert_equal("ii", getline(1))
+ call assert_equal("ii", tolower("iI"))
+!
+! lang en_US.UTF-8
+! catch /E197:/
+! " can't use Turkish locale
+! throw 'Skipped: Turkish locale not available'
+! endtry
+! endif
+
+ " clean up
+ bw!
+--- 1656,1680 ----
+ 1normal guu
+ call assert_equal("ii", getline(1))
+ call assert_equal("ii", tolower("iI"))
+! else
+! call assert_true(false, "expected toupper('i') to be either 'I' or '\u0130'")
+! endif
+! set casemap&
+! call setline(1, 'iI')
+! 1normal gUU
+! call assert_equal("II", getline(1))
+! call assert_equal("II", toupper("iI"))
+!
+! call setline(1, 'iI')
+! 1normal guu
+! call assert_equal("ii", getline(1))
+! call assert_equal("ii", tolower("iI"))
+!
+! lang en_US.UTF-8
+! catch /E197:/
+! " can't use Turkish locale
+! throw 'Skipped: Turkish locale not available'
+! endtry
+
+ " clean up
+ bw!
+*** ../vim-8.1.0346/src/testdir/test_writefile.vim 2018-08-30 13:07:12.026033864 +0200
+--- src/testdir/test_writefile.vim 2018-09-03 22:02:34.495974021 +0200
+***************
+*** 33,39 ****
+ endfunc
+
+ func Test_writefile_fails_conversion()
+! if !has('multi_byte') || !has('iconv')
+ return
+ endif
+ set nobackup nowritebackup
+--- 33,39 ----
+ endfunc
+
+ func Test_writefile_fails_conversion()
+! if !has('multi_byte') || !has('iconv') || system('uname -s') =~ 'SunOS'
+ return
+ endif
+ set nobackup nowritebackup
+*** ../vim-8.1.0346/src/version.c 2018-09-02 15:26:53.829022193 +0200
+--- src/version.c 2018-09-03 22:04:32.654818113 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 347,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+17. You turn on your intercom when leaving the room so you can hear if new
+ e-mail arrives.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0348 b/data/vim/patches/8.1.0348
new file mode 100644
index 000000000..dd8c83709
--- /dev/null
+++ b/data/vim/patches/8.1.0348
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0348
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0348
+Problem: On Travis the slowest build is run last. (Dominique Pelle)
+Solution: Reorder the build entries.
+Files: .travis.yml
+
+
+*** ../vim-8.1.0347/.travis.yml 2018-07-01 21:12:49.765572778 +0200
+--- .travis.yml 2018-09-05 22:23:08.543266993 +0200
+***************
+*** 10,28 ****
+ - gcc
+
+ env:
+ - BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
+ - BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
+ - BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
+ - BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+- - BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ # Mac OSX build
+ - BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
+- # ASAN build
+- - BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
+- FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
+- "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
+
+ sudo: false
+
+--- 10,28 ----
+ - gcc
+
+ env:
++ - BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
++ # ASAN build
++ - BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
++ FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
++ "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
+ - BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
+ - BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
+ - BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
+ - BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ # Mac OSX build
+ - BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
+ "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
+
+ sudo: false
+
+*** ../vim-8.1.0347/src/version.c 2018-09-03 22:08:05.676736128 +0200
+--- src/version.c 2018-09-05 22:24:12.503252094 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 348,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+24. You realize there is not a sound in the house and you have no idea where
+ your children are.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0349 b/data/vim/patches/8.1.0349
new file mode 100644
index 000000000..bf71803cb
--- /dev/null
+++ b/data/vim/patches/8.1.0349
@@ -0,0 +1,187 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0349
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0349
+Problem: Crash when wiping buffer in a callback.
+Solution: Do not handle messages when only peeking for a character.
+ (closes #2107) Add "redraw_flag" to test_override().
+Files: src/os_unix.c, src/os_win32.c, src/screen.c, src/evalfunc.c,
+ src/globals.h, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.0348/src/os_unix.c 2018-08-27 23:24:13.064009239 +0200
+--- src/os_unix.c 2018-09-06 13:12:40.441556794 +0200
+***************
+*** 417,426 ****
+ handle_resize();
+
+ #ifdef MESSAGE_QUEUE
+! parse_queued_messages();
+! /* If input was put directly in typeahead buffer bail out here. */
+! if (typebuf_changed(tb_change_cnt))
+! return 0;
+ #endif
+ if (wtime < 0 && did_start_blocking)
+ /* blocking and already waited for p_ut */
+--- 417,430 ----
+ handle_resize();
+
+ #ifdef MESSAGE_QUEUE
+! // Only process messages when waiting.
+! if (wtime != 0)
+! {
+! parse_queued_messages();
+! // If input was put directly in typeahead buffer bail out here.
+! if (typebuf_changed(tb_change_cnt))
+! return 0;
+! }
+ #endif
+ if (wtime < 0 && did_start_blocking)
+ /* blocking and already waited for p_ut */
+*** ../vim-8.1.0348/src/os_win32.c 2018-08-30 17:47:01.949560920 +0200
+--- src/os_win32.c 2018-09-06 12:12:22.506417572 +0200
+***************
+*** 1529,1543 ****
+ */
+ for (;;)
+ {
+ #ifdef MESSAGE_QUEUE
+! parse_queued_messages();
+ #endif
+ #ifdef FEAT_MZSCHEME
+! mzvim_check_threads();
+ #endif
+ #ifdef FEAT_CLIENTSERVER
+! serverProcessPendingMessages();
+ #endif
+
+ if (0
+ #ifdef FEAT_MOUSE
+--- 1529,1547 ----
+ */
+ for (;;)
+ {
++ // Only process messages when waiting.
++ if (msec != 0)
++ {
+ #ifdef MESSAGE_QUEUE
+! parse_queued_messages();
+ #endif
+ #ifdef FEAT_MZSCHEME
+! mzvim_check_threads();
+ #endif
+ #ifdef FEAT_CLIENTSERVER
+! serverProcessPendingMessages();
+ #endif
++ }
+
+ if (0
+ #ifdef FEAT_MOUSE
+*** ../vim-8.1.0348/src/screen.c 2018-09-02 15:07:21.977655529 +0200
+--- src/screen.c 2018-09-06 12:37:10.783837405 +0200
+***************
+*** 10819,10826 ****
+ return 0;
+ else
+ #endif
+! return (!RedrawingDisabled
+! && !(p_lz && char_avail() && !KeyTyped && !do_redraw));
+ }
+
+ /*
+--- 10819,10829 ----
+ return 0;
+ else
+ #endif
+! return ((!RedrawingDisabled
+! #ifdef FEAT_EVAL
+! || ignore_redraw_flag_for_testing
+! #endif
+! ) && !(p_lz && char_avail() && !KeyTyped && !do_redraw));
+ }
+
+ /*
+*** ../vim-8.1.0348/src/evalfunc.c 2018-09-02 14:25:02.330801508 +0200
+--- src/evalfunc.c 2018-09-06 12:38:22.375337484 +0200
+***************
+*** 13073,13078 ****
+--- 13073,13080 ----
+
+ if (STRCMP(name, (char_u *)"redraw") == 0)
+ disable_redraw_for_testing = val;
++ else if (STRCMP(name, (char_u *)"redraw_flag") == 0)
++ ignore_redraw_flag_for_testing = val;
+ else if (STRCMP(name, (char_u *)"char_avail") == 0)
+ disable_char_avail_for_testing = val;
+ else if (STRCMP(name, (char_u *)"starting") == 0)
+***************
+*** 13095,13100 ****
+--- 13097,13103 ----
+ {
+ disable_char_avail_for_testing = FALSE;
+ disable_redraw_for_testing = FALSE;
++ ignore_redraw_flag_for_testing = FALSE;
+ nfa_fail_for_testing = FALSE;
+ if (save_starting >= 0)
+ {
+*** ../vim-8.1.0348/src/globals.h 2018-08-21 19:47:44.720053833 +0200
+--- src/globals.h 2018-09-06 12:38:43.019189178 +0200
+***************
+*** 1633,1641 ****
+ EXTERN int alloc_fail_repeat INIT(= 0);
+
+ /* flags set by test_override() */
+! EXTERN int disable_char_avail_for_testing INIT(= 0);
+! EXTERN int disable_redraw_for_testing INIT(= 0);
+! EXTERN int nfa_fail_for_testing INIT(= 0);
+
+ EXTERN int in_free_unref_items INIT(= FALSE);
+ #endif
+--- 1633,1642 ----
+ EXTERN int alloc_fail_repeat INIT(= 0);
+
+ /* flags set by test_override() */
+! EXTERN int disable_char_avail_for_testing INIT(= FALSE);
+! EXTERN int disable_redraw_for_testing INIT(= FALSE);
+! EXTERN int ignore_redraw_flag_for_testing INIT(= FALSE);
+! EXTERN int nfa_fail_for_testing INIT(= FALSE);
+
+ EXTERN int in_free_unref_items INIT(= FALSE);
+ #endif
+*** ../vim-8.1.0348/runtime/doc/eval.txt 2018-09-02 15:18:38.906627880 +0200
+--- runtime/doc/eval.txt 2018-09-06 12:34:54.793088505 +0200
+***************
+*** 8728,8733 ****
+--- 8737,8743 ----
+
+ name effect when {val} is non-zero ~
+ redraw disable the redrawing() function
++ redraw_flag ignore the RedrawingDisabled flag
+ char_avail disable the char_avail() function
+ starting reset the "starting" variable, see below
+ nfa_fail makes the NFA regexp engine fail to force a
+*** ../vim-8.1.0348/src/version.c 2018-09-05 22:25:45.999112143 +0200
+--- src/version.c 2018-09-06 12:36:05.184408056 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 349,
+ /**/
+
+--
+Anyone who is capable of getting themselves made President should on no
+account be allowed to do the job.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0350 b/data/vim/patches/8.1.0350
new file mode 100644
index 000000000..1206f9c18
--- /dev/null
+++ b/data/vim/patches/8.1.0350
@@ -0,0 +1,219 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0350
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0350
+Problem: Vim may block on ch_sendraw() when the job is sending data back to
+ Vim, which isn't read yet. (Nate Bosch)
+Solution: Add the "noblock" option to job_start(). (closes #2548)
+Files: src/channel.c, src/structs.h, src/testdir/test_channel.vim,
+ runtime/doc/channel.txt
+
+
+*** ../vim-8.1.0349/src/channel.c 2018-08-09 22:15:30.042856715 +0200
+--- src/channel.c 2018-09-06 16:08:40.193230860 +0200
+***************
+*** 1180,1185 ****
+--- 1180,1186 ----
+ channel->ch_part[PART_OUT].ch_mode = opt->jo_out_mode;
+ if (opt->jo_set & JO_ERR_MODE)
+ channel->ch_part[PART_ERR].ch_mode = opt->jo_err_mode;
++ channel->ch_nonblock = opt->jo_noblock;
+
+ if (opt->jo_set & JO_TIMEOUT)
+ for (part = PART_SOCK; part < PART_COUNT; ++part)
+***************
+*** 3677,3683 ****
+ channel_set_nonblock(channel_T *channel, ch_part_T part)
+ {
+ chanpart_T *ch_part = &channel->ch_part[part];
+! int fd = ch_part->ch_fd;
+
+ if (fd != INVALID_FD)
+ {
+--- 3678,3684 ----
+ channel_set_nonblock(channel_T *channel, ch_part_T part)
+ {
+ chanpart_T *ch_part = &channel->ch_part[part];
+! int fd = ch_part->ch_fd;
+
+ if (fd != INVALID_FD)
+ {
+***************
+*** 3722,3727 ****
+--- 3723,3731 ----
+ return FAIL;
+ }
+
++ if (channel->ch_nonblock && !ch_part->ch_nonblocking)
++ channel_set_nonblock(channel, part);
++
+ if (ch_log_active())
+ {
+ ch_log_lead("SEND ", channel, part);
+***************
+*** 4553,4558 ****
+--- 4557,4568 ----
+ == FAIL)
+ return FAIL;
+ }
++ else if (STRCMP(hi->hi_key, "noblock") == 0)
++ {
++ if (!(supported & JO_MODE))
++ break;
++ opt->jo_noblock = get_tv_number(item);
++ }
+ else if (STRCMP(hi->hi_key, "in_io") == 0
+ || STRCMP(hi->hi_key, "out_io") == 0
+ || STRCMP(hi->hi_key, "err_io") == 0)
+*** ../vim-8.1.0349/src/structs.h 2018-06-30 18:27:59.897025143 +0200
+--- src/structs.h 2018-09-06 15:30:31.063357009 +0200
+***************
+*** 1651,1656 ****
+--- 1651,1657 ----
+ partial_T *ch_close_partial;
+ int ch_drop_never;
+ int ch_keep_open; /* do not close on read error */
++ int ch_nonblock;
+
+ job_T *ch_job; /* Job that uses this channel; this does not
+ * count as a reference to avoid a circular
+***************
+*** 1729,1734 ****
+--- 1730,1736 ----
+ ch_mode_T jo_in_mode;
+ ch_mode_T jo_out_mode;
+ ch_mode_T jo_err_mode;
++ int jo_noblock;
+
+ job_io_T jo_io[4]; /* PART_OUT, PART_ERR, PART_IN */
+ char_u jo_io_name_buf[4][NUMBUFLEN];
+*** ../vim-8.1.0349/src/testdir/test_channel.vim 2018-04-28 21:07:37.000000000 +0200
+--- src/testdir/test_channel.vim 2018-09-06 16:05:43.771212320 +0200
+***************
+*** 47,54 ****
+--- 47,57 ----
+ func Ch_communicate(port)
+ " Avoid dropping messages, since we don't use a callback here.
+ let s:chopt.drop = 'never'
++ " Also add the noblock flag to try it out.
++ let s:chopt.noblock = 1
+ let handle = ch_open('localhost:' . a:port, s:chopt)
+ unlet s:chopt.drop
++ unlet s:chopt.noblock
+ if ch_status(handle) == "fail"
+ call assert_report("Can't open channel")
+ return
+***************
+*** 451,458 ****
+ call ch_log('Test_raw_pipe()')
+ " Add a dummy close callback to avoid that messages are dropped when calling
+ " ch_canread().
+ let job = job_start(s:python . " test_channel_pipe.py",
+! \ {'mode': 'raw', 'drop': 'never'})
+ call assert_equal(v:t_job, type(job))
+ call assert_equal("run", job_status(job))
+
+--- 454,462 ----
+ call ch_log('Test_raw_pipe()')
+ " Add a dummy close callback to avoid that messages are dropped when calling
+ " ch_canread().
++ " Also test the non-blocking option.
+ let job = job_start(s:python . " test_channel_pipe.py",
+! \ {'mode': 'raw', 'drop': 'never', 'noblock': 1})
+ call assert_equal(v:t_job, type(job))
+ call assert_equal("run", job_status(job))
+
+***************
+*** 1349,1354 ****
+--- 1353,1386 ----
+ endfunc
+
+ """"""""""
++
++ function ExitCbWipe(job, status)
++ exe g:wipe_buf 'bw!'
++ endfunction
++
++ " This caused a crash, because messages were handled while peeking for a
++ " character.
++ func Test_exit_cb_wipes_buf()
++ if !has('timers')
++ return
++ endif
++ set cursorline lazyredraw
++ call test_override('redraw_flag', 1)
++ new
++ let g:wipe_buf = bufnr('')
++
++ let job = job_start(['true'], {'exit_cb': 'ExitCbWipe'})
++ let timer = timer_start(300, {-> feedkeys("\<Esc>", 'nt')}, {'repeat': 5})
++ call feedkeys(repeat('g', 1000) . 'o', 'ntx!')
++ call WaitForAssert({-> assert_equal("dead", job_status(job))})
++ call timer_stop(timer)
++
++ set nocursorline nolazyredraw
++ unlet g:wipe_buf
++ call test_override('ALL', 0)
++ endfunc
++
++ """"""""""
+
+ let g:Ch_unletResponse = ''
+ func s:UnletHandler(handle, msg)
+*** ../vim-8.1.0349/runtime/doc/channel.txt 2018-06-03 14:42:17.824505143 +0200
+--- runtime/doc/channel.txt 2018-09-06 16:14:07.501586039 +0200
+***************
+*** 163,168 ****
+--- 163,171 ----
+ The "close_cb" is also considered for this.
+ "never" All messages will be kept.
+
++ *channel-noblock*
++ "noblock" Same effect as |job-noblock|. Only matters for writing.
++
+ *waittime*
+ "waittime" The time to wait for the connection to be made in
+ milliseconds. A negative number waits forever.
+***************
+*** 594,599 ****
+--- 597,613 ----
+ Note: when writing to a file or buffer and when
+ reading from a buffer NL mode is used by default.
+
++ *job-noblock*
++ "noblock": 1 When writing use a non-blocking write call. This
++ avoids getting stuck if Vim should handle other
++ messages in between, e.g. when a job sends back data
++ to Vim. It implies that when `ch_sendraw()` returns
++ not all data may have been written yet.
++ This option was added in patch 8.1.0350, test with: >
++ if has("patch-8.1.350")
++ let options['noblock'] = 1
++ endif
++ <
+ *job-callback*
+ "callback": handler Callback for something to read on any part of the
+ channel.
+*** ../vim-8.1.0349/src/version.c 2018-09-06 13:14:39.148722497 +0200
+--- src/version.c 2018-09-06 16:25:42.981907095 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 350,
+ /**/
+
+--
+I have a drinking problem -- I can't afford it.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0351 b/data/vim/patches/8.1.0351
new file mode 100644
index 000000000..d4427da21
--- /dev/null
+++ b/data/vim/patches/8.1.0351
@@ -0,0 +1,194 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0351
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0351
+Problem: 'incsearch' for :/foo/s//<Esc> changes last search pattern.
+Solution: Save the last search pattern earlier.
+Files: src/ex_docmd.c, src/ex_getln.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0350/src/ex_docmd.c 2018-08-30 15:58:23.244944556 +0200
+--- src/ex_docmd.c 2018-09-06 21:39:52.646486318 +0200
+***************
+*** 2911,2916 ****
+--- 2911,2917 ----
+
+ /*
+ * Parse the address range, if any, in "eap".
++ * May set the last search pattern.
+ * Return FAIL and set "errormsg" or return OK.
+ */
+ int
+***************
+*** 4436,4445 ****
+ }
+
+ /*
+! * get a single EX address
+ *
+ * Set ptr to the next character after the part that was interpreted.
+ * Set ptr to NULL when an error is encountered.
+ *
+ * Return MAXLNUM when no Ex address was found.
+ */
+--- 4437,4447 ----
+ }
+
+ /*
+! * Get a single EX address.
+ *
+ * Set ptr to the next character after the part that was interpreted.
+ * Set ptr to NULL when an error is encountered.
++ * This may set the last used search pattern.
+ *
+ * Return MAXLNUM when no Ex address was found.
+ */
+*** ../vim-8.1.0350/src/ex_getln.c 2018-08-31 22:09:31.561549259 +0200
+--- src/ex_getln.c 2018-09-06 21:39:30.638725276 +0200
+***************
+*** 271,276 ****
+--- 271,277 ----
+ /*
+ * Return TRUE when 'incsearch' highlighting is to be done.
+ * Sets search_first_line and search_last_line to the address range.
++ * May change the last search pattern.
+ */
+ static int
+ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
+***************
+*** 470,477 ****
+--- 471,482 ----
+ int next_char;
+ int use_last_pat;
+
++ // Parsing range may already set the last search pattern.
++ save_last_search_pattern();
++
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+ {
++ restore_last_search_pattern();
+ finish_incsearch_highlighting(FALSE, is_state, TRUE);
+ return;
+ }
+***************
+*** 479,484 ****
+--- 484,490 ----
+ // If there is a character waiting, search and redraw later.
+ if (char_avail())
+ {
++ restore_last_search_pattern();
+ is_state->incsearch_postponed = TRUE;
+ return;
+ }
+***************
+*** 493,499 ****
+ curwin->w_cursor.lnum = search_first_line;
+ curwin->w_cursor.col = 0;
+ }
+- save_last_search_pattern();
+
+ // Use the previous pattern for ":s//".
+ next_char = ccline.cmdbuff[skiplen + patlen];
+--- 499,504 ----
+***************
+*** 627,636 ****
+--- 632,650 ----
+ int i;
+ int save;
+
++ // Parsing range may already set the last search pattern.
++ save_last_search_pattern();
++
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
++ {
++ restore_last_search_pattern();
+ return OK;
++ }
+ if (patlen == 0 && ccline.cmdbuff[skiplen] == NUL)
++ {
++ restore_last_search_pattern();
+ return FAIL;
++ }
+
+ if (firstc == ccline.cmdbuff[skiplen])
+ {
+***************
+*** 641,647 ****
+ else
+ pat = ccline.cmdbuff + skiplen;
+
+- save_last_search_pattern();
+ cursor_off();
+ out_flush();
+ if (c == Ctrl_G)
+--- 655,660 ----
+***************
+*** 721,728 ****
+--- 734,747 ----
+ {
+ int skiplen, patlen;
+
++ // Parsing range may already set the last search pattern.
++ save_last_search_pattern();
++
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
++ {
++ restore_last_search_pattern();
+ return FAIL;
++ }
+
+ // Add a character from under the cursor for 'incsearch'.
+ if (is_state->did_incsearch)
+*** ../vim-8.1.0350/src/testdir/test_search.vim 2018-08-31 22:09:31.561549259 +0200
+--- src/testdir/test_search.vim 2018-09-06 21:36:42.844553891 +0200
+***************
+*** 1043,1048 ****
+--- 1043,1065 ----
+ call delete('Xis_vimgrep_script')
+ endfunc
+
++ func Test_keep_last_search_pattern()
++ if !exists('+incsearch')
++ return
++ endif
++ new
++ call setline(1, ['foo', 'foo', 'foo'])
++ set incsearch
++ call test_override("char_avail", 1)
++ let @/ = 'bar'
++ call feedkeys(":/foo/s//\<Esc>", 'ntx')
++ call assert_equal('bar', @/)
++
++ bwipe!
++ call test_override("ALL", 0)
++ set noincsearch
++ endfunc
++
+ func Test_search_undefined_behaviour()
+ if !has("terminal")
+ return
+*** ../vim-8.1.0350/src/version.c 2018-09-06 16:27:20.664831945 +0200
+--- src/version.c 2018-09-06 21:33:45.218506207 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 351,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+3. Every time someone asks you to do something, ask if they want fries
+ with that.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0352 b/data/vim/patches/8.1.0352
new file mode 100644
index 000000000..75ff41085
--- /dev/null
+++ b/data/vim/patches/8.1.0352
@@ -0,0 +1,179 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0352
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0352
+Problem: Browsing compressed tar files does not always work.
+Solution: Use the "file" command to get the compression type.
+Files: runtime/autoload/tar.vim
+
+
+*** ../vim-8.1.0351/runtime/autoload/tar.vim 2016-09-25 21:41:24.000000000 +0200
+--- runtime/autoload/tar.vim 2018-09-08 15:09:32.841486806 +0200
+***************
+*** 152,161 ****
+ " assuming cygwin
+ let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
+ endif
+ let curlast= line("$")
+ if tarfile =~# '\.\(gz\|tgz\)$'
+ " call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
+! exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
+ elseif tarfile =~# '\.lrp'
+ " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
+ exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
+--- 152,163 ----
+ " assuming cygwin
+ let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
+ endif
++
+ let curlast= line("$")
+ if tarfile =~# '\.\(gz\|tgz\)$'
++ let gzip_command = s:get_gzip_command(tarfile)
+ " call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
+! exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
+ elseif tarfile =~# '\.lrp'
+ " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
+ exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
+***************
+*** 287,298 ****
+ else
+ let tar_secure= " "
+ endif
+ if tarfile =~# '\.bz2$'
+ " call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ elseif tarfile =~# '\.\(gz\|tgz\)$'
+ " call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
+! exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ elseif tarfile =~# '\.lrp$'
+ " call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+--- 289,302 ----
+ else
+ let tar_secure= " "
+ endif
++
+ if tarfile =~# '\.bz2$'
+ " call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ elseif tarfile =~# '\.\(gz\|tgz\)$'
++ let gzip_command = s:get_gzip_command(tarfile)
+ " call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
+! exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ elseif tarfile =~# '\.lrp$'
+ " call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
+ exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+***************
+*** 389,394 ****
+--- 393,400 ----
+ let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
+ let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
+
++ let gzip_command = s:get_gzip_command(tarfile)
++
+ " handle compressed archives
+ if tarfile =~# '\.bz2'
+ call system("bzip2 -d -- ".shellescape(tarfile,0))
+***************
+*** 396,407 ****
+ let compress= "bzip2 -- ".shellescape(tarfile,0)
+ " call Decho("compress<".compress.">")
+ elseif tarfile =~# '\.gz'
+! call system("gzip -d -- ".shellescape(tarfile,0))
+ let tarfile = substitute(tarfile,'\.gz','','e')
+ let compress= "gzip -- ".shellescape(tarfile,0)
+ " call Decho("compress<".compress.">")
+ elseif tarfile =~# '\.tgz'
+! call system("gzip -d -- ".shellescape(tarfile,0))
+ let tarfile = substitute(tarfile,'\.tgz','.tar','e')
+ let compress= "gzip -- ".shellescape(tarfile,0)
+ let tgz = 1
+--- 402,413 ----
+ let compress= "bzip2 -- ".shellescape(tarfile,0)
+ " call Decho("compress<".compress.">")
+ elseif tarfile =~# '\.gz'
+! call system(gzip_command . " -d -- ".shellescape(tarfile,0))
+ let tarfile = substitute(tarfile,'\.gz','','e')
+ let compress= "gzip -- ".shellescape(tarfile,0)
+ " call Decho("compress<".compress.">")
+ elseif tarfile =~# '\.tgz'
+! call system(gzip_command . " -d -- ".shellescape(tarfile,0))
+ let tarfile = substitute(tarfile,'\.tgz','.tar','e')
+ let compress= "gzip -- ".shellescape(tarfile,0)
+ let tgz = 1
+***************
+*** 581,587 ****
+
+ " if necessary, decompress the tarball; then, extract it
+ if tartail =~ '\.tgz'
+! if executable("gunzip")
+ silent exe "!gunzip ".shellescape(tartail)
+ elseif executable("gzip")
+ silent exe "!gzip -d ".shellescape(tartail)
+--- 587,596 ----
+
+ " if necessary, decompress the tarball; then, extract it
+ if tartail =~ '\.tgz'
+! let gzip_command = s:get_gzip_command(tarfile)
+! if executable(gzip_command)
+! silent exe "!" . gzip_command . " -d ".shellescape(tartail)
+! elseif executable("gunzip")
+ silent exe "!gunzip ".shellescape(tartail)
+ elseif executable("gzip")
+ silent exe "!gzip -d ".shellescape(tartail)
+***************
+*** 619,624 ****
+--- 628,655 ----
+ " call Dret("tar#Vimuntar")
+ endfun
+
++ func s:get_gzip_command(file)
++ " Try using the "file" command to get the actual compression type, since
++ " there is no standard way for the naming: ".tgz", ".tbz", ".txz", etc.
++ " If the "file" command doesn't work fall back to just using the file name.
++ if a:file =~# 'z$'
++ let filetype = system('file ' . a:file)
++ if filetype =~ 'bzip2 compressed' && executable('bzip2')
++ return 'bzip2'
++ endif
++ if filetype =~ 'XZ compressed' && executable('xz')
++ return 'xz'
++ endif
++ endif
++ if a:file =~# 'bz2$'
++ return 'bzip2'
++ endif
++ if a:file =~# 'xz$'
++ return 'xz'
++ endif
++ return 'gzip'
++ endfunc
++
+ " =====================================================================
+ " Modelines And Restoration: {{{1
+ let &cpo= s:keepcpo
+*** ../vim-8.1.0351/src/version.c 2018-09-06 21:44:13.660006996 +0200
+--- src/version.c 2018-09-08 14:57:29.304425238 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 352,
+ /**/
+
+--
+If Pacman had affected us as kids we'd be running around in dark rooms,
+munching pills and listening to repetitive music.
+ -- Marcus Brigstocke
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0353 b/data/vim/patches/8.1.0353
new file mode 100644
index 000000000..842e839c8
--- /dev/null
+++ b/data/vim/patches/8.1.0353
@@ -0,0 +1,283 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0353
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0353
+Problem: An "after" directory of a package is appended to 'rtp', which
+ will be after the user's "after" directory. ()
+Solution: Insert the package "after" directory before any other "after"
+ directory in 'rtp'. (closes #3409)
+Files: src/ex_cmds2.c, src/testdir/test_packadd.vim
+
+
+*** ../vim-8.1.0352/src/ex_cmds2.c 2018-08-31 23:06:18.735841246 +0200
+--- src/ex_cmds2.c 2018-09-08 18:03:22.848808156 +0200
+***************
+*** 3691,3704 ****
+ add_pack_dir_to_rtp(char_u *fname)
+ {
+ char_u *p4, *p3, *p2, *p1, *p;
+! char_u *insp;
+ int c;
+ char_u *new_rtp;
+ int keep;
+ size_t oldlen;
+ size_t addlen;
+ char_u *afterdir = NULL;
+ size_t afterlen = 0;
+ char_u *ffname = NULL;
+ size_t fname_len;
+ char_u *buf = NULL;
+--- 3691,3707 ----
+ add_pack_dir_to_rtp(char_u *fname)
+ {
+ char_u *p4, *p3, *p2, *p1, *p;
+! char_u *entry;
+! char_u *insp = NULL;
+ int c;
+ char_u *new_rtp;
+ int keep;
+ size_t oldlen;
+ size_t addlen;
++ size_t new_rtp_len;
+ char_u *afterdir = NULL;
+ size_t afterlen = 0;
++ char_u *after_insp = NULL;
+ char_u *ffname = NULL;
+ size_t fname_len;
+ char_u *buf = NULL;
+***************
+*** 3725,3778 ****
+ if (ffname == NULL)
+ return FAIL;
+
+! /* Find "ffname" in "p_rtp", ignoring '/' vs '\' differences. */
+ fname_len = STRLEN(ffname);
+- insp = p_rtp;
+ buf = alloc(MAXPATHL);
+ if (buf == NULL)
+ goto theend;
+! while (*insp != NUL)
+ {
+! copy_option_part(&insp, buf, MAXPATHL, ",");
+! add_pathsep(buf);
+! rtp_ffname = fix_fname(buf);
+! if (rtp_ffname == NULL)
+! goto theend;
+! match = vim_fnamencmp(rtp_ffname, ffname, fname_len) == 0;
+! vim_free(rtp_ffname);
+! if (match)
+ break;
+ }
+
+! if (*insp == NUL)
+! /* not found, append at the end */
+ insp = p_rtp + STRLEN(p_rtp);
+- else
+- /* append after the matching directory. */
+- --insp;
+
+! /* check if rtp/pack/name/start/name/after exists */
+ afterdir = concat_fnames(fname, (char_u *)"after", TRUE);
+ if (afterdir != NULL && mch_isdir(afterdir))
+! afterlen = STRLEN(afterdir) + 1; /* add one for comma */
+
+ oldlen = STRLEN(p_rtp);
+! addlen = STRLEN(fname) + 1; /* add one for comma */
+! new_rtp = alloc((int)(oldlen + addlen + afterlen + 1));
+! /* add one for NUL */
+ if (new_rtp == NULL)
+ goto theend;
+ keep = (int)(insp - p_rtp);
+ mch_memmove(new_rtp, p_rtp, keep);
+! new_rtp[keep] = ',';
+! mch_memmove(new_rtp + keep + 1, fname, addlen);
+ if (p_rtp[keep] != NUL)
+! mch_memmove(new_rtp + keep + addlen, p_rtp + keep, oldlen - keep + 1);
+! if (afterlen > 0)
+ {
+ STRCAT(new_rtp, ",");
+ STRCAT(new_rtp, afterdir);
+ }
+ set_option_value((char_u *)"rtp", 0L, new_rtp, 0);
+ vim_free(new_rtp);
+ retval = OK;
+--- 3728,3826 ----
+ if (ffname == NULL)
+ return FAIL;
+
+! // Find "ffname" in "p_rtp", ignoring '/' vs '\' differences.
+! // Also stop at the first "after" directory.
+ fname_len = STRLEN(ffname);
+ buf = alloc(MAXPATHL);
+ if (buf == NULL)
+ goto theend;
+! for (entry = p_rtp; *entry != NUL; )
+ {
+! char_u *cur_entry = entry;
+!
+! copy_option_part(&entry, buf, MAXPATHL, ",");
+! if (insp == NULL)
+! {
+! add_pathsep(buf);
+! rtp_ffname = fix_fname(buf);
+! if (rtp_ffname == NULL)
+! goto theend;
+! match = vim_fnamencmp(rtp_ffname, ffname, fname_len) == 0;
+! vim_free(rtp_ffname);
+! if (match)
+! // Insert "ffname" after this entry (and comma).
+! insp = entry;
+! }
+!
+! if ((p = (char_u *)strstr((char *)buf, "after")) != NULL
+! && p > buf
+! && vim_ispathsep(p[-1])
+! && (vim_ispathsep(p[5]) || p[5] == NUL || p[5] == ','))
+! {
+! if (insp == NULL)
+! // Did not find "ffname" before the first "after" directory,
+! // insert it before this entry.
+! insp = cur_entry;
+! after_insp = cur_entry;
+ break;
++ }
+ }
+
+! if (insp == NULL)
+! // Both "fname" and "after" not found, append at the end.
+ insp = p_rtp + STRLEN(p_rtp);
+
+! // check if rtp/pack/name/start/name/after exists
+ afterdir = concat_fnames(fname, (char_u *)"after", TRUE);
+ if (afterdir != NULL && mch_isdir(afterdir))
+! afterlen = STRLEN(afterdir) + 1; // add one for comma
+
+ oldlen = STRLEN(p_rtp);
+! addlen = STRLEN(fname) + 1; // add one for comma
+! new_rtp = alloc((int)(oldlen + addlen + afterlen + 1)); // add one for NUL
+ if (new_rtp == NULL)
+ goto theend;
++
++ // We now have 'rtp' parts: {keep}{keep_after}{rest}.
++ // Create new_rtp, first: {keep},{fname}
+ keep = (int)(insp - p_rtp);
+ mch_memmove(new_rtp, p_rtp, keep);
+! new_rtp_len = keep;
+! if (*insp == NUL)
+! new_rtp[new_rtp_len++] = ','; // add comma before
+! mch_memmove(new_rtp + new_rtp_len, fname, addlen - 1);
+! new_rtp_len += addlen - 1;
+! if (*insp != NUL)
+! new_rtp[new_rtp_len++] = ','; // add comma after
+!
+! if (afterlen > 0 && after_insp != NULL)
+! {
+! int keep_after = (int)(after_insp - p_rtp);
+!
+! // Add to new_rtp: {keep},{fname}{keep_after},{afterdir}
+! mch_memmove(new_rtp + new_rtp_len, p_rtp + keep,
+! keep_after - keep);
+! new_rtp_len += keep_after - keep;
+! mch_memmove(new_rtp + new_rtp_len, afterdir, afterlen - 1);
+! new_rtp_len += afterlen - 1;
+! new_rtp[new_rtp_len++] = ',';
+! keep = keep_after;
+! }
+!
+ if (p_rtp[keep] != NUL)
+! // Append rest: {keep},{fname}{keep_after},{afterdir}{rest}
+! mch_memmove(new_rtp + new_rtp_len, p_rtp + keep, oldlen - keep + 1);
+! else
+! new_rtp[new_rtp_len] = NUL;
+!
+! if (afterlen > 0 && after_insp == NULL)
+ {
++ // Append afterdir when "after" was not found:
++ // {keep},{fname}{rest},{afterdir}
+ STRCAT(new_rtp, ",");
+ STRCAT(new_rtp, afterdir);
+ }
++
+ set_option_value((char_u *)"rtp", 0L, new_rtp, 0);
+ vim_free(new_rtp);
+ retval = OK;
+*** ../vim-8.1.0352/src/testdir/test_packadd.vim 2018-04-18 21:56:13.000000000 +0200
+--- src/testdir/test_packadd.vim 2018-09-08 18:16:43.969062182 +0200
+***************
+*** 12,17 ****
+--- 12,22 ----
+ endfunc
+
+ func Test_packadd()
++ if !exists('s:plugdir')
++ echomsg 'when running this test manually, call SetUp() first'
++ return
++ endif
++
+ call mkdir(s:plugdir . '/plugin/also', 'p')
+ call mkdir(s:plugdir . '/ftdetect', 'p')
+ call mkdir(s:plugdir . '/after', 'p')
+***************
+*** 19,24 ****
+--- 24,37 ----
+ let rtp = &rtp
+ filetype on
+
++ let rtp_entries = split(rtp, ',')
++ for entry in rtp_entries
++ if entry =~? '\<after\>'
++ let first_after_entry = entry
++ break
++ endif
++ endfor
++
+ exe 'split ' . s:plugdir . '/plugin/test.vim'
+ call setline(1, 'let g:plugin_works = 42')
+ wq
+***************
+*** 38,44 ****
+ call assert_equal(17, g:ftdetect_works)
+ call assert_true(len(&rtp) > len(rtp))
+ call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp)
+! call assert_match('/testdir/Xdir/pack/mine/opt/mytest/after$', &rtp)
+
+ " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest'
+ call mkdir(fnamemodify(s:plugdir, ':h') . '/myte', 'p')
+--- 51,62 ----
+ call assert_equal(17, g:ftdetect_works)
+ call assert_true(len(&rtp) > len(rtp))
+ call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp)
+!
+! let new_after = match(&rtp, '/testdir/Xdir/pack/mine/opt/mytest/after,')
+! let old_after = match(&rtp, ',' . first_after_entry . '\>')
+! call assert_true(new_after > 0, 'rtp is ' . &rtp)
+! call assert_true(old_after > 0, 'rtp is ' . &rtp)
+! call assert_true(new_after < old_after, 'rtp is ' . &rtp)
+
+ " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest'
+ call mkdir(fnamemodify(s:plugdir, ':h') . '/myte', 'p')
+*** ../vim-8.1.0352/src/version.c 2018-09-08 15:10:14.405097082 +0200
+--- src/version.c 2018-09-08 17:01:12.259798047 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 353,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+14. Put mosquito netting around your work area. Play a tape of jungle
+ sounds all day.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0354 b/data/vim/patches/8.1.0354
new file mode 100644
index 000000000..fb5a442de
--- /dev/null
+++ b/data/vim/patches/8.1.0354
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0354
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0354 (after 8.1.0353)
+Problem: Packadd test fails on MS-Windows.
+Solution: Ignore difference between forward and backward slashes.
+Files: src/testdir/test_packadd.vim
+
+
+*** ../vim-8.1.0353/src/testdir/test_packadd.vim 2018-09-08 18:21:10.438503190 +0200
+--- src/testdir/test_packadd.vim 2018-09-08 19:07:32.684241713 +0200
+***************
+*** 53,61 ****
+ call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp)
+
+ let new_after = match(&rtp, '/testdir/Xdir/pack/mine/opt/mytest/after,')
+! let old_after = match(&rtp, ',' . first_after_entry . '\>')
+ call assert_true(new_after > 0, 'rtp is ' . &rtp)
+! call assert_true(old_after > 0, 'rtp is ' . &rtp)
+ call assert_true(new_after < old_after, 'rtp is ' . &rtp)
+
+ " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest'
+--- 53,62 ----
+ call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp)
+
+ let new_after = match(&rtp, '/testdir/Xdir/pack/mine/opt/mytest/after,')
+! let forwarded = substitute(first_after_entry, '\\', '[/\\\\]', 'g')
+! let old_after = match(&rtp, ',' . forwarded . '\>')
+ call assert_true(new_after > 0, 'rtp is ' . &rtp)
+! call assert_true(old_after > 0, 'match ' . forwarded . ' in ' . &rtp)
+ call assert_true(new_after < old_after, 'rtp is ' . &rtp)
+
+ " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest'
+*** ../vim-8.1.0353/src/version.c 2018-09-08 18:21:10.438503190 +0200
+--- src/version.c 2018-09-08 18:31:17.896550895 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 354,
+ /**/
+
+--
+How To Keep A Healthy Level Of Insanity:
+16. Have your coworkers address you by your wrestling name, Rock Hard Kim.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0355 b/data/vim/patches/8.1.0355
new file mode 100644
index 000000000..97e4d3346
--- /dev/null
+++ b/data/vim/patches/8.1.0355
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0355
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0355
+Problem: Incorrect adjusting the popup menu for the preview window.
+Solution: Compute position and height properl. (Ronan Pigott) Also show at
+ least ten items. (closes #3414)
+Files: src/popupmnu.c
+
+
+*** ../vim-8.1.0354/src/popupmnu.c 2018-06-17 17:10:55.636590392 +0200
+--- src/popupmnu.c 2018-09-09 15:17:57.698993041 +0200
+***************
+*** 141,148 ****
+ if (p_ph > 0 && pum_height > p_ph)
+ pum_height = p_ph;
+
+! /* Put the pum below "pum_win_row" if possible. If there are few lines decide
+! * on where there is more room. */
+ if (pum_win_row + 2 >= below_row - pum_height
+ && pum_win_row - above_row > (below_row - above_row) / 2)
+ {
+--- 141,148 ----
+ if (p_ph > 0 && pum_height > p_ph)
+ pum_height = p_ph;
+
+! /* Put the pum below "pum_win_row" if possible. If there are few lines
+! * decide on where there is more room. */
+ if (pum_win_row + 2 >= below_row - pum_height
+ && pum_win_row - above_row > (below_row - above_row) / 2)
+ {
+***************
+*** 196,206 ****
+ return;
+
+ #if defined(FEAT_QUICKFIX)
+! /* If there is a preview window at the above avoid drawing over it. */
+! if (pvwin != NULL && pum_row < above_row && pum_height > above_row)
+ {
+! pum_row += above_row;
+! pum_height -= above_row;
+ }
+ #endif
+
+--- 196,215 ----
+ return;
+
+ #if defined(FEAT_QUICKFIX)
+! // If there is a preview window at the above avoid drawing over it.
+! // Do keep at least 10 entries.
+! if (pvwin != NULL && pum_row < above_row && pum_height > 10)
+ {
+! if (pum_win_row - above_row < 10)
+! {
+! pum_row = pum_win_row - 10;
+! pum_height = 10;
+! }
+! else
+! {
+! pum_row = above_row;
+! pum_height = pum_win_row - above_row;
+! }
+ }
+ #endif
+
+*** ../vim-8.1.0354/src/version.c 2018-09-08 19:12:09.333935467 +0200
+--- src/version.c 2018-09-09 15:19:36.357838496 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 355,
+ /**/
+
+--
+In many of the more relaxed civilizations on the Outer Eastern Rim of the
+Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the
+great "Encyclopedia Galactica" as the standard repository of all knowledge
+and wisdom, for though it has many omissions and contains much that is
+apocryphal, or at least wildly inaccurate, it scores over the older, more
+pedestrian work in two important respects.
+First, it is slightly cheaper; and second, it has the words "DON'T PANIC"
+inscribed in large friendly letters on its cover.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0356 b/data/vim/patches/8.1.0356
new file mode 100644
index 000000000..907ebef7e
--- /dev/null
+++ b/data/vim/patches/8.1.0356
@@ -0,0 +1,224 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0356
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0356
+Problem: Using :s with 'incsearch' prevents CTRL-R CTRL-W. (Boris Staletic)
+Solution: When past the pattern put cursor back in the start position.
+ (closes #3413)
+Files: src/ex_getln.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0355/src/ex_getln.c 2018-09-06 21:44:13.660006996 +0200
+--- src/ex_getln.c 2018-09-09 15:53:37.117142011 +0200
+***************
+*** 462,468 ****
+ incsearch_state_T *is_state)
+ {
+ int skiplen, patlen;
+! int i;
+ pos_T end_pos;
+ struct cmdline_info save_ccline;
+ #ifdef FEAT_RELTIME
+--- 462,468 ----
+ incsearch_state_T *is_state)
+ {
+ int skiplen, patlen;
+! int found; // do_search() result
+ pos_T end_pos;
+ struct cmdline_info save_ccline;
+ #ifdef FEAT_RELTIME
+***************
+*** 508,514 ****
+ // If there is no pattern, don't do anything.
+ if (patlen == 0 && !use_last_pat)
+ {
+! i = 0;
+ set_no_hlsearch(TRUE); // turn off previous highlight
+ redraw_all_later(SOME_VALID);
+ }
+--- 508,514 ----
+ // If there is no pattern, don't do anything.
+ if (patlen == 0 && !use_last_pat)
+ {
+! found = 0;
+ set_no_hlsearch(TRUE); // turn off previous highlight
+ redraw_all_later(SOME_VALID);
+ }
+***************
+*** 528,534 ****
+ if (search_first_line != 0)
+ search_flags += SEARCH_START;
+ ccline.cmdbuff[skiplen + patlen] = NUL;
+! i = do_search(NULL, firstc == ':' ? '/' : firstc,
+ ccline.cmdbuff + skiplen, count, search_flags,
+ #ifdef FEAT_RELTIME
+ &tm, NULL
+--- 528,534 ----
+ if (search_first_line != 0)
+ search_flags += SEARCH_START;
+ ccline.cmdbuff[skiplen + patlen] = NUL;
+! found = do_search(NULL, firstc == ':' ? '/' : firstc,
+ ccline.cmdbuff + skiplen, count, search_flags,
+ #ifdef FEAT_RELTIME
+ &tm, NULL
+***************
+*** 543,549 ****
+ || curwin->w_cursor.lnum > search_last_line)
+ {
+ // match outside of address range
+! i = 0;
+ curwin->w_cursor = is_state->search_start;
+ }
+
+--- 543,549 ----
+ || curwin->w_cursor.lnum > search_last_line)
+ {
+ // match outside of address range
+! found = 0;
+ curwin->w_cursor = is_state->search_start;
+ }
+
+***************
+*** 552,564 ****
+ {
+ (void)vpeekc(); // remove <C-C> from input stream
+ got_int = FALSE; // don't abandon the command line
+! i = 0;
+ }
+ else if (char_avail())
+ // cancelled searching because a char was typed
+ is_state->incsearch_postponed = TRUE;
+ }
+! if (i != 0)
+ highlight_match = TRUE; // highlight position
+ else
+ highlight_match = FALSE; // remove highlight
+--- 552,564 ----
+ {
+ (void)vpeekc(); // remove <C-C> from input stream
+ got_int = FALSE; // don't abandon the command line
+! found = 0;
+ }
+ else if (char_avail())
+ // cancelled searching because a char was typed
+ is_state->incsearch_postponed = TRUE;
+ }
+! if (found != 0)
+ highlight_match = TRUE; // highlight position
+ else
+ highlight_match = FALSE; // remove highlight
+***************
+*** 569,575 ****
+ changed_cline_bef_curs();
+ update_topline();
+
+! if (i != 0)
+ {
+ pos_T save_pos = curwin->w_cursor;
+
+--- 569,575 ----
+ changed_cline_bef_curs();
+ update_topline();
+
+! if (found != 0)
+ {
+ pos_T save_pos = curwin->w_cursor;
+
+***************
+*** 604,611 ****
+ restore_cmdline(&save_ccline);
+ restore_last_search_pattern();
+
+! // Leave it at the end to make CTRL-R CTRL-W work.
+! if (i != 0)
+ curwin->w_cursor = end_pos;
+
+ msg_starthere();
+--- 604,614 ----
+ restore_cmdline(&save_ccline);
+ restore_last_search_pattern();
+
+! // Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the
+! // end of the pattern, e.g. for ":s/pat/".
+! if (ccline.cmdbuff[skiplen + patlen] != NUL)
+! curwin->w_cursor = is_state->search_start;
+! else if (found != 0)
+ curwin->w_cursor = end_pos;
+
+ msg_starthere();
+*** ../vim-8.1.0355/src/testdir/test_search.vim 2018-09-06 21:44:13.660006996 +0200
+--- src/testdir/test_search.vim 2018-09-09 15:50:31.934618534 +0200
+***************
+*** 1060,1065 ****
+--- 1060,1101 ----
+ set noincsearch
+ endfunc
+
++ func Test_word_under_cursor_after_match()
++ if !exists('+incsearch')
++ return
++ endif
++ new
++ call setline(1, 'foo bar')
++ set incsearch
++ call test_override("char_avail", 1)
++ try
++ call feedkeys("/foo\<C-R>\<C-W>\<CR>", 'ntx')
++ catch /E486:/
++ endtry
++ call assert_equal('foobar', @/)
++
++ bwipe!
++ call test_override("ALL", 0)
++ set noincsearch
++ endfunc
++
++ func Test_subst_word_under_cursor()
++ if !exists('+incsearch')
++ return
++ endif
++ new
++ call setline(1, ['int SomeLongName;', 'for (xxx = 1; xxx < len; ++xxx)'])
++ set incsearch
++ call test_override("char_avail", 1)
++ call feedkeys("/LongName\<CR>", 'ntx')
++ call feedkeys(":%s/xxx/\<C-R>\<C-W>/g\<CR>", 'ntx')
++ call assert_equal('for (SomeLongName = 1; SomeLongName < len; ++SomeLongName)', getline(2))
++
++ bwipe!
++ call test_override("ALL", 0)
++ set noincsearch
++ endfunc
++
+ func Test_search_undefined_behaviour()
+ if !has("terminal")
+ return
+*** ../vim-8.1.0355/src/version.c 2018-09-09 15:27:54.812344748 +0200
+--- src/version.c 2018-09-09 15:52:51.437517050 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 356,
+ /**/
+
+--
+"So this is it," said Arthur, "we are going to die."
+"Yes," said Ford, "except...no! Wait a minute!" He suddenly lunged across
+the chamber at something behind Arthur's line of vision. "What's this
+switch?" he cried.
+"What? Where?" cried Arthur, twisting around.
+"No, I was only fooling," said Ford, "we are going to die after all."
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0357 b/data/vim/patches/8.1.0357
new file mode 100644
index 000000000..6b677046f
--- /dev/null
+++ b/data/vim/patches/8.1.0357
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0357
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0357
+Problem: Instructions for tests are outdated. (Jason Franklin)
+Solution: Update the text.
+Files: src/testdir/README.txt
+
+
+*** ../vim-8.1.0356/src/testdir/README.txt 2018-02-20 15:36:03.000000000 +0100
+--- src/testdir/README.txt 2018-09-01 14:24:39.775264173 +0200
+***************
+*** 15,37 ****
+
+ 1) Create a test_<subject>.vim file.
+ 2) Add test_<subject>.res to NEW_TESTS in Make_all.mak in alphabetical order.
+! 3) Also add an entry in src/Makefile.
+ 4) Use make test_<subject>.res to run a single test in src/testdir/.
+ Use make test_<subject> to run a single test in src/.
+
+ What you can use (see test_assert.vim for an example):
+ - Call assert_equal(), assert_true(), assert_false(), etc.
+! - Use try/catch to check for exceptions.
+! - Use alloc_fail() to have memory allocation fail. This makes it possible
+! to check memory allocation failures are handled gracefully. You need to
+! change the source code to add an ID to the allocation. Update LAST_ID_USED
+! above alloc_id() to the highest ID used.
+! - Use disable_char_avail_for_testing(1) if char_avail() must return FALSE for
+! a while. E.g. to trigger the CursorMovedI autocommand event.
+! See test_cursor_func.vim for an example
+ - If the bug that is being tested isn't fixed yet, you can throw an exception
+! so that it's clear this still needs work. E.g.:
+! throw "Skipped: Bug with <c-e> and popupmenu not fixed yet"
+ - See the start of runtest.vim for more help.
+
+
+--- 15,54 ----
+
+ 1) Create a test_<subject>.vim file.
+ 2) Add test_<subject>.res to NEW_TESTS in Make_all.mak in alphabetical order.
+! 3) Also add an entry "test_<subject>" in src/Make_all.mak.
+ 4) Use make test_<subject>.res to run a single test in src/testdir/.
+ Use make test_<subject> to run a single test in src/.
+
++ At 2), instead of running the test separately, it can be included in
++ "test_alot". Do this for quick tests without side effects. The test runs a
++ bit faster, because Vim doesn't have to be started, one Vim instance runs many
++ tests.
++
++
+ What you can use (see test_assert.vim for an example):
++
+ - Call assert_equal(), assert_true(), assert_false(), etc.
+!
+! - Use assert_fails() to check for expected errors.
+!
+! - Use try/catch to avoid an exception aborts the test.
+!
+! - Use alloc_fail() to have memory allocation fail. This makes it possible to
+! check memory allocation failures are handled gracefully. You need to change
+!
+! - the source code to add an ID to the allocation. Update LAST_ID_USED above
+! alloc_id() to the highest ID used.
+!
+! - Use test_override() to make Vim behave differently, e.g. if char_avail()
+! must return FALSE for a while. E.g. to trigger the CursorMovedI autocommand
+! event.
+!
+! - See test_cursor_func.vim for an example.
+!
+ - If the bug that is being tested isn't fixed yet, you can throw an exception
+! with "Skipped" so that it's clear this still needs work. E.g.: throw
+! "Skipped: Bug with <c-e> and popupmenu not fixed yet"
+!
+ - See the start of runtest.vim for more help.
+
+
+*** ../vim-8.1.0356/src/version.c 2018-09-09 15:54:11.232857907 +0200
+--- src/version.c 2018-09-09 15:55:30.172188706 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 357,
+ /**/
+
+--
+I am also told that there is a logical proof out there somewhere
+that demonstrates that there is no task which duct tape cannot handle.
+ -- Paul Brannan
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0358 b/data/vim/patches/8.1.0358
new file mode 100644
index 000000000..7bc717a06
--- /dev/null
+++ b/data/vim/patches/8.1.0358
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0358
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0358
+Problem: Crash when using term_dumpwrite() after the job finished.
+Solution: Check for a finished job and give an error message.
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0357/src/terminal.c 2018-08-24 21:30:24.818557489 +0200
+--- src/terminal.c 2018-09-09 18:24:15.762463460 +0200
+***************
+*** 3871,3876 ****
+--- 3871,3881 ----
+ if (buf == NULL)
+ return;
+ term = buf->b_term;
++ if (term->tl_vterm == NULL)
++ {
++ EMSG(_("E958: Job already finished"));
++ return;
++ }
+
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+*** ../vim-8.1.0357/src/version.c 2018-09-09 15:56:03.143904759 +0200
+--- src/version.c 2018-09-09 19:55:31.327054155 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 358,
+ /**/
+
+--
+"Space is big. Really big. You just won't believe how vastly hugely mind-
+bogglingly big it is. I mean, you may think it's a long way down the
+road to the chemist, but that's just peanuts to space."
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0359 b/data/vim/patches/8.1.0359
new file mode 100644
index 000000000..d8d00d452
--- /dev/null
+++ b/data/vim/patches/8.1.0359
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0359
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0359
+Problem: No clue what test failed when using a screendump twice.
+Solution: Add an extra argument to VerifyScreenDump().
+Files: src/testdir/screendump.vim
+
+
+*** ../vim-8.1.0358/src/testdir/screendump.vim 2018-06-04 19:11:06.604648995 +0200
+--- src/testdir/screendump.vim 2018-09-09 20:46:34.535736225 +0200
+***************
+*** 93,100 ****
+ " Verify that Vim running in terminal buffer "buf" matches the screen dump.
+ " "options" is passed to term_dumpwrite().
+ " The file name used is "dumps/{filename}.dump".
+ " Will wait for up to a second for the screen dump to match.
+! func VerifyScreenDump(buf, filename, options)
+ let reference = 'dumps/' . a:filename . '.dump'
+ let testfile = a:filename . '.dump.failed'
+
+--- 93,103 ----
+ " Verify that Vim running in terminal buffer "buf" matches the screen dump.
+ " "options" is passed to term_dumpwrite().
+ " The file name used is "dumps/{filename}.dump".
++ " Optionally an extra argument can be passed which is prepended to the error
++ " message. Use this when using the same dump file with different options.
+ " Will wait for up to a second for the screen dump to match.
+! " Returns non-zero when verification fails.
+! func VerifyScreenDump(buf, filename, options, ...)
+ let reference = 'dumps/' . a:filename . '.dump'
+ let testfile = a:filename . '.dump.failed'
+
+***************
+*** 108,117 ****
+ endif
+ if i == 100
+ " Leave the test file around for inspection.
+! call assert_report('See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")')
+! break
+ endif
+ sleep 10m
+ let i += 1
+ endwhile
+ endfunc
+--- 111,125 ----
+ endif
+ if i == 100
+ " Leave the test file around for inspection.
+! let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")'
+! if a:0 == 1
+! let msg = a:1 . ': ' . msg
+! endif
+! call assert_report(msg)
+! return 1
+ endif
+ sleep 10m
+ let i += 1
+ endwhile
++ return 0
+ endfunc
+*** ../vim-8.1.0358/src/version.c 2018-09-09 19:56:03.434838223 +0200
+--- src/version.c 2018-09-09 22:01:05.478507254 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 359,
+ /**/
+
+--
+`The Guide says there is an art to flying,' said Ford, `or at least a
+knack. The knack lies in learning how to throw yourself at the ground
+and miss.' He smiled weakly.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0360 b/data/vim/patches/8.1.0360
new file mode 100644
index 000000000..df0fd10d6
--- /dev/null
+++ b/data/vim/patches/8.1.0360
@@ -0,0 +1,6803 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0360
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0360
+Problem: Using an external diff program is slow and inflexible.
+Solution: Include the xdiff library. (Christian Brabandt, closes #2732)
+ Use it by default.
+Files: Filelist, runtime/doc/diff.txt, runtime/doc/options.txt,
+ src/Make_cyg_ming.mak, src/Make_mvc.mak, src/Makefile, src/diff.c,
+ src/structs.h, src/testdir/dumps/Test_diff_01.dump,
+ src/testdir/dumps/Test_diff_02.dump,
+ src/testdir/dumps/Test_diff_03.dump,
+ src/testdir/dumps/Test_diff_04.dump,
+ src/testdir/dumps/Test_diff_05.dump,
+ src/testdir/dumps/Test_diff_06.dump,
+ src/testdir/dumps/Test_diff_07.dump,
+ src/testdir/dumps/Test_diff_08.dump,
+ src/testdir/dumps/Test_diff_09.dump,
+ src/testdir/dumps/Test_diff_10.dump,
+ src/testdir/dumps/Test_diff_11.dump,
+ src/testdir/dumps/Test_diff_12.dump,
+ src/testdir/dumps/Test_diff_13.dump,
+ src/testdir/dumps/Test_diff_14.dump,
+ src/testdir/dumps/Test_diff_15.dump,
+ src/testdir/dumps/Test_diff_16.dump,
+ src/testdir/test_diffmode.vim, src/xdiff/COPYING,
+ src/xdiff/xdiff.h, src/xdiff/xdiffi.c, src/xdiff/xdiffi.h,
+ src/xdiff/xemit.c, src/xdiff/xemit.h, src/xdiff/xhistogram.c,
+ src/xdiff/xinclude.h, src/xdiff/xmacros.h, src/xdiff/xpatience.c,
+ src/xdiff/xprepare.c, src/xdiff/xprepare.h, src/xdiff/xtypes.h,
+ src/xdiff/xutils.c, src/xdiff/xutils.h, src/xdiff/README.txt
+
+
+*** ../vim-8.1.0359/Filelist 2018-09-02 15:26:53.829022193 +0200
+--- Filelist 2018-09-10 17:23:29.323602967 +0200
+***************
+*** 273,278 ****
+--- 273,292 ----
+ src/libvterm/t/92lp1640917.test \
+ src/libvterm/t/harness.c \
+ src/libvterm/t/run-test.pl \
++ src/xdiff/xdiff.h \
++ src/xdiff/xdiffi.c \
++ src/xdiff/xdiffi.h \
++ src/xdiff/xemit.c \
++ src/xdiff/xemit.h \
++ src/xdiff/xhistogram.c \
++ src/xdiff/xinclude.h \
++ src/xdiff/xmacros.h \
++ src/xdiff/xpatience.c \
++ src/xdiff/xprepare.c \
++ src/xdiff/xprepare.h \
++ src/xdiff/xtypes.h \
++ src/xdiff/xutils.c \
++ src/xdiff/xutils.h \
+
+
+ # source files for Unix only
+*** ../vim-8.1.0359/runtime/doc/diff.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/diff.txt 2018-09-10 17:24:29.783082384 +0200
+***************
+*** 39,45 ****
+ then append the file name of the first argument to the directory name to find
+ the file.
+
+! This only works when a standard "diff" command is available. See 'diffexpr'.
+
+ Diffs are local to the current tab page |tab-page|. You can't see diffs with
+ a window in another tab page. This does make it possible to have several
+--- 39,47 ----
+ then append the file name of the first argument to the directory name to find
+ the file.
+
+! By default an internal diff library will be used. When 'diffopt' or
+! 'diffexpr' has been set an external "diff" command will be used. This only
+! works when such a diff program is available.
+
+ Diffs are local to the current tab page |tab-page|. You can't see diffs with
+ a window in another tab page. This does make it possible to have several
+***************
+*** 344,351 ****
+
+ The ">" is replaced with the value of 'shellredir'.
+
+! The output of "diff" must be a normal "ed" style diff. Do NOT use a context
+! diff. This example explains the format that Vim expects: >
+
+ 1a2
+ > bbb
+--- 346,354 ----
+
+ The ">" is replaced with the value of 'shellredir'.
+
+! The output of "diff" must be a normal "ed" style diff or a unified diff. Do
+! NOT use a context diff. This example explains the format that Vim expects for
+! the "ed" style diff: >
+
+ 1a2
+ > bbb
+***************
+*** 384,395 ****
+--- 387,402 ----
+ endif
+ silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new .
+ \ " > " . v:fname_out
++ redraw!
+ endfunction
+
+ The "-a" argument is used to force comparing the files as text, comparing as
+ binaries isn't useful. The "--binary" argument makes the files read in binary
+ mode, so that a CTRL-Z doesn't end the text on DOS.
+
++ The `redraw!` command may not be needed, depending on whether executing a
++ shell command shows something on the display or not.
++
+ *E810* *E97*
+ Vim will do a test if the diff output looks alright. If it doesn't, you will
+ get an error message. Possible causes:
+***************
+*** 441,444 ****
+ directory are accidentally patched. Vim will also delete files starting with
+ v:fname_in and ending in ".rej" and ".orig".
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 448,451 ----
+ directory are accidentally patched. Vim will also delete files starting with
+ v:fname_in and ending in ".rej" and ".orig".
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0359/runtime/doc/options.txt 2018-08-07 21:39:09.243060141 +0200
+--- runtime/doc/options.txt 2018-09-10 17:25:45.414250299 +0200
+***************
+*** 2605,2612 ****
+ {not in Vi}
+ {not available when compiled without the |+diff|
+ feature}
+! Expression which is evaluated to obtain an ed-style diff file from two
+! versions of a file. See |diff-diffexpr|.
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+
+--- 2609,2616 ----
+ {not in Vi}
+ {not available when compiled without the |+diff|
+ feature}
+! Expression which is evaluated to obtain a diff file (either ed-style
+! or unified-style) from two versions of a file. See |diff-diffexpr|.
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+
+***************
+*** 2653,2663 ****
+ foldcolumn:{n} Set the 'foldcolumn' option to {n} when
+ starting diff mode. Without this 2 is used.
+
+! Examples: >
+
+! :set diffopt=filler,context:4
+ :set diffopt=
+! :set diffopt=filler,foldcolumn:3
+ <
+ *'digraph'* *'dg'* *'nodigraph'* *'nodg'*
+ 'digraph' 'dg' boolean (default off)
+--- 2657,2687 ----
+ foldcolumn:{n} Set the 'foldcolumn' option to {n} when
+ starting diff mode. Without this 2 is used.
+
+! internal Use the internal diff library. This is
+! ignored when 'diffexpr' is set. *E960*
+! When running out of memory when writing a
+! buffer this item will be ignored for diffs
+! involving that buffer. Set the 'verbose'
+! option to see when this happens.
+!
+! indent-heuristic
+! Use the indent heuristic for the internal
+! diff library.
+!
+! algorithm:{text} Use the specified diff algorithm with the
+! internal diff engine. Currently supported
+! algorithms are:
+! myers the default algorithm
+! minimal spend extra time to generate the
+! smallest possible diff
+! patience patience diff algorithm
+! histogram histogram diff algorithm
+
+! Examples: >
+! :set diffopt=internal,filler,context:4
+ :set diffopt=
+! :set diffopt=internal,filler,foldcolumn:3
+! :set diffopt-=internal " do NOT use the internal diff parser
+ <
+ *'digraph'* *'dg'* *'nodigraph'* *'nodg'*
+ 'digraph' 'dg' boolean (default off)
+*** ../vim-8.1.0359/src/Make_cyg_ming.mak 2018-06-30 16:25:00.551755794 +0200
+--- src/Make_cyg_ming.mak 2018-09-10 17:29:26.599063750 +0200
+***************
+*** 166,171 ****
+--- 166,190 ----
+ ifndef CROSS_COMPILE
+ CROSS_COMPILE =
+ endif
++
++ # About the "sh.exe" condition, as explained by Ken Takata:
++ #
++ # If the makefile is executed with mingw32-make and sh.exe is not found in
++ # $PATH, then $SHELL is set to "sh.exe" (without any path). In this case,
++ # unix-like commands might not work and a dos-style path is needed.
++ #
++ # If the makefile is executed with mingw32-make and sh.exe IS found in $PATH,
++ # then $SHELL is set with the actual path of sh.exe (e.g.
++ # "C:/msys64/usr/bin/sh.exe"). In this case, unix-like commands can be used.
++ #
++ # If it is executed by the "make" command from cmd.exe, $SHELL is set to
++ # "/bin/sh". If the "make" command is in the $PATH, other unix-like commands
++ # might also work.
++ #
++ # If it is executed by the "make" command from a unix-like shell,
++ # $SHELL is set with the unix-style path (e.g. "/bin/bash").
++ # In this case, unix-like commands can be used.
++ #
+ ifneq (sh.exe, $(SHELL))
+ DEL = rm
+ MKDIR = mkdir -p
+***************
+*** 810,815 ****
+--- 829,851 ----
+ $(OUTDIR)/term_vterm.o
+ endif
+
++ # Include xdiff
++ OBJ += $(OUTDIR)/xdiffi.o \
++ $(OUTDIR)/xemit.o \
++ $(OUTDIR)/xprepare.o \
++ $(OUTDIR)/xutils.o \
++ $(OUTDIR)/xhistogram.o \
++ $(OUTDIR)/xpatience.o
++
++ XDIFF_DEPS = \
++ xdiff/xdiff.h \
++ xdiff/xdiffi.h \
++ xdiff/xemit.h \
++ xdiff/xinclude.h \
++ xdiff/xmacros.h \
++ xdiff/xprepare.h \
++ xdiff/xtypes.h \
++ xdiff/xutils.h
+
+ ifdef MZSCHEME
+ MZSCHEME_SUFFIX = Z
+***************
+*** 1055,1060 ****
+--- 1091,1113 ----
+ $(OUTDIR)/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/vterm.c -o $@
+
++ $(OUTDIR)/xdiffi.o: xdiff/xdiffi.c $(XDIFF_DEPS)
++ $(CC) -c $(CFLAGS) xdiff/xdiffi.c -o $(OUTDIR)/xdiffi.o
++
++ $(OUTDIR)/xemit.o: xdiff/xemit.c $(XDIFF_DEPS)
++ $(CC) -c $(CFLAGS) xdiff/xemit.c -o $(OUTDIR)/xemit.o
++
++ $(OUTDIR)/xprepare.o: xdiff/xprepare.c $(XDIFF_DEPS)
++ $(CC) -c $(CFLAGS) xdiff/xprepare.c -o $(OUTDIR)/xprepare.o
++
++ $(OUTDIR)/xutils.o: xdiff/xutils.c $(XDIFF_DEPS)
++ $(CC) -c $(CFLAGS) xdiff/xutils.c -o $(OUTDIR)/xutils.o
++
++ $(OUTDIR)/xhistogram.o: xdiff/xhistogram.c $(XDIFF_DEPS)
++ $(CC) -c $(CFLAGS) xdiff/xhistogram.c -o $(OUTDIR)/xhistogram.o
++
++ $(OUTDIR)/xpatience.o: xdiff/xpatience.c $(XDIFF_DEPS)
++ $(CC) -c $(CFLAGS) xdiff/xpatience.c -o $(OUTDIR)/xpatience.o
+
+ pathdef.c: $(INCL)
+ ifneq (sh.exe, $(SHELL))
+*** ../vim-8.1.0359/src/Make_mvc.mak 2018-07-04 23:05:19.221931527 +0200
+--- src/Make_mvc.mak 2018-09-10 17:32:03.885044447 +0200
+***************
+*** 813,818 ****
+--- 813,836 ----
+ !endif
+ SUBSYSTEM_TOOLS = console
+
++ XDIFF_OBJ = $(OBJDIR)/xdiffi.obj \
++ $(OBJDIR)/xemit.obj \
++ $(OBJDIR)/xprepare.obj \
++ $(OBJDIR)/xutils.obj \
++ $(OBJDIR)/xhistogram.obj \
++ $(OBJDIR)/xpatience.obj
++
++ XDIFF_DEPS = \
++ xdiff/xdiff.h \
++ xdiff/xdiffi.h \
++ xdiff/xemit.h \
++ xdiff/xinclude.h \
++ xdiff/xmacros.h \
++ xdiff/xprepare.h \
++ xdiff/xtypes.h \
++ xdiff/xutils.h
++
++
+ !if "$(SUBSYSTEM_VER)" != ""
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER)
+***************
+*** 1204,1215 ****
+ tee/tee.exe \
+ GvimExt/gvimext.dll
+
+! $(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
+ $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
+ $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
+ version.c version.h
+ $(CC) $(CFLAGS_OUTDIR) version.c
+! $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
+ $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
+ $(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
+ $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
+--- 1222,1233 ----
+ tee/tee.exe \
+ GvimExt/gvimext.dll
+
+! $(VIM).exe: $(OUTDIR) $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
+ $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
+ $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
+ version.c version.h
+ $(CC) $(CFLAGS_OUTDIR) version.c
+! $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
+ $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
+ $(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
+ $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
+***************
+*** 1304,1309 ****
+--- 1322,1328 ----
+ $(MAKE) /NOLOGO -f Make_dos.mak nolog
+ $(MAKE) /NOLOGO -f Make_dos.mak $@.res
+ $(MAKE) /NOLOGO -f Make_dos.mak report
++ cat messages
+ cd ..
+
+ ###########################################################################
+***************
+*** 1344,1349 ****
+--- 1363,1386 ----
+
+ $(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
+
++ $(OUTDIR)/xdiffi.obj: $(OUTDIR) xdiff/xdiffi.c $(XDIFF_DEPS)
++ $(CC) $(CFLAGS_OUTDIR) xdiff/xdiffi.c
++
++ $(OUTDIR)/xemit.obj: $(OUTDIR) xdiff/xemit.c $(XDIFF_DEPS)
++ $(CC) $(CFLAGS_OUTDIR) xdiff/xemit.c
++
++ $(OUTDIR)/xprepare.obj: $(OUTDIR) xdiff/xprepare.c $(XDIFF_DEPS)
++ $(CC) $(CFLAGS_OUTDIR) xdiff/xprepare.c
++
++ $(OUTDIR)/xutils.obj: $(OUTDIR) xdiff/xutils.c $(XDIFF_DEPS)
++ $(CC) $(CFLAGS_OUTDIR) xdiff/xutils.c
++
++ $(OUTDIR)/xhistogram.obj: $(OUTDIR) xdiff/xhistogram.c $(XDIFF_DEPS)
++ $(CC) $(CFLAGS_OUTDIR) xdiff/xhistogram.c
++
++ $(OUTDIR)/xpatience.obj: $(OUTDIR) xdiff/xpatience.c $(XDIFF_DEPS)
++ $(CC) $(CFLAGS_OUTDIR) xdiff/xpatience.c
++
+ $(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
+
+ $(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
+*** ../vim-8.1.0359/src/Makefile 2018-07-07 22:26:49.306702821 +0200
+--- src/Makefile 2018-09-10 17:32:57.212394678 +0200
+***************
+*** 1400,1405 ****
+--- 1400,1431 ----
+
+ TERM_SRC = libvterm/src/*.c
+
++ XDIFF_SRC = \
++ xdiff/xdiffi.c \
++ xdiff/xemit.c \
++ xdiff/xprepare.c \
++ xdiff/xutils.c \
++ xdiff/xhistogram.c \
++ xdiff/xpatience.c \
++
++ XDIFF_OBJS = \
++ objects/xdiffi.o \
++ objects/xemit.o \
++ objects/xprepare.o \
++ objects/xutils.o \
++ objects/xhistogram.o \
++ objects/xpatience.o \
++
++ XDIFF_INCL = \
++ xdiff/xdiff.h \
++ xdiff/xdiffi.h \
++ xdiff/xemit.h \
++ xdiff/xinclude.h \
++ xdiff/xmacros.h \
++ xdiff/xprepare.h \
++ xdiff/xtypes.h \
++ xdiff/xutils.h \
++
+ ### Command to create dependencies based on #include "..."
+ ### prototype headers are ignored due to -DPROTO, system
+ ### headers #include <...> are ignored if we use the -MM option, as
+***************
+*** 1611,1616 ****
+--- 1637,1643 ----
+ SRC = $(BASIC_SRC) \
+ $(GUI_SRC) \
+ $(TERM_SRC) \
++ $(XDIFF_SRC) \
+ $(HANGULIN_SRC) \
+ $(LUA_SRC) \
+ $(MZSCHEME_SRC) \
+***************
+*** 1728,1733 ****
+--- 1755,1761 ----
+ $(WORKSHOP_OBJ) \
+ $(NETBEANS_OBJ) \
+ $(CHANNEL_OBJ) \
++ $(XDIFF_OBJS) \
+ $(WSDEBUG_OBJ)
+
+ # The files included by tests are not in OBJ_COMMON.
+***************
+*** 2731,2737 ****
+
+ shadow: runtime pixmaps
+ $(MKDIR_P) $(SHADOWDIR)
+! cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak .
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+--- 2759,2765 ----
+
+ shadow: runtime pixmaps
+ $(MKDIR_P) $(SHADOWDIR)
+! cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../xdiff ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak .
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+***************
+*** 2915,2921 ****
+ objects/dict.o: dict.c
+ $(CCC) -o $@ dict.c
+
+! objects/diff.o: diff.c
+ $(CCC) -o $@ diff.c
+
+ objects/digraph.o: digraph.c
+--- 2943,2949 ----
+ objects/dict.o: dict.c
+ $(CCC) -o $@ dict.c
+
+! objects/diff.o: diff.c $(XDIFF_INCL)
+ $(CCC) -o $@ diff.c
+
+ objects/digraph.o: digraph.c
+***************
+*** 3229,3234 ****
+--- 3257,3283 ----
+ objects/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/vterm.c
+
++ CCCDIFF = $(CCC_NF) $(ALL_CFLAGS)
++
++ objects/xdiffi.o: xdiff/xdiffi.c $(XDIFF_INCL)
++ $(CCCDIFF) -o $@ xdiff/xdiffi.c
++
++ objects/xprepare.o: xdiff/xprepare.c $(XDIFF_INCL)
++ $(CCCDIFF) -o $@ xdiff/xprepare.c
++
++ objects/xutils.o: xdiff/xutils.c $(XDIFF_INCL)
++ $(CCCDIFF) -o $@ xdiff/xutils.c
++
++ objects/xemit.o: xdiff/xemit.c $(XDIFF_INCL)
++ $(CCCDIFF) -o $@ xdiff/xemit.c
++
++ objects/xhistogram.o: xdiff/xhistogram.c $(XDIFF_INCL)
++ $(CCCDIFF) -o $@ xdiff/xhistogram.c
++
++ objects/xpatience.o: xdiff/xpatience.c $(XDIFF_INCL)
++ $(CCCDIFF) -o $@ xdiff/xpatience.c
++
++
+ ###############################################################################
+ ### MacOS X installation
+ ###
+*** ../vim-8.1.0359/src/diff.c 2018-06-03 14:42:17.840505115 +0200
+--- src/diff.c 2018-09-10 17:36:06.542197741 +0200
+***************
+*** 9,31 ****
+
+ /*
+ * diff.c: code for diff'ing two, three or four buffers.
+ */
+
+ #include "vim.h"
+
+ #if defined(FEAT_DIFF) || defined(PROTO)
+
+ static int diff_busy = FALSE; /* ex_diffgetput() is busy */
+
+ /* flags obtained from the 'diffopt' option */
+! #define DIFF_FILLER 1 /* display filler lines */
+! #define DIFF_ICASE 2 /* ignore case */
+! #define DIFF_IWHITE 4 /* ignore change in white space */
+! #define DIFF_HORIZONTAL 8 /* horizontal splits */
+! #define DIFF_VERTICAL 16 /* vertical splits */
+! #define DIFF_HIDDEN_OFF 32 /* diffoff when hidden */
+ static int diff_flags = DIFF_FILLER;
+
+ #define LBUFLEN 50 /* length of line in diff file */
+
+ static int diff_a_works = MAYBE; /* TRUE when "diff -a" works, FALSE when it
+--- 9,40 ----
+
+ /*
+ * diff.c: code for diff'ing two, three or four buffers.
++ *
++ * There are three ways to diff:
++ * - Shell out to an external diff program, using files.
++ * - Use the compiled-in xdiff library.
++ * - Let 'diffexpr' do the work, using files.
+ */
+
+ #include "vim.h"
++ #include "xdiff/xdiff.h"
+
+ #if defined(FEAT_DIFF) || defined(PROTO)
+
+ static int diff_busy = FALSE; /* ex_diffgetput() is busy */
+
+ /* flags obtained from the 'diffopt' option */
+! #define DIFF_FILLER 1 // display filler lines
+! #define DIFF_ICASE 2 // ignore case
+! #define DIFF_IWHITE 4 // ignore change in white space
+! #define DIFF_HORIZONTAL 8 // horizontal splits
+! #define DIFF_VERTICAL 16 // vertical splits
+! #define DIFF_HIDDEN_OFF 32 // diffoff when hidden
+! #define DIFF_INTERNAL 64 // use internal xdiff algorithm
+ static int diff_flags = DIFF_FILLER;
+
++ static long diff_algorithm = 0;
++
+ #define LBUFLEN 50 /* length of line in diff file */
+
+ static int diff_a_works = MAYBE; /* TRUE when "diff -a" works, FALSE when it
+***************
+*** 36,57 ****
+ checked yet */
+ #endif
+
+ static int diff_buf_idx(buf_T *buf);
+ static int diff_buf_idx_tp(buf_T *buf, tabpage_T *tp);
+ static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T line2, long amount, long amount_after);
+ static void diff_check_unchanged(tabpage_T *tp, diff_T *dp);
+ static int diff_check_sanity(tabpage_T *tp, diff_T *dp);
+ static void diff_redraw(int dofold);
+! static int diff_write(buf_T *buf, char_u *fname);
+! static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff);
+ static int diff_equal_entry(diff_T *dp, int idx1, int idx2);
+ static int diff_cmp(char_u *s1, char_u *s2);
+ #ifdef FEAT_FOLDING
+ static void diff_fold_update(diff_T *dp, int skip_idx);
+ #endif
+! static void diff_read(int idx_orig, int idx_new, char_u *fname);
+ static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, int idx_new);
+ static diff_T *diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp);
+
+ #ifndef USE_CR
+ # define tag_fgets vim_fgets
+--- 45,89 ----
+ checked yet */
+ #endif
+
++ // used for diff input
++ typedef struct {
++ char_u *din_fname; // used for external diff
++ mmfile_t din_mmfile; // used for internal diff
++ } diffin_T;
++
++ // used for diff result
++ typedef struct {
++ char_u *dout_fname; // used for external diff
++ garray_T dout_ga; // used for internal diff
++ } diffout_T;
++
++ // two diff inputs and one result
++ typedef struct {
++ diffin_T dio_orig; // original file input
++ diffin_T dio_new; // new file input
++ diffout_T dio_diff; // diff result
++ int dio_internal; // using internal diff
++ } diffio_T;
++
+ static int diff_buf_idx(buf_T *buf);
+ static int diff_buf_idx_tp(buf_T *buf, tabpage_T *tp);
+ static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T line2, long amount, long amount_after);
+ static void diff_check_unchanged(tabpage_T *tp, diff_T *dp);
+ static int diff_check_sanity(tabpage_T *tp, diff_T *dp);
+ static void diff_redraw(int dofold);
+! static int check_external_diff(diffio_T *diffio);
+! static int diff_file(diffio_T *diffio);
+ static int diff_equal_entry(diff_T *dp, int idx1, int idx2);
+ static int diff_cmp(char_u *s1, char_u *s2);
+ #ifdef FEAT_FOLDING
+ static void diff_fold_update(diff_T *dp, int skip_idx);
+ #endif
+! static void diff_read(int idx_orig, int idx_new, diffout_T *fname);
+ static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, int idx_new);
+ static diff_T *diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp);
++ static int parse_diff_ed(char_u *line, linenr_T *lnum_orig, long *count_orig, linenr_T *lnum_new, long *count_new);
++ static int parse_diff_unified(char_u *line, linenr_T *lnum_orig, long *count_orig, linenr_T *lnum_new, long *count_new);
++ static int xdiff_out(void *priv, mmbuffer_t *mb, int nbuf);
+
+ #ifndef USE_CR
+ # define tag_fgets vim_fgets
+***************
+*** 631,711 ****
+ }
+ }
+
+ /*
+! * Write buffer "buf" to file "name".
+! * Always use 'fileformat' set to "unix".
+! * Return FAIL for failure
+ */
+ static int
+! diff_write(buf_T *buf, char_u *fname)
+ {
+ int r;
+ char_u *save_ff;
+
+ save_ff = buf->b_p_ff;
+ buf->b_p_ff = vim_strsave((char_u *)FF_UNIX);
+! r = buf_write(buf, fname, NULL, (linenr_T)1, buf->b_ml.ml_line_count,
+! NULL, FALSE, FALSE, FALSE, TRUE);
+ free_string_option(buf->b_p_ff);
+ buf->b_p_ff = save_ff;
+ return r;
+ }
+
+ /*
+ * Completely update the diffs for the buffers involved.
+ * This uses the ordinary "diff" command.
+ * The buffers are written to a file, also for unmodified buffers (the file
+ * could have been produced by autocommands, e.g. the netrw plugin).
+ */
+ void
+! ex_diffupdate(
+! exarg_T *eap) /* can be NULL */
+ {
+- buf_T *buf;
+ int idx_orig;
+ int idx_new;
+! char_u *tmp_orig;
+! char_u *tmp_new;
+! char_u *tmp_diff;
+! FILE *fd;
+! int ok;
+! int io_error = FALSE;
+
+! /* Delete all diffblocks. */
+ diff_clear(curtab);
+ curtab->tp_diff_invalid = FALSE;
+
+! /* Use the first buffer as the original text. */
+ for (idx_orig = 0; idx_orig < DB_COUNT; ++idx_orig)
+ if (curtab->tp_diffbuf[idx_orig] != NULL)
+ break;
+ if (idx_orig == DB_COUNT)
+ return;
+
+! /* Only need to do something when there is another buffer. */
+ for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
+ if (curtab->tp_diffbuf[idx_new] != NULL)
+ break;
+ if (idx_new == DB_COUNT)
+ return;
+
+! /* We need three temp file names. */
+! tmp_orig = vim_tempname('o', TRUE);
+! tmp_new = vim_tempname('n', TRUE);
+! tmp_diff = vim_tempname('d', TRUE);
+! if (tmp_orig == NULL || tmp_new == NULL || tmp_diff == NULL)
+! goto theend;
+
+! /*
+! * Do a quick test if "diff" really works. Otherwise it looks like there
+! * are no differences. Can't use the return value, it's non-zero when
+! * there are differences.
+! * May try twice, first with "-a" and then without.
+! */
+ for (;;)
+ {
+ ok = FALSE;
+! fd = mch_fopen((char *)tmp_orig, "w");
+ if (fd == NULL)
+ io_error = TRUE;
+ else
+--- 663,952 ----
+ }
+ }
+
++ static void
++ clear_diffin(diffin_T *din)
++ {
++ if (din->din_fname == NULL)
++ {
++ vim_free(din->din_mmfile.ptr);
++ din->din_mmfile.ptr = NULL;
++ }
++ else
++ mch_remove(din->din_fname);
++ }
++
++ static void
++ clear_diffout(diffout_T *dout)
++ {
++ if (dout->dout_fname == NULL)
++ ga_clear_strings(&dout->dout_ga);
++ else
++ mch_remove(dout->dout_fname);
++ }
++
+ /*
+! * Write buffer "buf" to a memory buffer.
+! * Return FAIL for failure.
+ */
+ static int
+! diff_write_buffer(buf_T *buf, diffin_T *din)
+! {
+! linenr_T lnum;
+! char_u *s;
+! long len = 0;
+! char_u *ptr;
+!
+! // xdiff requires one big block of memory with all the text.
+! for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum)
+! len += STRLEN(ml_get_buf(buf, lnum, FALSE)) + 1;
+! ptr = lalloc(len, TRUE);
+! if (ptr == NULL)
+! {
+! // Allocating memory failed. This can happen, because we try to read
+! // the whole buffer text into memory. Set the failed flag, the diff
+! // will be retried with external diff. The flag is never reset.
+! buf->b_diff_failed = TRUE;
+! if (p_verbose > 0)
+! {
+! verbose_enter();
+! smsg((char_u *)
+! _("Not enough memory to use internal diff for buffer \"%s\""),
+! buf->b_fname);
+! verbose_leave();
+! }
+! return FAIL;
+! }
+! din->din_mmfile.ptr = (char *)ptr;
+! din->din_mmfile.size = len;
+!
+! len = 0;
+! for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum)
+! {
+! for (s = ml_get_buf(buf, lnum, FALSE); *s != NUL; )
+! {
+! if (diff_flags & DIFF_ICASE)
+! {
+! int c;
+!
+! // xdiff doesn't support ignoring case, fold-case the text.
+! #ifdef FEAT_MBYTE
+! int orig_len;
+! char_u cbuf[MB_MAXBYTES + 1];
+!
+! c = PTR2CHAR(s);
+! c = enc_utf8 ? utf_fold(c) : MB_TOLOWER(c);
+! orig_len = MB_PTR2LEN(s);
+! if (mb_char2bytes(c, cbuf) != orig_len)
+! // TODO: handle byte length difference
+! mch_memmove(ptr + len, s, orig_len);
+! else
+! mch_memmove(ptr + len, cbuf, orig_len);
+!
+! s += orig_len;
+! len += orig_len;
+! #else
+! c = *s++;
+! ptr[len++] = TOLOWER_LOC(c);
+! #endif
+! }
+! else
+! ptr[len++] = *s++;
+! }
+! ptr[len++] = NL;
+! }
+! return OK;
+! }
+!
+! /*
+! * Write buffer "buf" to file or memory buffer.
+! * Return FAIL for failure.
+! */
+! static int
+! diff_write(buf_T *buf, diffin_T *din)
+ {
+ int r;
+ char_u *save_ff;
+
++ if (din->din_fname == NULL)
++ return diff_write_buffer(buf, din);
++
++ // Always use 'fileformat' set to "unix".
+ save_ff = buf->b_p_ff;
+ buf->b_p_ff = vim_strsave((char_u *)FF_UNIX);
+! r = buf_write(buf, din->din_fname, NULL,
+! (linenr_T)1, buf->b_ml.ml_line_count,
+! NULL, FALSE, FALSE, FALSE, TRUE);
+ free_string_option(buf->b_p_ff);
+ buf->b_p_ff = save_ff;
+ return r;
+ }
+
+ /*
++ * Update the diffs for all buffers involved.
++ */
++ static void
++ diff_try_update(
++ diffio_T *dio,
++ int idx_orig,
++ exarg_T *eap) // "eap" can be NULL
++ {
++ buf_T *buf;
++ int idx_new;
++
++ if (dio->dio_internal)
++ {
++ ga_init2(&dio->dio_diff.dout_ga, sizeof(char *), 1000);
++ }
++ else
++ {
++ // We need three temp file names.
++ dio->dio_orig.din_fname = vim_tempname('o', TRUE);
++ dio->dio_new.din_fname = vim_tempname('n', TRUE);
++ dio->dio_diff.dout_fname = vim_tempname('d', TRUE);
++ if (dio->dio_orig.din_fname == NULL
++ || dio->dio_new.din_fname == NULL
++ || dio->dio_diff.dout_fname == NULL)
++ goto theend;
++ }
++
++ // Check external diff is actually working.
++ if (!dio->dio_internal && check_external_diff(dio) == FAIL)
++ goto theend;
++
++ // :diffupdate!
++ if (eap != NULL && eap->forceit)
++ for (idx_new = idx_orig; idx_new < DB_COUNT; ++idx_new)
++ {
++ buf = curtab->tp_diffbuf[idx_new];
++ if (buf_valid(buf))
++ buf_check_timestamp(buf, FALSE);
++ }
++
++ // Write the first buffer to a tempfile or mmfile_t.
++ buf = curtab->tp_diffbuf[idx_orig];
++ if (diff_write(buf, &dio->dio_orig) == FAIL)
++ goto theend;
++
++ // Make a difference between the first buffer and every other.
++ for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
++ {
++ buf = curtab->tp_diffbuf[idx_new];
++ if (buf == NULL || buf->b_ml.ml_mfp == NULL)
++ continue; // skip buffer that isn't loaded
++
++ // Write the other buffer and diff with the first one.
++ if (diff_write(buf, &dio->dio_new) == FAIL)
++ continue;
++ if (diff_file(dio) == FAIL)
++ continue;
++
++ // Read the diff output and add each entry to the diff list.
++ diff_read(idx_orig, idx_new, &dio->dio_diff);
++
++ clear_diffin(&dio->dio_new);
++ clear_diffout(&dio->dio_diff);
++ }
++ clear_diffin(&dio->dio_orig);
++
++ theend:
++ vim_free(dio->dio_orig.din_fname);
++ vim_free(dio->dio_new.din_fname);
++ vim_free(dio->dio_diff.dout_fname);
++ }
++
++ /*
++ * Return TRUE if the options are set to use the internal diff library.
++ * Note that if the internal diff failed for one of the buffers, the external
++ * diff will be used anyway.
++ */
++ static int
++ diff_internal(void)
++ {
++ return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL;
++ }
++
++ /*
++ * Return TRUE if the internal diff failed for one of the diff buffers.
++ */
++ static int
++ diff_internal_failed(void)
++ {
++ int idx;
++
++ // Only need to do something when there is another buffer.
++ for (idx = 0; idx < DB_COUNT; ++idx)
++ if (curtab->tp_diffbuf[idx] != NULL
++ && curtab->tp_diffbuf[idx]->b_diff_failed)
++ return TRUE;
++ return FALSE;
++ }
++
++ /*
+ * Completely update the diffs for the buffers involved.
+ * This uses the ordinary "diff" command.
+ * The buffers are written to a file, also for unmodified buffers (the file
+ * could have been produced by autocommands, e.g. the netrw plugin).
+ */
+ void
+! ex_diffupdate(exarg_T *eap) // "eap" can be NULL
+ {
+ int idx_orig;
+ int idx_new;
+! diffio_T diffio;
+
+! // Delete all diffblocks.
+ diff_clear(curtab);
+ curtab->tp_diff_invalid = FALSE;
+
+! // Use the first buffer as the original text.
+ for (idx_orig = 0; idx_orig < DB_COUNT; ++idx_orig)
+ if (curtab->tp_diffbuf[idx_orig] != NULL)
+ break;
+ if (idx_orig == DB_COUNT)
+ return;
+
+! // Only need to do something when there is another buffer.
+ for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
+ if (curtab->tp_diffbuf[idx_new] != NULL)
+ break;
+ if (idx_new == DB_COUNT)
+ return;
+
+! // Only use the internal method if it did not fail for one of the buffers.
+! vim_memset(&diffio, 0, sizeof(diffio));
+! diffio.dio_internal = diff_internal() && !diff_internal_failed();
+!
+! diff_try_update(&diffio, idx_orig, eap);
+! if (diffio.dio_internal && diff_internal_failed())
+! {
+! // Internal diff failed, use external diff instead.
+! vim_memset(&diffio, 0, sizeof(diffio));
+! diff_try_update(&diffio, idx_orig, eap);
+! }
+
+! // force updating cursor position on screen
+! curwin->w_valid_cursor.lnum = 0;
+!
+! diff_redraw(TRUE);
+! }
+!
+! /*
+! * Do a quick test if "diff" really works. Otherwise it looks like there
+! * are no differences. Can't use the return value, it's non-zero when
+! * there are differences.
+! */
+! static int
+! check_external_diff(diffio_T *diffio)
+! {
+! FILE *fd;
+! int ok;
+! int io_error = FALSE;
+!
+! // May try twice, first with "-a" and then without.
+ for (;;)
+ {
+ ok = FALSE;
+! fd = mch_fopen((char *)diffio->dio_orig.din_fname, "w");
+ if (fd == NULL)
+ io_error = TRUE;
+ else
+***************
+*** 713,719 ****
+ if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1)
+ io_error = TRUE;
+ fclose(fd);
+! fd = mch_fopen((char *)tmp_new, "w");
+ if (fd == NULL)
+ io_error = TRUE;
+ else
+--- 954,960 ----
+ if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1)
+ io_error = TRUE;
+ fclose(fd);
+! fd = mch_fopen((char *)diffio->dio_new.din_fname, "w");
+ if (fd == NULL)
+ io_error = TRUE;
+ else
+***************
+*** 721,728 ****
+ if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1)
+ io_error = TRUE;
+ fclose(fd);
+! diff_file(tmp_orig, tmp_new, tmp_diff);
+! fd = mch_fopen((char *)tmp_diff, "r");
+ if (fd == NULL)
+ io_error = TRUE;
+ else
+--- 962,970 ----
+ if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1)
+ io_error = TRUE;
+ fclose(fd);
+! fd = NULL;
+! if (diff_file(diffio) == OK)
+! fd = mch_fopen((char *)diffio->dio_diff.dout_fname, "r");
+ if (fd == NULL)
+ io_error = TRUE;
+ else
+***************
+*** 739,748 ****
+ }
+ fclose(fd);
+ }
+! mch_remove(tmp_diff);
+! mch_remove(tmp_new);
+ }
+! mch_remove(tmp_orig);
+ }
+
+ #ifdef FEAT_EVAL
+--- 981,990 ----
+ }
+ fclose(fd);
+ }
+! mch_remove(diffio->dio_diff.dout_fname);
+! mch_remove(diffio->dio_new.din_fname);
+ }
+! mch_remove(diffio->dio_orig.din_fname);
+ }
+
+ #ifdef FEAT_EVAL
+***************
+*** 785,882 ****
+ #if defined(MSWIN)
+ diff_bin_works = MAYBE;
+ #endif
+! goto theend;
+ }
+
+! /* :diffupdate! */
+! if (eap != NULL && eap->forceit)
+! for (idx_new = idx_orig; idx_new < DB_COUNT; ++idx_new)
+! {
+! buf = curtab->tp_diffbuf[idx_new];
+! if (buf_valid(buf))
+! buf_check_timestamp(buf, FALSE);
+! }
+!
+! /* Write the first buffer to a tempfile. */
+! buf = curtab->tp_diffbuf[idx_orig];
+! if (diff_write(buf, tmp_orig) == FAIL)
+! goto theend;
+!
+! /* Make a difference between the first buffer and every other. */
+! for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
+! {
+! buf = curtab->tp_diffbuf[idx_new];
+! if (buf == NULL || buf->b_ml.ml_mfp == NULL)
+! continue; /* skip buffer that isn't loaded */
+! if (diff_write(buf, tmp_new) == FAIL)
+! continue;
+! diff_file(tmp_orig, tmp_new, tmp_diff);
+
+! /* Read the diff output and add each entry to the diff list. */
+! diff_read(idx_orig, idx_new, tmp_diff);
+! mch_remove(tmp_diff);
+! mch_remove(tmp_new);
+! }
+! mch_remove(tmp_orig);
+
+! /* force updating cursor position on screen */
+! curwin->w_valid_cursor.lnum = 0;
+
+! diff_redraw(TRUE);
+
+! theend:
+! vim_free(tmp_orig);
+! vim_free(tmp_new);
+! vim_free(tmp_diff);
+ }
+
+ /*
+ * Make a diff between files "tmp_orig" and "tmp_new", results in "tmp_diff".
+ */
+! static void
+! diff_file(
+! char_u *tmp_orig,
+! char_u *tmp_new,
+! char_u *tmp_diff)
+ {
+ char_u *cmd;
+ size_t len;
+
+ #ifdef FEAT_EVAL
+ if (*p_dex != NUL)
+! /* Use 'diffexpr' to generate the diff file. */
+ eval_diff(tmp_orig, tmp_new, tmp_diff);
+ else
+ #endif
+ {
+ len = STRLEN(tmp_orig) + STRLEN(tmp_new)
+ + STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
+ cmd = alloc((unsigned)len);
+! if (cmd != NULL)
+! {
+! /* We don't want $DIFF_OPTIONS to get in the way. */
+! if (getenv("DIFF_OPTIONS"))
+! vim_setenv((char_u *)"DIFF_OPTIONS", (char_u *)"");
+!
+! /* Build the diff command and execute it. Always use -a, binary
+! * differences are of no use. Ignore errors, diff returns
+! * non-zero when differences have been found. */
+! vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
+! diff_a_works == FALSE ? "" : "-a ",
+ #if defined(MSWIN)
+! diff_bin_works == TRUE ? "--binary " : "",
+ #else
+! "",
+ #endif
+! (diff_flags & DIFF_IWHITE) ? "-b " : "",
+! (diff_flags & DIFF_ICASE) ? "-i " : "",
+! tmp_orig, tmp_new);
+! append_redir(cmd, (int)len, p_srr, tmp_diff);
+! block_autocmds(); /* Avoid ShellCmdPost stuff */
+! (void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
+! unblock_autocmds();
+! vim_free(cmd);
+! }
+ }
+ }
+
+--- 1027,1127 ----
+ #if defined(MSWIN)
+ diff_bin_works = MAYBE;
+ #endif
+! return FAIL;
+ }
++ return OK;
++ }
+
+! /*
+! * Invoke the xdiff function.
+! */
+! static int
+! diff_file_internal(diffio_T *diffio)
+! {
+! xpparam_t param;
+! xdemitconf_t emit_cfg;
+! xdemitcb_t emit_cb;
+
+! vim_memset(&param, 0, sizeof(param));
+! vim_memset(&emit_cfg, 0, sizeof(emit_cfg));
+! vim_memset(&emit_cb, 0, sizeof(emit_cb));
+
+! param.flags = diff_algorithm;
+
+! if (diff_flags & DIFF_IWHITE)
+! param.flags |= XDF_IGNORE_WHITESPACE_CHANGE;
+
+! emit_cfg.ctxlen = 0; // don't need any diff_context here
+! emit_cb.priv = &diffio->dio_diff;
+! emit_cb.outf = xdiff_out;
+! if (xdl_diff(&diffio->dio_orig.din_mmfile,
+! &diffio->dio_new.din_mmfile,
+! &param, &emit_cfg, &emit_cb) < 0)
+! {
+! EMSG(_("E960: Problem creating the internal diff"));
+! return FAIL;
+! }
+! return OK;
+ }
+
+ /*
+ * Make a diff between files "tmp_orig" and "tmp_new", results in "tmp_diff".
++ * return OK or FAIL;
+ */
+! static int
+! diff_file(diffio_T *dio)
+ {
+ char_u *cmd;
+ size_t len;
++ char_u *tmp_orig = dio->dio_orig.din_fname;
++ char_u *tmp_new = dio->dio_new.din_fname;
++ char_u *tmp_diff = dio->dio_diff.dout_fname;
+
+ #ifdef FEAT_EVAL
+ if (*p_dex != NUL)
+! {
+! // Use 'diffexpr' to generate the diff file.
+ eval_diff(tmp_orig, tmp_new, tmp_diff);
++ return OK;
++ }
+ else
+ #endif
++ // Use xdiff for generating the diff.
++ if (dio->dio_internal)
++ {
++ return diff_file_internal(dio);
++ }
++ else
+ {
+ len = STRLEN(tmp_orig) + STRLEN(tmp_new)
+ + STRLEN(tmp_diff) + STRLEN(p_srr) + 27;
+ cmd = alloc((unsigned)len);
+! if (cmd == NULL)
+! return FAIL;
+!
+! // We don't want $DIFF_OPTIONS to get in the way.
+! if (getenv("DIFF_OPTIONS"))
+! vim_setenv((char_u *)"DIFF_OPTIONS", (char_u *)"");
+!
+! // Build the diff command and execute it. Always use -a, binary
+! // differences are of no use. Ignore errors, diff returns
+! // non-zero when differences have been found.
+! vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
+! diff_a_works == FALSE ? "" : "-a ",
+ #if defined(MSWIN)
+! diff_bin_works == TRUE ? "--binary " : "",
+ #else
+! "",
+ #endif
+! (diff_flags & DIFF_IWHITE) ? "-b " : "",
+! (diff_flags & DIFF_ICASE) ? "-i " : "",
+! tmp_orig, tmp_new);
+! append_redir(cmd, (int)len, p_srr, tmp_diff);
+! block_autocmds(); // avoid ShellCmdPost stuff
+! (void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
+! unblock_autocmds();
+! vim_free(cmd);
+! return OK;
+ }
+ }
+
+***************
+*** 1282,1370 ****
+ */
+ static void
+ diff_read(
+! int idx_orig, /* idx of original file */
+! int idx_new, /* idx of new file */
+! char_u *fname) /* name of diff output file */
+ {
+! FILE *fd;
+ diff_T *dprev = NULL;
+ diff_T *dp = curtab->tp_first_diff;
+ diff_T *dn, *dpl;
+- long f1, l1, f2, l2;
+ char_u linebuf[LBUFLEN]; /* only need to hold the diff line */
+! int difftype;
+! char_u *p;
+ long off;
+ int i;
+ linenr_T lnum_orig, lnum_new;
+ long count_orig, count_new;
+ int notset = TRUE; /* block "*dp" not set yet */
+
+! fd = mch_fopen((char *)fname, "r");
+! if (fd == NULL)
+ {
+! EMSG(_("E98: Cannot read diff output"));
+! return;
+ }
+!
+! for (;;)
+ {
+! if (tag_fgets(linebuf, LBUFLEN, fd))
+! break; /* end of file */
+! if (!isdigit(*linebuf))
+! continue; /* not the start of a diff block */
+!
+! /* This line must be one of three formats:
+! * {first}[,{last}]c{first}[,{last}]
+! * {first}a{first}[,{last}]
+! * {first}[,{last}]d{first}
+! */
+! p = linebuf;
+! f1 = getdigits(&p);
+! if (*p == ',')
+! {
+! ++p;
+! l1 = getdigits(&p);
+! }
+! else
+! l1 = f1;
+! if (*p != 'a' && *p != 'c' && *p != 'd')
+! continue; /* invalid diff format */
+! difftype = *p++;
+! f2 = getdigits(&p);
+! if (*p == ',')
+ {
+! ++p;
+! l2 = getdigits(&p);
+ }
+! else
+! l2 = f2;
+! if (l1 < f1 || l2 < f2)
+! continue; /* invalid line range */
+
+! if (difftype == 'a')
+ {
+! lnum_orig = f1 + 1;
+! count_orig = 0;
+ }
+ else
+ {
+! lnum_orig = f1;
+! count_orig = l1 - f1 + 1;
+ }
+! if (difftype == 'd')
+ {
+! lnum_new = f2 + 1;
+! count_new = 0;
+ }
+ else
+ {
+! lnum_new = f2;
+! count_new = l2 - f2 + 1;
+ }
+
+! /* Go over blocks before the change, for which orig and new are equal.
+! * Copy blocks from orig to new. */
+ while (dp != NULL
+ && lnum_orig > dp->df_lnum[idx_orig] + dp->df_count[idx_orig])
+ {
+--- 1527,1631 ----
+ */
+ static void
+ diff_read(
+! int idx_orig, // idx of original file
+! int idx_new, // idx of new file
+! diffout_T *dout) // diff output
+ {
+! FILE *fd = NULL;
+! int line_idx = 0;
+ diff_T *dprev = NULL;
+ diff_T *dp = curtab->tp_first_diff;
+ diff_T *dn, *dpl;
+ char_u linebuf[LBUFLEN]; /* only need to hold the diff line */
+! char_u *line;
+ long off;
+ int i;
+ linenr_T lnum_orig, lnum_new;
+ long count_orig, count_new;
+ int notset = TRUE; /* block "*dp" not set yet */
++ enum {
++ DIFF_ED,
++ DIFF_UNIFIED,
++ DIFF_NONE
++ } diffstyle = DIFF_NONE;
+
+! if (dout->dout_fname == NULL)
+ {
+! diffstyle = DIFF_UNIFIED;
+ }
+! else
+ {
+! fd = mch_fopen((char *)dout->dout_fname, "r");
+! if (fd == NULL)
+ {
+! EMSG(_("E98: Cannot read diff output"));
+! return;
+ }
+! }
+
+! for (;;)
+! {
+! if (fd == NULL)
+ {
+! if (line_idx >= dout->dout_ga.ga_len)
+! break; // did last line
+! line = ((char_u **)dout->dout_ga.ga_data)[line_idx++];
+ }
+ else
+ {
+! if (tag_fgets(linebuf, LBUFLEN, fd))
+! break; // end of file
+! line = linebuf;
+! }
+!
+! if (diffstyle == DIFF_NONE)
+! {
+! // Determine diff style.
+! // ed like diff looks like this:
+! // {first}[,{last}]c{first}[,{last}]
+! // {first}a{first}[,{last}]
+! // {first}[,{last}]d{first}
+! //
+! // unified diff looks like this:
+! // --- file1 2018-03-20 13:23:35.783153140 +0100
+! // +++ file2 2018-03-20 13:23:41.183156066 +0100
+! // @@ -1,3 +1,5 @@
+! if (isdigit(*line))
+! diffstyle = DIFF_ED;
+! else if ((STRNCMP(line, "@@ ", 3) == 0))
+! diffstyle = DIFF_UNIFIED;
+! else if ((STRNCMP(line, "--- ", 4) == 0)
+! && (tag_fgets(linebuf, LBUFLEN, fd) == 0)
+! && (STRNCMP(line, "+++ ", 4) == 0)
+! && (tag_fgets(linebuf, LBUFLEN, fd) == 0)
+! && (STRNCMP(line, "@@ ", 3) == 0))
+! diffstyle = DIFF_UNIFIED;
+! }
+!
+! if (diffstyle == DIFF_ED)
+! {
+! if (!isdigit(*line))
+! continue; // not the start of a diff block
+! if (parse_diff_ed(line, &lnum_orig, &count_orig,
+! &lnum_new, &count_new) == FAIL)
+! continue;
+ }
+! else if (diffstyle == DIFF_UNIFIED)
+ {
+! if (STRNCMP(line, "@@ ", 3) != 0)
+! continue; // not the start of a diff block
+! if (parse_diff_unified(line, &lnum_orig, &count_orig,
+! &lnum_new, &count_new) == FAIL)
+! continue;
+ }
+ else
+ {
+! EMSG(_("E959: Invalid diff format."));
+! break;
+ }
+
+! // Go over blocks before the change, for which orig and new are equal.
+! // Copy blocks from orig to new.
+ while (dp != NULL
+ && lnum_orig > dp->df_lnum[idx_orig] + dp->df_count[idx_orig])
+ {
+***************
+*** 1379,1392 ****
+ && lnum_orig <= dp->df_lnum[idx_orig] + dp->df_count[idx_orig]
+ && lnum_orig + count_orig >= dp->df_lnum[idx_orig])
+ {
+! /* New block overlaps with existing block(s).
+! * First find last block that overlaps. */
+ for (dpl = dp; dpl->df_next != NULL; dpl = dpl->df_next)
+ if (lnum_orig + count_orig < dpl->df_next->df_lnum[idx_orig])
+ break;
+
+! /* If the newly found block starts before the old one, set the
+! * start back a number of lines. */
+ off = dp->df_lnum[idx_orig] - lnum_orig;
+ if (off > 0)
+ {
+--- 1640,1653 ----
+ && lnum_orig <= dp->df_lnum[idx_orig] + dp->df_count[idx_orig]
+ && lnum_orig + count_orig >= dp->df_lnum[idx_orig])
+ {
+! // New block overlaps with existing block(s).
+! // First find last block that overlaps.
+ for (dpl = dp; dpl->df_next != NULL; dpl = dpl->df_next)
+ if (lnum_orig + count_orig < dpl->df_next->df_lnum[idx_orig])
+ break;
+
+! // If the newly found block starts before the old one, set the
+! // start back a number of lines.
+ off = dp->df_lnum[idx_orig] - lnum_orig;
+ if (off > 0)
+ {
+***************
+*** 1398,1421 ****
+ }
+ else if (notset)
+ {
+! /* new block inside existing one, adjust new block */
+ dp->df_lnum[idx_new] = lnum_new + off;
+ dp->df_count[idx_new] = count_new - off;
+ }
+ else
+! /* second overlap of new block with existing block */
+ dp->df_count[idx_new] += count_new - count_orig
+ + dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]
+ - (dp->df_lnum[idx_orig] + dp->df_count[idx_orig]);
+
+! /* Adjust the size of the block to include all the lines to the
+! * end of the existing block or the new diff, whatever ends last. */
+ off = (lnum_orig + count_orig)
+ - (dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]);
+ if (off < 0)
+ {
+! /* new change ends in existing block, adjust the end if not
+! * done already */
+ if (notset)
+ dp->df_count[idx_new] += -off;
+ off = 0;
+--- 1659,1682 ----
+ }
+ else if (notset)
+ {
+! // new block inside existing one, adjust new block
+ dp->df_lnum[idx_new] = lnum_new + off;
+ dp->df_count[idx_new] = count_new - off;
+ }
+ else
+! // second overlap of new block with existing block
+ dp->df_count[idx_new] += count_new - count_orig
+ + dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]
+ - (dp->df_lnum[idx_orig] + dp->df_count[idx_orig]);
+
+! // Adjust the size of the block to include all the lines to the
+! // end of the existing block or the new diff, whatever ends last.
+ off = (lnum_orig + count_orig)
+ - (dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]);
+ if (off < 0)
+ {
+! // new change ends in existing block, adjust the end if not
+! // done already
+ if (notset)
+ dp->df_count[idx_new] += -off;
+ off = 0;
+***************
+*** 1425,1431 ****
+ dp->df_count[i] = dpl->df_lnum[i] + dpl->df_count[i]
+ - dp->df_lnum[i] + off;
+
+! /* Delete the diff blocks that have been merged into one. */
+ dn = dp->df_next;
+ dp->df_next = dpl->df_next;
+ while (dn != dp->df_next)
+--- 1686,1692 ----
+ dp->df_count[i] = dpl->df_lnum[i] + dpl->df_count[i]
+ - dp->df_lnum[i] + off;
+
+! // Delete the diff blocks that have been merged into one.
+ dn = dp->df_next;
+ dp->df_next = dpl->df_next;
+ while (dn != dp->df_next)
+***************
+*** 1437,1443 ****
+ }
+ else
+ {
+! /* Allocate a new diffblock. */
+ dp = diff_alloc_new(curtab, dprev, dp);
+ if (dp == NULL)
+ goto done;
+--- 1698,1704 ----
+ }
+ else
+ {
+! // Allocate a new diffblock.
+ dp = diff_alloc_new(curtab, dprev, dp);
+ if (dp == NULL)
+ goto done;
+***************
+*** 1447,1463 ****
+ dp->df_lnum[idx_new] = lnum_new;
+ dp->df_count[idx_new] = count_new;
+
+! /* Set values for other buffers, these must be equal to the
+! * original buffer, otherwise there would have been a change
+! * already. */
+ for (i = idx_orig + 1; i < idx_new; ++i)
+ if (curtab->tp_diffbuf[i] != NULL)
+ diff_copy_entry(dprev, dp, idx_orig, i);
+ }
+! notset = FALSE; /* "*dp" has been set */
+ }
+
+! /* for remaining diff blocks orig and new are equal */
+ while (dp != NULL)
+ {
+ if (notset)
+--- 1708,1724 ----
+ dp->df_lnum[idx_new] = lnum_new;
+ dp->df_count[idx_new] = count_new;
+
+! // Set values for other buffers, these must be equal to the
+! // original buffer, otherwise there would have been a change
+! // already.
+ for (i = idx_orig + 1; i < idx_new; ++i)
+ if (curtab->tp_diffbuf[i] != NULL)
+ diff_copy_entry(dprev, dp, idx_orig, i);
+ }
+! notset = FALSE; // "*dp" has been set
+ }
+
+! // for remaining diff blocks orig and new are equal
+ while (dp != NULL)
+ {
+ if (notset)
+***************
+*** 1468,1474 ****
+ }
+
+ done:
+! fclose(fd);
+ }
+
+ /*
+--- 1729,1736 ----
+ }
+
+ done:
+! if (fd != NULL)
+! fclose(fd);
+ }
+
+ /*
+***************
+*** 1860,1865 ****
+--- 2122,2128 ----
+ int diff_context_new = 6;
+ int diff_flags_new = 0;
+ int diff_foldcolumn_new = 2;
++ long diff_algorithm_new = 0;
+ tabpage_T *tp;
+
+ p = p_dip;
+***************
+*** 1905,1910 ****
+--- 2168,2208 ----
+ p += 9;
+ diff_flags_new |= DIFF_HIDDEN_OFF;
+ }
++ else if (STRNCMP(p, "indent-heuristic", 16) == 0)
++ {
++ p += 16;
++ diff_algorithm_new |= XDF_INDENT_HEURISTIC;
++ }
++ else if (STRNCMP(p, "internal", 8) == 0)
++ {
++ p += 8;
++ diff_flags_new |= DIFF_INTERNAL;
++ }
++ else if (STRNCMP(p, "algorithm:", 10) == 0)
++ {
++ p += 10;
++ if (STRNCMP(p, "myers", 5) == 0)
++ {
++ p += 5;
++ diff_algorithm_new = 0;
++ }
++ else if (STRNCMP(p, "minimal", 7) == 0)
++ {
++ p += 7;
++ diff_algorithm_new = XDF_NEED_MINIMAL;
++ }
++ else if (STRNCMP(p, "patience", 8) == 0)
++ {
++ p += 8;
++ diff_algorithm_new = XDF_PATIENCE_DIFF;
++ }
++ else if (STRNCMP(p, "histogram", 9) == 0)
++ {
++ p += 9;
++ diff_algorithm_new = XDF_HISTOGRAM_DIFF;
++ }
++ }
++
+ if (*p != ',' && *p != NUL)
+ return FAIL;
+ if (*p == ',')
+***************
+*** 1916,1928 ****
+ return FAIL;
+
+ /* If "icase" or "iwhite" was added or removed, need to update the diff. */
+! if (diff_flags != diff_flags_new)
+ FOR_ALL_TABPAGES(tp)
+ tp->tp_diff_invalid = TRUE;
+
+ diff_flags = diff_flags_new;
+ diff_context = diff_context_new;
+ diff_foldcolumn = diff_foldcolumn_new;
+
+ diff_redraw(TRUE);
+
+--- 2214,2227 ----
+ return FAIL;
+
+ /* If "icase" or "iwhite" was added or removed, need to update the diff. */
+! if (diff_flags != diff_flags_new || diff_algorithm != diff_algorithm_new)
+ FOR_ALL_TABPAGES(tp)
+ tp->tp_diff_invalid = TRUE;
+
+ diff_flags = diff_flags_new;
+ diff_context = diff_context_new;
+ diff_foldcolumn = diff_foldcolumn_new;
++ diff_algorithm = diff_algorithm_new;
+
+ diff_redraw(TRUE);
+
+***************
+*** 2690,2693 ****
+--- 2989,3144 ----
+ return n;
+ }
+
++ /*
++ * Handle an ED style diff line.
++ * Return FAIL if the line does not contain diff info.
++ */
++ static int
++ parse_diff_ed(
++ char_u *line,
++ linenr_T *lnum_orig,
++ long *count_orig,
++ linenr_T *lnum_new,
++ long *count_new)
++ {
++ char_u *p;
++ long f1, l1, f2, l2;
++ int difftype;
++
++ // The line must be one of three formats:
++ // change: {first}[,{last}]c{first}[,{last}]
++ // append: {first}a{first}[,{last}]
++ // delete: {first}[,{last}]d{first}
++ p = line;
++ f1 = getdigits(&p);
++ if (*p == ',')
++ {
++ ++p;
++ l1 = getdigits(&p);
++ }
++ else
++ l1 = f1;
++ if (*p != 'a' && *p != 'c' && *p != 'd')
++ return FAIL; // invalid diff format
++ difftype = *p++;
++ f2 = getdigits(&p);
++ if (*p == ',')
++ {
++ ++p;
++ l2 = getdigits(&p);
++ }
++ else
++ l2 = f2;
++ if (l1 < f1 || l2 < f2)
++ return FAIL;
++
++ if (difftype == 'a')
++ {
++ *lnum_orig = f1 + 1;
++ *count_orig = 0;
++ }
++ else
++ {
++ *lnum_orig = f1;
++ *count_orig = l1 - f1 + 1;
++ }
++ if (difftype == 'd')
++ {
++ *lnum_new = f2 + 1;
++ *count_new = 0;
++ }
++ else
++ {
++ *lnum_new = f2;
++ *count_new = l2 - f2 + 1;
++ }
++ return OK;
++ }
++
++ /*
++ * Parses unified diff with zero(!) context lines.
++ * Return FAIL if there is no diff information in "line".
++ */
++ static int
++ parse_diff_unified(
++ char_u *line,
++ linenr_T *lnum_orig,
++ long *count_orig,
++ linenr_T *lnum_new,
++ long *count_new)
++ {
++ char_u *p;
++ long oldline, oldcount, newline, newcount;
++
++ // Parse unified diff hunk header:
++ // @@ -oldline,oldcount +newline,newcount @@
++ p = line;
++ if (*p++ == '@' && *p++ == '@' && *p++ == ' ' && *p++ == '-')
++ {
++ oldline = getdigits(&p);
++ if (*p == ',')
++ {
++ ++p;
++ oldcount = getdigits(&p);
++ }
++ else
++ oldcount = 1;
++ if (*p++ == ' ' && *p++ == '+')
++ {
++ newline = getdigits(&p);
++ if (*p == ',')
++ {
++ ++p;
++ newcount = getdigits(&p);
++ }
++ else
++ newcount = 1;
++ }
++ else
++ return FAIL; // invalid diff format
++
++ if (oldcount == 0)
++ oldline += 1;
++ if (newcount == 0)
++ newline += 1;
++ if (newline == 0)
++ newline = 1;
++
++ *lnum_orig = oldline;
++ *count_orig = oldcount;
++ *lnum_new = newline;
++ *count_new = newcount;
++
++ return OK;
++ }
++
++ return FAIL;
++ }
++
++ /*
++ * Callback function for the xdl_diff() function.
++ * Stores the diff output in a grow array.
++ */
++ static int
++ xdiff_out(void *priv, mmbuffer_t *mb, int nbuf)
++ {
++ diffout_T *dout = (diffout_T *)priv;
++ int i;
++ char_u *p;
++
++ for (i = 0; i < nbuf; i++)
++ {
++ // We are only interested in the header lines, skip text lines.
++ if (STRNCMP(mb[i].ptr, "@@ ", 3) != 0)
++ continue;
++ if (ga_grow(&dout->dout_ga, 1) == FAIL)
++ return -1;
++ p = vim_strnsave((char_u *)mb[i].ptr, mb[i].size);
++ if (p == NULL)
++ return -1;
++ ((char_u **)dout->dout_ga.ga_data)[dout->dout_ga.ga_len++] = p;
++ }
++ return 0;
++ }
++
+ #endif /* FEAT_DIFF */
+*** ../vim-8.1.0359/src/structs.h 2018-09-06 16:27:20.664831945 +0200
+--- src/structs.h 2018-09-10 17:36:24.457997346 +0200
+***************
+*** 2433,2439 ****
+ term_T *b_term; /* When not NULL this buffer is for a terminal
+ * window. */
+ #endif
+!
+ }; /* file_buffer */
+
+
+--- 2433,2441 ----
+ term_T *b_term; /* When not NULL this buffer is for a terminal
+ * window. */
+ #endif
+! #ifdef FEAT_DIFF
+! int b_diff_failed; // internal diff failed for this buffer
+! #endif
+ }; /* file_buffer */
+
+
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_01.dump 2018-09-10 17:44:36.056826154 +0200
+--- src/testdir/dumps/Test_diff_01.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|0+0#0000000#5fd7ff255| @33
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33
++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19
++ | @1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_02.dump 2018-09-10 17:44:36.060826113 +0200
+--- src/testdir/dumps/Test_diff_02.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|0+0#0000000#5fd7ff255| @33||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33
++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19
++ | @1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_03.dump 2018-09-10 17:44:36.064826075 +0200
+--- src/testdir/dumps/Test_diff_03.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19
++ | @1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_04.dump 2018-09-10 17:44:36.068826034 +0200
+--- src/testdir/dumps/Test_diff_04.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19
++ | @1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_05.dump 2018-09-10 17:44:36.072825994 +0200
+--- src/testdir/dumps/Test_diff_05.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|4+0#0000000#5fd7ff255| @33
++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_06.dump 2018-09-10 17:44:36.072825994 +0200
+--- src/testdir/dumps/Test_diff_06.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|4+0#0000000#5fd7ff255| @33||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_07.dump 2018-09-10 17:44:36.076825953 +0200
+--- src/testdir/dumps/Test_diff_07.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1>#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16||+1&&| +0#0000e05#a8a8a8255@1|#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|/+2#0000000#ff404010@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| +0&#ffd7ff255@13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|i+2#0000000#ff404010|n|t| |f|i|b|(|i|n|t| |n|)| +0&#ffd7ff255@20
++ | +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|n+2&#ff404010|t| |i|;| +0&#ffd7ff255@24||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|f+2&#ff404010|(|n| |>| |2|)| +0&#ffd7ff255@21
++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@7|p+2&#ff404010|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)+0&#ffd7ff255|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@7|r+2&#ff404010|e|t|u|r|n| |f|i|b|(|n|-|1|)| |+| |f|i|b|(|n|-|2|)+0&#ffd7ff255|;
++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|%|d|\|n|"|,| |f|o@1|)|;| @6||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|}| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|}| @29
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|r|e|t|u|r|n| |1|;| @21
++ | +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|i+2#0000000#ff404010|n|t| |f|a|c|t|(|i|n|t| |n|)| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|/+2#0000000#ff404010@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| +0&#ffd7ff255@13
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13
++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|f+2&#ff404010|(|n| |>| |1|)| +0&#ffd7ff255@21||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|n+2&#ff404010|t| |i|;| +0&#ffd7ff255@24
++ |X+3&#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p
++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|t|e|r|n|a|l| @52
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_08.dump 2018-09-10 17:44:36.080825913 +0200
+--- src/testdir/dumps/Test_diff_08.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1>#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16||+1&&| +0#0000e05#a8a8a8255@1|#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|i|b|(|i|n|t| |n|)| @20
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|{+0#0000000#5fd7ff255| @33
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|i|f|(|n| |>| |2|)| @21
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|{| @29
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|r|e|t|u|r|n| |f|i|b|(|n|-|1|)| |+| |f|i|b|(|n|-|2|)|;
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|}| @29
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|r|e|t|u|r|n| |1|;| @21
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|}+0#0000000#5fd7ff255| @33
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34
++ | +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13||+1&&| +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13
++ | +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13
++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29
++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ |X+3#0000000#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p
++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|p|a|t|i|e|n|c|e| @42
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_09.dump 2018-09-10 17:44:36.084825872 +0200
+--- src/testdir/dumps/Test_diff_09.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1>#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16||+1&&| +0#0000e05#a8a8a8255@1|#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|i|b|(|i|n|t| |n|)| @20
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|{+0#0000000#5fd7ff255| @33
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|i|f|(|n| |>| |2|)| @21
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|{| @29
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|r|e|t|u|r|n| |f|i|b|(|n|-|1|)| |+| |f|i|b|(|n|-|2|)|;
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|}| @29
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|r|e|t|u|r|n| |1|;| @21
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|}+0#0000000#5fd7ff255| @33
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34
++ | +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13||+1&&| +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13
++ | +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13
++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29
++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ |X+3#0000000#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p
++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|p|a|t|i|e|n|c|e| @42
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_10.dump 2018-09-10 17:44:36.088825834 +0200
+--- src/testdir/dumps/Test_diff_10.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|v|.|p|r|e|p|a|r|e| @19
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|e|n|d| @27
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|0|-|1| @9|A|l@1
++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|t|e|r|n|a|l| @52
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_11.dump 2018-09-10 17:44:36.092825793 +0200
+--- src/testdir/dumps/Test_diff_11.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|v|.|p|r|e|p|a|r|e| @19
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|e|n|d| @27
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|0|-|1| @9|A|l@1
++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|d|e|n|t|-|h|e|u|r|i|s|t|i|c| @44
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_12.dump 2018-09-10 17:44:36.096825753 +0200
+--- src/testdir/dumps/Test_diff_12.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| |+|-@1| |1|0| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| |1|0| |l|i|n|e|s|:| |1|-@19
++ | @1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_13.dump 2018-09-10 17:44:36.096825753 +0200
+--- src/testdir/dumps/Test_diff_13.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ |-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@34||+1&&|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|0|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|0|,|0|-|1| @9|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_14.dump 2018-09-10 17:44:36.100825712 +0200
+--- src/testdir/dumps/Test_diff_14.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|A+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|c+0#0000000#ffd7ff255|d| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1|c+0#0000000#ffd7ff255|D|e+2&#ff404010| +0&#ffd7ff255@31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_15.dump 2018-09-10 17:44:36.104825672 +0200
+--- src/testdir/dumps/Test_diff_15.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1>i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24
++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|i|f| |(|0|)| @25
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|{| @30
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @4
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|r|e|t|u|r|n| |0|;| @22||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|r|e|t|u|r|n| |0|;| @19
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|}| @30
++ | +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|&|v|i|m| |d|i|f@1|o|p|t|+|=|f|i|l@1|e|r| |d|i|f@1|o|p|t|+|=|i|w|h|i|t|e| @26
+*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_16.dump 2018-09-10 17:44:36.108825631 +0200
+--- src/testdir/dumps/Test_diff_16.dump 2018-09-10 17:36:51.625695584 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1>i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24
++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|i|f| |(|0|)| @25
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|{| @30
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @4
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|r|e|t|u|r|n| |0|;| @22||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|r|e|t|u|r|n| |0|;| @19
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|}| @30
++ | +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|t|e|r|n|a|l| @52
+*** ../vim-8.1.0359/src/testdir/test_diffmode.vim 2017-12-01 20:25:59.000000000 +0100
+--- src/testdir/test_diffmode.vim 2018-09-10 17:38:33.584583735 +0200
+***************
+*** 1,4 ****
+--- 1,6 ----
+ " Tests for diff mode
++ source shared.vim
++ source screendump.vim
+
+ func Test_diff_fold_sync()
+ enew!
+***************
+*** 33,38 ****
+--- 35,52 ----
+ endfunc
+
+ func Test_vert_split()
++ set diffopt=filler
++ call Common_vert_split()
++ set diffopt&
++ endfunc
++
++ func Test_vert_split_internal()
++ set diffopt=internal,filler
++ call Common_vert_split()
++ set diffopt&
++ endfunc
++
++ func Common_vert_split()
+ " Disable the title to avoid xterm keeping the wrong one.
+ set notitle noicon
+ new
+***************
+*** 275,284 ****
+ bwipe!
+ endfunc
+
+! func Test_diffopt_icase()
+! set diffopt=icase,foldcolumn:0
+!
+! e one
+ call setline(1, ['One', 'Two', 'Three', 'Four', 'Fi#ve'])
+ redraw
+ let normattr = screenattr(1, 1)
+--- 295,302 ----
+ bwipe!
+ endfunc
+
+! func Common_icase_test()
+! edit one
+ call setline(1, ['One', 'Two', 'Three', 'Four', 'Fi#ve'])
+ redraw
+ let normattr = screenattr(1, 1)
+***************
+*** 300,331 ****
+
+ diffoff!
+ %bwipe!
+ set diffopt&
+ endfunc
+
+! func Test_diffopt_iwhite()
+! set diffopt=iwhite,foldcolumn:0
+
+! e one
+! " Difference in trailing spaces should be ignored,
+ " but not other space differences.
+! call setline(1, ["One \t", 'Two', 'Three', 'Four'])
+ redraw
+ let normattr = screenattr(1, 1)
+ diffthis
+
+ botright vert new two
+! call setline(1, ["One\t ", "Two\t ", 'Three', ' Four'])
+ diffthis
+
+ redraw
+ call assert_equal(normattr, screenattr(1, 1))
+ call assert_equal(normattr, screenattr(2, 1))
+ call assert_equal(normattr, screenattr(3, 1))
+! call assert_notequal(normattr, screenattr(4, 1))
+
+ diffoff!
+ %bwipe!
+ set diffopt&
+ endfunc
+
+--- 318,371 ----
+
+ diffoff!
+ %bwipe!
++ endfunc
++
++ func Test_diffopt_icase()
++ set diffopt=icase,foldcolumn:0
++ call Common_icase_test()
+ set diffopt&
+ endfunc
+
+! func Test_diffopt_icase_internal()
+! set diffopt=icase,foldcolumn:0,internal
+! call Common_icase_test()
+! set diffopt&
+! endfunc
+
+! func Common_iwhite_test()
+! edit one
+! " Difference in trailing spaces and amount of spaces should be ignored,
+ " but not other space differences.
+! call setline(1, ["One \t", 'Two', 'Three', 'one two', 'one two', 'Four'])
+ redraw
+ let normattr = screenattr(1, 1)
+ diffthis
+
+ botright vert new two
+! call setline(1, ["One\t ", "Two\t ", 'Three', 'one two', 'onetwo', ' Four'])
+ diffthis
+
+ redraw
+ call assert_equal(normattr, screenattr(1, 1))
+ call assert_equal(normattr, screenattr(2, 1))
+ call assert_equal(normattr, screenattr(3, 1))
+! call assert_equal(normattr, screenattr(4, 1))
+! call assert_notequal(normattr, screenattr(5, 1))
+! call assert_notequal(normattr, screenattr(6, 1))
+
+ diffoff!
+ %bwipe!
++ endfunc
++
++ func Test_diffopt_iwhite()
++ set diffopt=iwhite,foldcolumn:0
++ call Common_iwhite_test()
++ set diffopt&
++ endfunc
++
++ func Test_diffopt_iwhite_internal()
++ set diffopt=internal,iwhite,foldcolumn:0
++ call Common_iwhite_test()
+ set diffopt&
+ endfunc
+
+***************
+*** 339,346 ****
+--- 379,391 ----
+
+ set diffopt=context:2
+ call assert_equal('+-- 2 lines: 1', foldtextresult(1))
++ set diffopt=internal,context:2
++ call assert_equal('+-- 2 lines: 1', foldtextresult(1))
++
+ set diffopt=context:1
+ call assert_equal('+-- 3 lines: 1', foldtextresult(1))
++ set diffopt=internal,context:1
++ call assert_equal('+-- 3 lines: 1', foldtextresult(1))
+
+ diffoff!
+ %bwipe!
+***************
+*** 348,354 ****
+ endfunc
+
+ func Test_diffopt_horizontal()
+! set diffopt=horizontal
+ diffsplit
+
+ call assert_equal(&columns, winwidth(1))
+--- 393,399 ----
+ endfunc
+
+ func Test_diffopt_horizontal()
+! set diffopt=internal,horizontal
+ diffsplit
+
+ call assert_equal(&columns, winwidth(1))
+***************
+*** 362,368 ****
+ endfunc
+
+ func Test_diffopt_vertical()
+! set diffopt=vertical
+ diffsplit
+
+ call assert_equal(&lines - 2, winheight(1))
+--- 407,413 ----
+ endfunc
+
+ func Test_diffopt_vertical()
+! set diffopt=internal,vertical
+ diffsplit
+
+ call assert_equal(&lines - 2, winheight(1))
+***************
+*** 376,382 ****
+ endfunc
+
+ func Test_diffopt_hiddenoff()
+! set diffopt=filler,foldcolumn:0,hiddenoff
+ e! one
+ call setline(1, ['Two', 'Three'])
+ redraw
+--- 421,427 ----
+ endfunc
+
+ func Test_diffopt_hiddenoff()
+! set diffopt=internal,filler,foldcolumn:0,hiddenoff
+ e! one
+ call setline(1, ['Two', 'Three'])
+ redraw
+***************
+*** 399,405 ****
+ endfunc
+
+ func Test_diffoff_hidden()
+! set diffopt=filler,foldcolumn:0
+ e! one
+ call setline(1, ['Two', 'Three'])
+ redraw
+--- 444,450 ----
+ endfunc
+
+ func Test_diffoff_hidden()
+! set diffopt=internal,filler,foldcolumn:0
+ e! one
+ call setline(1, ['Two', 'Three'])
+ redraw
+***************
+*** 629,631 ****
+--- 674,791 ----
+ bwipe!
+ bwipe!
+ endfunc
++
++ func WriteDiffFiles(list1, list2)
++ call writefile(a:list1, 'Xfile1')
++ call writefile(a:list2, 'Xfile2')
++ endfunc
++
++ " Verify a screendump with both the external and external diff.
++ func VerifyBoth(buf, dumpfile, extra)
++ call term_sendkeys(a:buf, ":diffupdate!\<cr>")
++ " trailing : for leaving the cursor on the command line
++ for cmd in [":set diffopt=filler" . a:extra . "\<cr>:", ":set diffopt+=internal\<cr>:"]
++ call term_sendkeys(a:buf, cmd)
++ if VerifyScreenDump(a:buf, a:dumpfile, {}, cmd =~ 'internal' ? 'internal' : 'external')
++ break " don't let the next iteration overwrite the "failed" file.
++ endif
++ endfor
++ endfunc
++
++ func Test_diff_screen()
++ if !CanRunVimInTerminal() || !has('menu')
++ return
++ endif
++ " clean up already existing swap files, just in case
++ call delete('.Xfile1.swp')
++ call delete('.Xfile2.swp')
++
++ " Test 1: Add a line in beginning of file 2
++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
++ let buf = RunVimInTerminal('-d Xfile1 Xfile2', {})
++ " Set autoread mode, ,so that Vim won't complain once we re-write the test
++ " files
++ call term_sendkeys(buf, ":set autoread\<cr>\<c-w>w:set autoread\<cr>\<c-w>w")
++
++ call VerifyBoth(buf, 'Test_diff_01', '')
++
++ " Test 2: Add a line in beginning of file 1
++ call WriteDiffFiles([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
++ call VerifyBoth(buf, 'Test_diff_02', '')
++
++ " Test 3: Add a line at the end of file 2
++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
++ call VerifyBoth(buf, 'Test_diff_03', '')
++
++ " Test 4: Add a line at the end of file 1
++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
++ call VerifyBoth(buf, 'Test_diff_04', '')
++
++ " Test 5: Add a line in the middle of file 2, remove on at the end of file 1
++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10])
++ call VerifyBoth(buf, 'Test_diff_05', '')
++
++ " Test 6: Add a line in the middle of file 1, remove on at the end of file 2
++ call WriteDiffFiles([1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
++ call VerifyBoth(buf, 'Test_diff_06', '')
++
++ " Test 7 - 9: Test normal/patience/histogram diff algorithm
++ call WriteDiffFiles(['#include <stdio.h>', '', '// Frobs foo heartily', 'int frobnitz(int foo)', '{',
++ \ ' int i;', ' for(i = 0; i < 10; i++)', ' {', ' printf("Your answer is: ");',
++ \ ' printf("%d\n", foo);', ' }', '}', '', 'int fact(int n)', '{', ' if(n > 1)', ' {',
++ \ ' return fact(n-1) * n;', ' }', ' return 1;', '}', '', 'int main(int argc, char **argv)',
++ \ '{', ' frobnitz(fact(10));', '}'],
++ \ ['#include <stdio.h>', '', 'int fib(int n)', '{', ' if(n > 2)', ' {',
++ \ ' return fib(n-1) + fib(n-2);', ' }', ' return 1;', '}', '', '// Frobs foo heartily',
++ \ 'int frobnitz(int foo)', '{', ' int i;', ' for(i = 0; i < 10; i++)', ' {',
++ \ ' printf("%d\n", foo);', ' }', '}', '',
++ \ 'int main(int argc, char **argv)', '{', ' frobnitz(fib(10));', '}'])
++ call term_sendkeys(buf, ":diffupdate!\<cr>")
++ call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_07', {})
++
++ call term_sendkeys(buf, ":set diffopt+=algorithm:patience\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_08', {})
++
++ call term_sendkeys(buf, ":set diffopt+=algorithm:histogram\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_09', {})
++
++ " Test 10-11: normal/indent-heuristic
++ call term_sendkeys(buf, ":set diffopt&vim\<cr>")
++ call WriteDiffFiles(['', ' def finalize(values)', '', ' values.each do |v|', ' v.finalize', ' end'],
++ \ ['', ' def finalize(values)', '', ' values.each do |v|', ' v.prepare', ' end', '',
++ \ ' values.each do |v|', ' v.finalize', ' end'])
++ call term_sendkeys(buf, ":diffupdate!\<cr>")
++ call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_10', {})
++
++ call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_11', {})
++
++ " Test 12: diff the same file
++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
++ call VerifyBoth(buf, 'Test_diff_12', '')
++
++ " Test 13: diff an empty file
++ call WriteDiffFiles([], [])
++ call VerifyBoth(buf, 'Test_diff_13', '')
++
++ " Test 14: test diffopt+=icase
++ call WriteDiffFiles(['a', 'b', 'cd'], ['A', 'b', 'cDe'])
++ call VerifyBoth(buf, 'Test_diff_14', " diffopt+=filler diffopt+=icase")
++
++ " Test 15-16: test diffopt+=iwhite
++ call WriteDiffFiles(['int main()', '{', ' printf("Hello, World!");', ' return 0;', '}'],
++ \ ['int main()', '{', ' if (0)', ' {', ' printf("Hello, World!");', ' return 0;', ' }', '}'])
++ call term_sendkeys(buf, ":diffupdate!\<cr>")
++ call term_sendkeys(buf, ":set diffopt&vim diffopt+=filler diffopt+=iwhite\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_15', {})
++ call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
++ call VerifyScreenDump(buf, 'Test_diff_16', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('Xfile1')
++ call delete('Xfile2')
++ endfunc
++
+*** ../vim-8.1.0359/src/xdiff/COPYING 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/COPYING 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,504 ----
++ GNU LESSER GENERAL PUBLIC LICENSE
++ Version 2.1, February 1999
++
++ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
++ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++ [This is the first released version of the Lesser GPL. It also counts
++ as the successor of the GNU Library Public License, version 2, hence
++ the version number 2.1.]
++
++ Preamble
++
++ The licenses for most software are designed to take away your
++ freedom to share and change it. By contrast, the GNU General Public
++ Licenses are intended to guarantee your freedom to share and change
++ free software--to make sure the software is free for all its users.
++
++ This license, the Lesser General Public License, applies to some
++ specially designated software packages--typically libraries--of the
++ Free Software Foundation and other authors who decide to use it. You
++ can use it too, but we suggest you first think carefully about whether
++ this license or the ordinary General Public License is the better
++ strategy to use in any particular case, based on the explanations below.
++
++ When we speak of free software, we are referring to freedom of use,
++ not price. Our General Public Licenses are designed to make sure that
++ you have the freedom to distribute copies of free software (and charge
++ for this service if you wish); that you receive source code or can get
++ it if you want it; that you can change the software and use pieces of
++ it in new free programs; and that you are informed that you can do
++ these things.
++
++ To protect your rights, we need to make restrictions that forbid
++ distributors to deny you these rights or to ask you to surrender these
++ rights. These restrictions translate to certain responsibilities for
++ you if you distribute copies of the library or if you modify it.
++
++ For example, if you distribute copies of the library, whether gratis
++ or for a fee, you must give the recipients all the rights that we gave
++ you. You must make sure that they, too, receive or can get the source
++ code. If you link other code with the library, you must provide
++ complete object files to the recipients, so that they can relink them
++ with the library after making changes to the library and recompiling
++ it. And you must show them these terms so they know their rights.
++
++ We protect your rights with a two-step method: (1) we copyright the
++ library, and (2) we offer you this license, which gives you legal
++ permission to copy, distribute and/or modify the library.
++
++ To protect each distributor, we want to make it very clear that
++ there is no warranty for the free library. Also, if the library is
++ modified by someone else and passed on, the recipients should know
++ that what they have is not the original version, so that the original
++ author's reputation will not be affected by problems that might be
++ introduced by others.
++
++ Finally, software patents pose a constant threat to the existence of
++ any free program. We wish to make sure that a company cannot
++ effectively restrict the users of a free program by obtaining a
++ restrictive license from a patent holder. Therefore, we insist that
++ any patent license obtained for a version of the library must be
++ consistent with the full freedom of use specified in this license.
++
++ Most GNU software, including some libraries, is covered by the
++ ordinary GNU General Public License. This license, the GNU Lesser
++ General Public License, applies to certain designated libraries, and
++ is quite different from the ordinary General Public License. We use
++ this license for certain libraries in order to permit linking those
++ libraries into non-free programs.
++
++ When a program is linked with a library, whether statically or using
++ a shared library, the combination of the two is legally speaking a
++ combined work, a derivative of the original library. The ordinary
++ General Public License therefore permits such linking only if the
++ entire combination fits its criteria of freedom. The Lesser General
++ Public License permits more lax criteria for linking other code with
++ the library.
++
++ We call this license the "Lesser" General Public License because it
++ does Less to protect the user's freedom than the ordinary General
++ Public License. It also provides other free software developers Less
++ of an advantage over competing non-free programs. These disadvantages
++ are the reason we use the ordinary General Public License for many
++ libraries. However, the Lesser license provides advantages in certain
++ special circumstances.
++
++ For example, on rare occasions, there may be a special need to
++ encourage the widest possible use of a certain library, so that it becomes
++ a de-facto standard. To achieve this, non-free programs must be
++ allowed to use the library. A more frequent case is that a free
++ library does the same job as widely used non-free libraries. In this
++ case, there is little to gain by limiting the free library to free
++ software only, so we use the Lesser General Public License.
++
++ In other cases, permission to use a particular library in non-free
++ programs enables a greater number of people to use a large body of
++ free software. For example, permission to use the GNU C Library in
++ non-free programs enables many more people to use the whole GNU
++ operating system, as well as its variant, the GNU/Linux operating
++ system.
++
++ Although the Lesser General Public License is Less protective of the
++ users' freedom, it does ensure that the user of a program that is
++ linked with the Library has the freedom and the wherewithal to run
++ that program using a modified version of the Library.
++
++ The precise terms and conditions for copying, distribution and
++ modification follow. Pay close attention to the difference between a
++ "work based on the library" and a "work that uses the library". The
++ former contains code derived from the library, whereas the latter must
++ be combined with the library in order to run.
++
++ GNU LESSER GENERAL PUBLIC LICENSE
++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
++
++ 0. This License Agreement applies to any software library or other
++ program which contains a notice placed by the copyright holder or
++ other authorized party saying it may be distributed under the terms of
++ this Lesser General Public License (also called "this License").
++ Each licensee is addressed as "you".
++
++ A "library" means a collection of software functions and/or data
++ prepared so as to be conveniently linked with application programs
++ (which use some of those functions and data) to form executables.
++
++ The "Library", below, refers to any such software library or work
++ which has been distributed under these terms. A "work based on the
++ Library" means either the Library or any derivative work under
++ copyright law: that is to say, a work containing the Library or a
++ portion of it, either verbatim or with modifications and/or translated
++ straightforwardly into another language. (Hereinafter, translation is
++ included without limitation in the term "modification".)
++
++ "Source code" for a work means the preferred form of the work for
++ making modifications to it. For a library, complete source code means
++ all the source code for all modules it contains, plus any associated
++ interface definition files, plus the scripts used to control compilation
++ and installation of the library.
++
++ Activities other than copying, distribution and modification are not
++ covered by this License; they are outside its scope. The act of
++ running a program using the Library is not restricted, and output from
++ such a program is covered only if its contents constitute a work based
++ on the Library (independent of the use of the Library in a tool for
++ writing it). Whether that is true depends on what the Library does
++ and what the program that uses the Library does.
++
++ 1. You may copy and distribute verbatim copies of the Library's
++ complete source code as you receive it, in any medium, provided that
++ you conspicuously and appropriately publish on each copy an
++ appropriate copyright notice and disclaimer of warranty; keep intact
++ all the notices that refer to this License and to the absence of any
++ warranty; and distribute a copy of this License along with the
++ Library.
++
++ You may charge a fee for the physical act of transferring a copy,
++ and you may at your option offer warranty protection in exchange for a
++ fee.
++
++ 2. You may modify your copy or copies of the Library or any portion
++ of it, thus forming a work based on the Library, and copy and
++ distribute such modifications or work under the terms of Section 1
++ above, provided that you also meet all of these conditions:
++
++ a) The modified work must itself be a software library.
++
++ b) You must cause the files modified to carry prominent notices
++ stating that you changed the files and the date of any change.
++
++ c) You must cause the whole of the work to be licensed at no
++ charge to all third parties under the terms of this License.
++
++ d) If a facility in the modified Library refers to a function or a
++ table of data to be supplied by an application program that uses
++ the facility, other than as an argument passed when the facility
++ is invoked, then you must make a good faith effort to ensure that,
++ in the event an application does not supply such function or
++ table, the facility still operates, and performs whatever part of
++ its purpose remains meaningful.
++
++ (For example, a function in a library to compute square roots has
++ a purpose that is entirely well-defined independent of the
++ application. Therefore, Subsection 2d requires that any
++ application-supplied function or table used by this function must
++ be optional: if the application does not supply it, the square
++ root function must still compute square roots.)
++
++ These requirements apply to the modified work as a whole. If
++ identifiable sections of that work are not derived from the Library,
++ and can be reasonably considered independent and separate works in
++ themselves, then this License, and its terms, do not apply to those
++ sections when you distribute them as separate works. But when you
++ distribute the same sections as part of a whole which is a work based
++ on the Library, the distribution of the whole must be on the terms of
++ this License, whose permissions for other licensees extend to the
++ entire whole, and thus to each and every part regardless of who wrote
++ it.
++
++ Thus, it is not the intent of this section to claim rights or contest
++ your rights to work written entirely by you; rather, the intent is to
++ exercise the right to control the distribution of derivative or
++ collective works based on the Library.
++
++ In addition, mere aggregation of another work not based on the Library
++ with the Library (or with a work based on the Library) on a volume of
++ a storage or distribution medium does not bring the other work under
++ the scope of this License.
++
++ 3. You may opt to apply the terms of the ordinary GNU General Public
++ License instead of this License to a given copy of the Library. To do
++ this, you must alter all the notices that refer to this License, so
++ that they refer to the ordinary GNU General Public License, version 2,
++ instead of to this License. (If a newer version than version 2 of the
++ ordinary GNU General Public License has appeared, then you can specify
++ that version instead if you wish.) Do not make any other change in
++ these notices.
++
++ Once this change is made in a given copy, it is irreversible for
++ that copy, so the ordinary GNU General Public License applies to all
++ subsequent copies and derivative works made from that copy.
++
++ This option is useful when you wish to copy part of the code of
++ the Library into a program that is not a library.
++
++ 4. You may copy and distribute the Library (or a portion or
++ derivative of it, under Section 2) in object code or executable form
++ under the terms of Sections 1 and 2 above provided that you accompany
++ it with the complete corresponding machine-readable source code, which
++ must be distributed under the terms of Sections 1 and 2 above on a
++ medium customarily used for software interchange.
++
++ If distribution of object code is made by offering access to copy
++ from a designated place, then offering equivalent access to copy the
++ source code from the same place satisfies the requirement to
++ distribute the source code, even though third parties are not
++ compelled to copy the source along with the object code.
++
++ 5. A program that contains no derivative of any portion of the
++ Library, but is designed to work with the Library by being compiled or
++ linked with it, is called a "work that uses the Library". Such a
++ work, in isolation, is not a derivative work of the Library, and
++ therefore falls outside the scope of this License.
++
++ However, linking a "work that uses the Library" with the Library
++ creates an executable that is a derivative of the Library (because it
++ contains portions of the Library), rather than a "work that uses the
++ library". The executable is therefore covered by this License.
++ Section 6 states terms for distribution of such executables.
++
++ When a "work that uses the Library" uses material from a header file
++ that is part of the Library, the object code for the work may be a
++ derivative work of the Library even though the source code is not.
++ Whether this is true is especially significant if the work can be
++ linked without the Library, or if the work is itself a library. The
++ threshold for this to be true is not precisely defined by law.
++
++ If such an object file uses only numerical parameters, data
++ structure layouts and accessors, and small macros and small inline
++ functions (ten lines or less in length), then the use of the object
++ file is unrestricted, regardless of whether it is legally a derivative
++ work. (Executables containing this object code plus portions of the
++ Library will still fall under Section 6.)
++
++ Otherwise, if the work is a derivative of the Library, you may
++ distribute the object code for the work under the terms of Section 6.
++ Any executables containing that work also fall under Section 6,
++ whether or not they are linked directly with the Library itself.
++
++ 6. As an exception to the Sections above, you may also combine or
++ link a "work that uses the Library" with the Library to produce a
++ work containing portions of the Library, and distribute that work
++ under terms of your choice, provided that the terms permit
++ modification of the work for the customer's own use and reverse
++ engineering for debugging such modifications.
++
++ You must give prominent notice with each copy of the work that the
++ Library is used in it and that the Library and its use are covered by
++ this License. You must supply a copy of this License. If the work
++ during execution displays copyright notices, you must include the
++ copyright notice for the Library among them, as well as a reference
++ directing the user to the copy of this License. Also, you must do one
++ of these things:
++
++ a) Accompany the work with the complete corresponding
++ machine-readable source code for the Library including whatever
++ changes were used in the work (which must be distributed under
++ Sections 1 and 2 above); and, if the work is an executable linked
++ with the Library, with the complete machine-readable "work that
++ uses the Library", as object code and/or source code, so that the
++ user can modify the Library and then relink to produce a modified
++ executable containing the modified Library. (It is understood
++ that the user who changes the contents of definitions files in the
++ Library will not necessarily be able to recompile the application
++ to use the modified definitions.)
++
++ b) Use a suitable shared library mechanism for linking with the
++ Library. A suitable mechanism is one that (1) uses at run time a
++ copy of the library already present on the user's computer system,
++ rather than copying library functions into the executable, and (2)
++ will operate properly with a modified version of the library, if
++ the user installs one, as long as the modified version is
++ interface-compatible with the version that the work was made with.
++
++ c) Accompany the work with a written offer, valid for at
++ least three years, to give the same user the materials
++ specified in Subsection 6a, above, for a charge no more
++ than the cost of performing this distribution.
++
++ d) If distribution of the work is made by offering access to copy
++ from a designated place, offer equivalent access to copy the above
++ specified materials from the same place.
++
++ e) Verify that the user has already received a copy of these
++ materials or that you have already sent this user a copy.
++
++ For an executable, the required form of the "work that uses the
++ Library" must include any data and utility programs needed for
++ reproducing the executable from it. However, as a special exception,
++ the materials to be distributed need not include anything that is
++ normally distributed (in either source or binary form) with the major
++ components (compiler, kernel, and so on) of the operating system on
++ which the executable runs, unless that component itself accompanies
++ the executable.
++
++ It may happen that this requirement contradicts the license
++ restrictions of other proprietary libraries that do not normally
++ accompany the operating system. Such a contradiction means you cannot
++ use both them and the Library together in an executable that you
++ distribute.
++
++ 7. You may place library facilities that are a work based on the
++ Library side-by-side in a single library together with other library
++ facilities not covered by this License, and distribute such a combined
++ library, provided that the separate distribution of the work based on
++ the Library and of the other library facilities is otherwise
++ permitted, and provided that you do these two things:
++
++ a) Accompany the combined library with a copy of the same work
++ based on the Library, uncombined with any other library
++ facilities. This must be distributed under the terms of the
++ Sections above.
++
++ b) Give prominent notice with the combined library of the fact
++ that part of it is a work based on the Library, and explaining
++ where to find the accompanying uncombined form of the same work.
++
++ 8. You may not copy, modify, sublicense, link with, or distribute
++ the Library except as expressly provided under this License. Any
++ attempt otherwise to copy, modify, sublicense, link with, or
++ distribute the Library is void, and will automatically terminate your
++ rights under this License. However, parties who have received copies,
++ or rights, from you under this License will not have their licenses
++ terminated so long as such parties remain in full compliance.
++
++ 9. You are not required to accept this License, since you have not
++ signed it. However, nothing else grants you permission to modify or
++ distribute the Library or its derivative works. These actions are
++ prohibited by law if you do not accept this License. Therefore, by
++ modifying or distributing the Library (or any work based on the
++ Library), you indicate your acceptance of this License to do so, and
++ all its terms and conditions for copying, distributing or modifying
++ the Library or works based on it.
++
++ 10. Each time you redistribute the Library (or any work based on the
++ Library), the recipient automatically receives a license from the
++ original licensor to copy, distribute, link with or modify the Library
++ subject to these terms and conditions. You may not impose any further
++ restrictions on the recipients' exercise of the rights granted herein.
++ You are not responsible for enforcing compliance by third parties with
++ this License.
++
++ 11. If, as a consequence of a court judgment or allegation of patent
++ infringement or for any other reason (not limited to patent issues),
++ conditions are imposed on you (whether by court order, agreement or
++ otherwise) that contradict the conditions of this License, they do not
++ excuse you from the conditions of this License. If you cannot
++ distribute so as to satisfy simultaneously your obligations under this
++ License and any other pertinent obligations, then as a consequence you
++ may not distribute the Library at all. For example, if a patent
++ license would not permit royalty-free redistribution of the Library by
++ all those who receive copies directly or indirectly through you, then
++ the only way you could satisfy both it and this License would be to
++ refrain entirely from distribution of the Library.
++
++ If any portion of this section is held invalid or unenforceable under any
++ particular circumstance, the balance of the section is intended to apply,
++ and the section as a whole is intended to apply in other circumstances.
++
++ It is not the purpose of this section to induce you to infringe any
++ patents or other property right claims or to contest validity of any
++ such claims; this section has the sole purpose of protecting the
++ integrity of the free software distribution system which is
++ implemented by public license practices. Many people have made
++ generous contributions to the wide range of software distributed
++ through that system in reliance on consistent application of that
++ system; it is up to the author/donor to decide if he or she is willing
++ to distribute software through any other system and a licensee cannot
++ impose that choice.
++
++ This section is intended to make thoroughly clear what is believed to
++ be a consequence of the rest of this License.
++
++ 12. If the distribution and/or use of the Library is restricted in
++ certain countries either by patents or by copyrighted interfaces, the
++ original copyright holder who places the Library under this License may add
++ an explicit geographical distribution limitation excluding those countries,
++ so that distribution is permitted only in or among countries not thus
++ excluded. In such case, this License incorporates the limitation as if
++ written in the body of this License.
++
++ 13. The Free Software Foundation may publish revised and/or new
++ versions of the Lesser General Public License from time to time.
++ Such new versions will be similar in spirit to the present version,
++ but may differ in detail to address new problems or concerns.
++
++ Each version is given a distinguishing version number. If the Library
++ specifies a version number of this License which applies to it and
++ "any later version", you have the option of following the terms and
++ conditions either of that version or of any later version published by
++ the Free Software Foundation. If the Library does not specify a
++ license version number, you may choose any version ever published by
++ the Free Software Foundation.
++
++ 14. If you wish to incorporate parts of the Library into other free
++ programs whose distribution conditions are incompatible with these,
++ write to the author to ask for permission. For software which is
++ copyrighted by the Free Software Foundation, write to the Free
++ Software Foundation; we sometimes make exceptions for this. Our
++ decision will be guided by the two goals of preserving the free status
++ of all derivatives of our free software and of promoting the sharing
++ and reuse of software generally.
++
++ NO WARRANTY
++
++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
++ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
++ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
++ OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
++ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
++ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
++ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
++ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
++
++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
++ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
++ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
++ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
++ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
++ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
++ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
++ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
++ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
++ DAMAGES.
++
++ END OF TERMS AND CONDITIONS
++
++ How to Apply These Terms to Your New Libraries
++
++ If you develop a new library, and you want it to be of the greatest
++ possible use to the public, we recommend making it free software that
++ everyone can redistribute and change. You can do so by permitting
++ redistribution under these terms (or, alternatively, under the terms of the
++ ordinary General Public License).
++
++ To apply these terms, attach the following notices to the library. It is
++ safest to attach them to the start of each source file to most effectively
++ convey the exclusion of warranty; and each file should have at least the
++ "copyright" line and a pointer to where the full notice is found.
++
++ <one line to give the library's name and a brief idea of what it does.>
++ Copyright (C) <year> <name of author>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++
++ Also add information on how to contact you by electronic and paper mail.
++
++ You should also get your employer (if you work as a programmer) or your
++ school, if any, to sign a "copyright disclaimer" for the library, if
++ necessary. Here is a sample; alter the names:
++
++ Yoyodyne, Inc., hereby disclaims all copyright interest in the
++ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
++
++ <signature of Ty Coon>, 1 April 1990
++ Ty Coon, President of Vice
++
++ That's all there is to it!
++
++
+*** ../vim-8.1.0359/src/xdiff/xdiff.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xdiff.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,142 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #if !defined(XDIFF_H)
++ #define XDIFF_H
++
++ #ifdef __cplusplus
++ extern "C" {
++ #endif /* #ifdef __cplusplus */
++
++ /* xpparm_t.flags */
++ #define XDF_NEED_MINIMAL (1 << 0)
++
++ #define XDF_IGNORE_WHITESPACE (1 << 1)
++ #define XDF_IGNORE_WHITESPACE_CHANGE (1 << 2)
++ #define XDF_IGNORE_WHITESPACE_AT_EOL (1 << 3)
++ #define XDF_IGNORE_CR_AT_EOL (1 << 4)
++ #define XDF_WHITESPACE_FLAGS (XDF_IGNORE_WHITESPACE | \
++ XDF_IGNORE_WHITESPACE_CHANGE | \
++ XDF_IGNORE_WHITESPACE_AT_EOL | \
++ XDF_IGNORE_CR_AT_EOL)
++
++ #define XDF_IGNORE_BLANK_LINES (1 << 7)
++
++ #define XDF_PATIENCE_DIFF (1 << 14)
++ #define XDF_HISTOGRAM_DIFF (1 << 15)
++ #define XDF_DIFF_ALGORITHM_MASK (XDF_PATIENCE_DIFF | XDF_HISTOGRAM_DIFF)
++ #define XDF_DIFF_ALG(x) ((x) & XDF_DIFF_ALGORITHM_MASK)
++
++ #define XDF_INDENT_HEURISTIC (1 << 23)
++
++ /* xdemitconf_t.flags */
++ #define XDL_EMIT_FUNCNAMES (1 << 0)
++ #define XDL_EMIT_FUNCCONTEXT (1 << 2)
++
++ /* merge simplification levels */
++ #define XDL_MERGE_MINIMAL 0
++ #define XDL_MERGE_EAGER 1
++ #define XDL_MERGE_ZEALOUS 2
++ #define XDL_MERGE_ZEALOUS_ALNUM 3
++
++ /* merge favor modes */
++ #define XDL_MERGE_FAVOR_OURS 1
++ #define XDL_MERGE_FAVOR_THEIRS 2
++ #define XDL_MERGE_FAVOR_UNION 3
++
++ /* merge output styles */
++ #define XDL_MERGE_DIFF3 1
++
++ typedef struct s_mmfile {
++ char *ptr;
++ long size;
++ } mmfile_t;
++
++ typedef struct s_mmbuffer {
++ char *ptr;
++ long size;
++ } mmbuffer_t;
++
++ typedef struct s_xpparam {
++ unsigned long flags;
++
++ /* See Documentation/diff-options.txt. */
++ char **anchors;
++ size_t anchors_nr;
++ } xpparam_t;
++
++ typedef struct s_xdemitcb {
++ void *priv;
++ int (*outf)(void *, mmbuffer_t *, int);
++ } xdemitcb_t;
++
++ typedef long (*find_func_t)(const char *line, long line_len, char *buffer, long buffer_size, void *priv);
++
++ typedef int (*xdl_emit_hunk_consume_func_t)(long start_a, long count_a,
++ long start_b, long count_b,
++ void *cb_data);
++
++ typedef struct s_xdemitconf {
++ long ctxlen;
++ long interhunkctxlen;
++ unsigned long flags;
++ find_func_t find_func;
++ void *find_func_priv;
++ xdl_emit_hunk_consume_func_t hunk_func;
++ } xdemitconf_t;
++
++ typedef struct s_bdiffparam {
++ long bsize;
++ } bdiffparam_t;
++
++
++ #define xdl_malloc(x) malloc(x)
++ #define xdl_free(ptr) free(ptr)
++ #define xdl_realloc(ptr,x) realloc(ptr,x)
++
++ void *xdl_mmfile_first(mmfile_t *mmf, long *size);
++ long xdl_mmfile_size(mmfile_t *mmf);
++
++ int xdl_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdemitconf_t const *xecfg, xdemitcb_t *ecb);
++
++ typedef struct s_xmparam {
++ xpparam_t xpp;
++ int marker_size;
++ int level;
++ int favor;
++ int style;
++ const char *ancestor; /* label for orig */
++ const char *file1; /* label for mf1 */
++ const char *file2; /* label for mf2 */
++ } xmparam_t;
++
++ #define DEFAULT_CONFLICT_MARKER_SIZE 7
++
++ int xdl_merge(mmfile_t *orig, mmfile_t *mf1, mmfile_t *mf2,
++ xmparam_t const *xmp, mmbuffer_t *result);
++
++ #ifdef __cplusplus
++ }
++ #endif /* #ifdef __cplusplus */
++
++ #endif /* #if !defined(XDIFF_H) */
+*** ../vim-8.1.0359/src/xdiff/xdiffi.c 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xdiffi.c 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,1043 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #include "xinclude.h"
++
++ #define XDL_MAX_COST_MIN 256
++ #define XDL_HEUR_MIN_COST 256
++ #define XDL_LINE_MAX (long)((1UL << (CHAR_BIT * sizeof(long) - 1)) - 1)
++ #define XDL_SNAKE_CNT 20
++ #define XDL_K_HEUR 4
++
++ typedef struct s_xdpsplit {
++ long i1, i2;
++ int min_lo, min_hi;
++ } xdpsplit_t;
++
++ /*
++ * See "An O(ND) Difference Algorithm and its Variations", by Eugene Myers.
++ * Basically considers a "box" (off1, off2, lim1, lim2) and scan from both
++ * the forward diagonal starting from (off1, off2) and the backward diagonal
++ * starting from (lim1, lim2). If the K values on the same diagonal crosses
++ * returns the furthest point of reach. We might end up having to expensive
++ * cases using this algorithm is full, so a little bit of heuristic is needed
++ * to cut the search and to return a suboptimal point.
++ */
++ static long xdl_split(unsigned long const *ha1, long off1, long lim1,
++ unsigned long const *ha2, long off2, long lim2,
++ long *kvdf, long *kvdb, int need_min, xdpsplit_t *spl,
++ xdalgoenv_t *xenv) {
++ long dmin = off1 - lim2, dmax = lim1 - off2;
++ long fmid = off1 - off2, bmid = lim1 - lim2;
++ long odd = (fmid - bmid) & 1;
++ long fmin = fmid, fmax = fmid;
++ long bmin = bmid, bmax = bmid;
++ long ec, d, i1, i2, prev1, best, dd, v, k;
++
++ /*
++ * Set initial diagonal values for both forward and backward path.
++ */
++ kvdf[fmid] = off1;
++ kvdb[bmid] = lim1;
++
++ for (ec = 1;; ec++) {
++ int got_snake = 0;
++
++ /*
++ * We need to extent the diagonal "domain" by one. If the next
++ * values exits the box boundaries we need to change it in the
++ * opposite direction because (max - min) must be a power of two.
++ * Also we initialize the external K value to -1 so that we can
++ * avoid extra conditions check inside the core loop.
++ */
++ if (fmin > dmin)
++ kvdf[--fmin - 1] = -1;
++ else
++ ++fmin;
++ if (fmax < dmax)
++ kvdf[++fmax + 1] = -1;
++ else
++ --fmax;
++
++ for (d = fmax; d >= fmin; d -= 2) {
++ if (kvdf[d - 1] >= kvdf[d + 1])
++ i1 = kvdf[d - 1] + 1;
++ else
++ i1 = kvdf[d + 1];
++ prev1 = i1;
++ i2 = i1 - d;
++ for (; i1 < lim1 && i2 < lim2 && ha1[i1] == ha2[i2]; i1++, i2++);
++ if (i1 - prev1 > xenv->snake_cnt)
++ got_snake = 1;
++ kvdf[d] = i1;
++ if (odd && bmin <= d && d <= bmax && kvdb[d] <= i1) {
++ spl->i1 = i1;
++ spl->i2 = i2;
++ spl->min_lo = spl->min_hi = 1;
++ return ec;
++ }
++ }
++
++ /*
++ * We need to extent the diagonal "domain" by one. If the next
++ * values exits the box boundaries we need to change it in the
++ * opposite direction because (max - min) must be a power of two.
++ * Also we initialize the external K value to -1 so that we can
++ * avoid extra conditions check inside the core loop.
++ */
++ if (bmin > dmin)
++ kvdb[--bmin - 1] = XDL_LINE_MAX;
++ else
++ ++bmin;
++ if (bmax < dmax)
++ kvdb[++bmax + 1] = XDL_LINE_MAX;
++ else
++ --bmax;
++
++ for (d = bmax; d >= bmin; d -= 2) {
++ if (kvdb[d - 1] < kvdb[d + 1])
++ i1 = kvdb[d - 1];
++ else
++ i1 = kvdb[d + 1] - 1;
++ prev1 = i1;
++ i2 = i1 - d;
++ for (; i1 > off1 && i2 > off2 && ha1[i1 - 1] == ha2[i2 - 1]; i1--, i2--);
++ if (prev1 - i1 > xenv->snake_cnt)
++ got_snake = 1;
++ kvdb[d] = i1;
++ if (!odd && fmin <= d && d <= fmax && i1 <= kvdf[d]) {
++ spl->i1 = i1;
++ spl->i2 = i2;
++ spl->min_lo = spl->min_hi = 1;
++ return ec;
++ }
++ }
++
++ if (need_min)
++ continue;
++
++ /*
++ * If the edit cost is above the heuristic trigger and if
++ * we got a good snake, we sample current diagonals to see
++ * if some of the, have reached an "interesting" path. Our
++ * measure is a function of the distance from the diagonal
++ * corner (i1 + i2) penalized with the distance from the
++ * mid diagonal itself. If this value is above the current
++ * edit cost times a magic factor (XDL_K_HEUR) we consider
++ * it interesting.
++ */
++ if (got_snake && ec > xenv->heur_min) {
++ for (best = 0, d = fmax; d >= fmin; d -= 2) {
++ dd = d > fmid ? d - fmid: fmid - d;
++ i1 = kvdf[d];
++ i2 = i1 - d;
++ v = (i1 - off1) + (i2 - off2) - dd;
++
++ if (v > XDL_K_HEUR * ec && v > best &&
++ off1 + xenv->snake_cnt <= i1 && i1 < lim1 &&
++ off2 + xenv->snake_cnt <= i2 && i2 < lim2) {
++ for (k = 1; ha1[i1 - k] == ha2[i2 - k]; k++)
++ if (k == xenv->snake_cnt) {
++ best = v;
++ spl->i1 = i1;
++ spl->i2 = i2;
++ break;
++ }
++ }
++ }
++ if (best > 0) {
++ spl->min_lo = 1;
++ spl->min_hi = 0;
++ return ec;
++ }
++
++ for (best = 0, d = bmax; d >= bmin; d -= 2) {
++ dd = d > bmid ? d - bmid: bmid - d;
++ i1 = kvdb[d];
++ i2 = i1 - d;
++ v = (lim1 - i1) + (lim2 - i2) - dd;
++
++ if (v > XDL_K_HEUR * ec && v > best &&
++ off1 < i1 && i1 <= lim1 - xenv->snake_cnt &&
++ off2 < i2 && i2 <= lim2 - xenv->snake_cnt) {
++ for (k = 0; ha1[i1 + k] == ha2[i2 + k]; k++)
++ if (k == xenv->snake_cnt - 1) {
++ best = v;
++ spl->i1 = i1;
++ spl->i2 = i2;
++ break;
++ }
++ }
++ }
++ if (best > 0) {
++ spl->min_lo = 0;
++ spl->min_hi = 1;
++ return ec;
++ }
++ }
++
++ /*
++ * Enough is enough. We spent too much time here and now we collect
++ * the furthest reaching path using the (i1 + i2) measure.
++ */
++ if (ec >= xenv->mxcost) {
++ long fbest, fbest1, bbest, bbest1;
++
++ fbest = fbest1 = -1;
++ for (d = fmax; d >= fmin; d -= 2) {
++ i1 = XDL_MIN(kvdf[d], lim1);
++ i2 = i1 - d;
++ if (lim2 < i2)
++ i1 = lim2 + d, i2 = lim2;
++ if (fbest < i1 + i2) {
++ fbest = i1 + i2;
++ fbest1 = i1;
++ }
++ }
++
++ bbest = bbest1 = XDL_LINE_MAX;
++ for (d = bmax; d >= bmin; d -= 2) {
++ i1 = XDL_MAX(off1, kvdb[d]);
++ i2 = i1 - d;
++ if (i2 < off2)
++ i1 = off2 + d, i2 = off2;
++ if (i1 + i2 < bbest) {
++ bbest = i1 + i2;
++ bbest1 = i1;
++ }
++ }
++
++ if ((lim1 + lim2) - bbest < fbest - (off1 + off2)) {
++ spl->i1 = fbest1;
++ spl->i2 = fbest - fbest1;
++ spl->min_lo = 1;
++ spl->min_hi = 0;
++ } else {
++ spl->i1 = bbest1;
++ spl->i2 = bbest - bbest1;
++ spl->min_lo = 0;
++ spl->min_hi = 1;
++ }
++ return ec;
++ }
++ }
++ }
++
++
++ /*
++ * Rule: "Divide et Impera". Recursively split the box in sub-boxes by calling
++ * the box splitting function. Note that the real job (marking changed lines)
++ * is done in the two boundary reaching checks.
++ */
++ int xdl_recs_cmp(diffdata_t *dd1, long off1, long lim1,
++ diffdata_t *dd2, long off2, long lim2,
++ long *kvdf, long *kvdb, int need_min, xdalgoenv_t *xenv) {
++ unsigned long const *ha1 = dd1->ha, *ha2 = dd2->ha;
++
++ /*
++ * Shrink the box by walking through each diagonal snake (SW and NE).
++ */
++ for (; off1 < lim1 && off2 < lim2 && ha1[off1] == ha2[off2]; off1++, off2++);
++ for (; off1 < lim1 && off2 < lim2 && ha1[lim1 - 1] == ha2[lim2 - 1]; lim1--, lim2--);
++
++ /*
++ * If one dimension is empty, then all records on the other one must
++ * be obviously changed.
++ */
++ if (off1 == lim1) {
++ char *rchg2 = dd2->rchg;
++ long *rindex2 = dd2->rindex;
++
++ for (; off2 < lim2; off2++)
++ rchg2[rindex2[off2]] = 1;
++ } else if (off2 == lim2) {
++ char *rchg1 = dd1->rchg;
++ long *rindex1 = dd1->rindex;
++
++ for (; off1 < lim1; off1++)
++ rchg1[rindex1[off1]] = 1;
++ } else {
++ xdpsplit_t spl;
++ spl.i1 = spl.i2 = 0;
++
++ /*
++ * Divide ...
++ */
++ if (xdl_split(ha1, off1, lim1, ha2, off2, lim2, kvdf, kvdb,
++ need_min, &spl, xenv) < 0) {
++
++ return -1;
++ }
++
++ /*
++ * ... et Impera.
++ */
++ if (xdl_recs_cmp(dd1, off1, spl.i1, dd2, off2, spl.i2,
++ kvdf, kvdb, spl.min_lo, xenv) < 0 ||
++ xdl_recs_cmp(dd1, spl.i1, lim1, dd2, spl.i2, lim2,
++ kvdf, kvdb, spl.min_hi, xenv) < 0) {
++
++ return -1;
++ }
++ }
++
++ return 0;
++ }
++
++
++ int xdl_do_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdfenv_t *xe) {
++ long ndiags;
++ long *kvd, *kvdf, *kvdb;
++ xdalgoenv_t xenv;
++ diffdata_t dd1, dd2;
++
++ if (XDF_DIFF_ALG(xpp->flags) == XDF_PATIENCE_DIFF)
++ return xdl_do_patience_diff(mf1, mf2, xpp, xe);
++
++ if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF)
++ return xdl_do_histogram_diff(mf1, mf2, xpp, xe);
++
++ if (xdl_prepare_env(mf1, mf2, xpp, xe) < 0) {
++
++ return -1;
++ }
++
++ /*
++ * Allocate and setup K vectors to be used by the differential algorithm.
++ * One is to store the forward path and one to store the backward path.
++ */
++ ndiags = xe->xdf1.nreff + xe->xdf2.nreff + 3;
++ if (!(kvd = (long *) xdl_malloc((2 * ndiags + 2) * sizeof(long)))) {
++
++ xdl_free_env(xe);
++ return -1;
++ }
++ kvdf = kvd;
++ kvdb = kvdf + ndiags;
++ kvdf += xe->xdf2.nreff + 1;
++ kvdb += xe->xdf2.nreff + 1;
++
++ xenv.mxcost = xdl_bogosqrt(ndiags);
++ if (xenv.mxcost < XDL_MAX_COST_MIN)
++ xenv.mxcost = XDL_MAX_COST_MIN;
++ xenv.snake_cnt = XDL_SNAKE_CNT;
++ xenv.heur_min = XDL_HEUR_MIN_COST;
++
++ dd1.nrec = xe->xdf1.nreff;
++ dd1.ha = xe->xdf1.ha;
++ dd1.rchg = xe->xdf1.rchg;
++ dd1.rindex = xe->xdf1.rindex;
++ dd2.nrec = xe->xdf2.nreff;
++ dd2.ha = xe->xdf2.ha;
++ dd2.rchg = xe->xdf2.rchg;
++ dd2.rindex = xe->xdf2.rindex;
++
++ if (xdl_recs_cmp(&dd1, 0, dd1.nrec, &dd2, 0, dd2.nrec,
++ kvdf, kvdb, (xpp->flags & XDF_NEED_MINIMAL) != 0, &xenv) < 0) {
++
++ xdl_free(kvd);
++ xdl_free_env(xe);
++ return -1;
++ }
++
++ xdl_free(kvd);
++
++ return 0;
++ }
++
++
++ static xdchange_t *xdl_add_change(xdchange_t *xscr, long i1, long i2, long chg1, long chg2) {
++ xdchange_t *xch;
++
++ if (!(xch = (xdchange_t *) xdl_malloc(sizeof(xdchange_t))))
++ return NULL;
++
++ xch->next = xscr;
++ xch->i1 = i1;
++ xch->i2 = i2;
++ xch->chg1 = chg1;
++ xch->chg2 = chg2;
++ xch->ignore = 0;
++
++ return xch;
++ }
++
++
++ static int recs_match(xrecord_t *rec1, xrecord_t *rec2, long flags)
++ {
++ return (rec1->ha == rec2->ha &&
++ xdl_recmatch(rec1->ptr, rec1->size,
++ rec2->ptr, rec2->size,
++ flags));
++ }
++
++ /*
++ * If a line is indented more than this, get_indent() just returns this value.
++ * This avoids having to do absurd amounts of work for data that are not
++ * human-readable text, and also ensures that the output of get_indent fits within
++ * an int.
++ */
++ #define MAX_INDENT 200
++
++ /*
++ * Return the amount of indentation of the specified line, treating TAB as 8
++ * columns. Return -1 if line is empty or contains only whitespace. Clamp the
++ * output value at MAX_INDENT.
++ */
++ static int get_indent(xrecord_t *rec)
++ {
++ long i;
++ int ret = 0;
++
++ for (i = 0; i < rec->size; i++) {
++ char c = rec->ptr[i];
++
++ if (!XDL_ISSPACE(c))
++ return ret;
++ else if (c == ' ')
++ ret += 1;
++ else if (c == '\t')
++ ret += 8 - ret % 8;
++ /* ignore other whitespace characters */
++
++ if (ret >= MAX_INDENT)
++ return MAX_INDENT;
++ }
++
++ /* The line contains only whitespace. */
++ return -1;
++ }
++
++ /*
++ * If more than this number of consecutive blank rows are found, just return this
++ * value. This avoids requiring O(N^2) work for pathological cases, and also
++ * ensures that the output of score_split fits in an int.
++ */
++ #define MAX_BLANKS 20
++
++ /* Characteristics measured about a hypothetical split position. */
++ struct split_measurement {
++ /*
++ * Is the split at the end of the file (aside from any blank lines)?
++ */
++ int end_of_file;
++
++ /*
++ * How much is the line immediately following the split indented (or -1 if
++ * the line is blank):
++ */
++ int indent;
++
++ /*
++ * How many consecutive lines above the split are blank?
++ */
++ int pre_blank;
++
++ /*
++ * How much is the nearest non-blank line above the split indented (or -1
++ * if there is no such line)?
++ */
++ int pre_indent;
++
++ /*
++ * How many lines after the line following the split are blank?
++ */
++ int post_blank;
++
++ /*
++ * How much is the nearest non-blank line after the line following the
++ * split indented (or -1 if there is no such line)?
++ */
++ int post_indent;
++ };
++
++ struct split_score {
++ /* The effective indent of this split (smaller is preferred). */
++ int effective_indent;
++
++ /* Penalty for this split (smaller is preferred). */
++ int penalty;
++ };
++
++ /*
++ * Fill m with information about a hypothetical split of xdf above line split.
++ */
++ static void measure_split(const xdfile_t *xdf, long split,
++ struct split_measurement *m)
++ {
++ long i;
++
++ if (split >= xdf->nrec) {
++ m->end_of_file = 1;
++ m->indent = -1;
++ } else {
++ m->end_of_file = 0;
++ m->indent = get_indent(xdf->recs[split]);
++ }
++
++ m->pre_blank = 0;
++ m->pre_indent = -1;
++ for (i = split - 1; i >= 0; i--) {
++ m->pre_indent = get_indent(xdf->recs[i]);
++ if (m->pre_indent != -1)
++ break;
++ m->pre_blank += 1;
++ if (m->pre_blank == MAX_BLANKS) {
++ m->pre_indent = 0;
++ break;
++ }
++ }
++
++ m->post_blank = 0;
++ m->post_indent = -1;
++ for (i = split + 1; i < xdf->nrec; i++) {
++ m->post_indent = get_indent(xdf->recs[i]);
++ if (m->post_indent != -1)
++ break;
++ m->post_blank += 1;
++ if (m->post_blank == MAX_BLANKS) {
++ m->post_indent = 0;
++ break;
++ }
++ }
++ }
++
++ /*
++ * The empirically-determined weight factors used by score_split() below.
++ * Larger values means that the position is a less favorable place to split.
++ *
++ * Note that scores are only ever compared against each other, so multiplying
++ * all of these weight/penalty values by the same factor wouldn't change the
++ * heuristic's behavior. Still, we need to set that arbitrary scale *somehow*.
++ * In practice, these numbers are chosen to be large enough that they can be
++ * adjusted relative to each other with sufficient precision despite using
++ * integer math.
++ */
++
++ /* Penalty if there are no non-blank lines before the split */
++ #define START_OF_FILE_PENALTY 1
++
++ /* Penalty if there are no non-blank lines after the split */
++ #define END_OF_FILE_PENALTY 21
++
++ /* Multiplier for the number of blank lines around the split */
++ #define TOTAL_BLANK_WEIGHT (-30)
++
++ /* Multiplier for the number of blank lines after the split */
++ #define POST_BLANK_WEIGHT 6
++
++ /*
++ * Penalties applied if the line is indented more than its predecessor
++ */
++ #define RELATIVE_INDENT_PENALTY (-4)
++ #define RELATIVE_INDENT_WITH_BLANK_PENALTY 10
++
++ /*
++ * Penalties applied if the line is indented less than both its predecessor and
++ * its successor
++ */
++ #define RELATIVE_OUTDENT_PENALTY 24
++ #define RELATIVE_OUTDENT_WITH_BLANK_PENALTY 17
++
++ /*
++ * Penalties applied if the line is indented less than its predecessor but not
++ * less than its successor
++ */
++ #define RELATIVE_DEDENT_PENALTY 23
++ #define RELATIVE_DEDENT_WITH_BLANK_PENALTY 17
++
++ /*
++ * We only consider whether the sum of the effective indents for splits are
++ * less than (-1), equal to (0), or greater than (+1) each other. The resulting
++ * value is multiplied by the following weight and combined with the penalty to
++ * determine the better of two scores.
++ */
++ #define INDENT_WEIGHT 60
++
++ /*
++ * How far do we slide a hunk at most?
++ */
++ #define INDENT_HEURISTIC_MAX_SLIDING 100
++
++ /*
++ * Compute a badness score for the hypothetical split whose measurements are
++ * stored in m. The weight factors were determined empirically using the tools and
++ * corpus described in
++ *
++ * https://github.com/mhagger/diff-slider-tools
++ *
++ * Also see that project if you want to improve the weights based on, for example,
++ * a larger or more diverse corpus.
++ */
++ static void score_add_split(const struct split_measurement *m, struct split_score *s)
++ {
++ /*
++ * A place to accumulate penalty factors (positive makes this index more
++ * favored):
++ */
++ int post_blank, total_blank, indent, any_blanks;
++
++ if (m->pre_indent == -1 && m->pre_blank == 0)
++ s->penalty += START_OF_FILE_PENALTY;
++
++ if (m->end_of_file)
++ s->penalty += END_OF_FILE_PENALTY;
++
++ /*
++ * Set post_blank to the number of blank lines following the split,
++ * including the line immediately after the split:
++ */
++ post_blank = (m->indent == -1) ? 1 + m->post_blank : 0;
++ total_blank = m->pre_blank + post_blank;
++
++ /* Penalties based on nearby blank lines: */
++ s->penalty += TOTAL_BLANK_WEIGHT * total_blank;
++ s->penalty += POST_BLANK_WEIGHT * post_blank;
++
++ if (m->indent != -1)
++ indent = m->indent;
++ else
++ indent = m->post_indent;
++
++ any_blanks = (total_blank != 0);
++
++ /* Note that the effective indent is -1 at the end of the file: */
++ s->effective_indent += indent;
++
++ if (indent == -1) {
++ /* No additional adjustments needed. */
++ } else if (m->pre_indent == -1) {
++ /* No additional adjustments needed. */
++ } else if (indent > m->pre_indent) {
++ /*
++ * The line is indented more than its predecessor.
++ */
++ s->penalty += any_blanks ?
++ RELATIVE_INDENT_WITH_BLANK_PENALTY :
++ RELATIVE_INDENT_PENALTY;
++ } else if (indent == m->pre_indent) {
++ /*
++ * The line has the same indentation level as its predecessor.
++ * No additional adjustments needed.
++ */
++ } else {
++ /*
++ * The line is indented less than its predecessor. It could be
++ * the block terminator of the previous block, but it could
++ * also be the start of a new block (e.g., an "else" block, or
++ * maybe the previous block didn't have a block terminator).
++ * Try to distinguish those cases based on what comes next:
++ */
++ if (m->post_indent != -1 && m->post_indent > indent) {
++ /*
++ * The following line is indented more. So it is likely
++ * that this line is the start of a block.
++ */
++ s->penalty += any_blanks ?
++ RELATIVE_OUTDENT_WITH_BLANK_PENALTY :
++ RELATIVE_OUTDENT_PENALTY;
++ } else {
++ /*
++ * That was probably the end of a block.
++ */
++ s->penalty += any_blanks ?
++ RELATIVE_DEDENT_WITH_BLANK_PENALTY :
++ RELATIVE_DEDENT_PENALTY;
++ }
++ }
++ }
++
++ static int score_cmp(struct split_score *s1, struct split_score *s2)
++ {
++ /* -1 if s1.effective_indent < s2->effective_indent, etc. */
++ int cmp_indents = ((s1->effective_indent > s2->effective_indent) -
++ (s1->effective_indent < s2->effective_indent));
++
++ return INDENT_WEIGHT * cmp_indents + (s1->penalty - s2->penalty);
++ }
++
++ /*
++ * Represent a group of changed lines in an xdfile_t (i.e., a contiguous group
++ * of lines that was inserted or deleted from the corresponding version of the
++ * file). We consider there to be such a group at the beginning of the file, at
++ * the end of the file, and between any two unchanged lines, though most such
++ * groups will usually be empty.
++ *
++ * If the first line in a group is equal to the line following the group, then
++ * the group can be slid down. Similarly, if the last line in a group is equal
++ * to the line preceding the group, then the group can be slid up. See
++ * group_slide_down() and group_slide_up().
++ *
++ * Note that loops that are testing for changed lines in xdf->rchg do not need
++ * index bounding since the array is prepared with a zero at position -1 and N.
++ */
++ struct xdlgroup {
++ /*
++ * The index of the first changed line in the group, or the index of
++ * the unchanged line above which the (empty) group is located.
++ */
++ long start;
++
++ /*
++ * The index of the first unchanged line after the group. For an empty
++ * group, end is equal to start.
++ */
++ long end;
++ };
++
++ /*
++ * Initialize g to point at the first group in xdf.
++ */
++ static void group_init(xdfile_t *xdf, struct xdlgroup *g)
++ {
++ g->start = g->end = 0;
++ while (xdf->rchg[g->end])
++ g->end++;
++ }
++
++ /*
++ * Move g to describe the next (possibly empty) group in xdf and return 0. If g
++ * is already at the end of the file, do nothing and return -1.
++ */
++ static inline int group_next(xdfile_t *xdf, struct xdlgroup *g)
++ {
++ if (g->end == xdf->nrec)
++ return -1;
++
++ g->start = g->end + 1;
++ for (g->end = g->start; xdf->rchg[g->end]; g->end++)
++ ;
++
++ return 0;
++ }
++
++ /*
++ * Move g to describe the previous (possibly empty) group in xdf and return 0.
++ * If g is already at the beginning of the file, do nothing and return -1.
++ */
++ static inline int group_previous(xdfile_t *xdf, struct xdlgroup *g)
++ {
++ if (g->start == 0)
++ return -1;
++
++ g->end = g->start - 1;
++ for (g->start = g->end; xdf->rchg[g->start - 1]; g->start--)
++ ;
++
++ return 0;
++ }
++
++ /*
++ * If g can be slid toward the end of the file, do so, and if it bumps into a
++ * following group, expand this group to include it. Return 0 on success or -1
++ * if g cannot be slid down.
++ */
++ static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g, long flags)
++ {
++ if (g->end < xdf->nrec &&
++ recs_match(xdf->recs[g->start], xdf->recs[g->end], flags)) {
++ xdf->rchg[g->start++] = 0;
++ xdf->rchg[g->end++] = 1;
++
++ while (xdf->rchg[g->end])
++ g->end++;
++
++ return 0;
++ } else {
++ return -1;
++ }
++ }
++
++ /*
++ * If g can be slid toward the beginning of the file, do so, and if it bumps
++ * into a previous group, expand this group to include it. Return 0 on success
++ * or -1 if g cannot be slid up.
++ */
++ static int group_slide_up(xdfile_t *xdf, struct xdlgroup *g, long flags)
++ {
++ if (g->start > 0 &&
++ recs_match(xdf->recs[g->start - 1], xdf->recs[g->end - 1], flags)) {
++ xdf->rchg[--g->start] = 1;
++ xdf->rchg[--g->end] = 0;
++
++ while (xdf->rchg[g->start - 1])
++ g->start--;
++
++ return 0;
++ } else {
++ return -1;
++ }
++ }
++
++ static void xdl_bug(const char *msg)
++ {
++ fprintf(stderr, "BUG: %s\n", msg);
++ exit(1);
++ }
++
++ /*
++ * Move back and forward change groups for a consistent and pretty diff output.
++ * This also helps in finding joinable change groups and reducing the diff
++ * size.
++ */
++ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
++ struct xdlgroup g, go;
++ long earliest_end, end_matching_other;
++ long groupsize;
++
++ group_init(xdf, &g);
++ group_init(xdfo, &go);
++
++ while (1) {
++ /* If the group is empty in the to-be-compacted file, skip it: */
++ if (g.end == g.start)
++ goto next;
++
++ /*
++ * Now shift the change up and then down as far as possible in
++ * each direction. If it bumps into any other changes, merge them.
++ */
++ do {
++ groupsize = g.end - g.start;
++
++ /*
++ * Keep track of the last "end" index that causes this
++ * group to align with a group of changed lines in the
++ * other file. -1 indicates that we haven't found such
++ * a match yet:
++ */
++ end_matching_other = -1;
++
++ /* Shift the group backward as much as possible: */
++ while (!group_slide_up(xdf, &g, flags))
++ if (group_previous(xdfo, &go))
++ xdl_bug("group sync broken sliding up");
++
++ /*
++ * This is this highest that this group can be shifted.
++ * Record its end index:
++ */
++ earliest_end = g.end;
++
++ if (go.end > go.start)
++ end_matching_other = g.end;
++
++ /* Now shift the group forward as far as possible: */
++ while (1) {
++ if (group_slide_down(xdf, &g, flags))
++ break;
++ if (group_next(xdfo, &go))
++ xdl_bug("group sync broken sliding down");
++
++ if (go.end > go.start)
++ end_matching_other = g.end;
++ }
++ } while (groupsize != g.end - g.start);
++
++ /*
++ * If the group can be shifted, then we can possibly use this
++ * freedom to produce a more intuitive diff.
++ *
++ * The group is currently shifted as far down as possible, so the
++ * heuristics below only have to handle upwards shifts.
++ */
++
++ if (g.end == earliest_end) {
++ /* no shifting was possible */
++ } else if (end_matching_other != -1) {
++ /*
++ * Move the possibly merged group of changes back to line
++ * up with the last group of changes from the other file
++ * that it can align with.
++ */
++ while (go.end == go.start) {
++ if (group_slide_up(xdf, &g, flags))
++ xdl_bug("match disappeared");
++ if (group_previous(xdfo, &go))
++ xdl_bug("group sync broken sliding to match");
++ }
++ } else if (flags & XDF_INDENT_HEURISTIC) {
++ /*
++ * Indent heuristic: a group of pure add/delete lines
++ * implies two splits, one between the end of the "before"
++ * context and the start of the group, and another between
++ * the end of the group and the beginning of the "after"
++ * context. Some splits are aesthetically better and some
++ * are worse. We compute a badness "score" for each split,
++ * and add the scores for the two splits to define a
++ * "score" for each position that the group can be shifted
++ * to. Then we pick the shift with the lowest score.
++ */
++ long shift, best_shift = -1;
++ struct split_score best_score;
++
++ shift = earliest_end;
++ if (g.end - groupsize - 1 > shift)
++ shift = g.end - groupsize - 1;
++ if (g.end - INDENT_HEURISTIC_MAX_SLIDING > shift)
++ shift = g.end - INDENT_HEURISTIC_MAX_SLIDING;
++ for (; shift <= g.end; shift++) {
++ struct split_measurement m;
++ struct split_score score = {0, 0};
++
++ measure_split(xdf, shift, &m);
++ score_add_split(&m, &score);
++ measure_split(xdf, shift - groupsize, &m);
++ score_add_split(&m, &score);
++ if (best_shift == -1 ||
++ score_cmp(&score, &best_score) <= 0) {
++ best_score.effective_indent = score.effective_indent;
++ best_score.penalty = score.penalty;
++ best_shift = shift;
++ }
++ }
++
++ while (g.end > best_shift) {
++ if (group_slide_up(xdf, &g, flags))
++ xdl_bug("best shift unreached");
++ if (group_previous(xdfo, &go))
++ xdl_bug("group sync broken sliding to blank line");
++ }
++ }
++
++ next:
++ /* Move past the just-processed group: */
++ if (group_next(xdf, &g))
++ break;
++ if (group_next(xdfo, &go))
++ xdl_bug("group sync broken moving to next group");
++ }
++
++ if (!group_next(xdfo, &go))
++ xdl_bug("group sync broken at end of file");
++
++ return 0;
++ }
++
++
++ int xdl_build_script(xdfenv_t *xe, xdchange_t **xscr) {
++ xdchange_t *cscr = NULL, *xch;
++ char *rchg1 = xe->xdf1.rchg, *rchg2 = xe->xdf2.rchg;
++ long i1, i2, l1, l2;
++
++ /*
++ * Trivial. Collects "groups" of changes and creates an edit script.
++ */
++ for (i1 = xe->xdf1.nrec, i2 = xe->xdf2.nrec; i1 >= 0 || i2 >= 0; i1--, i2--)
++ if (rchg1[i1 - 1] || rchg2[i2 - 1]) {
++ for (l1 = i1; rchg1[i1 - 1]; i1--);
++ for (l2 = i2; rchg2[i2 - 1]; i2--);
++
++ if (!(xch = xdl_add_change(cscr, i1, i2, l1 - i1, l2 - i2))) {
++ xdl_free_script(cscr);
++ return -1;
++ }
++ cscr = xch;
++ }
++
++ *xscr = cscr;
++
++ return 0;
++ }
++
++
++ void xdl_free_script(xdchange_t *xscr) {
++ xdchange_t *xch;
++
++ while ((xch = xscr) != NULL) {
++ xscr = xscr->next;
++ xdl_free(xch);
++ }
++ }
++
++ static int xdl_call_hunk_func(xdfenv_t *xe UNUSED, xdchange_t *xscr, xdemitcb_t *ecb,
++ xdemitconf_t const *xecfg)
++ {
++ xdchange_t *xch, *xche;
++
++ for (xch = xscr; xch; xch = xche->next) {
++ xche = xdl_get_hunk(&xch, xecfg);
++ if (!xch)
++ break;
++ if (xecfg->hunk_func(xch->i1, xche->i1 + xche->chg1 - xch->i1,
++ xch->i2, xche->i2 + xche->chg2 - xch->i2,
++ ecb->priv) < 0)
++ return -1;
++ }
++ return 0;
++ }
++
++ static void xdl_mark_ignorable(xdchange_t *xscr, xdfenv_t *xe, long flags)
++ {
++ xdchange_t *xch;
++
++ for (xch = xscr; xch; xch = xch->next) {
++ int ignore = 1;
++ xrecord_t **rec;
++ long i;
++
++ rec = &xe->xdf1.recs[xch->i1];
++ for (i = 0; i < xch->chg1 && ignore; i++)
++ ignore = xdl_blankline(rec[i]->ptr, rec[i]->size, flags);
++
++ rec = &xe->xdf2.recs[xch->i2];
++ for (i = 0; i < xch->chg2 && ignore; i++)
++ ignore = xdl_blankline(rec[i]->ptr, rec[i]->size, flags);
++
++ xch->ignore = ignore;
++ }
++ }
++
++ int xdl_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdemitconf_t const *xecfg, xdemitcb_t *ecb) {
++ xdchange_t *xscr;
++ xdfenv_t xe;
++ emit_func_t ef = xecfg->hunk_func ? xdl_call_hunk_func : xdl_emit_diff;
++
++ if (xdl_do_diff(mf1, mf2, xpp, &xe) < 0) {
++
++ return -1;
++ }
++ if (xdl_change_compact(&xe.xdf1, &xe.xdf2, xpp->flags) < 0 ||
++ xdl_change_compact(&xe.xdf2, &xe.xdf1, xpp->flags) < 0 ||
++ xdl_build_script(&xe, &xscr) < 0) {
++
++ xdl_free_env(&xe);
++ return -1;
++ }
++ if (xscr) {
++ if (xpp->flags & XDF_IGNORE_BLANK_LINES)
++ xdl_mark_ignorable(xscr, &xe, xpp->flags);
++
++ if (ef(&xe, xscr, ecb, xecfg) < 0) {
++
++ xdl_free_script(xscr);
++ xdl_free_env(&xe);
++ return -1;
++ }
++ xdl_free_script(xscr);
++ }
++ xdl_free_env(&xe);
++
++ return 0;
++ }
+*** ../vim-8.1.0359/src/xdiff/xdiffi.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xdiffi.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,64 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #if !defined(XDIFFI_H)
++ #define XDIFFI_H
++
++
++ typedef struct s_diffdata {
++ long nrec;
++ unsigned long const *ha;
++ long *rindex;
++ char *rchg;
++ } diffdata_t;
++
++ typedef struct s_xdalgoenv {
++ long mxcost;
++ long snake_cnt;
++ long heur_min;
++ } xdalgoenv_t;
++
++ typedef struct s_xdchange {
++ struct s_xdchange *next;
++ long i1, i2;
++ long chg1, chg2;
++ int ignore;
++ } xdchange_t;
++
++
++
++ int xdl_recs_cmp(diffdata_t *dd1, long off1, long lim1,
++ diffdata_t *dd2, long off2, long lim2,
++ long *kvdf, long *kvdb, int need_min, xdalgoenv_t *xenv);
++ int xdl_do_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdfenv_t *xe);
++ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags);
++ int xdl_build_script(xdfenv_t *xe, xdchange_t **xscr);
++ void xdl_free_script(xdchange_t *xscr);
++ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
++ xdemitconf_t const *xecfg);
++ int xdl_do_patience_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdfenv_t *env);
++ int xdl_do_histogram_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdfenv_t *env);
++
++ #endif /* #if !defined(XDIFFI_H) */
+*** ../vim-8.1.0359/src/xdiff/xemit.c 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xemit.c 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,312 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #include "xinclude.h"
++
++ static long xdl_get_rec(xdfile_t *xdf, long ri, char const **rec) {
++
++ *rec = xdf->recs[ri]->ptr;
++
++ return xdf->recs[ri]->size;
++ }
++
++
++ static int xdl_emit_record(xdfile_t *xdf, long ri, char const *pre, xdemitcb_t *ecb) {
++ long size, psize = strlen(pre);
++ char const *rec;
++
++ size = xdl_get_rec(xdf, ri, &rec);
++ if (xdl_emit_diffrec(rec, size, pre, psize, ecb) < 0) {
++
++ return -1;
++ }
++
++ return 0;
++ }
++
++
++ /*
++ * Starting at the passed change atom, find the latest change atom to be included
++ * inside the differential hunk according to the specified configuration.
++ * Also advance xscr if the first changes must be discarded.
++ */
++ xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg)
++ {
++ xdchange_t *xch, *xchp, *lxch;
++ long max_common = 2 * xecfg->ctxlen + xecfg->interhunkctxlen;
++ long max_ignorable = xecfg->ctxlen;
++ unsigned long ignored = 0; /* number of ignored blank lines */
++
++ /* remove ignorable changes that are too far before other changes */
++ for (xchp = *xscr; xchp && xchp->ignore; xchp = xchp->next) {
++ xch = xchp->next;
++
++ if (xch == NULL ||
++ xch->i1 - (xchp->i1 + xchp->chg1) >= max_ignorable)
++ *xscr = xch;
++ }
++
++ if (*xscr == NULL)
++ return NULL;
++
++ lxch = *xscr;
++
++ for (xchp = *xscr, xch = xchp->next; xch; xchp = xch, xch = xch->next) {
++ long distance = xch->i1 - (xchp->i1 + xchp->chg1);
++ if (distance > max_common)
++ break;
++
++ if (distance < max_ignorable && (!xch->ignore || lxch == xchp)) {
++ lxch = xch;
++ ignored = 0;
++ } else if (distance < max_ignorable && xch->ignore) {
++ ignored += xch->chg2;
++ } else if (lxch != xchp &&
++ xch->i1 + (long)ignored - (lxch->i1 + lxch->chg1) > max_common) {
++ break;
++ } else if (!xch->ignore) {
++ lxch = xch;
++ ignored = 0;
++ } else {
++ ignored += xch->chg2;
++ }
++ }
++
++ return lxch;
++ }
++
++
++ static long def_ff(const char *rec, long len, char *buf, long sz, void *priv UNUSED)
++ {
++ if (len > 0 &&
++ (isalpha((unsigned char)*rec) || /* identifier? */
++ *rec == '_' || /* also identifier? */
++ *rec == '$')) { /* identifiers from VMS and other esoterico */
++ if (len > sz)
++ len = sz;
++ while (0 < len && isspace((unsigned char)rec[len - 1]))
++ len--;
++ memcpy(buf, rec, len);
++ return len;
++ }
++ return -1;
++ }
++
++ static long match_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri,
++ char *buf, long sz)
++ {
++ const char *rec;
++ long len = xdl_get_rec(xdf, ri, &rec);
++ if (!xecfg->find_func)
++ return def_ff(rec, len, buf, sz, xecfg->find_func_priv);
++ return xecfg->find_func(rec, len, buf, sz, xecfg->find_func_priv);
++ }
++
++ static int is_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri)
++ {
++ char dummy[1];
++ return match_func_rec(xdf, xecfg, ri, dummy, sizeof(dummy)) >= 0;
++ }
++
++ struct func_line {
++ long len;
++ char buf[80];
++ };
++
++ static long get_func_line(xdfenv_t *xe, xdemitconf_t const *xecfg,
++ struct func_line *func_line, long start, long limit)
++ {
++ long l, size, step = (start > limit) ? -1 : 1;
++ char *buf, dummy[1];
++
++ buf = func_line ? func_line->buf : dummy;
++ size = func_line ? sizeof(func_line->buf) : sizeof(dummy);
++
++ for (l = start; l != limit && 0 <= l && l < xe->xdf1.nrec; l += step) {
++ long len = match_func_rec(&xe->xdf1, xecfg, l, buf, size);
++ if (len >= 0) {
++ if (func_line)
++ func_line->len = len;
++ return l;
++ }
++ }
++ return -1;
++ }
++
++ static int is_empty_rec(xdfile_t *xdf, long ri)
++ {
++ const char *rec;
++ long len = xdl_get_rec(xdf, ri, &rec);
++
++ while (len > 0 && XDL_ISSPACE(*rec)) {
++ rec++;
++ len--;
++ }
++ return !len;
++ }
++
++ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
++ xdemitconf_t const *xecfg) {
++ long s1, s2, e1, e2, lctx;
++ xdchange_t *xch, *xche;
++ long funclineprev = -1;
++ struct func_line func_line = { 0 };
++
++ for (xch = xscr; xch; xch = xche->next) {
++ xche = xdl_get_hunk(&xch, xecfg);
++ if (!xch)
++ break;
++
++ s1 = XDL_MAX(xch->i1 - xecfg->ctxlen, 0);
++ s2 = XDL_MAX(xch->i2 - xecfg->ctxlen, 0);
++
++ if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) {
++ long fs1, i1 = xch->i1;
++
++ /* Appended chunk? */
++ if (i1 >= xe->xdf1.nrec) {
++ long i2 = xch->i2;
++
++ /*
++ * We don't need additional context if
++ * a whole function was added.
++ */
++ while (i2 < xe->xdf2.nrec) {
++ if (is_func_rec(&xe->xdf2, xecfg, i2))
++ goto post_context_calculation;
++ i2++;
++ }
++
++ /*
++ * Otherwise get more context from the
++ * pre-image.
++ */
++ i1 = xe->xdf1.nrec - 1;
++ }
++
++ fs1 = get_func_line(xe, xecfg, NULL, i1, -1);
++ while (fs1 > 0 && !is_empty_rec(&xe->xdf1, fs1 - 1) &&
++ !is_func_rec(&xe->xdf1, xecfg, fs1 - 1))
++ fs1--;
++ if (fs1 < 0)
++ fs1 = 0;
++ if (fs1 < s1) {
++ s2 -= s1 - fs1;
++ s1 = fs1;
++ }
++ }
++
++ post_context_calculation:
++ lctx = xecfg->ctxlen;
++ lctx = XDL_MIN(lctx, xe->xdf1.nrec - (xche->i1 + xche->chg1));
++ lctx = XDL_MIN(lctx, xe->xdf2.nrec - (xche->i2 + xche->chg2));
++
++ e1 = xche->i1 + xche->chg1 + lctx;
++ e2 = xche->i2 + xche->chg2 + lctx;
++
++ if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) {
++ long fe1 = get_func_line(xe, xecfg, NULL,
++ xche->i1 + xche->chg1,
++ xe->xdf1.nrec);
++ while (fe1 > 0 && is_empty_rec(&xe->xdf1, fe1 - 1))
++ fe1--;
++ if (fe1 < 0)
++ fe1 = xe->xdf1.nrec;
++ if (fe1 > e1) {
++ e2 += fe1 - e1;
++ e1 = fe1;
++ }
++
++ /*
++ * Overlap with next change? Then include it
++ * in the current hunk and start over to find
++ * its new end.
++ */
++ if (xche->next) {
++ long l = XDL_MIN(xche->next->i1,
++ xe->xdf1.nrec - 1);
++ if (l - xecfg->ctxlen <= e1 ||
++ get_func_line(xe, xecfg, NULL, l, e1) < 0) {
++ xche = xche->next;
++ goto post_context_calculation;
++ }
++ }
++ }
++
++ /*
++ * Emit current hunk header.
++ */
++
++ if (xecfg->flags & XDL_EMIT_FUNCNAMES) {
++ get_func_line(xe, xecfg, &func_line,
++ s1 - 1, funclineprev);
++ funclineprev = s1 - 1;
++ }
++ if (xdl_emit_hunk_hdr(s1 + 1, e1 - s1, s2 + 1, e2 - s2,
++ func_line.buf, func_line.len, ecb) < 0)
++ return -1;
++
++ /*
++ * Emit pre-context.
++ */
++ for (; s2 < xch->i2; s2++)
++ if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0)
++ return -1;
++
++ for (s1 = xch->i1, s2 = xch->i2;; xch = xch->next) {
++ /*
++ * Merge previous with current change atom.
++ */
++ for (; s1 < xch->i1 && s2 < xch->i2; s1++, s2++)
++ if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0)
++ return -1;
++
++ /*
++ * Removes lines from the first file.
++ */
++ for (s1 = xch->i1; s1 < xch->i1 + xch->chg1; s1++)
++ if (xdl_emit_record(&xe->xdf1, s1, "-", ecb) < 0)
++ return -1;
++
++ /*
++ * Adds lines from the second file.
++ */
++ for (s2 = xch->i2; s2 < xch->i2 + xch->chg2; s2++)
++ if (xdl_emit_record(&xe->xdf2, s2, "+", ecb) < 0)
++ return -1;
++
++ if (xch == xche)
++ break;
++ s1 = xch->i1 + xch->chg1;
++ s2 = xch->i2 + xch->chg2;
++ }
++
++ /*
++ * Emit post-context.
++ */
++ for (s2 = xche->i2 + xche->chg2; s2 < e2; s2++)
++ if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0)
++ return -1;
++ }
++
++ return 0;
++ }
+*** ../vim-8.1.0359/src/xdiff/xemit.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xemit.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,36 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #if !defined(XEMIT_H)
++ #define XEMIT_H
++
++
++ typedef int (*emit_func_t)(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
++ xdemitconf_t const *xecfg);
++
++ xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg);
++ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
++ xdemitconf_t const *xecfg);
++
++
++
++ #endif /* #if !defined(XEMIT_H) */
+*** ../vim-8.1.0359/src/xdiff/xhistogram.c 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xhistogram.c 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,386 ----
++ /*
++ * Copyright (C) 2010, Google Inc.
++ * and other copyright owners as documented in JGit's IP log.
++ *
++ * This program and the accompanying materials are made available
++ * under the terms of the Eclipse Distribution License v1.0 which
++ * accompanies this distribution, is reproduced below, and is
++ * available at http://www.eclipse.org/org/documents/edl-v10.php
++ *
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or
++ * without modification, are permitted provided that the following
++ * conditions are met:
++ *
++ * - Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ *
++ * - Redistributions in binary form must reproduce the above
++ * copyright notice, this list of conditions and the following
++ * disclaimer in the documentation and/or other materials provided
++ * with the distribution.
++ *
++ * - Neither the name of the Eclipse Foundation, Inc. nor the
++ * names of its contributors may be used to endorse or promote
++ * products derived from this software without specific prior
++ * written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
++ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
++ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
++ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
++ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
++ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
++ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++ #include "xinclude.h"
++ #include "xtypes.h"
++ #include "xdiff.h"
++
++ #define MAX_PTR INT_MAX
++ #define MAX_CNT INT_MAX
++
++ #define LINE_END(n) (line##n + count##n - 1)
++ #define LINE_END_PTR(n) (*line##n + *count##n - 1)
++
++ struct histindex {
++ struct record {
++ unsigned int ptr, cnt;
++ struct record *next;
++ } **records, /* an occurrence */
++ **line_map; /* map of line to record chain */
++ chastore_t rcha;
++ unsigned int *next_ptrs;
++ unsigned int table_bits,
++ records_size,
++ line_map_size;
++
++ unsigned int max_chain_length,
++ key_shift,
++ ptr_shift;
++
++ unsigned int cnt,
++ has_common;
++
++ xdfenv_t *env;
++ xpparam_t const *xpp;
++ };
++
++ struct region {
++ unsigned int begin1, end1;
++ unsigned int begin2, end2;
++ };
++
++ #define LINE_MAP(i, a) (i->line_map[(a) - i->ptr_shift])
++
++ #define NEXT_PTR(index, ptr) \
++ (index->next_ptrs[(ptr) - index->ptr_shift])
++
++ #define CNT(index, ptr) \
++ ((LINE_MAP(index, ptr))->cnt)
++
++ #define REC(env, s, l) \
++ (env->xdf##s.recs[l - 1])
++
++ static int cmp_recs(xpparam_t const *xpp,
++ xrecord_t *r1, xrecord_t *r2)
++ {
++ return r1->ha == r2->ha &&
++ xdl_recmatch(r1->ptr, r1->size, r2->ptr, r2->size,
++ xpp->flags);
++ }
++
++ #define CMP_ENV(xpp, env, s1, l1, s2, l2) \
++ (cmp_recs(xpp, REC(env, s1, l1), REC(env, s2, l2)))
++
++ #define CMP(i, s1, l1, s2, l2) \
++ (cmp_recs(i->xpp, REC(i->env, s1, l1), REC(i->env, s2, l2)))
++
++ #define TABLE_HASH(index, side, line) \
++ XDL_HASHLONG((REC(index->env, side, line))->ha, index->table_bits)
++
++ static int scanA(struct histindex *index, int line1, int count1)
++ {
++ int ptr, tbl_idx;
++ unsigned int chain_len;
++ struct record **rec_chain, *rec;
++
++ for (ptr = LINE_END(1); line1 <= ptr; ptr--) {
++ tbl_idx = TABLE_HASH(index, 1, ptr);
++ rec_chain = index->records + tbl_idx;
++ rec = *rec_chain;
++
++ chain_len = 0;
++ while (rec) {
++ if (CMP(index, 1, rec->ptr, 1, ptr)) {
++ /*
++ * ptr is identical to another element. Insert
++ * it onto the front of the existing element
++ * chain.
++ */
++ NEXT_PTR(index, ptr) = rec->ptr;
++ rec->ptr = ptr;
++ /* cap rec->cnt at MAX_CNT */
++ rec->cnt = XDL_MIN(MAX_CNT, rec->cnt + 1);
++ LINE_MAP(index, ptr) = rec;
++ goto continue_scan;
++ }
++
++ rec = rec->next;
++ chain_len++;
++ }
++
++ if (chain_len == index->max_chain_length)
++ return -1;
++
++ /*
++ * This is the first time we have ever seen this particular
++ * element in the sequence. Construct a new chain for it.
++ */
++ if (!(rec = xdl_cha_alloc(&index->rcha)))
++ return -1;
++ rec->ptr = ptr;
++ rec->cnt = 1;
++ rec->next = *rec_chain;
++ *rec_chain = rec;
++ LINE_MAP(index, ptr) = rec;
++
++ continue_scan:
++ ; /* no op */
++ }
++
++ return 0;
++ }
++
++ static int try_lcs(struct histindex *index, struct region *lcs, int b_ptr,
++ int line1, int count1, int line2, int count2)
++ {
++ unsigned int b_next = b_ptr + 1;
++ struct record *rec = index->records[TABLE_HASH(index, 2, b_ptr)];
++ unsigned int as, ae, bs, be, np, rc;
++ int should_break;
++
++ for (; rec; rec = rec->next) {
++ if (rec->cnt > index->cnt) {
++ if (!index->has_common)
++ index->has_common = CMP(index, 1, rec->ptr, 2, b_ptr);
++ continue;
++ }
++
++ as = rec->ptr;
++ if (!CMP(index, 1, as, 2, b_ptr))
++ continue;
++
++ index->has_common = 1;
++ for (;;) {
++ should_break = 0;
++ np = NEXT_PTR(index, as);
++ bs = b_ptr;
++ ae = as;
++ be = bs;
++ rc = rec->cnt;
++
++ while (line1 < (int)as && line2 < (int)bs
++ && CMP(index, 1, as - 1, 2, bs - 1)) {
++ as--;
++ bs--;
++ if (1 < rc)
++ rc = XDL_MIN(rc, CNT(index, as));
++ }
++ while ((int)ae < LINE_END(1) && (int)be < LINE_END(2)
++ && CMP(index, 1, ae + 1, 2, be + 1)) {
++ ae++;
++ be++;
++ if (1 < rc)
++ rc = XDL_MIN(rc, CNT(index, ae));
++ }
++
++ if (b_next <= be)
++ b_next = be + 1;
++ if (lcs->end1 - lcs->begin1 < ae - as || rc < index->cnt) {
++ lcs->begin1 = as;
++ lcs->begin2 = bs;
++ lcs->end1 = ae;
++ lcs->end2 = be;
++ index->cnt = rc;
++ }
++
++ if (np == 0)
++ break;
++
++ while (np <= ae) {
++ np = NEXT_PTR(index, np);
++ if (np == 0) {
++ should_break = 1;
++ break;
++ }
++ }
++
++ if (should_break)
++ break;
++
++ as = np;
++ }
++ }
++ return b_next;
++ }
++
++ static int fall_back_to_classic_diff(xpparam_t const *xpp, xdfenv_t *env,
++ int line1, int count1, int line2, int count2)
++ {
++ xpparam_t xpparam;
++ xpparam.flags = xpp->flags & ~XDF_DIFF_ALGORITHM_MASK;
++
++ return xdl_fall_back_diff(env, &xpparam,
++ line1, count1, line2, count2);
++ }
++
++ static inline void free_index(struct histindex *index)
++ {
++ xdl_free(index->records);
++ xdl_free(index->line_map);
++ xdl_free(index->next_ptrs);
++ xdl_cha_free(&index->rcha);
++ }
++
++ static int find_lcs(xpparam_t const *xpp, xdfenv_t *env,
++ struct region *lcs,
++ int line1, int count1, int line2, int count2)
++ {
++ int b_ptr;
++ int sz, ret = -1;
++ struct histindex index;
++
++ memset(&index, 0, sizeof(index));
++
++ index.env = env;
++ index.xpp = xpp;
++
++ index.records = NULL;
++ index.line_map = NULL;
++ /* in case of early xdl_cha_free() */
++ index.rcha.head = NULL;
++
++ index.table_bits = xdl_hashbits(count1);
++ sz = index.records_size = 1 << index.table_bits;
++ sz *= sizeof(struct record *);
++ if (!(index.records = (struct record **) xdl_malloc(sz)))
++ goto cleanup;
++ memset(index.records, 0, sz);
++
++ sz = index.line_map_size = count1;
++ sz *= sizeof(struct record *);
++ if (!(index.line_map = (struct record **) xdl_malloc(sz)))
++ goto cleanup;
++ memset(index.line_map, 0, sz);
++
++ sz = index.line_map_size;
++ sz *= sizeof(unsigned int);
++ if (!(index.next_ptrs = (unsigned int *) xdl_malloc(sz)))
++ goto cleanup;
++ memset(index.next_ptrs, 0, sz);
++
++ /* lines / 4 + 1 comes from xprepare.c:xdl_prepare_ctx() */
++ if (xdl_cha_init(&index.rcha, sizeof(struct record), count1 / 4 + 1) < 0)
++ goto cleanup;
++
++ index.ptr_shift = line1;
++ index.max_chain_length = 64;
++
++ if (scanA(&index, line1, count1))
++ goto cleanup;
++
++ index.cnt = index.max_chain_length + 1;
++
++ for (b_ptr = line2; b_ptr <= LINE_END(2); )
++ b_ptr = try_lcs(&index, lcs, b_ptr, line1, count1, line2, count2);
++
++ if (index.has_common && index.max_chain_length < index.cnt)
++ ret = 1;
++ else
++ ret = 0;
++
++ cleanup:
++ free_index(&index);
++ return ret;
++ }
++
++ static int histogram_diff(xpparam_t const *xpp, xdfenv_t *env,
++ int line1, int count1, int line2, int count2)
++ {
++ struct region lcs;
++ int lcs_found;
++ int result;
++ redo:
++ result = -1;
++
++ if (count1 <= 0 && count2 <= 0)
++ return 0;
++
++ if (LINE_END(1) >= MAX_PTR)
++ return -1;
++
++ if (!count1) {
++ while(count2--)
++ env->xdf2.rchg[line2++ - 1] = 1;
++ return 0;
++ } else if (!count2) {
++ while(count1--)
++ env->xdf1.rchg[line1++ - 1] = 1;
++ return 0;
++ }
++
++ memset(&lcs, 0, sizeof(lcs));
++ lcs_found = find_lcs(xpp, env, &lcs, line1, count1, line2, count2);
++ if (lcs_found < 0)
++ goto out;
++ else if (lcs_found)
++ result = fall_back_to_classic_diff(xpp, env, line1, count1, line2, count2);
++ else {
++ if (lcs.begin1 == 0 && lcs.begin2 == 0) {
++ while (count1--)
++ env->xdf1.rchg[line1++ - 1] = 1;
++ while (count2--)
++ env->xdf2.rchg[line2++ - 1] = 1;
++ result = 0;
++ } else {
++ result = histogram_diff(xpp, env,
++ line1, lcs.begin1 - line1,
++ line2, lcs.begin2 - line2);
++ if (result)
++ goto out;
++ /*
++ * result = histogram_diff(xpp, env,
++ * lcs.end1 + 1, LINE_END(1) - lcs.end1,
++ * lcs.end2 + 1, LINE_END(2) - lcs.end2);
++ * but let's optimize tail recursion ourself:
++ */
++ count1 = LINE_END(1) - lcs.end1;
++ line1 = lcs.end1 + 1;
++ count2 = LINE_END(2) - lcs.end2;
++ line2 = lcs.end2 + 1;
++ goto redo;
++ }
++ }
++ out:
++ return result;
++ }
++
++ int xdl_do_histogram_diff(mmfile_t *file1, mmfile_t *file2,
++ xpparam_t const *xpp, xdfenv_t *env)
++ {
++ if (xdl_prepare_env(file1, file2, xpp, env) < 0)
++ return -1;
++
++ return histogram_diff(xpp, env,
++ env->xdf1.dstart + 1, env->xdf1.dend - env->xdf1.dstart + 1,
++ env->xdf2.dstart + 1, env->xdf2.dend - env->xdf2.dstart + 1);
++ }
+*** ../vim-8.1.0359/src/xdiff/xinclude.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xinclude.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,61 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ /* defines HAVE_ATTRIBUTE_UNUSED */
++ #ifdef HAVE_CONFIG_H
++ # include "../auto/config.h"
++ #endif
++
++ /* Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
++ * can be used to check for mistakes. */
++ #ifdef HAVE_ATTRIBUTE_UNUSED
++ # define UNUSED __attribute__((unused))
++ #else
++ # define UNUSED
++ #endif
++
++ #if defined(_MSC_VER)
++ # define inline __inline
++ #endif
++
++ #if !defined(XINCLUDE_H)
++ #define XINCLUDE_H
++
++ #include <ctype.h>
++ #include <stdio.h>
++ #include <stdlib.h>
++ #if !defined(_WIN32)
++ #include <unistd.h>
++ #endif
++ #include <string.h>
++ #include <limits.h>
++
++ #include "xmacros.h"
++ #include "xdiff.h"
++ #include "xtypes.h"
++ #include "xutils.h"
++ #include "xprepare.h"
++ #include "xdiffi.h"
++ #include "xemit.h"
++
++
++ #endif /* #if !defined(XINCLUDE_H) */
+*** ../vim-8.1.0359/src/xdiff/xmacros.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xmacros.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,54 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #if !defined(XMACROS_H)
++ #define XMACROS_H
++
++
++
++
++ #define XDL_MIN(a, b) ((a) < (b) ? (a): (b))
++ #define XDL_MAX(a, b) ((a) > (b) ? (a): (b))
++ #define XDL_ABS(v) ((v) >= 0 ? (v): -(v))
++ #define XDL_ISDIGIT(c) ((c) >= '0' && (c) <= '9')
++ #define XDL_ISSPACE(c) (isspace((unsigned char)(c)))
++ #define XDL_ADDBITS(v,b) ((v) + ((v) >> (b)))
++ #define XDL_MASKBITS(b) ((1UL << (b)) - 1)
++ #define XDL_HASHLONG(v,b) (XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b))
++ #define XDL_PTRFREE(p) do { if (p) { xdl_free(p); (p) = NULL; } } while (0)
++ #define XDL_LE32_PUT(p, v) \
++ do { \
++ unsigned char *__p = (unsigned char *) (p); \
++ *__p++ = (unsigned char) (v); \
++ *__p++ = (unsigned char) ((v) >> 8); \
++ *__p++ = (unsigned char) ((v) >> 16); \
++ *__p = (unsigned char) ((v) >> 24); \
++ } while (0)
++ #define XDL_LE32_GET(p, v) \
++ do { \
++ unsigned char const *__p = (unsigned char const *) (p); \
++ (v) = (unsigned long) __p[0] | ((unsigned long) __p[1]) << 8 | \
++ ((unsigned long) __p[2]) << 16 | ((unsigned long) __p[3]) << 24; \
++ } while (0)
++
++
++ #endif /* #if !defined(XMACROS_H) */
+*** ../vim-8.1.0359/src/xdiff/xpatience.c 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xpatience.c 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,390 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003-2016 Davide Libenzi, Johannes E. Schindelin
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++ #include "xinclude.h"
++ #include "xtypes.h"
++ #include "xdiff.h"
++
++ /*
++ * The basic idea of patience diff is to find lines that are unique in
++ * both files. These are intuitively the ones that we want to see as
++ * common lines.
++ *
++ * The maximal ordered sequence of such line pairs (where ordered means
++ * that the order in the sequence agrees with the order of the lines in
++ * both files) naturally defines an initial set of common lines.
++ *
++ * Now, the algorithm tries to extend the set of common lines by growing
++ * the line ranges where the files have identical lines.
++ *
++ * Between those common lines, the patience diff algorithm is applied
++ * recursively, until no unique line pairs can be found; these line ranges
++ * are handled by the well-known Myers algorithm.
++ */
++
++ #define NON_UNIQUE ULONG_MAX
++
++ /*
++ * This is a hash mapping from line hash to line numbers in the first and
++ * second file.
++ */
++ struct hashmap {
++ int nr, alloc;
++ struct entry {
++ unsigned long hash;
++ /*
++ * 0 = unused entry, 1 = first line, 2 = second, etc.
++ * line2 is NON_UNIQUE if the line is not unique
++ * in either the first or the second file.
++ */
++ unsigned long line1, line2;
++ /*
++ * "next" & "previous" are used for the longest common
++ * sequence;
++ * initially, "next" reflects only the order in file1.
++ */
++ struct entry *next, *previous;
++
++ /*
++ * If 1, this entry can serve as an anchor. See
++ * Documentation/diff-options.txt for more information.
++ */
++ unsigned anchor : 1;
++ } *entries, *first, *last;
++ /* were common records found? */
++ unsigned long has_matches;
++ mmfile_t *file1, *file2;
++ xdfenv_t *env;
++ xpparam_t const *xpp;
++ };
++
++ static int is_anchor(xpparam_t const *xpp, const char *line)
++ {
++ size_t i;
++ for (i = 0; i < xpp->anchors_nr; i++) {
++ if (!strncmp(line, xpp->anchors[i], strlen(xpp->anchors[i])))
++ return 1;
++ }
++ return 0;
++ }
++
++ /* The argument "pass" is 1 for the first file, 2 for the second. */
++ static void insert_record(xpparam_t const *xpp, int line, struct hashmap *map,
++ int pass)
++ {
++ xrecord_t **records = pass == 1 ?
++ map->env->xdf1.recs : map->env->xdf2.recs;
++ xrecord_t *record = records[line - 1], *other;
++ /*
++ * After xdl_prepare_env() (or more precisely, due to
++ * xdl_classify_record()), the "ha" member of the records (AKA lines)
++ * is _not_ the hash anymore, but a linearized version of it. In
++ * other words, the "ha" member is guaranteed to start with 0 and
++ * the second record's ha can only be 0 or 1, etc.
++ *
++ * So we multiply ha by 2 in the hope that the hashing was
++ * "unique enough".
++ */
++ int index = (int)((record->ha << 1) % map->alloc);
++
++ while (map->entries[index].line1) {
++ other = map->env->xdf1.recs[map->entries[index].line1 - 1];
++ if (map->entries[index].hash != record->ha ||
++ !xdl_recmatch(record->ptr, record->size,
++ other->ptr, other->size,
++ map->xpp->flags)) {
++ if (++index >= map->alloc)
++ index = 0;
++ continue;
++ }
++ if (pass == 2)
++ map->has_matches = 1;
++ if (pass == 1 || map->entries[index].line2)
++ map->entries[index].line2 = NON_UNIQUE;
++ else
++ map->entries[index].line2 = line;
++ return;
++ }
++ if (pass == 2)
++ return;
++ map->entries[index].line1 = line;
++ map->entries[index].hash = record->ha;
++ map->entries[index].anchor = is_anchor(xpp, map->env->xdf1.recs[line - 1]->ptr);
++ if (!map->first)
++ map->first = map->entries + index;
++ if (map->last) {
++ map->last->next = map->entries + index;
++ map->entries[index].previous = map->last;
++ }
++ map->last = map->entries + index;
++ map->nr++;
++ }
++
++ /*
++ * This function has to be called for each recursion into the inter-hunk
++ * parts, as previously non-unique lines can become unique when being
++ * restricted to a smaller part of the files.
++ *
++ * It is assumed that env has been prepared using xdl_prepare().
++ */
++ static int fill_hashmap(mmfile_t *file1, mmfile_t *file2,
++ xpparam_t const *xpp, xdfenv_t *env,
++ struct hashmap *result,
++ int line1, int count1, int line2, int count2)
++ {
++ result->file1 = file1;
++ result->file2 = file2;
++ result->xpp = xpp;
++ result->env = env;
++
++ /* We know exactly how large we want the hash map */
++ result->alloc = count1 * 2;
++ result->entries = (struct entry *)
++ xdl_malloc(result->alloc * sizeof(struct entry));
++ if (!result->entries)
++ return -1;
++ memset(result->entries, 0, result->alloc * sizeof(struct entry));
++
++ /* First, fill with entries from the first file */
++ while (count1--)
++ insert_record(xpp, line1++, result, 1);
++
++ /* Then search for matches in the second file */
++ while (count2--)
++ insert_record(xpp, line2++, result, 2);
++
++ return 0;
++ }
++
++ /*
++ * Find the longest sequence with a smaller last element (meaning a smaller
++ * line2, as we construct the sequence with entries ordered by line1).
++ */
++ static int binary_search(struct entry **sequence, int longest,
++ struct entry *entry)
++ {
++ int left = -1, right = longest;
++
++ while (left + 1 < right) {
++ int middle = left + (right - left) / 2;
++ /* by construction, no two entries can be equal */
++ if (sequence[middle]->line2 > entry->line2)
++ right = middle;
++ else
++ left = middle;
++ }
++ /* return the index in "sequence", _not_ the sequence length */
++ return left;
++ }
++
++ /*
++ * The idea is to start with the list of common unique lines sorted by
++ * the order in file1. For each of these pairs, the longest (partial)
++ * sequence whose last element's line2 is smaller is determined.
++ *
++ * For efficiency, the sequences are kept in a list containing exactly one
++ * item per sequence length: the sequence with the smallest last
++ * element (in terms of line2).
++ */
++ static struct entry *find_longest_common_sequence(struct hashmap *map)
++ {
++ struct entry **sequence = xdl_malloc(map->nr * sizeof(struct entry *));
++ int longest = 0, i;
++ struct entry *entry;
++
++ /*
++ * If not -1, this entry in sequence must never be overridden.
++ * Therefore, overriding entries before this has no effect, so
++ * do not do that either.
++ */
++ int anchor_i = -1;
++
++ for (entry = map->first; entry; entry = entry->next) {
++ if (!entry->line2 || entry->line2 == NON_UNIQUE)
++ continue;
++ i = binary_search(sequence, longest, entry);
++ entry->previous = i < 0 ? NULL : sequence[i];
++ ++i;
++ if (i <= anchor_i)
++ continue;
++ sequence[i] = entry;
++ if (entry->anchor) {
++ anchor_i = i;
++ longest = anchor_i + 1;
++ } else if (i == longest) {
++ longest++;
++ }
++ }
++
++ /* No common unique lines were found */
++ if (!longest) {
++ xdl_free(sequence);
++ return NULL;
++ }
++
++ /* Iterate starting at the last element, adjusting the "next" members */
++ entry = sequence[longest - 1];
++ entry->next = NULL;
++ while (entry->previous) {
++ entry->previous->next = entry;
++ entry = entry->previous;
++ }
++ xdl_free(sequence);
++ return entry;
++ }
++
++ static int match(struct hashmap *map, int line1, int line2)
++ {
++ xrecord_t *record1 = map->env->xdf1.recs[line1 - 1];
++ xrecord_t *record2 = map->env->xdf2.recs[line2 - 1];
++ return xdl_recmatch(record1->ptr, record1->size,
++ record2->ptr, record2->size, map->xpp->flags);
++ }
++
++ static int patience_diff(mmfile_t *file1, mmfile_t *file2,
++ xpparam_t const *xpp, xdfenv_t *env,
++ int line1, int count1, int line2, int count2);
++
++ static int walk_common_sequence(struct hashmap *map, struct entry *first,
++ int line1, int count1, int line2, int count2)
++ {
++ int end1 = line1 + count1, end2 = line2 + count2;
++ int next1, next2;
++
++ for (;;) {
++ /* Try to grow the line ranges of common lines */
++ if (first) {
++ next1 = first->line1;
++ next2 = first->line2;
++ while (next1 > line1 && next2 > line2 &&
++ match(map, next1 - 1, next2 - 1)) {
++ next1--;
++ next2--;
++ }
++ } else {
++ next1 = end1;
++ next2 = end2;
++ }
++ while (line1 < next1 && line2 < next2 &&
++ match(map, line1, line2)) {
++ line1++;
++ line2++;
++ }
++
++ /* Recurse */
++ if (next1 > line1 || next2 > line2) {
++ struct hashmap submap;
++
++ memset(&submap, 0, sizeof(submap));
++ if (patience_diff(map->file1, map->file2,
++ map->xpp, map->env,
++ line1, next1 - line1,
++ line2, next2 - line2))
++ return -1;
++ }
++
++ if (!first)
++ return 0;
++
++ while (first->next &&
++ first->next->line1 == first->line1 + 1 &&
++ first->next->line2 == first->line2 + 1)
++ first = first->next;
++
++ line1 = first->line1 + 1;
++ line2 = first->line2 + 1;
++
++ first = first->next;
++ }
++ }
++
++ static int fall_back_to_classic_diff(struct hashmap *map,
++ int line1, int count1, int line2, int count2)
++ {
++ xpparam_t xpp;
++ xpp.flags = map->xpp->flags & ~XDF_DIFF_ALGORITHM_MASK;
++
++ return xdl_fall_back_diff(map->env, &xpp,
++ line1, count1, line2, count2);
++ }
++
++ /*
++ * Recursively find the longest common sequence of unique lines,
++ * and if none was found, ask xdl_do_diff() to do the job.
++ *
++ * This function assumes that env was prepared with xdl_prepare_env().
++ */
++ static int patience_diff(mmfile_t *file1, mmfile_t *file2,
++ xpparam_t const *xpp, xdfenv_t *env,
++ int line1, int count1, int line2, int count2)
++ {
++ struct hashmap map;
++ struct entry *first;
++ int result = 0;
++
++ /* trivial case: one side is empty */
++ if (!count1) {
++ while(count2--)
++ env->xdf2.rchg[line2++ - 1] = 1;
++ return 0;
++ } else if (!count2) {
++ while(count1--)
++ env->xdf1.rchg[line1++ - 1] = 1;
++ return 0;
++ }
++
++ memset(&map, 0, sizeof(map));
++ if (fill_hashmap(file1, file2, xpp, env, &map,
++ line1, count1, line2, count2))
++ return -1;
++
++ /* are there any matching lines at all? */
++ if (!map.has_matches) {
++ while(count1--)
++ env->xdf1.rchg[line1++ - 1] = 1;
++ while(count2--)
++ env->xdf2.rchg[line2++ - 1] = 1;
++ xdl_free(map.entries);
++ return 0;
++ }
++
++ first = find_longest_common_sequence(&map);
++ if (first)
++ result = walk_common_sequence(&map, first,
++ line1, count1, line2, count2);
++ else
++ result = fall_back_to_classic_diff(&map,
++ line1, count1, line2, count2);
++
++ xdl_free(map.entries);
++ return result;
++ }
++
++ int xdl_do_patience_diff(mmfile_t *file1, mmfile_t *file2,
++ xpparam_t const *xpp, xdfenv_t *env)
++ {
++ if (xdl_prepare_env(file1, file2, xpp, env) < 0)
++ return -1;
++
++ /* environment is cleaned up in xdl_diff() */
++ return patience_diff(file1, file2, xpp, env,
++ 1, env->xdf1.nrec, 1, env->xdf2.nrec);
++ }
+*** ../vim-8.1.0359/src/xdiff/xprepare.c 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xprepare.c 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,483 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #include "xinclude.h"
++
++
++ #define XDL_KPDIS_RUN 4
++ #define XDL_MAX_EQLIMIT 1024
++ #define XDL_SIMSCAN_WINDOW 100
++ #define XDL_GUESS_NLINES1 256
++ #define XDL_GUESS_NLINES2 20
++
++
++ typedef struct s_xdlclass {
++ struct s_xdlclass *next;
++ unsigned long ha;
++ char const *line;
++ long size;
++ long idx;
++ long len1, len2;
++ } xdlclass_t;
++
++ typedef struct s_xdlclassifier {
++ unsigned int hbits;
++ long hsize;
++ xdlclass_t **rchash;
++ chastore_t ncha;
++ xdlclass_t **rcrecs;
++ long alloc;
++ long count;
++ long flags;
++ } xdlclassifier_t;
++
++
++
++
++ static int xdl_init_classifier(xdlclassifier_t *cf, long size, long flags);
++ static void xdl_free_classifier(xdlclassifier_t *cf);
++ static int xdl_classify_record(unsigned int pass, xdlclassifier_t *cf, xrecord_t **rhash,
++ unsigned int hbits, xrecord_t *rec);
++ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_t const *xpp,
++ xdlclassifier_t *cf, xdfile_t *xdf);
++ static void xdl_free_ctx(xdfile_t *xdf);
++ static int xdl_clean_mmatch(char const *dis, long i, long s, long e);
++ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2);
++ static int xdl_trim_ends(xdfile_t *xdf1, xdfile_t *xdf2);
++ static int xdl_optimize_ctxs(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2);
++
++
++
++
++ static int xdl_init_classifier(xdlclassifier_t *cf, long size, long flags) {
++ cf->flags = flags;
++
++ cf->hbits = xdl_hashbits((unsigned int) size);
++ cf->hsize = 1 << cf->hbits;
++
++ if (xdl_cha_init(&cf->ncha, sizeof(xdlclass_t), size / 4 + 1) < 0) {
++
++ return -1;
++ }
++ if (!(cf->rchash = (xdlclass_t **) xdl_malloc(cf->hsize * sizeof(xdlclass_t *)))) {
++
++ xdl_cha_free(&cf->ncha);
++ return -1;
++ }
++ memset(cf->rchash, 0, cf->hsize * sizeof(xdlclass_t *));
++
++ cf->alloc = size;
++ if (!(cf->rcrecs = (xdlclass_t **) xdl_malloc(cf->alloc * sizeof(xdlclass_t *)))) {
++
++ xdl_free(cf->rchash);
++ xdl_cha_free(&cf->ncha);
++ return -1;
++ }
++
++ cf->count = 0;
++
++ return 0;
++ }
++
++
++ static void xdl_free_classifier(xdlclassifier_t *cf) {
++
++ xdl_free(cf->rcrecs);
++ xdl_free(cf->rchash);
++ xdl_cha_free(&cf->ncha);
++ }
++
++
++ static int xdl_classify_record(unsigned int pass, xdlclassifier_t *cf, xrecord_t **rhash,
++ unsigned int hbits, xrecord_t *rec) {
++ long hi;
++ char const *line;
++ xdlclass_t *rcrec;
++ xdlclass_t **rcrecs;
++
++ line = rec->ptr;
++ hi = (long) XDL_HASHLONG(rec->ha, cf->hbits);
++ for (rcrec = cf->rchash[hi]; rcrec; rcrec = rcrec->next)
++ if (rcrec->ha == rec->ha &&
++ xdl_recmatch(rcrec->line, rcrec->size,
++ rec->ptr, rec->size, cf->flags))
++ break;
++
++ if (!rcrec) {
++ if (!(rcrec = xdl_cha_alloc(&cf->ncha))) {
++
++ return -1;
++ }
++ rcrec->idx = cf->count++;
++ if (cf->count > cf->alloc) {
++ cf->alloc *= 2;
++ if (!(rcrecs = (xdlclass_t **) xdl_realloc(cf->rcrecs, cf->alloc * sizeof(xdlclass_t *)))) {
++
++ return -1;
++ }
++ cf->rcrecs = rcrecs;
++ }
++ cf->rcrecs[rcrec->idx] = rcrec;
++ rcrec->line = line;
++ rcrec->size = rec->size;
++ rcrec->ha = rec->ha;
++ rcrec->len1 = rcrec->len2 = 0;
++ rcrec->next = cf->rchash[hi];
++ cf->rchash[hi] = rcrec;
++ }
++
++ (pass == 1) ? rcrec->len1++ : rcrec->len2++;
++
++ rec->ha = (unsigned long) rcrec->idx;
++
++ hi = (long) XDL_HASHLONG(rec->ha, hbits);
++ rec->next = rhash[hi];
++ rhash[hi] = rec;
++
++ return 0;
++ }
++
++
++ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_t const *xpp,
++ xdlclassifier_t *cf, xdfile_t *xdf) {
++ unsigned int hbits;
++ long nrec, hsize, bsize;
++ unsigned long hav;
++ char const *blk, *cur, *top, *prev;
++ xrecord_t *crec;
++ xrecord_t **recs, **rrecs;
++ xrecord_t **rhash;
++ unsigned long *ha;
++ char *rchg;
++ long *rindex;
++
++ ha = NULL;
++ rindex = NULL;
++ rchg = NULL;
++ rhash = NULL;
++ recs = NULL;
++
++ if (xdl_cha_init(&xdf->rcha, sizeof(xrecord_t), narec / 4 + 1) < 0)
++ goto abort;
++ if (!(recs = (xrecord_t **) xdl_malloc(narec * sizeof(xrecord_t *))))
++ goto abort;
++
++ if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF)
++ hbits = hsize = 0;
++ else {
++ hbits = xdl_hashbits((unsigned int) narec);
++ hsize = 1 << hbits;
++ if (!(rhash = (xrecord_t **) xdl_malloc(hsize * sizeof(xrecord_t *))))
++ goto abort;
++ memset(rhash, 0, hsize * sizeof(xrecord_t *));
++ }
++
++ nrec = 0;
++ if ((cur = blk = xdl_mmfile_first(mf, &bsize)) != NULL) {
++ for (top = blk + bsize; cur < top; ) {
++ prev = cur;
++ hav = xdl_hash_record(&cur, top, xpp->flags);
++ if (nrec >= narec) {
++ narec *= 2;
++ if (!(rrecs = (xrecord_t **) xdl_realloc(recs, narec * sizeof(xrecord_t *))))
++ goto abort;
++ recs = rrecs;
++ }
++ if (!(crec = xdl_cha_alloc(&xdf->rcha)))
++ goto abort;
++ crec->ptr = prev;
++ crec->size = (long) (cur - prev);
++ crec->ha = hav;
++ recs[nrec++] = crec;
++
++ if ((XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF) &&
++ xdl_classify_record(pass, cf, rhash, hbits, crec) < 0)
++ goto abort;
++ }
++ }
++
++ if (!(rchg = (char *) xdl_malloc((nrec + 2) * sizeof(char))))
++ goto abort;
++ memset(rchg, 0, (nrec + 2) * sizeof(char));
++
++ if (!(rindex = (long *) xdl_malloc((nrec + 1) * sizeof(long))))
++ goto abort;
++ if (!(ha = (unsigned long *) xdl_malloc((nrec + 1) * sizeof(unsigned long))))
++ goto abort;
++
++ xdf->nrec = nrec;
++ xdf->recs = recs;
++ xdf->hbits = hbits;
++ xdf->rhash = rhash;
++ xdf->rchg = rchg + 1;
++ xdf->rindex = rindex;
++ xdf->nreff = 0;
++ xdf->ha = ha;
++ xdf->dstart = 0;
++ xdf->dend = nrec - 1;
++
++ return 0;
++
++ abort:
++ xdl_free(ha);
++ xdl_free(rindex);
++ xdl_free(rchg);
++ xdl_free(rhash);
++ xdl_free(recs);
++ xdl_cha_free(&xdf->rcha);
++ return -1;
++ }
++
++
++ static void xdl_free_ctx(xdfile_t *xdf) {
++
++ xdl_free(xdf->rhash);
++ xdl_free(xdf->rindex);
++ xdl_free(xdf->rchg - 1);
++ xdl_free(xdf->ha);
++ xdl_free(xdf->recs);
++ xdl_cha_free(&xdf->rcha);
++ }
++
++
++ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdfenv_t *xe) {
++ long enl1, enl2, sample;
++ xdlclassifier_t cf;
++
++ memset(&cf, 0, sizeof(cf));
++
++ /*
++ * For histogram diff, we can afford a smaller sample size and
++ * thus a poorer estimate of the number of lines, as the hash
++ * table (rhash) won't be filled up/grown. The number of lines
++ * (nrecs) will be updated correctly anyway by
++ * xdl_prepare_ctx().
++ */
++ sample = (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF
++ ? XDL_GUESS_NLINES2 : XDL_GUESS_NLINES1);
++
++ enl1 = xdl_guess_lines(mf1, sample) + 1;
++ enl2 = xdl_guess_lines(mf2, sample) + 1;
++
++ if (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF &&
++ xdl_init_classifier(&cf, enl1 + enl2 + 1, xpp->flags) < 0)
++ return -1;
++
++ if (xdl_prepare_ctx(1, mf1, enl1, xpp, &cf, &xe->xdf1) < 0) {
++
++ xdl_free_classifier(&cf);
++ return -1;
++ }
++ if (xdl_prepare_ctx(2, mf2, enl2, xpp, &cf, &xe->xdf2) < 0) {
++
++ xdl_free_ctx(&xe->xdf1);
++ xdl_free_classifier(&cf);
++ return -1;
++ }
++
++ if ((XDF_DIFF_ALG(xpp->flags) != XDF_PATIENCE_DIFF) &&
++ (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF) &&
++ xdl_optimize_ctxs(&cf, &xe->xdf1, &xe->xdf2) < 0) {
++
++ xdl_free_ctx(&xe->xdf2);
++ xdl_free_ctx(&xe->xdf1);
++ xdl_free_classifier(&cf);
++ return -1;
++ }
++
++ if (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF)
++ xdl_free_classifier(&cf);
++
++ return 0;
++ }
++
++
++ void xdl_free_env(xdfenv_t *xe) {
++
++ xdl_free_ctx(&xe->xdf2);
++ xdl_free_ctx(&xe->xdf1);
++ }
++
++
++ static int xdl_clean_mmatch(char const *dis, long i, long s, long e) {
++ long r, rdis0, rpdis0, rdis1, rpdis1;
++
++ /*
++ * Limits the window the is examined during the similar-lines
++ * scan. The loops below stops when dis[i - r] == 1 (line that
++ * has no match), but there are corner cases where the loop
++ * proceed all the way to the extremities by causing huge
++ * performance penalties in case of big files.
++ */
++ if (i - s > XDL_SIMSCAN_WINDOW)
++ s = i - XDL_SIMSCAN_WINDOW;
++ if (e - i > XDL_SIMSCAN_WINDOW)
++ e = i + XDL_SIMSCAN_WINDOW;
++
++ /*
++ * Scans the lines before 'i' to find a run of lines that either
++ * have no match (dis[j] == 0) or have multiple matches (dis[j] > 1).
++ * Note that we always call this function with dis[i] > 1, so the
++ * current line (i) is already a multimatch line.
++ */
++ for (r = 1, rdis0 = 0, rpdis0 = 1; (i - r) >= s; r++) {
++ if (!dis[i - r])
++ rdis0++;
++ else if (dis[i - r] == 2)
++ rpdis0++;
++ else
++ break;
++ }
++ /*
++ * If the run before the line 'i' found only multimatch lines, we
++ * return 0 and hence we don't make the current line (i) discarded.
++ * We want to discard multimatch lines only when they appear in the
++ * middle of runs with nomatch lines (dis[j] == 0).
++ */
++ if (rdis0 == 0)
++ return 0;
++ for (r = 1, rdis1 = 0, rpdis1 = 1; (i + r) <= e; r++) {
++ if (!dis[i + r])
++ rdis1++;
++ else if (dis[i + r] == 2)
++ rpdis1++;
++ else
++ break;
++ }
++ /*
++ * If the run after the line 'i' found only multimatch lines, we
++ * return 0 and hence we don't make the current line (i) discarded.
++ */
++ if (rdis1 == 0)
++ return 0;
++ rdis1 += rdis0;
++ rpdis1 += rpdis0;
++
++ return rpdis1 * XDL_KPDIS_RUN < (rpdis1 + rdis1);
++ }
++
++
++ /*
++ * Try to reduce the problem complexity, discard records that have no
++ * matches on the other file. Also, lines that have multiple matches
++ * might be potentially discarded if they happear in a run of discardable.
++ */
++ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2) {
++ long i, nm, nreff, mlim;
++ xrecord_t **recs;
++ xdlclass_t *rcrec;
++ char *dis, *dis1, *dis2;
++
++ if (!(dis = (char *) xdl_malloc(xdf1->nrec + xdf2->nrec + 2))) {
++
++ return -1;
++ }
++ memset(dis, 0, xdf1->nrec + xdf2->nrec + 2);
++ dis1 = dis;
++ dis2 = dis1 + xdf1->nrec + 1;
++
++ if ((mlim = xdl_bogosqrt(xdf1->nrec)) > XDL_MAX_EQLIMIT)
++ mlim = XDL_MAX_EQLIMIT;
++ for (i = xdf1->dstart, recs = &xdf1->recs[xdf1->dstart]; i <= xdf1->dend; i++, recs++) {
++ rcrec = cf->rcrecs[(*recs)->ha];
++ nm = rcrec ? rcrec->len2 : 0;
++ dis1[i] = (nm == 0) ? 0: (nm >= mlim) ? 2: 1;
++ }
++
++ if ((mlim = xdl_bogosqrt(xdf2->nrec)) > XDL_MAX_EQLIMIT)
++ mlim = XDL_MAX_EQLIMIT;
++ for (i = xdf2->dstart, recs = &xdf2->recs[xdf2->dstart]; i <= xdf2->dend; i++, recs++) {
++ rcrec = cf->rcrecs[(*recs)->ha];
++ nm = rcrec ? rcrec->len1 : 0;
++ dis2[i] = (nm == 0) ? 0: (nm >= mlim) ? 2: 1;
++ }
++
++ for (nreff = 0, i = xdf1->dstart, recs = &xdf1->recs[xdf1->dstart];
++ i <= xdf1->dend; i++, recs++) {
++ if (dis1[i] == 1 ||
++ (dis1[i] == 2 && !xdl_clean_mmatch(dis1, i, xdf1->dstart, xdf1->dend))) {
++ xdf1->rindex[nreff] = i;
++ xdf1->ha[nreff] = (*recs)->ha;
++ nreff++;
++ } else
++ xdf1->rchg[i] = 1;
++ }
++ xdf1->nreff = nreff;
++
++ for (nreff = 0, i = xdf2->dstart, recs = &xdf2->recs[xdf2->dstart];
++ i <= xdf2->dend; i++, recs++) {
++ if (dis2[i] == 1 ||
++ (dis2[i] == 2 && !xdl_clean_mmatch(dis2, i, xdf2->dstart, xdf2->dend))) {
++ xdf2->rindex[nreff] = i;
++ xdf2->ha[nreff] = (*recs)->ha;
++ nreff++;
++ } else
++ xdf2->rchg[i] = 1;
++ }
++ xdf2->nreff = nreff;
++
++ xdl_free(dis);
++
++ return 0;
++ }
++
++
++ /*
++ * Early trim initial and terminal matching records.
++ */
++ static int xdl_trim_ends(xdfile_t *xdf1, xdfile_t *xdf2) {
++ long i, lim;
++ xrecord_t **recs1, **recs2;
++
++ recs1 = xdf1->recs;
++ recs2 = xdf2->recs;
++ for (i = 0, lim = XDL_MIN(xdf1->nrec, xdf2->nrec); i < lim;
++ i++, recs1++, recs2++)
++ if ((*recs1)->ha != (*recs2)->ha)
++ break;
++
++ xdf1->dstart = xdf2->dstart = i;
++
++ recs1 = xdf1->recs + xdf1->nrec - 1;
++ recs2 = xdf2->recs + xdf2->nrec - 1;
++ for (lim -= i, i = 0; i < lim; i++, recs1--, recs2--)
++ if ((*recs1)->ha != (*recs2)->ha)
++ break;
++
++ xdf1->dend = xdf1->nrec - i - 1;
++ xdf2->dend = xdf2->nrec - i - 1;
++
++ return 0;
++ }
++
++
++ static int xdl_optimize_ctxs(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2) {
++
++ if (xdl_trim_ends(xdf1, xdf2) < 0 ||
++ xdl_cleanup_records(cf, xdf1, xdf2) < 0) {
++
++ return -1;
++ }
++
++ return 0;
++ }
+*** ../vim-8.1.0359/src/xdiff/xprepare.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xprepare.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,34 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #if !defined(XPREPARE_H)
++ #define XPREPARE_H
++
++
++
++ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
++ xdfenv_t *xe);
++ void xdl_free_env(xdfenv_t *xe);
++
++
++
++ #endif /* #if !defined(XPREPARE_H) */
+*** ../vim-8.1.0359/src/xdiff/xtypes.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xtypes.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,67 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #if !defined(XTYPES_H)
++ #define XTYPES_H
++
++
++
++ typedef struct s_chanode {
++ struct s_chanode *next;
++ long icurr;
++ } chanode_t;
++
++ typedef struct s_chastore {
++ chanode_t *head, *tail;
++ long isize, nsize;
++ chanode_t *ancur;
++ chanode_t *sncur;
++ long scurr;
++ } chastore_t;
++
++ typedef struct s_xrecord {
++ struct s_xrecord *next;
++ char const *ptr;
++ long size;
++ unsigned long ha;
++ } xrecord_t;
++
++ typedef struct s_xdfile {
++ chastore_t rcha;
++ long nrec;
++ unsigned int hbits;
++ xrecord_t **rhash;
++ long dstart, dend;
++ xrecord_t **recs;
++ char *rchg;
++ long *rindex;
++ long nreff;
++ unsigned long *ha;
++ } xdfile_t;
++
++ typedef struct s_xdfenv {
++ xdfile_t xdf1, xdf2;
++ } xdfenv_t;
++
++
++
++ #endif /* #if !defined(XTYPES_H) */
+*** ../vim-8.1.0359/src/xdiff/xutils.c 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xutils.c 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,425 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #include <limits.h>
++ #include <assert.h>
++ #include "xinclude.h"
++
++
++
++
++ long xdl_bogosqrt(long n) {
++ long i;
++
++ /*
++ * Classical integer square root approximation using shifts.
++ */
++ for (i = 1; n > 0; n >>= 2)
++ i <<= 1;
++
++ return i;
++ }
++
++
++ int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize,
++ xdemitcb_t *ecb) {
++ int i = 2;
++ mmbuffer_t mb[3];
++
++ mb[0].ptr = (char *) pre;
++ mb[0].size = psize;
++ mb[1].ptr = (char *) rec;
++ mb[1].size = size;
++ if (size > 0 && rec[size - 1] != '\n') {
++ mb[2].ptr = (char *) "\n\\ No newline at end of file\n";
++ mb[2].size = strlen(mb[2].ptr);
++ i++;
++ }
++ if (ecb->outf(ecb->priv, mb, i) < 0) {
++
++ return -1;
++ }
++
++ return 0;
++ }
++
++ void *xdl_mmfile_first(mmfile_t *mmf, long *size)
++ {
++ *size = mmf->size;
++ return mmf->ptr;
++ }
++
++
++ long xdl_mmfile_size(mmfile_t *mmf)
++ {
++ return mmf->size;
++ }
++
++
++ int xdl_cha_init(chastore_t *cha, long isize, long icount) {
++
++ cha->head = cha->tail = NULL;
++ cha->isize = isize;
++ cha->nsize = icount * isize;
++ cha->ancur = cha->sncur = NULL;
++ cha->scurr = 0;
++
++ return 0;
++ }
++
++
++ void xdl_cha_free(chastore_t *cha) {
++ chanode_t *cur, *tmp;
++
++ for (cur = cha->head; (tmp = cur) != NULL;) {
++ cur = cur->next;
++ xdl_free(tmp);
++ }
++ }
++
++
++ void *xdl_cha_alloc(chastore_t *cha) {
++ chanode_t *ancur;
++ void *data;
++
++ if (!(ancur = cha->ancur) || ancur->icurr == cha->nsize) {
++ if (!(ancur = (chanode_t *) xdl_malloc(sizeof(chanode_t) + cha->nsize))) {
++
++ return NULL;
++ }
++ ancur->icurr = 0;
++ ancur->next = NULL;
++ if (cha->tail)
++ cha->tail->next = ancur;
++ if (!cha->head)
++ cha->head = ancur;
++ cha->tail = ancur;
++ cha->ancur = ancur;
++ }
++
++ data = (char *) ancur + sizeof(chanode_t) + ancur->icurr;
++ ancur->icurr += cha->isize;
++
++ return data;
++ }
++
++ long xdl_guess_lines(mmfile_t *mf, long sample) {
++ long nl = 0, size, tsize = 0;
++ char const *data, *cur, *top;
++
++ if ((cur = data = xdl_mmfile_first(mf, &size)) != NULL) {
++ for (top = data + size; nl < sample && cur < top; ) {
++ nl++;
++ if (!(cur = memchr(cur, '\n', top - cur)))
++ cur = top;
++ else
++ cur++;
++ }
++ tsize += (long) (cur - data);
++ }
++
++ if (nl && tsize)
++ nl = xdl_mmfile_size(mf) / (tsize / nl);
++
++ return nl + 1;
++ }
++
++ int xdl_blankline(const char *line, long size, long flags)
++ {
++ long i;
++
++ if (!(flags & XDF_WHITESPACE_FLAGS))
++ return (size <= 1);
++
++ for (i = 0; i < size && XDL_ISSPACE(line[i]); i++)
++ ;
++
++ return (i == size);
++ }
++
++ /*
++ * Have we eaten everything on the line, except for an optional
++ * CR at the very end?
++ */
++ static int ends_with_optional_cr(const char *l, long s, long i)
++ {
++ int complete = s && l[s-1] == '\n';
++
++ if (complete)
++ s--;
++ if (s == i)
++ return 1;
++ /* do not ignore CR at the end of an incomplete line */
++ if (complete && s == i + 1 && l[i] == '\r')
++ return 1;
++ return 0;
++ }
++
++ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
++ {
++ int i1, i2;
++
++ if (s1 == s2 && !memcmp(l1, l2, s1))
++ return 1;
++ if (!(flags & XDF_WHITESPACE_FLAGS))
++ return 0;
++
++ i1 = 0;
++ i2 = 0;
++
++ /*
++ * -w matches everything that matches with -b, and -b in turn
++ * matches everything that matches with --ignore-space-at-eol,
++ * which in turn matches everything that matches with --ignore-cr-at-eol.
++ *
++ * Each flavor of ignoring needs different logic to skip whitespaces
++ * while we have both sides to compare.
++ */
++ if (flags & XDF_IGNORE_WHITESPACE) {
++ goto skip_ws;
++ while (i1 < s1 && i2 < s2) {
++ if (l1[i1++] != l2[i2++])
++ return 0;
++ skip_ws:
++ while (i1 < s1 && XDL_ISSPACE(l1[i1]))
++ i1++;
++ while (i2 < s2 && XDL_ISSPACE(l2[i2]))
++ i2++;
++ }
++ } else if (flags & XDF_IGNORE_WHITESPACE_CHANGE) {
++ while (i1 < s1 && i2 < s2) {
++ if (XDL_ISSPACE(l1[i1]) && XDL_ISSPACE(l2[i2])) {
++ /* Skip matching spaces and try again */
++ while (i1 < s1 && XDL_ISSPACE(l1[i1]))
++ i1++;
++ while (i2 < s2 && XDL_ISSPACE(l2[i2]))
++ i2++;
++ continue;
++ }
++ if (l1[i1++] != l2[i2++])
++ return 0;
++ }
++ } else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL) {
++ while (i1 < s1 && i2 < s2 && l1[i1] == l2[i2]) {
++ i1++;
++ i2++;
++ }
++ } else if (flags & XDF_IGNORE_CR_AT_EOL) {
++ /* Find the first difference and see how the line ends */
++ while (i1 < s1 && i2 < s2 && l1[i1] == l2[i2]) {
++ i1++;
++ i2++;
++ }
++ return (ends_with_optional_cr(l1, s1, i1) &&
++ ends_with_optional_cr(l2, s2, i2));
++ }
++
++ /*
++ * After running out of one side, the remaining side must have
++ * nothing but whitespace for the lines to match. Note that
++ * ignore-whitespace-at-eol case may break out of the loop
++ * while there still are characters remaining on both lines.
++ */
++ if (i1 < s1) {
++ while (i1 < s1 && XDL_ISSPACE(l1[i1]))
++ i1++;
++ if (s1 != i1)
++ return 0;
++ }
++ if (i2 < s2) {
++ while (i2 < s2 && XDL_ISSPACE(l2[i2]))
++ i2++;
++ return (s2 == i2);
++ }
++ return 1;
++ }
++
++ static unsigned long xdl_hash_record_with_whitespace(char const **data,
++ char const *top, long flags) {
++ unsigned long ha = 5381;
++ char const *ptr = *data;
++ int cr_at_eol_only = (flags & XDF_WHITESPACE_FLAGS) == XDF_IGNORE_CR_AT_EOL;
++
++ for (; ptr < top && *ptr != '\n'; ptr++) {
++ if (cr_at_eol_only) {
++ /* do not ignore CR at the end of an incomplete line */
++ if (*ptr == '\r' &&
++ (ptr + 1 < top && ptr[1] == '\n'))
++ continue;
++ }
++ else if (XDL_ISSPACE(*ptr)) {
++ const char *ptr2 = ptr;
++ int at_eol;
++ while (ptr + 1 < top && XDL_ISSPACE(ptr[1])
++ && ptr[1] != '\n')
++ ptr++;
++ at_eol = (top <= ptr + 1 || ptr[1] == '\n');
++ if (flags & XDF_IGNORE_WHITESPACE)
++ ; /* already handled */
++ else if (flags & XDF_IGNORE_WHITESPACE_CHANGE
++ && !at_eol) {
++ ha += (ha << 5);
++ ha ^= (unsigned long) ' ';
++ }
++ else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL
++ && !at_eol) {
++ while (ptr2 != ptr + 1) {
++ ha += (ha << 5);
++ ha ^= (unsigned long) *ptr2;
++ ptr2++;
++ }
++ }
++ continue;
++ }
++ ha += (ha << 5);
++ ha ^= (unsigned long) *ptr;
++ }
++ *data = ptr < top ? ptr + 1: ptr;
++
++ return ha;
++ }
++
++ unsigned long xdl_hash_record(char const **data, char const *top, long flags) {
++ unsigned long ha = 5381;
++ char const *ptr = *data;
++
++ if (flags & XDF_WHITESPACE_FLAGS)
++ return xdl_hash_record_with_whitespace(data, top, flags);
++
++ for (; ptr < top && *ptr != '\n'; ptr++) {
++ ha += (ha << 5);
++ ha ^= (unsigned long) *ptr;
++ }
++ *data = ptr < top ? ptr + 1: ptr;
++
++ return ha;
++ }
++
++ unsigned int xdl_hashbits(unsigned int size) {
++ unsigned int val = 1, bits = 0;
++
++ for (; val < size && bits < CHAR_BIT * sizeof(unsigned int); val <<= 1, bits++);
++ return bits ? bits: 1;
++ }
++
++
++ int xdl_num_out(char *out, long val) {
++ char *ptr, *str = out;
++ char buf[32];
++
++ ptr = buf + sizeof(buf) - 1;
++ *ptr = '\0';
++ if (val < 0) {
++ *--ptr = '-';
++ val = -val;
++ }
++ for (; val && ptr > buf; val /= 10)
++ *--ptr = "0123456789"[val % 10];
++ if (*ptr)
++ for (; *ptr; ptr++, str++)
++ *str = *ptr;
++ else
++ *str++ = '0';
++ *str = '\0';
++
++ return str - out;
++ }
++
++ int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2,
++ const char *func, long funclen, xdemitcb_t *ecb) {
++ int nb = 0;
++ mmbuffer_t mb;
++ char buf[128];
++
++ memcpy(buf, "@@ -", 4);
++ nb += 4;
++
++ nb += xdl_num_out(buf + nb, c1 ? s1: s1 - 1);
++
++ if (c1 != 1) {
++ memcpy(buf + nb, ",", 1);
++ nb += 1;
++
++ nb += xdl_num_out(buf + nb, c1);
++ }
++
++ memcpy(buf + nb, " +", 2);
++ nb += 2;
++
++ nb += xdl_num_out(buf + nb, c2 ? s2: s2 - 1);
++
++ if (c2 != 1) {
++ memcpy(buf + nb, ",", 1);
++ nb += 1;
++
++ nb += xdl_num_out(buf + nb, c2);
++ }
++
++ memcpy(buf + nb, " @@", 3);
++ nb += 3;
++ if (func && funclen) {
++ buf[nb++] = ' ';
++ if (funclen > (long)sizeof(buf) - nb - 1)
++ funclen = sizeof(buf) - nb - 1;
++ memcpy(buf + nb, func, funclen);
++ nb += funclen;
++ }
++ buf[nb++] = '\n';
++
++ mb.ptr = buf;
++ mb.size = nb;
++ if (ecb->outf(ecb->priv, &mb, 1) < 0)
++ return -1;
++
++ return 0;
++ }
++
++ int xdl_fall_back_diff(xdfenv_t *diff_env, xpparam_t const *xpp,
++ int line1, int count1, int line2, int count2)
++ {
++ /*
++ * This probably does not work outside Git, since
++ * we have a very simple mmfile structure.
++ *
++ * Note: ideally, we would reuse the prepared environment, but
++ * the libxdiff interface does not (yet) allow for diffing only
++ * ranges of lines instead of the whole files.
++ */
++ mmfile_t subfile1, subfile2;
++ xdfenv_t env;
++
++ subfile1.ptr = (char *)diff_env->xdf1.recs[line1 - 1]->ptr;
++ subfile1.size = diff_env->xdf1.recs[line1 + count1 - 2]->ptr +
++ diff_env->xdf1.recs[line1 + count1 - 2]->size - subfile1.ptr;
++ subfile2.ptr = (char *)diff_env->xdf2.recs[line2 - 1]->ptr;
++ subfile2.size = diff_env->xdf2.recs[line2 + count2 - 2]->ptr +
++ diff_env->xdf2.recs[line2 + count2 - 2]->size - subfile2.ptr;
++ if (xdl_do_diff(&subfile1, &subfile2, xpp, &env) < 0)
++ return -1;
++
++ memcpy(diff_env->xdf1.rchg + line1 - 1, env.xdf1.rchg, count1);
++ memcpy(diff_env->xdf2.rchg + line2 - 1, env.xdf2.rchg, count2);
++
++ xdl_free_env(&env);
++
++ return 0;
++ }
+*** ../vim-8.1.0359/src/xdiff/xutils.h 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/xutils.h 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,47 ----
++ /*
++ * LibXDiff by Davide Libenzi ( File Differential Library )
++ * Copyright (C) 2003 Davide Libenzi
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * Davide Libenzi <davidel@xmailserver.org>
++ *
++ */
++
++ #if !defined(XUTILS_H)
++ #define XUTILS_H
++
++
++
++ long xdl_bogosqrt(long n);
++ int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize,
++ xdemitcb_t *ecb);
++ int xdl_cha_init(chastore_t *cha, long isize, long icount);
++ void xdl_cha_free(chastore_t *cha);
++ void *xdl_cha_alloc(chastore_t *cha);
++ long xdl_guess_lines(mmfile_t *mf, long sample);
++ int xdl_blankline(const char *line, long size, long flags);
++ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags);
++ unsigned long xdl_hash_record(char const **data, char const *top, long flags);
++ unsigned int xdl_hashbits(unsigned int size);
++ int xdl_num_out(char *out, long val);
++ int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2,
++ const char *func, long funclen, xdemitcb_t *ecb);
++ int xdl_fall_back_diff(xdfenv_t *diff_env, xpparam_t const *xpp,
++ int line1, int count1, int line2, int count2);
++
++
++
++ #endif /* #if !defined(XUTILS_H) */
+*** ../vim-8.1.0359/src/xdiff/README.txt 1970-01-01 01:00:00.000000000 +0100
+--- src/xdiff/README.txt 2018-09-10 17:39:20.324083781 +0200
+***************
+*** 0 ****
+--- 1,14 ----
++ The files in this directory come from the xdiff implementation in git.
++ You can find it here: https://github.com/git/git/tree/master/xdiff
++ The files were last updated 2018 September 10.
++
++ This is originally based on libxdiff, which can be found here:
++ http://www.xmailserver.org/xdiff-lib.html
++
++ The git version was used because it has been maintained and improved.
++ And since it's part of git it is expected to be reliable.
++
++ The code is distributed under the GNU LGPL license. It is included in the
++ COPYING file.
++
++ The first work for including xdiff in Vim was done by Christian Brabandt.
+*** ../vim-8.1.0359/src/version.c 2018-09-09 22:02:21.165859748 +0200
+--- src/version.c 2018-09-10 17:23:11.443756983 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 360,
+ /**/
+
+--
+'Well, here's something to occupy you and keep your mind off things.'
+'It won't work, I have an exceptionally large mind.'
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0361 b/data/vim/patches/8.1.0361
new file mode 100644
index 000000000..749364d12
--- /dev/null
+++ b/data/vim/patches/8.1.0361
@@ -0,0 +1,172 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0361
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0361
+Problem: Remote user not used for completion. (Stucki)
+Solution: Use $USER too. (Dominique Pelle, closes #3407)
+Files: src/misc1.c
+
+
+*** ../vim-8.1.0360/src/misc1.c 2018-08-26 21:23:03.400383307 +0200
+--- src/misc1.c 2018-09-10 18:53:46.863908096 +0200
+***************
+*** 4717,4722 ****
+--- 4717,4741 ----
+ }
+
+ /*
++ * Add a user name to the list of users in ga_users.
++ * Do nothing if user name is NULL or empty.
++ */
++ static void
++ add_user(char_u *user, int need_copy)
++ {
++ char_u *user_copy = (user != NULL && need_copy)
++ ? vim_strsave(user) : user;
++
++ if (user_copy == NULL || *user_copy == NUL || ga_grow(&ga_users, 1) == FAIL)
++ {
++ if (need_copy)
++ vim_free(user);
++ return;
++ }
++ ((char_u **)(ga_users.ga_data))[ga_users.ga_len++] = user_copy;
++ }
++
++ /*
+ * Find all user names for user completion.
+ * Done only once and then cached.
+ */
+***************
+*** 4733,4758 ****
+
+ # if defined(HAVE_GETPWENT) && defined(HAVE_PWD_H)
+ {
+- char_u* user;
+ struct passwd* pw;
+
+ setpwent();
+ while ((pw = getpwent()) != NULL)
+! /* pw->pw_name shouldn't be NULL but just in case... */
+! if (pw->pw_name != NULL)
+! {
+! if (ga_grow(&ga_users, 1) == FAIL)
+! break;
+! user = vim_strsave((char_u*)pw->pw_name);
+! if (user == NULL)
+! break;
+! ((char_u **)(ga_users.ga_data))[ga_users.ga_len++] = user;
+! }
+ endpwent();
+ }
+ # elif defined(WIN3264)
+ {
+- char_u* user;
+ DWORD nusers = 0, ntotal = 0, i;
+ PUSER_INFO_0 uinfo;
+
+--- 4752,4766 ----
+
+ # if defined(HAVE_GETPWENT) && defined(HAVE_PWD_H)
+ {
+ struct passwd* pw;
+
+ setpwent();
+ while ((pw = getpwent()) != NULL)
+! add_user((char_u *)pw->pw_name, TRUE);
+ endpwent();
+ }
+ # elif defined(WIN3264)
+ {
+ DWORD nusers = 0, ntotal = 0, i;
+ PUSER_INFO_0 uinfo;
+
+***************
+*** 4760,4775 ****
+ &nusers, &ntotal, NULL) == NERR_Success)
+ {
+ for (i = 0; i < nusers; i++)
+ {
+! if (ga_grow(&ga_users, 1) == FAIL)
+! break;
+! user = utf16_to_enc(uinfo[i].usri0_name, NULL);
+! if (user == NULL)
+ break;
+- ((char_u **)(ga_users.ga_data))[ga_users.ga_len++] = user;
+ }
+
+! NetApiBufferFree(uinfo);
+ }
+ }
+ # endif
+--- 4768,4808 ----
+ &nusers, &ntotal, NULL) == NERR_Success)
+ {
+ for (i = 0; i < nusers; i++)
++ add_user(utf16_to_enc(uinfo[i].usri0_name, NULL), FALSE);
++
++ NetApiBufferFree(uinfo);
++ }
++ }
++ # endif
++ # if defined(HAVE_GETPWNAM)
++ {
++ char_u *user_env = mch_getenv((char_u *)"USER");
++
++ // The $USER environment variable may be a valid remote user name (NIS,
++ // LDAP) not already listed by getpwent(), as getpwent() only lists
++ // local user names. If $USER is not already listed, check whether it
++ // is a valid remote user name using getpwnam() and if it is, add it to
++ // the list of user names.
++
++ if (user_env != NULL && *user_env != NUL)
++ {
++ int i;
++
++ for (i = 0; i < ga_users.ga_len; i++)
+ {
+! char_u *local_user = ((char_u **)ga_users.ga_data)[i];
+!
+! if (STRCMP(local_user, user_env) == 0)
+ break;
+ }
+
+! if (i == ga_users.ga_len)
+! {
+! struct passwd *pw = getpwnam((char *)user_env);
+!
+! if (pw != NULL)
+! add_user((char_u *)pw->pw_name, TRUE);
+! }
+ }
+ }
+ # endif
+*** ../vim-8.1.0360/src/version.c 2018-09-10 17:50:32.717306902 +0200
+--- src/version.c 2018-09-10 18:48:00.579950668 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 361,
+ /**/
+
+--
+"You know, it's at times like this when I'm trapped in a Vogon airlock with
+a man from Betelgeuse and about to die of asphyxiation in deep space that I
+really wish I'd listened to what my mother told me when I was young!"
+"Why, what did she tell you?"
+"I don't know, I didn't listen!"
+ -- Arthur Dent and Ford Prefect in Douglas Adams'
+ "The Hitchhiker's Guide to the Galaxy"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0362 b/data/vim/patches/8.1.0362
new file mode 100644
index 000000000..a662ea322
--- /dev/null
+++ b/data/vim/patches/8.1.0362
@@ -0,0 +1,6943 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0362
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0362
+Problem: Cannot get the script line number when executing a function.
+Solution: Store the line number besides the script ID. (Ozaki Kiichi,
+ closes #3362) Also display the line number with ":verbose set".
+Files: runtime/doc/cmdline.txt, runtime/doc/eval.txt, src/Make_all.mak,
+ src/buffer.c, src/eval.c, src/evalfunc.c, src/ex_cmds2.c,
+ src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/getchar.c,
+ src/globals.h, src/main.c, src/menu.c, src/option.c,
+ src/proto/eval.pro, src/structs.h, src/syntax.c,
+ src/testdir/test_alot.vim, src/testdir/test_expand_func.vim,
+ src/testdir/test_maparg.vim, src/term.c src/userfunc.c
+
+
+*** ../vim-8.1.0361/runtime/doc/cmdline.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/cmdline.txt 2018-09-10 19:56:54.871550345 +0200
+***************
+*** 832,842 ****
+ \\# \#
+ Also see |`=|.
+
+! *:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
+! *:<sfile>* *<sfile>* *:<afile>* *<afile>*
+! *:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
+! *:<cexpr>* *<cexpr>*
+! *<slnum>* *E495* *E496* *E497* *E499* *E500*
+ Note: these are typed literally, they are not special keys!
+ <cword> is replaced with the word under the cursor (like |star|)
+ <cWORD> is replaced with the WORD under the cursor (see |WORD|)
+--- 832,843 ----
+ \\# \#
+ Also see |`=|.
+
+! *:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
+! *:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
+! *:<afile>* *<afile>* *:<abuf>* *<abuf>*
+! *:<amatch>* *<amatch>*
+! *:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
+! *:<sflnum>* *<sflnum>* *E499* *E500*
+ Note: these are typed literally, they are not special keys!
+ <cword> is replaced with the word under the cursor (like |star|)
+ <cWORD> is replaced with the WORD under the cursor (see |WORD|)
+***************
+*** 849,863 ****
+ |gf| uses)
+ <afile> When executing autocommands, is replaced with the file name
+ of the buffer being manipulated, or the file for a read or
+! write.
+ <abuf> When executing autocommands, is replaced with the currently
+ effective buffer number (for ":r file" and ":so file" it is
+ the current buffer, the file being read/sourced is not in a
+! buffer).
+ <amatch> When executing autocommands, is replaced with the match for
+! which this autocommand was executed. It differs from
+! <afile> only when the file name isn't used to match with
+! (for FileType, Syntax and SpellFileMissing events).
+ <sfile> When executing a ":source" command, is replaced with the
+ file name of the sourced file. *E498*
+ When executing a function, is replaced with:
+--- 850,865 ----
+ |gf| uses)
+ <afile> When executing autocommands, is replaced with the file name
+ of the buffer being manipulated, or the file for a read or
+! write. *E495*
+ <abuf> When executing autocommands, is replaced with the currently
+ effective buffer number (for ":r file" and ":so file" it is
+ the current buffer, the file being read/sourced is not in a
+! buffer). *E496*
+ <amatch> When executing autocommands, is replaced with the match for
+! which this autocommand was executed. *E497*
+! It differs from <afile> only when the file name isn't used
+! to match with (for FileType, Syntax and SpellFileMissing
+! events).
+ <sfile> When executing a ":source" command, is replaced with the
+ file name of the sourced file. *E498*
+ When executing a function, is replaced with:
+***************
+*** 867,875 ****
+ Note that filename-modifiers are useless when <sfile> is
+ used inside a function.
+ <slnum> When executing a ":source" command, is replaced with the
+! line number. *E842*
+ When executing a function it's the line number relative to
+ the start of the function.
+
+ *filename-modifiers*
+ *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
+--- 869,880 ----
+ Note that filename-modifiers are useless when <sfile> is
+ used inside a function.
+ <slnum> When executing a ":source" command, is replaced with the
+! line number. *E842*
+ When executing a function it's the line number relative to
+ the start of the function.
++ <sflnum> When executing a script, is replaced with the line number.
++ It differs from <slnum> in that <sflnum> is replaced with
++ the script line number in any situation. *E961*
+
+ *filename-modifiers*
+ *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
+*** ../vim-8.1.0361/runtime/doc/eval.txt 2018-09-06 13:14:39.148722497 +0200
+--- runtime/doc/eval.txt 2018-09-10 20:28:19.359384588 +0200
+***************
+*** 3790,3796 ****
+ <abuf> autocmd buffer number (as a String!)
+ <amatch> autocmd matched name
+ <sfile> sourced script file or function name
+! <slnum> sourced script file line number
+ <cword> word under the cursor
+ <cWORD> WORD under the cursor
+ <client> the {clientid} of the last received
+--- 3798,3807 ----
+ <abuf> autocmd buffer number (as a String!)
+ <amatch> autocmd matched name
+ <sfile> sourced script file or function name
+! <slnum> sourced script line number or function
+! line number
+! <sflnum> script file line number, also when in
+! a function
+ <cword> word under the cursor
+ <cWORD> WORD under the cursor
+ <client> the {clientid} of the last received
+***************
+*** 5923,5928 ****
+--- 5934,5940 ----
+ (|mapmode-ic|)
+ "sid" The script local ID, used for <sid> mappings
+ (|<SID>|).
++ "lnum" The line number in "sid", zero if unknown.
+ "nowait" Do not wait for other, longer mappings.
+ (|:map-<nowait>|).
+
+*** ../vim-8.1.0361/src/Make_all.mak 2018-08-07 21:39:09.251060096 +0200
+--- src/Make_all.mak 2018-09-10 19:45:33.372367473 +0200
+***************
+*** 2,8 ****
+ # Common Makefile, defines the list of tests to run.
+ #
+
+! # Individual tests, including the ones part of test_alot
+ NEW_TESTS = \
+ test_arglist \
+ test_arabic \
+--- 2,9 ----
+ # Common Makefile, defines the list of tests to run.
+ #
+
+! # Individual tests, including the ones part of test_alot.
+! # Please keep sorted up to test_alot.
+ NEW_TESTS = \
+ test_arglist \
+ test_arabic \
+***************
+*** 52,57 ****
+--- 53,59 ----
+ test_exists_autocmd \
+ test_expand \
+ test_expand_dllpath \
++ test_expand_func \
+ test_expr \
+ test_expr_utf8 \
+ test_farsi \
+*** ../vim-8.1.0361/src/buffer.c 2018-09-01 15:29:58.754429402 +0200
+--- src/buffer.c 2018-09-10 20:10:25.338295605 +0200
+***************
+*** 5412,5418 ****
+ char_u *save_sourcing_name;
+ linenr_T save_sourcing_lnum;
+ #ifdef FEAT_EVAL
+! scid_T save_SID;
+ #endif
+
+ prev = -1;
+--- 5412,5418 ----
+ char_u *save_sourcing_name;
+ linenr_T save_sourcing_lnum;
+ #ifdef FEAT_EVAL
+! sctx_T save_current_sctx;
+ #endif
+
+ prev = -1;
+***************
+*** 5497,5508 ****
+ if (*s != NUL) /* skip over an empty "::" */
+ {
+ #ifdef FEAT_EVAL
+! save_SID = current_SID;
+! current_SID = SID_MODELINE;
+ #endif
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+ #ifdef FEAT_EVAL
+! current_SID = save_SID;
+ #endif
+ if (retval == FAIL) /* stop if error found */
+ break;
+--- 5497,5509 ----
+ if (*s != NUL) /* skip over an empty "::" */
+ {
+ #ifdef FEAT_EVAL
+! save_current_sctx = current_sctx;
+! current_sctx.sc_sid = SID_MODELINE;
+! current_sctx.sc_lnum = 0;
+ #endif
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+ #ifdef FEAT_EVAL
+! current_sctx = save_current_sctx;
+ #endif
+ if (retval == FAIL) /* stop if error found */
+ break;
+*** ../vim-8.1.0361/src/eval.c 2018-08-01 19:05:59.278223228 +0200
+--- src/eval.c 2018-09-10 20:26:11.396692124 +0200
+***************
+*** 1495,1502 ****
+ static void
+ list_script_vars(int *first)
+ {
+! if (current_SID > 0 && current_SID <= ga_scripts.ga_len)
+! list_hashtable_vars(&SCRIPT_VARS(current_SID),
+ (char_u *)"s:", FALSE, first);
+ }
+
+--- 1495,1502 ----
+ static void
+ list_script_vars(int *first)
+ {
+! if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= ga_scripts.ga_len)
+! list_hashtable_vars(&SCRIPT_VARS(current_sctx.sc_sid),
+ (char_u *)"s:", FALSE, first);
+ }
+
+***************
+*** 7202,7208 ****
+ /* Must be something like "s:", otherwise "ht" would be NULL. */
+ switch (htname)
+ {
+! case 's': return &SCRIPT_SV(current_SID)->sv_var;
+ case 'g': return &globvars_var;
+ case 'v': return &vimvars_var;
+ case 'b': return &curbuf->b_bufvar;
+--- 7202,7208 ----
+ /* Must be something like "s:", otherwise "ht" would be NULL. */
+ switch (htname)
+ {
+! case 's': return &SCRIPT_SV(current_sctx.sc_sid)->sv_var;
+ case 'g': return &globvars_var;
+ case 'v': return &vimvars_var;
+ case 'b': return &curbuf->b_bufvar;
+***************
+*** 7286,7293 ****
+ if (*name == 'l') /* l: local function variable */
+ return get_funccal_local_ht();
+ if (*name == 's' /* script variable */
+! && current_SID > 0 && current_SID <= ga_scripts.ga_len)
+! return &SCRIPT_VARS(current_SID);
+ return NULL;
+ }
+
+--- 7286,7293 ----
+ if (*name == 'l') /* l: local function variable */
+ return get_funccal_local_ht();
+ if (*name == 's' /* script variable */
+! && current_sctx.sc_sid > 0 && current_sctx.sc_sid <= ga_scripts.ga_len)
+! return &SCRIPT_VARS(current_sctx.sc_sid);
+ return NULL;
+ }
+
+***************
+*** 8729,8748 ****
+ * Should only be invoked when 'verbose' is non-zero.
+ */
+ void
+! last_set_msg(scid_T scriptID)
+ {
+ char_u *p;
+
+! if (scriptID != 0)
+ {
+! p = home_replace_save(NULL, get_scriptname(scriptID));
+ if (p != NULL)
+ {
+ verbose_enter();
+ MSG_PUTS(_("\n\tLast set from "));
+ MSG_PUTS(p);
+! vim_free(p);
+ verbose_leave();
+ }
+ }
+ }
+--- 8729,8753 ----
+ * Should only be invoked when 'verbose' is non-zero.
+ */
+ void
+! last_set_msg(sctx_T script_ctx)
+ {
+ char_u *p;
+
+! if (script_ctx.sc_sid != 0)
+ {
+! p = home_replace_save(NULL, get_scriptname(script_ctx.sc_sid));
+ if (p != NULL)
+ {
+ verbose_enter();
+ MSG_PUTS(_("\n\tLast set from "));
+ MSG_PUTS(p);
+! if (script_ctx.sc_lnum > 0)
+! {
+! MSG_PUTS(_(" line "));
+! msg_outnum((long)script_ctx.sc_lnum);
+! }
+ verbose_leave();
++ vim_free(p);
+ }
+ }
+ }
+*** ../vim-8.1.0361/src/evalfunc.c 2018-09-06 13:14:39.144722527 +0200
+--- src/evalfunc.c 2018-09-10 20:28:30.243272684 +0200
+***************
+*** 4061,4067 ****
+ * also be called from another script. Using trans_function_name()
+ * would also work, but some plugins depend on the name being
+ * printable text. */
+! sprintf(sid_buf, "<SNR>%ld_", (long)current_SID);
+ name = alloc((int)(STRLEN(sid_buf) + STRLEN(s + off) + 1));
+ if (name != NULL)
+ {
+--- 4061,4067 ----
+ * also be called from another script. Using trans_function_name()
+ * would also work, but some plugins depend on the name being
+ * printable text. */
+! sprintf(sid_buf, "<SNR>%ld_", (long)current_sctx.sc_sid);
+ name = alloc((int)(STRLEN(sid_buf) + STRLEN(s + off) + 1));
+ if (name != NULL)
+ {
+***************
+*** 7618,7624 ****
+ dict_add_number(dict, "noremap", mp->m_noremap ? 1L : 0L);
+ dict_add_number(dict, "expr", mp->m_expr ? 1L : 0L);
+ dict_add_number(dict, "silent", mp->m_silent ? 1L : 0L);
+! dict_add_number(dict, "sid", (long)mp->m_script_ID);
+ dict_add_number(dict, "buffer", (long)buffer_local);
+ dict_add_number(dict, "nowait", mp->m_nowait ? 1L : 0L);
+ dict_add_string(dict, "mode", mapmode);
+--- 7618,7625 ----
+ dict_add_number(dict, "noremap", mp->m_noremap ? 1L : 0L);
+ dict_add_number(dict, "expr", mp->m_expr ? 1L : 0L);
+ dict_add_number(dict, "silent", mp->m_silent ? 1L : 0L);
+! dict_add_number(dict, "sid", (long)mp->m_script_ctx.sc_sid);
+! dict_add_number(dict, "lnum", (long)mp->m_script_ctx.sc_lnum);
+ dict_add_number(dict, "buffer", (long)buffer_local);
+ dict_add_number(dict, "nowait", mp->m_nowait ? 1L : 0L);
+ dict_add_string(dict, "mode", mapmode);
+*** ../vim-8.1.0361/src/ex_cmds2.c 2018-09-08 18:21:10.438503190 +0200
+--- src/ex_cmds2.c 2018-09-10 20:30:57.913745458 +0200
+***************
+*** 1866,1874 ****
+ {
+ scriptitem_T *si;
+
+! if (current_SID > 0 && current_SID <= script_items.ga_len)
+ {
+! si = &SCRIPT_ITEM(current_SID);
+ if (si->sn_prof_on && si->sn_pr_nest++ == 0)
+ profile_start(&si->sn_pr_child);
+ }
+--- 1866,1874 ----
+ {
+ scriptitem_T *si;
+
+! if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= script_items.ga_len)
+ {
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_prof_on && si->sn_pr_nest++ == 0)
+ profile_start(&si->sn_pr_child);
+ }
+***************
+*** 1883,1891 ****
+ {
+ scriptitem_T *si;
+
+! if (current_SID > 0 && current_SID <= script_items.ga_len)
+ {
+! si = &SCRIPT_ITEM(current_SID);
+ if (si->sn_prof_on && --si->sn_pr_nest == 0)
+ {
+ profile_end(&si->sn_pr_child);
+--- 1883,1891 ----
+ {
+ scriptitem_T *si;
+
+! if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= script_items.ga_len)
+ {
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_prof_on && --si->sn_pr_nest == 0)
+ {
+ profile_end(&si->sn_pr_child);
+***************
+*** 2003,2010 ****
+ int
+ prof_def_func(void)
+ {
+! if (current_SID > 0)
+! return SCRIPT_ITEM(current_SID).sn_pr_force;
+ return FALSE;
+ }
+
+--- 2003,2010 ----
+ int
+ prof_def_func(void)
+ {
+! if (current_sctx.sc_sid > 0)
+! return SCRIPT_ITEM(current_sctx.sc_sid).sn_pr_force;
+ return FALSE;
+ }
+
+***************
+*** 4351,4357 ****
+ char_u *firstline = NULL;
+ int retval = FAIL;
+ #ifdef FEAT_EVAL
+! scid_T save_current_SID;
+ static scid_T last_current_SID = 0;
+ void *save_funccalp;
+ int save_debug_break_level = debug_break_level;
+--- 4351,4357 ----
+ char_u *firstline = NULL;
+ int retval = FAIL;
+ #ifdef FEAT_EVAL
+! sctx_T save_current_sctx;
+ static scid_T last_current_SID = 0;
+ void *save_funccalp;
+ int save_debug_break_level = debug_break_level;
+***************
+*** 4521,4533 ****
+ * Check if this script was sourced before to finds its SID.
+ * If it's new, generate a new SID.
+ */
+! save_current_SID = current_SID;
+ # ifdef UNIX
+ stat_ok = (mch_stat((char *)fname_exp, &st) >= 0);
+ # endif
+! for (current_SID = script_items.ga_len; current_SID > 0; --current_SID)
+ {
+! si = &SCRIPT_ITEM(current_SID);
+ if (si->sn_name != NULL
+ && (
+ # ifdef UNIX
+--- 4521,4535 ----
+ * Check if this script was sourced before to finds its SID.
+ * If it's new, generate a new SID.
+ */
+! save_current_sctx = current_sctx;
+! current_sctx.sc_lnum = 0;
+ # ifdef UNIX
+ stat_ok = (mch_stat((char *)fname_exp, &st) >= 0);
+ # endif
+! for (current_sctx.sc_sid = script_items.ga_len; current_sctx.sc_sid > 0;
+! --current_sctx.sc_sid)
+ {
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_name != NULL
+ && (
+ # ifdef UNIX
+***************
+*** 4541,4553 ****
+ fnamecmp(si->sn_name, fname_exp) == 0))
+ break;
+ }
+! if (current_SID == 0)
+ {
+! current_SID = ++last_current_SID;
+! if (ga_grow(&script_items, (int)(current_SID - script_items.ga_len))
+! == FAIL)
+ goto almosttheend;
+! while (script_items.ga_len < current_SID)
+ {
+ ++script_items.ga_len;
+ SCRIPT_ITEM(script_items.ga_len).sn_name = NULL;
+--- 4543,4555 ----
+ fnamecmp(si->sn_name, fname_exp) == 0))
+ break;
+ }
+! if (current_sctx.sc_sid == 0)
+ {
+! current_sctx.sc_sid = ++last_current_SID;
+! if (ga_grow(&script_items,
+! (int)(current_sctx.sc_sid - script_items.ga_len)) == FAIL)
+ goto almosttheend;
+! while (script_items.ga_len < current_sctx.sc_sid)
+ {
+ ++script_items.ga_len;
+ SCRIPT_ITEM(script_items.ga_len).sn_name = NULL;
+***************
+*** 4555,4561 ****
+ SCRIPT_ITEM(script_items.ga_len).sn_prof_on = FALSE;
+ # endif
+ }
+! si = &SCRIPT_ITEM(current_SID);
+ si->sn_name = fname_exp;
+ fname_exp = NULL;
+ # ifdef UNIX
+--- 4557,4563 ----
+ SCRIPT_ITEM(script_items.ga_len).sn_prof_on = FALSE;
+ # endif
+ }
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ si->sn_name = fname_exp;
+ fname_exp = NULL;
+ # ifdef UNIX
+***************
+*** 4570,4576 ****
+ # endif
+
+ /* Allocate the local script variables to use for this script. */
+! new_script_vars(current_SID);
+ }
+
+ # ifdef FEAT_PROFILE
+--- 4572,4578 ----
+ # endif
+
+ /* Allocate the local script variables to use for this script. */
+! new_script_vars(current_sctx.sc_sid);
+ }
+
+ # ifdef FEAT_PROFILE
+***************
+*** 4626,4632 ****
+ if (do_profiling == PROF_YES)
+ {
+ /* Get "si" again, "script_items" may have been reallocated. */
+! si = &SCRIPT_ITEM(current_SID);
+ if (si->sn_prof_on)
+ {
+ profile_end(&si->sn_pr_start);
+--- 4628,4634 ----
+ if (do_profiling == PROF_YES)
+ {
+ /* Get "si" again, "script_items" may have been reallocated. */
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_prof_on)
+ {
+ profile_end(&si->sn_pr_start);
+***************
+*** 4671,4677 ****
+
+ #ifdef FEAT_EVAL
+ almosttheend:
+! current_SID = save_current_SID;
+ restore_funccal(save_funccalp);
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+--- 4673,4679 ----
+
+ #ifdef FEAT_EVAL
+ almosttheend:
+! current_sctx = save_current_sctx;
+ restore_funccal(save_funccalp);
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+***************
+*** 5090,5098 ****
+ scriptitem_T *si;
+ sn_prl_T *pp;
+
+! if (current_SID <= 0 || current_SID > script_items.ga_len)
+ return;
+! si = &SCRIPT_ITEM(current_SID);
+ if (si->sn_prof_on && sourcing_lnum >= 1)
+ {
+ /* Grow the array before starting the timer, so that the time spent
+--- 5092,5100 ----
+ scriptitem_T *si;
+ sn_prl_T *pp;
+
+! if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len)
+ return;
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_prof_on && sourcing_lnum >= 1)
+ {
+ /* Grow the array before starting the timer, so that the time spent
+***************
+*** 5125,5133 ****
+ {
+ scriptitem_T *si;
+
+! if (current_SID <= 0 || current_SID > script_items.ga_len)
+ return;
+! si = &SCRIPT_ITEM(current_SID);
+ if (si->sn_prof_on && si->sn_prl_idx >= 0)
+ si->sn_prl_execed = TRUE;
+ }
+--- 5127,5135 ----
+ {
+ scriptitem_T *si;
+
+! if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len)
+ return;
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_prof_on && si->sn_prl_idx >= 0)
+ si->sn_prl_execed = TRUE;
+ }
+***************
+*** 5141,5149 ****
+ scriptitem_T *si;
+ sn_prl_T *pp;
+
+! if (current_SID <= 0 || current_SID > script_items.ga_len)
+ return;
+! si = &SCRIPT_ITEM(current_SID);
+ if (si->sn_prof_on && si->sn_prl_idx >= 0
+ && si->sn_prl_idx < si->sn_prl_ga.ga_len)
+ {
+--- 5143,5151 ----
+ scriptitem_T *si;
+ sn_prl_T *pp;
+
+! if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len)
+ return;
+! si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ if (si->sn_prof_on && si->sn_prl_idx >= 0
+ && si->sn_prl_idx < si->sn_prl_ga.ga_len)
+ {
+*** ../vim-8.1.0361/src/ex_docmd.c 2018-09-06 21:44:13.660006996 +0200
+--- src/ex_docmd.c 2018-09-10 20:10:41.366117167 +0200
+***************
+*** 29,35 ****
+ int uc_compl; /* completion type */
+ int uc_addr_type; /* The command's address type */
+ # ifdef FEAT_EVAL
+! scid_T uc_scriptID; /* SID where the command was defined */
+ # ifdef FEAT_CMDL_COMPL
+ char_u *uc_compl_arg; /* completion argument if any */
+ # endif
+--- 29,35 ----
+ int uc_compl; /* completion type */
+ int uc_addr_type; /* The command's address type */
+ # ifdef FEAT_EVAL
+! sctx_T uc_script_ctx; /* SCTX where the command was defined */
+ # ifdef FEAT_CMDL_COMPL
+ char_u *uc_compl_arg; /* completion argument if any */
+ # endif
+***************
+*** 3340,3346 ****
+ if (xp != NULL)
+ {
+ xp->xp_arg = uc->uc_compl_arg;
+! xp->xp_scriptID = uc->uc_scriptID;
+ }
+ # endif
+ # endif
+--- 3340,3347 ----
+ if (xp != NULL)
+ {
+ xp->xp_arg = uc->uc_compl_arg;
+! xp->xp_script_ctx = uc->uc_script_ctx;
+! xp->xp_script_ctx.sc_lnum += sourcing_lnum;
+ }
+ # endif
+ # endif
+***************
+*** 5920,5926 ****
+ cmd->uc_def = def;
+ cmd->uc_compl = compl;
+ #ifdef FEAT_EVAL
+! cmd->uc_scriptID = current_SID;
+ # ifdef FEAT_CMDL_COMPL
+ cmd->uc_compl_arg = compl_arg;
+ # endif
+--- 5921,5928 ----
+ cmd->uc_def = def;
+ cmd->uc_compl = compl;
+ #ifdef FEAT_EVAL
+! cmd->uc_script_ctx = current_sctx;
+! cmd->uc_script_ctx.sc_lnum += sourcing_lnum;
+ # ifdef FEAT_CMDL_COMPL
+ cmd->uc_compl_arg = compl_arg;
+ # endif
+***************
+*** 6141,6147 ****
+ msg_outtrans_special(cmd->uc_rep, FALSE);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(cmd->uc_scriptID);
+ #endif
+ out_flush();
+ ui_breakcheck();
+--- 6143,6149 ----
+ msg_outtrans_special(cmd->uc_rep, FALSE);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(cmd->uc_script_ctx);
+ #endif
+ out_flush();
+ ui_breakcheck();
+***************
+*** 6906,6912 ****
+ char_u *split_buf = NULL;
+ ucmd_T *cmd;
+ #ifdef FEAT_EVAL
+! scid_T save_current_SID = current_SID;
+ #endif
+
+ if (eap->cmdidx == CMD_USER)
+--- 6908,6914 ----
+ char_u *split_buf = NULL;
+ ucmd_T *cmd;
+ #ifdef FEAT_EVAL
+! sctx_T save_current_sctx = current_sctx;
+ #endif
+
+ if (eap->cmdidx == CMD_USER)
+***************
+*** 7007,7018 ****
+ }
+
+ #ifdef FEAT_EVAL
+! current_SID = cmd->uc_scriptID;
+ #endif
+ (void)do_cmdline(buf, eap->getline, eap->cookie,
+ DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_KEYTYPED);
+ #ifdef FEAT_EVAL
+! current_SID = save_current_SID;
+ #endif
+ vim_free(buf);
+ vim_free(split_buf);
+--- 7009,7020 ----
+ }
+
+ #ifdef FEAT_EVAL
+! current_sctx.sc_sid = cmd->uc_script_ctx.sc_sid;
+ #endif
+ (void)do_cmdline(buf, eap->getline, eap->cookie,
+ DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_KEYTYPED);
+ #ifdef FEAT_EVAL
+! current_sctx = save_current_sctx;
+ #endif
+ vim_free(buf);
+ vim_free(split_buf);
+***************
+*** 10736,10749 ****
+ "<slnum>", /* ":so" file line number */
+ #define SPEC_SLNUM (SPEC_SFILE + 1)
+ "<afile>", /* autocommand file name */
+! #define SPEC_AFILE (SPEC_SLNUM + 1)
+ "<abuf>", /* autocommand buffer number */
+! #define SPEC_ABUF (SPEC_AFILE + 1)
+ "<amatch>", /* autocommand match name */
+ #define SPEC_AMATCH (SPEC_ABUF + 1)
+ #ifdef FEAT_CLIENTSERVER
+ "<client>"
+! # define SPEC_CLIENT (SPEC_AMATCH + 1)
+ #endif
+ };
+
+--- 10738,10753 ----
+ "<slnum>", /* ":so" file line number */
+ #define SPEC_SLNUM (SPEC_SFILE + 1)
+ "<afile>", /* autocommand file name */
+! #define SPEC_AFILE (SPEC_SLNUM + 1)
+ "<abuf>", /* autocommand buffer number */
+! #define SPEC_ABUF (SPEC_AFILE + 1)
+ "<amatch>", /* autocommand match name */
+ #define SPEC_AMATCH (SPEC_ABUF + 1)
++ "<sflnum>", /* script file line number */
++ #define SPEC_SFLNUM (SPEC_AMATCH + 1)
+ #ifdef FEAT_CLIENTSERVER
+ "<client>"
+! # define SPEC_CLIENT (SPEC_SFLNUM + 1)
+ #endif
+ };
+
+***************
+*** 10999,11004 ****
+--- 11003,11009 ----
+ return NULL;
+ }
+ break;
++
+ case SPEC_SLNUM: /* line in file for ":so" command */
+ if (sourcing_name == NULL || sourcing_lnum == 0)
+ {
+***************
+*** 11008,11020 ****
+ sprintf((char *)strbuf, "%ld", (long)sourcing_lnum);
+ result = strbuf;
+ break;
+! #if defined(FEAT_CLIENTSERVER)
+ case SPEC_CLIENT: /* Source of last submitted input */
+ sprintf((char *)strbuf, PRINTF_HEX_LONG_U,
+ (long_u)clientWindow);
+ result = strbuf;
+ break;
+ #endif
+ default:
+ result = (char_u *)""; /* avoid gcc warning */
+ break;
+--- 11013,11040 ----
+ sprintf((char *)strbuf, "%ld", (long)sourcing_lnum);
+ result = strbuf;
+ break;
+!
+! #ifdef FEAT_EVAL
+! case SPEC_SFLNUM: /* line in script file */
+! if (current_sctx.sc_lnum + sourcing_lnum == 0)
+! {
+! *errormsg = (char_u *)_("E961: no line number to use for \"<sflnum>\"");
+! return NULL;
+! }
+! sprintf((char *)strbuf, "%ld",
+! (long)(current_sctx.sc_lnum + sourcing_lnum));
+! result = strbuf;
+! break;
+! #endif
+!
+! #ifdef FEAT_CLIENTSERVER
+ case SPEC_CLIENT: /* Source of last submitted input */
+ sprintf((char *)strbuf, PRINTF_HEX_LONG_U,
+ (long_u)clientWindow);
+ result = strbuf;
+ break;
+ #endif
++
+ default:
+ result = (char_u *)""; /* avoid gcc warning */
+ break;
+*** ../vim-8.1.0361/src/ex_getln.c 2018-09-09 15:54:11.232857907 +0200
+--- src/ex_getln.c 2018-09-10 19:45:33.376367415 +0200
+***************
+*** 5591,5597 ****
+ {
+ int keep = 0;
+ typval_T args[4];
+! int save_current_SID = current_SID;
+ char_u *pat = NULL;
+ void *ret;
+ struct cmdline_info save_ccline;
+--- 5591,5597 ----
+ {
+ int keep = 0;
+ typval_T args[4];
+! sctx_T save_current_sctx = current_sctx;
+ char_u *pat = NULL;
+ void *ret;
+ struct cmdline_info save_ccline;
+***************
+*** 5621,5632 ****
+ save_ccline = ccline;
+ ccline.cmdbuff = NULL;
+ ccline.cmdprompt = NULL;
+! current_SID = xp->xp_scriptID;
+
+ ret = user_expand_func(xp->xp_arg, 3, args);
+
+ ccline = save_ccline;
+! current_SID = save_current_SID;
+ if (ccline.cmdbuff != NULL)
+ ccline.cmdbuff[ccline.cmdlen] = keep;
+
+--- 5621,5632 ----
+ save_ccline = ccline;
+ ccline.cmdbuff = NULL;
+ ccline.cmdprompt = NULL;
+! current_sctx = xp->xp_script_ctx;
+
+ ret = user_expand_func(xp->xp_arg, 3, args);
+
+ ccline = save_ccline;
+! current_sctx = save_current_sctx;
+ if (ccline.cmdbuff != NULL)
+ ccline.cmdbuff[ccline.cmdlen] = keep;
+
+*** ../vim-8.1.0361/src/fileio.c 2018-08-21 15:12:10.839801647 +0200
+--- src/fileio.c 2018-09-10 19:45:33.376367415 +0200
+***************
+*** 7700,7706 ****
+ char nested; /* If autocommands nest here */
+ char last; /* last command in list */
+ #ifdef FEAT_EVAL
+! scid_T scriptID; /* script ID where defined */
+ #endif
+ struct AutoCmd *next; /* Next AutoCmd in list */
+ } AutoCmd;
+--- 7700,7706 ----
+ char nested; /* If autocommands nest here */
+ char last; /* last command in list */
+ #ifdef FEAT_EVAL
+! sctx_T script_ctx; /* script context where defined */
+ #endif
+ struct AutoCmd *next; /* Next AutoCmd in list */
+ } AutoCmd;
+***************
+*** 7962,7968 ****
+ msg_outtrans(ac->cmd);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(ac->scriptID);
+ #endif
+ if (got_int)
+ return;
+--- 7962,7968 ----
+ msg_outtrans(ac->cmd);
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(ac->script_ctx);
+ #endif
+ if (got_int)
+ return;
+***************
+*** 8845,8851 ****
+ return FAIL;
+ ac->cmd = vim_strsave(cmd);
+ #ifdef FEAT_EVAL
+! ac->scriptID = current_SID;
+ #endif
+ if (ac->cmd == NULL)
+ {
+--- 8845,8852 ----
+ return FAIL;
+ ac->cmd = vim_strsave(cmd);
+ #ifdef FEAT_EVAL
+! ac->script_ctx = current_sctx;
+! ac->script_ctx.sc_lnum += sourcing_lnum;
+ #endif
+ if (ac->cmd == NULL)
+ {
+***************
+*** 9412,9418 ****
+ AutoPatCmd patcmd;
+ AutoPat *ap;
+ #ifdef FEAT_EVAL
+! scid_T save_current_SID;
+ void *save_funccalp;
+ char_u *save_cmdarg;
+ long save_cmdbang;
+--- 9413,9419 ----
+ AutoPatCmd patcmd;
+ AutoPat *ap;
+ #ifdef FEAT_EVAL
+! sctx_T save_current_sctx;
+ void *save_funccalp;
+ char_u *save_cmdarg;
+ long save_cmdbang;
+***************
+*** 9621,9627 ****
+ sourcing_lnum = 0; /* no line number here */
+
+ #ifdef FEAT_EVAL
+! save_current_SID = current_SID;
+
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+--- 9622,9628 ----
+ sourcing_lnum = 0; /* no line number here */
+
+ #ifdef FEAT_EVAL
+! save_current_sctx = current_sctx;
+
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+***************
+*** 9725,9731 ****
+ autocmd_bufnr = save_autocmd_bufnr;
+ autocmd_match = save_autocmd_match;
+ #ifdef FEAT_EVAL
+! current_SID = save_current_SID;
+ restore_funccal(save_funccalp);
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+--- 9726,9732 ----
+ autocmd_bufnr = save_autocmd_bufnr;
+ autocmd_match = save_autocmd_match;
+ #ifdef FEAT_EVAL
+! current_sctx = save_current_sctx;
+ restore_funccal(save_funccalp);
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+***************
+*** 9949,9955 ****
+ retval = vim_strsave(ac->cmd);
+ autocmd_nested = ac->nested;
+ #ifdef FEAT_EVAL
+! current_SID = ac->scriptID;
+ #endif
+ if (ac->last)
+ acp->nextcmd = NULL;
+--- 9950,9956 ----
+ retval = vim_strsave(ac->cmd);
+ autocmd_nested = ac->nested;
+ #ifdef FEAT_EVAL
+! current_sctx = ac->script_ctx;
+ #endif
+ if (ac->last)
+ acp->nextcmd = NULL;
+*** ../vim-8.1.0361/src/getchar.c 2018-07-27 23:16:40.922781670 +0200
+--- src/getchar.c 2018-09-10 19:45:33.376367415 +0200
+***************
+*** 3677,3683 ****
+ mp->m_mode = mode;
+ #ifdef FEAT_EVAL
+ mp->m_expr = expr;
+! mp->m_script_ID = current_SID;
+ #endif
+ did_it = TRUE;
+ }
+--- 3677,3684 ----
+ mp->m_mode = mode;
+ #ifdef FEAT_EVAL
+ mp->m_expr = expr;
+! mp->m_script_ctx = current_sctx;
+! mp->m_script_ctx.sc_lnum += sourcing_lnum;
+ #endif
+ did_it = TRUE;
+ }
+***************
+*** 3783,3789 ****
+ mp->m_mode = mode;
+ #ifdef FEAT_EVAL
+ mp->m_expr = expr;
+! mp->m_script_ID = current_SID;
+ #endif
+
+ /* add the new entry in front of the abbrlist or maphash[] list */
+--- 3784,3791 ----
+ mp->m_mode = mode;
+ #ifdef FEAT_EVAL
+ mp->m_expr = expr;
+! mp->m_script_ctx = current_sctx;
+! mp->m_script_ctx.sc_lnum += sourcing_lnum;
+ #endif
+
+ /* add the new entry in front of the abbrlist or maphash[] list */
+***************
+*** 4097,4103 ****
+ }
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(mp->m_script_ID);
+ #endif
+ out_flush(); /* show one line at a time */
+ }
+--- 4099,4105 ----
+ }
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(mp->m_script_ctx);
+ #endif
+ out_flush(); /* show one line at a time */
+ }
+*** ../vim-8.1.0361/src/globals.h 2018-09-06 13:14:39.144722527 +0200
+--- src/globals.h 2018-09-10 20:12:24.344972850 +0200
+***************
+*** 325,332 ****
+ EXTERN int want_garbage_collect INIT(= FALSE);
+ EXTERN int garbage_collect_at_exit INIT(= FALSE);
+
+! /* ID of script being sourced or was sourced to define the current function. */
+! EXTERN scid_T current_SID INIT(= 0);
+ #endif
+
+ EXTERN int did_source_packages INIT(= FALSE);
+--- 325,332 ----
+ EXTERN int want_garbage_collect INIT(= FALSE);
+ EXTERN int garbage_collect_at_exit INIT(= FALSE);
+
+! // Script CTX being sourced or was sourced to define the current function.
+! EXTERN sctx_T current_sctx INIT(= {0 COMMA 0});
+ #endif
+
+ EXTERN int did_source_packages INIT(= FALSE);
+*** ../vim-8.1.0361/src/main.c 2018-08-07 22:42:48.965416564 +0200
+--- src/main.c 2018-09-10 20:10:46.434060766 +0200
+***************
+*** 2912,2924 ****
+ curwin->w_cursor.lnum = 0; /* just in case.. */
+ sourcing_name = (char_u *)_("pre-vimrc command line");
+ # ifdef FEAT_EVAL
+! current_SID = SID_CMDARG;
+ # endif
+ for (i = 0; i < cnt; ++i)
+ do_cmdline_cmd(cmds[i]);
+ sourcing_name = NULL;
+ # ifdef FEAT_EVAL
+! current_SID = 0;
+ # endif
+ TIME_MSG("--cmd commands");
+ }
+--- 2912,2924 ----
+ curwin->w_cursor.lnum = 0; /* just in case.. */
+ sourcing_name = (char_u *)_("pre-vimrc command line");
+ # ifdef FEAT_EVAL
+! current_sctx.sc_sid = SID_CMDARG;
+ # endif
+ for (i = 0; i < cnt; ++i)
+ do_cmdline_cmd(cmds[i]);
+ sourcing_name = NULL;
+ # ifdef FEAT_EVAL
+! current_sctx.sc_sid = 0;
+ # endif
+ TIME_MSG("--cmd commands");
+ }
+***************
+*** 2942,2948 ****
+ curwin->w_cursor.lnum = 0;
+ sourcing_name = (char_u *)"command line";
+ #ifdef FEAT_EVAL
+! current_SID = SID_CARG;
+ #endif
+ for (i = 0; i < parmp->n_commands; ++i)
+ {
+--- 2942,2948 ----
+ curwin->w_cursor.lnum = 0;
+ sourcing_name = (char_u *)"command line";
+ #ifdef FEAT_EVAL
+! current_sctx.sc_sid = SID_CARG;
+ #endif
+ for (i = 0; i < parmp->n_commands; ++i)
+ {
+***************
+*** 2952,2958 ****
+ }
+ sourcing_name = NULL;
+ #ifdef FEAT_EVAL
+! current_SID = 0;
+ #endif
+ if (curwin->w_cursor.lnum == 0)
+ curwin->w_cursor.lnum = 1;
+--- 2952,2958 ----
+ }
+ sourcing_name = NULL;
+ #ifdef FEAT_EVAL
+! current_sctx.sc_sid = 0;
+ #endif
+ if (curwin->w_cursor.lnum == 0)
+ curwin->w_cursor.lnum = 1;
+***************
+*** 3159,3165 ****
+ char_u *save_sourcing_name;
+ linenr_T save_sourcing_lnum;
+ #ifdef FEAT_EVAL
+! scid_T save_sid;
+ #endif
+
+ if ((initstr = mch_getenv(env)) != NULL && *initstr != NUL)
+--- 3159,3165 ----
+ char_u *save_sourcing_name;
+ linenr_T save_sourcing_lnum;
+ #ifdef FEAT_EVAL
+! sctx_T save_current_sctx;
+ #endif
+
+ if ((initstr = mch_getenv(env)) != NULL && *initstr != NUL)
+***************
+*** 3171,3184 ****
+ sourcing_name = env;
+ sourcing_lnum = 0;
+ #ifdef FEAT_EVAL
+! save_sid = current_SID;
+! current_SID = SID_ENV;
+ #endif
+ do_cmdline_cmd(initstr);
+ sourcing_name = save_sourcing_name;
+ sourcing_lnum = save_sourcing_lnum;
+ #ifdef FEAT_EVAL
+! current_SID = save_sid;
+ #endif
+ return OK;
+ }
+--- 3171,3185 ----
+ sourcing_name = env;
+ sourcing_lnum = 0;
+ #ifdef FEAT_EVAL
+! save_current_sctx = current_sctx;
+! current_sctx.sc_sid = SID_ENV;
+! current_sctx.sc_lnum = 0;
+ #endif
+ do_cmdline_cmd(initstr);
+ sourcing_name = save_sourcing_name;
+ sourcing_lnum = save_sourcing_lnum;
+ #ifdef FEAT_EVAL
+! current_sctx = save_current_sctx;
+ #endif
+ return OK;
+ }
+*** ../vim-8.1.0361/src/menu.c 2018-03-05 21:31:09.000000000 +0100
+--- src/menu.c 2018-09-10 20:07:50.024030312 +0200
+***************
+*** 2259,2265 ****
+ /* Use the Insert mode entry when returning to Insert mode. */
+ if (restart_edit
+ #ifdef FEAT_EVAL
+! && !current_SID
+ #endif
+ )
+ {
+--- 2259,2265 ----
+ /* Use the Insert mode entry when returning to Insert mode. */
+ if (restart_edit
+ #ifdef FEAT_EVAL
+! && !current_sctx.sc_sid
+ #endif
+ )
+ {
+***************
+*** 2333,2339 ****
+ * Otherwise put them in the typeahead buffer. */
+ if (eap == NULL
+ #ifdef FEAT_EVAL
+! || current_SID != 0
+ #endif
+ )
+ {
+--- 2333,2339 ----
+ * Otherwise put them in the typeahead buffer. */
+ if (eap == NULL
+ #ifdef FEAT_EVAL
+! || current_sctx.sc_sid != 0
+ #endif
+ )
+ {
+*** ../vim-8.1.0361/src/option.c 2018-08-07 22:30:26.662240885 +0200
+--- src/option.c 2018-09-10 20:43:49.293609932 +0200
+***************
+*** 404,423 ****
+
+ struct vimoption
+ {
+! char *fullname; /* full option name */
+! char *shortname; /* permissible abbreviation */
+! long_u flags; /* see below */
+! char_u *var; /* global option: pointer to variable;
+! * window-local option: VAR_WIN;
+! * buffer-local option: global value */
+! idopt_T indir; /* global option: PV_NONE;
+! * local option: indirect option index */
+! char_u *def_val[2]; /* default values for variable (vi and vim) */
+ #ifdef FEAT_EVAL
+! scid_T scriptID; /* script in which the option was last set */
+! # define SCRIPTID_INIT , 0
+ #else
+! # define SCRIPTID_INIT
+ #endif
+ };
+
+--- 404,423 ----
+
+ struct vimoption
+ {
+! char *fullname; // full option name
+! char *shortname; // permissible abbreviation
+! long_u flags; // see below
+! char_u *var; // global option: pointer to variable;
+! // window-local option: VAR_WIN;
+! // buffer-local option: global value
+! idopt_T indir; // global option: PV_NONE;
+! // local option: indirect option index
+! char_u *def_val[2]; // default values for variable (vi and vim)
+ #ifdef FEAT_EVAL
+! sctx_T script_ctx; // script context where the option was last set
+! # define SCTX_INIT , {0, 0}
+ #else
+! # define SCTX_INIT
+ #endif
+ };
+
+***************
+*** 515,521 ****
+ #else
+ (char_u *)224L,
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+ #if defined(FEAT_GUI_MAC)
+ (char_u *)&p_antialias, PV_NONE,
+--- 515,521 ----
+ #else
+ (char_u *)224L,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+ #if defined(FEAT_GUI_MAC)
+ (char_u *)&p_antialias, PV_NONE,
+***************
+*** 524,558 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+ #endif
+! SCRIPTID_INIT},
+ {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT,
+ #ifdef FEAT_ARABIC
+ (char_u *)VAR_WIN, PV_ARAB,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"arabicshape", "arshape", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+ #ifdef FEAT_ARABIC
+ (char_u *)&p_arshape, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"allowrevins", "ari", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_ari, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"altkeymap", "akm", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_FKMAP
+ (char_u *)&p_altkeymap, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"ambiwidth", "ambw", P_STRING|P_VI_DEF|P_RCLR,
+ #if defined(FEAT_MBYTE)
+ (char_u *)&p_ambw, PV_NONE,
+--- 524,558 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+ #endif
+! SCTX_INIT},
+ {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT,
+ #ifdef FEAT_ARABIC
+ (char_u *)VAR_WIN, PV_ARAB,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"arabicshape", "arshape", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+ #ifdef FEAT_ARABIC
+ (char_u *)&p_arshape, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"allowrevins", "ari", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_ari, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"altkeymap", "akm", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_FKMAP
+ (char_u *)&p_altkeymap, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"ambiwidth", "ambw", P_STRING|P_VI_DEF|P_RCLR,
+ #if defined(FEAT_MBYTE)
+ (char_u *)&p_ambw, PV_NONE,
+***************
+*** 561,567 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"autochdir", "acd", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_AUTOCHDIR
+ (char_u *)&p_acd, PV_NONE,
+--- 561,567 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"autochdir", "acd", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_AUTOCHDIR
+ (char_u *)&p_acd, PV_NONE,
+***************
+*** 570,591 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"autoindent", "ai", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ai, PV_AI,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"autoprint", "ap", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"autoread", "ar", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ar, PV_AR,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"autowrite", "aw", P_BOOL|P_VI_DEF,
+ (char_u *)&p_aw, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"autowriteall","awa", P_BOOL|P_VI_DEF,
+ (char_u *)&p_awa, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
+ (char_u *)&p_bg, PV_NONE,
+ {
+--- 570,591 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"autoindent", "ai", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ai, PV_AI,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"autoprint", "ap", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"autoread", "ar", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ar, PV_AR,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"autowrite", "aw", P_BOOL|P_VI_DEF,
+ (char_u *)&p_aw, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"autowriteall","awa", P_BOOL|P_VI_DEF,
+ (char_u *)&p_awa, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
+ (char_u *)&p_bg, PV_NONE,
+ {
+***************
+*** 594,606 ****
+ #else
+ (char_u *)"light",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"backspace", "bs", P_STRING|P_VI_DEF|P_VIM|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_bs, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"backup", "bk", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_bk, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"backupcopy", "bkc", P_STRING|P_VIM|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_bkc, PV_BKC,
+ #ifdef UNIX
+--- 594,606 ----
+ #else
+ (char_u *)"light",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"backspace", "bs", P_STRING|P_VI_DEF|P_VIM|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_bs, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"backup", "bk", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_bk, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"backupcopy", "bkc", P_STRING|P_VIM|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_bkc, PV_BKC,
+ #ifdef UNIX
+***************
+*** 608,618 ****
+ #else
+ {(char_u *)"auto", (char_u *)"auto"}
+ #endif
+! SCRIPTID_INIT},
+ {"backupdir", "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA
+ |P_NODUP|P_SECURE,
+ (char_u *)&p_bdir, PV_NONE,
+! {(char_u *)DFLT_BDIR, (char_u *)0L} SCRIPTID_INIT},
+ {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME,
+ (char_u *)&p_bex, PV_NONE,
+ {
+--- 608,618 ----
+ #else
+ {(char_u *)"auto", (char_u *)"auto"}
+ #endif
+! SCTX_INIT},
+ {"backupdir", "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA
+ |P_NODUP|P_SECURE,
+ (char_u *)&p_bdir, PV_NONE,
+! {(char_u *)DFLT_BDIR, (char_u *)0L} SCTX_INIT},
+ {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME,
+ (char_u *)&p_bex, PV_NONE,
+ {
+***************
+*** 621,627 ****
+ #else
+ (char_u *)"~",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"backupskip", "bsk", P_STRING|P_VI_DEF|P_ONECOMMA,
+ #ifdef FEAT_WILDIGN
+ (char_u *)&p_bsk, PV_NONE,
+--- 621,627 ----
+ #else
+ (char_u *)"~",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"backupskip", "bsk", P_STRING|P_VI_DEF|P_ONECOMMA,
+ #ifdef FEAT_WILDIGN
+ (char_u *)&p_bsk, PV_NONE,
+***************
+*** 630,636 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"balloondelay","bdlay",P_NUM|P_VI_DEF,
+ #ifdef FEAT_BEVAL
+ (char_u *)&p_bdlay, PV_NONE,
+--- 630,636 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"balloondelay","bdlay",P_NUM|P_VI_DEF,
+ #ifdef FEAT_BEVAL
+ (char_u *)&p_bdlay, PV_NONE,
+***************
+*** 639,645 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC,
+ #ifdef FEAT_BEVAL_GUI
+ (char_u *)&p_beval, PV_NONE,
+--- 639,645 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC,
+ #ifdef FEAT_BEVAL_GUI
+ (char_u *)&p_beval, PV_NONE,
+***************
+*** 648,654 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"balloonevalterm", "bevalterm",P_BOOL|P_VI_DEF|P_NO_MKRC,
+ #ifdef FEAT_BEVAL_TERM
+ (char_u *)&p_bevalterm, PV_NONE,
+--- 648,654 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"balloonevalterm", "bevalterm",P_BOOL|P_VI_DEF|P_NO_MKRC,
+ #ifdef FEAT_BEVAL_TERM
+ (char_u *)&p_bevalterm, PV_NONE,
+***************
+*** 657,663 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
+ #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
+ (char_u *)&p_bexpr, PV_BEXPR,
+--- 657,663 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
+ #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
+ (char_u *)&p_bexpr, PV_BEXPR,
+***************
+*** 666,691 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"beautify", "bf", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"belloff", "bo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_bo, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_bin, PV_BIN,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"bioskey", "biosk",P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_bomb, PV_BOMB,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"breakat", "brk", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)&p_breakat, PV_NONE,
+--- 666,691 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"beautify", "bf", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"belloff", "bo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_bo, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_bin, PV_BIN,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"bioskey", "biosk",P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_bomb, PV_BOMB,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"breakat", "brk", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)&p_breakat, PV_NONE,
+***************
+*** 694,700 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)VAR_WIN, PV_BRI,
+--- 694,700 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)VAR_WIN, PV_BRI,
+***************
+*** 703,709 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF
+ |P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_LINEBREAK
+--- 703,709 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF
+ |P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_LINEBREAK
+***************
+*** 713,719 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCRIPTID_INIT},
+ {"browsedir", "bsdir",P_STRING|P_VI_DEF,
+ #ifdef FEAT_BROWSE
+ (char_u *)&p_bsdir, PV_NONE,
+--- 713,719 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCTX_INIT},
+ {"browsedir", "bsdir",P_STRING|P_VI_DEF,
+ #ifdef FEAT_BROWSE
+ (char_u *)&p_bsdir, PV_NONE,
+***************
+*** 722,740 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_bh, PV_BH,
+ {(char_u *)"", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"buflisted", "bl", P_BOOL|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_bl, PV_BL,
+ {(char_u *)1L, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_bt, PV_BT,
+ {(char_u *)"", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"casemap", "cmp", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_cmp, PV_NONE,
+--- 722,740 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_bh, PV_BH,
+ {(char_u *)"", (char_u *)0L}
+! SCTX_INIT},
+ {"buflisted", "bl", P_BOOL|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_bl, PV_BL,
+ {(char_u *)1L, (char_u *)0L}
+! SCTX_INIT},
+ {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_bt, PV_BT,
+ {(char_u *)"", (char_u *)0L}
+! SCTX_INIT},
+ {"casemap", "cmp", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_cmp, PV_NONE,
+***************
+*** 743,749 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
+ #ifdef FEAT_SEARCHPATH
+ (char_u *)&p_cdpath, PV_NONE,
+--- 743,749 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
+ #ifdef FEAT_SEARCHPATH
+ (char_u *)&p_cdpath, PV_NONE,
+***************
+*** 752,758 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cedit", NULL, P_STRING,
+ #ifdef FEAT_CMDWIN
+ (char_u *)&p_cedit, PV_NONE,
+--- 752,758 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cedit", NULL, P_STRING,
+ #ifdef FEAT_CMDWIN
+ (char_u *)&p_cedit, PV_NONE,
+***************
+*** 761,767 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"charconvert", "ccv", P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
+ (char_u *)&p_ccv, PV_NONE,
+--- 761,767 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"charconvert", "ccv", P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_MBYTE) && defined(FEAT_EVAL)
+ (char_u *)&p_ccv, PV_NONE,
+***************
+*** 770,783 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cindent", "cin", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cin, PV_CIN,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cink, PV_CINK,
+--- 770,783 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cindent", "cin", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cin, PV_CIN,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cink, PV_CINK,
+***************
+*** 786,799 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cinoptions", "cino", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cino, PV_CINO,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"cinwords", "cinw", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
+ (char_u *)&p_cinw, PV_CINW,
+--- 786,799 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cinoptions", "cino", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CINDENT
+ (char_u *)&p_cino, PV_CINO,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"cinwords", "cinw", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
+ (char_u *)&p_cinw, PV_CINW,
+***************
+*** 803,809 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"clipboard", "cb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CLIPBOARD
+ (char_u *)&p_cb, PV_NONE,
+--- 803,809 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"clipboard", "cb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_CLIPBOARD
+ (char_u *)&p_cb, PV_NONE,
+***************
+*** 817,843 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL,
+ (char_u *)&p_ch, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
+ {"cmdwinheight", "cwh", P_NUM|P_VI_DEF,
+ #ifdef FEAT_CMDWIN
+ (char_u *)&p_cwh, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)7L, (char_u *)0L} SCRIPTID_INIT},
+ {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN,
+ #ifdef FEAT_SYN_HL
+ (char_u *)VAR_WIN, PV_CC,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
+ (char_u *)&Columns, PV_NONE,
+! {(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
+ {"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA
+ |P_NODUP|P_CURSWANT,
+ #ifdef FEAT_COMMENTS
+--- 817,843 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL,
+ (char_u *)&p_ch, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCTX_INIT},
+ {"cmdwinheight", "cwh", P_NUM|P_VI_DEF,
+ #ifdef FEAT_CMDWIN
+ (char_u *)&p_cwh, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)7L, (char_u *)0L} SCTX_INIT},
+ {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN,
+ #ifdef FEAT_SYN_HL
+ (char_u *)VAR_WIN, PV_CC,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
+ (char_u *)&Columns, PV_NONE,
+! {(char_u *)80L, (char_u *)0L} SCTX_INIT},
+ {"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA
+ |P_NODUP|P_CURSWANT,
+ #ifdef FEAT_COMMENTS
+***************
+*** 848,854 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_cms, PV_CMS,
+--- 848,854 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_cms, PV_CMS,
+***************
+*** 857,868 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ /* P_PRI_MKRC isn't needed here, optval_default()
+ * always returns TRUE for 'compatible' */
+ {"compatible", "cp", P_BOOL|P_RALL,
+ (char_u *)&p_cp, PV_NONE,
+! {(char_u *)TRUE, (char_u *)FALSE} SCRIPTID_INIT},
+ {"complete", "cpt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_cpt, PV_CPT,
+--- 857,868 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ /* P_PRI_MKRC isn't needed here, optval_default()
+ * always returns TRUE for 'compatible' */
+ {"compatible", "cp", P_BOOL|P_RALL,
+ (char_u *)&p_cp, PV_NONE,
+! {(char_u *)TRUE, (char_u *)FALSE} SCTX_INIT},
+ {"complete", "cpt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_cpt, PV_CPT,
+***************
+*** 871,877 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"concealcursor","cocu", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_CONCEAL
+ (char_u *)VAR_WIN, PV_COCU,
+--- 871,877 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"concealcursor","cocu", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_CONCEAL
+ (char_u *)VAR_WIN, PV_COCU,
+***************
+*** 880,886 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"conceallevel","cole", P_NUM|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_CONCEAL
+ (char_u *)VAR_WIN, PV_COLE,
+--- 880,886 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"conceallevel","cole", P_NUM|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_CONCEAL
+ (char_u *)VAR_WIN, PV_COLE,
+***************
+*** 888,894 ****
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)0L, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_COMPL_FUNC
+ (char_u *)&p_cfu, PV_CFU,
+--- 888,894 ----
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)0L, (char_u *)0L}
+! SCTX_INIT},
+ {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_COMPL_FUNC
+ (char_u *)&p_cfu, PV_CFU,
+***************
+*** 897,903 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"completeopt", "cot", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_cot, PV_NONE,
+--- 897,903 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"completeopt", "cot", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_cot, PV_NONE,
+***************
+*** 906,929 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"confirm", "cf", P_BOOL|P_VI_DEF,
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+ (char_u *)&p_confirm, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"conskey", "consk",P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_ci, PV_CI,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST,
+ (char_u *)&p_cpo, PV_NONE,
+ {(char_u *)CPO_VI, (char_u *)CPO_VIM}
+! SCRIPTID_INIT},
+ {"cryptmethod", "cm", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_CRYPT
+ (char_u *)&p_cm, PV_CM,
+--- 906,929 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"confirm", "cf", P_BOOL|P_VI_DEF,
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+ (char_u *)&p_confirm, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"conskey", "consk",P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_ci, PV_CI,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST,
+ (char_u *)&p_cpo, PV_NONE,
+ {(char_u *)CPO_VI, (char_u *)CPO_VIM}
+! SCTX_INIT},
+ {"cryptmethod", "cm", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_CRYPT
+ (char_u *)&p_cm, PV_CM,
+***************
+*** 932,945 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cscopepathcomp", "cspc", P_NUM|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_cspc, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"cscopeprg", "csprg", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csprg, PV_NONE,
+--- 932,945 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cscopepathcomp", "cspc", P_NUM|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_cspc, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"cscopeprg", "csprg", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csprg, PV_NONE,
+***************
+*** 948,954 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cscopequickfix", "csqf", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_CSCOPE) && defined(FEAT_QUICKFIX)
+ (char_u *)&p_csqf, PV_NONE,
+--- 948,954 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cscopequickfix", "csqf", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_CSCOPE) && defined(FEAT_QUICKFIX)
+ (char_u *)&p_csqf, PV_NONE,
+***************
+*** 957,1011 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csre, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_cst, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"cscopetagorder", "csto", P_NUM|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csto, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"cscopeverbose", "csverb", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csverbose, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"cursorbind", "crb", P_BOOL|P_VI_DEF,
+ (char_u *)VAR_WIN, PV_CRBIND,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_SYN_HL
+ (char_u *)VAR_WIN, PV_CUC,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
+ #ifdef FEAT_SYN_HL
+ (char_u *)VAR_WIN, PV_CUL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"debug", NULL, P_STRING|P_VI_DEF,
+ (char_u *)&p_debug, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"define", "def", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_FIND_ID
+ (char_u *)&p_def, PV_DEF,
+--- 957,1011 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csre, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_cst, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"cscopetagorder", "csto", P_NUM|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csto, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"cscopeverbose", "csverb", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_CSCOPE
+ (char_u *)&p_csverbose, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"cursorbind", "crb", P_BOOL|P_VI_DEF,
+ (char_u *)VAR_WIN, PV_CRBIND,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_SYN_HL
+ (char_u *)VAR_WIN, PV_CUC,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
+ #ifdef FEAT_SYN_HL
+ (char_u *)VAR_WIN, PV_CUL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"debug", NULL, P_STRING|P_VI_DEF,
+ (char_u *)&p_debug, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"define", "def", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_FIND_ID
+ (char_u *)&p_def, PV_DEF,
+***************
+*** 1014,1041 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"delcombine", "deco", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_deco, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_dict, PV_DICT,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB,
+ #ifdef FEAT_DIFF
+ (char_u *)VAR_WIN, PV_DIFF,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT,
+ #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
+ (char_u *)&p_dex, PV_NONE,
+--- 1014,1041 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"delcombine", "deco", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_deco, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_dict, PV_DICT,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB,
+ #ifdef FEAT_DIFF
+ (char_u *)VAR_WIN, PV_DIFF,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT,
+ #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
+ (char_u *)&p_dex, PV_NONE,
+***************
+*** 1044,1050 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"diffopt", "dip", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN|P_ONECOMMA
+ |P_NODUP,
+ #ifdef FEAT_DIFF
+--- 1044,1050 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"diffopt", "dip", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN|P_ONECOMMA
+ |P_NODUP,
+ #ifdef FEAT_DIFF
+***************
+*** 1054,1081 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCRIPTID_INIT},
+ {"digraph", "dg", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_DIGRAPHS
+ (char_u *)&p_dg, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"directory", "dir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA
+ |P_NODUP|P_SECURE,
+ (char_u *)&p_dir, PV_NONE,
+! {(char_u *)DFLT_DIR, (char_u *)0L} SCRIPTID_INIT},
+ {"display", "dy", P_STRING|P_VI_DEF|P_ONECOMMA|P_RALL|P_NODUP,
+ (char_u *)&p_dy, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"eadirection", "ead", P_STRING|P_VI_DEF,
+ (char_u *)&p_ead, PV_NONE,
+ {(char_u *)"both", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"edcompatible","ed", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ed, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"emoji", "emo", P_BOOL|P_VI_DEF|P_RCLR,
+ #if defined(FEAT_MBYTE)
+ (char_u *)&p_emoji, PV_NONE,
+--- 1054,1081 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCTX_INIT},
+ {"digraph", "dg", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_DIGRAPHS
+ (char_u *)&p_dg, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"directory", "dir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA
+ |P_NODUP|P_SECURE,
+ (char_u *)&p_dir, PV_NONE,
+! {(char_u *)DFLT_DIR, (char_u *)0L} SCTX_INIT},
+ {"display", "dy", P_STRING|P_VI_DEF|P_ONECOMMA|P_RALL|P_NODUP,
+ (char_u *)&p_dy, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"eadirection", "ead", P_STRING|P_VI_DEF,
+ (char_u *)&p_ead, PV_NONE,
+ {(char_u *)"both", (char_u *)0L}
+! SCTX_INIT},
+ {"edcompatible","ed", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ed, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"emoji", "emo", P_BOOL|P_VI_DEF|P_RCLR,
+ #if defined(FEAT_MBYTE)
+ (char_u *)&p_emoji, PV_NONE,
+***************
+*** 1084,1090 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_enc, PV_NONE,
+--- 1084,1090 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_enc, PV_NONE,
+***************
+*** 1093,1111 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"endofline", "eol", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_eol, PV_EOL,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"equalalways", "ea", P_BOOL|P_VI_DEF|P_RALL,
+ (char_u *)&p_ea, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"equalprg", "ep", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_ep, PV_EP,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"errorbells", "eb", P_BOOL|P_VI_DEF,
+ (char_u *)&p_eb, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"errorfile", "ef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_ef, PV_NONE,
+--- 1093,1111 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"endofline", "eol", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_eol, PV_EOL,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"equalalways", "ea", P_BOOL|P_VI_DEF|P_RALL,
+ (char_u *)&p_ea, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"equalprg", "ep", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_ep, PV_EP,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"errorbells", "eb", P_BOOL|P_VI_DEF,
+ (char_u *)&p_eb, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"errorfile", "ef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_ef, PV_NONE,
+***************
+*** 1114,1120 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"errorformat", "efm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_efm, PV_EFM,
+--- 1114,1120 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"errorformat", "efm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_efm, PV_EFM,
+***************
+*** 1123,1141 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"esckeys", "ek", P_BOOL|P_VIM,
+ (char_u *)&p_ek, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
+ {"eventignore", "ei", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_ei, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"expandtab", "et", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_et, PV_ET,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"exrc", "ex", P_BOOL|P_VI_DEF|P_SECURE,
+ (char_u *)&p_exrc, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF
+ |P_NO_MKRC,
+ #ifdef FEAT_MBYTE
+--- 1123,1141 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"esckeys", "ek", P_BOOL|P_VIM,
+ (char_u *)&p_ek, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+ {"eventignore", "ei", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_ei, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"expandtab", "et", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_et, PV_ET,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"exrc", "ex", P_BOOL|P_VI_DEF|P_SECURE,
+ (char_u *)&p_exrc, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF
+ |P_NO_MKRC,
+ #ifdef FEAT_MBYTE
+***************
+*** 1145,1151 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"fileencodings","fencs", P_STRING|P_VI_DEF|P_ONECOMMA,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_fencs, PV_NONE,
+--- 1145,1151 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"fileencodings","fencs", P_STRING|P_VI_DEF|P_ONECOMMA,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_fencs, PV_NONE,
+***************
+*** 1154,1168 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC
+ |P_CURSWANT,
+ (char_u *)&p_ff, PV_FF,
+! {(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT},
+ {"fileformats", "ffs", P_STRING|P_VIM|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_ffs, PV_NONE,
+ {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}
+! SCRIPTID_INIT},
+ {"fileignorecase", "fic", P_BOOL|P_VI_DEF,
+ (char_u *)&p_fic, PV_NONE,
+ {
+--- 1154,1168 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC
+ |P_CURSWANT,
+ (char_u *)&p_ff, PV_FF,
+! {(char_u *)DFLT_FF, (char_u *)0L} SCTX_INIT},
+ {"fileformats", "ffs", P_STRING|P_VIM|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_ffs, PV_NONE,
+ {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}
+! SCTX_INIT},
+ {"fileignorecase", "fic", P_BOOL|P_VI_DEF,
+ (char_u *)&p_fic, PV_NONE,
+ {
+***************
+*** 1171,1198 ****
+ #else
+ (char_u *)FALSE,
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
+ (char_u *)&p_ft, PV_FT,
+ {(char_u *)"", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"fillchars", "fcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_fcs, PV_NONE,
+ {(char_u *)"vert:|,fold:-", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"fixendofline", "fixeol", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_fixeol, PV_FIXEOL,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"fkmap", "fk", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_FKMAP
+ (char_u *)&p_fkmap, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"flash", "fl", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"foldclose", "fcl", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_fcl, PV_NONE,
+--- 1171,1198 ----
+ #else
+ (char_u *)FALSE,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
+ (char_u *)&p_ft, PV_FT,
+ {(char_u *)"", (char_u *)0L}
+! SCTX_INIT},
+ {"fillchars", "fcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_fcs, PV_NONE,
+ {(char_u *)"vert:|,fold:-", (char_u *)0L}
+! SCTX_INIT},
+ {"fixendofline", "fixeol", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_fixeol, PV_FIXEOL,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"fkmap", "fk", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_FKMAP
+ (char_u *)&p_fkmap, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"flash", "fl", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"foldclose", "fcl", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_fcl, PV_NONE,
+***************
+*** 1201,1207 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldcolumn", "fdc", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDC,
+--- 1201,1207 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldcolumn", "fdc", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDC,
+***************
+*** 1210,1216 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldenable", "fen", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FEN,
+--- 1210,1216 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldenable", "fen", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FEN,
+***************
+*** 1219,1225 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_FOLDING) && defined(FEAT_EVAL)
+ (char_u *)VAR_WIN, PV_FDE,
+--- 1219,1225 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_FOLDING) && defined(FEAT_EVAL)
+ (char_u *)VAR_WIN, PV_FDE,
+***************
+*** 1228,1234 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldignore", "fdi", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDI,
+--- 1228,1234 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldignore", "fdi", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDI,
+***************
+*** 1237,1243 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDL,
+--- 1237,1243 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDL,
+***************
+*** 1246,1252 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_fdls, PV_NONE,
+--- 1246,1252 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_fdls, PV_NONE,
+***************
+*** 1255,1261 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
+ P_RWIN|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_FOLDING
+--- 1255,1261 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
+ P_RWIN|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_FOLDING
+***************
+*** 1265,1271 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldmethod", "fdm", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDM,
+--- 1265,1271 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldmethod", "fdm", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDM,
+***************
+*** 1274,1280 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldminlines","fml", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FML,
+--- 1274,1280 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldminlines","fml", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FML,
+***************
+*** 1283,1289 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDN,
+--- 1283,1289 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_FOLDING
+ (char_u *)VAR_WIN, PV_FDN,
+***************
+*** 1292,1298 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldopen", "fdo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_CURSWANT,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_fdo, PV_NONE,
+--- 1292,1298 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldopen", "fdo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_CURSWANT,
+ #ifdef FEAT_FOLDING
+ (char_u *)&p_fdo, PV_NONE,
+***************
+*** 1302,1308 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_FOLDING) && defined(FEAT_EVAL)
+ (char_u *)VAR_WIN, PV_FDT,
+--- 1302,1308 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_FOLDING) && defined(FEAT_EVAL)
+ (char_u *)VAR_WIN, PV_FDT,
+***************
+*** 1311,1317 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
+ #ifdef FEAT_EVAL
+ (char_u *)&p_fex, PV_FEX,
+--- 1311,1317 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
+ #ifdef FEAT_EVAL
+ (char_u *)&p_fex, PV_FEX,
+***************
+*** 1320,1337 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"formatoptions","fo", P_STRING|P_ALLOCED|P_VIM|P_FLAGLIST,
+ (char_u *)&p_fo, PV_FO,
+ {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM}
+! SCRIPTID_INIT},
+ {"formatlistpat","flp", P_STRING|P_ALLOCED|P_VI_DEF,
+ (char_u *)&p_flp, PV_FLP,
+ {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*",
+! (char_u *)0L} SCRIPTID_INIT},
+ {"formatprg", "fp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_fp, PV_FP,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"fsync", "fs", P_BOOL|P_SECURE|P_VI_DEF,
+ #ifdef HAVE_FSYNC
+ (char_u *)&p_fs, PV_NONE,
+--- 1320,1337 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"formatoptions","fo", P_STRING|P_ALLOCED|P_VIM|P_FLAGLIST,
+ (char_u *)&p_fo, PV_FO,
+ {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM}
+! SCTX_INIT},
+ {"formatlistpat","flp", P_STRING|P_ALLOCED|P_VI_DEF,
+ (char_u *)&p_flp, PV_FLP,
+ {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*",
+! (char_u *)0L} SCTX_INIT},
+ {"formatprg", "fp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_fp, PV_FP,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"fsync", "fs", P_BOOL|P_SECURE|P_VI_DEF,
+ #ifdef HAVE_FSYNC
+ (char_u *)&p_fs, PV_NONE,
+***************
+*** 1340,1352 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"gdefault", "gd", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_gd, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"graphic", "gr", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"grepformat", "gfm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_gefm, PV_NONE,
+--- 1340,1352 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"gdefault", "gd", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_gd, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"graphic", "gr", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"grepformat", "gfm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_gefm, PV_NONE,
+***************
+*** 1355,1361 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"grepprg", "gp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_gp, PV_GP,
+--- 1355,1361 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"grepprg", "gp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_gp, PV_GP,
+***************
+*** 1381,1387 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef CURSOR_SHAPE
+ (char_u *)&p_guicursor, PV_NONE,
+--- 1381,1387 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef CURSOR_SHAPE
+ (char_u *)&p_guicursor, PV_NONE,
+***************
+*** 1396,1402 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_GUI
+ (char_u *)&p_guifont, PV_NONE,
+--- 1396,1402 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_GUI
+ (char_u *)&p_guifont, PV_NONE,
+***************
+*** 1405,1411 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"guifontset", "gfs", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA,
+ #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
+ (char_u *)&p_guifontset, PV_NONE,
+--- 1405,1411 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"guifontset", "gfs", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA,
+ #if defined(FEAT_GUI) && defined(FEAT_XFONTSET)
+ (char_u *)&p_guifontset, PV_NONE,
+***************
+*** 1414,1420 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_GUI) && defined(FEAT_MBYTE)
+ (char_u *)&p_guifontwide, PV_NONE,
+--- 1414,1420 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_GUI) && defined(FEAT_MBYTE)
+ (char_u *)&p_guifontwide, PV_NONE,
+***************
+*** 1423,1436 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"guiheadroom", "ghr", P_NUM|P_VI_DEF,
+ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
+ (char_u *)&p_ghr, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)50L, (char_u *)0L} SCRIPTID_INIT},
+ {"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
+ #if defined(FEAT_GUI)
+ (char_u *)&p_go, PV_NONE,
+--- 1423,1436 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"guiheadroom", "ghr", P_NUM|P_VI_DEF,
+ #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
+ (char_u *)&p_ghr, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)50L, (char_u *)0L} SCTX_INIT},
+ {"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
+ #if defined(FEAT_GUI)
+ (char_u *)&p_go, PV_NONE,
+***************
+*** 1443,1456 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"guipty", NULL, P_BOOL|P_VI_DEF,
+ #if defined(FEAT_GUI)
+ (char_u *)&p_guipty, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"guitablabel", "gtl", P_STRING|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_GUI_TABLINE)
+ (char_u *)&p_gtl, PV_NONE,
+--- 1443,1456 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"guipty", NULL, P_BOOL|P_VI_DEF,
+ #if defined(FEAT_GUI)
+ (char_u *)&p_guipty, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"guitablabel", "gtl", P_STRING|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_GUI_TABLINE)
+ (char_u *)&p_gtl, PV_NONE,
+***************
+*** 1459,1465 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_GUI_TABLINE)
+ (char_u *)&p_gtt, PV_NONE,
+--- 1459,1465 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN,
+ #if defined(FEAT_GUI_TABLINE)
+ (char_u *)&p_gtt, PV_NONE,
+***************
+*** 1468,1484 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"hardtabs", "ht", P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"helpfile", "hf", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_hf, PV_NONE,
+ {(char_u *)DFLT_HELPFILE, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"helpheight", "hh", P_NUM|P_VI_DEF,
+ (char_u *)&p_hh, PV_NONE,
+! {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
+ {"helplang", "hlg", P_STRING|P_VI_DEF|P_ONECOMMA,
+ #ifdef FEAT_MULTI_LANG
+ (char_u *)&p_hlg, PV_NONE,
+--- 1468,1484 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"hardtabs", "ht", P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"helpfile", "hf", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_hf, PV_NONE,
+ {(char_u *)DFLT_HELPFILE, (char_u *)0L}
+! SCTX_INIT},
+ {"helpheight", "hh", P_NUM|P_VI_DEF,
+ (char_u *)&p_hh, PV_NONE,
+! {(char_u *)20L, (char_u *)0L} SCTX_INIT},
+ {"helplang", "hlg", P_STRING|P_VI_DEF|P_ONECOMMA,
+ #ifdef FEAT_MULTI_LANG
+ (char_u *)&p_hlg, PV_NONE,
+***************
+*** 1487,1537 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"hidden", "hid", P_BOOL|P_VI_DEF,
+ (char_u *)&p_hid, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_hl, PV_NONE,
+ {(char_u *)HIGHLIGHT_INIT, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"history", "hi", P_NUM|P_VIM,
+ (char_u *)&p_hi, PV_NONE,
+! {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT},
+ {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_hkmap, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"hkmapp", "hkp", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_hkmapp, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"hlsearch", "hls", P_BOOL|P_VI_DEF|P_VIM|P_RALL,
+ (char_u *)&p_hls, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"icon", NULL, P_BOOL|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_icon, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"iconstring", NULL, P_STRING|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_iconstring, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"ignorecase", "ic", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ic, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_EVAL) && defined(FEAT_MBYTE)
+ (char_u *)&p_imaf, PV_NONE,
+--- 1487,1537 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"hidden", "hid", P_BOOL|P_VI_DEF,
+ (char_u *)&p_hid, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_hl, PV_NONE,
+ {(char_u *)HIGHLIGHT_INIT, (char_u *)0L}
+! SCTX_INIT},
+ {"history", "hi", P_NUM|P_VIM,
+ (char_u *)&p_hi, PV_NONE,
+! {(char_u *)0L, (char_u *)50L} SCTX_INIT},
+ {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_hkmap, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"hkmapp", "hkp", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_hkmapp, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"hlsearch", "hls", P_BOOL|P_VI_DEF|P_VIM|P_RALL,
+ (char_u *)&p_hls, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"icon", NULL, P_BOOL|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_icon, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"iconstring", NULL, P_STRING|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_iconstring, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"ignorecase", "ic", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ic, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_EVAL) && defined(FEAT_MBYTE)
+ (char_u *)&p_imaf, PV_NONE,
+***************
+*** 1540,1560 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ # endif
+! SCRIPTID_INIT},
+ {"imactivatekey","imak",P_STRING|P_VI_DEF,
+ #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+ (char_u *)&p_imak, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"imcmdline", "imc", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_imcmdline, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"imdisable", "imd", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_imdisable, PV_NONE,
+--- 1540,1560 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ # endif
+! SCTX_INIT},
+ {"imactivatekey","imak",P_STRING|P_VI_DEF,
+ #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+ (char_u *)&p_imak, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"imcmdline", "imc", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_imcmdline, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"imdisable", "imd", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_imdisable, PV_NONE,
+***************
+*** 1566,1580 ****
+ #else
+ {(char_u *)FALSE, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"iminsert", "imi", P_NUM|P_VI_DEF,
+ (char_u *)&p_iminsert, PV_IMI,
+ {(char_u *)B_IMODE_NONE, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"imsearch", "ims", P_NUM|P_VI_DEF,
+ (char_u *)&p_imsearch, PV_IMS,
+ {(char_u *)B_IMODE_USE_INSERT, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_EVAL) && defined(FEAT_MBYTE)
+ (char_u *)&p_imsf, PV_NONE,
+--- 1566,1580 ----
+ #else
+ {(char_u *)FALSE, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"iminsert", "imi", P_NUM|P_VI_DEF,
+ (char_u *)&p_iminsert, PV_IMI,
+ {(char_u *)B_IMODE_NONE, (char_u *)0L}
+! SCTX_INIT},
+ {"imsearch", "ims", P_NUM|P_VI_DEF,
+ (char_u *)&p_imsearch, PV_IMS,
+ {(char_u *)B_IMODE_USE_INSERT, (char_u *)0L}
+! SCTX_INIT},
+ {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_EVAL) && defined(FEAT_MBYTE)
+ (char_u *)&p_imsf, PV_NONE,
+***************
+*** 1583,1589 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"imstyle", "imst", P_NUM|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+ (char_u *)&p_imst, PV_NONE,
+--- 1583,1589 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"imstyle", "imst", P_NUM|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+ (char_u *)&p_imst, PV_NONE,
+***************
+*** 1592,1598 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"include", "inc", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_FIND_ID
+ (char_u *)&p_inc, PV_INC,
+--- 1592,1598 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"include", "inc", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_FIND_ID
+ (char_u *)&p_inc, PV_INC,
+***************
+*** 1601,1607 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF,
+ #if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+ (char_u *)&p_inex, PV_INEX,
+--- 1601,1607 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF,
+ #if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+ (char_u *)&p_inex, PV_INEX,
+***************
+*** 1610,1619 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"incsearch", "is", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_is, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"indentexpr", "inde", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
+ #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
+ (char_u *)&p_inde, PV_INDE,
+--- 1610,1619 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"incsearch", "is", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_is, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"indentexpr", "inde", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
+ #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
+ (char_u *)&p_inde, PV_INDE,
+***************
+*** 1622,1628 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"indentkeys", "indk", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
+ (char_u *)&p_indk, PV_INDK,
+--- 1622,1628 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"indentkeys", "indk", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
+ (char_u *)&p_indk, PV_INDK,
+***************
+*** 1631,1643 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"infercase", "inf", P_BOOL|P_VI_DEF,
+ (char_u *)&p_inf, PV_INF,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"insertmode", "im", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_im, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"isfname", "isf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_isf, PV_NONE,
+ {
+--- 1631,1643 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"infercase", "inf", P_BOOL|P_VI_DEF,
+ (char_u *)&p_inf, PV_INF,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"insertmode", "im", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_im, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"isfname", "isf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_isf, PV_NONE,
+ {
+***************
+*** 1660,1666 ****
+ # endif
+ # endif
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_isi, PV_NONE,
+ {
+--- 1660,1666 ----
+ # endif
+ # endif
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_isi, PV_NONE,
+ {
+***************
+*** 1677,1683 ****
+ (char_u *)"@,48-57,_,192-255",
+ # endif
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"iskeyword", "isk", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP,
+ (char_u *)&p_isk, PV_ISK,
+ {
+--- 1677,1683 ----
+ (char_u *)"@,48-57,_,192-255",
+ # endif
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"iskeyword", "isk", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP,
+ (char_u *)&p_isk, PV_ISK,
+ {
+***************
+*** 1696,1702 ****
+ ISK_LATIN1
+ # endif
+ #endif
+! } SCRIPTID_INIT},
+ {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
+ (char_u *)&p_isp, PV_NONE,
+ {
+--- 1696,1702 ----
+ ISK_LATIN1
+ # endif
+ #endif
+! } SCTX_INIT},
+ {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
+ (char_u *)&p_isp, PV_NONE,
+ {
+***************
+*** 1710,1719 ****
+ ISP_LATIN1,
+ # endif
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"joinspaces", "js", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_js, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"key", NULL, P_STRING|P_ALLOCED|P_VI_DEF|P_NO_MKRC,
+ #ifdef FEAT_CRYPT
+ (char_u *)&p_key, PV_KEY,
+--- 1710,1719 ----
+ ISP_LATIN1,
+ # endif
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"joinspaces", "js", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_js, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"key", NULL, P_STRING|P_ALLOCED|P_VI_DEF|P_NO_MKRC,
+ #ifdef FEAT_CRYPT
+ (char_u *)&p_key, PV_KEY,
+***************
+*** 1722,1728 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|P_PRI_MKRC,
+ #ifdef FEAT_KEYMAP
+ (char_u *)&p_keymap, PV_KMAP,
+--- 1722,1728 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|P_PRI_MKRC,
+ #ifdef FEAT_KEYMAP
+ (char_u *)&p_keymap, PV_KMAP,
+***************
+*** 1731,1740 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"keymodel", "km", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_km, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_kp, PV_KP,
+ {
+--- 1731,1740 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"keymodel", "km", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_km, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_kp, PV_KP,
+ {
+***************
+*** 1751,1757 ****
+ # endif
+ # endif
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_langmap, PV_NONE,
+--- 1751,1757 ----
+ # endif
+ # endif
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_langmap, PV_NONE,
+***************
+*** 1760,1800 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL,
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
+ #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
+ (char_u *)&p_lm, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"langnoremap", "lnr", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_lnr, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"langremap", "lrm", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_lrm, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL,
+ (char_u *)&p_ls, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
+ {"lazyredraw", "lz", P_BOOL|P_VI_DEF,
+ (char_u *)&p_lz, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"linebreak", "lbr", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)VAR_WIN, PV_LBR,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
+ (char_u *)&Rows, PV_NONE,
+ {
+--- 1760,1800 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
+ #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
+ (char_u *)&p_lm, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"langnoremap", "lnr", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_lnr, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"langremap", "lrm", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_lrm, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL,
+ (char_u *)&p_ls, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCTX_INIT},
+ {"lazyredraw", "lz", P_BOOL|P_VI_DEF,
+ (char_u *)&p_lz, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"linebreak", "lbr", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)VAR_WIN, PV_LBR,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
+ (char_u *)&Rows, PV_NONE,
+ {
+***************
+*** 1803,1809 ****
+ #else
+ (char_u *)24L,
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"linespace", "lsp", P_NUM|P_VI_DEF|P_RCLR,
+ #ifdef FEAT_GUI
+ (char_u *)&p_linespace, PV_NONE,
+--- 1803,1809 ----
+ #else
+ (char_u *)24L,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"linespace", "lsp", P_NUM|P_VI_DEF|P_RCLR,
+ #ifdef FEAT_GUI
+ (char_u *)&p_linespace, PV_NONE,
+***************
+*** 1815,1828 ****
+ #else
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"lisp", NULL, P_BOOL|P_VI_DEF,
+ #ifdef FEAT_LISP
+ (char_u *)&p_lisp, PV_LISP,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"lispwords", "lw", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_LISP
+ (char_u *)&p_lispwords, PV_LW,
+--- 1815,1828 ----
+ #else
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"lisp", NULL, P_BOOL|P_VI_DEF,
+ #ifdef FEAT_LISP
+ (char_u *)&p_lisp, PV_LISP,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"lispwords", "lw", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_LISP
+ (char_u *)&p_lispwords, PV_LW,
+***************
+*** 1831,1846 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"list", NULL, P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_LIST,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"listchars", "lcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_lcs, PV_NONE,
+! {(char_u *)"eol:$", (char_u *)0L} SCRIPTID_INIT},
+ {"loadplugins", "lpl", P_BOOL|P_VI_DEF,
+ (char_u *)&p_lpl, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"luadll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_LUA)
+ (char_u *)&p_luadll, PV_NONE,
+--- 1831,1846 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"list", NULL, P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_LIST,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"listchars", "lcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_lcs, PV_NONE,
+! {(char_u *)"eol:$", (char_u *)0L} SCTX_INIT},
+ {"loadplugins", "lpl", P_BOOL|P_VI_DEF,
+ (char_u *)&p_lpl, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"luadll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_LUA)
+ (char_u *)&p_luadll, PV_NONE,
+***************
+*** 1849,1855 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
+ #ifdef FEAT_GUI_MAC
+ (char_u *)&p_macatsui, PV_NONE,
+--- 1849,1855 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
+ #ifdef FEAT_GUI_MAC
+ (char_u *)&p_macatsui, PV_NONE,
+***************
+*** 1858,1867 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"magic", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_magic, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"makeef", "mef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_mef, PV_NONE,
+--- 1858,1867 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"magic", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_magic, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"makeef", "mef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_mef, PV_NONE,
+***************
+*** 1870,1876 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"makeencoding","menc", P_STRING|P_VI_DEF,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_menc, PV_MENC,
+--- 1870,1876 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"makeencoding","menc", P_STRING|P_VI_DEF,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_menc, PV_MENC,
+***************
+*** 1879,1885 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"makeprg", "mp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_mp, PV_MP,
+--- 1879,1885 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"makeprg", "mp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_mp, PV_MP,
+***************
+*** 1892,1943 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"matchpairs", "mps", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_mps, PV_MPS,
+ {(char_u *)"(:),{:},[:]", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"matchtime", "mat", P_NUM|P_VI_DEF,
+ (char_u *)&p_mat, PV_NONE,
+! {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
+ {"maxcombine", "mco", P_NUM|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_mco, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)2, (char_u *)0L} SCRIPTID_INIT},
+ {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF,
+ #ifdef FEAT_EVAL
+ (char_u *)&p_mfd, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)100L, (char_u *)0L} SCRIPTID_INIT},
+ {"maxmapdepth", "mmd", P_NUM|P_VI_DEF,
+ (char_u *)&p_mmd, PV_NONE,
+! {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
+ {"maxmem", "mm", P_NUM|P_VI_DEF,
+ (char_u *)&p_mm, PV_NONE,
+ {(char_u *)DFLT_MAXMEM, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"maxmempattern","mmp", P_NUM|P_VI_DEF,
+ (char_u *)&p_mmp, PV_NONE,
+! {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
+ {"maxmemtot", "mmt", P_NUM|P_VI_DEF,
+ (char_u *)&p_mmt, PV_NONE,
+ {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"menuitems", "mis", P_NUM|P_VI_DEF,
+ #ifdef FEAT_MENU
+ (char_u *)&p_mis, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)25L, (char_u *)0L} SCRIPTID_INIT},
+ {"mesg", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
+ #ifdef FEAT_SPELL
+ (char_u *)&p_msm, PV_NONE,
+--- 1892,1943 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"matchpairs", "mps", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_mps, PV_MPS,
+ {(char_u *)"(:),{:},[:]", (char_u *)0L}
+! SCTX_INIT},
+ {"matchtime", "mat", P_NUM|P_VI_DEF,
+ (char_u *)&p_mat, PV_NONE,
+! {(char_u *)5L, (char_u *)0L} SCTX_INIT},
+ {"maxcombine", "mco", P_NUM|P_VI_DEF|P_CURSWANT,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_mco, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)2, (char_u *)0L} SCTX_INIT},
+ {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF,
+ #ifdef FEAT_EVAL
+ (char_u *)&p_mfd, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)100L, (char_u *)0L} SCTX_INIT},
+ {"maxmapdepth", "mmd", P_NUM|P_VI_DEF,
+ (char_u *)&p_mmd, PV_NONE,
+! {(char_u *)1000L, (char_u *)0L} SCTX_INIT},
+ {"maxmem", "mm", P_NUM|P_VI_DEF,
+ (char_u *)&p_mm, PV_NONE,
+ {(char_u *)DFLT_MAXMEM, (char_u *)0L}
+! SCTX_INIT},
+ {"maxmempattern","mmp", P_NUM|P_VI_DEF,
+ (char_u *)&p_mmp, PV_NONE,
+! {(char_u *)1000L, (char_u *)0L} SCTX_INIT},
+ {"maxmemtot", "mmt", P_NUM|P_VI_DEF,
+ (char_u *)&p_mmt, PV_NONE,
+ {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L}
+! SCTX_INIT},
+ {"menuitems", "mis", P_NUM|P_VI_DEF,
+ #ifdef FEAT_MENU
+ (char_u *)&p_mis, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)25L, (char_u *)0L} SCTX_INIT},
+ {"mesg", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
+ #ifdef FEAT_SPELL
+ (char_u *)&p_msm, PV_NONE,
+***************
+*** 1946,1967 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"modeline", "ml", P_BOOL|P_VIM,
+ (char_u *)&p_ml, PV_ML,
+! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
+ {"modelines", "mls", P_NUM|P_VI_DEF,
+ (char_u *)&p_mls, PV_NONE,
+! {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
+ {"modifiable", "ma", P_BOOL|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_ma, PV_MA,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_mod, PV_MOD,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"more", NULL, P_BOOL|P_VIM,
+ (char_u *)&p_more, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
+ {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST,
+ (char_u *)&p_mouse, PV_NONE,
+ {
+--- 1946,1967 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"modeline", "ml", P_BOOL|P_VIM,
+ (char_u *)&p_ml, PV_ML,
+! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+ {"modelines", "mls", P_NUM|P_VI_DEF,
+ (char_u *)&p_mls, PV_NONE,
+! {(char_u *)5L, (char_u *)0L} SCTX_INIT},
+ {"modifiable", "ma", P_BOOL|P_VI_DEF|P_NOGLOB,
+ (char_u *)&p_ma, PV_MA,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_mod, PV_MOD,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"more", NULL, P_BOOL|P_VIM,
+ (char_u *)&p_more, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+ {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST,
+ (char_u *)&p_mouse, PV_NONE,
+ {
+***************
+*** 1970,1990 ****
+ #else
+ (char_u *)"",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"mousefocus", "mousef", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_GUI
+ (char_u *)&p_mousef, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"mousehide", "mh", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_GUI
+ (char_u *)&p_mh, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"mousemodel", "mousem", P_STRING|P_VI_DEF,
+ (char_u *)&p_mousem, PV_NONE,
+ {
+--- 1970,1990 ----
+ #else
+ (char_u *)"",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"mousefocus", "mousef", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_GUI
+ (char_u *)&p_mousef, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"mousehide", "mh", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_GUI
+ (char_u *)&p_mh, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"mousemodel", "mousem", P_STRING|P_VI_DEF,
+ (char_u *)&p_mousem, PV_NONE,
+ {
+***************
+*** 1997,2003 ****
+ (char_u *)"extend",
+ # endif
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_MOUSESHAPE
+ (char_u *)&p_mouseshape, PV_NONE,
+--- 1997,2003 ----
+ (char_u *)"extend",
+ # endif
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_MOUSESHAPE
+ (char_u *)&p_mouseshape, PV_NONE,
+***************
+*** 2006,2015 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"mousetime", "mouset", P_NUM|P_VI_DEF,
+ (char_u *)&p_mouset, PV_NONE,
+! {(char_u *)500L, (char_u *)0L} SCRIPTID_INIT},
+ {"mzschemedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_MZSCHEME)
+ (char_u *)&p_mzschemedll, PV_NONE,
+--- 2006,2015 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"mousetime", "mouset", P_NUM|P_VI_DEF,
+ (char_u *)&p_mouset, PV_NONE,
+! {(char_u *)500L, (char_u *)0L} SCTX_INIT},
+ {"mzschemedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_MZSCHEME)
+ (char_u *)&p_mzschemedll, PV_NONE,
+***************
+*** 2018,2024 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"mzschemegcdll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_MZSCHEME)
+ (char_u *)&p_mzschemegcdll, PV_NONE,
+--- 2018,2024 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"mzschemegcdll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_MZSCHEME)
+ (char_u *)&p_mzschemegcdll, PV_NONE,
+***************
+*** 2027,2057 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"mzquantum", "mzq", P_NUM,
+ #ifdef FEAT_MZSCHEME
+ (char_u *)&p_mzq, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)100L, (char_u *)100L} SCRIPTID_INIT},
+ {"novice", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"nrformats", "nf", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_nf, PV_NF,
+ {(char_u *)"bin,octal,hex", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_NU,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)VAR_WIN, PV_NUW,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)8L, (char_u *)4L} SCRIPTID_INIT},
+ {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_COMPL_FUNC
+ (char_u *)&p_ofu, PV_OFU,
+--- 2027,2057 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"mzquantum", "mzq", P_NUM,
+ #ifdef FEAT_MZSCHEME
+ (char_u *)&p_mzq, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)100L, (char_u *)100L} SCTX_INIT},
+ {"novice", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"nrformats", "nf", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_nf, PV_NF,
+ {(char_u *)"bin,octal,hex", (char_u *)0L}
+! SCTX_INIT},
+ {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_NU,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)VAR_WIN, PV_NUW,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)8L, (char_u *)4L} SCTX_INIT},
+ {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_COMPL_FUNC
+ (char_u *)&p_ofu, PV_OFU,
+***************
+*** 2060,2069 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"open", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"opendevice", "odev", P_BOOL|P_VI_DEF,
+ #if defined(MSWIN)
+ (char_u *)&p_odev, PV_NONE,
+--- 2060,2069 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"open", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"opendevice", "odev", P_BOOL|P_VI_DEF,
+ #if defined(MSWIN)
+ (char_u *)&p_odev, PV_NONE,
+***************
+*** 2071,2101 ****
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)FALSE, (char_u *)FALSE}
+! SCRIPTID_INIT},
+ {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_opfunc, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"optimize", "opt", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"packpath", "pp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP
+ |P_SECURE,
+ (char_u *)&p_pp, PV_NONE,
+ {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"paragraphs", "para", P_STRING|P_VI_DEF,
+ (char_u *)&p_para, PV_NONE,
+ {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp",
+! (char_u *)0L} SCRIPTID_INIT},
+ {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC,
+ (char_u *)&p_paste, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"pastetoggle", "pt", P_STRING|P_VI_DEF,
+ (char_u *)&p_pt, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"patchexpr", "pex", P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
+ (char_u *)&p_pex, PV_NONE,
+--- 2071,2101 ----
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)FALSE, (char_u *)FALSE}
+! SCTX_INIT},
+ {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_opfunc, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"optimize", "opt", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"packpath", "pp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP
+ |P_SECURE,
+ (char_u *)&p_pp, PV_NONE,
+ {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}
+! SCTX_INIT},
+ {"paragraphs", "para", P_STRING|P_VI_DEF,
+ (char_u *)&p_para, PV_NONE,
+ {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp",
+! (char_u *)0L} SCTX_INIT},
+ {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC,
+ (char_u *)&p_paste, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"pastetoggle", "pt", P_STRING|P_VI_DEF,
+ (char_u *)&p_pt, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"patchexpr", "pex", P_STRING|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
+ (char_u *)&p_pex, PV_NONE,
+***************
+*** 2104,2113 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME,
+ (char_u *)&p_pm, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_path, PV_PATH,
+ {
+--- 2104,2113 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME,
+ (char_u *)&p_pm, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
+ (char_u *)&p_path, PV_PATH,
+ {
+***************
+*** 2116,2122 ****
+ #else
+ (char_u *)".,/usr/include,,",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"perldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_PERL)
+ (char_u *)&p_perldll, PV_NONE,
+--- 2116,2122 ----
+ #else
+ (char_u *)".,/usr/include,,",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"perldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_PERL)
+ (char_u *)&p_perldll, PV_NONE,
+***************
+*** 2125,2148 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_pi, PV_PI,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"previewheight", "pvh", P_NUM|P_VI_DEF,
+ #if defined(FEAT_QUICKFIX)
+ (char_u *)&p_pvh, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT},
+ {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
+ #if defined(FEAT_QUICKFIX)
+ (char_u *)VAR_WIN, PV_PVW,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_pdev, PV_NONE,
+--- 2125,2148 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_pi, PV_PI,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"previewheight", "pvh", P_NUM|P_VI_DEF,
+ #if defined(FEAT_QUICKFIX)
+ (char_u *)&p_pvh, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)12L, (char_u *)0L} SCTX_INIT},
+ {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
+ #if defined(FEAT_QUICKFIX)
+ (char_u *)VAR_WIN, PV_PVW,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_pdev, PV_NONE,
+***************
+*** 2151,2157 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"printencoding", "penc", P_STRING|P_VI_DEF,
+ #ifdef FEAT_POSTSCRIPT
+ (char_u *)&p_penc, PV_NONE,
+--- 2151,2157 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"printencoding", "penc", P_STRING|P_VI_DEF,
+ #ifdef FEAT_POSTSCRIPT
+ (char_u *)&p_penc, PV_NONE,
+***************
+*** 2160,2166 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_POSTSCRIPT
+ (char_u *)&p_pexpr, PV_NONE,
+--- 2160,2166 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_POSTSCRIPT
+ (char_u *)&p_pexpr, PV_NONE,
+***************
+*** 2169,2175 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"printfont", "pfn", P_STRING|P_VI_DEF,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_pfn, PV_NONE,
+--- 2169,2175 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"printfont", "pfn", P_STRING|P_VI_DEF,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_pfn, PV_NONE,
+***************
+*** 2184,2190 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_header, PV_NONE,
+--- 2184,2190 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_header, PV_NONE,
+***************
+*** 2195,2201 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF,
+ #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
+ (char_u *)&p_pmcs, PV_NONE,
+--- 2195,2201 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF,
+ #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
+ (char_u *)&p_pmcs, PV_NONE,
+***************
+*** 2204,2210 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"printmbfont", "pmbfn", P_STRING|P_VI_DEF,
+ #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
+ (char_u *)&p_pmfn, PV_NONE,
+--- 2204,2210 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"printmbfont", "pmbfn", P_STRING|P_VI_DEF,
+ #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE)
+ (char_u *)&p_pmfn, PV_NONE,
+***************
+*** 2213,2219 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"printoptions", "popt", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_popt, PV_NONE,
+--- 2213,2219 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"printoptions", "popt", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_PRINTER
+ (char_u *)&p_popt, PV_NONE,
+***************
+*** 2222,2245 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"prompt", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_prompt, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"pumheight", "ph", P_NUM|P_VI_DEF,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_ph, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"pumwidth", "pw", P_NUM|P_VI_DEF,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_pw, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)15L, (char_u *)15L} SCRIPTID_INIT},
+ {"pythonthreedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_PYTHON3)
+ (char_u *)&p_py3dll, PV_NONE,
+--- 2222,2245 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"prompt", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_prompt, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"pumheight", "ph", P_NUM|P_VI_DEF,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_ph, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"pumwidth", "pw", P_NUM|P_VI_DEF,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_pw, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)15L, (char_u *)15L} SCTX_INIT},
+ {"pythonthreedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_PYTHON3)
+ (char_u *)&p_py3dll, PV_NONE,
+***************
+*** 2248,2254 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"pythonthreehome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_PYTHON3)
+ (char_u *)&p_py3home, PV_NONE,
+--- 2248,2254 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"pythonthreehome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_PYTHON3)
+ (char_u *)&p_py3home, PV_NONE,
+***************
+*** 2257,2263 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_PYTHON)
+ (char_u *)&p_pydll, PV_NONE,
+--- 2257,2263 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_PYTHON)
+ (char_u *)&p_pydll, PV_NONE,
+***************
+*** 2266,2272 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"pythonhome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_PYTHON)
+ (char_u *)&p_pyhome, PV_NONE,
+--- 2266,2272 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"pythonhome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_PYTHON)
+ (char_u *)&p_pyhome, PV_NONE,
+***************
+*** 2275,2281 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"pyxversion", "pyx", P_NUM|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
+ (char_u *)&p_pyx, PV_NONE,
+--- 2275,2281 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"pyxversion", "pyx", P_NUM|P_VI_DEF|P_SECURE,
+ #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
+ (char_u *)&p_pyx, PV_NONE,
+***************
+*** 2283,2289 ****
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)DEFAULT_PYTHON_VER, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_TEXTOBJ
+ (char_u *)&p_qe, PV_QE,
+--- 2283,2289 ----
+ (char_u *)NULL, PV_NONE,
+ #endif
+ {(char_u *)DEFAULT_PYTHON_VER, (char_u *)0L}
+! SCTX_INIT},
+ {"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
+ #ifdef FEAT_TEXTOBJ
+ (char_u *)&p_qe, PV_QE,
+***************
+*** 2292,2320 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
+ (char_u *)&p_ro, PV_RO,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"redraw", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"redrawtime", "rdt", P_NUM|P_VI_DEF,
+ #ifdef FEAT_RELTIME
+ (char_u *)&p_rdt, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)2000L, (char_u *)0L} SCRIPTID_INIT},
+ {"regexpengine", "re", P_NUM|P_VI_DEF,
+ (char_u *)&p_re, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_RNU,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"remap", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_remap, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"renderoptions", "rop", P_STRING|P_ONECOMMA|P_RCLR|P_VI_DEF,
+ #ifdef FEAT_RENDER_OPTIONS
+ (char_u *)&p_rop, PV_NONE,
+--- 2292,2320 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB,
+ (char_u *)&p_ro, PV_RO,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"redraw", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"redrawtime", "rdt", P_NUM|P_VI_DEF,
+ #ifdef FEAT_RELTIME
+ (char_u *)&p_rdt, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)2000L, (char_u *)0L} SCTX_INIT},
+ {"regexpengine", "re", P_NUM|P_VI_DEF,
+ (char_u *)&p_re, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_RNU,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"remap", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_remap, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"renderoptions", "rop", P_STRING|P_ONECOMMA|P_RCLR|P_VI_DEF,
+ #ifdef FEAT_RENDER_OPTIONS
+ (char_u *)&p_rop, PV_NONE,
+***************
+*** 2323,2353 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"report", NULL, P_NUM|P_VI_DEF,
+ (char_u *)&p_report, PV_NONE,
+! {(char_u *)2L, (char_u *)0L} SCRIPTID_INIT},
+ {"restorescreen", "rs", P_BOOL|P_VI_DEF,
+ #ifdef WIN3264
+ (char_u *)&p_rs, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"revins", "ri", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_ri, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"rightleft", "rl", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)VAR_WIN, PV_RL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"rightleftcmd", "rlc", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)VAR_WIN, PV_RLC,
+--- 2323,2353 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"report", NULL, P_NUM|P_VI_DEF,
+ (char_u *)&p_report, PV_NONE,
+! {(char_u *)2L, (char_u *)0L} SCTX_INIT},
+ {"restorescreen", "rs", P_BOOL|P_VI_DEF,
+ #ifdef WIN3264
+ (char_u *)&p_rs, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"revins", "ri", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)&p_ri, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"rightleft", "rl", P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)VAR_WIN, PV_RL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"rightleftcmd", "rlc", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_RIGHTLEFT
+ (char_u *)VAR_WIN, PV_RLC,
+***************
+*** 2356,2362 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"rubydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_RUBY)
+ (char_u *)&p_rubydll, PV_NONE,
+--- 2356,2362 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"rubydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_RUBY)
+ (char_u *)&p_rubydll, PV_NONE,
+***************
+*** 2365,2420 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
+ #ifdef FEAT_CMDL_INFO
+ (char_u *)&p_ru, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"rulerformat", "ruf", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_ruf, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"runtimepath", "rtp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP
+ |P_SECURE,
+ (char_u *)&p_rtp, PV_NONE,
+ {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}
+! SCRIPTID_INIT},
+ {"scroll", "scr", P_NUM|P_NO_MKRC|P_VI_DEF,
+ (char_u *)VAR_WIN, PV_SCROLL,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"scrollbind", "scb", P_BOOL|P_VI_DEF,
+ (char_u *)VAR_WIN, PV_SCBIND,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"scrolljump", "sj", P_NUM|P_VI_DEF|P_VIM,
+ (char_u *)&p_sj, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
+ {"scrolloff", "so", P_NUM|P_VI_DEF|P_VIM|P_RALL,
+ (char_u *)&p_so, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_sbo, PV_NONE,
+ {(char_u *)"ver,jump", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"sections", "sect", P_STRING|P_VI_DEF,
+ (char_u *)&p_sections, PV_NONE,
+ {(char_u *)"SHNHH HUnhsh", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"secure", NULL, P_BOOL|P_VI_DEF|P_SECURE,
+ (char_u *)&p_secure, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"selection", "sel", P_STRING|P_VI_DEF,
+ (char_u *)&p_sel, PV_NONE,
+ {(char_u *)"inclusive", (char_u *)0L}
+! SCRIPTID_INIT},
+ {"selectmode", "slm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_slm, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_SESSION
+ (char_u *)&p_ssop, PV_NONE,
+--- 2365,2420 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
+ #ifdef FEAT_CMDL_INFO
+ (char_u *)&p_ru, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"rulerformat", "ruf", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_ruf, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"runtimepath", "rtp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP
+ |P_SECURE,
+ (char_u *)&p_rtp, PV_NONE,
+ {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L}
+! SCTX_INIT},
+ {"scroll", "scr", P_NUM|P_NO_MKRC|P_VI_DEF,
+ (char_u *)VAR_WIN, PV_SCROLL,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"scrollbind", "scb", P_BOOL|P_VI_DEF,
+ (char_u *)VAR_WIN, PV_SCBIND,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"scrolljump", "sj", P_NUM|P_VI_DEF|P_VIM,
+ (char_u *)&p_sj, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCTX_INIT},
+ {"scrolloff", "so", P_NUM|P_VI_DEF|P_VIM|P_RALL,
+ (char_u *)&p_so, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_sbo, PV_NONE,
+ {(char_u *)"ver,jump", (char_u *)0L}
+! SCTX_INIT},
+ {"sections", "sect", P_STRING|P_VI_DEF,
+ (char_u *)&p_sections, PV_NONE,
+ {(char_u *)"SHNHH HUnhsh", (char_u *)0L}
+! SCTX_INIT},
+ {"secure", NULL, P_BOOL|P_VI_DEF|P_SECURE,
+ (char_u *)&p_secure, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"selection", "sel", P_STRING|P_VI_DEF,
+ (char_u *)&p_sel, PV_NONE,
+ {(char_u *)"inclusive", (char_u *)0L}
+! SCTX_INIT},
+ {"selectmode", "slm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_slm, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_SESSION
+ (char_u *)&p_ssop, PV_NONE,
+***************
+*** 2424,2430 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"shell", "sh", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sh, PV_NONE,
+ {
+--- 2424,2430 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"shell", "sh", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sh, PV_NONE,
+ {
+***************
+*** 2437,2443 ****
+ (char_u *)"sh",
+ # endif
+ #endif /* VMS */
+! (char_u *)0L} SCRIPTID_INIT},
+ {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_shcf, PV_NONE,
+ {
+--- 2437,2443 ----
+ (char_u *)"sh",
+ # endif
+ #endif /* VMS */
+! (char_u *)0L} SCTX_INIT},
+ {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_shcf, PV_NONE,
+ {
+***************
+*** 2446,2452 ****
+ #else
+ (char_u *)"-c",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"shellpipe", "sp", P_STRING|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_sp, PV_NONE,
+--- 2446,2452 ----
+ #else
+ (char_u *)"-c",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"shellpipe", "sp", P_STRING|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_QUICKFIX
+ (char_u *)&p_sp, PV_NONE,
+***************
+*** 2461,2490 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"shellquote", "shq", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_shq, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"shellredir", "srr", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_srr, PV_NONE,
+! {(char_u *)">", (char_u *)0L} SCRIPTID_INIT},
+ {"shellslash", "ssl", P_BOOL|P_VI_DEF,
+ #ifdef BACKSLASH_IN_FILENAME
+ (char_u *)&p_ssl, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"shelltemp", "stmp", P_BOOL,
+ (char_u *)&p_stmp, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
+ {"shelltype", "st", P_NUM|P_VI_DEF,
+ #ifdef AMIGA
+ (char_u *)&p_st, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"shellxquote", "sxq", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sxq, PV_NONE,
+ {
+--- 2461,2490 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"shellquote", "shq", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_shq, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"shellredir", "srr", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_srr, PV_NONE,
+! {(char_u *)">", (char_u *)0L} SCTX_INIT},
+ {"shellslash", "ssl", P_BOOL|P_VI_DEF,
+ #ifdef BACKSLASH_IN_FILENAME
+ (char_u *)&p_ssl, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"shelltemp", "stmp", P_BOOL,
+ (char_u *)&p_stmp, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+ {"shelltype", "st", P_NUM|P_VI_DEF,
+ #ifdef AMIGA
+ (char_u *)&p_st, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"shellxquote", "sxq", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sxq, PV_NONE,
+ {
+***************
+*** 2493,2499 ****
+ #else
+ (char_u *)"",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sxe, PV_NONE,
+ {
+--- 2493,2499 ----
+ #else
+ (char_u *)"",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
+ (char_u *)&p_sxe, PV_NONE,
+ {
+***************
+*** 2502,2528 ****
+ #else
+ (char_u *)"",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"shiftround", "sr", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_sr, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"shiftwidth", "sw", P_NUM|P_VI_DEF,
+ (char_u *)&p_sw, PV_SW,
+! {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
+ {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST,
+ (char_u *)&p_shm, PV_NONE,
+ {(char_u *)"", (char_u *)"filnxtToO"}
+! SCRIPTID_INIT},
+ {"shortname", "sn", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sn, PV_SN,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)&p_sbr, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"showcmd", "sc", P_BOOL|P_VIM,
+ #ifdef FEAT_CMDL_INFO
+ (char_u *)&p_sc, PV_NONE,
+--- 2502,2528 ----
+ #else
+ (char_u *)"",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"shiftround", "sr", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_sr, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"shiftwidth", "sw", P_NUM|P_VI_DEF,
+ (char_u *)&p_sw, PV_SW,
+! {(char_u *)8L, (char_u *)0L} SCTX_INIT},
+ {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST,
+ (char_u *)&p_shm, PV_NONE,
+ {(char_u *)"", (char_u *)"filnxtToO"}
+! SCTX_INIT},
+ {"shortname", "sn", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sn, PV_SN,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL,
+ #ifdef FEAT_LINEBREAK
+ (char_u *)&p_sbr, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"showcmd", "sc", P_BOOL|P_VIM,
+ #ifdef FEAT_CMDL_INFO
+ (char_u *)&p_sc, PV_NONE,
+***************
+*** 2535,2559 ****
+ #else
+ (char_u *)TRUE
+ #endif
+! } SCRIPTID_INIT},
+ {"showfulltag", "sft", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sft, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"showmatch", "sm", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sm, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"showmode", "smd", P_BOOL|P_VIM,
+ (char_u *)&p_smd, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
+ {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL,
+ (char_u *)&p_stal, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
+ {"sidescroll", "ss", P_NUM|P_VI_DEF,
+ (char_u *)&p_ss, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
+ (char_u *)&p_siso, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_SIGNS
+ (char_u *)VAR_WIN, PV_SCL,
+--- 2535,2559 ----
+ #else
+ (char_u *)TRUE
+ #endif
+! } SCTX_INIT},
+ {"showfulltag", "sft", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sft, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"showmatch", "sm", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sm, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"showmode", "smd", P_BOOL|P_VIM,
+ (char_u *)&p_smd, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+ {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL,
+ (char_u *)&p_stal, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCTX_INIT},
+ {"sidescroll", "ss", P_NUM|P_VI_DEF,
+ (char_u *)&p_ss, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
+ (char_u *)&p_siso, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_SIGNS
+ (char_u *)VAR_WIN, PV_SCL,
+***************
+*** 2562,2597 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"slowopen", "slow", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"smartcase", "scs", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_scs, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"smartindent", "si", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_SMARTINDENT
+ (char_u *)&p_si, PV_SI,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"smarttab", "sta", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_sta, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"softtabstop", "sts", P_NUM|P_VI_DEF|P_VIM,
+ (char_u *)&p_sts, PV_STS,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"sourceany", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_SPELL
+ (char_u *)VAR_WIN, PV_SPELL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF,
+ #ifdef FEAT_SPELL
+ (char_u *)&p_spc, PV_SPC,
+--- 2562,2597 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"slowopen", "slow", P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"smartcase", "scs", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_scs, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"smartindent", "si", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_SMARTINDENT
+ (char_u *)&p_si, PV_SI,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"smarttab", "sta", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_sta, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"softtabstop", "sts", P_NUM|P_VI_DEF|P_VIM,
+ (char_u *)&p_sts, PV_STS,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"sourceany", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN,
+ #ifdef FEAT_SPELL
+ (char_u *)VAR_WIN, PV_SPELL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF,
+ #ifdef FEAT_SPELL
+ (char_u *)&p_spc, PV_SPC,
+***************
+*** 2600,2606 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"spellfile", "spf", P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE
+ |P_ONECOMMA,
+ #ifdef FEAT_SPELL
+--- 2600,2606 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"spellfile", "spf", P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE
+ |P_ONECOMMA,
+ #ifdef FEAT_SPELL
+***************
+*** 2610,2616 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA
+ |P_RBUF|P_EXPAND,
+ #ifdef FEAT_SPELL
+--- 2610,2616 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA
+ |P_RBUF|P_EXPAND,
+ #ifdef FEAT_SPELL
+***************
+*** 2620,2626 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_ONECOMMA,
+ #ifdef FEAT_SPELL
+ (char_u *)&p_sps, PV_NONE,
+--- 2620,2626 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_ONECOMMA,
+ #ifdef FEAT_SPELL
+ (char_u *)&p_sps, PV_NONE,
+***************
+*** 2629,2655 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"splitbelow", "sb", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sb, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"splitright", "spr", P_BOOL|P_VI_DEF,
+ (char_u *)&p_spr, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"startofline", "sol", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_sol, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"statusline" ,"stl", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_stl, PV_STL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"suffixes", "su", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_su, PV_NONE,
+ {(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
+! (char_u *)0L} SCRIPTID_INIT},
+ {"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_SEARCHPATH
+ (char_u *)&p_sua, PV_SUA,
+--- 2629,2655 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"splitbelow", "sb", P_BOOL|P_VI_DEF,
+ (char_u *)&p_sb, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"splitright", "spr", P_BOOL|P_VI_DEF,
+ (char_u *)&p_spr, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"startofline", "sol", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_sol, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"statusline" ,"stl", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_stl, PV_STL,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"suffixes", "su", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_su, PV_NONE,
+ {(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
+! (char_u *)0L} SCTX_INIT},
+ {"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_SEARCHPATH
+ (char_u *)&p_sua, PV_SUA,
+***************
+*** 2658,2673 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_swf, PV_SWF,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"swapsync", "sws", P_STRING|P_VI_DEF,
+ (char_u *)&p_sws, PV_NONE,
+! {(char_u *)"fsync", (char_u *)0L} SCRIPTID_INIT},
+ {"switchbuf", "swb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_swb, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"synmaxcol", "smc", P_NUM|P_VI_DEF|P_RBUF,
+ #ifdef FEAT_SYN_HL
+ (char_u *)&p_smc, PV_SMC,
+--- 2658,2673 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)&p_swf, PV_SWF,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"swapsync", "sws", P_STRING|P_VI_DEF,
+ (char_u *)&p_sws, PV_NONE,
+! {(char_u *)"fsync", (char_u *)0L} SCTX_INIT},
+ {"switchbuf", "swb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_swb, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"synmaxcol", "smc", P_NUM|P_VI_DEF|P_RBUF,
+ #ifdef FEAT_SYN_HL
+ (char_u *)&p_smc, PV_SMC,
+***************
+*** 2676,2682 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
+ #ifdef FEAT_SYN_HL
+ (char_u *)&p_syn, PV_SYN,
+--- 2676,2682 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
+ #ifdef FEAT_SYN_HL
+ (char_u *)&p_syn, PV_SYN,
+***************
+*** 2685,2704 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"tabline", "tal", P_STRING|P_VI_DEF|P_RALL,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_tal, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"tabpagemax", "tpm", P_NUM|P_VI_DEF,
+ (char_u *)&p_tpm, PV_NONE,
+! {(char_u *)10L, (char_u *)0L} SCRIPTID_INIT},
+ {"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF,
+ (char_u *)&p_ts, PV_TS,
+! {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT},
+ {"tagbsearch", "tbs", P_BOOL|P_VI_DEF,
+ (char_u *)&p_tbs, PV_NONE,
+ #ifdef VMS /* binary searching doesn't appear to work on VMS */
+--- 2685,2704 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"tabline", "tal", P_STRING|P_VI_DEF|P_RALL,
+ #ifdef FEAT_STL_OPT
+ (char_u *)&p_tal, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"tabpagemax", "tpm", P_NUM|P_VI_DEF,
+ (char_u *)&p_tpm, PV_NONE,
+! {(char_u *)10L, (char_u *)0L} SCTX_INIT},
+ {"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF,
+ (char_u *)&p_ts, PV_TS,
+! {(char_u *)8L, (char_u *)0L} SCTX_INIT},
+ {"tagbsearch", "tbs", P_BOOL|P_VI_DEF,
+ (char_u *)&p_tbs, PV_NONE,
+ #ifdef VMS /* binary searching doesn't appear to work on VMS */
+***************
+*** 2706,2721 ****
+ #else
+ {(char_u *)TRUE, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"tagcase", "tc", P_STRING|P_VIM,
+ (char_u *)&p_tc, PV_TC,
+! {(char_u *)"followic", (char_u *)"followic"} SCRIPTID_INIT},
+ {"taglength", "tl", P_NUM|P_VI_DEF,
+ (char_u *)&p_tl, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"tagrelative", "tr", P_BOOL|P_VIM,
+ (char_u *)&p_tr, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
+ {"tags", "tag", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_tags, PV_TAGS,
+ {
+--- 2706,2721 ----
+ #else
+ {(char_u *)TRUE, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"tagcase", "tc", P_STRING|P_VIM,
+ (char_u *)&p_tc, PV_TC,
+! {(char_u *)"followic", (char_u *)"followic"} SCTX_INIT},
+ {"taglength", "tl", P_NUM|P_VI_DEF,
+ (char_u *)&p_tl, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"tagrelative", "tr", P_BOOL|P_VIM,
+ (char_u *)&p_tr, PV_NONE,
+! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
+ {"tags", "tag", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_tags, PV_TAGS,
+ {
+***************
+*** 2724,2733 ****
+ #else
+ (char_u *)"./tags,tags",
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"tagstack", "tgst", P_BOOL|P_VI_DEF,
+ (char_u *)&p_tgst, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"tcldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_TCL)
+ (char_u *)&p_tcldll, PV_NONE,
+--- 2724,2733 ----
+ #else
+ (char_u *)"./tags,tags",
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"tagstack", "tgst", P_BOOL|P_VI_DEF,
+ (char_u *)&p_tgst, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"tcldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(DYNAMIC_TCL)
+ (char_u *)&p_tcldll, PV_NONE,
+***************
+*** 2736,2752 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"term", NULL, P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
+ (char_u *)&T_NAME, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"termbidi", "tbidi", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_ARABIC
+ (char_u *)&p_tbidi, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_tenc, PV_NONE,
+--- 2736,2752 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"term", NULL, P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
+ (char_u *)&T_NAME, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"termbidi", "tbidi", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_ARABIC
+ (char_u *)&p_tbidi, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR,
+ #ifdef FEAT_MBYTE
+ (char_u *)&p_tenc, PV_NONE,
+***************
+*** 2755,2761 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"termguicolors", "tgc", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+ #ifdef FEAT_TERMGUICOLORS
+ (char_u *)&p_tgc, PV_NONE,
+--- 2755,2761 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"termguicolors", "tgc", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+ #ifdef FEAT_TERMGUICOLORS
+ (char_u *)&p_tgc, PV_NONE,
+***************
+*** 2764,2770 ****
+ (char_u*)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+ #endif
+! SCRIPTID_INIT},
+ {"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)VAR_WIN, PV_TWK,
+--- 2764,2770 ----
+ (char_u*)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+ #endif
+! SCTX_INIT},
+ {"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)VAR_WIN, PV_TWK,
+***************
+*** 2773,2779 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"termwinscroll", "twsl", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)&p_twsl, PV_TWSL,
+--- 2773,2779 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"termwinscroll", "twsl", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)&p_twsl, PV_TWSL,
+***************
+*** 2782,2788 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"termwinsize", "tws", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)VAR_WIN, PV_TWS,
+--- 2782,2788 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"termwinsize", "tws", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF,
+ #ifdef FEAT_TERMINAL
+ (char_u *)VAR_WIN, PV_TWS,
+***************
+*** 2791,2804 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"terse", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_terse, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"textauto", "ta", P_BOOL|P_VIM,
+ (char_u *)&p_ta, PV_NONE,
+ {(char_u *)DFLT_TEXTAUTO, (char_u *)TRUE}
+! SCRIPTID_INIT},
+ {"textmode", "tx", P_BOOL|P_VI_DEF|P_NO_MKRC,
+ (char_u *)&p_tx, PV_TX,
+ {
+--- 2791,2804 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"terse", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_terse, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"textauto", "ta", P_BOOL|P_VIM,
+ (char_u *)&p_ta, PV_NONE,
+ {(char_u *)DFLT_TEXTAUTO, (char_u *)TRUE}
+! SCTX_INIT},
+ {"textmode", "tx", P_BOOL|P_VI_DEF|P_NO_MKRC,
+ (char_u *)&p_tx, PV_TX,
+ {
+***************
+*** 2807,2846 ****
+ #else
+ (char_u *)FALSE,
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
+ (char_u *)&p_tw, PV_TW,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_tsr, PV_TSR,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"tildeop", "top", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_to, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"timeout", "to", P_BOOL|P_VI_DEF,
+ (char_u *)&p_timeout, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"timeoutlen", "tm", P_NUM|P_VI_DEF,
+ (char_u *)&p_tm, PV_NONE,
+! {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT},
+ {"title", NULL, P_BOOL|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_title, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"titlelen", NULL, P_NUM|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titlelen, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)85L, (char_u *)0L} SCRIPTID_INIT},
+ {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titleold, PV_NONE,
+--- 2807,2846 ----
+ #else
+ (char_u *)FALSE,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
+ (char_u *)&p_tw, PV_TW,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
+ #ifdef FEAT_INS_EXPAND
+ (char_u *)&p_tsr, PV_TSR,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"tildeop", "top", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_to, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"timeout", "to", P_BOOL|P_VI_DEF,
+ (char_u *)&p_timeout, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"timeoutlen", "tm", P_NUM|P_VI_DEF,
+ (char_u *)&p_tm, PV_NONE,
+! {(char_u *)1000L, (char_u *)0L} SCTX_INIT},
+ {"title", NULL, P_BOOL|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_title, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"titlelen", NULL, P_NUM|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titlelen, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)85L, (char_u *)0L} SCTX_INIT},
+ {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titleold, PV_NONE,
+***************
+*** 2850,2863 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"titlestring", NULL, P_STRING|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titlestring, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"toolbar", "tb", P_STRING|P_ONECOMMA|P_VI_DEF|P_NODUP,
+ #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ (char_u *)&p_toolbar, PV_NONE,
+--- 2850,2863 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"titlestring", NULL, P_STRING|P_VI_DEF,
+ #ifdef FEAT_TITLE
+ (char_u *)&p_titlestring, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"toolbar", "tb", P_STRING|P_ONECOMMA|P_VI_DEF|P_NODUP,
+ #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
+ (char_u *)&p_toolbar, PV_NONE,
+***************
+*** 2866,2872 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"toolbariconsize", "tbis", P_STRING|P_VI_DEF,
+ #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
+ (char_u *)&p_tbis, PV_NONE,
+--- 2866,2872 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"toolbariconsize", "tbis", P_STRING|P_VI_DEF,
+ #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
+ (char_u *)&p_tbis, PV_NONE,
+***************
+*** 2875,2906 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"ttimeout", NULL, P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_ttimeout, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"ttimeoutlen", "ttm", P_NUM|P_VI_DEF,
+ (char_u *)&p_ttm, PV_NONE,
+! {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
+ {"ttybuiltin", "tbi", P_BOOL|P_VI_DEF,
+ (char_u *)&p_tbi, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF,
+ (char_u *)&p_tf, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"ttymouse", "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF,
+ #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS))
+ (char_u *)&p_ttym, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"ttyscroll", "tsl", P_NUM|P_VI_DEF,
+ (char_u *)&p_ttyscroll, PV_NONE,
+! {(char_u *)999L, (char_u *)0L} SCRIPTID_INIT},
+ {"ttytype", "tty", P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
+ (char_u *)&T_NAME, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"undodir", "udir", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP|P_SECURE
+ |P_VI_DEF,
+ #ifdef FEAT_PERSISTENT_UNDO
+--- 2875,2906 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"ttimeout", NULL, P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_ttimeout, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"ttimeoutlen", "ttm", P_NUM|P_VI_DEF,
+ (char_u *)&p_ttm, PV_NONE,
+! {(char_u *)-1L, (char_u *)0L} SCTX_INIT},
+ {"ttybuiltin", "tbi", P_BOOL|P_VI_DEF,
+ (char_u *)&p_tbi, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF,
+ (char_u *)&p_tf, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"ttymouse", "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF,
+ #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS))
+ (char_u *)&p_ttym, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"ttyscroll", "tsl", P_NUM|P_VI_DEF,
+ (char_u *)&p_ttyscroll, PV_NONE,
+! {(char_u *)999L, (char_u *)0L} SCTX_INIT},
+ {"ttytype", "tty", P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
+ (char_u *)&T_NAME, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"undodir", "udir", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP|P_SECURE
+ |P_VI_DEF,
+ #ifdef FEAT_PERSISTENT_UNDO
+***************
+*** 2910,2923 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"undofile", "udf", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_PERSISTENT_UNDO
+ (char_u *)&p_udf, PV_UDF,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"undolevels", "ul", P_NUM|P_VI_DEF,
+ (char_u *)&p_ul, PV_UL,
+ {
+--- 2910,2923 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"undofile", "udf", P_BOOL|P_VI_DEF|P_VIM,
+ #ifdef FEAT_PERSISTENT_UNDO
+ (char_u *)&p_udf, PV_UDF,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"undolevels", "ul", P_NUM|P_VI_DEF,
+ (char_u *)&p_ul, PV_UL,
+ {
+***************
+*** 2926,2941 ****
+ #else
+ (char_u *)100L,
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"undoreload", "ur", P_NUM|P_VI_DEF,
+ (char_u *)&p_ur, PV_NONE,
+! { (char_u *)10000L, (char_u *)0L} SCRIPTID_INIT},
+ {"updatecount", "uc", P_NUM|P_VI_DEF,
+ (char_u *)&p_uc, PV_NONE,
+! {(char_u *)200L, (char_u *)0L} SCRIPTID_INIT},
+ {"updatetime", "ut", P_NUM|P_VI_DEF,
+ (char_u *)&p_ut, PV_NONE,
+! {(char_u *)4000L, (char_u *)0L} SCRIPTID_INIT},
+ {"varsofttabstop", "vsts", P_STRING|P_VI_DEF|P_VIM|P_COMMA,
+ #ifdef FEAT_VARTABS
+ (char_u *)&p_vsts, PV_VSTS,
+--- 2926,2941 ----
+ #else
+ (char_u *)100L,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"undoreload", "ur", P_NUM|P_VI_DEF,
+ (char_u *)&p_ur, PV_NONE,
+! { (char_u *)10000L, (char_u *)0L} SCTX_INIT},
+ {"updatecount", "uc", P_NUM|P_VI_DEF,
+ (char_u *)&p_uc, PV_NONE,
+! {(char_u *)200L, (char_u *)0L} SCTX_INIT},
+ {"updatetime", "ut", P_NUM|P_VI_DEF,
+ (char_u *)&p_ut, PV_NONE,
+! {(char_u *)4000L, (char_u *)0L} SCTX_INIT},
+ {"varsofttabstop", "vsts", P_STRING|P_VI_DEF|P_VIM|P_COMMA,
+ #ifdef FEAT_VARTABS
+ (char_u *)&p_vsts, PV_VSTS,
+***************
+*** 2944,2950 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCRIPTID_INIT},
+ {"vartabstop", "vts", P_STRING|P_VI_DEF|P_VIM|P_RBUF|P_COMMA,
+ #ifdef FEAT_VARTABS
+ (char_u *)&p_vts, PV_VTS,
+--- 2944,2950 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCTX_INIT},
+ {"vartabstop", "vts", P_STRING|P_VI_DEF|P_VIM|P_RBUF|P_COMMA,
+ #ifdef FEAT_VARTABS
+ (char_u *)&p_vts, PV_VTS,
+***************
+*** 2953,2965 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCRIPTID_INIT},
+ {"verbose", "vbs", P_NUM|P_VI_DEF,
+ (char_u *)&p_verbose, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"verbosefile", "vfile", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_vfile, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"viewdir", "vdir", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_SESSION
+ (char_u *)&p_vdir, PV_NONE,
+--- 2953,2965 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+ #endif
+! SCTX_INIT},
+ {"verbose", "vbs", P_NUM|P_VI_DEF,
+ (char_u *)&p_verbose, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"verbosefile", "vfile", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ (char_u *)&p_vfile, PV_NONE,
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"viewdir", "vdir", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #ifdef FEAT_SESSION
+ (char_u *)&p_vdir, PV_NONE,
+***************
+*** 2968,2974 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"viewoptions", "vop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_SESSION
+ (char_u *)&p_vop, PV_NONE,
+--- 2968,2974 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"viewoptions", "vop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_SESSION
+ (char_u *)&p_vop, PV_NONE,
+***************
+*** 2978,2984 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE,
+ #ifdef FEAT_VIMINFO
+ (char_u *)&p_viminfo, PV_NONE,
+--- 2978,2984 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE,
+ #ifdef FEAT_VIMINFO
+ (char_u *)&p_viminfo, PV_NONE,
+***************
+*** 2996,3002 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"viminfofile", "vif", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP
+ |P_SECURE|P_VI_DEF,
+ #ifdef FEAT_VIMINFO
+--- 2996,3002 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"viminfofile", "vif", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP
+ |P_SECURE|P_VI_DEF,
+ #ifdef FEAT_VIMINFO
+***************
+*** 3006,3012 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"virtualedit", "ve", P_STRING|P_ONECOMMA|P_NODUP|P_VI_DEF
+ |P_VIM|P_CURSWANT,
+ #ifdef FEAT_VIRTUALEDIT
+--- 3006,3012 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"virtualedit", "ve", P_STRING|P_ONECOMMA|P_NODUP|P_VI_DEF
+ |P_VIM|P_CURSWANT,
+ #ifdef FEAT_VIRTUALEDIT
+***************
+*** 3016,3070 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"visualbell", "vb", P_BOOL|P_VI_DEF,
+ (char_u *)&p_vb, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"w300", NULL, P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"w1200", NULL, P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"w9600", NULL, P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"warn", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_warn, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"weirdinvert", "wiv", P_BOOL|P_VI_DEF|P_RCLR,
+ (char_u *)&p_wiv, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"whichwrap", "ww", P_STRING|P_VIM|P_ONECOMMA|P_FLAGLIST,
+ (char_u *)&p_ww, PV_NONE,
+! {(char_u *)"", (char_u *)"b,s"} SCRIPTID_INIT},
+ {"wildchar", "wc", P_NUM|P_VIM,
+ (char_u *)&p_wc, PV_NONE,
+ {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB}
+! SCRIPTID_INIT},
+ {"wildcharm", "wcm", P_NUM|P_VI_DEF,
+ (char_u *)&p_wcm, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"wildignore", "wig", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_WILDIGN
+ (char_u *)&p_wig, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+ {"wildignorecase", "wic", P_BOOL|P_VI_DEF,
+ (char_u *)&p_wic, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"wildmenu", "wmnu", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_WILDMENU
+ (char_u *)&p_wmnu, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"wildmode", "wim", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_wim, PV_NONE,
+! {(char_u *)"full", (char_u *)0L} SCRIPTID_INIT},
+ {"wildoptions", "wop", P_STRING|P_VI_DEF,
+ #ifdef FEAT_CMDL_COMPL
+ (char_u *)&p_wop, PV_NONE,
+--- 3016,3070 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"visualbell", "vb", P_BOOL|P_VI_DEF,
+ (char_u *)&p_vb, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"w300", NULL, P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"w1200", NULL, P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"w9600", NULL, P_NUM|P_VI_DEF,
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"warn", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_warn, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"weirdinvert", "wiv", P_BOOL|P_VI_DEF|P_RCLR,
+ (char_u *)&p_wiv, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"whichwrap", "ww", P_STRING|P_VIM|P_ONECOMMA|P_FLAGLIST,
+ (char_u *)&p_ww, PV_NONE,
+! {(char_u *)"", (char_u *)"b,s"} SCTX_INIT},
+ {"wildchar", "wc", P_NUM|P_VIM,
+ (char_u *)&p_wc, PV_NONE,
+ {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB}
+! SCTX_INIT},
+ {"wildcharm", "wcm", P_NUM|P_VI_DEF,
+ (char_u *)&p_wcm, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"wildignore", "wig", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ #ifdef FEAT_WILDIGN
+ (char_u *)&p_wig, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+ {"wildignorecase", "wic", P_BOOL|P_VI_DEF,
+ (char_u *)&p_wic, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"wildmenu", "wmnu", P_BOOL|P_VI_DEF,
+ #ifdef FEAT_WILDMENU
+ (char_u *)&p_wmnu, PV_NONE,
+ #else
+ (char_u *)NULL, PV_NONE,
+ #endif
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"wildmode", "wim", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ (char_u *)&p_wim, PV_NONE,
+! {(char_u *)"full", (char_u *)0L} SCTX_INIT},
+ {"wildoptions", "wop", P_STRING|P_VI_DEF,
+ #ifdef FEAT_CMDL_COMPL
+ (char_u *)&p_wop, PV_NONE,
+***************
+*** 3073,3079 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"winaltkeys", "wak", P_STRING|P_VI_DEF,
+ #ifdef FEAT_WAK
+ (char_u *)&p_wak, PV_NONE,
+--- 3073,3079 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"winaltkeys", "wak", P_STRING|P_VI_DEF,
+ #ifdef FEAT_WAK
+ (char_u *)&p_wak, PV_NONE,
+***************
+*** 3082,3106 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"window", "wi", P_NUM|P_VI_DEF,
+ (char_u *)&p_window, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"winheight", "wh", P_NUM|P_VI_DEF,
+ (char_u *)&p_wh, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
+ {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)VAR_WIN, PV_WFH,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)VAR_WIN, PV_WFW,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"winminheight", "wmh", P_NUM|P_VI_DEF,
+ (char_u *)&p_wmh, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
+ {"winminwidth", "wmw", P_NUM|P_VI_DEF,
+ (char_u *)&p_wmw, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT},
+ {"winptydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(WIN3264) && defined(FEAT_TERMINAL)
+ (char_u *)&p_winptydll, PV_NONE, {
+--- 3082,3106 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"window", "wi", P_NUM|P_VI_DEF,
+ (char_u *)&p_window, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"winheight", "wh", P_NUM|P_VI_DEF,
+ (char_u *)&p_wh, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCTX_INIT},
+ {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)VAR_WIN, PV_WFH,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT,
+ (char_u *)VAR_WIN, PV_WFW,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"winminheight", "wmh", P_NUM|P_VI_DEF,
+ (char_u *)&p_wmh, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCTX_INIT},
+ {"winminwidth", "wmw", P_NUM|P_VI_DEF,
+ (char_u *)&p_wmw, PV_NONE,
+! {(char_u *)1L, (char_u *)0L} SCTX_INIT},
+ {"winptydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+ #if defined(WIN3264) && defined(FEAT_TERMINAL)
+ (char_u *)&p_winptydll, PV_NONE, {
+***************
+*** 3114,3138 ****
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCRIPTID_INIT},
+ {"winwidth", "wiw", P_NUM|P_VI_DEF,
+ (char_u *)&p_wiw, PV_NONE,
+! {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
+ {"wrap", NULL, P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_WRAP,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"wrapmargin", "wm", P_NUM|P_VI_DEF,
+ (char_u *)&p_wm, PV_WM,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+ {"wrapscan", "ws", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ws, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"write", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_write, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+ {"writeany", "wa", P_BOOL|P_VI_DEF,
+ (char_u *)&p_wa, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"writebackup", "wb", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_wb, PV_NONE,
+ {
+--- 3114,3138 ----
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"winwidth", "wiw", P_NUM|P_VI_DEF,
+ (char_u *)&p_wiw, PV_NONE,
+! {(char_u *)20L, (char_u *)0L} SCTX_INIT},
+ {"wrap", NULL, P_BOOL|P_VI_DEF|P_RWIN,
+ (char_u *)VAR_WIN, PV_WRAP,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"wrapmargin", "wm", P_NUM|P_VI_DEF,
+ (char_u *)&p_wm, PV_WM,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+ {"wrapscan", "ws", P_BOOL|P_VI_DEF,
+ (char_u *)&p_ws, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"write", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_write, PV_NONE,
+! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT},
+ {"writeany", "wa", P_BOOL|P_VI_DEF,
+ (char_u *)&p_wa, PV_NONE,
+! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+ {"writebackup", "wb", P_BOOL|P_VI_DEF|P_VIM,
+ (char_u *)&p_wb, PV_NONE,
+ {
+***************
+*** 3141,3155 ****
+ #else
+ (char_u *)FALSE,
+ #endif
+! (char_u *)0L} SCRIPTID_INIT},
+ {"writedelay", "wd", P_NUM|P_VI_DEF,
+ (char_u *)&p_wd, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+
+ /* terminal output codes */
+ #define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
+ (char_u *)&vvv, PV_NONE, \
+! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+
+ p_term("t_AB", T_CAB)
+ p_term("t_AF", T_CAF)
+--- 3141,3155 ----
+ #else
+ (char_u *)FALSE,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"writedelay", "wd", P_NUM|P_VI_DEF,
+ (char_u *)&p_wd, PV_NONE,
+! {(char_u *)0L, (char_u *)0L} SCTX_INIT},
+
+ /* terminal output codes */
+ #define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
+ (char_u *)&vvv, PV_NONE, \
+! {(char_u *)"", (char_u *)0L} SCTX_INIT},
+
+ p_term("t_AB", T_CAB)
+ p_term("t_AF", T_CAF)
+***************
+*** 3233,3239 ****
+ /* terminal key codes are not in here */
+
+ /* end marker */
+! {NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCRIPTID_INIT}
+ };
+
+ #define PARAM_COUNT (sizeof(options) / sizeof(struct vimoption))
+--- 3233,3239 ----
+ /* terminal key codes are not in here */
+
+ /* end marker */
+! {NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCTX_INIT}
+ };
+
+ #define PARAM_COUNT (sizeof(options) / sizeof(struct vimoption))
+***************
+*** 3314,3320 ****
+ static char_u *compile_cap_prog(synblock_T *synblock);
+ #endif
+ #ifdef FEAT_EVAL
+! static void set_option_scriptID_idx(int opt_idx, int opt_flags, int id);
+ #endif
+ static char_u *set_bool_option(int opt_idx, char_u *varp, int value, int opt_flags);
+ static char_u *set_num_option(int opt_idx, char_u *varp, long value, char_u *errbuf, size_t errbuflen, int opt_flags);
+--- 3314,3320 ----
+ static char_u *compile_cap_prog(synblock_T *synblock);
+ #endif
+ #ifdef FEAT_EVAL
+! static void set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx);
+ #endif
+ static char_u *set_bool_option(int opt_idx, char_u *varp, int value, int opt_flags);
+ static char_u *set_num_option(int opt_idx, char_u *varp, long value, char_u *errbuf, size_t errbuflen, int opt_flags);
+***************
+*** 3854,3860 ****
+ }
+
+ #ifdef FEAT_EVAL
+! set_option_scriptID_idx(opt_idx, opt_flags, current_SID);
+ #endif
+ }
+
+--- 3854,3860 ----
+ }
+
+ #ifdef FEAT_EVAL
+! set_option_sctx_idx(opt_idx, opt_flags, current_sctx);
+ #endif
+ }
+
+***************
+*** 4679,4690 ****
+ {
+ /* Mention where the option was last set. */
+ if (varp == options[opt_idx].var)
+! last_set_msg(options[opt_idx].scriptID);
+ else if ((int)options[opt_idx].indir & PV_WIN)
+! last_set_msg(curwin->w_p_scriptID[
+ (int)options[opt_idx].indir & PV_MASK]);
+ else if ((int)options[opt_idx].indir & PV_BUF)
+! last_set_msg(curbuf->b_p_scriptID[
+ (int)options[opt_idx].indir & PV_MASK]);
+ }
+ #endif
+--- 4679,4690 ----
+ {
+ /* Mention where the option was last set. */
+ if (varp == options[opt_idx].var)
+! last_set_msg(options[opt_idx].script_ctx);
+ else if ((int)options[opt_idx].indir & PV_WIN)
+! last_set_msg(curwin->w_p_script_ctx[
+ (int)options[opt_idx].indir & PV_MASK]);
+ else if ((int)options[opt_idx].indir & PV_BUF)
+! last_set_msg(curbuf->b_p_script_ctx[
+ (int)options[opt_idx].indir & PV_MASK]);
+ }
+ #endif
+***************
+*** 5889,5896 ****
+ * Set a string option to a new value (without checking the effect).
+ * The string is copied into allocated memory.
+ * if ("opt_idx" == -1) "name" is used, otherwise "opt_idx" is used.
+! * When "set_sid" is zero set the scriptID to current_SID. When "set_sid" is
+! * SID_NONE don't set the scriptID. Otherwise set the scriptID to "set_sid".
+ */
+ void
+ set_string_option_direct(
+--- 5889,5897 ----
+ * Set a string option to a new value (without checking the effect).
+ * The string is copied into allocated memory.
+ * if ("opt_idx" == -1) "name" is used, otherwise "opt_idx" is used.
+! * When "set_sid" is zero set the scriptID to current_sctx.sc_sid. When
+! * "set_sid" is SID_NONE don't set the scriptID. Otherwise set the scriptID to
+! * "set_sid".
+ */
+ void
+ set_string_option_direct(
+***************
+*** 5943,5950 ****
+ }
+ # ifdef FEAT_EVAL
+ if (set_sid != SID_NONE)
+! set_option_scriptID_idx(idx, opt_flags,
+! set_sid == 0 ? current_SID : set_sid);
+ # endif
+ }
+ }
+--- 5944,5961 ----
+ }
+ # ifdef FEAT_EVAL
+ if (set_sid != SID_NONE)
+! {
+! sctx_T script_ctx;
+!
+! if (set_sid == 0)
+! script_ctx = current_sctx;
+! else
+! {
+! script_ctx.sc_sid = set_sid;
+! script_ctx.sc_lnum = 0;
+! }
+! set_option_sctx_idx(idx, opt_flags, script_ctx);
+! }
+ # endif
+ }
+ }
+***************
+*** 7656,7662 ****
+ {
+ #ifdef FEAT_EVAL
+ /* Remember where the option was set. */
+! set_option_scriptID_idx(opt_idx, opt_flags, current_SID);
+ #endif
+ /*
+ * Free string options that are in allocated memory.
+--- 7667,7673 ----
+ {
+ #ifdef FEAT_EVAL
+ /* Remember where the option was set. */
+! set_option_sctx_idx(opt_idx, opt_flags, current_sctx);
+ #endif
+ /*
+ * Free string options that are in allocated memory.
+***************
+*** 8215,8239 ****
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+! * Set the scriptID for an option, taking care of setting the buffer- or
+ * window-local value.
+ */
+ static void
+! set_option_scriptID_idx(int opt_idx, int opt_flags, int id)
+ {
+ int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
+ int indir = (int)options[opt_idx].indir;
+
+ /* Remember where the option was set. For local options need to do that
+ * in the buffer or window structure. */
+ if (both || (opt_flags & OPT_GLOBAL) || (indir & (PV_BUF|PV_WIN)) == 0)
+! options[opt_idx].scriptID = id;
+ if (both || (opt_flags & OPT_LOCAL))
+ {
+ if (indir & PV_BUF)
+! curbuf->b_p_scriptID[indir & PV_MASK] = id;
+ else if (indir & PV_WIN)
+! curwin->w_p_scriptID[indir & PV_MASK] = id;
+ }
+ }
+ #endif
+--- 8226,8253 ----
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ /*
+! * Set the script_ctx for an option, taking care of setting the buffer- or
+ * window-local value.
+ */
+ static void
+! set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx)
+ {
+ int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
+ int indir = (int)options[opt_idx].indir;
++ sctx_T new_script_ctx = script_ctx;
++
++ new_script_ctx.sc_lnum += sourcing_lnum;
+
+ /* Remember where the option was set. For local options need to do that
+ * in the buffer or window structure. */
+ if (both || (opt_flags & OPT_GLOBAL) || (indir & (PV_BUF|PV_WIN)) == 0)
+! options[opt_idx].script_ctx = new_script_ctx;
+ if (both || (opt_flags & OPT_LOCAL))
+ {
+ if (indir & PV_BUF)
+! curbuf->b_p_script_ctx[indir & PV_MASK] = new_script_ctx;
+ else if (indir & PV_WIN)
+! curwin->w_p_script_ctx[indir & PV_MASK] = new_script_ctx;
+ }
+ }
+ #endif
+***************
+*** 8262,8268 ****
+ *(int *)varp = value; /* set the new value */
+ #ifdef FEAT_EVAL
+ /* Remember where the option was set. */
+! set_option_scriptID_idx(opt_idx, opt_flags, current_SID);
+ #endif
+
+ #ifdef FEAT_GUI
+--- 8276,8282 ----
+ *(int *)varp = value; /* set the new value */
+ #ifdef FEAT_EVAL
+ /* Remember where the option was set. */
+! set_option_sctx_idx(opt_idx, opt_flags, current_sctx);
+ #endif
+
+ #ifdef FEAT_GUI
+***************
+*** 8898,8904 ****
+ *pp = value;
+ #ifdef FEAT_EVAL
+ /* Remember where the option was set. */
+! set_option_scriptID_idx(opt_idx, opt_flags, current_SID);
+ #endif
+ #ifdef FEAT_GUI
+ need_mouse_correct = TRUE;
+--- 8912,8918 ----
+ *pp = value;
+ #ifdef FEAT_EVAL
+ /* Remember where the option was set. */
+! set_option_sctx_idx(opt_idx, opt_flags, current_sctx);
+ #endif
+ #ifdef FEAT_GUI
+ need_mouse_correct = TRUE;
+*** ../vim-8.1.0361/src/proto/eval.pro 2018-08-01 19:05:59.278223228 +0200
+--- src/proto/eval.pro 2018-09-10 19:45:33.380367357 +0200
+***************
+*** 119,125 ****
+ int read_viminfo_varlist(vir_T *virp, int writing);
+ void write_viminfo_varlist(FILE *fp);
+ int store_session_globals(FILE *fd);
+! void last_set_msg(scid_T scriptID);
+ void reset_v_option_vars(void);
+ void prepare_assert_error(garray_T *gap);
+ void assert_error(garray_T *gap);
+--- 119,125 ----
+ int read_viminfo_varlist(vir_T *virp, int writing);
+ void write_viminfo_varlist(FILE *fp);
+ int store_session_globals(FILE *fd);
+! void last_set_msg(sctx_T script_ctx);
+ void reset_v_option_vars(void);
+ void prepare_assert_error(garray_T *gap);
+ void assert_error(garray_T *gap);
+*** ../vim-8.1.0361/src/structs.h 2018-09-10 17:50:32.713306941 +0200
+--- src/structs.h 2018-09-10 20:18:06.669433878 +0200
+***************
+*** 75,80 ****
+--- 75,93 ----
+ #endif
+
+ /*
++ * SCript ConteXt (SCTX): identifies a script script line.
++ * When sourcing a script "sc_lnum" is zero, "sourcing_lnum" is the current
++ * line number. When executing a user function "sc_lnum" is the line where the
++ * function was defined, "sourcing_lnum" is the line number inside the
++ * function. When stored with a function, mapping, option, etc. "sc_lnum" is
++ * the line number in the script "sc_sid".
++ */
++ typedef struct {
++ scid_T sc_sid; // script ID
++ linenr_T sc_lnum; // line number
++ } sctx_T;
++
++ /*
+ * Reference to a buffer that stores the value of buf_free_count.
+ * bufref_valid() only needs to check "buf" when the count differs.
+ */
+***************
+*** 278,285 ****
+ #endif
+
+ #ifdef FEAT_EVAL
+! int wo_scriptID[WV_COUNT]; /* SIDs for window-local options */
+! # define w_p_scriptID w_onebuf_opt.wo_scriptID
+ #endif
+ } winopt_T;
+
+--- 291,298 ----
+ #endif
+
+ #ifdef FEAT_EVAL
+! sctx_T wo_script_ctx[WV_COUNT]; /* SCTXs for window-local options */
+! # define w_p_script_ctx w_onebuf_opt.wo_script_ctx
+ #endif
+ } winopt_T;
+
+***************
+*** 541,547 ****
+ int xp_pattern_len; /* bytes in xp_pattern before cursor */
+ #if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+ char_u *xp_arg; /* completion function */
+! int xp_scriptID; /* SID for completion function */
+ #endif
+ int xp_backslash; /* one of the XP_BS_ values */
+ #ifndef BACKSLASH_IN_FILENAME
+--- 554,560 ----
+ int xp_pattern_len; /* bytes in xp_pattern before cursor */
+ #if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+ char_u *xp_arg; /* completion function */
+! sctx_T xp_script_ctx; /* SCTX for completion function */
+ #endif
+ int xp_backslash; /* one of the XP_BS_ values */
+ #ifndef BACKSLASH_IN_FILENAME
+***************
+*** 1071,1077 ****
+ char m_nowait; /* <nowait> used */
+ #ifdef FEAT_EVAL
+ char m_expr; /* <expr> used, m_str is an expression */
+! scid_T m_script_ID; /* ID of script where map was defined */
+ #endif
+ };
+
+--- 1084,1090 ----
+ char m_nowait; /* <nowait> used */
+ #ifdef FEAT_EVAL
+ char m_expr; /* <expr> used, m_str is an expression */
+! sctx_T m_script_ctx; /* SCTX where map was defined */
+ #endif
+ };
+
+***************
+*** 1361,1367 ****
+ int uf_tml_idx; /* index of line being timed; -1 if none */
+ int uf_tml_execed; /* line being timed was executed */
+ #endif
+! scid_T uf_script_ID; /* ID of script where function was defined,
+ used for s: variables */
+ int uf_refcount; /* reference count, see func_name_refcount() */
+ funccall_T *uf_scoped; /* l: local variables for closure */
+--- 1374,1380 ----
+ int uf_tml_idx; /* index of line being timed; -1 if none */
+ int uf_tml_execed; /* line being timed was executed */
+ #endif
+! sctx_T uf_script_ctx; /* SCTX where function was defined,
+ used for s: variables */
+ int uf_refcount; /* reference count, see func_name_refcount() */
+ funccall_T *uf_scoped; /* l: local variables for closure */
+***************
+*** 2123,2129 ****
+ int b_p_initialized; /* set when options initialized */
+
+ #ifdef FEAT_EVAL
+! int b_p_scriptID[BV_COUNT]; /* SIDs for buffer-local options */
+ #endif
+
+ int b_p_ai; /* 'autoindent' */
+--- 2136,2142 ----
+ int b_p_initialized; /* set when options initialized */
+
+ #ifdef FEAT_EVAL
+! sctx_T b_p_script_ctx[BV_COUNT]; /* SCTXs for buffer-local options */
+ #endif
+
+ int b_p_ai; /* 'autoindent' */
+*** ../vim-8.1.0361/src/syntax.c 2018-07-20 19:56:06.006997358 +0200
+--- src/syntax.c 2018-09-10 20:08:06.315847823 +0200
+***************
+*** 58,64 ****
+ int sg_link; /* link to this highlight group ID */
+ int sg_set; /* combination of SG_* flags */
+ #ifdef FEAT_EVAL
+! scid_T sg_scriptID; /* script in which the group was last set */
+ #endif
+ };
+
+--- 58,64 ----
+ int sg_link; /* link to this highlight group ID */
+ int sg_set; /* combination of SG_* flags */
+ #ifdef FEAT_EVAL
+! sctx_T sg_script_ctx; /* script in which the group was last set */
+ #endif
+ };
+
+***************
+*** 7507,7513 ****
+ }
+ else if (HL_TABLE()[from_id - 1].sg_link != to_id
+ #ifdef FEAT_EVAL
+! || HL_TABLE()[from_id - 1].sg_scriptID != current_SID
+ #endif
+ || HL_TABLE()[from_id - 1].sg_cleared)
+ {
+--- 7507,7514 ----
+ }
+ else if (HL_TABLE()[from_id - 1].sg_link != to_id
+ #ifdef FEAT_EVAL
+! || HL_TABLE()[from_id - 1].sg_script_ctx.sc_sid
+! != current_sctx.sc_sid
+ #endif
+ || HL_TABLE()[from_id - 1].sg_cleared)
+ {
+***************
+*** 7515,7521 ****
+ HL_TABLE()[from_id - 1].sg_set |= SG_LINK;
+ HL_TABLE()[from_id - 1].sg_link = to_id;
+ #ifdef FEAT_EVAL
+! HL_TABLE()[from_id - 1].sg_scriptID = current_SID;
+ #endif
+ HL_TABLE()[from_id - 1].sg_cleared = FALSE;
+ redraw_all_later(SOME_VALID);
+--- 7516,7523 ----
+ HL_TABLE()[from_id - 1].sg_set |= SG_LINK;
+ HL_TABLE()[from_id - 1].sg_link = to_id;
+ #ifdef FEAT_EVAL
+! HL_TABLE()[from_id - 1].sg_script_ctx = current_sctx;
+! HL_TABLE()[from_id - 1].sg_script_ctx.sc_lnum += sourcing_lnum;
+ #endif
+ HL_TABLE()[from_id - 1].sg_cleared = FALSE;
+ redraw_all_later(SOME_VALID);
+***************
+*** 8277,8283 ****
+ else
+ set_hl_attr(idx);
+ #ifdef FEAT_EVAL
+! HL_TABLE()[idx].sg_scriptID = current_SID;
+ #endif
+ }
+
+--- 8279,8286 ----
+ else
+ set_hl_attr(idx);
+ #ifdef FEAT_EVAL
+! HL_TABLE()[idx].sg_script_ctx = current_sctx;
+! HL_TABLE()[idx].sg_script_ctx.sc_lnum += sourcing_lnum;
+ #endif
+ }
+
+***************
+*** 8404,8410 ****
+ /* Clear the script ID only when there is no link, since that is not
+ * cleared. */
+ if (HL_TABLE()[idx].sg_link == 0)
+! HL_TABLE()[idx].sg_scriptID = 0;
+ #endif
+ }
+
+--- 8407,8416 ----
+ /* Clear the script ID only when there is no link, since that is not
+ * cleared. */
+ if (HL_TABLE()[idx].sg_link == 0)
+! {
+! HL_TABLE()[idx].sg_script_ctx.sc_sid = 0;
+! HL_TABLE()[idx].sg_script_ctx.sc_lnum = 0;
+! }
+ #endif
+ }
+
+***************
+*** 9272,9278 ****
+ highlight_list_arg(id, didh, LIST_STRING, 0, (char_u *)"cleared", "");
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(sgp->sg_scriptID);
+ #endif
+ }
+
+--- 9278,9284 ----
+ highlight_list_arg(id, didh, LIST_STRING, 0, (char_u *)"cleared", "");
+ #ifdef FEAT_EVAL
+ if (p_verbose > 0)
+! last_set_msg(sgp->sg_script_ctx);
+ #endif
+ }
+
+*** ../vim-8.1.0361/src/testdir/test_alot.vim 2018-08-07 21:39:09.251060096 +0200
+--- src/testdir/test_alot.vim 2018-09-10 19:45:33.380367357 +0200
+***************
+*** 14,19 ****
+--- 14,20 ----
+ source test_execute_func.vim
+ source test_expand.vim
+ source test_expand_dllpath.vim
++ source test_expand_func.vim
+ source test_expr.vim
+ source test_feedkeys.vim
+ source test_file_perm.vim
+*** ../vim-8.1.0361/src/testdir/test_expand_func.vim 2018-09-10 21:02:19.285589846 +0200
+--- src/testdir/test_expand_func.vim 2018-09-10 19:52:46.982566605 +0200
+***************
+*** 0 ****
+--- 1,66 ----
++ " Tests for expand()
++
++ let s:sfile = expand('<sfile>')
++ let s:slnum = str2nr(expand('<slnum>'))
++ let s:sflnum = str2nr(expand('<sflnum>'))
++
++ func s:expand_sfile()
++ return expand('<sfile>')
++ endfunc
++
++ func s:expand_slnum()
++ return str2nr(expand('<slnum>'))
++ endfunc
++
++ func s:expand_sflnum()
++ return str2nr(expand('<sflnum>'))
++ endfunc
++
++ func Test_expand_sfile()
++ call assert_match('test_expand_func\.vim$', s:sfile)
++ call assert_match('^function .*\.\.Test_expand_sfile$', expand('<sfile>'))
++
++ " Call in script-local function
++ call assert_match('^function .*\.\.Test_expand_sfile\[5\]\.\.<SNR>\d\+_expand_sfile$', s:expand_sfile())
++
++ " Call in command
++ command Sfile echo expand('<sfile>')
++ call assert_match('^function .*\.\.Test_expand_sfile$', trim(execute('Sfile')))
++ delcommand Sfile
++ endfunc
++
++ func Test_expand_slnum()
++ call assert_equal(4, s:slnum)
++ call assert_equal(2, str2nr(expand('<slnum>')))
++
++ " Line-continuation
++ call assert_equal(
++ \ 5,
++ \ str2nr(expand('<slnum>')))
++
++ " Call in script-local function
++ call assert_equal(1, s:expand_slnum())
++
++ " Call in command
++ command Slnum echo expand('<slnum>')
++ call assert_equal(14, str2nr(trim(execute('Slnum'))))
++ delcommand Slnum
++ endfunc
++
++ func Test_expand_sflnum()
++ call assert_equal(5, s:sflnum)
++ call assert_equal(52, str2nr(expand('<sflnum>')))
++
++ " Line-continuation
++ call assert_equal(
++ \ 55,
++ \ str2nr(expand('<sflnum>')))
++
++ " Call in script-local function
++ call assert_equal(16, s:expand_sflnum())
++
++ " Call in command
++ command Flnum echo expand('<sflnum>')
++ call assert_equal(64, str2nr(trim(execute('Flnum'))))
++ delcommand Flnum
++ endfunc
+*** ../vim-8.1.0361/src/testdir/test_maparg.vim 2018-05-21 13:28:40.320041589 +0200
+--- src/testdir/test_maparg.vim 2018-09-10 20:53:41.911220447 +0200
+***************
+*** 13,31 ****
+ set cpo-=<
+ set encoding=utf8
+ " Test maparg() with a string result
+ map foo<C-V> is<F4>foo
+ vnoremap <script> <buffer> <expr> <silent> bar isbar
+- let sid = s:SID()
+ call assert_equal("is<F4>foo", maparg('foo<C-V>'))
+ call assert_equal({'silent': 0, 'noremap': 0, 'lhs': 'foo<C-V>',
+! \ 'mode': ' ', 'nowait': 0, 'expr': 0, 'sid': sid, 'rhs': 'is<F4>foo',
+! \ 'buffer': 0}, maparg('foo<C-V>', '', 0, 1))
+ call assert_equal({'silent': 1, 'noremap': 1, 'lhs': 'bar', 'mode': 'v',
+! \ 'nowait': 0, 'expr': 1, 'sid': sid, 'rhs': 'isbar', 'buffer': 1},
+ \ maparg('bar', '', 0, 1))
+ map <buffer> <nowait> foo bar
+ call assert_equal({'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ',
+! \ 'nowait': 1, 'expr': 0, 'sid': sid, 'rhs': 'bar', 'buffer': 1},
+ \ maparg('foo', '', 0, 1))
+
+ map abc x<char-114>x
+--- 13,36 ----
+ set cpo-=<
+ set encoding=utf8
+ " Test maparg() with a string result
++ let sid = s:SID()
++ let lnum = expand('<sflnum>')
+ map foo<C-V> is<F4>foo
+ vnoremap <script> <buffer> <expr> <silent> bar isbar
+ call assert_equal("is<F4>foo", maparg('foo<C-V>'))
+ call assert_equal({'silent': 0, 'noremap': 0, 'lhs': 'foo<C-V>',
+! \ 'mode': ' ', 'nowait': 0, 'expr': 0, 'sid': sid, 'lnum': lnum + 1,
+! \ 'rhs': 'is<F4>foo', 'buffer': 0},
+! \ maparg('foo<C-V>', '', 0, 1))
+ call assert_equal({'silent': 1, 'noremap': 1, 'lhs': 'bar', 'mode': 'v',
+! \ 'nowait': 0, 'expr': 1, 'sid': sid, 'lnum': lnum + 2,
+! \ 'rhs': 'isbar', 'buffer': 1},
+ \ maparg('bar', '', 0, 1))
++ let lnum = expand('<sflnum>')
+ map <buffer> <nowait> foo bar
+ call assert_equal({'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ',
+! \ 'nowait': 1, 'expr': 0, 'sid': sid, 'lnum': lnum + 1, 'rhs': 'bar',
+! \ 'buffer': 1},
+ \ maparg('foo', '', 0, 1))
+
+ map abc x<char-114>x
+*** ../vim-8.1.0361/src/term.c 2018-08-21 13:09:06.250115910 +0200
+--- src/term.c 2018-09-10 20:08:15.351746667 +0200
+***************
+*** 6128,6134 ****
+ */
+ if (STRNICMP(src, "<SID>", 5) == 0)
+ {
+! if (current_SID <= 0)
+ EMSG(_(e_usingsid));
+ else
+ {
+--- 6128,6134 ----
+ */
+ if (STRNICMP(src, "<SID>", 5) == 0)
+ {
+! if (current_sctx.sc_sid <= 0)
+ EMSG(_(e_usingsid));
+ else
+ {
+***************
+*** 6136,6142 ****
+ result[dlen++] = K_SPECIAL;
+ result[dlen++] = (int)KS_EXTRA;
+ result[dlen++] = (int)KE_SNR;
+! sprintf((char *)result + dlen, "%ld", (long)current_SID);
+ dlen += (int)STRLEN(result + dlen);
+ result[dlen++] = '_';
+ continue;
+--- 6136,6143 ----
+ result[dlen++] = K_SPECIAL;
+ result[dlen++] = (int)KS_EXTRA;
+ result[dlen++] = (int)KE_SNR;
+! sprintf((char *)result + dlen, "%ld",
+! (long)current_sctx.sc_sid);
+ dlen += (int)STRLEN(result + dlen);
+ result[dlen++] = '_';
+ continue;
+*** ../vim-8.1.0361/src/userfunc.c 2018-07-29 17:40:37.239467625 +0200
+--- src/userfunc.c 2018-09-10 20:08:27.575609884 +0200
+***************
+*** 302,308 ****
+ fp->uf_varargs = TRUE;
+ fp->uf_flags = flags;
+ fp->uf_calls = 0;
+! fp->uf_script_ID = current_SID;
+
+ pt->pt_func = fp;
+ pt->pt_refcount = 1;
+--- 302,309 ----
+ fp->uf_varargs = TRUE;
+ fp->uf_flags = flags;
+ fp->uf_calls = 0;
+! fp->uf_script_ctx = current_sctx;
+! fp->uf_script_ctx.sc_lnum += sourcing_lnum - newlines.ga_len;
+
+ pt->pt_func = fp;
+ pt->pt_refcount = 1;
+***************
+*** 505,515 ****
+ i = 3;
+ if (eval_fname_sid(name)) /* "<SID>" or "s:" */
+ {
+! if (current_SID <= 0)
+ *error = ERROR_SCRIPT;
+ else
+ {
+! sprintf((char *)fname_buf + 3, "%ld_", (long)current_SID);
+ i = (int)STRLEN(fname_buf);
+ }
+ }
+--- 506,516 ----
+ i = 3;
+ if (eval_fname_sid(name)) /* "<SID>" or "s:" */
+ {
+! if (current_sctx.sc_sid <= 0)
+ *error = ERROR_SCRIPT;
+ else
+ {
+! sprintf((char *)fname_buf + 3, "%ld_", (long)current_sctx.sc_sid);
+ i = (int)STRLEN(fname_buf);
+ }
+ }
+***************
+*** 690,696 ****
+ {
+ char_u *save_sourcing_name;
+ linenr_T save_sourcing_lnum;
+! scid_T save_current_SID;
+ int using_sandbox = FALSE;
+ funccall_T *fc;
+ int save_did_emsg;
+--- 691,697 ----
+ {
+ char_u *save_sourcing_name;
+ linenr_T save_sourcing_lnum;
+! sctx_T save_current_sctx;
+ int using_sandbox = FALSE;
+ funccall_T *fc;
+ int save_did_emsg;
+***************
+*** 944,951 ****
+ }
+ #endif
+
+! save_current_SID = current_SID;
+! current_SID = fp->uf_script_ID;
+ save_did_emsg = did_emsg;
+ did_emsg = FALSE;
+
+--- 945,952 ----
+ }
+ #endif
+
+! save_current_sctx = current_sctx;
+! current_sctx = fp->uf_script_ctx;
+ save_did_emsg = did_emsg;
+ did_emsg = FALSE;
+
+***************
+*** 1026,1032 ****
+ vim_free(sourcing_name);
+ sourcing_name = save_sourcing_name;
+ sourcing_lnum = save_sourcing_lnum;
+! current_SID = save_current_SID;
+ #ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+ script_prof_restore(&wait_start);
+--- 1027,1033 ----
+ vim_free(sourcing_name);
+ sourcing_name = save_sourcing_name;
+ sourcing_lnum = save_sourcing_lnum;
+! current_sctx = save_current_sctx;
+ #ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+ script_prof_restore(&wait_start);
+***************
+*** 1574,1580 ****
+ MSG_PUTS(" closure");
+ msg_clr_eos();
+ if (p_verbose > 0)
+! last_set_msg(fp->uf_script_ID);
+ }
+
+ /*
+--- 1575,1581 ----
+ MSG_PUTS(" closure");
+ msg_clr_eos();
+ if (p_verbose > 0)
+! last_set_msg(fp->uf_script_ctx);
+ }
+
+ /*
+***************
+*** 1757,1768 ****
+ || eval_fname_sid(*pp))
+ {
+ /* It's "s:" or "<SID>" */
+! if (current_SID <= 0)
+ {
+ EMSG(_(e_usingsid));
+ goto theend;
+ }
+! sprintf((char *)sid_buf, "%ld_", (long)current_SID);
+ lead += (int)STRLEN(sid_buf);
+ }
+ }
+--- 1758,1769 ----
+ || eval_fname_sid(*pp))
+ {
+ /* It's "s:" or "<SID>" */
+! if (current_sctx.sc_sid <= 0)
+ {
+ EMSG(_(e_usingsid));
+ goto theend;
+ }
+! sprintf((char *)sid_buf, "%ld_", (long)current_sctx.sc_sid);
+ lead += (int)STRLEN(sid_buf);
+ }
+ }
+***************
+*** 2454,2460 ****
+ flags |= FC_SANDBOX;
+ fp->uf_flags = flags;
+ fp->uf_calls = 0;
+! fp->uf_script_ID = current_SID;
+ goto ret_free;
+
+ erret:
+--- 2455,2462 ----
+ flags |= FC_SANDBOX;
+ fp->uf_flags = flags;
+ fp->uf_calls = 0;
+! fp->uf_script_ctx = current_sctx;
+! fp->uf_script_ctx.sc_lnum += sourcing_lnum - newlines.ga_len - 1;
+ goto ret_free;
+
+ erret:
+*** ../vim-8.1.0361/src/version.c 2018-09-10 19:03:01.641716307 +0200
+--- src/version.c 2018-09-10 20:58:39.847970755 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 362,
+ /**/
+
+--
+If you put 7 of the most talented OSS developers in a room for a week
+and asked them to fix a bug in a spreadsheet program, in 1 week
+you'd have 2 new mail readers and a text-based web browser.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0363 b/data/vim/patches/8.1.0363
new file mode 100644
index 000000000..2d32cea51
--- /dev/null
+++ b/data/vim/patches/8.1.0363
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0363
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0363
+Problem: Internal diff isn't used by default as advertised.
+Solution: Add "internal" to the default value of 'diffopt'.
+ Also add couple of files missing from the distribution.
+Files: src/option.c, runtime/doc/options.txt, Filelist
+
+
+*** ../vim-8.1.0362/src/option.c 2018-09-10 21:04:09.872392623 +0200
+--- src/option.c 2018-09-10 21:09:19.469047161 +0200
+***************
+*** 1049,1055 ****
+ |P_NODUP,
+ #ifdef FEAT_DIFF
+ (char_u *)&p_dip, PV_NONE,
+! {(char_u *)"filler", (char_u *)NULL}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+--- 1049,1055 ----
+ |P_NODUP,
+ #ifdef FEAT_DIFF
+ (char_u *)&p_dip, PV_NONE,
+! {(char_u *)"internal,filler", (char_u *)NULL}
+ #else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)"", (char_u *)NULL}
+*** ../vim-8.1.0362/runtime/doc/options.txt 2018-09-10 17:50:32.709306979 +0200
+--- runtime/doc/options.txt 2018-09-10 21:06:27.070909112 +0200
+***************
+*** 2611,2617 ****
+ security reasons.
+
+ *'dip'* *'diffopt'*
+! 'diffopt' 'dip' string (default "filler")
+ global
+ {not in Vi}
+ {not available when compiled without the |+diff|
+--- 2615,2621 ----
+ security reasons.
+
+ *'dip'* *'diffopt'*
+! 'diffopt' 'dip' string (default "internal,filler")
+ global
+ {not in Vi}
+ {not available when compiled without the |+diff|
+*** ../vim-8.1.0362/Filelist 2018-09-10 17:50:32.705307018 +0200
+--- Filelist 2018-09-10 17:52:51.711962221 +0200
+***************
+*** 273,278 ****
+--- 273,280 ----
+ src/libvterm/t/92lp1640917.test \
+ src/libvterm/t/harness.c \
+ src/libvterm/t/run-test.pl \
++ src/xdiff/COPYING \
++ src/xdiff/README.txt \
+ src/xdiff/xdiff.h \
+ src/xdiff/xdiffi.c \
+ src/xdiff/xdiffi.h \
+*** ../vim-8.1.0362/src/version.c 2018-09-10 21:04:09.876392579 +0200
+--- src/version.c 2018-09-10 21:11:36.403569515 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 363,
+ /**/
+
+--
+Give a man a computer program and you give him a headache,
+but teach him to program computers and you give him the power
+to create headaches for others for the rest of his life...
+ R. B. Forest
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0364 b/data/vim/patches/8.1.0364
new file mode 100644
index 000000000..acf9d68b0
--- /dev/null
+++ b/data/vim/patches/8.1.0364
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0364
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0364
+Problem: Compiler warning in xdiff code. (Yegappan Lakshmanan)
+Solution: Initialize directly.
+Files: src/xdiff/xemit.c, src/xdiff/README.txt
+
+
+*** ../vim-8.1.0363/src/xdiff/xemit.c 2018-09-10 17:50:32.713306941 +0200
+--- src/xdiff/xemit.c 2018-09-10 21:20:06.522070927 +0200
+***************
+*** 169,175 ****
+ long s1, s2, e1, e2, lctx;
+ xdchange_t *xch, *xche;
+ long funclineprev = -1;
+! struct func_line func_line = { 0 };
+
+ for (xch = xscr; xch; xch = xche->next) {
+ xche = xdl_get_hunk(&xch, xecfg);
+--- 169,177 ----
+ long s1, s2, e1, e2, lctx;
+ xdchange_t *xch, *xche;
+ long funclineprev = -1;
+! struct func_line func_line;
+!
+! func_line.len = 0;
+
+ for (xch = xscr; xch; xch = xche->next) {
+ xche = xdl_get_hunk(&xch, xecfg);
+*** ../vim-8.1.0363/src/xdiff/README.txt 2018-09-10 17:50:32.717306902 +0200
+--- src/xdiff/README.txt 2018-09-10 21:17:33.827716111 +0200
+***************
+*** 11,14 ****
+--- 11,16 ----
+ The code is distributed under the GNU LGPL license. It is included in the
+ COPYING file.
+
++ Changes in these files were made to avoid compiler warnings.
++
+ The first work for including xdiff in Vim was done by Christian Brabandt.
+*** ../vim-8.1.0363/src/version.c 2018-09-10 21:15:34.637000672 +0200
+--- src/version.c 2018-09-10 21:21:42.117041159 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 364,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+30. Even though you died last week, you've managed to retain OPS on your
+ favorite IRC channel.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0365 b/data/vim/patches/8.1.0365
new file mode 100644
index 000000000..12044158a
--- /dev/null
+++ b/data/vim/patches/8.1.0365
@@ -0,0 +1,465 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0365
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0365
+Problem: Function profile doesn't specify where it was defined.
+Solution: Show the script name and line number.
+Files: src/userfunc.c, src/testdir/test_profile.vim
+
+
+*** ../vim-8.1.0364/src/userfunc.c 2018-09-10 21:04:09.876392579 +0200
+--- src/userfunc.c 2018-09-10 21:46:54.792416184 +0200
+***************
+*** 2587,2592 ****
+--- 2587,2593 ----
+ int i;
+ ufunc_T **sorttab;
+ int st_len = 0;
++ char_u *p;
+
+ todo = (int)func_hashtab.ht_used;
+ if (todo == 0)
+***************
+*** 2609,2614 ****
+--- 2610,2623 ----
+ fprintf(fd, "FUNCTION <SNR>%s()\n", fp->uf_name + 3);
+ else
+ fprintf(fd, "FUNCTION %s()\n", fp->uf_name);
++ p = home_replace_save(NULL,
++ get_scriptname(fp->uf_script_ctx.sc_sid));
++ if (p != NULL)
++ {
++ fprintf(fd, " Defined: %s line %ld\n",
++ p, (long)fp->uf_script_ctx.sc_lnum);
++ vim_free(p);
++ }
+ if (fp->uf_tm_count == 1)
+ fprintf(fd, "Called 1 time\n");
+ else
+*** ../vim-8.1.0364/src/testdir/test_profile.vim 2018-08-21 17:49:50.993308900 +0200
+--- src/testdir/test_profile.vim 2018-09-10 21:59:08.860596961 +0200
+***************
+*** 49,84 ****
+ " - Unlike Foo3(), Foo2() should not be deleted since there is a check
+ " for v:profiling.
+ " - Bar() is not reported since it does not match "profile func Foo*".
+! call assert_equal(28, len(lines))
+
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_equal('Called 2 times', lines[1])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3])
+! call assert_equal('', lines[4])
+! call assert_equal('count total (s) self (s)', lines[5])
+! call assert_equal('', lines[6])
+! call assert_equal('FUNCTION Foo2()', lines[7])
+! call assert_equal('Called 1 time', lines[8])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[9])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[10])
+! call assert_equal('', lines[11])
+! call assert_equal('count total (s) self (s)', lines[12])
+! call assert_match('^\s*1\s\+.*\slet l:count = 100$', lines[13])
+! call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[14])
+! call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[15])
+! call assert_match('^\s*101\s\+.*\sendwhile$', lines[16])
+! call assert_equal('', lines[17])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[18])
+! call assert_equal('count total (s) self (s) function', lines[19])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[20])
+! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[21])
+! call assert_equal('', lines[22])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[23])
+! call assert_equal('count total (s) self (s) function', lines[24])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[25])
+! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[26])
+! call assert_equal('', lines[27])
+
+ call delete('Xprofile_func.vim')
+ call delete('Xprofile_func.log')
+--- 49,85 ----
+ " - Unlike Foo3(), Foo2() should not be deleted since there is a check
+ " for v:profiling.
+ " - Bar() is not reported since it does not match "profile func Foo*".
+! call assert_equal(30, len(lines))
+
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_match('Defined:.*Xprofile_func.vim', lines[1])
+! call assert_equal('Called 2 times', lines[2])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[3])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[4])
+! call assert_equal('', lines[5])
+! call assert_equal('count total (s) self (s)', lines[6])
+! call assert_equal('', lines[7])
+! call assert_equal('FUNCTION Foo2()', lines[8])
+! call assert_equal('Called 1 time', lines[10])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[11])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[12])
+! call assert_equal('', lines[13])
+! call assert_equal('count total (s) self (s)', lines[14])
+! call assert_match('^\s*1\s\+.*\slet l:count = 100$', lines[15])
+! call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[16])
+! call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[17])
+! call assert_match('^\s*101\s\+.*\sendwhile$', lines[18])
+! call assert_equal('', lines[19])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[20])
+! call assert_equal('count total (s) self (s) function', lines[21])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[22])
+! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[23])
+! call assert_equal('', lines[24])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[25])
+! call assert_equal('count total (s) self (s) function', lines[26])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[27])
+! call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[28])
+! call assert_equal('', lines[29])
+
+ call delete('Xprofile_func.vim')
+ call delete('Xprofile_func.log')
+***************
+*** 132,193 ****
+ " - Foo1() should pass 'if' block.
+ " - Foo2() should pass 'elseif' block.
+ " - Foo3() should pass 'else' block.
+! call assert_equal(54, len(lines))
+
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_equal('Called 1 time', lines[1])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3])
+! call assert_equal('', lines[4])
+! call assert_equal('count total (s) self (s)', lines[5])
+! call assert_match('^\s*1\s\+.*\sif 1$', lines[6])
+! call assert_match('^\s*1\s\+.*\s let x = 0$', lines[7])
+! call assert_match( '^\s\+elseif 1$', lines[8])
+! call assert_match( '^\s\+let x = 1$', lines[9])
+! call assert_match( '^\s\+else$', lines[10])
+! call assert_match( '^\s\+let x = 2$', lines[11])
+! call assert_match('^\s*1\s\+.*\sendif$', lines[12])
+! call assert_equal('', lines[13])
+! call assert_equal('FUNCTION Foo2()', lines[14])
+! call assert_equal('Called 1 time', lines[15])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[16])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[17])
+! call assert_equal('', lines[18])
+! call assert_equal('count total (s) self (s)', lines[19])
+! call assert_match('^\s*1\s\+.*\sif 0$', lines[20])
+! call assert_match( '^\s\+let x = 0$', lines[21])
+! call assert_match('^\s*1\s\+.*\selseif 1$', lines[22])
+! call assert_match('^\s*1\s\+.*\s let x = 1$', lines[23])
+! call assert_match( '^\s\+else$', lines[24])
+! call assert_match( '^\s\+let x = 2$', lines[25])
+! call assert_match('^\s*1\s\+.*\sendif$', lines[26])
+! call assert_equal('', lines[27])
+! call assert_equal('FUNCTION Foo3()', lines[28])
+! call assert_equal('Called 1 time', lines[29])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[30])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[31])
+! call assert_equal('', lines[32])
+! call assert_equal('count total (s) self (s)', lines[33])
+! call assert_match('^\s*1\s\+.*\sif 0$', lines[34])
+! call assert_match( '^\s\+let x = 0$', lines[35])
+! call assert_match('^\s*1\s\+.*\selseif 0$', lines[36])
+! call assert_match( '^\s\+let x = 1$', lines[37])
+! call assert_match('^\s*1\s\+.*\selse$', lines[38])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[39])
+! call assert_match('^\s*1\s\+.*\sendif$', lines[40])
+! call assert_equal('', lines[41])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[42])
+! call assert_equal('count total (s) self (s) function', lines[43])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[44])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[45])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[46])
+! call assert_equal('', lines[47])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[48])
+! call assert_equal('count total (s) self (s) function', lines[49])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[50])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[51])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[52])
+! call assert_equal('', lines[53])
+
+ call delete('Xprofile_func.vim')
+ call delete('Xprofile_func.log')
+--- 133,195 ----
+ " - Foo1() should pass 'if' block.
+ " - Foo2() should pass 'elseif' block.
+ " - Foo3() should pass 'else' block.
+! call assert_equal(57, len(lines))
+
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_match('Defined:.*Xprofile_func.vim', lines[1])
+! call assert_equal('Called 1 time', lines[2])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[3])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[4])
+! call assert_equal('', lines[5])
+! call assert_equal('count total (s) self (s)', lines[6])
+! call assert_match('^\s*1\s\+.*\sif 1$', lines[7])
+! call assert_match('^\s*1\s\+.*\s let x = 0$', lines[8])
+! call assert_match( '^\s\+elseif 1$', lines[9])
+! call assert_match( '^\s\+let x = 1$', lines[10])
+! call assert_match( '^\s\+else$', lines[11])
+! call assert_match( '^\s\+let x = 2$', lines[12])
+! call assert_match('^\s*1\s\+.*\sendif$', lines[13])
+! call assert_equal('', lines[14])
+! call assert_equal('FUNCTION Foo2()', lines[15])
+! call assert_equal('Called 1 time', lines[17])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[18])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[19])
+! call assert_equal('', lines[20])
+! call assert_equal('count total (s) self (s)', lines[21])
+! call assert_match('^\s*1\s\+.*\sif 0$', lines[22])
+! call assert_match( '^\s\+let x = 0$', lines[23])
+! call assert_match('^\s*1\s\+.*\selseif 1$', lines[24])
+! call assert_match('^\s*1\s\+.*\s let x = 1$', lines[25])
+! call assert_match( '^\s\+else$', lines[26])
+! call assert_match( '^\s\+let x = 2$', lines[27])
+! call assert_match('^\s*1\s\+.*\sendif$', lines[28])
+! call assert_equal('', lines[29])
+! call assert_equal('FUNCTION Foo3()', lines[30])
+! call assert_equal('Called 1 time', lines[32])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[33])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[34])
+! call assert_equal('', lines[35])
+! call assert_equal('count total (s) self (s)', lines[36])
+! call assert_match('^\s*1\s\+.*\sif 0$', lines[37])
+! call assert_match( '^\s\+let x = 0$', lines[38])
+! call assert_match('^\s*1\s\+.*\selseif 0$', lines[39])
+! call assert_match( '^\s\+let x = 1$', lines[40])
+! call assert_match('^\s*1\s\+.*\selse$', lines[41])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[42])
+! call assert_match('^\s*1\s\+.*\sendif$', lines[43])
+! call assert_equal('', lines[44])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[45])
+! call assert_equal('count total (s) self (s) function', lines[46])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[47])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[48])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[49])
+! call assert_equal('', lines[50])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[51])
+! call assert_equal('count total (s) self (s) function', lines[52])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[53])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[54])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[55])
+! call assert_equal('', lines[56])
+
+ call delete('Xprofile_func.vim')
+ call delete('Xprofile_func.log')
+***************
+*** 244,305 ****
+ " - Foo1() should pass 'try' 'finally' blocks.
+ " - Foo2() should pass 'catch' 'finally' blocks.
+ " - Foo3() should not pass 'endtry'.
+! call assert_equal(54, len(lines))
+
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_equal('Called 1 time', lines[1])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3])
+! call assert_equal('', lines[4])
+! call assert_equal('count total (s) self (s)', lines[5])
+! call assert_match('^\s*1\s\+.*\stry$', lines[6])
+! call assert_match('^\s*1\s\+.*\s let x = 0$', lines[7])
+! call assert_match( '^\s\+catch$', lines[8])
+! call assert_match( '^\s\+let x = 1$', lines[9])
+! call assert_match('^\s*1\s\+.*\sfinally$', lines[10])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[11])
+! call assert_match('^\s*1\s\+.*\sendtry$', lines[12])
+! call assert_equal('', lines[13])
+! call assert_equal('FUNCTION Foo2()', lines[14])
+! call assert_equal('Called 1 time', lines[15])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[16])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[17])
+! call assert_equal('', lines[18])
+! call assert_equal('count total (s) self (s)', lines[19])
+! call assert_match('^\s*1\s\+.*\stry$', lines[20])
+! call assert_match('^\s*1\s\+.*\s throw 0$', lines[21])
+! call assert_match('^\s*1\s\+.*\scatch$', lines[22])
+! call assert_match('^\s*1\s\+.*\s let x = 1$', lines[23])
+! call assert_match('^\s*1\s\+.*\sfinally$', lines[24])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[25])
+! call assert_match('^\s*1\s\+.*\sendtry$', lines[26])
+! call assert_equal('', lines[27])
+! call assert_equal('FUNCTION Foo3()', lines[28])
+! call assert_equal('Called 1 time', lines[29])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[30])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[31])
+! call assert_equal('', lines[32])
+! call assert_equal('count total (s) self (s)', lines[33])
+! call assert_match('^\s*1\s\+.*\stry$', lines[34])
+! call assert_match('^\s*1\s\+.*\s throw 0$', lines[35])
+! call assert_match('^\s*1\s\+.*\scatch$', lines[36])
+! call assert_match('^\s*1\s\+.*\s throw 1$', lines[37])
+! call assert_match('^\s*1\s\+.*\sfinally$', lines[38])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[39])
+! call assert_match( '^\s\+endtry$', lines[40])
+! call assert_equal('', lines[41])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[42])
+! call assert_equal('count total (s) self (s) function', lines[43])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[44])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[45])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[46])
+! call assert_equal('', lines[47])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[48])
+! call assert_equal('count total (s) self (s) function', lines[49])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[50])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[51])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[52])
+! call assert_equal('', lines[53])
+
+ call delete('Xprofile_func.vim')
+ call delete('Xprofile_func.log')
+--- 246,308 ----
+ " - Foo1() should pass 'try' 'finally' blocks.
+ " - Foo2() should pass 'catch' 'finally' blocks.
+ " - Foo3() should not pass 'endtry'.
+! call assert_equal(57, len(lines))
+
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_match('Defined:.*Xprofile_func.vim', lines[1])
+! call assert_equal('Called 1 time', lines[2])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[3])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[4])
+! call assert_equal('', lines[5])
+! call assert_equal('count total (s) self (s)', lines[6])
+! call assert_match('^\s*1\s\+.*\stry$', lines[7])
+! call assert_match('^\s*1\s\+.*\s let x = 0$', lines[8])
+! call assert_match( '^\s\+catch$', lines[9])
+! call assert_match( '^\s\+let x = 1$', lines[10])
+! call assert_match('^\s*1\s\+.*\sfinally$', lines[11])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[12])
+! call assert_match('^\s*1\s\+.*\sendtry$', lines[13])
+! call assert_equal('', lines[14])
+! call assert_equal('FUNCTION Foo2()', lines[15])
+! call assert_equal('Called 1 time', lines[17])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[18])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[19])
+! call assert_equal('', lines[20])
+! call assert_equal('count total (s) self (s)', lines[21])
+! call assert_match('^\s*1\s\+.*\stry$', lines[22])
+! call assert_match('^\s*1\s\+.*\s throw 0$', lines[23])
+! call assert_match('^\s*1\s\+.*\scatch$', lines[24])
+! call assert_match('^\s*1\s\+.*\s let x = 1$', lines[25])
+! call assert_match('^\s*1\s\+.*\sfinally$', lines[26])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[27])
+! call assert_match('^\s*1\s\+.*\sendtry$', lines[28])
+! call assert_equal('', lines[29])
+! call assert_equal('FUNCTION Foo3()', lines[30])
+! call assert_equal('Called 1 time', lines[32])
+! call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[33])
+! call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[34])
+! call assert_equal('', lines[35])
+! call assert_equal('count total (s) self (s)', lines[36])
+! call assert_match('^\s*1\s\+.*\stry$', lines[37])
+! call assert_match('^\s*1\s\+.*\s throw 0$', lines[38])
+! call assert_match('^\s*1\s\+.*\scatch$', lines[39])
+! call assert_match('^\s*1\s\+.*\s throw 1$', lines[40])
+! call assert_match('^\s*1\s\+.*\sfinally$', lines[41])
+! call assert_match('^\s*1\s\+.*\s let x = 2$', lines[42])
+! call assert_match( '^\s\+endtry$', lines[43])
+! call assert_equal('', lines[44])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[45])
+! call assert_equal('count total (s) self (s) function', lines[46])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[47])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[48])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[49])
+! call assert_equal('', lines[50])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[51])
+! call assert_equal('count total (s) self (s) function', lines[52])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[53])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[54])
+! call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[55])
+! call assert_equal('', lines[56])
+
+ call delete('Xprofile_func.vim')
+ call delete('Xprofile_func.log')
+***************
+*** 470,487 ****
+ call assert_equal(0, v:shell_error)
+
+ let lines = readfile('Xprofile_file.log')
+! call assert_equal(24, len(lines))
+
+ " Check that:
+ " - Foo1() is called twice (profdel not invoked)
+ " - Foo2() is called once (profdel invoked after it was called)
+ " - Foo3() is not called (profdel invoked before it was called)
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_equal('Called 2 times', lines[1])
+! call assert_equal('FUNCTION Foo2()', lines[7])
+! call assert_equal('Called 1 time', lines[8])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[14])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[19])
+
+ call delete('Xprofile_file.vim')
+ call delete('Xprofile_file.log')
+--- 473,491 ----
+ call assert_equal(0, v:shell_error)
+
+ let lines = readfile('Xprofile_file.log')
+! call assert_equal(26, len(lines))
+
+ " Check that:
+ " - Foo1() is called twice (profdel not invoked)
+ " - Foo2() is called once (profdel invoked after it was called)
+ " - Foo3() is not called (profdel invoked before it was called)
+ call assert_equal('FUNCTION Foo1()', lines[0])
+! call assert_match('Defined:.*Xprofile_file.vim', lines[1])
+! call assert_equal('Called 2 times', lines[2])
+! call assert_equal('FUNCTION Foo2()', lines[8])
+! call assert_equal('Called 1 time', lines[10])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[16])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[21])
+
+ call delete('Xprofile_file.vim')
+ call delete('Xprofile_file.log')
+***************
+*** 503,514 ****
+ call assert_equal(0, v:shell_error)
+
+ let lines = readfile('Xprofile_file.log')
+! call assert_equal(15, len(lines))
+
+ call assert_equal('FUNCTION Foo()', lines[0])
+! call assert_equal('Called 1 time', lines[1])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[7])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[11])
+
+ call delete('Xprofile_file.vim')
+ call delete('Xprofile_file.log')
+--- 507,519 ----
+ call assert_equal(0, v:shell_error)
+
+ let lines = readfile('Xprofile_file.log')
+! call assert_equal(16, len(lines))
+
+ call assert_equal('FUNCTION Foo()', lines[0])
+! call assert_match('Defined:.*Xprofile_file.vim', lines[1])
+! call assert_equal('Called 1 time', lines[2])
+! call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[8])
+! call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[12])
+
+ call delete('Xprofile_file.vim')
+ call delete('Xprofile_file.log')
+*** ../vim-8.1.0364/src/version.c 2018-09-10 21:22:11.540724228 +0200
+--- src/version.c 2018-09-10 22:02:39.826890707 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 365,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+32. You don't know what sex three of your closest friends are, because they
+ have neutral nicknames and you never bothered to ask.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0366 b/data/vim/patches/8.1.0366
new file mode 100644
index 000000000..be8e15e4a
--- /dev/null
+++ b/data/vim/patches/8.1.0366
@@ -0,0 +1,164 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0366
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0366
+Problem: Pieces of the xdiff code are not used.
+Solution: Add "#if 0" to omit unused code.
+Files: src/xdiff/xemit.c
+
+
+*** ../vim-8.1.0365/src/xdiff/xemit.c 2018-09-10 21:22:11.540724228 +0200
+--- src/xdiff/xemit.c 2018-09-10 22:17:54.906146558 +0200
+***************
+*** 95,100 ****
+--- 95,101 ----
+ }
+
+
++ #if 0
+ static long def_ff(const char *rec, long len, char *buf, long sz, void *priv UNUSED)
+ {
+ if (len > 0 &&
+***************
+*** 110,116 ****
+--- 111,119 ----
+ }
+ return -1;
+ }
++ #endif
+
++ #if 0
+ static long match_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri,
+ char *buf, long sz)
+ {
+***************
+*** 120,137 ****
+--- 123,144 ----
+ return def_ff(rec, len, buf, sz, xecfg->find_func_priv);
+ return xecfg->find_func(rec, len, buf, sz, xecfg->find_func_priv);
+ }
++ #endif
+
++ #if 0
+ static int is_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri)
+ {
+ char dummy[1];
+ return match_func_rec(xdf, xecfg, ri, dummy, sizeof(dummy)) >= 0;
+ }
++ #endif
+
+ struct func_line {
+ long len;
+ char buf[80];
+ };
+
++ #if 0
+ static long get_func_line(xdfenv_t *xe, xdemitconf_t const *xecfg,
+ struct func_line *func_line, long start, long limit)
+ {
+***************
+*** 151,157 ****
+--- 158,166 ----
+ }
+ return -1;
+ }
++ #endif
+
++ #if 0
+ static int is_empty_rec(xdfile_t *xdf, long ri)
+ {
+ const char *rec;
+***************
+*** 163,174 ****
+--- 172,186 ----
+ }
+ return !len;
+ }
++ #endif
+
+ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
+ xdemitconf_t const *xecfg) {
+ long s1, s2, e1, e2, lctx;
+ xdchange_t *xch, *xche;
++ #if 0
+ long funclineprev = -1;
++ #endif
+ struct func_line func_line;
+
+ func_line.len = 0;
+***************
+*** 181,186 ****
+--- 193,199 ----
+ s1 = XDL_MAX(xch->i1 - xecfg->ctxlen, 0);
+ s2 = XDL_MAX(xch->i2 - xecfg->ctxlen, 0);
+
++ #if 0
+ if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) {
+ long fs1, i1 = xch->i1;
+
+***************
+*** 218,223 ****
+--- 231,237 ----
+ }
+
+ post_context_calculation:
++ #endif
+ lctx = xecfg->ctxlen;
+ lctx = XDL_MIN(lctx, xe->xdf1.nrec - (xche->i1 + xche->chg1));
+ lctx = XDL_MIN(lctx, xe->xdf2.nrec - (xche->i2 + xche->chg2));
+***************
+*** 225,230 ****
+--- 239,245 ----
+ e1 = xche->i1 + xche->chg1 + lctx;
+ e2 = xche->i2 + xche->chg2 + lctx;
+
++ #if 0
+ if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) {
+ long fe1 = get_func_line(xe, xecfg, NULL,
+ xche->i1 + xche->chg1,
+***************
+*** 253,268 ****
+--- 268,286 ----
+ }
+ }
+ }
++ #endif
+
+ /*
+ * Emit current hunk header.
+ */
+
++ #if 0
+ if (xecfg->flags & XDL_EMIT_FUNCNAMES) {
+ get_func_line(xe, xecfg, &func_line,
+ s1 - 1, funclineprev);
+ funclineprev = s1 - 1;
+ }
++ #endif
+ if (xdl_emit_hunk_hdr(s1 + 1, e1 - s1, s2 + 1, e2 - s2,
+ func_line.buf, func_line.len, ecb) < 0)
+ return -1;
+*** ../vim-8.1.0365/src/version.c 2018-09-10 22:03:36.490401066 +0200
+--- src/version.c 2018-09-10 22:18:11.225981264 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 366,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+33. You name your children Eudora, Mozilla and Dotcom.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0367 b/data/vim/patches/8.1.0367
new file mode 100644
index 000000000..af46de07b
--- /dev/null
+++ b/data/vim/patches/8.1.0367
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0367
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0367
+Problem: getchar(1) no longer processes pending messages. (Yasuhiro
+ Matsumoto)
+Solution: Call parse_queued_messages().
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0366/src/evalfunc.c 2018-09-10 21:04:09.864392710 +0200
+--- src/evalfunc.c 2018-09-11 12:36:26.133399983 +0200
+***************
+*** 4680,4685 ****
+--- 4680,4692 ----
+ varnumber_T n;
+ int error = FALSE;
+
++ #ifdef MESSAGE_QUEUE
++ // vpeekc() used to check for messages, but that caused problems, invoking
++ // a callback where it was not expected. Some plugins use getchar(1) in a
++ // loop to await a message, therefore make sure we check for messages here.
++ parse_queued_messages();
++ #endif
++
+ /* Position the cursor. Needed after a message that ends in a space. */
+ windgoto(msg_row, msg_col);
+
+*** ../vim-8.1.0366/src/version.c 2018-09-10 22:18:47.785610418 +0200
+--- src/version.c 2018-09-11 12:38:36.956320723 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 367,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+36. You miss more than five meals a week downloading the latest games from
+ Apogee.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0368 b/data/vim/patches/8.1.0368
new file mode 100644
index 000000000..a53a6dd94
--- /dev/null
+++ b/data/vim/patches/8.1.0368
@@ -0,0 +1,695 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0368
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0368
+Problem: GTK code has too many #ifdefs and building fails with GTK 2.10.
+Solution: Always use gtk_widget_get_window() and define it for older GTK
+ versions. (Ken Takata, closes #3421)
+Files: src/gui_beval.c, src/gui_gtk.c, src/gui_gtk_f.c,
+ src/gui_gtk_x11.c, src/mbyte.c, src/vim.h
+
+
+*** ../vim-8.1.0367/src/gui_beval.c 2018-08-28 23:09:03.889824461 +0200
+--- src/gui_beval.c 2018-09-11 21:18:17.858739747 +0200
+***************
+*** 991,1001 ****
+ # endif
+
+ /* Compute position of the balloon area */
+- # if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_get_origin(gtk_widget_get_window(beval->target), &x, &y);
+- # else
+- gdk_window_get_origin(beval->target->window, &x, &y);
+- # endif
+ x += beval->x;
+ y += beval->y;
+
+--- 991,997 ----
+*** ../vim-8.1.0367/src/gui_gtk.c 2018-02-04 14:33:59.000000000 +0100
+--- src/gui_gtk.c 2018-09-11 21:18:17.862739715 +0200
+***************
+*** 1932,1942 ****
+ gboolean *push_in UNUSED,
+ gpointer user_data UNUSED)
+ {
+- # if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), x, y);
+- # else
+- gdk_window_get_origin(gui.drawarea->window, x, y);
+- # endif
+
+ if (popup_mouse_pos)
+ {
+--- 1932,1938 ----
+***************
+*** 1946,1957 ****
+ *x += mx;
+ *y += my;
+ }
+- # if GTK_CHECK_VERSION(3,0,0)
+ else if (curwin != NULL && gui.drawarea != NULL &&
+ gtk_widget_get_window(gui.drawarea) != NULL)
+- # else
+- else if (curwin != NULL && gui.drawarea != NULL && gui.drawarea->window != NULL)
+- # endif
+ {
+ /* Find the cursor position in the current window */
+ *x += FILL_X(curwin->w_wincol + curwin->w_wcol + 1) + 1;
+--- 1942,1949 ----
+*** ../vim-8.1.0367/src/gui_gtk_f.c 2017-04-09 15:23:59.000000000 +0200
+--- src/gui_gtk_f.c 2018-09-11 21:18:17.862739715 +0200
+***************
+*** 345,368 ****
+ gtk_widget_set_window(widget,
+ gdk_window_new(gtk_widget_get_parent_window(widget),
+ &attributes, attributes_mask));
+- gdk_window_set_user_data(gtk_widget_get_window(widget), widget);
+ #else
+ widget->window = gdk_window_new(gtk_widget_get_parent_window(widget),
+ &attributes, attributes_mask);
+- gdk_window_set_user_data(widget->window, widget);
+ #endif
+
+ attributes.x = 0;
+ attributes.y = 0;
+ attributes.event_mask = gtk_widget_get_events(widget);
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ form->bin_window = gdk_window_new(gtk_widget_get_window(widget),
+ &attributes, attributes_mask);
+- #else
+- form->bin_window = gdk_window_new(widget->window,
+- &attributes, attributes_mask);
+- #endif
+ gdk_window_set_user_data(form->bin_window, widget);
+
+ #if GTK_CHECK_VERSION(3,0,0)
+--- 345,362 ----
+ gtk_widget_set_window(widget,
+ gdk_window_new(gtk_widget_get_parent_window(widget),
+ &attributes, attributes_mask));
+ #else
+ widget->window = gdk_window_new(gtk_widget_get_parent_window(widget),
+ &attributes, attributes_mask);
+ #endif
++ gdk_window_set_user_data(gtk_widget_get_window(widget), widget);
+
+ attributes.x = 0;
+ attributes.y = 0;
+ attributes.event_mask = gtk_widget_get_events(widget);
+
+ form->bin_window = gdk_window_new(gtk_widget_get_window(widget),
+ &attributes, attributes_mask);
+ gdk_window_set_user_data(form->bin_window, widget);
+
+ #if GTK_CHECK_VERSION(3,0,0)
+***************
+*** 422,432 ****
+ GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED);
+ #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_show(gtk_widget_get_window(widget));
+- #else
+- gdk_window_show(widget->window);
+- #endif
+ gdk_window_show(form->bin_window);
+
+ for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
+--- 416,422 ----
+***************
+*** 593,607 ****
+ if (GTK_WIDGET_REALIZED(widget))
+ #endif
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_move_resize(gtk_widget_get_window(widget),
+ allocation->x, allocation->y,
+ allocation->width, allocation->height);
+- #else
+- gdk_window_move_resize(widget->window,
+- allocation->x, allocation->y,
+- allocation->width, allocation->height);
+- #endif
+ gdk_window_move_resize(GTK_FORM(widget)->bin_window,
+ 0, 0,
+ allocation->width, allocation->height);
+--- 583,591 ----
+*** ../vim-8.1.0367/src/gui_gtk_x11.c 2018-08-19 22:58:39.779568143 +0200
+--- src/gui_gtk_x11.c 2018-09-11 21:23:25.600273282 +0200
+***************
+*** 763,773 ****
+ {
+ if (event->type == GDK_PROPERTY_NOTIFY
+ && event->state == (int)GDK_PROPERTY_NEW_VALUE
+- # if GTK_CHECK_VERSION(3,0,0)
+ && GDK_WINDOW_XID(event->window) == commWindow
+- # else
+- && GDK_WINDOW_XWINDOW(event->window) == commWindow
+- # endif
+ && GET_X_ATOM(event->atom) == commProperty)
+ {
+ XEvent xev;
+--- 763,769 ----
+***************
+*** 777,788 ****
+ xev.xproperty.atom = commProperty;
+ xev.xproperty.window = commWindow;
+ xev.xproperty.state = PropertyNewValue;
+- # if GTK_CHECK_VERSION(3,0,0)
+ serverEventProc(GDK_WINDOW_XDISPLAY(gtk_widget_get_window(widget)),
+ &xev, 0);
+- # else
+- serverEventProc(GDK_WINDOW_XDISPLAY(widget->window), &xev, 0);
+- # endif
+ }
+ return FALSE;
+ }
+--- 773,780 ----
+***************
+*** 2653,2669 ****
+ /* Fall back to old method */
+
+ /* first get the existing value */
+- # if GTK_CHECK_VERSION(3,0,0)
+ GdkWindow * const mainwin_win = gtk_widget_get_window(gui.mainwin);
+
+ if (XGetWMProtocols(GDK_WINDOW_XDISPLAY(mainwin_win),
+ GDK_WINDOW_XID(mainwin_win),
+ &existing_atoms, &count))
+- # else
+- if (XGetWMProtocols(GDK_WINDOW_XDISPLAY(gui.mainwin->window),
+- GDK_WINDOW_XWINDOW(gui.mainwin->window),
+- &existing_atoms, &count))
+- # endif
+ {
+ Atom *new_atoms;
+ Atom save_yourself_xatom;
+--- 2645,2655 ----
+***************
+*** 2685,2697 ****
+ {
+ memcpy(new_atoms, existing_atoms, count * sizeof(Atom));
+ new_atoms[count] = save_yourself_xatom;
+- # if GTK_CHECK_VERSION(3,0,0)
+ XSetWMProtocols(GDK_WINDOW_XDISPLAY(mainwin_win),
+ GDK_WINDOW_XID(mainwin_win),
+- # else
+- XSetWMProtocols(GDK_WINDOW_XDISPLAY(gui.mainwin->window),
+- GDK_WINDOW_XWINDOW(gui.mainwin->window),
+- # endif
+ new_atoms, count + 1);
+ vim_free(new_atoms);
+ }
+--- 2671,2678 ----
+***************
+*** 2736,2748 ****
+ * know we are done saving ourselves. We don't want to be
+ * restarted, thus set argv to NULL.
+ */
+- # if GTK_CHECK_VERSION(3,0,0)
+ XSetCommand(GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin)),
+ GDK_WINDOW_XID(gtk_widget_get_window(gui.mainwin)),
+- # else
+- XSetCommand(GDK_WINDOW_XDISPLAY(gui.mainwin->window),
+- GDK_WINDOW_XWINDOW(gui.mainwin->window),
+- # endif
+ NULL, 0);
+ return GDK_FILTER_REMOVE;
+ }
+--- 2717,2724 ----
+***************
+*** 2776,2793 ****
+ #undef magick
+ # undef static
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ GdkWindow * const mainwin_win = gtk_widget_get_window(gui.mainwin);
+- #endif
+
+ /* When started with "--echo-wid" argument, write window ID on stdout. */
+ if (echo_wid_arg)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ printf("WID: %ld\n", (long)GDK_WINDOW_XID(mainwin_win));
+- #else
+- printf("WID: %ld\n", (long)GDK_WINDOW_XWINDOW(gui.mainwin->window));
+- #endif
+ fflush(stdout);
+ }
+
+--- 2752,2763 ----
+***************
+*** 2824,2840 ****
+ if (serverName == NULL && serverDelayedStartName != NULL)
+ {
+ /* This is a :gui command in a plain vim with no previous server */
+- # if GTK_CHECK_VERSION(3,0,0)
+ commWindow = GDK_WINDOW_XID(mainwin_win);
+
+ (void)serverRegisterName(GDK_WINDOW_XDISPLAY(mainwin_win),
+ serverDelayedStartName);
+- # else
+- commWindow = GDK_WINDOW_XWINDOW(gui.mainwin->window);
+-
+- (void)serverRegisterName(GDK_WINDOW_XDISPLAY(gui.mainwin->window),
+- serverDelayedStartName);
+- # endif
+ }
+ else
+ {
+--- 2794,2803 ----
+***************
+*** 2843,2855 ****
+ * have to change the "server" registration to that of the main window
+ * If we have not registered a name yet, remember the window.
+ */
+- # if GTK_CHECK_VERSION(3,0,0)
+ serverChangeRegisteredWindow(GDK_WINDOW_XDISPLAY(mainwin_win),
+ GDK_WINDOW_XID(mainwin_win));
+- # else
+- serverChangeRegisteredWindow(GDK_WINDOW_XDISPLAY(gui.mainwin->window),
+- GDK_WINDOW_XWINDOW(gui.mainwin->window));
+- # endif
+ }
+ gtk_widget_add_events(gui.mainwin, GDK_PROPERTY_CHANGE_MASK);
+ # if GTK_CHECK_VERSION(3,0,0)
+--- 2806,2813 ----
+***************
+*** 2945,2958 ****
+
+ gui.blank_pointer = create_blank_pointer();
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gui.pointer_hidden && gtk_widget_get_window(gui.drawarea) != NULL)
+ gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea),
+ gui.blank_pointer);
+- #else
+- if (gui.pointer_hidden && gui.drawarea->window != NULL)
+- gdk_window_set_cursor(gui.drawarea->window, gui.blank_pointer);
+- #endif
+
+ /*
+ * Create a new PangoContext for this screen, and initialize it
+--- 2903,2911 ----
+***************
+*** 3002,3012 ****
+
+ gui.blank_pointer = create_blank_pointer();
+ if (gui.pointer_hidden)
+- #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_set_cursor(gtk_widget_get_window(widget), gui.blank_pointer);
+- #else
+- gdk_window_set_cursor(widget->window, gui.blank_pointer);
+- #endif
+
+ /* get the actual size of the scrollbars, if they are realized */
+ sbar = firstwin->w_scrollbars[SBAR_LEFT].id;
+--- 2955,2961 ----
+***************
+*** 4923,4937 ****
+ int
+ gui_mch_maximized(void)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ return (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL
+ && (gdk_window_get_state(gtk_widget_get_window(gui.mainwin))
+ & GDK_WINDOW_STATE_MAXIMIZED));
+- #else
+- return (gui.mainwin != NULL && gui.mainwin->window != NULL
+- && (gdk_window_get_state(gui.mainwin->window)
+- & GDK_WINDOW_STATE_MAXIMIZED));
+- #endif
+ }
+
+ /*
+--- 4872,4880 ----
+***************
+*** 6051,6061 ****
+ cairo_t *cr;
+ #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gui.text_context == NULL || gtk_widget_get_window(gui.drawarea) == NULL)
+- #else
+- if (gui.text_context == NULL || gui.drawarea->window == NULL)
+- #endif
+ return len;
+
+ if (output_conv.vc_type != CONV_NONE)
+--- 5994,6000 ----
+***************
+*** 6366,6384 ****
+ int
+ gui_get_x11_windis(Window *win, Display **dis)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL)
+- #else
+- if (gui.mainwin != NULL && gui.mainwin->window != NULL)
+- #endif
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ *dis = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin));
+ *win = GDK_WINDOW_XID(gtk_widget_get_window(gui.mainwin));
+- #else
+- *dis = GDK_WINDOW_XDISPLAY(gui.mainwin->window);
+- *win = GDK_WINDOW_XWINDOW(gui.mainwin->window);
+- #endif
+ return OK;
+ }
+
+--- 6305,6314 ----
+***************
+*** 6394,6406 ****
+ Display *
+ gui_mch_get_display(void)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL)
+ return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin));
+- #else
+- if (gui.mainwin != NULL && gui.mainwin->window != NULL)
+- return GDK_WINDOW_XDISPLAY(gui.mainwin->window);
+- #endif
+ else
+ return NULL;
+ }
+--- 6324,6331 ----
+***************
+*** 6555,6565 ****
+ cairo_t *cr;
+ #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_window(gui.drawarea) == NULL)
+- #else
+- if (gui.drawarea->window == NULL)
+- #endif
+ return;
+
+ #if GTK_CHECK_VERSION(3,0,0)
+--- 6480,6486 ----
+***************
+*** 6600,6610 ****
+ void
+ gui_mch_draw_part_cursor(int w, int h, guicolor_T color)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_window(gui.drawarea) == NULL)
+- #else
+- if (gui.drawarea->window == NULL)
+- #endif
+ return;
+
+ gui_mch_set_fg_color(color);
+--- 6521,6527 ----
+***************
+*** 6880,6897 ****
+ if (!gui.by_signal)
+ gdk_window_invalidate_rect(win, &rect, FALSE);
+ }
+ #endif
+
+ void
+ gui_mch_clear_all(void)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_window(gui.drawarea) != NULL)
+ gui_gtk_window_clear(gtk_widget_get_window(gui.drawarea));
+- #else
+- if (gui.drawarea->window != NULL)
+- gdk_window_clear(gui.drawarea->window);
+- #endif
+ }
+
+ #if !GTK_CHECK_VERSION(3,0,0)
+--- 6797,6811 ----
+ if (!gui.by_signal)
+ gdk_window_invalidate_rect(win, &rect, FALSE);
+ }
++ #else
++ # define gui_gtk_window_clear(win) gdk_window_clear(win)
+ #endif
+
+ void
+ gui_mch_clear_all(void)
+ {
+ if (gtk_widget_get_window(gui.drawarea) != NULL)
+ gui_gtk_window_clear(gtk_widget_get_window(gui.drawarea));
+ }
+
+ #if !GTK_CHECK_VERSION(3,0,0)
+***************
+*** 7084,7095 ****
+ }
+
+ /* Final fallback position - use the X CUT_BUFFER0 store */
+- #if GTK_CHECK_VERSION(3,0,0)
+ yank_cut_buffer0(GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin)),
+ cbd);
+- #else
+- yank_cut_buffer0(GDK_WINDOW_XDISPLAY(gui.mainwin->window), cbd);
+- #endif
+ }
+
+ /*
+--- 6998,7005 ----
+***************
+*** 7269,7283 ****
+ /* Sorry for the Xlib call, but we can't avoid it, since there is no
+ * internal GDK mechanism present to accomplish this. (and for good
+ * reason...) */
+- #if GTK_CHECK_VERSION(3,0,0)
+ XWarpPointer(GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.drawarea)),
+ (Window)0, GDK_WINDOW_XID(gtk_widget_get_window(gui.drawarea)),
+ 0, 0, 0U, 0U, x, y);
+- #else
+- XWarpPointer(GDK_WINDOW_XDISPLAY(gui.drawarea->window),
+- (Window)0, GDK_WINDOW_XWINDOW(gui.drawarea->window),
+- 0, 0, 0U, 0U, x, y);
+- #endif
+ }
+
+
+--- 7179,7187 ----
+***************
+*** 7298,7323 ****
+ if (gui.pointer_hidden != hide)
+ {
+ gui.pointer_hidden = hide;
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_window(gui.drawarea) && gui.blank_pointer != NULL)
+- #else
+- if (gui.drawarea->window && gui.blank_pointer != NULL)
+- #endif
+ {
+ if (hide)
+- #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea),
+ gui.blank_pointer);
+- #else
+- gdk_window_set_cursor(gui.drawarea->window, gui.blank_pointer);
+- #endif
+ else
+ #ifdef FEAT_MOUSESHAPE
+ mch_set_mouse_shape(last_shape);
+- #elif GTK_CHECK_VERSION(3,0,0)
+- gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea), NULL);
+ #else
+! gdk_window_set_cursor(gui.drawarea->window, NULL);
+ #endif
+ }
+ }
+--- 7202,7217 ----
+ if (gui.pointer_hidden != hide)
+ {
+ gui.pointer_hidden = hide;
+ if (gtk_widget_get_window(gui.drawarea) && gui.blank_pointer != NULL)
+ {
+ if (hide)
+ gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea),
+ gui.blank_pointer);
+ else
+ #ifdef FEAT_MOUSESHAPE
+ mch_set_mouse_shape(last_shape);
+ #else
+! gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea), NULL);
+ #endif
+ }
+ }
+***************
+*** 7354,7373 ****
+ int id;
+ GdkCursor *c;
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_window(gui.drawarea) == NULL)
+- # else
+- if (gui.drawarea->window == NULL)
+- # endif
+ return;
+
+ if (shape == MSHAPE_HIDE || gui.pointer_hidden)
+- # if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea),
+ gui.blank_pointer);
+- # else
+- gdk_window_set_cursor(gui.drawarea->window, gui.blank_pointer);
+- # endif
+ else
+ {
+ if (shape >= MSHAPE_NUMBERED)
+--- 7248,7259 ----
+***************
+*** 7384,7394 ****
+ return;
+ c = gdk_cursor_new_for_display(
+ gtk_widget_get_display(gui.drawarea), (GdkCursorType)id);
+- # if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea), c);
+- # else
+- gdk_window_set_cursor(gui.drawarea->window, c);
+- # endif
+ # if GTK_CHECK_VERSION(3,0,0)
+ g_object_unref(G_OBJECT(c));
+ # else
+--- 7270,7276 ----
+***************
+*** 7420,7431 ****
+
+ sign = (GdkPixbuf *)sign_get_image(typenr);
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (sign != NULL && gui.drawarea != NULL
+ && gtk_widget_get_window(gui.drawarea) != NULL)
+- # else
+- if (sign != NULL && gui.drawarea != NULL && gui.drawarea->window != NULL)
+- # endif
+ {
+ int width;
+ int height;
+--- 7302,7309 ----
+*** ../vim-8.1.0367/src/mbyte.c 2018-08-19 22:58:39.779568143 +0200
+--- src/mbyte.c 2018-09-11 21:18:17.870739650 +0200
+***************
+*** 4959,4969 ****
+
+ gui_gtk_get_screen_geom_of_win(gui.drawarea,
+ &screen_x, &screen_y, &screen_width, &screen_height);
+- #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), &x, &y);
+- #else
+- gdk_window_get_origin(gui.drawarea->window, &x, &y);
+- #endif
+ gtk_window_get_size(GTK_WINDOW(preedit_window), &width, &height);
+ x = x + FILL_X(gui.col);
+ y = y + FILL_Y(gui.row);
+--- 4959,4965 ----
+***************
+*** 5565,5575 ****
+ #endif
+
+ g_return_if_fail(gui.drawarea != NULL);
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_return_if_fail(gtk_widget_get_window(gui.drawarea) != NULL);
+- #else
+- g_return_if_fail(gui.drawarea->window != NULL);
+- #endif
+
+ xic = gtk_im_multicontext_new();
+ g_object_ref(xic);
+--- 5561,5567 ----
+***************
+*** 5583,5593 ****
+ g_signal_connect(G_OBJECT(xic), "preedit_end",
+ G_CALLBACK(&im_preedit_end_cb), NULL);
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_im_context_set_client_window(xic, gtk_widget_get_window(gui.drawarea));
+- #else
+- gtk_im_context_set_client_window(xic, gui.drawarea->window);
+- #endif
+ }
+
+ void
+--- 5575,5581 ----
+***************
+*** 5686,5702 ****
+ GdkEventKey *event;
+
+ event = (GdkEventKey *)gdk_event_new(GDK_KEY_PRESS);
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_object_ref(gtk_widget_get_window(gui.drawarea));
+ /* unreffed by gdk_event_free() */
+- # else
+- g_object_ref(gui.drawarea->window); /* unreffed by gdk_event_free() */
+- # endif
+- # if GTK_CHECK_VERSION(3,0,0)
+ event->window = gtk_widget_get_window(gui.drawarea);
+- # else
+- event->window = gui.drawarea->window;
+- # endif
+ event->send_event = TRUE;
+ event->time = GDK_CURRENT_TIME;
+ event->state = state;
+--- 5674,5682 ----
+*** ../vim-8.1.0367/src/vim.h 2018-08-21 15:12:10.831801698 +0200
+--- src/vim.h 2018-09-11 21:18:17.870739650 +0200
+***************
+*** 1241,1247 ****
+ #define MIN_SWAP_PAGE_SIZE 1048
+ #define MAX_SWAP_PAGE_SIZE 50000
+
+! /* Special values for current_SID. */
+ #define SID_MODELINE -1 /* when using a modeline */
+ #define SID_CMDARG -2 /* for "--cmd" argument */
+ #define SID_CARG -3 /* for "-c" argument */
+--- 1241,1247 ----
+ #define MIN_SWAP_PAGE_SIZE 1048
+ #define MAX_SWAP_PAGE_SIZE 50000
+
+! /* Special values for current_sctx.sc_sid. */
+ #define SID_MODELINE -1 /* when using a modeline */
+ #define SID_CMDARG -2 /* for "--cmd" argument */
+ #define SID_CARG -3 /* for "-c" argument */
+***************
+*** 2329,2334 ****
+--- 2329,2340 ----
+ # endif
+ #endif
+
++ #ifdef FEAT_GUI_GTK
++ # if !GTK_CHECK_VERSION(2,14,0)
++ # define gtk_widget_get_window(wid) ((wid)->window)
++ # endif
++ #endif
++
+ #ifndef FEAT_NETBEANS_INTG
+ # undef NBDEBUG
+ #endif
+*** ../vim-8.1.0367/src/version.c 2018-09-11 20:10:17.138525018 +0200
+--- src/version.c 2018-09-11 21:27:43.030210228 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 368,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
+ on the way back to bed.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0369 b/data/vim/patches/8.1.0369
new file mode 100644
index 000000000..beeeddae7
--- /dev/null
+++ b/data/vim/patches/8.1.0369
@@ -0,0 +1,297 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0369
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0369
+Problem: Continuation lines cannot contain comments.
+Solution: Support using "\ .
+Files: src/ex_cmds2.c, src/testdir/test_eval_stuff.vim,
+ runtime/indent/vim.vim, runtime/doc/repeat.txt
+
+
+*** ../vim-8.1.0368/src/ex_cmds2.c 2018-09-10 21:04:09.868392665 +0200
+--- src/ex_cmds2.c 2018-09-11 22:04:18.810842128 +0200
+***************
+*** 4864,4880 ****
+ /* compensate for the one line read-ahead */
+ --sourcing_lnum;
+
+! /* Get the next line and concatenate it when it starts with a
+! * backslash. We always need to read the next line, keep it in
+! * sp->nextline. */
+ sp->nextline = get_one_sourceline(sp);
+! if (sp->nextline != NULL && *(p = skipwhite(sp->nextline)) == '\\')
+ {
+ garray_T ga;
+
+ ga_init2(&ga, (int)sizeof(char_u), 400);
+ ga_concat(&ga, line);
+! ga_concat(&ga, p + 1);
+ for (;;)
+ {
+ vim_free(sp->nextline);
+--- 4864,4884 ----
+ /* compensate for the one line read-ahead */
+ --sourcing_lnum;
+
+! // Get the next line and concatenate it when it starts with a
+! // backslash. We always need to read the next line, keep it in
+! // sp->nextline.
+! /* Also check for a comment in between continuation lines: "\ */
+ sp->nextline = get_one_sourceline(sp);
+! if (sp->nextline != NULL
+! && (*(p = skipwhite(sp->nextline)) == '\\'
+! || (p[0] == '"' && p[1] == '\\' && p[2] == ' ')))
+ {
+ garray_T ga;
+
+ ga_init2(&ga, (int)sizeof(char_u), 400);
+ ga_concat(&ga, line);
+! if (*p == '\\')
+! ga_concat(&ga, p + 1);
+ for (;;)
+ {
+ vim_free(sp->nextline);
+***************
+*** 4882,4899 ****
+ if (sp->nextline == NULL)
+ break;
+ p = skipwhite(sp->nextline);
+! if (*p != '\\')
+! break;
+! /* Adjust the growsize to the current length to speed up
+! * concatenating many lines. */
+! if (ga.ga_len > 400)
+ {
+! if (ga.ga_len > 8000)
+! ga.ga_growsize = 8000;
+! else
+! ga.ga_growsize = ga.ga_len;
+ }
+! ga_concat(&ga, p + 1);
+ }
+ ga_append(&ga, NUL);
+ vim_free(line);
+--- 4886,4906 ----
+ if (sp->nextline == NULL)
+ break;
+ p = skipwhite(sp->nextline);
+! if (*p == '\\')
+ {
+! // Adjust the growsize to the current length to speed up
+! // concatenating many lines.
+! if (ga.ga_len > 400)
+! {
+! if (ga.ga_len > 8000)
+! ga.ga_growsize = 8000;
+! else
+! ga.ga_growsize = ga.ga_len;
+! }
+! ga_concat(&ga, p + 1);
+ }
+! else if (p[0] != '"' || p[1] != '\\' || p[2] != ' ')
+! break;
+ }
+ ga_append(&ga, NUL);
+ vim_free(line);
+*** ../vim-8.1.0368/src/testdir/test_eval_stuff.vim 2018-04-14 13:36:34.000000000 +0200
+--- src/testdir/test_eval_stuff.vim 2018-09-11 22:16:11.397628697 +0200
+***************
+*** 42,44 ****
+--- 42,55 ----
+ call delete('Xfile')
+ call delete('Xmkdir', 'rf')
+ endfunc
++
++ func Test_line_continuation()
++ let array = [5,
++ "\ ignore this
++ \ 6,
++ "\ more to ignore
++ "\ more moreto ignore
++ \ ]
++ "\ and some more
++ call assert_equal([5, 6], array)
++ endfunc
+*** ../vim-8.1.0368/runtime/indent/vim.vim 2016-06-27 20:39:41.000000000 +0200
+--- runtime/indent/vim.vim 2018-09-11 22:19:48.151294837 +0200
+***************
+*** 10,16 ****
+ let b:did_indent = 1
+
+ setlocal indentexpr=GetVimIndent()
+! setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\
+
+ let b:undo_indent = "setl indentkeys< indentexpr<"
+
+--- 10,16 ----
+ let b:did_indent = 1
+
+ setlocal indentexpr=GetVimIndent()
+! setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\,0=\"\\\
+
+ let b:undo_indent = "setl indentkeys< indentexpr<"
+
+***************
+*** 31,45 ****
+ endtry
+ endfunc
+
+ function GetVimIndentIntern()
+ " Find a non-blank line above the current line.
+ let lnum = prevnonblank(v:lnum - 1)
+
+! " If the current line doesn't start with '\' and below a line that starts
+! " with '\', use the indent of the line above it.
+ let cur_text = getline(v:lnum)
+! if cur_text !~ '^\s*\\'
+! while lnum > 0 && getline(lnum) =~ '^\s*\\'
+ let lnum = lnum - 1
+ endwhile
+ endif
+--- 31,47 ----
+ endtry
+ endfunc
+
++ let s:lineContPat = '^\s*\(\\\|"\\ \)'
++
+ function GetVimIndentIntern()
+ " Find a non-blank line above the current line.
+ let lnum = prevnonblank(v:lnum - 1)
+
+! " If the current line doesn't start with '\' or '"\ ' and below a line that
+! " starts with '\' or '"\ ', use the indent of the line above it.
+ let cur_text = getline(v:lnum)
+! if cur_text !~ s:lineContPat
+! while lnum > 0 && getline(lnum) =~ s:lineContPat
+ let lnum = lnum - 1
+ endwhile
+ endif
+***************
+*** 51,60 ****
+ let prev_text = getline(lnum)
+
+ " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
+! " and :else. Add it three times for a line that starts with '\' after
+! " a line that doesn't (or g:vim_indent_cont if it exists).
+ let ind = indent(lnum)
+! if cur_text =~ '^\s*\\' && v:lnum > 1 && prev_text !~ '^\s*\\'
+ if exists("g:vim_indent_cont")
+ let ind = ind + g:vim_indent_cont
+ else
+--- 53,62 ----
+ let prev_text = getline(lnum)
+
+ " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
+! " and :else. Add it three times for a line that starts with '\' or '"\ '
+! " after a line that doesn't (or g:vim_indent_cont if it exists).
+ let ind = indent(lnum)
+! if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
+ if exists("g:vim_indent_cont")
+ let ind = ind + g:vim_indent_cont
+ else
+*** ../vim-8.1.0368/runtime/doc/repeat.txt 2018-05-17 13:42:02.000000000 +0200
+--- runtime/doc/repeat.txt 2018-09-11 22:34:47.266339513 +0200
+***************
+*** 265,271 ****
+ loaded during initialization, see |load-plugins|.
+
+ Also see |pack-add|.
+! {only available when compiled with +eval}
+
+ *:packl* *:packloadall*
+ :packl[oadall][!] Load all packages in the "start" directory under each
+--- 265,271 ----
+ loaded during initialization, see |load-plugins|.
+
+ Also see |pack-add|.
+! {only available when compiled with |+eval|}
+
+ *:packl* *:packloadall*
+ :packl[oadall][!] Load all packages in the "start" directory under each
+***************
+*** 289,295 ****
+ An error only causes sourcing the script where it
+ happens to be aborted, further plugins will be loaded.
+ See |packages|.
+! {only available when compiled with +eval}
+
+ :scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167*
+ Specify the character encoding used in the script.
+--- 289,295 ----
+ An error only causes sourcing the script where it
+ happens to be aborted, further plugins will be loaded.
+ See |packages|.
+! {only available when compiled with |+eval|}
+
+ :scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167*
+ Specify the character encoding used in the script.
+***************
+*** 465,470 ****
+--- 465,480 ----
+ .
+ :endfunction
+ :set cpo-=C
++ <
++ *line-continuation-comment*
++ To add a comment in between the lines start with '\" '. Notice the space
++ after the double quote. Example: >
++ let array = [
++ "\ first entry comment
++ \ 'first',
++ "\ second entry comment
++ \ 'second',
++ \ ]
+
+ Rationale:
+ Most programs work with a trailing backslash to indicate line
+***************
+*** 473,478 ****
+--- 483,496 ----
+ :map xx asdf\
+ < Therefore the unusual leading backslash is used.
+
++ Starting a comment in a continuation line results in all following
++ continuation lines to be part of the comment. Since it was like this
++ for a long time, when making it possible to add a comment halfway a
++ sequence of continuation lines, it was not possible to use \", since
++ that was a valid continuation line. Using '"\ ' comes closest, even
++ though it may look a bit weird. Requiring the space after the
++ backslash is to make it very unlikely this is a normal comment line.
++
+ ==============================================================================
+ 5. Using Vim packages *packages*
+
+***************
+*** 1010,1013 ****
+ - The "self" time is wrong when a function is used recursively.
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1028,1031 ----
+ - The "self" time is wrong when a function is used recursively.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0368/src/version.c 2018-09-11 21:30:05.253070476 +0200
+--- src/version.c 2018-09-11 22:03:43.867404925 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 369,
+ /**/
+
+--
+He who laughs last, thinks slowest.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0370 b/data/vim/patches/8.1.0370
new file mode 100644
index 000000000..463884725
--- /dev/null
+++ b/data/vim/patches/8.1.0370
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0370
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0370
+Problem: Not using internal diff if 'diffopt' is not changed.
+Solution: Correct initialization of diff_flags. (Christian Brabandt)
+Files: src/diff.c
+
+
+*** ../vim-8.1.0369/src/diff.c 2018-09-10 17:50:32.713306941 +0200
+--- src/diff.c 2018-09-12 17:56:59.002582092 +0200
+***************
+*** 31,37 ****
+ #define DIFF_VERTICAL 16 // vertical splits
+ #define DIFF_HIDDEN_OFF 32 // diffoff when hidden
+ #define DIFF_INTERNAL 64 // use internal xdiff algorithm
+! static int diff_flags = DIFF_FILLER;
+
+ static long diff_algorithm = 0;
+
+--- 31,37 ----
+ #define DIFF_VERTICAL 16 // vertical splits
+ #define DIFF_HIDDEN_OFF 32 // diffoff when hidden
+ #define DIFF_INTERNAL 64 // use internal xdiff algorithm
+! static int diff_flags = DIFF_INTERNAL | DIFF_FILLER;
+
+ static long diff_algorithm = 0;
+
+*** ../vim-8.1.0369/src/version.c 2018-09-11 22:36:48.129548374 +0200
+--- src/version.c 2018-09-12 17:57:59.986272285 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 370,
+ /**/
+
+--
+Seen it all, done it all, can't remember most of it.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0371 b/data/vim/patches/8.1.0371
new file mode 100644
index 000000000..d5863879c
--- /dev/null
+++ b/data/vim/patches/8.1.0371
@@ -0,0 +1,224 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0371
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0371
+Problem: Argument types for select() may be wrong.
+Solution: Use a configure macro. (Tobias Ulmer)
+Files: src/config.h.in, src/configure.ac, src/auto/configure,
+ src/os_unix.c
+
+
+*** ../vim-8.1.0370/src/config.h.in 2018-05-13 15:37:01.000000000 +0200
+--- src/config.h.in 2018-09-12 20:25:27.109676243 +0200
+***************
+*** 113,118 ****
+--- 113,121 ----
+ /* Define if you can safely include both <sys/time.h> and <sys/select.h>. */
+ #undef SYS_SELECT_WITH_SYS_TIME
+
++ /* Define to a typecast for select() arguments 2, 3 and 4. */
++ #undef SELECT_TYPE_ARG234
++
+ /* Define if you have /dev/ptc */
+ #undef HAVE_DEV_PTC
+
+*** ../vim-8.1.0370/src/configure.ac 2018-08-04 15:13:31.026718187 +0200
+--- src/configure.ac 2018-09-12 20:20:02.744871078 +0200
+***************
+*** 3721,3726 ****
+--- 3721,3727 ----
+ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
+ strnicmp strpbrk strtol tgetent towlower towupper iswupper \
+ usleep utime utimes mblen ftruncate unsetenv)
++ AC_FUNC_SELECT_ARGTYPES
+ AC_FUNC_FSEEKO
+
+ dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
+*** ../vim-8.1.0370/src/auto/configure 2018-08-04 15:13:31.034718130 +0200
+--- src/auto/configure 2018-09-12 20:23:36.130733921 +0200
+***************
+*** 12630,12635 ****
+--- 12630,12710 ----
+ fi
+ done
+
++ for ac_header in sys/select.h sys/socket.h
++ do :
++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++ cat >>confdefs.h <<_ACEOF
++ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++ _ACEOF
++
++ fi
++
++ done
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
++ $as_echo_n "checking types of arguments for select... " >&6; }
++ if ${ac_cv_func_select_args+:} false; then :
++ $as_echo_n "(cached) " >&6
++ else
++ for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
++ for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
++ for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ /* end confdefs.h. */
++ $ac_includes_default
++ #ifdef HAVE_SYS_SELECT_H
++ # include <sys/select.h>
++ #endif
++ #ifdef HAVE_SYS_SOCKET_H
++ # include <sys/socket.h>
++ #endif
++
++ int
++ main ()
++ {
++ extern int select ($ac_arg1,
++ $ac_arg234, $ac_arg234, $ac_arg234,
++ $ac_arg5);
++ ;
++ return 0;
++ }
++ _ACEOF
++ if ac_fn_c_try_compile "$LINENO"; then :
++ ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
++ fi
++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++ done
++ done
++ # Provide a safe default value.
++ : "${ac_cv_func_select_args=int,int *,struct timeval *}"
++
++ fi
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
++ $as_echo "$ac_cv_func_select_args" >&6; }
++ ac_save_IFS=$IFS; IFS=','
++ set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
++ IFS=$ac_save_IFS
++ shift
++
++ cat >>confdefs.h <<_ACEOF
++ #define SELECT_TYPE_ARG1 $1
++ _ACEOF
++
++
++ cat >>confdefs.h <<_ACEOF
++ #define SELECT_TYPE_ARG234 ($2)
++ _ACEOF
++
++
++ cat >>confdefs.h <<_ACEOF
++ #define SELECT_TYPE_ARG5 ($3)
++ _ACEOF
++
++ rm -f conftest*
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+ $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+ if ${ac_cv_sys_largefile_source+:} false; then :
+*** ../vim-8.1.0370/src/os_unix.c 2018-09-06 13:14:39.140722555 +0200
+--- src/os_unix.c 2018-09-12 20:28:52.939783579 +0200
+***************
+*** 18,34 ****
+ * changed beyond recognition.
+ */
+
+- /*
+- * Some systems have a prototype for select() that has (int *) instead of
+- * (fd_set *), which is wrong. This define removes that prototype. We define
+- * our own prototype below.
+- * Don't use it for the Mac, it causes a warning for precompiled headers.
+- * TODO: use a configure check for precompiled headers?
+- */
+- #if !defined(__APPLE__) && !defined(__TANDEM)
+- # define select select_declared_wrong
+- #endif
+-
+ #include "vim.h"
+
+ #ifdef FEAT_MZSCHEME
+--- 18,23 ----
+***************
+*** 54,67 ****
+ # endif
+ #endif
+
+! /*
+! * Use this prototype for select, some include files have a wrong prototype
+! */
+! #ifndef __TANDEM
+ # undef select
+! # ifdef __BEOS__
+! # define select beos_select
+! # endif
+ #endif
+
+ #ifdef __CYGWIN__
+--- 43,51 ----
+ # endif
+ #endif
+
+! #ifdef __BEOS__
+ # undef select
+! # define select beos_select
+ #endif
+
+ #ifdef __CYGWIN__
+***************
+*** 77,86 ****
+ # endif
+ #endif
+
+- #if defined(HAVE_SELECT)
+- extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+- #endif
+-
+ #ifdef FEAT_MOUSE_GPM
+ # include <gpm.h>
+ /* <linux/keyboard.h> contains defines conflicting with "keymap.h",
+--- 61,66 ----
+***************
+*** 6316,6322 ****
+ if (interrupted != NULL)
+ *interrupted = FALSE;
+
+! ret = select(maxfd + 1, &rfds, &wfds, &efds, tvp);
+ result = ret > 0 && FD_ISSET(fd, &rfds);
+ if (result)
+ --ret;
+--- 6296,6303 ----
+ if (interrupted != NULL)
+ *interrupted = FALSE;
+
+! ret = select(maxfd + 1, SELECT_TYPE_ARG234 &rfds,
+! SELECT_TYPE_ARG234 &wfds, SELECT_TYPE_ARG234 &efds, tvp);
+ result = ret > 0 && FD_ISSET(fd, &rfds);
+ if (result)
+ --ret;
+*** ../vim-8.1.0370/src/version.c 2018-09-12 18:00:08.937570191 +0200
+--- src/version.c 2018-09-12 20:18:50.065639189 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 371,
+ /**/
+
+--
+I wonder how much deeper the ocean would be without sponges.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0372 b/data/vim/patches/8.1.0372
new file mode 100644
index 000000000..d5262bb77
--- /dev/null
+++ b/data/vim/patches/8.1.0372
@@ -0,0 +1,204 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0372
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0372
+Problem: Screen updating slow when 'cursorline' is set.
+Solution: Only redraw the old and new cursor line, not all lines.
+Files: src/edit.c, src/move.c, src/screen.c, src/proto/screen.pro
+
+
+*** ../vim-8.1.0371/src/edit.c 2018-08-08 22:08:28.326846653 +0200
+--- src/edit.c 2018-09-12 21:39:50.838327555 +0200
+***************
+*** 1966,1972 ****
+ if (pc_status == PC_STATUS_RIGHT)
+ ++curwin->w_wcol;
+ if (pc_status == PC_STATUS_RIGHT || pc_status == PC_STATUS_LEFT)
+! redrawWinline(curwin->w_cursor.lnum, FALSE);
+ else
+ #endif
+ screen_puts(pc_bytes, pc_row - msg_scrolled, pc_col, pc_attr);
+--- 1966,1972 ----
+ if (pc_status == PC_STATUS_RIGHT)
+ ++curwin->w_wcol;
+ if (pc_status == PC_STATUS_RIGHT || pc_status == PC_STATUS_LEFT)
+! redrawWinline(curwin, curwin->w_cursor.lnum, FALSE);
+ else
+ #endif
+ screen_puts(pc_bytes, pc_row - msg_scrolled, pc_col, pc_attr);
+***************
+*** 2017,2023 ****
+ if (dollar_vcol >= 0)
+ {
+ dollar_vcol = -1;
+! redrawWinline(curwin->w_cursor.lnum, FALSE);
+ }
+ }
+
+--- 2017,2023 ----
+ if (dollar_vcol >= 0)
+ {
+ dollar_vcol = -1;
+! redrawWinline(curwin, curwin->w_cursor.lnum, FALSE);
+ }
+ }
+
+***************
+*** 7079,7085 ****
+ linenr_T lnum = spell_redraw_lnum;
+
+ spell_redraw_lnum = 0;
+! redrawWinline(lnum, FALSE);
+ }
+ }
+
+--- 7079,7085 ----
+ linenr_T lnum = spell_redraw_lnum;
+
+ spell_redraw_lnum = 0;
+! redrawWinline(curwin, lnum, FALSE);
+ }
+ }
+
+*** ../vim-8.1.0371/src/move.c 2018-07-10 15:07:11.779668824 +0200
+--- src/move.c 2018-09-12 21:43:54.096174935 +0200
+***************
+*** 123,128 ****
+--- 123,132 ----
+ set_empty_rows(wp, done);
+ }
+
++ #ifdef FEAT_SYN_HL
++ static linenr_T last_cursorline = 0;
++ #endif
++
+ /*
+ * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
+ * set.
+***************
+*** 140,146 ****
+ && !pum_visible()
+ # endif
+ )
+! redraw_win_later(wp, SOME_VALID);
+ }
+
+ /*
+--- 144,165 ----
+ && !pum_visible()
+ # endif
+ )
+! {
+! #ifdef FEAT_SYN_HL
+! if (!wp->w_p_rnu && wp->w_redr_type <= VALID && last_cursorline != 0)
+! {
+! // "last_cursorline" may be set for another window, worst case we
+! // redraw too much. This is optimized for moving the cursor around
+! // in the same window.
+! redrawWinline(wp, last_cursorline, FALSE);
+! redrawWinline(wp, wp->w_cursor.lnum, FALSE);
+! last_cursorline = wp->w_cursor.lnum;
+! redraw_win_later(wp, VALID);
+! }
+! else
+! #endif
+! redraw_win_later(wp, SOME_VALID);
+! }
+ }
+
+ /*
+*** ../vim-8.1.0371/src/screen.c 2018-09-06 13:14:39.144722527 +0200
+--- src/screen.c 2018-09-12 21:41:32.553424559 +0200
+***************
+*** 496,501 ****
+--- 496,502 ----
+ */
+ void
+ redrawWinline(
++ win_T *wp,
+ linenr_T lnum,
+ int invalid UNUSED) /* window line height is invalid now */
+ {
+***************
+*** 503,521 ****
+ int i;
+ #endif
+
+! if (curwin->w_redraw_top == 0 || curwin->w_redraw_top > lnum)
+! curwin->w_redraw_top = lnum;
+! if (curwin->w_redraw_bot == 0 || curwin->w_redraw_bot < lnum)
+! curwin->w_redraw_bot = lnum;
+! redraw_later(VALID);
+
+ #ifdef FEAT_FOLDING
+ if (invalid)
+ {
+ /* A w_lines[] entry for this lnum has become invalid. */
+! i = find_wl_entry(curwin, lnum);
+ if (i >= 0)
+! curwin->w_lines[i].wl_valid = FALSE;
+ }
+ #endif
+ }
+--- 504,522 ----
+ int i;
+ #endif
+
+! if (wp->w_redraw_top == 0 || wp->w_redraw_top > lnum)
+! wp->w_redraw_top = lnum;
+! if (wp->w_redraw_bot == 0 || wp->w_redraw_bot < lnum)
+! wp->w_redraw_bot = lnum;
+! redraw_win_later(wp, VALID);
+
+ #ifdef FEAT_FOLDING
+ if (invalid)
+ {
+ /* A w_lines[] entry for this lnum has become invalid. */
+! i = find_wl_entry(wp, lnum);
+ if (i >= 0)
+! wp->w_lines[i].wl_valid = FALSE;
+ }
+ #endif
+ }
+*** ../vim-8.1.0371/src/proto/screen.pro 2018-06-16 15:32:34.460024472 +0200
+--- src/proto/screen.pro 2018-09-12 21:41:33.929412376 +0200
+***************
+*** 8,14 ****
+ void redraw_buf_and_status_later(buf_T *buf, int type);
+ int redraw_asap(int type);
+ void redraw_after_callback(int call_update_screen);
+! void redrawWinline(linenr_T lnum, int invalid);
+ void reset_updating_screen(int may_resize_shell);
+ void update_curbuf(int type);
+ int update_screen(int type_arg);
+--- 8,14 ----
+ void redraw_buf_and_status_later(buf_T *buf, int type);
+ int redraw_asap(int type);
+ void redraw_after_callback(int call_update_screen);
+! void redrawWinline(win_T *wp, linenr_T lnum, int invalid);
+ void reset_updating_screen(int may_resize_shell);
+ void update_curbuf(int type);
+ int update_screen(int type_arg);
+*** ../vim-8.1.0371/src/version.c 2018-09-12 20:29:05.479670601 +0200
+--- src/version.c 2018-09-12 21:51:28.616197716 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 372,
+ /**/
+
+--
+Despite the cost of living, have you noticed how it remains so popular?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0373 b/data/vim/patches/8.1.0373
new file mode 100644
index 000000000..526272bee
--- /dev/null
+++ b/data/vim/patches/8.1.0373
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0373
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0373 (after 8.1.0372)
+Problem: Screen updating still slow when 'cursorline' is set.
+Solution: Fix setting last_cursorline.
+Files: src/move.c
+
+
+*** ../vim-8.1.0372/src/move.c 2018-09-12 21:52:14.323799725 +0200
+--- src/move.c 2018-09-12 22:21:50.011113301 +0200
+***************
+*** 153,164 ****
+ // in the same window.
+ redrawWinline(wp, last_cursorline, FALSE);
+ redrawWinline(wp, wp->w_cursor.lnum, FALSE);
+- last_cursorline = wp->w_cursor.lnum;
+ redraw_win_later(wp, VALID);
+ }
+ else
+ #endif
+ redraw_win_later(wp, SOME_VALID);
+ }
+ }
+
+--- 153,166 ----
+ // in the same window.
+ redrawWinline(wp, last_cursorline, FALSE);
+ redrawWinline(wp, wp->w_cursor.lnum, FALSE);
+ redraw_win_later(wp, VALID);
+ }
+ else
+ #endif
+ redraw_win_later(wp, SOME_VALID);
++ #ifdef FEAT_SYN_HL
++ last_cursorline = wp->w_cursor.lnum;
++ #endif
+ }
+ }
+
+*** ../vim-8.1.0372/src/version.c 2018-09-12 21:52:14.323799725 +0200
+--- src/version.c 2018-09-12 22:27:02.348036616 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 373,
+ /**/
+
+--
+Just remember...if the world didn't suck, we'd all fall off.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0374 b/data/vim/patches/8.1.0374
new file mode 100644
index 000000000..f4c21a4a6
--- /dev/null
+++ b/data/vim/patches/8.1.0374
@@ -0,0 +1,711 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0374
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0374
+Problem: Moving the cursor is slow when 'relativenumber' is set.
+Solution: Only redraw the number column, not all lines.
+Files: src/screen.c, src/move.c
+
+
+*** ../vim-8.1.0373/src/screen.c 2018-09-12 21:52:14.323799725 +0200
+--- src/screen.c 2018-09-12 23:09:41.244578629 +0200
+***************
+*** 132,138 ****
+ static void fill_foldcolumn(char_u *p, win_T *wp, int closed, linenr_T lnum);
+ static void copy_text_attr(int off, char_u *buf, int len, int attr);
+ #endif
+! static int win_line(win_T *, linenr_T, int, int, int nochange);
+ static int char_needs_redraw(int off_from, int off_to, int cols);
+ static void draw_vsep_win(win_T *wp, int row);
+ #ifdef FEAT_STL_OPT
+--- 132,138 ----
+ static void fill_foldcolumn(char_u *p, win_T *wp, int closed, linenr_T lnum);
+ static void copy_text_attr(int off, char_u *buf, int len, int attr);
+ #endif
+! static int win_line(win_T *, linenr_T, int, int, int nochange, int number_only);
+ static int char_needs_redraw(int off_from, int off_to, int cols);
+ static void draw_vsep_win(win_T *wp, int row);
+ #ifdef FEAT_STL_OPT
+***************
+*** 971,977 ****
+ start_search_hl();
+ prepare_search_hl(wp, lnum);
+ # endif
+! win_line(wp, lnum, row, row + wp->w_lines[j].wl_size, FALSE);
+ # if defined(FEAT_SEARCH_EXTRA)
+ end_search_hl();
+ # endif
+--- 971,978 ----
+ start_search_hl();
+ prepare_search_hl(wp, lnum);
+ # endif
+! win_line(wp, lnum, row, row + wp->w_lines[j].wl_size,
+! FALSE, FALSE);
+ # if defined(FEAT_SEARCH_EXTRA)
+ end_search_hl();
+ # endif
+***************
+*** 1881,1887 ****
+ /*
+ * Update a line when it is in an area that needs updating, when it
+ * has changes or w_lines[idx] is invalid.
+! * bot_start may be halfway a wrapped line after using
+ * win_del_lines(), check if the current line includes it.
+ * When syntax folding is being used, the saved syntax states will
+ * already have been updated, we can't see where the syntax state is
+--- 1882,1888 ----
+ /*
+ * Update a line when it is in an area that needs updating, when it
+ * has changes or w_lines[idx] is invalid.
+! * "bot_start" may be halfway a wrapped line after using
+ * win_del_lines(), check if the current line includes it.
+ * When syntax folding is being used, the saved syntax states will
+ * already have been updated, we can't see where the syntax state is
+***************
+*** 2140,2146 ****
+ /*
+ * Display one line.
+ */
+! row = win_line(wp, lnum, srow, wp->w_height, mod_top == 0);
+
+ #ifdef FEAT_FOLDING
+ wp->w_lines[idx].wl_folded = FALSE;
+--- 2141,2148 ----
+ /*
+ * Display one line.
+ */
+! row = win_line(wp, lnum, srow, wp->w_height,
+! mod_top == 0, FALSE);
+
+ #ifdef FEAT_FOLDING
+ wp->w_lines[idx].wl_folded = FALSE;
+***************
+*** 2177,2183 ****
+ }
+ else
+ {
+! /* This line does not need updating, advance to the next one */
+ row += wp->w_lines[idx++].wl_size;
+ if (row > wp->w_height) /* past end of screen */
+ break;
+--- 2179,2192 ----
+ }
+ else
+ {
+! if (wp->w_p_rnu)
+! {
+! // 'relativenumber' set: The text doesn't need to be drawn, but
+! // the number column nearly always does.
+! (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE);
+! }
+!
+! // This line does not need to be drawn, advance to the next one.
+ row += wp->w_lines[idx++].wl_size;
+ if (row > wp->w_height) /* past end of screen */
+ break;
+***************
+*** 3058,3064 ****
+ linenr_T lnum,
+ int startrow,
+ int endrow,
+! int nochange UNUSED) /* not updating for changed text */
+ {
+ int col = 0; /* visual column on screen */
+ unsigned off; /* offset in ScreenLines/ScreenAttrs */
+--- 3067,3074 ----
+ linenr_T lnum,
+ int startrow,
+ int endrow,
+! int nochange UNUSED, // not updating for changed text
+! int number_only) // only update the number column
+ {
+ int col = 0; /* visual column on screen */
+ unsigned off; /* offset in ScreenLines/ScreenAttrs */
+***************
+*** 3253,3464 ****
+ row = startrow;
+ screen_row = row + W_WINROW(wp);
+
+! /*
+! * To speed up the loop below, set extra_check when there is linebreak,
+! * trailing white space and/or syntax processing to be done.
+! */
+ #ifdef FEAT_LINEBREAK
+! extra_check = wp->w_p_lbr;
+ #else
+! extra_check = 0;
+ #endif
+ #ifdef FEAT_SYN_HL
+! if (syntax_present(wp) && !wp->w_s->b_syn_error
+ # ifdef SYN_TIME_LIMIT
+! && !wp->w_s->b_syn_slow
+ # endif
+! )
+! {
+! /* Prepare for syntax highlighting in this line. When there is an
+! * error, stop syntax highlighting. */
+! save_did_emsg = did_emsg;
+! did_emsg = FALSE;
+! syntax_start(wp, lnum);
+! if (did_emsg)
+! wp->w_s->b_syn_error = TRUE;
+! else
+ {
+! did_emsg = save_did_emsg;
+ #ifdef SYN_TIME_LIMIT
+! if (!wp->w_s->b_syn_slow)
+ #endif
+! {
+! has_syntax = TRUE;
+! extra_check = TRUE;
+ }
+ }
+- }
+
+! /* Check for columns to display for 'colorcolumn'. */
+! color_cols = wp->w_p_cc_cols;
+! if (color_cols != NULL)
+! draw_color_col = advance_color_col(VCOL_HLC, &color_cols);
+ #endif
+
+ #ifdef FEAT_TERMINAL
+! if (term_show_buffer(wp->w_buffer))
+! {
+! extra_check = TRUE;
+! get_term_attr = TRUE;
+! term_attr = term_get_attr(wp->w_buffer, lnum, -1);
+! }
+ #endif
+
+ #ifdef FEAT_SPELL
+! if (wp->w_p_spell
+! && *wp->w_s->b_p_spl != NUL
+! && wp->w_s->b_langp.ga_len > 0
+! && *(char **)(wp->w_s->b_langp.ga_data) != NULL)
+! {
+! /* Prepare for spell checking. */
+! has_spell = TRUE;
+! extra_check = TRUE;
+!
+! /* Get the start of the next line, so that words that wrap to the next
+! * line are found too: "et<line-break>al.".
+! * Trick: skip a few chars for C/shell/Vim comments */
+! nextline[SPWORDLEN] = NUL;
+! if (lnum < wp->w_buffer->b_ml.ml_line_count)
+ {
+! line = ml_get_buf(wp->w_buffer, lnum + 1, FALSE);
+! spell_cat_line(nextline + SPWORDLEN, line, SPWORDLEN);
+! }
+!
+! /* When a word wrapped from the previous line the start of the current
+! * line is valid. */
+! if (lnum == checked_lnum)
+! cur_checked_col = checked_col;
+! checked_lnum = 0;
+
+! /* When there was a sentence end in the previous line may require a
+! * word starting with capital in this line. In line 1 always check
+! * the first word. */
+! if (lnum != capcol_lnum)
+! cap_col = -1;
+! if (lnum == 1)
+! cap_col = 0;
+! capcol_lnum = 0;
+! }
+ #endif
+
+! /*
+! * handle visual active in this window
+! */
+! fromcol = -10;
+! tocol = MAXCOL;
+! if (VIsual_active && wp->w_buffer == curwin->w_buffer)
+! {
+! /* Visual is after curwin->w_cursor */
+! if (LTOREQ_POS(curwin->w_cursor, VIsual))
+! {
+! top = &curwin->w_cursor;
+! bot = &VIsual;
+! }
+! else /* Visual is before curwin->w_cursor */
+! {
+! top = &VIsual;
+! bot = &curwin->w_cursor;
+! }
+! lnum_in_visual_area = (lnum >= top->lnum && lnum <= bot->lnum);
+! if (VIsual_mode == Ctrl_V) /* block mode */
+ {
+! if (lnum_in_visual_area)
+ {
+! fromcol = wp->w_old_cursor_fcol;
+! tocol = wp->w_old_cursor_lcol;
+ }
+! }
+! else /* non-block mode */
+! {
+! if (lnum > top->lnum && lnum <= bot->lnum)
+! fromcol = 0;
+! else if (lnum == top->lnum)
+ {
+! if (VIsual_mode == 'V') /* linewise */
+! fromcol = 0;
+! else
+ {
+! getvvcol(wp, top, (colnr_T *)&fromcol, NULL, NULL);
+! if (gchar_pos(top) == NUL)
+! tocol = fromcol + 1;
+ }
+ }
+! if (VIsual_mode != 'V' && lnum == bot->lnum)
+ {
+! if (*p_sel == 'e' && bot->col == 0
+! #ifdef FEAT_VIRTUALEDIT
+! && bot->coladd == 0
+! #endif
+! )
+ {
+! fromcol = -10;
+! tocol = MAXCOL;
+ }
+! else if (bot->col == MAXCOL)
+! tocol = MAXCOL;
+! else
+ {
+! pos = *bot;
+! if (*p_sel == 'e')
+! getvvcol(wp, &pos, (colnr_T *)&tocol, NULL, NULL);
+ else
+ {
+! getvvcol(wp, &pos, NULL, NULL, (colnr_T *)&tocol);
+! ++tocol;
+ }
+ }
+ }
+- }
+
+! /* Check if the character under the cursor should not be inverted */
+! if (!highlight_match && lnum == curwin->w_cursor.lnum && wp == curwin
+ #ifdef FEAT_GUI
+! && !gui.in_use
+ #endif
+! )
+! noinvcur = TRUE;
+
+! /* if inverting in this line set area_highlighting */
+! if (fromcol >= 0)
+! {
+! area_highlighting = TRUE;
+! attr = HL_ATTR(HLF_V);
+ #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
+! if ((clip_star.available && !clip_star.owned
+! && clip_isautosel_star())
+! || (clip_plus.available && !clip_plus.owned
+! && clip_isautosel_plus()))
+! attr = HL_ATTR(HLF_VNC);
+ #endif
+ }
+- }
+
+! /*
+! * handle 'incsearch' and ":s///c" highlighting
+! */
+! else if (highlight_match
+! && wp == curwin
+! && lnum >= curwin->w_cursor.lnum
+! && lnum <= curwin->w_cursor.lnum + search_match_lines)
+! {
+! if (lnum == curwin->w_cursor.lnum)
+! getvcol(curwin, &(curwin->w_cursor),
+! (colnr_T *)&fromcol, NULL, NULL);
+! else
+! fromcol = 0;
+! if (lnum == curwin->w_cursor.lnum + search_match_lines)
+! {
+! pos.lnum = lnum;
+! pos.col = search_match_endcol;
+! getvcol(curwin, &pos, (colnr_T *)&tocol, NULL, NULL);
+ }
+- else
+- tocol = MAXCOL;
+- /* do at least one character; happens when past end of line */
+- if (fromcol == tocol)
+- tocol = fromcol + 1;
+- area_highlighting = TRUE;
+- attr = HL_ATTR(HLF_I);
+ }
+
+ #ifdef FEAT_DIFF
+--- 3263,3477 ----
+ row = startrow;
+ screen_row = row + W_WINROW(wp);
+
+! if (!number_only)
+! {
+! /*
+! * To speed up the loop below, set extra_check when there is linebreak,
+! * trailing white space and/or syntax processing to be done.
+! */
+ #ifdef FEAT_LINEBREAK
+! extra_check = wp->w_p_lbr;
+ #else
+! extra_check = 0;
+ #endif
+ #ifdef FEAT_SYN_HL
+! if (syntax_present(wp) && !wp->w_s->b_syn_error
+ # ifdef SYN_TIME_LIMIT
+! && !wp->w_s->b_syn_slow
+ # endif
+! )
+ {
+! /* Prepare for syntax highlighting in this line. When there is an
+! * error, stop syntax highlighting. */
+! save_did_emsg = did_emsg;
+! did_emsg = FALSE;
+! syntax_start(wp, lnum);
+! if (did_emsg)
+! wp->w_s->b_syn_error = TRUE;
+! else
+! {
+! did_emsg = save_did_emsg;
+ #ifdef SYN_TIME_LIMIT
+! if (!wp->w_s->b_syn_slow)
+ #endif
+! {
+! has_syntax = TRUE;
+! extra_check = TRUE;
+! }
+ }
+ }
+
+! /* Check for columns to display for 'colorcolumn'. */
+! color_cols = wp->w_p_cc_cols;
+! if (color_cols != NULL)
+! draw_color_col = advance_color_col(VCOL_HLC, &color_cols);
+ #endif
+
+ #ifdef FEAT_TERMINAL
+! if (term_show_buffer(wp->w_buffer))
+! {
+! extra_check = TRUE;
+! get_term_attr = TRUE;
+! term_attr = term_get_attr(wp->w_buffer, lnum, -1);
+! }
+ #endif
+
+ #ifdef FEAT_SPELL
+! if (wp->w_p_spell
+! && *wp->w_s->b_p_spl != NUL
+! && wp->w_s->b_langp.ga_len > 0
+! && *(char **)(wp->w_s->b_langp.ga_data) != NULL)
+ {
+! /* Prepare for spell checking. */
+! has_spell = TRUE;
+! extra_check = TRUE;
+
+! /* Get the start of the next line, so that words that wrap to the next
+! * line are found too: "et<line-break>al.".
+! * Trick: skip a few chars for C/shell/Vim comments */
+! nextline[SPWORDLEN] = NUL;
+! if (lnum < wp->w_buffer->b_ml.ml_line_count)
+! {
+! line = ml_get_buf(wp->w_buffer, lnum + 1, FALSE);
+! spell_cat_line(nextline + SPWORDLEN, line, SPWORDLEN);
+! }
+!
+! /* When a word wrapped from the previous line the start of the current
+! * line is valid. */
+! if (lnum == checked_lnum)
+! cur_checked_col = checked_col;
+! checked_lnum = 0;
+!
+! /* When there was a sentence end in the previous line may require a
+! * word starting with capital in this line. In line 1 always check
+! * the first word. */
+! if (lnum != capcol_lnum)
+! cap_col = -1;
+! if (lnum == 1)
+! cap_col = 0;
+! capcol_lnum = 0;
+! }
+ #endif
+
+! /*
+! * handle visual active in this window
+! */
+! fromcol = -10;
+! tocol = MAXCOL;
+! if (VIsual_active && wp->w_buffer == curwin->w_buffer)
+ {
+! /* Visual is after curwin->w_cursor */
+! if (LTOREQ_POS(curwin->w_cursor, VIsual))
+ {
+! top = &curwin->w_cursor;
+! bot = &VIsual;
+ }
+! else /* Visual is before curwin->w_cursor */
+ {
+! top = &VIsual;
+! bot = &curwin->w_cursor;
+! }
+! lnum_in_visual_area = (lnum >= top->lnum && lnum <= bot->lnum);
+! if (VIsual_mode == Ctrl_V) /* block mode */
+! {
+! if (lnum_in_visual_area)
+ {
+! fromcol = wp->w_old_cursor_fcol;
+! tocol = wp->w_old_cursor_lcol;
+ }
+ }
+! else /* non-block mode */
+ {
+! if (lnum > top->lnum && lnum <= bot->lnum)
+! fromcol = 0;
+! else if (lnum == top->lnum)
+ {
+! if (VIsual_mode == 'V') /* linewise */
+! fromcol = 0;
+! else
+! {
+! getvvcol(wp, top, (colnr_T *)&fromcol, NULL, NULL);
+! if (gchar_pos(top) == NUL)
+! tocol = fromcol + 1;
+! }
+ }
+! if (VIsual_mode != 'V' && lnum == bot->lnum)
+ {
+! if (*p_sel == 'e' && bot->col == 0
+! #ifdef FEAT_VIRTUALEDIT
+! && bot->coladd == 0
+! #endif
+! )
+! {
+! fromcol = -10;
+! tocol = MAXCOL;
+! }
+! else if (bot->col == MAXCOL)
+! tocol = MAXCOL;
+ else
+ {
+! pos = *bot;
+! if (*p_sel == 'e')
+! getvvcol(wp, &pos, (colnr_T *)&tocol, NULL, NULL);
+! else
+! {
+! getvvcol(wp, &pos, NULL, NULL, (colnr_T *)&tocol);
+! ++tocol;
+! }
+ }
+ }
+ }
+
+! /* Check if the character under the cursor should not be inverted */
+! if (!highlight_match && lnum == curwin->w_cursor.lnum && wp == curwin
+ #ifdef FEAT_GUI
+! && !gui.in_use
+ #endif
+! )
+! noinvcur = TRUE;
+
+! /* if inverting in this line set area_highlighting */
+! if (fromcol >= 0)
+! {
+! area_highlighting = TRUE;
+! attr = HL_ATTR(HLF_V);
+ #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
+! if ((clip_star.available && !clip_star.owned
+! && clip_isautosel_star())
+! || (clip_plus.available && !clip_plus.owned
+! && clip_isautosel_plus()))
+! attr = HL_ATTR(HLF_VNC);
+ #endif
++ }
+ }
+
+! /*
+! * handle 'incsearch' and ":s///c" highlighting
+! */
+! else if (highlight_match
+! && wp == curwin
+! && lnum >= curwin->w_cursor.lnum
+! && lnum <= curwin->w_cursor.lnum + search_match_lines)
+! {
+! if (lnum == curwin->w_cursor.lnum)
+! getvcol(curwin, &(curwin->w_cursor),
+! (colnr_T *)&fromcol, NULL, NULL);
+! else
+! fromcol = 0;
+! if (lnum == curwin->w_cursor.lnum + search_match_lines)
+! {
+! pos.lnum = lnum;
+! pos.col = search_match_endcol;
+! getvcol(curwin, &pos, (colnr_T *)&tocol, NULL, NULL);
+! }
+! else
+! tocol = MAXCOL;
+! /* do at least one character; happens when past end of line */
+! if (fromcol == tocol)
+! tocol = fromcol + 1;
+! area_highlighting = TRUE;
+! attr = HL_ATTR(HLF_I);
+ }
+ }
+
+ #ifdef FEAT_DIFF
+***************
+*** 3504,3510 ****
+ ptr = line;
+
+ #ifdef FEAT_SPELL
+! if (has_spell)
+ {
+ /* For checking first word with a capital skip white space. */
+ if (cap_col == 0)
+--- 3517,3523 ----
+ ptr = line;
+
+ #ifdef FEAT_SPELL
+! if (has_spell && !number_only)
+ {
+ /* For checking first word with a capital skip white space. */
+ if (cap_col == 0)
+***************
+*** 3564,3570 ****
+ v = wp->w_skipcol;
+ else
+ v = wp->w_leftcol;
+! if (v > 0)
+ {
+ #ifdef FEAT_MBYTE
+ char_u *prev_ptr = ptr;
+--- 3577,3583 ----
+ v = wp->w_skipcol;
+ else
+ v = wp->w_leftcol;
+! if (v > 0 && !number_only)
+ {
+ #ifdef FEAT_MBYTE
+ char_u *prev_ptr = ptr;
+***************
+*** 3707,3713 ****
+ */
+ cur = wp->w_match_head;
+ shl_flag = FALSE;
+! while (cur != NULL || shl_flag == FALSE)
+ {
+ if (shl_flag == FALSE)
+ {
+--- 3720,3726 ----
+ */
+ cur = wp->w_match_head;
+ shl_flag = FALSE;
+! while ((cur != NULL || shl_flag == FALSE) && !number_only)
+ {
+ if (shl_flag == FALSE)
+ {
+***************
+*** 4068,4080 ****
+ }
+ }
+
+! /* When still displaying '$' of change command, stop at cursor */
+! if (dollar_vcol >= 0 && wp == curwin
+ && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol
+ #ifdef FEAT_DIFF
+ && filler_todo <= 0
+ #endif
+ )
+ {
+ screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width,
+ HAS_RIGHTLEFT(wp->w_p_rl));
+--- 4081,4096 ----
+ }
+ }
+
+! // When still displaying '$' of change command, stop at cursor.
+! // When only displaying the (relative) line number and that's done,
+! // stop here.
+! if ((dollar_vcol >= 0 && wp == curwin
+ && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol
+ #ifdef FEAT_DIFF
+ && filler_todo <= 0
+ #endif
+ )
++ || (number_only && draw_state > WL_NR))
+ {
+ screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width,
+ HAS_RIGHTLEFT(wp->w_p_rl));
+*** ../vim-8.1.0373/src/move.c 2018-09-12 22:27:12.151940716 +0200
+--- src/move.c 2018-09-12 23:08:43.721012117 +0200
+***************
+*** 145,165 ****
+ # endif
+ )
+ {
+ #ifdef FEAT_SYN_HL
+! if (!wp->w_p_rnu && wp->w_redr_type <= VALID && last_cursorline != 0)
+ {
+! // "last_cursorline" may be set for another window, worst case we
+! // redraw too much. This is optimized for moving the cursor around
+! // in the same window.
+! redrawWinline(wp, last_cursorline, FALSE);
+! redrawWinline(wp, wp->w_cursor.lnum, FALSE);
+! redraw_win_later(wp, VALID);
+ }
+- else
+- #endif
+- redraw_win_later(wp, SOME_VALID);
+- #ifdef FEAT_SYN_HL
+- last_cursorline = wp->w_cursor.lnum;
+ #endif
+ }
+ }
+--- 145,169 ----
+ # endif
+ )
+ {
++ if (wp->w_p_rnu)
++ // win_line() will redraw the number column only.
++ redraw_win_later(wp, VALID);
+ #ifdef FEAT_SYN_HL
+! if (wp->w_p_cul)
+ {
+! if (wp->w_redr_type <= VALID && last_cursorline != 0)
+! {
+! // "last_cursorline" may be set for another window, worst case
+! // we redraw too much. This is optimized for moving the cursor
+! // around in the same window.
+! redrawWinline(wp, last_cursorline, FALSE);
+! redrawWinline(wp, wp->w_cursor.lnum, FALSE);
+! redraw_win_later(wp, VALID);
+! }
+! else
+! redraw_win_later(wp, SOME_VALID);
+! last_cursorline = wp->w_cursor.lnum;
+ }
+ #endif
+ }
+ }
+*** ../vim-8.1.0373/src/version.c 2018-09-12 22:27:12.151940716 +0200
+--- src/version.c 2018-09-12 23:06:23.110026307 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 374,
+ /**/
+
+--
+The 50-50-90 rule: Anytime you have a 50-50 chance of getting
+something right, there's a 90% probability you'll get it wrong.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0375 b/data/vim/patches/8.1.0375
new file mode 100644
index 000000000..54eb19fb0
--- /dev/null
+++ b/data/vim/patches/8.1.0375
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0375
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0375
+Problem: Cannot use diff mode with Cygwin diff.exe. (Igor Forca)
+Solution: Skip over unrecognized lines in the diff output.
+Files: src/diff.c, src/testdir/test_diffmode.vim
+
+
+*** ../vim-8.1.0374/src/diff.c 2018-09-12 18:00:08.937570191 +0200
+--- src/diff.c 2018-09-13 13:02:16.005128090 +0200
+***************
+*** 1600,1605 ****
+--- 1600,1609 ----
+ && (tag_fgets(linebuf, LBUFLEN, fd) == 0)
+ && (STRNCMP(line, "@@ ", 3) == 0))
+ diffstyle = DIFF_UNIFIED;
++ else
++ // Format not recognized yet, skip over this line. Cygwin diff
++ // may put a warning at the start of the file.
++ continue;
+ }
+
+ if (diffstyle == DIFF_ED)
+*** ../vim-8.1.0374/src/testdir/test_diffmode.vim 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/test_diffmode.vim 2018-09-13 13:01:54.181296798 +0200
+***************
+*** 519,525 ****
+ endif
+
+ func DiffExpr()
+! silent exe '!diff ' . v:fname_in . ' ' . v:fname_new . '>' . v:fname_out
+ endfunc
+ set diffexpr=DiffExpr()
+ set diffopt=foldcolumn:0
+--- 519,527 ----
+ endif
+
+ func DiffExpr()
+! " Prepent some text to check diff type detection
+! call writefile(['warning', ' message'], v:fname_out)
+! silent exe '!diff ' . v:fname_in . ' ' . v:fname_new . '>>' . v:fname_out
+ endfunc
+ set diffexpr=DiffExpr()
+ set diffopt=foldcolumn:0
+*** ../vim-8.1.0374/src/version.c 2018-09-12 23:15:45.257659803 +0200
+--- src/version.c 2018-09-13 12:27:07.877584085 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 375,
+ /**/
+
+--
+A fine is a tax for doing wrong. A tax is a fine for doing well.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0376 b/data/vim/patches/8.1.0376
new file mode 100644
index 000000000..ddd99523d
--- /dev/null
+++ b/data/vim/patches/8.1.0376
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0376
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0376
+Problem: Compiler warning for uninitialized variable. (Tony Mechelynck)
+Solution: Initialize the variable.
+Files: src/screen.c
+
+
+*** ../vim-8.1.0375/src/screen.c 2018-09-12 23:15:45.257659803 +0200
+--- src/screen.c 2018-09-13 14:55:11.884608178 +0200
+***************
+*** 3147,3153 ****
+ static linenr_T capcol_lnum = 0; /* line number where "cap_col" used */
+ int cur_checked_col = 0; /* checked column for current line */
+ #endif
+! int extra_check; /* has syntax or linebreak */
+ #ifdef FEAT_MBYTE
+ int multi_attr = 0; /* attributes desired by multibyte */
+ int mb_l = 1; /* multi-byte byte length */
+--- 3147,3153 ----
+ static linenr_T capcol_lnum = 0; /* line number where "cap_col" used */
+ int cur_checked_col = 0; /* checked column for current line */
+ #endif
+! int extra_check = 0; // has syntax or linebreak
+ #ifdef FEAT_MBYTE
+ int multi_attr = 0; /* attributes desired by multibyte */
+ int mb_l = 1; /* multi-byte byte length */
+***************
+*** 3271,3278 ****
+ */
+ #ifdef FEAT_LINEBREAK
+ extra_check = wp->w_p_lbr;
+- #else
+- extra_check = 0;
+ #endif
+ #ifdef FEAT_SYN_HL
+ if (syntax_present(wp) && !wp->w_s->b_syn_error
+--- 3271,3276 ----
+*** ../vim-8.1.0375/src/version.c 2018-09-13 13:03:08.228724142 +0200
+--- src/version.c 2018-09-13 14:55:52.872229838 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 376,
+ /**/
+
+--
+Everybody lies, but it doesn't matter since nobody listens.
+ -- Lieberman's Law
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0377 b/data/vim/patches/8.1.0377
new file mode 100644
index 000000000..e4d9ccfd4
--- /dev/null
+++ b/data/vim/patches/8.1.0377
@@ -0,0 +1,771 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0377
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0377
+Problem: Xdiff doesn't use the Vim memory allocation functions.
+Solution: Change the xdl_ defines. Check for out-of-memory. Rename
+ "ignored" to "vim_ignored".
+Files: src/xdiff/xdiff.h, src/xdiff/xpatience.c, src/xdiff/xdiffi.c,
+ src/channel.c, src/diff.c, src/evalfunc.c, src/ex_cmds.c,
+ src/fileio.c, src/main.c, src/mbyte.c, src/netbeans.c,
+ src/os_unix.c, src/os_win32.c, src/ui.c, src/window.c,
+ src/globals.h, src/term.c
+
+
+*** ../vim-8.1.0376/src/xdiff/xdiff.h 2018-09-10 17:50:32.713306941 +0200
+--- src/xdiff/xdiff.h 2018-09-13 15:18:00.938808604 +0200
+***************
+*** 108,117 ****
+ long bsize;
+ } bdiffparam_t;
+
+
+! #define xdl_malloc(x) malloc(x)
+! #define xdl_free(ptr) free(ptr)
+! #define xdl_realloc(ptr,x) realloc(ptr,x)
+
+ void *xdl_mmfile_first(mmfile_t *mmf, long *size);
+ long xdl_mmfile_size(mmfile_t *mmf);
+--- 108,118 ----
+ long bsize;
+ } bdiffparam_t;
+
++ #include "vim.h"
+
+! #define xdl_malloc(x) lalloc((x), TRUE)
+! #define xdl_free(ptr) vim_free(ptr)
+! #define xdl_realloc(ptr,x) vim_realloc((ptr),(x))
+
+ void *xdl_mmfile_first(mmfile_t *mmf, long *size);
+ long xdl_mmfile_size(mmfile_t *mmf);
+*** ../vim-8.1.0376/src/xdiff/xpatience.c 2018-09-10 17:50:32.717306902 +0200
+--- src/xdiff/xpatience.c 2018-09-13 15:12:42.501925972 +0200
+***************
+*** 210,215 ****
+--- 210,219 ----
+ int longest = 0, i;
+ struct entry *entry;
+
++ /* Added to silence Coverity. */
++ if (sequence == NULL)
++ return map->first;
++
+ /*
+ * If not -1, this entry in sequence must never be overridden.
+ * Therefore, overriding entries before this has no effect, so
+*** ../vim-8.1.0376/src/xdiff/xdiffi.c 2018-09-10 17:50:32.713306941 +0200
+--- src/xdiff/xdiffi.c 2018-09-13 15:18:46.014371180 +0200
+***************
+*** 392,400 ****
+ }
+
+ /*
+! * If a line is indented more than this, get_indent() just returns this value.
+ * This avoids having to do absurd amounts of work for data that are not
+! * human-readable text, and also ensures that the output of get_indent fits within
+ * an int.
+ */
+ #define MAX_INDENT 200
+--- 392,400 ----
+ }
+
+ /*
+! * If a line is indented more than this, xget_indent() just returns this value.
+ * This avoids having to do absurd amounts of work for data that are not
+! * human-readable text, and also ensures that the output of xget_indent fits within
+ * an int.
+ */
+ #define MAX_INDENT 200
+***************
+*** 404,410 ****
+ * columns. Return -1 if line is empty or contains only whitespace. Clamp the
+ * output value at MAX_INDENT.
+ */
+! static int get_indent(xrecord_t *rec)
+ {
+ long i;
+ int ret = 0;
+--- 404,410 ----
+ * columns. Return -1 if line is empty or contains only whitespace. Clamp the
+ * output value at MAX_INDENT.
+ */
+! static int xget_indent(xrecord_t *rec)
+ {
+ long i;
+ int ret = 0;
+***************
+*** 492,504 ****
+ m->indent = -1;
+ } else {
+ m->end_of_file = 0;
+! m->indent = get_indent(xdf->recs[split]);
+ }
+
+ m->pre_blank = 0;
+ m->pre_indent = -1;
+ for (i = split - 1; i >= 0; i--) {
+! m->pre_indent = get_indent(xdf->recs[i]);
+ if (m->pre_indent != -1)
+ break;
+ m->pre_blank += 1;
+--- 492,504 ----
+ m->indent = -1;
+ } else {
+ m->end_of_file = 0;
+! m->indent = xget_indent(xdf->recs[split]);
+ }
+
+ m->pre_blank = 0;
+ m->pre_indent = -1;
+ for (i = split - 1; i >= 0; i--) {
+! m->pre_indent = xget_indent(xdf->recs[i]);
+ if (m->pre_indent != -1)
+ break;
+ m->pre_blank += 1;
+***************
+*** 511,517 ****
+ m->post_blank = 0;
+ m->post_indent = -1;
+ for (i = split + 1; i < xdf->nrec; i++) {
+! m->post_indent = get_indent(xdf->recs[i]);
+ if (m->post_indent != -1)
+ break;
+ m->post_blank += 1;
+--- 511,517 ----
+ m->post_blank = 0;
+ m->post_indent = -1;
+ for (i = split + 1; i < xdf->nrec; i++) {
+! m->post_indent = xget_indent(xdf->recs[i]);
+ if (m->post_indent != -1)
+ break;
+ m->post_blank += 1;
+*** ../vim-8.1.0376/src/channel.c 2018-09-06 16:27:20.664831945 +0200
+--- src/channel.c 2018-09-13 15:20:13.661522640 +0200
+***************
+*** 1858,1864 ****
+ {
+ ch_log_lead(lead, channel, part);
+ fprintf(log_fd, "'");
+! ignored = (int)fwrite(buf, len, 1, log_fd);
+ fprintf(log_fd, "'\n");
+ }
+ return OK;
+--- 1858,1864 ----
+ {
+ ch_log_lead(lead, channel, part);
+ fprintf(log_fd, "'");
+! vim_ignored = (int)fwrite(buf, len, 1, log_fd);
+ fprintf(log_fd, "'\n");
+ }
+ return OK;
+***************
+*** 2388,2394 ****
+
+ u_sync(TRUE);
+ /* ignore undo failure, undo is not very useful here */
+! ignored = u_save(lnum - empty, lnum + 1);
+
+ if (empty)
+ {
+--- 2388,2394 ----
+
+ u_sync(TRUE);
+ /* ignore undo failure, undo is not very useful here */
+! vim_ignored = u_save(lnum - empty, lnum + 1);
+
+ if (empty)
+ {
+***************
+*** 3730,3736 ****
+ {
+ ch_log_lead("SEND ", channel, part);
+ fprintf(log_fd, "'");
+! ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd);
+ fprintf(log_fd, "'\n");
+ fflush(log_fd);
+ did_log_msg = TRUE;
+--- 3730,3736 ----
+ {
+ ch_log_lead("SEND ", channel, part);
+ fprintf(log_fd, "'");
+! vim_ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd);
+ fprintf(log_fd, "'\n");
+ fflush(log_fd);
+ did_log_msg = TRUE;
+*** ../vim-8.1.0376/src/diff.c 2018-09-13 13:03:08.228724142 +0200
+--- src/diff.c 2018-09-13 15:20:28.509379140 +0200
+***************
+*** 1203,1212 ****
+ {
+ # ifdef TEMPDIRNAMES
+ if (vim_tempdir != NULL)
+! ignored = mch_chdir((char *)vim_tempdir);
+ else
+ # endif
+! ignored = mch_chdir("/tmp");
+ shorten_fnames(TRUE);
+ }
+ #endif
+--- 1203,1212 ----
+ {
+ # ifdef TEMPDIRNAMES
+ if (vim_tempdir != NULL)
+! vim_ignored = mch_chdir((char *)vim_tempdir);
+ else
+ # endif
+! vim_ignored = mch_chdir("/tmp");
+ shorten_fnames(TRUE);
+ }
+ #endif
+*** ../vim-8.1.0376/src/evalfunc.c 2018-09-11 20:10:17.138525018 +0200
+--- src/evalfunc.c 2018-09-13 15:20:58.541089065 +0200
+***************
+*** 14016,14022 ****
+ else if (do_fsync)
+ /* Ignore the error, the user wouldn't know what to do about it.
+ * May happen for a device. */
+! ignored = fsync(fileno(fd));
+ #endif
+ fclose(fd);
+ }
+--- 14016,14022 ----
+ else if (do_fsync)
+ /* Ignore the error, the user wouldn't know what to do about it.
+ * May happen for a device. */
+! vim_ignored = fsync(fileno(fd));
+ #endif
+ fclose(fd);
+ }
+*** ../vim-8.1.0376/src/ex_cmds.c 2018-08-21 15:12:10.835801673 +0200
+--- src/ex_cmds.c 2018-09-13 15:21:18.432897079 +0200
+***************
+*** 2117,2123 ****
+ if (st_old.st_uid != tmp_st.st_uid)
+ /* Changing the owner might fail, in which case the
+ * file will now owned by the current user, oh well. */
+! ignored = fchown(fileno(fp_out), st_old.st_uid, -1);
+ if (st_old.st_gid != tmp_st.st_gid
+ && fchown(fileno(fp_out), -1, st_old.st_gid) == -1)
+ /* can't set the group to what it should be, remove
+--- 2117,2123 ----
+ if (st_old.st_uid != tmp_st.st_uid)
+ /* Changing the owner might fail, in which case the
+ * file will now owned by the current user, oh well. */
+! vim_ignored = fchown(fileno(fp_out), st_old.st_uid, -1);
+ if (st_old.st_gid != tmp_st.st_gid
+ && fchown(fileno(fp_out), -1, st_old.st_gid) == -1)
+ /* can't set the group to what it should be, remove
+*** ../vim-8.1.0376/src/fileio.c 2018-09-10 21:04:09.868392665 +0200
+--- src/fileio.c 2018-09-13 15:25:58.942199081 +0200
+***************
+*** 2408,2414 ****
+ {
+ /* Use stderr for stdin, makes shell commands work. */
+ close(0);
+! ignored = dup(2);
+ }
+ #endif
+
+--- 2408,2414 ----
+ {
+ /* Use stderr for stdin, makes shell commands work. */
+ close(0);
+! vim_ignored = dup(2);
+ }
+ #endif
+
+***************
+*** 3751,3757 ****
+ {
+ # ifdef UNIX
+ # ifdef HAVE_FCHOWN
+! ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
+ # endif
+ if (mch_stat((char *)IObuff, &st) < 0
+ || st.st_uid != st_old.st_uid
+--- 3751,3757 ----
+ {
+ # ifdef UNIX
+ # ifdef HAVE_FCHOWN
+! vim_ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
+ # endif
+ if (mch_stat((char *)IObuff, &st) < 0
+ || st.st_uid != st_old.st_uid
+***************
+*** 4509,4515 ****
+ #endif
+ #ifdef HAVE_FTRUNCATE
+ if (!append)
+! ignored = ftruncate(fd, (off_t)0);
+ #endif
+
+ #if defined(WIN3264)
+--- 4509,4515 ----
+ #endif
+ #ifdef HAVE_FTRUNCATE
+ if (!append)
+! vim_ignored = ftruncate(fd, (off_t)0);
+ #endif
+
+ #if defined(WIN3264)
+***************
+*** 4789,4795 ****
+ || st.st_gid != st_old.st_gid)
+ {
+ /* changing owner might not be possible */
+! ignored = fchown(fd, st_old.st_uid, -1);
+ /* if changing group fails clear the group permissions */
+ if (fchown(fd, -1, st_old.st_gid) == -1 && perm > 0)
+ perm &= ~070;
+--- 4789,4795 ----
+ || st.st_gid != st_old.st_gid)
+ {
+ /* changing owner might not be possible */
+! vim_ignored = fchown(fd, st_old.st_uid, -1);
+ /* if changing group fails clear the group permissions */
+ if (fchown(fd, -1, st_old.st_gid) == -1 && perm > 0)
+ perm &= ~070;
+***************
+*** 6482,6490 ****
+ {
+ tbuf[FGETS_SIZE - 2] = NUL;
+ #ifdef USE_CR
+! ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp);
+ #else
+! ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp);
+ #endif
+ } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
+ }
+--- 6482,6490 ----
+ {
+ tbuf[FGETS_SIZE - 2] = NUL;
+ #ifdef USE_CR
+! vim_ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp);
+ #else
+! vim_ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp);
+ #endif
+ } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
+ }
+*** ../vim-8.1.0376/src/main.c 2018-09-10 21:04:09.872392623 +0200
+--- src/main.c 2018-09-13 15:22:28.516221441 +0200
+***************
+*** 2632,2638 ****
+ * Is there any other system that cannot do this?
+ */
+ close(0);
+! ignored = dup(2);
+ #endif
+ }
+
+--- 2632,2638 ----
+ * Is there any other system that cannot do this?
+ */
+ close(0);
+! vim_ignored = dup(2);
+ #endif
+ }
+
+*** ../vim-8.1.0376/src/mbyte.c 2018-09-11 21:30:05.253070476 +0200
+--- src/mbyte.c 2018-09-13 15:22:39.728113472 +0200
+***************
+*** 756,762 ****
+ * where mblen() returns 0 for invalid character.
+ * Therefore, following condition includes 0.
+ */
+! ignored = mblen(NULL, 0); /* First reset the state. */
+ if (mblen(buf, (size_t)1) <= 0)
+ n = 2;
+ else
+--- 756,762 ----
+ * where mblen() returns 0 for invalid character.
+ * Therefore, following condition includes 0.
+ */
+! vim_ignored = mblen(NULL, 0); // First reset the state.
+ if (mblen(buf, (size_t)1) <= 0)
+ n = 2;
+ else
+*** ../vim-8.1.0376/src/netbeans.c 2018-03-04 16:12:13.000000000 +0100
+--- src/netbeans.c 2018-09-13 15:23:17.979745287 +0200
+***************
+*** 1988,1997 ****
+ pos = get_off_or_lnum(buf->bufp, &args);
+
+ cp = (char *)args;
+! ignored = (int)strtol(cp, &cp, 10);
+ args = (char_u *)cp;
+ # ifdef NBDEBUG
+! if (ignored != -1)
+ {
+ nbdebug((" partial line annotation -- Not Yet Implemented!\n"));
+ }
+--- 1988,1997 ----
+ pos = get_off_or_lnum(buf->bufp, &args);
+
+ cp = (char *)args;
+! vim_ignored = (int)strtol(cp, &cp, 10);
+ args = (char_u *)cp;
+ # ifdef NBDEBUG
+! if (vim_ignored != -1)
+ {
+ nbdebug((" partial line annotation -- Not Yet Implemented!\n"));
+ }
+*** ../vim-8.1.0376/src/os_unix.c 2018-09-12 20:29:05.479670601 +0200
+--- src/os_unix.c 2018-09-13 15:24:00.571335689 +0200
+***************
+*** 357,363 ****
+ void
+ mch_write(char_u *s, int len)
+ {
+! ignored = (int)write(1, (char *)s, len);
+ if (p_wd) /* Unix is too fast, slow down a bit more */
+ RealWaitForChar(read_cmd_fd, p_wd, NULL, NULL);
+ }
+--- 357,363 ----
+ void
+ mch_write(char_u *s, int len)
+ {
+! vim_ignored = (int)write(1, (char *)s, len);
+ if (p_wd) /* Unix is too fast, slow down a bit more */
+ RealWaitForChar(read_cmd_fd, p_wd, NULL, NULL);
+ }
+***************
+*** 4693,4701 ****
+ */
+ if (fd >= 0)
+ {
+! ignored = dup(fd); /* To replace stdin (fd 0) */
+! ignored = dup(fd); /* To replace stdout (fd 1) */
+! ignored = dup(fd); /* To replace stderr (fd 2) */
+
+ /* Don't need this now that we've duplicated it */
+ close(fd);
+--- 4693,4701 ----
+ */
+ if (fd >= 0)
+ {
+! vim_ignored = dup(fd); /* To replace stdin (fd 0) */
+! vim_ignored = dup(fd); /* To replace stdout (fd 1) */
+! vim_ignored = dup(fd); /* To replace stderr (fd 2) */
+
+ /* Don't need this now that we've duplicated it */
+ close(fd);
+***************
+*** 4752,4764 ****
+
+ /* set up stdin/stdout/stderr for the child */
+ close(0);
+! ignored = dup(pty_slave_fd);
+ close(1);
+! ignored = dup(pty_slave_fd);
+ if (gui.in_use)
+ {
+ close(2);
+! ignored = dup(pty_slave_fd);
+ }
+
+ close(pty_slave_fd); /* has been dupped, close it now */
+--- 4752,4764 ----
+
+ /* set up stdin/stdout/stderr for the child */
+ close(0);
+! vim_ignored = dup(pty_slave_fd);
+ close(1);
+! vim_ignored = dup(pty_slave_fd);
+ if (gui.in_use)
+ {
+ close(2);
+! vim_ignored = dup(pty_slave_fd);
+ }
+
+ close(pty_slave_fd); /* has been dupped, close it now */
+***************
+*** 4769,4781 ****
+ /* set up stdin for the child */
+ close(fd_toshell[1]);
+ close(0);
+! ignored = dup(fd_toshell[0]);
+ close(fd_toshell[0]);
+
+ /* set up stdout for the child */
+ close(fd_fromshell[0]);
+ close(1);
+! ignored = dup(fd_fromshell[1]);
+ close(fd_fromshell[1]);
+
+ # ifdef FEAT_GUI
+--- 4769,4781 ----
+ /* set up stdin for the child */
+ close(fd_toshell[1]);
+ close(0);
+! vim_ignored = dup(fd_toshell[0]);
+ close(fd_toshell[0]);
+
+ /* set up stdout for the child */
+ close(fd_fromshell[0]);
+ close(1);
+! vim_ignored = dup(fd_fromshell[1]);
+ close(fd_fromshell[1]);
+
+ # ifdef FEAT_GUI
+***************
+*** 4783,4789 ****
+ {
+ /* set up stderr for the child */
+ close(2);
+! ignored = dup(1);
+ }
+ # endif
+ }
+--- 4783,4789 ----
+ {
+ /* set up stderr for the child */
+ close(2);
+! vim_ignored = dup(1);
+ }
+ # endif
+ }
+***************
+*** 4920,4926 ****
+ && (lnum !=
+ curbuf->b_ml.ml_line_count
+ || curbuf->b_p_eol)))
+! ignored = write(toshell_fd, "\n",
+ (size_t)1);
+ ++lnum;
+ if (lnum > curbuf->b_op_end.lnum)
+--- 4920,4926 ----
+ && (lnum !=
+ curbuf->b_ml.ml_line_count
+ || curbuf->b_p_eol)))
+! vim_ignored = write(toshell_fd, "\n",
+ (size_t)1);
+ ++lnum;
+ if (lnum > curbuf->b_op_end.lnum)
+***************
+*** 5611,5644 ****
+ /* set up stdin for the child */
+ close(0);
+ if (use_null_for_in && null_fd >= 0)
+! ignored = dup(null_fd);
+ else if (fd_in[0] < 0)
+! ignored = dup(pty_slave_fd);
+ else
+! ignored = dup(fd_in[0]);
+
+ /* set up stderr for the child */
+ close(2);
+ if (use_null_for_err && null_fd >= 0)
+ {
+! ignored = dup(null_fd);
+ stderr_works = FALSE;
+ }
+ else if (use_out_for_err)
+! ignored = dup(fd_out[1]);
+ else if (fd_err[1] < 0)
+! ignored = dup(pty_slave_fd);
+ else
+! ignored = dup(fd_err[1]);
+
+ /* set up stdout for the child */
+ close(1);
+ if (use_null_for_out && null_fd >= 0)
+! ignored = dup(null_fd);
+ else if (fd_out[1] < 0)
+! ignored = dup(pty_slave_fd);
+ else
+! ignored = dup(fd_out[1]);
+
+ if (fd_in[0] >= 0)
+ close(fd_in[0]);
+--- 5611,5644 ----
+ /* set up stdin for the child */
+ close(0);
+ if (use_null_for_in && null_fd >= 0)
+! vim_ignored = dup(null_fd);
+ else if (fd_in[0] < 0)
+! vim_ignored = dup(pty_slave_fd);
+ else
+! vim_ignored = dup(fd_in[0]);
+
+ /* set up stderr for the child */
+ close(2);
+ if (use_null_for_err && null_fd >= 0)
+ {
+! vim_ignored = dup(null_fd);
+ stderr_works = FALSE;
+ }
+ else if (use_out_for_err)
+! vim_ignored = dup(fd_out[1]);
+ else if (fd_err[1] < 0)
+! vim_ignored = dup(pty_slave_fd);
+ else
+! vim_ignored = dup(fd_err[1]);
+
+ /* set up stdout for the child */
+ close(1);
+ if (use_null_for_out && null_fd >= 0)
+! vim_ignored = dup(null_fd);
+ else if (fd_out[1] < 0)
+! vim_ignored = dup(pty_slave_fd);
+ else
+! vim_ignored = dup(fd_out[1]);
+
+ if (fd_in[0] >= 0)
+ close(fd_in[0]);
+*** ../vim-8.1.0376/src/os_win32.c 2018-09-06 13:14:39.144722527 +0200
+--- src/os_win32.c 2018-09-13 15:24:11.255233005 +0200
+***************
+*** 4388,4394 ****
+ && (lnum != curbuf->b_ml.ml_line_count
+ || curbuf->b_p_eol)))
+ {
+! WriteFile(g_hChildStd_IN_Wr, "\n", 1, (LPDWORD)&ignored, NULL);
+ }
+
+ ++lnum;
+--- 4388,4395 ----
+ && (lnum != curbuf->b_ml.ml_line_count
+ || curbuf->b_p_eol)))
+ {
+! WriteFile(g_hChildStd_IN_Wr, "\n", 1,
+! (LPDWORD)&vim_ignored, NULL);
+ }
+
+ ++lnum;
+*** ../vim-8.1.0376/src/ui.c 2018-05-11 21:58:49.000000000 +0200
+--- src/ui.c 2018-09-13 15:24:57.474788997 +0200
+***************
+*** 403,409 ****
+ void
+ ui_breakcheck_force(int force)
+ {
+! int save_us = updating_screen;
+
+ /* We do not want gui_resize_shell() to redraw the screen here. */
+ ++updating_screen;
+--- 403,409 ----
+ void
+ ui_breakcheck_force(int force)
+ {
+! int save_updating_screen = updating_screen;
+
+ /* We do not want gui_resize_shell() to redraw the screen here. */
+ ++updating_screen;
+***************
+*** 415,422 ****
+ #endif
+ mch_breakcheck(force);
+
+! if (save_us)
+! updating_screen = save_us;
+ else
+ reset_updating_screen(FALSE);
+ }
+--- 415,422 ----
+ #endif
+ mch_breakcheck(force);
+
+! if (save_updating_screen)
+! updating_screen = TRUE;
+ else
+ reset_updating_screen(FALSE);
+ }
+***************
+*** 1885,1891 ****
+ #ifdef HAVE_DUP
+ /* Use stderr for stdin, also works for shell commands. */
+ close(0);
+! ignored = dup(2);
+ #else
+ read_cmd_fd = 2; /* read from stderr instead of stdin */
+ #endif
+--- 1885,1891 ----
+ #ifdef HAVE_DUP
+ /* Use stderr for stdin, also works for shell commands. */
+ close(0);
+! vim_ignored = dup(2);
+ #else
+ read_cmd_fd = 2; /* read from stderr instead of stdin */
+ #endif
+*** ../vim-8.1.0376/src/window.c 2018-08-21 16:56:28.367325278 +0200
+--- src/window.c 2018-09-13 15:25:10.614662839 +0200
+***************
+*** 4436,4442 ****
+ {
+ /* Window doesn't have a local directory and we are not in the global
+ * directory: Change to the global directory. */
+! ignored = mch_chdir((char *)globaldir);
+ VIM_CLEAR(globaldir);
+ shorten_fnames(TRUE);
+ }
+--- 4436,4442 ----
+ {
+ /* Window doesn't have a local directory and we are not in the global
+ * directory: Change to the global directory. */
+! vim_ignored = mch_chdir((char *)globaldir);
+ VIM_CLEAR(globaldir);
+ shorten_fnames(TRUE);
+ }
+*** ../vim-8.1.0376/src/globals.h 2018-09-10 21:04:09.868392665 +0200
+--- src/globals.h 2018-09-13 15:26:19.670000302 +0200
+***************
+*** 1621,1628 ****
+ * can't do anything useful with the value. Assign to this variable to avoid
+ * the warning.
+ */
+! EXTERN int ignored;
+! EXTERN char *ignoredp;
+
+ #ifdef FEAT_EVAL
+ /* set by alloc_fail(): ID */
+--- 1621,1628 ----
+ * can't do anything useful with the value. Assign to this variable to avoid
+ * the warning.
+ */
+! EXTERN int vim_ignored;
+! EXTERN char *vim_ignoredp;
+
+ #ifdef FEAT_EVAL
+ /* set by alloc_fail(): ID */
+*** ../vim-8.1.0376/src/term.c 2018-09-10 21:04:09.872392623 +0200
+--- src/term.c 2018-09-13 15:26:15.598039345 +0200
+***************
+*** 7013,7019 ****
+ size_t len;
+ int pos;
+
+! ignoredp = fgets(line, LINE_LEN, fd);
+ len = strlen(line);
+
+ if (len <= 1 || line[len - 1] != '\n')
+--- 7013,7019 ----
+ size_t len;
+ int pos;
+
+! vim_ignoredp = fgets(line, LINE_LEN, fd);
+ len = strlen(line);
+
+ if (len <= 1 || line[len - 1] != '\n')
+*** ../vim-8.1.0376/src/version.c 2018-09-13 14:57:37.915261048 +0200
+--- src/version.c 2018-09-13 15:30:49.183420346 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 377,
+ /**/
+
+--
+Don't read everything you believe.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0378 b/data/vim/patches/8.1.0378
new file mode 100644
index 000000000..4f60e53b9
--- /dev/null
+++ b/data/vim/patches/8.1.0378
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0378
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0378
+Problem: CI build failure.
+Solution: Include vim.h as ../vim.h. Fix compiler warning.
+Files: src/xdiff/xdiff.h
+
+
+*** ../vim-8.1.0377/src/xdiff/xdiff.h 2018-09-13 15:33:39.597712317 +0200
+--- src/xdiff/xdiff.h 2018-09-13 15:56:41.859054750 +0200
+***************
+*** 108,114 ****
+ long bsize;
+ } bdiffparam_t;
+
+! #include "vim.h"
+
+ #define xdl_malloc(x) lalloc((x), TRUE)
+ #define xdl_free(ptr) vim_free(ptr)
+--- 108,114 ----
+ long bsize;
+ } bdiffparam_t;
+
+! #include "../vim.h"
+
+ #define xdl_malloc(x) lalloc((x), TRUE)
+ #define xdl_free(ptr) vim_free(ptr)
+*** ../vim-8.1.0377/src/xdiff/xpatience.c 2018-09-13 15:33:39.597712317 +0200
+--- src/xdiff/xpatience.c 2018-09-13 15:56:55.350920262 +0200
+***************
+*** 206,212 ****
+ */
+ static struct entry *find_longest_common_sequence(struct hashmap *map)
+ {
+! struct entry **sequence = xdl_malloc(map->nr * sizeof(struct entry *));
+ int longest = 0, i;
+ struct entry *entry;
+
+--- 206,212 ----
+ */
+ static struct entry *find_longest_common_sequence(struct hashmap *map)
+ {
+! struct entry **sequence = (struct entry **)xdl_malloc(map->nr * sizeof(struct entry *));
+ int longest = 0, i;
+ struct entry *entry;
+
+*** ../vim-8.1.0377/src/version.c 2018-09-13 15:33:39.609712174 +0200
+--- src/version.c 2018-09-13 15:58:03.570241058 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 378,
+ /**/
+
+--
+Don't believe everything you hear or anything you say.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0379 b/data/vim/patches/8.1.0379
new file mode 100644
index 000000000..412f4ebe1
--- /dev/null
+++ b/data/vim/patches/8.1.0379
@@ -0,0 +1,3132 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0379
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0379
+Problem: Build dependencies are incomplete.
+Solution: Update the build dependencies, mainly for xdiff. Adjust object
+ directory for libvterm and xdiff.
+Files: src/Makefile, src/configure.ac, src/auto/configure,
+ src/libvterm/src/screen.c, src/libvterm/src/termscreen.c,
+ src/Make_cyg_ming.mak, src/Make_mvc.mak
+
+
+*** ../vim-8.1.0378/src/Makefile 2018-09-10 17:50:32.709306979 +0200
+--- src/Makefile 2018-09-13 17:20:07.798588758 +0200
+***************
+*** 1471,1476 ****
+--- 1471,1478 ----
+ .SUFFIXES:
+ .SUFFIXES: .c .o .pro
+
++ VTERM_CFLAGS = -Ilibvterm/include
++
+ PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
+ POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(EXTRA_DEFS)
+
+***************
+*** 1480,1486 ****
+ # with "-E".
+ OSDEF_CFLAGS = $(PRE_DEFS) $(POST_DEFS)
+
+! LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(RUBY_CFLAGS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(TCL_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
+
+ LINT_EXTRA = -DHANGUL_INPUT -D"__attribute__(x)="
+
+--- 1482,1491 ----
+ # with "-E".
+ OSDEF_CFLAGS = $(PRE_DEFS) $(POST_DEFS)
+
+! LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) \
+! $(RUBY_CFLAGS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) \
+! $(PYTHON3_CFLAGS) $(TCL_CFLAGS) $(VTERM_CFLAGS) \
+! -Dinline= -D__extension__= -Dalloca=alloca
+
+ LINT_EXTRA = -DHANGUL_INPUT -D"__attribute__(x)="
+
+***************
+*** 1671,1677 ****
+ RUN_UNITTESTS = run_json_test run_kword_test run_memfile_test run_message_test
+
+ # All sources, also the ones that are not configured
+! ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC)
+
+ # Which files to check with lint. Select one of these three lines. ALL_SRC
+ # checks more, but may not work well for checking a GUI that wasn't configured.
+--- 1676,1683 ----
+ RUN_UNITTESTS = run_json_test run_kword_test run_memfile_test run_message_test
+
+ # All sources, also the ones that are not configured
+! ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) \
+! $(EXTRA_SRC) $(TERM_SRC) $(XDIFF_SRC)
+
+ # Which files to check with lint. Select one of these three lines. ALL_SRC
+ # checks more, but may not work well for checking a GUI that wasn't configured.
+***************
+*** 3225,3260 ****
+ Makefile:
+ @echo The name of the makefile MUST be "Makefile" (with capital M)!!!!
+
+! CCCTERM = $(CCC_NF) -Ilibvterm/include $(ALL_CFLAGS) -DINLINE="" \
+ -DVSNPRINTF=vim_vsnprintf \
+ -DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
+ -DWCWIDTH_FUNCTION=utf_uint2cells
+
+! objects/term_encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/encoding.c
+
+! objects/term_keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/keyboard.c
+
+! objects/term_mouse.o: libvterm/src/mouse.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/mouse.c
+
+! objects/term_parser.o: libvterm/src/parser.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/parser.c
+
+! objects/term_pen.o: libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/pen.c
+
+! objects/term_screen.o: libvterm/src/screen.c $(TERM_DEPS)
+! $(CCCTERM) -o $@ libvterm/src/screen.c
+
+! objects/term_state.o: libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/state.c
+
+! objects/term_unicode.o: libvterm/src/unicode.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/unicode.c
+
+! objects/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/vterm.c
+
+ CCCDIFF = $(CCC_NF) $(ALL_CFLAGS)
+--- 3231,3266 ----
+ Makefile:
+ @echo The name of the makefile MUST be "Makefile" (with capital M)!!!!
+
+! CCCTERM = $(CCC_NF) $(VTERM_CFLAGS) $(ALL_CFLAGS) -DINLINE="" \
+ -DVSNPRINTF=vim_vsnprintf \
+ -DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
+ -DWCWIDTH_FUNCTION=utf_uint2cells
+
+! objects/encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/encoding.c
+
+! objects/keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/keyboard.c
+
+! objects/mouse.o: libvterm/src/mouse.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/mouse.c
+
+! objects/parser.o: libvterm/src/parser.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/parser.c
+
+! objects/pen.o: libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/pen.c
+
+! objects/termscreen.o: libvterm/src/termscreen.c $(TERM_DEPS)
+! $(CCCTERM) -o $@ libvterm/src/termscreen.c
+
+! objects/state.o: libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/state.c
+
+! objects/unicode.o: libvterm/src/unicode.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/unicode.c
+
+! objects/vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/vterm.c
+
+ CCCDIFF = $(CCC_NF) $(ALL_CFLAGS)
+***************
+*** 3363,3629 ****
+ ###############################################################################
+ ### (automatically generated by 'make depend')
+ ### Dependencies:
+! objects/arabic.o: arabic.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/beval.o: beval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/blowfish.o: blowfish.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/buffer.o: buffer.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h version.h
+! objects/charset.o: charset.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/crypt.o: crypt.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/crypt_zip.o: crypt_zip.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/dict.o: dict.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/diff.o: diff.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/digraph.o: digraph.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/edit.o: edit.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/eval.o: eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h version.h
+! objects/evalfunc.o: evalfunc.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/ex_cmds.o: ex_cmds.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h version.h
+! objects/ex_cmds2.o: ex_cmds2.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/ex_docmd.o: ex_docmd.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h ex_cmdidxs.h
+! objects/ex_eval.o: ex_eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/ex_getln.o: ex_getln.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/farsi.o: farsi.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/fileio.o: fileio.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/fold.o: fold.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/getchar.o: getchar.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/hardcopy.o: hardcopy.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/hashtab.o: hashtab.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/if_cscope.o: if_cscope.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h if_cscope.h
+! objects/if_xcmdsrv.o: if_xcmdsrv.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/json.o: json.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/list.o: list.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/main.o: main.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/mark.o: mark.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/memfile.o: memfile.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/memline.o: memline.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/menu.o: menu.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/message.o: message.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/misc1.o: misc1.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h version.h
+! objects/misc2.o: misc2.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/move.o: move.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/mbyte.o: mbyte.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/normal.o: normal.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/ops.o: ops.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
+! keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro structs.h \
+! regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
+! arabic.h
+! objects/option.o: option.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/os_unix.o: os_unix.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h if_mzsch.h os_unixx.h
+! objects/pathdef.o: auto/pathdef.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/popupmnu.o: popupmnu.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/pty.o: pty.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
+! keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro structs.h \
+! regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
+! arabic.h
+! objects/quickfix.o: quickfix.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/regexp.o: regexp.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h regexp_nfa.c
+! objects/screen.o: screen.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/search.o: search.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/sha256.o: sha256.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/spell.o: spell.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/spellfile.o: spellfile.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/syntax.o: syntax.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/tag.o: tag.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
+! keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro structs.h \
+! regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
+! arabic.h
+! objects/term.o: term.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.h
+! objects/terminal.o: terminal.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.h
+! objects/ui.o: ui.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
+! keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro structs.h \
+! regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
+! arabic.h
+! objects/undo.o: undo.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/userfunc.o: userfunc.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/version.o: version.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h version.h
+! objects/window.o: window.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/gui.o: gui.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
+! keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro structs.h \
+! regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
+! arabic.h
+! objects/gui_gtk.o: gui_gtk.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h gui_gtk_f.h
+! objects/gui_gtk_f.o: gui_gtk_f.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h gui_gtk_f.h
+! objects/gui_motif.o: gui_motif.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_xmebw.h ../pixmaps/alert.xpm \
+ ../pixmaps/error.xpm ../pixmaps/generic.xpm ../pixmaps/info.xpm \
+ ../pixmaps/quest.xpm gui_x11_pm.h ../pixmaps/tb_new.xpm \
+--- 3369,3635 ----
+ ###############################################################################
+ ### (automatically generated by 'make depend')
+ ### Dependencies:
+! objects/arabic.o: arabic.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/beval.o: beval.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/blowfish.o: blowfish.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/buffer.o: buffer.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h
+! objects/charset.o: charset.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/crypt.o: crypt.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/crypt_zip.o: crypt_zip.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/dict.o: dict.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/diff.o: diff.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h xdiff/xdiff.h xdiff/../vim.h
+! objects/digraph.o: digraph.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/edit.o: edit.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/eval.o: eval.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h
+! objects/evalfunc.o: evalfunc.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/ex_cmds.o: ex_cmds.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/ex_cmds2.o: ex_cmds2.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h
+! objects/ex_docmd.o: ex_docmd.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h ex_cmdidxs.h
+! objects/ex_eval.o: ex_eval.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/ex_getln.o: ex_getln.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/farsi.o: farsi.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/fileio.o: fileio.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/fold.o: fold.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/getchar.o: getchar.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/hardcopy.o: hardcopy.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/hashtab.o: hashtab.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
++ proto.h globals.h farsi.h arabic.h
++ objects/if_cscope.o: if_cscope.c vim.h protodef.h auto/config.h feature.h \
++ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h if_cscope.h
+! objects/if_xcmdsrv.o: if_xcmdsrv.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h
+! objects/json.o: json.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/list.o: list.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/main.o: main.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/mark.o: mark.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/memfile.o: memfile.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/memline.o: memline.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/menu.o: menu.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/message.o: message.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/misc1.o: misc1.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/misc2.o: misc2.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/move.o: move.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/mbyte.o: mbyte.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/normal.o: normal.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/ops.o: ops.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/option.o: option.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/os_unix.o: os_unix.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h os_unixx.h
+! objects/pathdef.o: auto/pathdef.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/popupmnu.o: popupmnu.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/pty.o: pty.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/quickfix.o: quickfix.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/regexp.o: regexp.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h regexp_nfa.c
+! objects/screen.o: screen.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/search.o: search.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/sha256.o: sha256.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/spell.o: spell.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/spellfile.o: spellfile.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/syntax.o: syntax.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/tag.o: tag.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/term.o: term.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.h
+! objects/terminal.o: terminal.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.h
+! objects/ui.o: ui.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/undo.o: undo.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/userfunc.o: userfunc.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/version.o: version.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h
+! objects/window.o: window.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
++ proto.h globals.h farsi.h arabic.h
++ objects/gui.o: gui.c vim.h protodef.h auto/config.h feature.h os_unix.h \
++ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
++ proto.h globals.h farsi.h arabic.h
++ objects/gui_gtk.o: gui_gtk.c vim.h protodef.h auto/config.h feature.h os_unix.h \
++ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
++ proto.h globals.h farsi.h arabic.h gui_gtk_f.h
++ objects/gui_gtk_f.o: gui_gtk_f.c vim.h protodef.h auto/config.h feature.h \
++ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
++ proto.h globals.h farsi.h arabic.h gui_gtk_f.h
++ objects/gui_motif.o: gui_motif.c vim.h protodef.h auto/config.h feature.h \
++ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_xmebw.h ../pixmaps/alert.xpm \
+ ../pixmaps/error.xpm ../pixmaps/generic.xpm ../pixmaps/info.xpm \
+ ../pixmaps/quest.xpm gui_x11_pm.h ../pixmaps/tb_new.xpm \
+***************
+*** 3642,3657 ****
+ ../pixmaps/tb_shell.xpm ../pixmaps/tb_replace.xpm \
+ ../pixmaps/tb_vsplit.xpm ../pixmaps/tb_maxwidth.xpm \
+ ../pixmaps/tb_minwidth.xpm
+! objects/gui_xmdlg.o: gui_xmdlg.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/gui_xmebw.o: gui_xmebw.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_xmebwp.h gui_xmebw.h
+! objects/gui_athena.o: gui_athena.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_at_sb.h gui_x11_pm.h \
+ ../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
+--- 3648,3663 ----
+ ../pixmaps/tb_shell.xpm ../pixmaps/tb_replace.xpm \
+ ../pixmaps/tb_vsplit.xpm ../pixmaps/tb_maxwidth.xpm \
+ ../pixmaps/tb_minwidth.xpm
+! objects/gui_xmdlg.o: gui_xmdlg.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/gui_xmebw.o: gui_xmebw.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_xmebwp.h gui_xmebw.h
+! objects/gui_athena.o: gui_athena.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_at_sb.h gui_x11_pm.h \
+ ../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
+***************
+*** 3669,3763 ****
+ ../pixmaps/tb_shell.xpm ../pixmaps/tb_replace.xpm \
+ ../pixmaps/tb_vsplit.xpm ../pixmaps/tb_maxwidth.xpm \
+ ../pixmaps/tb_minwidth.xpm
+! objects/gui_gtk_x11.o: gui_gtk_x11.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h auto/gui_gtk_gresources.h gui_gtk_f.h \
+ ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
+! objects/gui_x11.o: gui_x11.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm \
+! ../runtime/vim48x48.xpm
+! objects/gui_at_sb.o: gui_at_sb.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h gui_at_sb.h
+! objects/gui_at_fs.o: gui_at_fs.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_at_sb.h
+! objects/json_test.o: json_test.c main.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h json.c
+! objects/kword_test.o: kword_test.c main.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h charset.c
+! objects/memfile_test.o: memfile_test.c main.c vim.h auto/config.h feature.h \
+ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h memfile.c
+! objects/message_test.o: message_test.c main.c vim.h auto/config.h feature.h \
+ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h message.c
+! objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/if_lua.o: if_lua.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h if_mzsch.h mzscheme_base.c
+! objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/if_perlsfio.o: if_perlsfio.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/if_python.o: if_python.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h if_py_both.h
+! objects/if_python3.o: if_python3.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h if_py_both.h
+! objects/if_tcl.o: if_tcl.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+! objects/if_ruby.o: if_ruby.c auto/config.h vim.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h version.h
+! objects/gui_beval.o: gui_beval.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/workshop.o: workshop.c auto/config.h integration.h vim.h feature.h \
+ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h workshop.h
+ objects/wsdebug.o: wsdebug.c
+! objects/integration.o: integration.c vim.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h integration.h
+! objects/netbeans.o: netbeans.c vim.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/channel.o: channel.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
+! ascii.h keymap.h term.h macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h
+ objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c
+--- 3675,3847 ----
+ ../pixmaps/tb_shell.xpm ../pixmaps/tb_replace.xpm \
+ ../pixmaps/tb_vsplit.xpm ../pixmaps/tb_maxwidth.xpm \
+ ../pixmaps/tb_minwidth.xpm
+! objects/gui_gtk_x11.o: gui_gtk_x11.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h auto/gui_gtk_gresources.h gui_gtk_f.h \
+ ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
+! objects/gui_x11.o: gui_x11.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h ../runtime/vim32x32.xpm \
+! ../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
+! objects/gui_at_sb.o: gui_at_sb.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h gui_at_sb.h
+! objects/gui_at_fs.o: gui_at_fs.c vim.h protodef.h auto/config.h feature.h \
+ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h gui_at_sb.h
+! objects/json_test.o: json_test.c main.c vim.h protodef.h auto/config.h feature.h \
+ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h json.c
+! objects/kword_test.o: kword_test.c main.c vim.h protodef.h auto/config.h \
+! feature.h os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h \
+! option.h beval.h proto/gui_beval.pro structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h charset.c
+! objects/memfile_test.o: memfile_test.c main.c vim.h protodef.h auto/config.h \
+! feature.h os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h \
+! option.h beval.h proto/gui_beval.pro structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h memfile.c
+! objects/message_test.o: message_test.c main.c vim.h protodef.h auto/config.h \
+! feature.h os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h \
+! option.h beval.h proto/gui_beval.pro structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h message.c
+! objects/hangulin.o: hangulin.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/if_lua.o: if_lua.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/if_mzsch.o: if_mzsch.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
++ proto.h globals.h farsi.h arabic.h if_mzsch.h
++ objects/if_perl.o: auto/if_perl.c vim.h protodef.h auto/config.h feature.h \
++ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/if_perlsfio.o: if_perlsfio.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/if_python.o: if_python.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h if_py_both.h
+! objects/if_python3.o: if_python3.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h if_py_both.h
+! objects/if_tcl.o: if_tcl.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h
+! objects/if_ruby.o: if_ruby.c protodef.h auto/config.h vim.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h version.h
+! objects/gui_beval.o: gui_beval.c vim.h protodef.h auto/config.h feature.h \
+ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+! objects/workshop.o: workshop.c protodef.h auto/config.h integration.h vim.h \
+! feature.h os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h \
+! option.h beval.h proto/gui_beval.pro structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h version.h \
+! workshop.h
+ objects/wsdebug.o: wsdebug.c
+! objects/integration.o: integration.c vim.h protodef.h auto/config.h feature.h \
+! os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h integration.h
+! objects/netbeans.o: netbeans.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h version.h
+! objects/channel.o: channel.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+! proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h
+ objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c
++ objects/encoding.o: libvterm/src/encoding.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
++ libvterm/src/encoding/DECdrawing.inc libvterm/src/encoding/uk.inc
++ objects/keyboard.o: libvterm/src/keyboard.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
++ libvterm/src/utf8.h
++ objects/mouse.o: libvterm/src/mouse.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
++ libvterm/src/utf8.h
++ objects/parser.o: libvterm/src/parser.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h
++ objects/pen.o: libvterm/src/pen.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h
++ objects/state.o: libvterm/src/state.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h
++ objects/termscreen.o: libvterm/src/termscreen.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
++ libvterm/src/rect.h libvterm/src/utf8.h
++ objects/unicode.o: libvterm/src/unicode.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h
++ objects/vterm.o: libvterm/src/vterm.c libvterm/src/vterm_internal.h \
++ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
++ libvterm/src/utf8.h
++ objects/xdiffi.o: xdiff/xdiffi.c xdiff/xinclude.h xdiff/../auto/config.h \
++ xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
++ xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
++ xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
++ xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
++ xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
++ xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
++ xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
++ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
++ objects/xemit.o: xdiff/xemit.c xdiff/xinclude.h xdiff/../auto/config.h \
++ xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
++ xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
++ xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
++ xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
++ xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
++ xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
++ xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
++ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
++ objects/xprepare.o: xdiff/xprepare.c xdiff/xinclude.h xdiff/../auto/config.h \
++ xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
++ xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
++ xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
++ xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
++ xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
++ xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
++ xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
++ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
++ objects/xutils.o: xdiff/xutils.c xdiff/xinclude.h xdiff/../auto/config.h \
++ xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
++ xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
++ xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
++ xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
++ xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
++ xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
++ xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
++ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
++ objects/xhistogram.o: xdiff/xhistogram.c xdiff/xinclude.h xdiff/../auto/config.h \
++ xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
++ xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
++ xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
++ xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
++ xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
++ xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
++ xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
++ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
++ objects/xpatience.o: xdiff/xpatience.c xdiff/xinclude.h xdiff/../auto/config.h \
++ xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
++ xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
++ xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
++ xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
++ xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
++ xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
++ xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
++ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+*** ../vim-8.1.0378/src/configure.ac 2018-09-12 20:29:05.475670636 +0200
+--- src/configure.ac 2018-09-13 17:15:34.048615043 +0200
+***************
+*** 2114,2122 ****
+ fi
+ if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
+ AC_DEFINE(FEAT_TERMINAL)
+! TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/screen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
+ AC_SUBST(TERM_SRC)
+! TERM_OBJ="objects/term_encoding.o objects/term_keyboard.o objects/term_mouse.o objects/term_parser.o objects/term_pen.o objects/term_screen.o objects/term_state.o objects/term_unicode.o objects/term_vterm.o"
+ AC_SUBST(TERM_OBJ)
+ fi
+
+--- 2114,2122 ----
+ fi
+ if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
+ AC_DEFINE(FEAT_TERMINAL)
+! TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/termscreen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
+ AC_SUBST(TERM_SRC)
+! TERM_OBJ="objects/encoding.o objects/keyboard.o objects/mouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o"
+ AC_SUBST(TERM_OBJ)
+ fi
+
+*** ../vim-8.1.0378/src/auto/configure 2018-09-12 20:29:05.479670601 +0200
+--- src/auto/configure 2018-09-13 17:16:18.668305363 +0200
+***************
+*** 7916,7924 ****
+ if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
+ $as_echo "#define FEAT_TERMINAL 1" >>confdefs.h
+
+! TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/screen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
+
+! TERM_OBJ="objects/term_encoding.o objects/term_keyboard.o objects/term_mouse.o objects/term_parser.o objects/term_pen.o objects/term_screen.o objects/term_state.o objects/term_unicode.o objects/term_vterm.o"
+
+ fi
+
+--- 7916,7924 ----
+ if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
+ $as_echo "#define FEAT_TERMINAL 1" >>confdefs.h
+
+! TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/termscreen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
+
+! TERM_OBJ="objects/encoding.o objects/keyboard.o objects/mouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o"
+
+ fi
+
+*** ../vim-8.1.0378/src/libvterm/src/screen.c 2018-04-24 18:13:56.000000000 +0200
+--- src/libvterm/src/screen.c 1970-01-01 01:00:00.000000000 +0100
+***************
+*** 1,935 ****
+- #include "vterm_internal.h"
+-
+- #include <stdio.h>
+- #include <string.h>
+-
+- #include "rect.h"
+- #include "utf8.h"
+-
+- #define UNICODE_SPACE 0x20
+- #define UNICODE_LINEFEED 0x0a
+-
+- /* State of the pen at some moment in time, also used in a cell */
+- typedef struct
+- {
+- /* After the bitfield */
+- VTermColor fg, bg;
+-
+- unsigned int bold : 1;
+- unsigned int underline : 2;
+- unsigned int italic : 1;
+- unsigned int blink : 1;
+- unsigned int reverse : 1;
+- unsigned int strike : 1;
+- unsigned int font : 4; /* 0 to 9 */
+-
+- /* Extra state storage that isn't strictly pen-related */
+- unsigned int protected_cell : 1;
+- unsigned int dwl : 1; /* on a DECDWL or DECDHL line */
+- unsigned int dhl : 2; /* on a DECDHL line (1=top 2=bottom) */
+- } ScreenPen;
+-
+- /* Internal representation of a screen cell */
+- typedef struct
+- {
+- uint32_t chars[VTERM_MAX_CHARS_PER_CELL];
+- ScreenPen pen;
+- } ScreenCell;
+-
+- static int vterm_screen_set_cell(VTermScreen *screen, VTermPos pos, const VTermScreenCell *cell);
+-
+- struct VTermScreen
+- {
+- VTerm *vt;
+- VTermState *state;
+-
+- const VTermScreenCallbacks *callbacks;
+- void *cbdata;
+-
+- VTermDamageSize damage_merge;
+- /* start_row == -1 => no damage */
+- VTermRect damaged;
+- VTermRect pending_scrollrect;
+- int pending_scroll_downward, pending_scroll_rightward;
+-
+- int rows;
+- int cols;
+- int global_reverse;
+-
+- /* Primary and Altscreen. buffers[1] is lazily allocated as needed */
+- ScreenCell *buffers[2];
+-
+- /* buffer will == buffers[0] or buffers[1], depending on altscreen */
+- ScreenCell *buffer;
+-
+- /* buffer for a single screen row used in scrollback storage callbacks */
+- VTermScreenCell *sb_buffer;
+-
+- ScreenPen pen;
+- };
+-
+- static ScreenCell *getcell(const VTermScreen *screen, int row, int col)
+- {
+- if(row < 0 || row >= screen->rows)
+- return NULL;
+- if(col < 0 || col >= screen->cols)
+- return NULL;
+- return screen->buffer + (screen->cols * row) + col;
+- }
+-
+- static ScreenCell *realloc_buffer(VTermScreen *screen, ScreenCell *buffer, int new_rows, int new_cols)
+- {
+- ScreenCell *new_buffer = vterm_allocator_malloc(screen->vt, sizeof(ScreenCell) * new_rows * new_cols);
+- int row, col;
+-
+- for(row = 0; row < new_rows; row++) {
+- for(col = 0; col < new_cols; col++) {
+- ScreenCell *new_cell = new_buffer + row*new_cols + col;
+-
+- if(buffer && row < screen->rows && col < screen->cols)
+- *new_cell = buffer[row * screen->cols + col];
+- else {
+- new_cell->chars[0] = 0;
+- new_cell->pen = screen->pen;
+- }
+- }
+- }
+-
+- if(buffer)
+- vterm_allocator_free(screen->vt, buffer);
+-
+- return new_buffer;
+- }
+-
+- static void damagerect(VTermScreen *screen, VTermRect rect)
+- {
+- VTermRect emit;
+-
+- switch(screen->damage_merge) {
+- case VTERM_DAMAGE_CELL:
+- /* Always emit damage event */
+- emit = rect;
+- break;
+-
+- case VTERM_DAMAGE_ROW:
+- /* Emit damage longer than one row. Try to merge with existing damage in
+- * the same row */
+- if(rect.end_row > rect.start_row + 1) {
+- // Bigger than 1 line - flush existing, emit this
+- vterm_screen_flush_damage(screen);
+- emit = rect;
+- }
+- else if(screen->damaged.start_row == -1) {
+- // None stored yet
+- screen->damaged = rect;
+- return;
+- }
+- else if(rect.start_row == screen->damaged.start_row) {
+- // Merge with the stored line
+- if(screen->damaged.start_col > rect.start_col)
+- screen->damaged.start_col = rect.start_col;
+- if(screen->damaged.end_col < rect.end_col)
+- screen->damaged.end_col = rect.end_col;
+- return;
+- }
+- else {
+- // Emit the currently stored line, store a new one
+- emit = screen->damaged;
+- screen->damaged = rect;
+- }
+- break;
+-
+- case VTERM_DAMAGE_SCREEN:
+- case VTERM_DAMAGE_SCROLL:
+- /* Never emit damage event */
+- if(screen->damaged.start_row == -1)
+- screen->damaged = rect;
+- else {
+- rect_expand(&screen->damaged, &rect);
+- }
+- return;
+-
+- default:
+- DEBUG_LOG1("TODO: Maybe merge damage for level %d\n", screen->damage_merge);
+- return;
+- }
+-
+- if(screen->callbacks && screen->callbacks->damage)
+- (*screen->callbacks->damage)(emit, screen->cbdata);
+- }
+-
+- static void damagescreen(VTermScreen *screen)
+- {
+- VTermRect rect = {0,0,0,0};
+- rect.end_row = screen->rows;
+- rect.end_col = screen->cols;
+-
+- damagerect(screen, rect);
+- }
+-
+- static int putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)
+- {
+- int i;
+- int col;
+- VTermRect rect;
+-
+- VTermScreen *screen = user;
+- ScreenCell *cell = getcell(screen, pos.row, pos.col);
+-
+- if(!cell)
+- return 0;
+-
+- for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && info->chars[i]; i++) {
+- cell->chars[i] = info->chars[i];
+- cell->pen = screen->pen;
+- }
+- if(i < VTERM_MAX_CHARS_PER_CELL)
+- cell->chars[i] = 0;
+-
+- for(col = 1; col < info->width; col++)
+- getcell(screen, pos.row, pos.col + col)->chars[0] = (uint32_t)-1;
+-
+- rect.start_row = pos.row;
+- rect.end_row = pos.row+1;
+- rect.start_col = pos.col;
+- rect.end_col = pos.col+info->width;
+-
+- cell->pen.protected_cell = info->protected_cell;
+- cell->pen.dwl = info->dwl;
+- cell->pen.dhl = info->dhl;
+-
+- damagerect(screen, rect);
+-
+- return 1;
+- }
+-
+- static int moverect_internal(VTermRect dest, VTermRect src, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- if(screen->callbacks && screen->callbacks->sb_pushline &&
+- dest.start_row == 0 && dest.start_col == 0 && // starts top-left corner
+- dest.end_col == screen->cols && // full width
+- screen->buffer == screen->buffers[0]) { // not altscreen
+- VTermPos pos;
+- for(pos.row = 0; pos.row < src.start_row; pos.row++) {
+- for(pos.col = 0; pos.col < screen->cols; pos.col++)
+- (void)vterm_screen_get_cell(screen, pos, screen->sb_buffer + pos.col);
+-
+- (screen->callbacks->sb_pushline)(screen->cols, screen->sb_buffer, screen->cbdata);
+- }
+- }
+-
+- {
+- int cols = src.end_col - src.start_col;
+- int downward = src.start_row - dest.start_row;
+- int init_row, test_row, inc_row;
+- int row;
+-
+- if(downward < 0) {
+- init_row = dest.end_row - 1;
+- test_row = dest.start_row - 1;
+- inc_row = -1;
+- }
+- else {
+- init_row = dest.start_row;
+- test_row = dest.end_row;
+- inc_row = +1;
+- }
+-
+- for(row = init_row; row != test_row; row += inc_row)
+- memmove(getcell(screen, row, dest.start_col),
+- getcell(screen, row + downward, src.start_col),
+- cols * sizeof(ScreenCell));
+- }
+-
+- return 1;
+- }
+-
+- static int moverect_user(VTermRect dest, VTermRect src, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- if(screen->callbacks && screen->callbacks->moverect) {
+- if(screen->damage_merge != VTERM_DAMAGE_SCROLL)
+- // Avoid an infinite loop
+- vterm_screen_flush_damage(screen);
+-
+- if((*screen->callbacks->moverect)(dest, src, screen->cbdata))
+- return 1;
+- }
+-
+- damagerect(screen, dest);
+-
+- return 1;
+- }
+-
+- static int erase_internal(VTermRect rect, int selective, void *user)
+- {
+- VTermScreen *screen = user;
+- int row, col;
+-
+- for(row = rect.start_row; row < screen->state->rows && row < rect.end_row; row++) {
+- const VTermLineInfo *info = vterm_state_get_lineinfo(screen->state, row);
+-
+- for(col = rect.start_col; col < rect.end_col; col++) {
+- ScreenCell *cell = getcell(screen, row, col);
+-
+- if(selective && cell->pen.protected_cell)
+- continue;
+-
+- cell->chars[0] = 0;
+- cell->pen = screen->pen;
+- cell->pen.dwl = info->doublewidth;
+- cell->pen.dhl = info->doubleheight;
+- }
+- }
+-
+- return 1;
+- }
+-
+- static int erase_user(VTermRect rect, int selective UNUSED, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- damagerect(screen, rect);
+-
+- return 1;
+- }
+-
+- static int erase(VTermRect rect, int selective, void *user)
+- {
+- erase_internal(rect, selective, user);
+- return erase_user(rect, 0, user);
+- }
+-
+- static int scrollrect(VTermRect rect, int downward, int rightward, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- if(screen->damage_merge != VTERM_DAMAGE_SCROLL) {
+- vterm_scroll_rect(rect, downward, rightward,
+- moverect_internal, erase_internal, screen);
+-
+- vterm_screen_flush_damage(screen);
+-
+- vterm_scroll_rect(rect, downward, rightward,
+- moverect_user, erase_user, screen);
+-
+- return 1;
+- }
+-
+- if(screen->damaged.start_row != -1 &&
+- !rect_intersects(&rect, &screen->damaged)) {
+- vterm_screen_flush_damage(screen);
+- }
+-
+- if(screen->pending_scrollrect.start_row == -1) {
+- screen->pending_scrollrect = rect;
+- screen->pending_scroll_downward = downward;
+- screen->pending_scroll_rightward = rightward;
+- }
+- else if(rect_equal(&screen->pending_scrollrect, &rect) &&
+- ((screen->pending_scroll_downward == 0 && downward == 0) ||
+- (screen->pending_scroll_rightward == 0 && rightward == 0))) {
+- screen->pending_scroll_downward += downward;
+- screen->pending_scroll_rightward += rightward;
+- }
+- else {
+- vterm_screen_flush_damage(screen);
+-
+- screen->pending_scrollrect = rect;
+- screen->pending_scroll_downward = downward;
+- screen->pending_scroll_rightward = rightward;
+- }
+-
+- vterm_scroll_rect(rect, downward, rightward,
+- moverect_internal, erase_internal, screen);
+-
+- if(screen->damaged.start_row == -1)
+- return 1;
+-
+- if(rect_contains(&rect, &screen->damaged)) {
+- /* Scroll region entirely contains the damage; just move it */
+- vterm_rect_move(&screen->damaged, -downward, -rightward);
+- rect_clip(&screen->damaged, &rect);
+- }
+- /* There are a number of possible cases here, but lets restrict this to only
+- * the common case where we might actually gain some performance by
+- * optimising it. Namely, a vertical scroll that neatly cuts the damage
+- * region in half.
+- */
+- else if(rect.start_col <= screen->damaged.start_col &&
+- rect.end_col >= screen->damaged.end_col &&
+- rightward == 0) {
+- if(screen->damaged.start_row >= rect.start_row &&
+- screen->damaged.start_row < rect.end_row) {
+- screen->damaged.start_row -= downward;
+- if(screen->damaged.start_row < rect.start_row)
+- screen->damaged.start_row = rect.start_row;
+- if(screen->damaged.start_row > rect.end_row)
+- screen->damaged.start_row = rect.end_row;
+- }
+- if(screen->damaged.end_row >= rect.start_row &&
+- screen->damaged.end_row < rect.end_row) {
+- screen->damaged.end_row -= downward;
+- if(screen->damaged.end_row < rect.start_row)
+- screen->damaged.end_row = rect.start_row;
+- if(screen->damaged.end_row > rect.end_row)
+- screen->damaged.end_row = rect.end_row;
+- }
+- }
+- else {
+- DEBUG_LOG2("TODO: Just flush and redo damaged=" STRFrect " rect=" STRFrect "\n",
+- ARGSrect(screen->damaged), ARGSrect(rect));
+- }
+-
+- return 1;
+- }
+-
+- static int movecursor(VTermPos pos, VTermPos oldpos, int visible, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- if(screen->callbacks && screen->callbacks->movecursor)
+- return (*screen->callbacks->movecursor)(pos, oldpos, visible, screen->cbdata);
+-
+- return 0;
+- }
+-
+- static int setpenattr(VTermAttr attr, VTermValue *val, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- switch(attr) {
+- case VTERM_ATTR_BOLD:
+- screen->pen.bold = val->boolean;
+- return 1;
+- case VTERM_ATTR_UNDERLINE:
+- screen->pen.underline = val->number;
+- return 1;
+- case VTERM_ATTR_ITALIC:
+- screen->pen.italic = val->boolean;
+- return 1;
+- case VTERM_ATTR_BLINK:
+- screen->pen.blink = val->boolean;
+- return 1;
+- case VTERM_ATTR_REVERSE:
+- screen->pen.reverse = val->boolean;
+- return 1;
+- case VTERM_ATTR_STRIKE:
+- screen->pen.strike = val->boolean;
+- return 1;
+- case VTERM_ATTR_FONT:
+- screen->pen.font = val->number;
+- return 1;
+- case VTERM_ATTR_FOREGROUND:
+- screen->pen.fg = val->color;
+- return 1;
+- case VTERM_ATTR_BACKGROUND:
+- screen->pen.bg = val->color;
+- return 1;
+-
+- case VTERM_N_ATTRS:
+- return 0;
+- }
+-
+- return 0;
+- }
+-
+- static int settermprop(VTermProp prop, VTermValue *val, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- switch(prop) {
+- case VTERM_PROP_ALTSCREEN:
+- if(val->boolean && !screen->buffers[1])
+- return 0;
+-
+- screen->buffer = val->boolean ? screen->buffers[1] : screen->buffers[0];
+- /* only send a damage event on disable; because during enable there's an
+- * erase that sends a damage anyway
+- */
+- if(!val->boolean)
+- damagescreen(screen);
+- break;
+- case VTERM_PROP_REVERSE:
+- screen->global_reverse = val->boolean;
+- damagescreen(screen);
+- break;
+- default:
+- ; /* ignore */
+- }
+-
+- if(screen->callbacks && screen->callbacks->settermprop)
+- return (*screen->callbacks->settermprop)(prop, val, screen->cbdata);
+-
+- return 1;
+- }
+-
+- static int bell(void *user)
+- {
+- VTermScreen *screen = user;
+-
+- if(screen->callbacks && screen->callbacks->bell)
+- return (*screen->callbacks->bell)(screen->cbdata);
+-
+- return 0;
+- }
+-
+- static int resize(int new_rows, int new_cols, VTermPos *delta, void *user)
+- {
+- VTermScreen *screen = user;
+-
+- int is_altscreen = (screen->buffers[1] && screen->buffer == screen->buffers[1]);
+-
+- int old_rows = screen->rows;
+- int old_cols = screen->cols;
+- int first_blank_row;
+-
+- if(!is_altscreen && new_rows < old_rows) {
+- // Fewer rows - determine if we're going to scroll at all, and if so, push
+- // those lines to scrollback
+- VTermPos pos = { 0, 0 };
+- VTermPos cursor = screen->state->pos;
+- // Find the first blank row after the cursor.
+- for(pos.row = old_rows - 1; pos.row >= new_rows; pos.row--)
+- if(!vterm_screen_is_eol(screen, pos) || cursor.row == pos.row)
+- break;
+-
+- first_blank_row = pos.row + 1;
+- if(first_blank_row > new_rows) {
+- VTermRect rect = {0,0,0,0};
+- rect.end_row = old_rows;
+- rect.end_col = old_cols;
+- scrollrect(rect, first_blank_row - new_rows, 0, user);
+- vterm_screen_flush_damage(screen);
+-
+- delta->row -= first_blank_row - new_rows;
+- }
+- }
+-
+- screen->buffers[0] = realloc_buffer(screen, screen->buffers[0], new_rows, new_cols);
+- if(screen->buffers[1])
+- screen->buffers[1] = realloc_buffer(screen, screen->buffers[1], new_rows, new_cols);
+-
+- screen->buffer = is_altscreen ? screen->buffers[1] : screen->buffers[0];
+-
+- screen->rows = new_rows;
+- screen->cols = new_cols;
+-
+- if(screen->sb_buffer)
+- vterm_allocator_free(screen->vt, screen->sb_buffer);
+-
+- screen->sb_buffer = vterm_allocator_malloc(screen->vt, sizeof(VTermScreenCell) * new_cols);
+-
+- if(new_cols > old_cols) {
+- VTermRect rect;
+- rect.start_row = 0;
+- rect.end_row = old_rows;
+- rect.start_col = old_cols;
+- rect.end_col = new_cols;
+- damagerect(screen, rect);
+- }
+-
+- if(new_rows > old_rows) {
+- if(!is_altscreen && screen->callbacks && screen->callbacks->sb_popline) {
+- int rows = new_rows - old_rows;
+- while(rows) {
+- VTermRect rect = {0,0,0,0};
+- VTermPos pos = { 0, 0 };
+- if(!(screen->callbacks->sb_popline(screen->cols, screen->sb_buffer, screen->cbdata)))
+- break;
+-
+- rect.end_row = screen->rows;
+- rect.end_col = screen->cols;
+- scrollrect(rect, -1, 0, user);
+-
+- for(pos.col = 0; pos.col < screen->cols; pos.col += screen->sb_buffer[pos.col].width)
+- vterm_screen_set_cell(screen, pos, screen->sb_buffer + pos.col);
+-
+- rect.end_row = 1;
+- damagerect(screen, rect);
+-
+- vterm_screen_flush_damage(screen);
+-
+- rows--;
+- delta->row++;
+- }
+- }
+-
+- {
+- VTermRect rect;
+- rect.start_row = old_rows;
+- rect.end_row = new_rows;
+- rect.start_col = 0;
+- rect.end_col = new_cols;
+- damagerect(screen, rect);
+- }
+- }
+-
+- if(screen->callbacks && screen->callbacks->resize)
+- return (*screen->callbacks->resize)(new_rows, new_cols, screen->cbdata);
+-
+- return 1;
+- }
+-
+- static int setlineinfo(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)
+- {
+- VTermScreen *screen = user;
+- int col;
+- VTermRect rect;
+-
+- if(newinfo->doublewidth != oldinfo->doublewidth ||
+- newinfo->doubleheight != oldinfo->doubleheight) {
+- for(col = 0; col < screen->cols; col++) {
+- ScreenCell *cell = getcell(screen, row, col);
+- cell->pen.dwl = newinfo->doublewidth;
+- cell->pen.dhl = newinfo->doubleheight;
+- }
+-
+- rect.start_row = row;
+- rect.end_row = row + 1;
+- rect.start_col = 0;
+- rect.end_col = newinfo->doublewidth ? screen->cols / 2 : screen->cols;
+- damagerect(screen, rect);
+-
+- if(newinfo->doublewidth) {
+- rect.start_col = screen->cols / 2;
+- rect.end_col = screen->cols;
+-
+- erase_internal(rect, 0, user);
+- }
+- }
+-
+- return 1;
+- }
+-
+- static VTermStateCallbacks state_cbs = {
+- &putglyph, /* putglyph */
+- &movecursor, /* movecursor */
+- &scrollrect, /* scrollrect */
+- NULL, /* moverect */
+- &erase, /* erase */
+- NULL, /* initpen */
+- &setpenattr, /* setpenattr */
+- &settermprop, /* settermprop */
+- &bell, /* bell */
+- &resize, /* resize */
+- &setlineinfo /* setlineinfo */
+- };
+-
+- static VTermScreen *screen_new(VTerm *vt)
+- {
+- VTermState *state = vterm_obtain_state(vt);
+- VTermScreen *screen;
+- int rows, cols;
+-
+- if(!state)
+- return NULL;
+-
+- screen = vterm_allocator_malloc(vt, sizeof(VTermScreen));
+-
+- vterm_get_size(vt, &rows, &cols);
+-
+- screen->vt = vt;
+- screen->state = state;
+-
+- screen->damage_merge = VTERM_DAMAGE_CELL;
+- screen->damaged.start_row = -1;
+- screen->pending_scrollrect.start_row = -1;
+-
+- screen->rows = rows;
+- screen->cols = cols;
+-
+- screen->callbacks = NULL;
+- screen->cbdata = NULL;
+-
+- screen->buffers[0] = realloc_buffer(screen, NULL, rows, cols);
+-
+- screen->buffer = screen->buffers[0];
+-
+- screen->sb_buffer = vterm_allocator_malloc(screen->vt, sizeof(VTermScreenCell) * cols);
+-
+- vterm_state_set_callbacks(screen->state, &state_cbs, screen);
+-
+- return screen;
+- }
+-
+- INTERNAL void vterm_screen_free(VTermScreen *screen)
+- {
+- vterm_allocator_free(screen->vt, screen->buffers[0]);
+- if(screen->buffers[1])
+- vterm_allocator_free(screen->vt, screen->buffers[1]);
+-
+- vterm_allocator_free(screen->vt, screen->sb_buffer);
+-
+- vterm_allocator_free(screen->vt, screen);
+- }
+-
+- void vterm_screen_reset(VTermScreen *screen, int hard)
+- {
+- screen->damaged.start_row = -1;
+- screen->pending_scrollrect.start_row = -1;
+- vterm_state_reset(screen->state, hard);
+- vterm_screen_flush_damage(screen);
+- }
+-
+- static size_t _get_chars(const VTermScreen *screen, const int utf8, void *buffer, size_t len, const VTermRect rect)
+- {
+- size_t outpos = 0;
+- int padding = 0;
+- int row, col;
+-
+- #define PUT(c) \
+- if(utf8) { \
+- size_t thislen = utf8_seqlen(c); \
+- if(buffer && outpos + thislen <= len) \
+- outpos += fill_utf8((c), (char *)buffer + outpos); \
+- else \
+- outpos += thislen; \
+- } \
+- else { \
+- if(buffer && outpos + 1 <= len) \
+- ((uint32_t*)buffer)[outpos++] = (c); \
+- else \
+- outpos++; \
+- }
+-
+- for(row = rect.start_row; row < rect.end_row; row++) {
+- for(col = rect.start_col; col < rect.end_col; col++) {
+- ScreenCell *cell = getcell(screen, row, col);
+- int i;
+-
+- if(cell->chars[0] == 0)
+- // Erased cell, might need a space
+- padding++;
+- else if(cell->chars[0] == (uint32_t)-1)
+- // Gap behind a double-width char, do nothing
+- ;
+- else {
+- while(padding) {
+- PUT(UNICODE_SPACE);
+- padding--;
+- }
+- for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && cell->chars[i]; i++) {
+- PUT(cell->chars[i]);
+- }
+- }
+- }
+-
+- if(row < rect.end_row - 1) {
+- PUT(UNICODE_LINEFEED);
+- padding = 0;
+- }
+- }
+-
+- return outpos;
+- }
+-
+- size_t vterm_screen_get_chars(const VTermScreen *screen, uint32_t *chars, size_t len, const VTermRect rect)
+- {
+- return _get_chars(screen, 0, chars, len, rect);
+- }
+-
+- size_t vterm_screen_get_text(const VTermScreen *screen, char *str, size_t len, const VTermRect rect)
+- {
+- return _get_chars(screen, 1, str, len, rect);
+- }
+-
+- /* Copy internal to external representation of a screen cell */
+- int vterm_screen_get_cell(const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell)
+- {
+- ScreenCell *intcell = getcell(screen, pos.row, pos.col);
+- int i;
+-
+- if(!intcell)
+- return 0;
+-
+- for(i = 0; ; i++) {
+- cell->chars[i] = intcell->chars[i];
+- if(!intcell->chars[i])
+- break;
+- }
+-
+- cell->attrs.bold = intcell->pen.bold;
+- cell->attrs.underline = intcell->pen.underline;
+- cell->attrs.italic = intcell->pen.italic;
+- cell->attrs.blink = intcell->pen.blink;
+- cell->attrs.reverse = intcell->pen.reverse ^ screen->global_reverse;
+- cell->attrs.strike = intcell->pen.strike;
+- cell->attrs.font = intcell->pen.font;
+-
+- cell->attrs.dwl = intcell->pen.dwl;
+- cell->attrs.dhl = intcell->pen.dhl;
+-
+- cell->fg = intcell->pen.fg;
+- cell->bg = intcell->pen.bg;
+-
+- if(pos.col < (screen->cols - 1) &&
+- getcell(screen, pos.row, pos.col + 1)->chars[0] == (uint32_t)-1)
+- cell->width = 2;
+- else
+- cell->width = 1;
+-
+- return 1;
+- }
+-
+- /* Copy external to internal representation of a screen cell */
+- /* static because it's only used internally for sb_popline during resize */
+- static int vterm_screen_set_cell(VTermScreen *screen, VTermPos pos, const VTermScreenCell *cell)
+- {
+- ScreenCell *intcell = getcell(screen, pos.row, pos.col);
+- int i;
+-
+- if(!intcell)
+- return 0;
+-
+- for(i = 0; ; i++) {
+- intcell->chars[i] = cell->chars[i];
+- if(!cell->chars[i])
+- break;
+- }
+-
+- intcell->pen.bold = cell->attrs.bold;
+- intcell->pen.underline = cell->attrs.underline;
+- intcell->pen.italic = cell->attrs.italic;
+- intcell->pen.blink = cell->attrs.blink;
+- intcell->pen.reverse = cell->attrs.reverse ^ screen->global_reverse;
+- intcell->pen.strike = cell->attrs.strike;
+- intcell->pen.font = cell->attrs.font;
+-
+- intcell->pen.fg = cell->fg;
+- intcell->pen.bg = cell->bg;
+-
+- if(cell->width == 2)
+- getcell(screen, pos.row, pos.col + 1)->chars[0] = (uint32_t)-1;
+-
+- return 1;
+- }
+-
+- int vterm_screen_is_eol(const VTermScreen *screen, VTermPos pos)
+- {
+- /* This cell is EOL if this and every cell to the right is black */
+- for(; pos.col < screen->cols; pos.col++) {
+- ScreenCell *cell = getcell(screen, pos.row, pos.col);
+- if(cell->chars[0] != 0)
+- return 0;
+- }
+-
+- return 1;
+- }
+-
+- VTermScreen *vterm_obtain_screen(VTerm *vt)
+- {
+- if(!vt->screen)
+- vt->screen = screen_new(vt);
+- return vt->screen;
+- }
+-
+- void vterm_screen_enable_altscreen(VTermScreen *screen, int altscreen)
+- {
+-
+- if(!screen->buffers[1] && altscreen) {
+- int rows, cols;
+- vterm_get_size(screen->vt, &rows, &cols);
+-
+- screen->buffers[1] = realloc_buffer(screen, NULL, rows, cols);
+- }
+- }
+-
+- void vterm_screen_set_callbacks(VTermScreen *screen, const VTermScreenCallbacks *callbacks, void *user)
+- {
+- screen->callbacks = callbacks;
+- screen->cbdata = user;
+- }
+-
+- void *vterm_screen_get_cbdata(VTermScreen *screen)
+- {
+- return screen->cbdata;
+- }
+-
+- void vterm_screen_set_unrecognised_fallbacks(VTermScreen *screen, const VTermParserCallbacks *fallbacks, void *user)
+- {
+- vterm_state_set_unrecognised_fallbacks(screen->state, fallbacks, user);
+- }
+-
+- void *vterm_screen_get_unrecognised_fbdata(VTermScreen *screen)
+- {
+- return vterm_state_get_unrecognised_fbdata(screen->state);
+- }
+-
+- void vterm_screen_flush_damage(VTermScreen *screen)
+- {
+- if(screen->pending_scrollrect.start_row != -1) {
+- vterm_scroll_rect(screen->pending_scrollrect, screen->pending_scroll_downward, screen->pending_scroll_rightward,
+- moverect_user, erase_user, screen);
+-
+- screen->pending_scrollrect.start_row = -1;
+- }
+-
+- if(screen->damaged.start_row != -1) {
+- if(screen->callbacks && screen->callbacks->damage)
+- (*screen->callbacks->damage)(screen->damaged, screen->cbdata);
+-
+- screen->damaged.start_row = -1;
+- }
+- }
+-
+- void vterm_screen_set_damage_merge(VTermScreen *screen, VTermDamageSize size)
+- {
+- vterm_screen_flush_damage(screen);
+- screen->damage_merge = size;
+- }
+-
+- static int attrs_differ(VTermAttrMask attrs, ScreenCell *a, ScreenCell *b)
+- {
+- if((attrs & VTERM_ATTR_BOLD_MASK) && (a->pen.bold != b->pen.bold))
+- return 1;
+- if((attrs & VTERM_ATTR_UNDERLINE_MASK) && (a->pen.underline != b->pen.underline))
+- return 1;
+- if((attrs & VTERM_ATTR_ITALIC_MASK) && (a->pen.italic != b->pen.italic))
+- return 1;
+- if((attrs & VTERM_ATTR_BLINK_MASK) && (a->pen.blink != b->pen.blink))
+- return 1;
+- if((attrs & VTERM_ATTR_REVERSE_MASK) && (a->pen.reverse != b->pen.reverse))
+- return 1;
+- if((attrs & VTERM_ATTR_STRIKE_MASK) && (a->pen.strike != b->pen.strike))
+- return 1;
+- if((attrs & VTERM_ATTR_FONT_MASK) && (a->pen.font != b->pen.font))
+- return 1;
+- if((attrs & VTERM_ATTR_FOREGROUND_MASK) && !vterm_color_equal(a->pen.fg, b->pen.fg))
+- return 1;
+- if((attrs & VTERM_ATTR_BACKGROUND_MASK) && !vterm_color_equal(a->pen.bg, b->pen.bg))
+- return 1;
+-
+- return 0;
+- }
+-
+- int vterm_screen_get_attrs_extent(const VTermScreen *screen, VTermRect *extent, VTermPos pos, VTermAttrMask attrs)
+- {
+- int col;
+-
+- ScreenCell *target = getcell(screen, pos.row, pos.col);
+-
+- // TODO: bounds check
+- extent->start_row = pos.row;
+- extent->end_row = pos.row + 1;
+-
+- if(extent->start_col < 0)
+- extent->start_col = 0;
+- if(extent->end_col < 0)
+- extent->end_col = screen->cols;
+-
+- for(col = pos.col - 1; col >= extent->start_col; col--)
+- if(attrs_differ(attrs, target, getcell(screen, pos.row, col)))
+- break;
+- extent->start_col = col + 1;
+-
+- for(col = pos.col + 1; col < extent->end_col; col++)
+- if(attrs_differ(attrs, target, getcell(screen, pos.row, col)))
+- break;
+- extent->end_col = col - 1;
+-
+- return 1;
+- }
+--- 0 ----
+*** ../vim-8.1.0378/src/libvterm/src/termscreen.c 2018-09-13 17:22:04.945647519 +0200
+--- src/libvterm/src/termscreen.c 2018-04-24 18:13:56.481237547 +0200
+***************
+*** 0 ****
+--- 1,935 ----
++ #include "vterm_internal.h"
++
++ #include <stdio.h>
++ #include <string.h>
++
++ #include "rect.h"
++ #include "utf8.h"
++
++ #define UNICODE_SPACE 0x20
++ #define UNICODE_LINEFEED 0x0a
++
++ /* State of the pen at some moment in time, also used in a cell */
++ typedef struct
++ {
++ /* After the bitfield */
++ VTermColor fg, bg;
++
++ unsigned int bold : 1;
++ unsigned int underline : 2;
++ unsigned int italic : 1;
++ unsigned int blink : 1;
++ unsigned int reverse : 1;
++ unsigned int strike : 1;
++ unsigned int font : 4; /* 0 to 9 */
++
++ /* Extra state storage that isn't strictly pen-related */
++ unsigned int protected_cell : 1;
++ unsigned int dwl : 1; /* on a DECDWL or DECDHL line */
++ unsigned int dhl : 2; /* on a DECDHL line (1=top 2=bottom) */
++ } ScreenPen;
++
++ /* Internal representation of a screen cell */
++ typedef struct
++ {
++ uint32_t chars[VTERM_MAX_CHARS_PER_CELL];
++ ScreenPen pen;
++ } ScreenCell;
++
++ static int vterm_screen_set_cell(VTermScreen *screen, VTermPos pos, const VTermScreenCell *cell);
++
++ struct VTermScreen
++ {
++ VTerm *vt;
++ VTermState *state;
++
++ const VTermScreenCallbacks *callbacks;
++ void *cbdata;
++
++ VTermDamageSize damage_merge;
++ /* start_row == -1 => no damage */
++ VTermRect damaged;
++ VTermRect pending_scrollrect;
++ int pending_scroll_downward, pending_scroll_rightward;
++
++ int rows;
++ int cols;
++ int global_reverse;
++
++ /* Primary and Altscreen. buffers[1] is lazily allocated as needed */
++ ScreenCell *buffers[2];
++
++ /* buffer will == buffers[0] or buffers[1], depending on altscreen */
++ ScreenCell *buffer;
++
++ /* buffer for a single screen row used in scrollback storage callbacks */
++ VTermScreenCell *sb_buffer;
++
++ ScreenPen pen;
++ };
++
++ static ScreenCell *getcell(const VTermScreen *screen, int row, int col)
++ {
++ if(row < 0 || row >= screen->rows)
++ return NULL;
++ if(col < 0 || col >= screen->cols)
++ return NULL;
++ return screen->buffer + (screen->cols * row) + col;
++ }
++
++ static ScreenCell *realloc_buffer(VTermScreen *screen, ScreenCell *buffer, int new_rows, int new_cols)
++ {
++ ScreenCell *new_buffer = vterm_allocator_malloc(screen->vt, sizeof(ScreenCell) * new_rows * new_cols);
++ int row, col;
++
++ for(row = 0; row < new_rows; row++) {
++ for(col = 0; col < new_cols; col++) {
++ ScreenCell *new_cell = new_buffer + row*new_cols + col;
++
++ if(buffer && row < screen->rows && col < screen->cols)
++ *new_cell = buffer[row * screen->cols + col];
++ else {
++ new_cell->chars[0] = 0;
++ new_cell->pen = screen->pen;
++ }
++ }
++ }
++
++ if(buffer)
++ vterm_allocator_free(screen->vt, buffer);
++
++ return new_buffer;
++ }
++
++ static void damagerect(VTermScreen *screen, VTermRect rect)
++ {
++ VTermRect emit;
++
++ switch(screen->damage_merge) {
++ case VTERM_DAMAGE_CELL:
++ /* Always emit damage event */
++ emit = rect;
++ break;
++
++ case VTERM_DAMAGE_ROW:
++ /* Emit damage longer than one row. Try to merge with existing damage in
++ * the same row */
++ if(rect.end_row > rect.start_row + 1) {
++ // Bigger than 1 line - flush existing, emit this
++ vterm_screen_flush_damage(screen);
++ emit = rect;
++ }
++ else if(screen->damaged.start_row == -1) {
++ // None stored yet
++ screen->damaged = rect;
++ return;
++ }
++ else if(rect.start_row == screen->damaged.start_row) {
++ // Merge with the stored line
++ if(screen->damaged.start_col > rect.start_col)
++ screen->damaged.start_col = rect.start_col;
++ if(screen->damaged.end_col < rect.end_col)
++ screen->damaged.end_col = rect.end_col;
++ return;
++ }
++ else {
++ // Emit the currently stored line, store a new one
++ emit = screen->damaged;
++ screen->damaged = rect;
++ }
++ break;
++
++ case VTERM_DAMAGE_SCREEN:
++ case VTERM_DAMAGE_SCROLL:
++ /* Never emit damage event */
++ if(screen->damaged.start_row == -1)
++ screen->damaged = rect;
++ else {
++ rect_expand(&screen->damaged, &rect);
++ }
++ return;
++
++ default:
++ DEBUG_LOG1("TODO: Maybe merge damage for level %d\n", screen->damage_merge);
++ return;
++ }
++
++ if(screen->callbacks && screen->callbacks->damage)
++ (*screen->callbacks->damage)(emit, screen->cbdata);
++ }
++
++ static void damagescreen(VTermScreen *screen)
++ {
++ VTermRect rect = {0,0,0,0};
++ rect.end_row = screen->rows;
++ rect.end_col = screen->cols;
++
++ damagerect(screen, rect);
++ }
++
++ static int putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)
++ {
++ int i;
++ int col;
++ VTermRect rect;
++
++ VTermScreen *screen = user;
++ ScreenCell *cell = getcell(screen, pos.row, pos.col);
++
++ if(!cell)
++ return 0;
++
++ for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && info->chars[i]; i++) {
++ cell->chars[i] = info->chars[i];
++ cell->pen = screen->pen;
++ }
++ if(i < VTERM_MAX_CHARS_PER_CELL)
++ cell->chars[i] = 0;
++
++ for(col = 1; col < info->width; col++)
++ getcell(screen, pos.row, pos.col + col)->chars[0] = (uint32_t)-1;
++
++ rect.start_row = pos.row;
++ rect.end_row = pos.row+1;
++ rect.start_col = pos.col;
++ rect.end_col = pos.col+info->width;
++
++ cell->pen.protected_cell = info->protected_cell;
++ cell->pen.dwl = info->dwl;
++ cell->pen.dhl = info->dhl;
++
++ damagerect(screen, rect);
++
++ return 1;
++ }
++
++ static int moverect_internal(VTermRect dest, VTermRect src, void *user)
++ {
++ VTermScreen *screen = user;
++
++ if(screen->callbacks && screen->callbacks->sb_pushline &&
++ dest.start_row == 0 && dest.start_col == 0 && // starts top-left corner
++ dest.end_col == screen->cols && // full width
++ screen->buffer == screen->buffers[0]) { // not altscreen
++ VTermPos pos;
++ for(pos.row = 0; pos.row < src.start_row; pos.row++) {
++ for(pos.col = 0; pos.col < screen->cols; pos.col++)
++ (void)vterm_screen_get_cell(screen, pos, screen->sb_buffer + pos.col);
++
++ (screen->callbacks->sb_pushline)(screen->cols, screen->sb_buffer, screen->cbdata);
++ }
++ }
++
++ {
++ int cols = src.end_col - src.start_col;
++ int downward = src.start_row - dest.start_row;
++ int init_row, test_row, inc_row;
++ int row;
++
++ if(downward < 0) {
++ init_row = dest.end_row - 1;
++ test_row = dest.start_row - 1;
++ inc_row = -1;
++ }
++ else {
++ init_row = dest.start_row;
++ test_row = dest.end_row;
++ inc_row = +1;
++ }
++
++ for(row = init_row; row != test_row; row += inc_row)
++ memmove(getcell(screen, row, dest.start_col),
++ getcell(screen, row + downward, src.start_col),
++ cols * sizeof(ScreenCell));
++ }
++
++ return 1;
++ }
++
++ static int moverect_user(VTermRect dest, VTermRect src, void *user)
++ {
++ VTermScreen *screen = user;
++
++ if(screen->callbacks && screen->callbacks->moverect) {
++ if(screen->damage_merge != VTERM_DAMAGE_SCROLL)
++ // Avoid an infinite loop
++ vterm_screen_flush_damage(screen);
++
++ if((*screen->callbacks->moverect)(dest, src, screen->cbdata))
++ return 1;
++ }
++
++ damagerect(screen, dest);
++
++ return 1;
++ }
++
++ static int erase_internal(VTermRect rect, int selective, void *user)
++ {
++ VTermScreen *screen = user;
++ int row, col;
++
++ for(row = rect.start_row; row < screen->state->rows && row < rect.end_row; row++) {
++ const VTermLineInfo *info = vterm_state_get_lineinfo(screen->state, row);
++
++ for(col = rect.start_col; col < rect.end_col; col++) {
++ ScreenCell *cell = getcell(screen, row, col);
++
++ if(selective && cell->pen.protected_cell)
++ continue;
++
++ cell->chars[0] = 0;
++ cell->pen = screen->pen;
++ cell->pen.dwl = info->doublewidth;
++ cell->pen.dhl = info->doubleheight;
++ }
++ }
++
++ return 1;
++ }
++
++ static int erase_user(VTermRect rect, int selective UNUSED, void *user)
++ {
++ VTermScreen *screen = user;
++
++ damagerect(screen, rect);
++
++ return 1;
++ }
++
++ static int erase(VTermRect rect, int selective, void *user)
++ {
++ erase_internal(rect, selective, user);
++ return erase_user(rect, 0, user);
++ }
++
++ static int scrollrect(VTermRect rect, int downward, int rightward, void *user)
++ {
++ VTermScreen *screen = user;
++
++ if(screen->damage_merge != VTERM_DAMAGE_SCROLL) {
++ vterm_scroll_rect(rect, downward, rightward,
++ moverect_internal, erase_internal, screen);
++
++ vterm_screen_flush_damage(screen);
++
++ vterm_scroll_rect(rect, downward, rightward,
++ moverect_user, erase_user, screen);
++
++ return 1;
++ }
++
++ if(screen->damaged.start_row != -1 &&
++ !rect_intersects(&rect, &screen->damaged)) {
++ vterm_screen_flush_damage(screen);
++ }
++
++ if(screen->pending_scrollrect.start_row == -1) {
++ screen->pending_scrollrect = rect;
++ screen->pending_scroll_downward = downward;
++ screen->pending_scroll_rightward = rightward;
++ }
++ else if(rect_equal(&screen->pending_scrollrect, &rect) &&
++ ((screen->pending_scroll_downward == 0 && downward == 0) ||
++ (screen->pending_scroll_rightward == 0 && rightward == 0))) {
++ screen->pending_scroll_downward += downward;
++ screen->pending_scroll_rightward += rightward;
++ }
++ else {
++ vterm_screen_flush_damage(screen);
++
++ screen->pending_scrollrect = rect;
++ screen->pending_scroll_downward = downward;
++ screen->pending_scroll_rightward = rightward;
++ }
++
++ vterm_scroll_rect(rect, downward, rightward,
++ moverect_internal, erase_internal, screen);
++
++ if(screen->damaged.start_row == -1)
++ return 1;
++
++ if(rect_contains(&rect, &screen->damaged)) {
++ /* Scroll region entirely contains the damage; just move it */
++ vterm_rect_move(&screen->damaged, -downward, -rightward);
++ rect_clip(&screen->damaged, &rect);
++ }
++ /* There are a number of possible cases here, but lets restrict this to only
++ * the common case where we might actually gain some performance by
++ * optimising it. Namely, a vertical scroll that neatly cuts the damage
++ * region in half.
++ */
++ else if(rect.start_col <= screen->damaged.start_col &&
++ rect.end_col >= screen->damaged.end_col &&
++ rightward == 0) {
++ if(screen->damaged.start_row >= rect.start_row &&
++ screen->damaged.start_row < rect.end_row) {
++ screen->damaged.start_row -= downward;
++ if(screen->damaged.start_row < rect.start_row)
++ screen->damaged.start_row = rect.start_row;
++ if(screen->damaged.start_row > rect.end_row)
++ screen->damaged.start_row = rect.end_row;
++ }
++ if(screen->damaged.end_row >= rect.start_row &&
++ screen->damaged.end_row < rect.end_row) {
++ screen->damaged.end_row -= downward;
++ if(screen->damaged.end_row < rect.start_row)
++ screen->damaged.end_row = rect.start_row;
++ if(screen->damaged.end_row > rect.end_row)
++ screen->damaged.end_row = rect.end_row;
++ }
++ }
++ else {
++ DEBUG_LOG2("TODO: Just flush and redo damaged=" STRFrect " rect=" STRFrect "\n",
++ ARGSrect(screen->damaged), ARGSrect(rect));
++ }
++
++ return 1;
++ }
++
++ static int movecursor(VTermPos pos, VTermPos oldpos, int visible, void *user)
++ {
++ VTermScreen *screen = user;
++
++ if(screen->callbacks && screen->callbacks->movecursor)
++ return (*screen->callbacks->movecursor)(pos, oldpos, visible, screen->cbdata);
++
++ return 0;
++ }
++
++ static int setpenattr(VTermAttr attr, VTermValue *val, void *user)
++ {
++ VTermScreen *screen = user;
++
++ switch(attr) {
++ case VTERM_ATTR_BOLD:
++ screen->pen.bold = val->boolean;
++ return 1;
++ case VTERM_ATTR_UNDERLINE:
++ screen->pen.underline = val->number;
++ return 1;
++ case VTERM_ATTR_ITALIC:
++ screen->pen.italic = val->boolean;
++ return 1;
++ case VTERM_ATTR_BLINK:
++ screen->pen.blink = val->boolean;
++ return 1;
++ case VTERM_ATTR_REVERSE:
++ screen->pen.reverse = val->boolean;
++ return 1;
++ case VTERM_ATTR_STRIKE:
++ screen->pen.strike = val->boolean;
++ return 1;
++ case VTERM_ATTR_FONT:
++ screen->pen.font = val->number;
++ return 1;
++ case VTERM_ATTR_FOREGROUND:
++ screen->pen.fg = val->color;
++ return 1;
++ case VTERM_ATTR_BACKGROUND:
++ screen->pen.bg = val->color;
++ return 1;
++
++ case VTERM_N_ATTRS:
++ return 0;
++ }
++
++ return 0;
++ }
++
++ static int settermprop(VTermProp prop, VTermValue *val, void *user)
++ {
++ VTermScreen *screen = user;
++
++ switch(prop) {
++ case VTERM_PROP_ALTSCREEN:
++ if(val->boolean && !screen->buffers[1])
++ return 0;
++
++ screen->buffer = val->boolean ? screen->buffers[1] : screen->buffers[0];
++ /* only send a damage event on disable; because during enable there's an
++ * erase that sends a damage anyway
++ */
++ if(!val->boolean)
++ damagescreen(screen);
++ break;
++ case VTERM_PROP_REVERSE:
++ screen->global_reverse = val->boolean;
++ damagescreen(screen);
++ break;
++ default:
++ ; /* ignore */
++ }
++
++ if(screen->callbacks && screen->callbacks->settermprop)
++ return (*screen->callbacks->settermprop)(prop, val, screen->cbdata);
++
++ return 1;
++ }
++
++ static int bell(void *user)
++ {
++ VTermScreen *screen = user;
++
++ if(screen->callbacks && screen->callbacks->bell)
++ return (*screen->callbacks->bell)(screen->cbdata);
++
++ return 0;
++ }
++
++ static int resize(int new_rows, int new_cols, VTermPos *delta, void *user)
++ {
++ VTermScreen *screen = user;
++
++ int is_altscreen = (screen->buffers[1] && screen->buffer == screen->buffers[1]);
++
++ int old_rows = screen->rows;
++ int old_cols = screen->cols;
++ int first_blank_row;
++
++ if(!is_altscreen && new_rows < old_rows) {
++ // Fewer rows - determine if we're going to scroll at all, and if so, push
++ // those lines to scrollback
++ VTermPos pos = { 0, 0 };
++ VTermPos cursor = screen->state->pos;
++ // Find the first blank row after the cursor.
++ for(pos.row = old_rows - 1; pos.row >= new_rows; pos.row--)
++ if(!vterm_screen_is_eol(screen, pos) || cursor.row == pos.row)
++ break;
++
++ first_blank_row = pos.row + 1;
++ if(first_blank_row > new_rows) {
++ VTermRect rect = {0,0,0,0};
++ rect.end_row = old_rows;
++ rect.end_col = old_cols;
++ scrollrect(rect, first_blank_row - new_rows, 0, user);
++ vterm_screen_flush_damage(screen);
++
++ delta->row -= first_blank_row - new_rows;
++ }
++ }
++
++ screen->buffers[0] = realloc_buffer(screen, screen->buffers[0], new_rows, new_cols);
++ if(screen->buffers[1])
++ screen->buffers[1] = realloc_buffer(screen, screen->buffers[1], new_rows, new_cols);
++
++ screen->buffer = is_altscreen ? screen->buffers[1] : screen->buffers[0];
++
++ screen->rows = new_rows;
++ screen->cols = new_cols;
++
++ if(screen->sb_buffer)
++ vterm_allocator_free(screen->vt, screen->sb_buffer);
++
++ screen->sb_buffer = vterm_allocator_malloc(screen->vt, sizeof(VTermScreenCell) * new_cols);
++
++ if(new_cols > old_cols) {
++ VTermRect rect;
++ rect.start_row = 0;
++ rect.end_row = old_rows;
++ rect.start_col = old_cols;
++ rect.end_col = new_cols;
++ damagerect(screen, rect);
++ }
++
++ if(new_rows > old_rows) {
++ if(!is_altscreen && screen->callbacks && screen->callbacks->sb_popline) {
++ int rows = new_rows - old_rows;
++ while(rows) {
++ VTermRect rect = {0,0,0,0};
++ VTermPos pos = { 0, 0 };
++ if(!(screen->callbacks->sb_popline(screen->cols, screen->sb_buffer, screen->cbdata)))
++ break;
++
++ rect.end_row = screen->rows;
++ rect.end_col = screen->cols;
++ scrollrect(rect, -1, 0, user);
++
++ for(pos.col = 0; pos.col < screen->cols; pos.col += screen->sb_buffer[pos.col].width)
++ vterm_screen_set_cell(screen, pos, screen->sb_buffer + pos.col);
++
++ rect.end_row = 1;
++ damagerect(screen, rect);
++
++ vterm_screen_flush_damage(screen);
++
++ rows--;
++ delta->row++;
++ }
++ }
++
++ {
++ VTermRect rect;
++ rect.start_row = old_rows;
++ rect.end_row = new_rows;
++ rect.start_col = 0;
++ rect.end_col = new_cols;
++ damagerect(screen, rect);
++ }
++ }
++
++ if(screen->callbacks && screen->callbacks->resize)
++ return (*screen->callbacks->resize)(new_rows, new_cols, screen->cbdata);
++
++ return 1;
++ }
++
++ static int setlineinfo(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)
++ {
++ VTermScreen *screen = user;
++ int col;
++ VTermRect rect;
++
++ if(newinfo->doublewidth != oldinfo->doublewidth ||
++ newinfo->doubleheight != oldinfo->doubleheight) {
++ for(col = 0; col < screen->cols; col++) {
++ ScreenCell *cell = getcell(screen, row, col);
++ cell->pen.dwl = newinfo->doublewidth;
++ cell->pen.dhl = newinfo->doubleheight;
++ }
++
++ rect.start_row = row;
++ rect.end_row = row + 1;
++ rect.start_col = 0;
++ rect.end_col = newinfo->doublewidth ? screen->cols / 2 : screen->cols;
++ damagerect(screen, rect);
++
++ if(newinfo->doublewidth) {
++ rect.start_col = screen->cols / 2;
++ rect.end_col = screen->cols;
++
++ erase_internal(rect, 0, user);
++ }
++ }
++
++ return 1;
++ }
++
++ static VTermStateCallbacks state_cbs = {
++ &putglyph, /* putglyph */
++ &movecursor, /* movecursor */
++ &scrollrect, /* scrollrect */
++ NULL, /* moverect */
++ &erase, /* erase */
++ NULL, /* initpen */
++ &setpenattr, /* setpenattr */
++ &settermprop, /* settermprop */
++ &bell, /* bell */
++ &resize, /* resize */
++ &setlineinfo /* setlineinfo */
++ };
++
++ static VTermScreen *screen_new(VTerm *vt)
++ {
++ VTermState *state = vterm_obtain_state(vt);
++ VTermScreen *screen;
++ int rows, cols;
++
++ if(!state)
++ return NULL;
++
++ screen = vterm_allocator_malloc(vt, sizeof(VTermScreen));
++
++ vterm_get_size(vt, &rows, &cols);
++
++ screen->vt = vt;
++ screen->state = state;
++
++ screen->damage_merge = VTERM_DAMAGE_CELL;
++ screen->damaged.start_row = -1;
++ screen->pending_scrollrect.start_row = -1;
++
++ screen->rows = rows;
++ screen->cols = cols;
++
++ screen->callbacks = NULL;
++ screen->cbdata = NULL;
++
++ screen->buffers[0] = realloc_buffer(screen, NULL, rows, cols);
++
++ screen->buffer = screen->buffers[0];
++
++ screen->sb_buffer = vterm_allocator_malloc(screen->vt, sizeof(VTermScreenCell) * cols);
++
++ vterm_state_set_callbacks(screen->state, &state_cbs, screen);
++
++ return screen;
++ }
++
++ INTERNAL void vterm_screen_free(VTermScreen *screen)
++ {
++ vterm_allocator_free(screen->vt, screen->buffers[0]);
++ if(screen->buffers[1])
++ vterm_allocator_free(screen->vt, screen->buffers[1]);
++
++ vterm_allocator_free(screen->vt, screen->sb_buffer);
++
++ vterm_allocator_free(screen->vt, screen);
++ }
++
++ void vterm_screen_reset(VTermScreen *screen, int hard)
++ {
++ screen->damaged.start_row = -1;
++ screen->pending_scrollrect.start_row = -1;
++ vterm_state_reset(screen->state, hard);
++ vterm_screen_flush_damage(screen);
++ }
++
++ static size_t _get_chars(const VTermScreen *screen, const int utf8, void *buffer, size_t len, const VTermRect rect)
++ {
++ size_t outpos = 0;
++ int padding = 0;
++ int row, col;
++
++ #define PUT(c) \
++ if(utf8) { \
++ size_t thislen = utf8_seqlen(c); \
++ if(buffer && outpos + thislen <= len) \
++ outpos += fill_utf8((c), (char *)buffer + outpos); \
++ else \
++ outpos += thislen; \
++ } \
++ else { \
++ if(buffer && outpos + 1 <= len) \
++ ((uint32_t*)buffer)[outpos++] = (c); \
++ else \
++ outpos++; \
++ }
++
++ for(row = rect.start_row; row < rect.end_row; row++) {
++ for(col = rect.start_col; col < rect.end_col; col++) {
++ ScreenCell *cell = getcell(screen, row, col);
++ int i;
++
++ if(cell->chars[0] == 0)
++ // Erased cell, might need a space
++ padding++;
++ else if(cell->chars[0] == (uint32_t)-1)
++ // Gap behind a double-width char, do nothing
++ ;
++ else {
++ while(padding) {
++ PUT(UNICODE_SPACE);
++ padding--;
++ }
++ for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && cell->chars[i]; i++) {
++ PUT(cell->chars[i]);
++ }
++ }
++ }
++
++ if(row < rect.end_row - 1) {
++ PUT(UNICODE_LINEFEED);
++ padding = 0;
++ }
++ }
++
++ return outpos;
++ }
++
++ size_t vterm_screen_get_chars(const VTermScreen *screen, uint32_t *chars, size_t len, const VTermRect rect)
++ {
++ return _get_chars(screen, 0, chars, len, rect);
++ }
++
++ size_t vterm_screen_get_text(const VTermScreen *screen, char *str, size_t len, const VTermRect rect)
++ {
++ return _get_chars(screen, 1, str, len, rect);
++ }
++
++ /* Copy internal to external representation of a screen cell */
++ int vterm_screen_get_cell(const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell)
++ {
++ ScreenCell *intcell = getcell(screen, pos.row, pos.col);
++ int i;
++
++ if(!intcell)
++ return 0;
++
++ for(i = 0; ; i++) {
++ cell->chars[i] = intcell->chars[i];
++ if(!intcell->chars[i])
++ break;
++ }
++
++ cell->attrs.bold = intcell->pen.bold;
++ cell->attrs.underline = intcell->pen.underline;
++ cell->attrs.italic = intcell->pen.italic;
++ cell->attrs.blink = intcell->pen.blink;
++ cell->attrs.reverse = intcell->pen.reverse ^ screen->global_reverse;
++ cell->attrs.strike = intcell->pen.strike;
++ cell->attrs.font = intcell->pen.font;
++
++ cell->attrs.dwl = intcell->pen.dwl;
++ cell->attrs.dhl = intcell->pen.dhl;
++
++ cell->fg = intcell->pen.fg;
++ cell->bg = intcell->pen.bg;
++
++ if(pos.col < (screen->cols - 1) &&
++ getcell(screen, pos.row, pos.col + 1)->chars[0] == (uint32_t)-1)
++ cell->width = 2;
++ else
++ cell->width = 1;
++
++ return 1;
++ }
++
++ /* Copy external to internal representation of a screen cell */
++ /* static because it's only used internally for sb_popline during resize */
++ static int vterm_screen_set_cell(VTermScreen *screen, VTermPos pos, const VTermScreenCell *cell)
++ {
++ ScreenCell *intcell = getcell(screen, pos.row, pos.col);
++ int i;
++
++ if(!intcell)
++ return 0;
++
++ for(i = 0; ; i++) {
++ intcell->chars[i] = cell->chars[i];
++ if(!cell->chars[i])
++ break;
++ }
++
++ intcell->pen.bold = cell->attrs.bold;
++ intcell->pen.underline = cell->attrs.underline;
++ intcell->pen.italic = cell->attrs.italic;
++ intcell->pen.blink = cell->attrs.blink;
++ intcell->pen.reverse = cell->attrs.reverse ^ screen->global_reverse;
++ intcell->pen.strike = cell->attrs.strike;
++ intcell->pen.font = cell->attrs.font;
++
++ intcell->pen.fg = cell->fg;
++ intcell->pen.bg = cell->bg;
++
++ if(cell->width == 2)
++ getcell(screen, pos.row, pos.col + 1)->chars[0] = (uint32_t)-1;
++
++ return 1;
++ }
++
++ int vterm_screen_is_eol(const VTermScreen *screen, VTermPos pos)
++ {
++ /* This cell is EOL if this and every cell to the right is black */
++ for(; pos.col < screen->cols; pos.col++) {
++ ScreenCell *cell = getcell(screen, pos.row, pos.col);
++ if(cell->chars[0] != 0)
++ return 0;
++ }
++
++ return 1;
++ }
++
++ VTermScreen *vterm_obtain_screen(VTerm *vt)
++ {
++ if(!vt->screen)
++ vt->screen = screen_new(vt);
++ return vt->screen;
++ }
++
++ void vterm_screen_enable_altscreen(VTermScreen *screen, int altscreen)
++ {
++
++ if(!screen->buffers[1] && altscreen) {
++ int rows, cols;
++ vterm_get_size(screen->vt, &rows, &cols);
++
++ screen->buffers[1] = realloc_buffer(screen, NULL, rows, cols);
++ }
++ }
++
++ void vterm_screen_set_callbacks(VTermScreen *screen, const VTermScreenCallbacks *callbacks, void *user)
++ {
++ screen->callbacks = callbacks;
++ screen->cbdata = user;
++ }
++
++ void *vterm_screen_get_cbdata(VTermScreen *screen)
++ {
++ return screen->cbdata;
++ }
++
++ void vterm_screen_set_unrecognised_fallbacks(VTermScreen *screen, const VTermParserCallbacks *fallbacks, void *user)
++ {
++ vterm_state_set_unrecognised_fallbacks(screen->state, fallbacks, user);
++ }
++
++ void *vterm_screen_get_unrecognised_fbdata(VTermScreen *screen)
++ {
++ return vterm_state_get_unrecognised_fbdata(screen->state);
++ }
++
++ void vterm_screen_flush_damage(VTermScreen *screen)
++ {
++ if(screen->pending_scrollrect.start_row != -1) {
++ vterm_scroll_rect(screen->pending_scrollrect, screen->pending_scroll_downward, screen->pending_scroll_rightward,
++ moverect_user, erase_user, screen);
++
++ screen->pending_scrollrect.start_row = -1;
++ }
++
++ if(screen->damaged.start_row != -1) {
++ if(screen->callbacks && screen->callbacks->damage)
++ (*screen->callbacks->damage)(screen->damaged, screen->cbdata);
++
++ screen->damaged.start_row = -1;
++ }
++ }
++
++ void vterm_screen_set_damage_merge(VTermScreen *screen, VTermDamageSize size)
++ {
++ vterm_screen_flush_damage(screen);
++ screen->damage_merge = size;
++ }
++
++ static int attrs_differ(VTermAttrMask attrs, ScreenCell *a, ScreenCell *b)
++ {
++ if((attrs & VTERM_ATTR_BOLD_MASK) && (a->pen.bold != b->pen.bold))
++ return 1;
++ if((attrs & VTERM_ATTR_UNDERLINE_MASK) && (a->pen.underline != b->pen.underline))
++ return 1;
++ if((attrs & VTERM_ATTR_ITALIC_MASK) && (a->pen.italic != b->pen.italic))
++ return 1;
++ if((attrs & VTERM_ATTR_BLINK_MASK) && (a->pen.blink != b->pen.blink))
++ return 1;
++ if((attrs & VTERM_ATTR_REVERSE_MASK) && (a->pen.reverse != b->pen.reverse))
++ return 1;
++ if((attrs & VTERM_ATTR_STRIKE_MASK) && (a->pen.strike != b->pen.strike))
++ return 1;
++ if((attrs & VTERM_ATTR_FONT_MASK) && (a->pen.font != b->pen.font))
++ return 1;
++ if((attrs & VTERM_ATTR_FOREGROUND_MASK) && !vterm_color_equal(a->pen.fg, b->pen.fg))
++ return 1;
++ if((attrs & VTERM_ATTR_BACKGROUND_MASK) && !vterm_color_equal(a->pen.bg, b->pen.bg))
++ return 1;
++
++ return 0;
++ }
++
++ int vterm_screen_get_attrs_extent(const VTermScreen *screen, VTermRect *extent, VTermPos pos, VTermAttrMask attrs)
++ {
++ int col;
++
++ ScreenCell *target = getcell(screen, pos.row, pos.col);
++
++ // TODO: bounds check
++ extent->start_row = pos.row;
++ extent->end_row = pos.row + 1;
++
++ if(extent->start_col < 0)
++ extent->start_col = 0;
++ if(extent->end_col < 0)
++ extent->end_col = screen->cols;
++
++ for(col = pos.col - 1; col >= extent->start_col; col--)
++ if(attrs_differ(attrs, target, getcell(screen, pos.row, col)))
++ break;
++ extent->start_col = col + 1;
++
++ for(col = pos.col + 1; col < extent->end_col; col++)
++ if(attrs_differ(attrs, target, getcell(screen, pos.row, col)))
++ break;
++ extent->end_col = col - 1;
++
++ return 1;
++ }
+*** ../vim-8.1.0378/src/Make_cyg_ming.mak 2018-09-10 17:50:32.709306979 +0200
+--- src/Make_cyg_ming.mak 2018-09-13 17:19:08.403051373 +0200
+***************
+*** 818,832 ****
+
+ ifeq ($(TERMINAL),yes)
+ OBJ += $(OUTDIR)/terminal.o \
+! $(OUTDIR)/term_encoding.o \
+! $(OUTDIR)/term_keyboard.o \
+! $(OUTDIR)/term_mouse.o \
+! $(OUTDIR)/term_parser.o \
+! $(OUTDIR)/term_pen.o \
+! $(OUTDIR)/term_screen.o \
+! $(OUTDIR)/term_state.o \
+! $(OUTDIR)/term_unicode.o \
+! $(OUTDIR)/term_vterm.o
+ endif
+
+ # Include xdiff
+--- 818,832 ----
+
+ ifeq ($(TERMINAL),yes)
+ OBJ += $(OUTDIR)/terminal.o \
+! $(OUTDIR)/encoding.o \
+! $(OUTDIR)/keyboard.o \
+! $(OUTDIR)/mouse.o \
+! $(OUTDIR)/parser.o \
+! $(OUTDIR)/pen.o \
+! $(OUTDIR)/termscreen.o \
+! $(OUTDIR)/state.o \
+! $(OUTDIR)/unicode.o \
+! $(OUTDIR)/vterm.o
+ endif
+
+ # Include xdiff
+***************
+*** 1064,1094 ****
+ -DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
+ -DWCWIDTH_FUNCTION=utf_uint2cells
+
+! $(OUTDIR)/term_encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/encoding.c -o $@
+
+! $(OUTDIR)/term_keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/keyboard.c -o $@
+
+! $(OUTDIR)/term_mouse.o: libvterm/src/mouse.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/mouse.c -o $@
+
+! $(OUTDIR)/term_parser.o: libvterm/src/parser.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/parser.c -o $@
+
+! $(OUTDIR)/term_pen.o: libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/pen.c -o $@
+
+! $(OUTDIR)/term_screen.o: libvterm/src/screen.c $(TERM_DEPS)
+! $(CCCTERM) libvterm/src/screen.c -o $@
+
+! $(OUTDIR)/term_state.o: libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/state.c -o $@
+
+! $(OUTDIR)/term_unicode.o: libvterm/src/unicode.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/unicode.c -o $@
+
+! $(OUTDIR)/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/vterm.c -o $@
+
+ $(OUTDIR)/xdiffi.o: xdiff/xdiffi.c $(XDIFF_DEPS)
+--- 1064,1094 ----
+ -DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
+ -DWCWIDTH_FUNCTION=utf_uint2cells
+
+! $(OUTDIR)/encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/encoding.c -o $@
+
+! $(OUTDIR)/keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/keyboard.c -o $@
+
+! $(OUTDIR)/mouse.o: libvterm/src/mouse.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/mouse.c -o $@
+
+! $(OUTDIR)/parser.o: libvterm/src/parser.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/parser.c -o $@
+
+! $(OUTDIR)/pen.o: libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/pen.c -o $@
+
+! $(OUTDIR)/termscreen.o: libvterm/src/termscreen.c $(TERM_DEPS)
+! $(CCCTERM) libvterm/src/termscreen.c -o $@
+
+! $(OUTDIR)/state.o: libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/state.c -o $@
+
+! $(OUTDIR)/unicode.o: libvterm/src/unicode.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/unicode.c -o $@
+
+! $(OUTDIR)/vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) libvterm/src/vterm.c -o $@
+
+ $(OUTDIR)/xdiffi.o: xdiff/xdiffi.c $(XDIFF_DEPS)
+*** ../vim-8.1.0378/src/Make_mvc.mak 2018-09-10 17:50:32.709306979 +0200
+--- src/Make_mvc.mak 2018-09-13 17:19:45.166766309 +0200
+***************
+*** 380,394 ****
+ !if "$(TERMINAL)" == "yes"
+ TERM_OBJ = \
+ $(OBJDIR)/terminal.obj \
+! $(OBJDIR)/term_encoding.obj \
+! $(OBJDIR)/term_keyboard.obj \
+! $(OBJDIR)/term_mouse.obj \
+! $(OBJDIR)/term_parser.obj \
+! $(OBJDIR)/term_pen.obj \
+! $(OBJDIR)/term_screen.obj \
+! $(OBJDIR)/term_state.obj \
+! $(OBJDIR)/term_unicode.obj \
+! $(OBJDIR)/term_vterm.obj
+ TERM_DEFS = -DFEAT_TERMINAL
+ TERM_DEPS = \
+ libvterm/include/vterm.h \
+--- 380,394 ----
+ !if "$(TERMINAL)" == "yes"
+ TERM_OBJ = \
+ $(OBJDIR)/terminal.obj \
+! $(OBJDIR)/encoding.obj \
+! $(OBJDIR)/keyboard.obj \
+! $(OBJDIR)/mouse.obj \
+! $(OBJDIR)/parser.obj \
+! $(OBJDIR)/pen.obj \
+! $(OBJDIR)/termscreen.obj \
+! $(OBJDIR)/state.obj \
+! $(OBJDIR)/unicode.obj \
+! $(OBJDIR)/vterm.obj
+ TERM_DEFS = -DFEAT_TERMINAL
+ TERM_DEPS = \
+ libvterm/include/vterm.h \
+***************
+*** 1561,1591 ****
+ -DWCWIDTH_FUNCTION=utf_uint2cells \
+ -D_CRT_SECURE_NO_WARNINGS
+
+! $(OUTDIR)/term_encoding.obj: $(OUTDIR) libvterm/src/encoding.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/encoding.c
+
+! $(OUTDIR)/term_keyboard.obj: $(OUTDIR) libvterm/src/keyboard.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/keyboard.c
+
+! $(OUTDIR)/term_mouse.obj: $(OUTDIR) libvterm/src/mouse.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/mouse.c
+
+! $(OUTDIR)/term_parser.obj: $(OUTDIR) libvterm/src/parser.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/parser.c
+
+! $(OUTDIR)/term_pen.obj: $(OUTDIR) libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/pen.c
+
+! $(OUTDIR)/term_screen.obj: $(OUTDIR) libvterm/src/screen.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/screen.c
+
+! $(OUTDIR)/term_state.obj: $(OUTDIR) libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/state.c
+
+! $(OUTDIR)/term_unicode.obj: $(OUTDIR) libvterm/src/unicode.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/unicode.c
+
+! $(OUTDIR)/term_vterm.obj: $(OUTDIR) libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/vterm.c
+
+
+--- 1561,1591 ----
+ -DWCWIDTH_FUNCTION=utf_uint2cells \
+ -D_CRT_SECURE_NO_WARNINGS
+
+! $(OUTDIR)/encoding.obj: $(OUTDIR) libvterm/src/encoding.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/encoding.c
+
+! $(OUTDIR)/keyboard.obj: $(OUTDIR) libvterm/src/keyboard.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/keyboard.c
+
+! $(OUTDIR)/mouse.obj: $(OUTDIR) libvterm/src/mouse.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/mouse.c
+
+! $(OUTDIR)/parser.obj: $(OUTDIR) libvterm/src/parser.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/parser.c
+
+! $(OUTDIR)/pen.obj: $(OUTDIR) libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/pen.c
+
+! $(OUTDIR)/termscreen.obj: $(OUTDIR) libvterm/src/screen.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/screen.c
+
+! $(OUTDIR)/state.obj: $(OUTDIR) libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/state.c
+
+! $(OUTDIR)/unicode.obj: $(OUTDIR) libvterm/src/unicode.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/unicode.c
+
+! $(OUTDIR)/vterm.obj: $(OUTDIR) libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/vterm.c
+
+
+*** ../vim-8.1.0378/src/version.c 2018-09-13 15:58:55.745722402 +0200
+--- src/version.c 2018-09-13 16:44:24.695181110 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 379,
+ /**/
+
+--
+Well, you come from nothing, you go back to nothing... What have you
+lost? Nothing!
+ -- Monty Python: The life of Brian
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0380 b/data/vim/patches/8.1.0380
new file mode 100644
index 000000000..484ff7518
--- /dev/null
+++ b/data/vim/patches/8.1.0380
@@ -0,0 +1,214 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0380
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0380
+Problem: "make proto" doesn't work well.
+Solution: Define a few more types for cproto. Update proto files. Fix that
+ workshop didn't build.
+Files: src/vim.h, src/protodef.h, src/if_ruby.c, src/workshop.c,
+ src/proto/digraph.pro, src/proto/hardcopy.pro,
+ src/proto/option.pro, src/proto/window.pro
+
+
+*** ../vim-8.1.0379/src/vim.h 2018-09-11 21:30:05.253070476 +0200
+--- src/vim.h 2018-09-13 16:39:27.014182296 +0200
+***************
+*** 9,18 ****
+ #ifndef VIM__H
+ # define VIM__H
+
+! #ifdef PROTO
+! /* cproto runs into trouble when this type is missing */
+! typedef double _Float128;
+! #endif
+
+ /* use fastcall for Borland, when compiling for Win32 */
+ #if defined(__BORLANDC__) && defined(WIN32) && !defined(DEBUG)
+--- 9,15 ----
+ #ifndef VIM__H
+ # define VIM__H
+
+! #include "protodef.h"
+
+ /* use fastcall for Borland, when compiling for Win32 */
+ #if defined(__BORLANDC__) && defined(WIN32) && !defined(DEBUG)
+*** ../vim-8.1.0379/src/protodef.h 2018-09-13 17:25:18.544025832 +0200
+--- src/protodef.h 2018-09-13 16:39:03.850408009 +0200
+***************
+*** 0 ****
+--- 1,18 ----
++ /* vi:set ts=8 sts=4 sw=4 noet:
++ *
++ * VIM - Vi IMproved by Bram Moolenaar
++ *
++ * Do ":help uganda" in Vim to read copying and usage conditions.
++ * Do ":help credits" in Vim to see a list of people who contributed.
++ */
++
++ #ifdef PROTO
++ // cproto runs into trouble when these types are missing
++ typedef double _Float16;
++ typedef double _Float32;
++ typedef double _Float64;
++ typedef double _Float128;
++ typedef double _Float32x;
++ typedef double _Float64x;
++ #endif
++
+*** ../vim-8.1.0379/src/if_ruby.c 2018-08-11 14:24:06.945748177 +0200
+--- src/if_ruby.c 2018-09-13 16:38:17.706857582 +0200
+***************
+*** 11,16 ****
+--- 11,17 ----
+ * See README.txt for an overview of the Vim source code.
+ */
+
++ #include "protodef.h"
+ #ifdef HAVE_CONFIG_H
+ # include "auto/config.h"
+ #endif
+*** ../vim-8.1.0379/src/workshop.c 2018-06-23 19:22:45.618486231 +0200
+--- src/workshop.c 2018-09-13 16:42:46.020194024 +0200
+***************
+*** 8,13 ****
+--- 8,14 ----
+ * See README.txt for an overview of the Vim source code.
+ */
+
++ #include "protodef.h"
+ #ifdef HAVE_CONFIG_H
+ # include "auto/config.h"
+ #endif
+***************
+*** 1541,1547 ****
+ #ifdef FEAT_VARTABS
+ idx = computeIndex(col, text, beval->ts, beval->vts);
+ #else
+! idx = computeIndex(col, text, beval->ts);
+ #endif
+ if (idx > 0)
+ {
+--- 1542,1548 ----
+ #ifdef FEAT_VARTABS
+ idx = computeIndex(col, text, beval->ts, beval->vts);
+ #else
+! idx = computeIndex(col, text, beval->ts, 0);
+ #endif
+ if (idx > 0)
+ {
+***************
+*** 1577,1587 ****
+ computeIndex(
+ int wantedCol,
+ char_u *line,
+! int ts
+! #ifdef FEAT_VARTABS
+! int *vts
+! #else
+! )
+ {
+ int col = 0;
+ int idx = 0;
+--- 1578,1585 ----
+ computeIndex(
+ int wantedCol,
+ char_u *line,
+! int ts,
+! int *vts UNUSED)
+ {
+ int col = 0;
+ int idx = 0;
+*** ../vim-8.1.0379/src/proto/digraph.pro 2018-05-17 13:52:31.000000000 +0200
+--- src/proto/digraph.pro 2018-09-13 17:24:19.032531752 +0200
+***************
+*** 1,6 ****
+ /* digraph.c */
+ int do_digraph(int c);
+! char_u *get_digraph_for_char(int val);
+ int get_digraph(int cmdline);
+ int getdigraph(int char1, int char2, int meta_char);
+ void putdigraph(char_u *str);
+--- 1,6 ----
+ /* digraph.c */
+ int do_digraph(int c);
+! char_u *get_digraph_for_char(int val_arg);
+ int get_digraph(int cmdline);
+ int getdigraph(int char1, int char2, int meta_char);
+ void putdigraph(char_u *str);
+*** ../vim-8.1.0379/src/proto/hardcopy.pro 2018-05-17 13:52:37.000000000 +0200
+--- src/proto/hardcopy.pro 2018-09-13 17:24:22.172505209 +0200
+***************
+*** 13,19 ****
+ int mch_print_begin_page(char_u *str);
+ int mch_print_blank_page(void);
+ void mch_print_start_line(int margin, int page_line);
+! int mch_print_text_out(char_u *p, int len);
+ void mch_print_set_font(int iBold, int iItalic, int iUnderline);
+ void mch_print_set_bg(long_u bgcol);
+ void mch_print_set_fg(long_u fgcol);
+--- 13,19 ----
+ int mch_print_begin_page(char_u *str);
+ int mch_print_blank_page(void);
+ void mch_print_start_line(int margin, int page_line);
+! int mch_print_text_out(char_u *textp, int len);
+ void mch_print_set_font(int iBold, int iItalic, int iUnderline);
+ void mch_print_set_bg(long_u bgcol);
+ void mch_print_set_fg(long_u fgcol);
+*** ../vim-8.1.0379/src/proto/option.pro 2018-06-23 19:22:45.614486258 +0200
+--- src/proto/option.pro 2018-09-13 17:24:28.040455557 +0200
+***************
+*** 64,70 ****
+ int tabstop_padding(colnr_T col, int ts_arg, int *vts);
+ int tabstop_at(colnr_T col, int ts, int *vts);
+ colnr_T tabstop_start(colnr_T col, int ts, int *vts);
+! void tabstop_fromto(colnr_T start_col, colnr_T end_col, int ts, int *vts, int *ntabs, int *nspcs);
+ int tabstop_eq(int *ts1, int *ts2);
+ int *tabstop_copy(int *oldts);
+ int tabstop_count(int *ts);
+--- 64,70 ----
+ int tabstop_padding(colnr_T col, int ts_arg, int *vts);
+ int tabstop_at(colnr_T col, int ts, int *vts);
+ colnr_T tabstop_start(colnr_T col, int ts, int *vts);
+! void tabstop_fromto(colnr_T start_col, colnr_T end_col, int ts_arg, int *vts, int *ntabs, int *nspcs);
+ int tabstop_eq(int *ts1, int *ts2);
+ int *tabstop_copy(int *oldts);
+ int tabstop_count(int *ts);
+*** ../vim-8.1.0379/src/proto/window.pro 2018-08-21 16:56:28.367325278 +0200
+--- src/proto/window.pro 2018-09-13 17:24:32.976413749 +0200
+***************
+*** 94,98 ****
+ win_T *win_id2wp(typval_T *argvars);
+ int win_id2win(typval_T *argvars);
+ void win_findbuf(typval_T *argvars, list_T *list);
+! void get_framelayout(frame_T *fr, list_T *l, int topframe);
+ /* vim: set ft=c : */
+--- 94,98 ----
+ win_T *win_id2wp(typval_T *argvars);
+ int win_id2win(typval_T *argvars);
+ void win_findbuf(typval_T *argvars, list_T *list);
+! void get_framelayout(frame_T *fr, list_T *l, int outer);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0379/src/version.c 2018-09-13 17:23:05.169150892 +0200
+--- src/version.c 2018-09-13 17:24:14.340571382 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 380,
+ /**/
+
+--
+George: "I just got a new set of golf clubs for my wife!"
+ John: "Great trade!"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0381 b/data/vim/patches/8.1.0381
new file mode 100644
index 000000000..7c85a1202
--- /dev/null
+++ b/data/vim/patches/8.1.0381
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0381
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0381
+Problem: Variable declaration not at start of block.
+Solution: Fix line ordering.
+Files: src/xdiff/xpatience.c
+
+
+*** ../vim-8.1.0380/src/xdiff/xpatience.c 2018-09-13 15:58:55.745722402 +0200
+--- src/xdiff/xpatience.c 2018-09-13 17:29:31.541819795 +0200
+***************
+*** 209,219 ****
+ struct entry **sequence = (struct entry **)xdl_malloc(map->nr * sizeof(struct entry *));
+ int longest = 0, i;
+ struct entry *entry;
+-
+- /* Added to silence Coverity. */
+- if (sequence == NULL)
+- return map->first;
+-
+ /*
+ * If not -1, this entry in sequence must never be overridden.
+ * Therefore, overriding entries before this has no effect, so
+--- 209,214 ----
+***************
+*** 221,226 ****
+--- 216,225 ----
+ */
+ int anchor_i = -1;
+
++ /* Added to silence Coverity. */
++ if (sequence == NULL)
++ return map->first;
++
+ for (entry = map->first; entry; entry = entry->next) {
+ if (!entry->line2 || entry->line2 == NON_UNIQUE)
+ continue;
+*** ../vim-8.1.0380/src/version.c 2018-09-13 17:26:31.091401618 +0200
+--- src/version.c 2018-09-13 17:30:22.473367156 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 381,
+ /**/
+
+--
+Light travels faster than sound. This is why some people
+appear bright until you hear them speak
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0382 b/data/vim/patches/8.1.0382
new file mode 100644
index 000000000..1672ad71e
--- /dev/null
+++ b/data/vim/patches/8.1.0382
@@ -0,0 +1,186 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0382
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0382
+Problem: Some make programs can't handle dependency on "xdiff/../".
+Solution: Strip it out.
+Files: src/Makefile
+
+
+*** ../vim-8.1.0381/src/Makefile 2018-09-13 17:23:05.165150925 +0200
+--- src/Makefile 2018-09-13 17:59:08.999447845 +0200
+***************
+*** 2845,2851 ****
+ sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make
+ -for i in $(ALL_SRC); do echo $$i; \
+ $(CPP_DEPEND) $$i | \
+! sed -e 's+^\([^ ]*\.o\)+objects/\1+' >> tmp_make; done
+ mv tmp_make Makefile
+
+ # Run lint. Clean up the *.ln files that are sometimes left behind.
+--- 2845,2851 ----
+ sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make
+ -for i in $(ALL_SRC); do echo $$i; \
+ $(CPP_DEPEND) $$i | \
+! sed -e 's+^\([^ ]*\.o\)+objects/\1+' -e 's+xdiff/\.\./++g' >> tmp_make; done
+ mv tmp_make Makefile
+
+ # Run lint. Clean up the *.ln files that are sometimes left behind.
+***************
+*** 3404,3410 ****
+ objects/diff.o: diff.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h xdiff/xdiff.h xdiff/../vim.h
+ objects/digraph.o: digraph.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+--- 3404,3410 ----
+ objects/diff.o: diff.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+! proto.h globals.h farsi.h arabic.h xdiff/xdiff.h vim.h
+ objects/digraph.o: digraph.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+***************
+*** 3791,3847 ****
+ objects/vterm.o: libvterm/src/vterm.c libvterm/src/vterm_internal.h \
+ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
+ libvterm/src/utf8.h
+! objects/xdiffi.o: xdiff/xdiffi.c xdiff/xinclude.h xdiff/../auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
+! xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
+! xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
+! xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
+! xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
+! xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
+! xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xemit.o: xdiff/xemit.c xdiff/xinclude.h xdiff/../auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
+! xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
+! xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
+! xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
+! xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
+! xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
+! xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xprepare.o: xdiff/xprepare.c xdiff/xinclude.h xdiff/../auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
+! xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
+! xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
+! xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
+! xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
+! xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
+! xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xutils.o: xdiff/xutils.c xdiff/xinclude.h xdiff/../auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
+! xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
+! xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
+! xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
+! xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
+! xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
+! xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xhistogram.o: xdiff/xhistogram.c xdiff/xinclude.h xdiff/../auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
+! xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
+! xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
+! xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
+! xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
+! xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
+! xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xpatience.o: xdiff/xpatience.c xdiff/xinclude.h xdiff/../auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h xdiff/../vim.h xdiff/../protodef.h \
+! xdiff/../auto/config.h xdiff/../feature.h xdiff/../os_unix.h \
+! xdiff/../auto/osdef.h xdiff/../ascii.h xdiff/../keymap.h xdiff/../term.h \
+! xdiff/../macros.h xdiff/../option.h xdiff/../beval.h proto/gui_beval.pro \
+! xdiff/../structs.h xdiff/../regexp.h xdiff/../gui.h xdiff/../alloc.h \
+! xdiff/../ex_cmds.h xdiff/../spell.h xdiff/../proto.h xdiff/../globals.h \
+! xdiff/../farsi.h xdiff/../arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+--- 3791,3847 ----
+ objects/vterm.o: libvterm/src/vterm.c libvterm/src/vterm_internal.h \
+ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h \
+ libvterm/src/utf8.h
+! objects/xdiffi.o: xdiff/xdiffi.c xdiff/xinclude.h auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h vim.h protodef.h \
+! auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h \
+! macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xemit.o: xdiff/xemit.c xdiff/xinclude.h auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h vim.h protodef.h \
+! auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h \
+! macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xprepare.o: xdiff/xprepare.c xdiff/xinclude.h auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h vim.h protodef.h \
+! auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h \
+! macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xutils.o: xdiff/xutils.c xdiff/xinclude.h auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h vim.h protodef.h \
+! auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h \
+! macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xhistogram.o: xdiff/xhistogram.c xdiff/xinclude.h auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h vim.h protodef.h \
+! auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h \
+! macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+! objects/xpatience.o: xdiff/xpatience.c xdiff/xinclude.h auto/config.h \
+! xdiff/xmacros.h xdiff/xdiff.h vim.h protodef.h \
+! auto/config.h feature.h os_unix.h \
+! auto/osdef.h ascii.h keymap.h term.h \
+! macros.h option.h beval.h proto/gui_beval.pro \
+! structs.h regexp.h gui.h alloc.h \
+! ex_cmds.h spell.h proto.h globals.h \
+! farsi.h arabic.h xdiff/xtypes.h xdiff/xutils.h \
+ xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+*** ../vim-8.1.0381/src/version.c 2018-09-13 17:32:03.156465946 +0200
+--- src/version.c 2018-09-13 18:01:04.738133170 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 382,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+39. You move into a new house and decide to Netscape before you landscape.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0383 b/data/vim/patches/8.1.0383
new file mode 100644
index 000000000..bbd3183fb
--- /dev/null
+++ b/data/vim/patches/8.1.0383
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0383
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0383
+Problem: Missing source file rename.
+Solution: Update the dependency.
+Files: src/Make_mvc.mak
+
+
+*** ../vim-8.1.0382/src/Make_mvc.mak 2018-09-13 17:23:05.169150892 +0200
+--- src/Make_mvc.mak 2018-09-13 18:04:21.243973088 +0200
+***************
+*** 1576,1583 ****
+ $(OUTDIR)/pen.obj: $(OUTDIR) libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/pen.c
+
+! $(OUTDIR)/termscreen.obj: $(OUTDIR) libvterm/src/screen.c $(TERM_DEPS)
+! $(CCCTERM) -Fo$@ libvterm/src/screen.c
+
+ $(OUTDIR)/state.obj: $(OUTDIR) libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/state.c
+--- 1576,1583 ----
+ $(OUTDIR)/pen.obj: $(OUTDIR) libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/pen.c
+
+! $(OUTDIR)/termscreen.obj: $(OUTDIR) libvterm/src/termscreen.c $(TERM_DEPS)
+! $(CCCTERM) -Fo$@ libvterm/src/termscreen.c
+
+ $(OUTDIR)/state.obj: $(OUTDIR) libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) -Fo$@ libvterm/src/state.c
+*** ../vim-8.1.0382/src/version.c 2018-09-13 18:01:27.637877198 +0200
+--- src/version.c 2018-09-13 18:05:04.691505179 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 383,
+ /**/
+
+--
+The future isn't what it used to be.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0384 b/data/vim/patches/8.1.0384
new file mode 100644
index 000000000..f48352fc0
--- /dev/null
+++ b/data/vim/patches/8.1.0384
@@ -0,0 +1,189 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0384
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0384
+Problem: Sign ordering depends on +netbeans feature.
+Solution: Also order signs without +netbeans. (Christian Brabandt,
+ closes #3224)
+Files: src/structs.h, src/buffer.c
+
+
+*** ../vim-8.1.0383/src/structs.h 2018-09-10 21:04:09.872392623 +0200
+--- src/structs.h 2018-09-13 18:27:54.241504400 +0200
+***************
+*** 704,712 ****
+ linenr_T lnum; /* line number which has this sign */
+ int typenr; /* typenr of sign */
+ signlist_T *next; /* next signlist entry */
+- # ifdef FEAT_NETBEANS_INTG
+ signlist_T *prev; /* previous entry -- for easy reordering */
+- # endif
+ };
+
+ /* type argument for buf_getsigntype() */
+--- 704,710 ----
+*** ../vim-8.1.0383/src/buffer.c 2018-09-10 21:04:09.864392710 +0200
+--- src/buffer.c 2018-09-13 18:27:43.673610125 +0200
+***************
+*** 5856,5866 ****
+ newsign->lnum = lnum;
+ newsign->typenr = typenr;
+ newsign->next = next;
+- #ifdef FEAT_NETBEANS_INTG
+ newsign->prev = prev;
+ if (next != NULL)
+ next->prev = newsign;
+- #endif
+
+ if (prev == NULL)
+ {
+--- 5856,5864 ----
+***************
+*** 5905,5942 ****
+ sign->typenr = typenr;
+ return;
+ }
+! else if (
+! #ifndef FEAT_NETBEANS_INTG /* keep signs sorted by lnum */
+! id < 0 &&
+! #endif
+! lnum < sign->lnum)
+ {
+! #ifdef FEAT_NETBEANS_INTG /* insert new sign at head of list for this lnum */
+! /* XXX - GRP: Is this because of sign slide problem? Or is it
+! * really needed? Or is it because we allow multiple signs per
+! * line? If so, should I add that feature to FEAT_SIGNS?
+! */
+ while (prev != NULL && prev->lnum == lnum)
+ prev = prev->prev;
+ if (prev == NULL)
+ sign = buf->b_signlist;
+ else
+ sign = prev->next;
+- #endif
+ insert_sign(buf, prev, sign, id, lnum, typenr);
+ return;
+ }
+ prev = sign;
+ }
+! #ifdef FEAT_NETBEANS_INTG /* insert new sign at head of list for this lnum */
+! /* XXX - GRP: See previous comment */
+ while (prev != NULL && prev->lnum == lnum)
+ prev = prev->prev;
+ if (prev == NULL)
+ sign = buf->b_signlist;
+ else
+ sign = prev->next;
+- #endif
+ insert_sign(buf, prev, sign, id, lnum, typenr);
+
+ return;
+--- 5903,5931 ----
+ sign->typenr = typenr;
+ return;
+ }
+! else if (lnum < sign->lnum)
+ {
+! // keep signs sorted by lnum: insert new sign at head of list for
+! // this lnum
+ while (prev != NULL && prev->lnum == lnum)
+ prev = prev->prev;
+ if (prev == NULL)
+ sign = buf->b_signlist;
+ else
+ sign = prev->next;
+ insert_sign(buf, prev, sign, id, lnum, typenr);
+ return;
+ }
+ prev = sign;
+ }
+!
+! // insert new sign at head of list for this lnum
+ while (prev != NULL && prev->lnum == lnum)
+ prev = prev->prev;
+ if (prev == NULL)
+ sign = buf->b_signlist;
+ else
+ sign = prev->next;
+ insert_sign(buf, prev, sign, id, lnum, typenr);
+
+ return;
+***************
+*** 6008,6017 ****
+ if (sign->id == id)
+ {
+ *lastp = next;
+- #ifdef FEAT_NETBEANS_INTG
+ if (next != NULL)
+ next->prev = sign->prev;
+- #endif
+ lnum = sign->lnum;
+ vim_free(sign);
+ break;
+--- 5997,6004 ----
+***************
+*** 6067,6073 ****
+
+
+ # if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+! /* see if a given type of sign exists on a specific line */
+ int
+ buf_findsigntype_id(
+ buf_T *buf, /* buffer whose sign we are searching for */
+--- 6054,6062 ----
+
+
+ # if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
+! /*
+! * See if a given type of sign exists on a specific line.
+! */
+ int
+ buf_findsigntype_id(
+ buf_T *buf, /* buffer whose sign we are searching for */
+***************
+*** 6085,6091 ****
+
+
+ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+! /* return the number of icons on the given line */
+ int
+ buf_signcount(buf_T *buf, linenr_T lnum)
+ {
+--- 6074,6082 ----
+
+
+ # if defined(FEAT_SIGN_ICONS) || defined(PROTO)
+! /*
+! * Return the number of icons on the given line.
+! */
+ int
+ buf_signcount(buf_T *buf, linenr_T lnum)
+ {
+*** ../vim-8.1.0383/src/version.c 2018-09-13 18:05:45.291070558 +0200
+--- src/version.c 2018-09-13 18:32:47.474574781 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 384,
+ /**/
+
+--
+"Oh, no! NOT the Spanish Inquisition!"
+"NOBODY expects the Spanish Inquisition!!!"
+ -- Monty Python sketch --
+"Oh, no! NOT another option!"
+"EVERYBODY expects another option!!!"
+ -- Discussion in vim-dev mailing list --
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0385 b/data/vim/patches/8.1.0385
new file mode 100644
index 000000000..0fdfd6c57
--- /dev/null
+++ b/data/vim/patches/8.1.0385
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0385
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0385
+Problem: Coveralls badge doesn't update.
+Solution: Update the URL
+Files: README.md
+
+
+*** ../vim-8.1.0384/README.md 2018-08-09 21:33:34.800134541 +0200
+--- README.md 2018-09-13 19:02:49.346186094 +0200
+***************
+*** 2,8 ****
+
+ [![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim)
+ [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master)
+! [![Coverage Status](https://coveralls.io/repos/vim/vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/vim/vim?branch=master)
+ [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim)
+ [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim)
+ [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp)
+--- 2,8 ----
+
+ [![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim)
+ [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master)
+! [![Coverage Status](https://coveralls.io/repos/github/vim/vim/badge.svg?branch=master)](https://coveralls.io/github/vim/vim?branch=master)
+ [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim)
+ [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim)
+ [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp)
+*** ../vim-8.1.0384/src/version.c 2018-09-13 18:33:02.366426166 +0200
+--- src/version.c 2018-09-13 19:03:22.997988798 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 385,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+42. Your virtual girlfriend finds a new net sweetheart with a larger bandwidth.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0386 b/data/vim/patches/8.1.0386
new file mode 100644
index 000000000..3f77f9cdd
--- /dev/null
+++ b/data/vim/patches/8.1.0386
@@ -0,0 +1,181 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0386
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0386
+Problem: Cannot test with non-default option value.
+Solution: Add test_option_not_set().
+Files: runtime/doc/eval.txt, src/option.c, src/proto/option.pro,
+ src/evalfunc.c
+
+
+*** ../vim-8.1.0385/runtime/doc/eval.txt 2018-09-10 21:04:09.860392752 +0200
+--- runtime/doc/eval.txt 2018-09-13 20:30:37.739701623 +0200
+***************
+*** 2466,2471 ****
+--- 2473,2479 ----
+ test_null_list() List null value for testing
+ test_null_partial() Funcref null value for testing
+ test_null_string() String null value for testing
++ test_option_not_set({name}) none reset flag indicating option was set
+ test_override({expr}, {val}) none test with Vim internal overrides
+ test_settime({expr}) none set current time for testing
+ timer_info([{id}]) List information about timers
+***************
+*** 8723,8728 ****
+--- 8738,8752 ----
+ test_null_string() *test_null_string()*
+ Return a String that is null. Only useful for testing.
+
++ test_option_not_set({name}) *test_option_not_set()*
++ Reset the flag that indicates option {name} was set. Thus it
++ looks like it still has the default value. Use like this: >
++ set ambiwidth=double
++ call test_option_not_set('ambiwidth')
++ < Now the 'ambiwidth' option behaves like it was never changed,
++ even though the value is "double".
++ Only to be used for testing!
++
+ test_override({name}, {val}) *test_override()*
+ Overrides certain parts of Vims internal processing to be able
+ to run tests. Only to be used for testing Vim!
+--- 11734,11737 ----
+ Find more information in the file src/testdir/README.txt.
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0385/src/option.c 2018-09-10 21:15:34.637000672 +0200
+--- src/option.c 2018-09-13 20:25:54.982495459 +0200
+***************
+*** 12480,12492 ****
+ /*
+ * Reset the flag indicating option "name" was set.
+ */
+! void
+ reset_option_was_set(char_u *name)
+ {
+ int idx = findoption(name);
+
+ if (idx >= 0)
+ options[idx].flags &= ~P_WAS_SET;
+ }
+
+ /*
+--- 12480,12496 ----
+ /*
+ * Reset the flag indicating option "name" was set.
+ */
+! int
+ reset_option_was_set(char_u *name)
+ {
+ int idx = findoption(name);
+
+ if (idx >= 0)
++ {
+ options[idx].flags &= ~P_WAS_SET;
++ return OK;
++ }
++ return FAIL;
+ }
+
+ /*
+*** ../vim-8.1.0385/src/proto/option.pro 2018-09-13 17:26:31.091401618 +0200
+--- src/proto/option.pro 2018-09-13 20:25:58.654459076 +0200
+***************
+*** 55,61 ****
+ void vimrc_found(char_u *fname, char_u *envname);
+ void change_compatible(int on);
+ int option_was_set(char_u *name);
+! void reset_option_was_set(char_u *name);
+ int can_bs(int what);
+ void save_file_ff(buf_T *buf);
+ int file_ff_differs(buf_T *buf, int ignore_empty);
+--- 55,61 ----
+ void vimrc_found(char_u *fname, char_u *envname);
+ void change_compatible(int on);
+ int option_was_set(char_u *name);
+! int reset_option_was_set(char_u *name);
+ int can_bs(int what);
+ void save_file_ff(buf_T *buf);
+ int file_ff_differs(buf_T *buf, int ignore_empty);
+*** ../vim-8.1.0385/src/evalfunc.c 2018-09-13 15:33:39.601712271 +0200
+--- src/evalfunc.c 2018-09-13 20:26:35.782091366 +0200
+***************
+*** 415,420 ****
+--- 415,421 ----
+ static void f_test_alloc_fail(typval_T *argvars, typval_T *rettv);
+ static void f_test_autochdir(typval_T *argvars, typval_T *rettv);
+ static void f_test_feedinput(typval_T *argvars, typval_T *rettv);
++ static void f_test_option_not_set(typval_T *argvars, typval_T *rettv);
+ static void f_test_override(typval_T *argvars, typval_T *rettv);
+ static void f_test_garbagecollect_now(typval_T *argvars, typval_T *rettv);
+ static void f_test_ignore_error(typval_T *argvars, typval_T *rettv);
+***************
+*** 922,927 ****
+--- 923,929 ----
+ {"test_null_list", 0, 0, f_test_null_list},
+ {"test_null_partial", 0, 0, f_test_null_partial},
+ {"test_null_string", 0, 0, f_test_null_string},
++ {"test_option_not_set", 1, 1, f_test_option_not_set},
+ {"test_override", 2, 2, f_test_override},
+ {"test_settime", 1, 1, f_test_settime},
+ #ifdef FEAT_TIMERS
+***************
+*** 13062,13068 ****
+ }
+
+ /*
+! * "test_disable({name}, {val})" function
+ */
+ static void
+ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
+--- 13064,13088 ----
+ }
+
+ /*
+! * "test_option_not_set({name})" function
+! */
+! static void
+! f_test_option_not_set(typval_T *argvars, typval_T *rettv UNUSED)
+! {
+! char_u *name = (char_u *)"";
+!
+! if (argvars[0].v_type != VAR_STRING)
+! EMSG(_(e_invarg));
+! else
+! {
+! name = get_tv_string_chk(&argvars[0]);
+! if (reset_option_was_set(name) == FAIL)
+! EMSG2(_(e_invarg2), name);
+! }
+! }
+!
+! /*
+! * "test_override({name}, {val})" function
+ */
+ static void
+ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
+*** ../vim-8.1.0385/src/version.c 2018-09-13 19:04:45.437477554 +0200
+--- src/version.c 2018-09-13 20:29:01.432651600 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 386,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+43. You tell the kids they can't use the computer because "Daddy's got work to
+ do" and you don't even have a job.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0387 b/data/vim/patches/8.1.0387
new file mode 100644
index 000000000..d7c27be1f
--- /dev/null
+++ b/data/vim/patches/8.1.0387
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0387
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0387
+Problem: No test for 'ambiwidth' detection.
+Solution: Add a test.
+Files: src/testdir/test_startup_utf8.vim
+
+
+*** ../vim-8.1.0386/src/testdir/test_startup_utf8.vim 2016-08-09 22:02:09.000000000 +0200
+--- src/testdir/test_startup_utf8.vim 2018-09-13 20:43:32.424363080 +0200
+***************
+*** 4,9 ****
+--- 4,10 ----
+ endif
+
+ source shared.vim
++ source screendump.vim
+
+ func Test_read_stdin_utf8()
+ let linesin = ['テスト', '€ÀÈÌÒÙ']
+***************
+*** 62,64 ****
+--- 63,86 ----
+ call delete('Xtestout')
+ call delete('Xtestin')
+ endfunc
++
++ func Test_detect_ambiwidth()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ " Use the title termcap entries to output the escape sequence.
++ call writefile([
++ \ 'set enc=utf-8',
++ \ 'set ambiwidth=double',
++ \ 'call test_option_not_set("ambiwidth")',
++ \ 'redraw',
++ \ ], 'Xscript')
++ let buf = RunVimInTerminal('-S Xscript', {})
++ call term_wait(buf)
++ call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>")
++ call WaitForAssert({-> assert_match('single', term_getline(buf, 1))})
++
++ call StopVimInTerminal(buf)
++ call delete('Xscript')
++ endfunc
+*** ../vim-8.1.0386/src/version.c 2018-09-13 20:31:47.103018229 +0200
+--- src/version.c 2018-09-13 20:44:22.175933419 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 387,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+45. You buy a Captain Kirk chair with a built-in keyboard and mouse.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0388 b/data/vim/patches/8.1.0388
new file mode 100644
index 000000000..e0a3aedb6
--- /dev/null
+++ b/data/vim/patches/8.1.0388
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0388
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0388
+Problem: Coverity complains about possible NULL pointer use.
+Solution: Use get_tv_string() instead of get_tv_string_chk().
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0387/src/evalfunc.c 2018-09-13 20:31:47.103018229 +0200
+--- src/evalfunc.c 2018-09-13 21:27:59.619230226 +0200
+***************
+*** 13075,13081 ****
+ EMSG(_(e_invarg));
+ else
+ {
+! name = get_tv_string_chk(&argvars[0]);
+ if (reset_option_was_set(name) == FAIL)
+ EMSG2(_(e_invarg2), name);
+ }
+--- 13075,13081 ----
+ EMSG(_(e_invarg));
+ else
+ {
+! name = get_tv_string(&argvars[0]);
+ if (reset_option_was_set(name) == FAIL)
+ EMSG2(_(e_invarg2), name);
+ }
+*** ../vim-8.1.0387/src/version.c 2018-09-13 20:46:48.994641008 +0200
+--- src/version.c 2018-09-13 21:28:53.350713378 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 388,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+46. Your wife makes a new rule: "The computer cannot come to bed."
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0389 b/data/vim/patches/8.1.0389
new file mode 100644
index 000000000..eb8b59b74
--- /dev/null
+++ b/data/vim/patches/8.1.0389
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0389
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0389
+Problem: :behave command is not tested.
+Solution: Add a test. (Dominique Pelle, closes #3429)
+Files: src/Make_all.mak, src/testdir/test_alot.vim,
+ src/testdir/test_behave.vim
+
+
+*** ../vim-8.1.0388/src/Make_all.mak 2018-09-10 21:04:09.864392710 +0200
+--- src/Make_all.mak 2018-09-14 20:07:48.456062947 +0200
+***************
+*** 14,19 ****
+--- 14,20 ----
+ test_autoload \
+ test_backspace_opt \
+ test_backup \
++ test_behave \
+ test_blockedit \
+ test_breakindent \
+ test_bufline \
+*** ../vim-8.1.0388/src/testdir/test_alot.vim 2018-09-10 21:04:09.872392623 +0200
+--- src/testdir/test_alot.vim 2018-09-14 20:07:48.456062947 +0200
+***************
+*** 3,8 ****
+--- 3,9 ----
+
+ source test_assign.vim
+ source test_backup.vim
++ source test_behave.vim
+ source test_bufline.vim
+ source test_cd.vim
+ source test_changedtick.vim
+*** ../vim-8.1.0388/src/testdir/test_behave.vim 2018-09-14 20:10:11.270547147 +0200
+--- src/testdir/test_behave.vim 2018-09-14 20:07:48.456062947 +0200
+***************
+*** 0 ****
+--- 1,29 ----
++ " Test the :behave command
++
++ func Test_behave()
++ behave mswin
++ call assert_equal('mouse,key', &selectmode)
++ call assert_equal('popup', &mousemodel)
++ call assert_equal('startsel,stopsel', &keymodel)
++ call assert_equal('exclusive', &selection)
++
++ behave xterm
++ call assert_equal('', &selectmode)
++ call assert_equal('extend', &mousemodel)
++ call assert_equal('', &keymodel)
++ call assert_equal('inclusive', &selection)
++
++ set selection&
++ set mousemodel&
++ set keymodel&
++ set selection&
++ endfunc
++
++ func Test_behave_completion()
++ call feedkeys(":behave \<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"behave mswin xterm', @:)
++ endfunc
++
++ func Test_behave_error()
++ call assert_fails('behave x', 'E475:')
++ endfunc
+*** ../vim-8.1.0388/src/version.c 2018-09-13 21:30:01.622056753 +0200
+--- src/version.c 2018-09-14 20:08:53.075367719 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 389,
+ /**/
+
+--
+Never go to the toilet in a paperless office.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0390 b/data/vim/patches/8.1.0390
new file mode 100644
index 000000000..a6b5e47c0
--- /dev/null
+++ b/data/vim/patches/8.1.0390
@@ -0,0 +1,189 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0390
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0390
+Problem: Scrollbars are not tested.
+Solution: Add test_scrollbar() and a test.
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/testdir/test_gui.vim
+
+
+*** ../vim-8.1.0389/runtime/doc/eval.txt 2018-09-13 20:31:47.099018267 +0200
+--- runtime/doc/eval.txt 2018-09-14 21:26:26.864033563 +0200
+***************
+*** 2468,2473 ****
+--- 2475,2482 ----
+ test_null_string() String null value for testing
+ test_option_not_set({name}) none reset flag indicating option was set
+ test_override({expr}, {val}) none test with Vim internal overrides
++ test_scrollbar({which}, {value}, {dragging})
++ none scroll in the GUI for testing
+ test_settime({expr}) none set current time for testing
+ timer_info([{id}]) List information about timers
+ timer_pause({id}, {pause}) none pause or unpause a timer
+***************
+*** 8759,8764 ****
+--- 8775,8797 ----
+ < The value of "starting" is saved. It is restored by: >
+ call test_override('starting', 0)
+
++ test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
++ Pretend using scrollbar {which} to move it to position
++ {value}. {which} can be:
++ left Left scrollbar of the current window
++ right Right scrollbar of the current window
++ hor Horizontal scrollbar
++
++ For the vertical scrollbars {value} can be 1 to the
++ line-count of the buffer. For the horizontal scrollbar the
++ {value} can be between 1 and the maximum line length, assuming
++ 'wrap' is not set.
++
++ When {dragging} is non-zero it's like dragging the scrollbar,
++ otherwise it's like clicking in the scrollbar.
++ Only works when the {which} scrollbar actually exists,
++ obviously only when using the GUI.
++
+ test_settime({expr}) *test_settime()*
+ Set the time Vim uses internally. Currently only used for
+ timestamps in the history, as they are used in viminfo, and
+*** ../vim-8.1.0389/src/evalfunc.c 2018-09-13 21:30:01.622056753 +0200
+--- src/evalfunc.c 2018-09-14 21:01:40.062704672 +0200
+***************
+*** 429,434 ****
+--- 429,437 ----
+ static void f_test_null_list(typval_T *argvars, typval_T *rettv);
+ static void f_test_null_partial(typval_T *argvars, typval_T *rettv);
+ static void f_test_null_string(typval_T *argvars, typval_T *rettv);
++ #ifdef FEAT_GUI
++ static void f_test_scrollbar(typval_T *argvars, typval_T *rettv);
++ #endif
+ static void f_test_settime(typval_T *argvars, typval_T *rettv);
+ #ifdef FEAT_FLOAT
+ static void f_tan(typval_T *argvars, typval_T *rettv);
+***************
+*** 925,930 ****
+--- 928,936 ----
+ {"test_null_string", 0, 0, f_test_null_string},
+ {"test_option_not_set", 1, 1, f_test_option_not_set},
+ {"test_override", 2, 2, f_test_override},
++ #ifdef FEAT_GUI
++ {"test_scrollbar", 3, 3, f_test_scrollbar},
++ #endif
+ {"test_settime", 1, 1, f_test_settime},
+ #ifdef FEAT_TIMERS
+ {"timer_info", 0, 1, f_timer_info},
+***************
+*** 13202,13207 ****
+--- 13208,13248 ----
+ rettv->vval.v_string = NULL;
+ }
+
++ #ifdef FEAT_GUI
++ static void
++ f_test_scrollbar(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ char_u *which;
++ long value;
++ int dragging;
++ scrollbar_T *sb = NULL;
++
++ if (argvars[0].v_type != VAR_STRING
++ || (argvars[1].v_type) != VAR_NUMBER
++ || (argvars[2].v_type) != VAR_NUMBER)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++ which = get_tv_string(&argvars[0]);
++ value = get_tv_number(&argvars[1]);
++ dragging = get_tv_number(&argvars[2]);
++
++ if (STRCMP(which, "left") == 0)
++ sb = &curwin->w_scrollbars[SBAR_LEFT];
++ else if (STRCMP(which, "right") == 0)
++ sb = &curwin->w_scrollbars[SBAR_RIGHT];
++ else if (STRCMP(which, "hor") == 0)
++ sb = &gui.bottom_sbar;
++ if (sb == NULL)
++ {
++ EMSG2(_(e_invarg2), which);
++ return;
++ }
++ gui_drag_scrollbar(sb, value, dragging);
++ }
++ #endif
++
+ static void
+ f_test_settime(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+*** ../vim-8.1.0389/src/testdir/test_gui.vim 2018-05-14 21:29:28.000000000 +0200
+--- src/testdir/test_gui.vim 2018-09-14 21:24:26.053001659 +0200
+***************
+*** 667,672 ****
+--- 667,707 ----
+ let &guioptions = guioptions_saved
+ endfunc
+
++ func Test_scrollbars()
++ new
++ " buffer with 200 lines
++ call setline(1, repeat(['one', 'two'], 100))
++ set guioptions+=rlb
++
++ " scroll to move line 11 at top, moves the cursor there
++ call test_scrollbar('left', 10, 0)
++ redraw
++ call assert_equal(1, winline())
++ call assert_equal(11, line('.'))
++
++ " scroll to move line 1 at top, cursor stays in line 11
++ call test_scrollbar('right', 0, 0)
++ redraw
++ call assert_equal(11, winline())
++ call assert_equal(11, line('.'))
++
++ set nowrap
++ call setline(11, repeat('x', 150))
++ redraw
++ call assert_equal(1, wincol())
++ call assert_equal(1, col('.'))
++
++ " scroll to character 11, cursor is moved
++ call test_scrollbar('hor', 10, 0)
++ redraw
++ call assert_equal(1, wincol())
++ call assert_equal(11, col('.'))
++
++ set guioptions&
++ set wrap&
++ bwipe!
++ endfunc
++
+ func Test_set_guipty()
+ let guipty_saved = &guipty
+
+*** ../vim-8.1.0389/src/version.c 2018-09-14 20:10:15.878499433 +0200
+--- src/version.c 2018-09-14 21:25:18.748582439 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 390,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+52. You ask a plumber how much it would cost to replace the chair in front of
+ your computer with a toilet.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0391 b/data/vim/patches/8.1.0391
new file mode 100644
index 000000000..28f290c48
--- /dev/null
+++ b/data/vim/patches/8.1.0391
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0391
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0391
+Problem: Building in a shadow directory fails.
+Solution: Don't link the xdiff directory but what's in it. (closes #3428)
+Files: src/Makefile
+
+
+*** ../vim-8.1.0390/src/Makefile 2018-09-13 18:01:27.637877198 +0200
+--- src/Makefile 2018-09-15 15:05:00.842489223 +0200
+***************
+*** 2765,2771 ****
+
+ shadow: runtime pixmaps
+ $(MKDIR_P) $(SHADOWDIR)
+! cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../xdiff ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak .
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+--- 2765,2771 ----
+
+ shadow: runtime pixmaps
+ $(MKDIR_P) $(SHADOWDIR)
+! cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak .
+ mkdir $(SHADOWDIR)/auto
+ cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
+ $(MKDIR_P) $(SHADOWDIR)/po
+***************
+*** 2777,2782 ****
+--- 2777,2784 ----
+ cp config.mk.dist $(SHADOWDIR)
+ $(MKDIR_P) $(SHADOWDIR)/xxd
+ cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
++ $(MKDIR_P) $(SHADOWDIR)/xdiff
++ cd $(SHADOWDIR)/xdiff; ln -s ../../xdiff/*.[ch] .
+ if test -d $(RSRC_DIR); then \
+ cd $(SHADOWDIR); \
+ ln -s ../infplist.xml .; \
+*** ../vim-8.1.0390/src/version.c 2018-09-14 21:27:02.775741320 +0200
+--- src/version.c 2018-09-15 15:07:04.769597806 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 391,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+57. You begin to wonder how on earth your service provider is allowed to call
+ 200 hours per month "unlimited."
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0392 b/data/vim/patches/8.1.0392
new file mode 100644
index 000000000..0795a546c
--- /dev/null
+++ b/data/vim/patches/8.1.0392
@@ -0,0 +1,282 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0392
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0392
+Problem: Error while typing :/foo/s// with 'incsearch' enabled.
+Solution: Do not give search errors when highlighting matches.
+Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/ex_getln.c,
+ src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0391/src/ex_docmd.c 2018-09-10 21:04:09.868392665 +0200
+--- src/ex_docmd.c 2018-09-15 15:36:02.434389657 +0200
+***************
+*** 117,123 ****
+ #endif
+
+ static int check_more(int, int);
+! static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file, int address_count);
+ static void get_flags(exarg_T *eap);
+ #if !defined(FEAT_PERL) \
+ || !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \
+--- 117,123 ----
+ #endif
+
+ static int check_more(int, int);
+! static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int silent, int to_other_file, int address_count);
+ static void get_flags(exarg_T *eap);
+ #if !defined(FEAT_PERL) \
+ || !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \
+***************
+*** 1853,1859 ****
+ }
+
+ ea.cmd = cmd;
+! if (parse_cmd_address(&ea, &errormsg) == FAIL)
+ goto doend;
+
+ /*
+--- 1853,1859 ----
+ }
+
+ ea.cmd = cmd;
+! if (parse_cmd_address(&ea, &errormsg, FALSE) == FAIL)
+ goto doend;
+
+ /*
+***************
+*** 2836,2842 ****
+ case 't': if (checkforcmd(&p, "tab", 3))
+ {
+ long tabnr = get_address(eap, &eap->cmd, ADDR_TABS,
+! eap->skip, FALSE, 1);
+ if (tabnr == MAXLNUM)
+ cmdmod.tab = tabpage_index(curtab) + 1;
+ else
+--- 2836,2842 ----
+ case 't': if (checkforcmd(&p, "tab", 3))
+ {
+ long tabnr = get_address(eap, &eap->cmd, ADDR_TABS,
+! eap->skip, skip_only, FALSE, 1);
+ if (tabnr == MAXLNUM)
+ cmdmod.tab = tabpage_index(curtab) + 1;
+ else
+***************
+*** 2911,2921 ****
+
+ /*
+ * Parse the address range, if any, in "eap".
+! * May set the last search pattern.
+ * Return FAIL and set "errormsg" or return OK.
+ */
+ int
+! parse_cmd_address(exarg_T *eap, char_u **errormsg)
+ {
+ int address_count = 1;
+ linenr_T lnum;
+--- 2911,2921 ----
+
+ /*
+ * Parse the address range, if any, in "eap".
+! * May set the last search pattern, unless "silent" is TRUE.
+ * Return FAIL and set "errormsg" or return OK.
+ */
+ int
+! parse_cmd_address(exarg_T *eap, char_u **errormsg, int silent)
+ {
+ int address_count = 1;
+ linenr_T lnum;
+***************
+*** 2955,2961 ****
+ #endif
+ }
+ eap->cmd = skipwhite(eap->cmd);
+! lnum = get_address(eap, &eap->cmd, eap->addr_type, eap->skip,
+ eap->addr_count == 0, address_count++);
+ if (eap->cmd == NULL) // error detected
+ return FAIL;
+--- 2955,2961 ----
+ #endif
+ }
+ eap->cmd = skipwhite(eap->cmd);
+! lnum = get_address(eap, &eap->cmd, eap->addr_type, eap->skip, silent,
+ eap->addr_count == 0, address_count++);
+ if (eap->cmd == NULL) // error detected
+ return FAIL;
+***************
+*** 4450,4459 ****
+ get_address(
+ exarg_T *eap UNUSED,
+ char_u **ptr,
+! int addr_type, /* flag: one of ADDR_LINES, ... */
+! int skip, /* only skip the address, don't use it */
+! int to_other_file, /* flag: may jump to other file */
+! int address_count UNUSED) /* 1 for first address, >1 after comma */
+ {
+ int c;
+ int i;
+--- 4450,4460 ----
+ get_address(
+ exarg_T *eap UNUSED,
+ char_u **ptr,
+! int addr_type, // flag: one of ADDR_LINES, ...
+! int skip, // only skip the address, don't use it
+! int silent, // no errors or side effects
+! int to_other_file, // flag: may jump to other file
+! int address_count UNUSED) // 1 for first address, >1 after comma
+ {
+ int c;
+ int i;
+***************
+*** 4599,4626 ****
+ }
+ else
+ {
+! pos = curwin->w_cursor; /* save curwin->w_cursor */
+! /*
+! * When '/' or '?' follows another address, start
+! * from there.
+! */
+ if (lnum != MAXLNUM)
+ curwin->w_cursor.lnum = lnum;
+! /*
+! * Start a forward search at the end of the line (unless
+! * before the first line).
+! * Start a backward search at the start of the line.
+! * This makes sure we never match in the current
+! * line, and can match anywhere in the
+! * next/previous line.
+! */
+ if (c == '/' && curwin->w_cursor.lnum > 0)
+ curwin->w_cursor.col = MAXCOL;
+ else
+ curwin->w_cursor.col = 0;
+ searchcmdlen = 0;
+! if (!do_search(NULL, c, cmd, 1L,
+! SEARCH_HIS | SEARCH_MSG, NULL, NULL))
+ {
+ curwin->w_cursor = pos;
+ cmd = NULL;
+--- 4600,4627 ----
+ }
+ else
+ {
+! int flags;
+!
+! pos = curwin->w_cursor; // save curwin->w_cursor
+!
+! // When '/' or '?' follows another address, start from
+! // there.
+ if (lnum != MAXLNUM)
+ curwin->w_cursor.lnum = lnum;
+!
+! // Start a forward search at the end of the line (unless
+! // before the first line).
+! // Start a backward search at the start of the line.
+! // This makes sure we never match in the current
+! // line, and can match anywhere in the
+! // next/previous line.
+ if (c == '/' && curwin->w_cursor.lnum > 0)
+ curwin->w_cursor.col = MAXCOL;
+ else
+ curwin->w_cursor.col = 0;
+ searchcmdlen = 0;
+! flags = silent ? 0 : SEARCH_HIS | SEARCH_MSG;
+! if (!do_search(NULL, c, cmd, 1L, flags, NULL, NULL))
+ {
+ curwin->w_cursor = pos;
+ cmd = NULL;
+***************
+*** 9529,9535 ****
+ {
+ long n;
+
+! n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE, 1);
+ if (eap->arg == NULL) /* error detected */
+ {
+ eap->nextcmd = NULL;
+--- 9530,9536 ----
+ {
+ long n;
+
+! n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE, FALSE, 1);
+ if (eap->arg == NULL) /* error detected */
+ {
+ eap->nextcmd = NULL;
+*** ../vim-8.1.0391/src/proto/ex_docmd.pro 2018-08-15 20:59:44.227025009 +0200
+--- src/proto/ex_docmd.pro 2018-09-15 15:34:59.291237418 +0200
+***************
+*** 5,11 ****
+ int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int));
+ void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
+ int parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only);
+! int parse_cmd_address(exarg_T *eap, char_u **errormsg);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+ int cmd_exists(char_u *name);
+--- 5,11 ----
+ int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int));
+ void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
+ int parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only);
+! int parse_cmd_address(exarg_T *eap, char_u **errormsg, int silent);
+ int checkforcmd(char_u **pp, char *cmd, int len);
+ int modifier_len(char_u *cmd);
+ int cmd_exists(char_u *name);
+*** ../vim-8.1.0391/src/ex_getln.c 2018-09-10 21:04:09.868392665 +0200
+--- src/ex_getln.c 2018-09-15 15:41:01.610658110 +0200
+***************
+*** 388,394 ****
+ // parse the address range
+ save_cursor = curwin->w_cursor;
+ curwin->w_cursor = is_state->search_start;
+! parse_cmd_address(&ea, &dummy);
+ if (ea.addr_count > 0)
+ {
+ // Allow for reverse match.
+--- 388,394 ----
+ // parse the address range
+ save_cursor = curwin->w_cursor;
+ curwin->w_cursor = is_state->search_start;
+! parse_cmd_address(&ea, &dummy, TRUE);
+ if (ea.addr_count > 0)
+ {
+ // Allow for reverse match.
+*** ../vim-8.1.0391/src/testdir/test_search.vim 2018-09-09 15:54:11.232857907 +0200
+--- src/testdir/test_search.vim 2018-09-15 15:40:22.183128106 +0200
+***************
+*** 1055,1060 ****
+--- 1055,1064 ----
+ call feedkeys(":/foo/s//\<Esc>", 'ntx')
+ call assert_equal('bar', @/)
+
++ " no error message if pattern not found
++ call feedkeys(":/xyz/s//\<Esc>", 'ntx')
++ call assert_equal('bar', @/)
++
+ bwipe!
+ call test_override("ALL", 0)
+ set noincsearch
+*** ../vim-8.1.0391/src/version.c 2018-09-15 15:08:48.348852704 +0200
+--- src/version.c 2018-09-15 15:40:58.334696955 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 392,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+58. You turn on your computer and turn off your wife.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0393 b/data/vim/patches/8.1.0393
new file mode 100644
index 000000000..2bf27d593
--- /dev/null
+++ b/data/vim/patches/8.1.0393
@@ -0,0 +1,567 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0393
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0393
+Solution: Add "iblank", "iwhiteall" and "iwhiteeol" to 'diffopt'.
+Files: src/diff.c, src/testdir/test_diffmode.vim,
+ src/testdir/dumps/Test_diff_17.dump,
+ src/testdir/dumps/Test_diff_18.dump,
+ src/testdir/dumps/Test_diff_19.dump,
+ src/testdir/dumps/Test_diff_20.dump
+
+
+*** ../vim-8.1.0392/src/diff.c 2018-09-13 15:33:39.601712271 +0200
+--- src/diff.c 2018-09-15 18:52:00.815797976 +0200
+***************
+*** 24,36 ****
+ static int diff_busy = FALSE; /* ex_diffgetput() is busy */
+
+ /* flags obtained from the 'diffopt' option */
+! #define DIFF_FILLER 1 // display filler lines
+! #define DIFF_ICASE 2 // ignore case
+! #define DIFF_IWHITE 4 // ignore change in white space
+! #define DIFF_HORIZONTAL 8 // horizontal splits
+! #define DIFF_VERTICAL 16 // vertical splits
+! #define DIFF_HIDDEN_OFF 32 // diffoff when hidden
+! #define DIFF_INTERNAL 64 // use internal xdiff algorithm
+ static int diff_flags = DIFF_INTERNAL | DIFF_FILLER;
+
+ static long diff_algorithm = 0;
+--- 24,40 ----
+ static int diff_busy = FALSE; /* ex_diffgetput() is busy */
+
+ /* flags obtained from the 'diffopt' option */
+! #define DIFF_FILLER 0x001 // display filler lines
+! #define DIFF_IBLANK 0x002 // ignore empty lines
+! #define DIFF_ICASE 0x004 // ignore case
+! #define DIFF_IWHITE 0x008 // ignore change in white space
+! #define DIFF_IWHITEALL 0x010 // ignore all white space changes
+! #define DIFF_IWHITEEOL 0x020 // ignore change in white space at EOL
+! #define DIFF_HORIZONTAL 0x040 // horizontal splits
+! #define DIFF_VERTICAL 0x080 // vertical splits
+! #define DIFF_HIDDEN_OFF 0x100 // diffoff when hidden
+! #define DIFF_INTERNAL 0x200 // use internal xdiff algorithm
+! #define ALL_WHITE_DIFF (DIFF_IWHITE | DIFF_IWHITEALL | DIFF_IWHITEEOL)
+ static int diff_flags = DIFF_INTERNAL | DIFF_FILLER;
+
+ static long diff_algorithm = 0;
+***************
+*** 1050,1055 ****
+--- 1054,1065 ----
+
+ if (diff_flags & DIFF_IWHITE)
+ param.flags |= XDF_IGNORE_WHITESPACE_CHANGE;
++ if (diff_flags & DIFF_IWHITEALL)
++ param.flags |= XDF_IGNORE_WHITESPACE;
++ if (diff_flags & DIFF_IWHITEEOL)
++ param.flags |= XDF_IGNORE_WHITESPACE_AT_EOL;
++ if (diff_flags & DIFF_IBLANK)
++ param.flags |= XDF_IGNORE_BLANK_LINES;
+
+ emit_cfg.ctxlen = 0; // don't need any diff_context here
+ emit_cb.priv = &diffio->dio_diff;
+***************
+*** 1106,1112 ****
+ // Build the diff command and execute it. Always use -a, binary
+ // differences are of no use. Ignore errors, diff returns
+ // non-zero when differences have been found.
+! vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
+ diff_a_works == FALSE ? "" : "-a ",
+ #if defined(MSWIN)
+ diff_bin_works == TRUE ? "--binary " : "",
+--- 1116,1122 ----
+ // Build the diff command and execute it. Always use -a, binary
+ // differences are of no use. Ignore errors, diff returns
+ // non-zero when differences have been found.
+! vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s%s%s%s %s",
+ diff_a_works == FALSE ? "" : "-a ",
+ #if defined(MSWIN)
+ diff_bin_works == TRUE ? "--binary " : "",
+***************
+*** 1114,1119 ****
+--- 1124,1132 ----
+ "",
+ #endif
+ (diff_flags & DIFF_IWHITE) ? "-b " : "",
++ (diff_flags & DIFF_IWHITEALL) ? "-w " : "",
++ (diff_flags & DIFF_IWHITEEOL) ? "-Z " : "",
++ (diff_flags & DIFF_IBLANK) ? "-B " : "",
+ (diff_flags & DIFF_ICASE) ? "-i " : "",
+ tmp_orig, tmp_new);
+ append_redir(cmd, (int)len, p_srr, tmp_diff);
+***************
+*** 1946,1962 ****
+ char_u *p1, *p2;
+ int l;
+
+! if ((diff_flags & (DIFF_ICASE | DIFF_IWHITE)) == 0)
+ return STRCMP(s1, s2);
+! if ((diff_flags & DIFF_ICASE) && !(diff_flags & DIFF_IWHITE))
+ return MB_STRICMP(s1, s2);
+
+- /* Ignore white space changes and possibly ignore case. */
+ p1 = s1;
+ p2 = s2;
+ while (*p1 != NUL && *p2 != NUL)
+ {
+! if (VIM_ISWHITE(*p1) && VIM_ISWHITE(*p2))
+ {
+ p1 = skipwhite(p1);
+ p2 = skipwhite(p2);
+--- 1959,1983 ----
+ char_u *p1, *p2;
+ int l;
+
+! if ((diff_flags & DIFF_IBLANK)
+! && (*skipwhite(s1) == NUL || *skipwhite(s2) == NUL))
+! return 0;
+!
+! if ((diff_flags & (DIFF_ICASE | ALL_WHITE_DIFF)) == 0)
+ return STRCMP(s1, s2);
+! if ((diff_flags & DIFF_ICASE) && !(diff_flags & ALL_WHITE_DIFF))
+ return MB_STRICMP(s1, s2);
+
+ p1 = s1;
+ p2 = s2;
++
++ // Ignore white space changes and possibly ignore case.
+ while (*p1 != NUL && *p2 != NUL)
+ {
+! if (((diff_flags & DIFF_IWHITE)
+! && VIM_ISWHITE(*p1) && VIM_ISWHITE(*p2))
+! || ((diff_flags & DIFF_IWHITEALL)
+! && (VIM_ISWHITE(*p1) || VIM_ISWHITE(*p2))))
+ {
+ p1 = skipwhite(p1);
+ p2 = skipwhite(p2);
+***************
+*** 1970,1976 ****
+ }
+ }
+
+! /* Ignore trailing white space. */
+ p1 = skipwhite(p1);
+ p2 = skipwhite(p2);
+ if (*p1 != NUL || *p2 != NUL)
+--- 1991,1997 ----
+ }
+ }
+
+! // Ignore trailing white space.
+ p1 = skipwhite(p1);
+ p2 = skipwhite(p2);
+ if (*p1 != NUL || *p2 != NUL)
+***************
+*** 2142,2152 ****
+--- 2163,2188 ----
+ p += 8;
+ diff_context_new = getdigits(&p);
+ }
++ else if (STRNCMP(p, "iblank", 6) == 0)
++ {
++ p += 6;
++ diff_flags_new |= DIFF_IBLANK;
++ }
+ else if (STRNCMP(p, "icase", 5) == 0)
+ {
+ p += 5;
+ diff_flags_new |= DIFF_ICASE;
+ }
++ else if (STRNCMP(p, "iwhiteall", 9) == 0)
++ {
++ p += 9;
++ diff_flags_new |= DIFF_IWHITEALL;
++ }
++ else if (STRNCMP(p, "iwhiteeol", 9) == 0)
++ {
++ p += 9;
++ diff_flags_new |= DIFF_IWHITEEOL;
++ }
+ else if (STRNCMP(p, "iwhite", 6) == 0)
+ {
+ p += 6;
+***************
+*** 2315,2323 ****
+ si_org = si_new = 0;
+ while (line_org[si_org] != NUL)
+ {
+! if ((diff_flags & DIFF_IWHITE)
+! && VIM_ISWHITE(line_org[si_org])
+! && VIM_ISWHITE(line_new[si_new]))
+ {
+ si_org = (int)(skipwhite(line_org + si_org) - line_org);
+ si_new = (int)(skipwhite(line_new + si_new) - line_new);
+--- 2351,2362 ----
+ si_org = si_new = 0;
+ while (line_org[si_org] != NUL)
+ {
+! if (((diff_flags & DIFF_IWHITE)
+! && VIM_ISWHITE(line_org[si_org])
+! && VIM_ISWHITE(line_new[si_new]))
+! || ((diff_flags & DIFF_IWHITEALL)
+! && (VIM_ISWHITE(line_org[si_org])
+! || VIM_ISWHITE(line_new[si_new]))))
+ {
+ si_org = (int)(skipwhite(line_org + si_org) - line_org);
+ si_new = (int)(skipwhite(line_new + si_new) - line_new);
+***************
+*** 2351,2359 ****
+ while (ei_org >= *startp && ei_new >= si_new
+ && ei_org >= 0 && ei_new >= 0)
+ {
+! if ((diff_flags & DIFF_IWHITE)
+! && VIM_ISWHITE(line_org[ei_org])
+! && VIM_ISWHITE(line_new[ei_new]))
+ {
+ while (ei_org >= *startp
+ && VIM_ISWHITE(line_org[ei_org]))
+--- 2390,2401 ----
+ while (ei_org >= *startp && ei_new >= si_new
+ && ei_org >= 0 && ei_new >= 0)
+ {
+! if (((diff_flags & DIFF_IWHITE)
+! && VIM_ISWHITE(line_org[ei_org])
+! && VIM_ISWHITE(line_new[ei_new]))
+! || ((diff_flags & DIFF_IWHITEALL)
+! && (VIM_ISWHITE(line_org[ei_org])
+! || VIM_ISWHITE(line_new[ei_new]))))
+ {
+ while (ei_org >= *startp
+ && VIM_ISWHITE(line_org[ei_org]))
+*** ../vim-8.1.0392/src/testdir/test_diffmode.vim 2018-09-13 13:03:08.228724142 +0200
+--- src/testdir/test_diffmode.vim 2018-09-15 19:02:43.814040268 +0200
+***************
+*** 671,686 ****
+ bwipe!
+ endfunc
+
+! func WriteDiffFiles(list1, list2)
+ call writefile(a:list1, 'Xfile1')
+ call writefile(a:list2, 'Xfile2')
+ endfunc
+
+! " Verify a screendump with both the external and external diff.
+ func VerifyBoth(buf, dumpfile, extra)
+- call term_sendkeys(a:buf, ":diffupdate!\<cr>")
+ " trailing : for leaving the cursor on the command line
+! for cmd in [":set diffopt=filler" . a:extra . "\<cr>:", ":set diffopt+=internal\<cr>:"]
+ call term_sendkeys(a:buf, cmd)
+ if VerifyScreenDump(a:buf, a:dumpfile, {}, cmd =~ 'internal' ? 'internal' : 'external')
+ break " don't let the next iteration overwrite the "failed" file.
+--- 671,688 ----
+ bwipe!
+ endfunc
+
+! func WriteDiffFiles(buf, list1, list2)
+ call writefile(a:list1, 'Xfile1')
+ call writefile(a:list2, 'Xfile2')
++ if a:buf
++ call term_sendkeys(a:buf, ":checktime\<CR>")
++ endif
+ endfunc
+
+! " Verify a screendump with both the internal and external diff.
+ func VerifyBoth(buf, dumpfile, extra)
+ " trailing : for leaving the cursor on the command line
+! for cmd in [":set diffopt=filler" . a:extra . "\<CR>:", ":set diffopt+=internal\<CR>:"]
+ call term_sendkeys(a:buf, cmd)
+ if VerifyScreenDump(a:buf, a:dumpfile, {}, cmd =~ 'internal' ? 'internal' : 'external')
+ break " don't let the next iteration overwrite the "failed" file.
+***************
+*** 688,693 ****
+--- 690,703 ----
+ endfor
+ endfunc
+
++ " Verify a screendump with the internal diff only.
++ func VerifyInternal(buf, dumpfile, extra)
++ call term_sendkeys(a:buf, ":diffupdate!\<CR>")
++ " trailing : for leaving the cursor on the command line
++ call term_sendkeys(a:buf, ":set diffopt=internal,filler" . a:extra . "\<CR>:")
++ call VerifyScreenDump(a:buf, a:dumpfile, {})
++ endfunc
++
+ func Test_diff_screen()
+ if !CanRunVimInTerminal() || !has('menu')
+ return
+***************
+*** 697,732 ****
+ call delete('.Xfile2.swp')
+
+ " Test 1: Add a line in beginning of file 2
+! call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ let buf = RunVimInTerminal('-d Xfile1 Xfile2', {})
+ " Set autoread mode, ,so that Vim won't complain once we re-write the test
+ " files
+! call term_sendkeys(buf, ":set autoread\<cr>\<c-w>w:set autoread\<cr>\<c-w>w")
+
+ call VerifyBoth(buf, 'Test_diff_01', '')
+
+ " Test 2: Add a line in beginning of file 1
+! call WriteDiffFiles([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_02', '')
+
+ " Test 3: Add a line at the end of file 2
+! call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
+ call VerifyBoth(buf, 'Test_diff_03', '')
+
+ " Test 4: Add a line at the end of file 1
+! call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_04', '')
+
+ " Test 5: Add a line in the middle of file 2, remove on at the end of file 1
+! call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_05', '')
+
+ " Test 6: Add a line in the middle of file 1, remove on at the end of file 2
+! call WriteDiffFiles([1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
+ call VerifyBoth(buf, 'Test_diff_06', '')
+
+ " Test 7 - 9: Test normal/patience/histogram diff algorithm
+! call WriteDiffFiles(['#include <stdio.h>', '', '// Frobs foo heartily', 'int frobnitz(int foo)', '{',
+ \ ' int i;', ' for(i = 0; i < 10; i++)', ' {', ' printf("Your answer is: ");',
+ \ ' printf("%d\n", foo);', ' }', '}', '', 'int fact(int n)', '{', ' if(n > 1)', ' {',
+ \ ' return fact(n-1) * n;', ' }', ' return 1;', '}', '', 'int main(int argc, char **argv)',
+--- 707,742 ----
+ call delete('.Xfile2.swp')
+
+ " Test 1: Add a line in beginning of file 2
+! call WriteDiffFiles(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ let buf = RunVimInTerminal('-d Xfile1 Xfile2', {})
+ " Set autoread mode, ,so that Vim won't complain once we re-write the test
+ " files
+! call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
+
+ call VerifyBoth(buf, 'Test_diff_01', '')
+
+ " Test 2: Add a line in beginning of file 1
+! call WriteDiffFiles(buf, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_02', '')
+
+ " Test 3: Add a line at the end of file 2
+! call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
+ call VerifyBoth(buf, 'Test_diff_03', '')
+
+ " Test 4: Add a line at the end of file 1
+! call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_04', '')
+
+ " Test 5: Add a line in the middle of file 2, remove on at the end of file 1
+! call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_05', '')
+
+ " Test 6: Add a line in the middle of file 1, remove on at the end of file 2
+! call WriteDiffFiles(buf, [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
+ call VerifyBoth(buf, 'Test_diff_06', '')
+
+ " Test 7 - 9: Test normal/patience/histogram diff algorithm
+! call WriteDiffFiles(buf, ['#include <stdio.h>', '', '// Frobs foo heartily', 'int frobnitz(int foo)', '{',
+ \ ' int i;', ' for(i = 0; i < 10; i++)', ' {', ' printf("Your answer is: ");',
+ \ ' printf("%d\n", foo);', ' }', '}', '', 'int fact(int n)', '{', ' if(n > 1)', ' {',
+ \ ' return fact(n-1) * n;', ' }', ' return 1;', '}', '', 'int main(int argc, char **argv)',
+***************
+*** 748,754 ****
+
+ " Test 10-11: normal/indent-heuristic
+ call term_sendkeys(buf, ":set diffopt&vim\<cr>")
+! call WriteDiffFiles(['', ' def finalize(values)', '', ' values.each do |v|', ' v.finalize', ' end'],
+ \ ['', ' def finalize(values)', '', ' values.each do |v|', ' v.prepare', ' end', '',
+ \ ' values.each do |v|', ' v.finalize', ' end'])
+ call term_sendkeys(buf, ":diffupdate!\<cr>")
+--- 758,764 ----
+
+ " Test 10-11: normal/indent-heuristic
+ call term_sendkeys(buf, ":set diffopt&vim\<cr>")
+! call WriteDiffFiles(buf, ['', ' def finalize(values)', '', ' values.each do |v|', ' v.finalize', ' end'],
+ \ ['', ' def finalize(values)', '', ' values.each do |v|', ' v.prepare', ' end', '',
+ \ ' values.each do |v|', ' v.finalize', ' end'])
+ call term_sendkeys(buf, ":diffupdate!\<cr>")
+***************
+*** 759,777 ****
+ call VerifyScreenDump(buf, 'Test_diff_11', {})
+
+ " Test 12: diff the same file
+! call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_12', '')
+
+ " Test 13: diff an empty file
+! call WriteDiffFiles([], [])
+ call VerifyBoth(buf, 'Test_diff_13', '')
+
+ " Test 14: test diffopt+=icase
+! call WriteDiffFiles(['a', 'b', 'cd'], ['A', 'b', 'cDe'])
+ call VerifyBoth(buf, 'Test_diff_14', " diffopt+=filler diffopt+=icase")
+
+ " Test 15-16: test diffopt+=iwhite
+! call WriteDiffFiles(['int main()', '{', ' printf("Hello, World!");', ' return 0;', '}'],
+ \ ['int main()', '{', ' if (0)', ' {', ' printf("Hello, World!");', ' return 0;', ' }', '}'])
+ call term_sendkeys(buf, ":diffupdate!\<cr>")
+ call term_sendkeys(buf, ":set diffopt&vim diffopt+=filler diffopt+=iwhite\<cr>")
+--- 769,787 ----
+ call VerifyScreenDump(buf, 'Test_diff_11', {})
+
+ " Test 12: diff the same file
+! call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+ call VerifyBoth(buf, 'Test_diff_12', '')
+
+ " Test 13: diff an empty file
+! call WriteDiffFiles(buf, [], [])
+ call VerifyBoth(buf, 'Test_diff_13', '')
+
+ " Test 14: test diffopt+=icase
+! call WriteDiffFiles(buf, ['a', 'b', 'cd'], ['A', 'b', 'cDe'])
+ call VerifyBoth(buf, 'Test_diff_14', " diffopt+=filler diffopt+=icase")
+
+ " Test 15-16: test diffopt+=iwhite
+! call WriteDiffFiles(buf, ['int main()', '{', ' printf("Hello, World!");', ' return 0;', '}'],
+ \ ['int main()', '{', ' if (0)', ' {', ' printf("Hello, World!");', ' return 0;', ' }', '}'])
+ call term_sendkeys(buf, ":diffupdate!\<cr>")
+ call term_sendkeys(buf, ":set diffopt&vim diffopt+=filler diffopt+=iwhite\<cr>")
+***************
+*** 779,784 ****
+--- 789,810 ----
+ call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
+ call VerifyScreenDump(buf, 'Test_diff_16', {})
+
++ " Test 17: test diffopt+=iblank
++ call WriteDiffFiles(buf, ['a', ' ', 'cd', 'ef', 'xxx'], ['a', 'cd', '', 'ef', 'yyy'])
++ call VerifyInternal(buf, 'Test_diff_17', " diffopt+=iblank")
++
++ " Test 18: test diffopt+=iblank,iwhite / iwhiteall / iwhiteeol
++ call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhite")
++ call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhiteall")
++ call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhiteeol")
++
++ " Test 19: test diffopt+=iwhiteeol
++ call WriteDiffFiles(buf, ['a ', 'x', 'cd', 'ef', 'xx xx', 'foo', 'bar'], ['a', 'x', 'c d', ' ef', 'xx xx', 'foo', '', 'bar'])
++ call VerifyInternal(buf, 'Test_diff_19', " diffopt+=iwhiteeol")
++
++ " Test 19: test diffopt+=iwhiteall
++ call VerifyInternal(buf, 'Test_diff_20', " diffopt+=iwhiteall")
++
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xfile1')
+*** ../vim-8.1.0392/src/testdir/dumps/Test_diff_17.dump 2018-09-15 19:15:54.443272696 +0200
+--- src/testdir/dumps/Test_diff_17.dump 2018-09-15 17:55:58.742090613 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0|d| @32||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0|d| @32
++ | +0#0000e05#a8a8a8255@1|e+0#0000000#ffffff0|f| @32||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|x+2#0000000#ff404010@2| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|e+0#0000000#ffffff0|f| @32
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|y+2#0000000#ff404010@2| +0&#ffd7ff255@31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0392/src/testdir/dumps/Test_diff_18.dump 2018-09-15 19:15:54.447272663 +0200
+--- src/testdir/dumps/Test_diff_18.dump 2018-09-15 18:52:17.627640956 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0|d| @32
++ | +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0|d| @32||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34
++ | +0#0000e05#a8a8a8255@1|e+0#0000000#ffffff0|f| @32||+1&&| +0#0000e05#a8a8a8255@1|e+0#0000000#ffffff0|f| @32
++ | +0#0000e05#a8a8a8255@1|x+2#0000000#ff404010@2| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|y+2#0000000#ff404010@2| +0&#ffd7ff255@31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0392/src/testdir/dumps/Test_diff_19.dump 2018-09-15 19:15:54.451272630 +0200
+--- src/testdir/dumps/Test_diff_19.dump 2018-09-15 19:02:49.693989182 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|x+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|x+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|c+0#0000000#ffd7ff255|d| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1|c+0#0000000#ffd7ff255| +2&#ff404010|d+0&#ffd7ff255| @31
++ | +0#0000e05#a8a8a8255@1|e+0#0000000#ffd7ff255|f| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +2#0000000#ff404010|e+0&#ffd7ff255|f| @31
++ | +0#0000e05#a8a8a8255@1|x+0#0000000#ffd7ff255@1| | +2&#ff404010|x+0&#ffd7ff255@1| @28||+1&#ffffff0| +0#0000e05#a8a8a8255@1|x+0#0000000#ffd7ff255@1| |x@1| @29
++ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34
++ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|a|r| @31||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|a|r| @31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0392/src/testdir/dumps/Test_diff_20.dump 2018-09-15 19:15:54.455272594 +0200
+--- src/testdir/dumps/Test_diff_20.dump 2018-09-15 19:02:50.741980079 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|x+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|x+0#0000000#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0|d| @32||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0| |d| @31
++ | +0#0000e05#a8a8a8255@1|e+0#0000000#ffffff0|f| @32||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|e|f| @31
++ | +0#0000e05#a8a8a8255@1|x+0#0000000#ffffff0@1| @1|x@1| @28||+1&&| +0#0000e05#a8a8a8255@1|x+0#0000000#ffffff0@1| |x@1| @29
++ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34
++ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|a|r| @31||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|a|r| @31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1
++ |:+0&&> @73
+*** ../vim-8.1.0392/src/version.c 2018-09-15 15:42:36.501547749 +0200
+--- src/version.c 2018-09-15 19:05:26.212635237 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 393,
+ /**/
+
+--
+I'm trying to be an optimist, but I don't think it'll work.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0394 b/data/vim/patches/8.1.0394
new file mode 100644
index 000000000..9bd8ee970
--- /dev/null
+++ b/data/vim/patches/8.1.0394
@@ -0,0 +1,196 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0394
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0394
+Problem: Diffs are not always updated correctly.
+Solution: When using internal diff update for any changes properly.
+Files: src/structs.h, src/diff.c, src/proto/diff.pro, src/misc1.c,
+ src/main.c
+
+
+*** ../vim-8.1.0393/src/structs.h 2018-09-13 18:33:02.366426166 +0200
+--- src/structs.h 2018-09-16 13:55:20.676506925 +0200
+***************
+*** 2509,2515 ****
+ #ifdef FEAT_DIFF
+ diff_T *tp_first_diff;
+ buf_T *(tp_diffbuf[DB_COUNT]);
+! int tp_diff_invalid; /* list of diffs is outdated */
+ #endif
+ frame_T *(tp_snapshot[SNAP_COUNT]); /* window layout snapshots */
+ #ifdef FEAT_EVAL
+--- 2509,2516 ----
+ #ifdef FEAT_DIFF
+ diff_T *tp_first_diff;
+ buf_T *(tp_diffbuf[DB_COUNT]);
+! int tp_diff_invalid; // list of diffs is outdated
+! int tp_diff_update; // update diffs before redrawing
+ #endif
+ frame_T *(tp_snapshot[SNAP_COUNT]); /* window layout snapshots */
+ #ifdef FEAT_EVAL
+*** ../vim-8.1.0393/src/diff.c 2018-09-15 19:17:07.510653263 +0200
+--- src/diff.c 2018-09-16 13:57:36.259501809 +0200
+***************
+*** 292,297 ****
+--- 292,307 ----
+ linenr_T lnum_deleted = line1; /* lnum of remaining deletion */
+ int check_unchanged;
+
++ if (diff_internal())
++ {
++ // Will udpate diffs before redrawing. Set _invalid to update the
++ // diffs themselves, set _update to also update folds properly just
++ // before redrawing.
++ tp->tp_diff_invalid = TRUE;
++ tp->tp_diff_update = TRUE;
++ return;
++ }
++
+ if (line2 == MAXLNUM)
+ {
+ /* mark_adjust(99, MAXLNUM, 9, 0): insert lines */
+***************
+*** 640,646 ****
+ */
+ static void
+ diff_redraw(
+! int dofold) /* also recompute the folds */
+ {
+ win_T *wp;
+ int n;
+--- 650,656 ----
+ */
+ static void
+ diff_redraw(
+! int dofold) // also recompute the folds
+ {
+ win_T *wp;
+ int n;
+***************
+*** 863,869 ****
+ * Note that if the internal diff failed for one of the buffers, the external
+ * diff will be used anyway.
+ */
+! static int
+ diff_internal(void)
+ {
+ return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL;
+--- 873,879 ----
+ * Note that if the internal diff failed for one of the buffers, the external
+ * diff will be used anyway.
+ */
+! int
+ diff_internal(void)
+ {
+ return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL;
+***************
+*** 887,895 ****
+
+ /*
+ * Completely update the diffs for the buffers involved.
+! * This uses the ordinary "diff" command.
+! * The buffers are written to a file, also for unmodified buffers (the file
+! * could have been produced by autocommands, e.g. the netrw plugin).
+ */
+ void
+ ex_diffupdate(exarg_T *eap) // "eap" can be NULL
+--- 897,905 ----
+
+ /*
+ * Completely update the diffs for the buffers involved.
+! * When using the external "diff" command the buffers are written to a file,
+! * also for unmodified buffers (the file could have been produced by
+! * autocommands, e.g. the netrw plugin).
+ */
+ void
+ ex_diffupdate(exarg_T *eap) // "eap" can be NULL
+*** ../vim-8.1.0393/src/proto/diff.pro 2018-05-17 13:52:31.000000000 +0200
+--- src/proto/diff.pro 2018-09-15 19:36:03.456884220 +0200
+***************
+*** 4,9 ****
+--- 4,10 ----
+ void diff_buf_add(buf_T *buf);
+ void diff_invalidate(buf_T *buf);
+ void diff_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after);
++ int diff_internal(void);
+ void ex_diffupdate(exarg_T *eap);
+ void ex_diffpatch(exarg_T *eap);
+ void ex_diffsplit(exarg_T *eap);
+*** ../vim-8.1.0393/src/misc1.c 2018-09-10 19:03:01.641716307 +0200
+--- src/misc1.c 2018-09-16 14:00:38.606151494 +0200
+***************
+*** 3093,3099 ****
+ changed_lines_buf(curbuf, lnum, lnume, xtra);
+
+ #ifdef FEAT_DIFF
+! if (xtra == 0 && curwin->w_p_diff)
+ {
+ /* When the number of lines doesn't change then mark_adjust() isn't
+ * called and other diff buffers still need to be marked for
+--- 3093,3099 ----
+ changed_lines_buf(curbuf, lnum, lnume, xtra);
+
+ #ifdef FEAT_DIFF
+! if (xtra == 0 && curwin->w_p_diff && !diff_internal())
+ {
+ /* When the number of lines doesn't change then mark_adjust() isn't
+ * called and other diff buffers still need to be marked for
+***************
+*** 3173,3178 ****
+--- 3173,3183 ----
+ /* mark the buffer as modified */
+ changed();
+
++ #ifdef FEAT_DIFF
++ if (curwin->w_p_diff && diff_internal())
++ curtab->tp_diff_update = TRUE;
++ #endif
++
+ /* set the '. mark */
+ if (!cmdmod.keepjumps)
+ {
+*** ../vim-8.1.0393/src/main.c 2018-09-13 15:33:39.605712221 +0200
+--- src/main.c 2018-09-16 14:01:36.921719929 +0200
+***************
+*** 1200,1205 ****
+--- 1200,1214 ----
+ }
+
+ #if defined(FEAT_DIFF)
++ // Updating diffs from changed() does not always work properly,
++ // esp. updating folds. Do an update just before redrawing if
++ // needed.
++ if (curtab->tp_diff_update || curtab->tp_diff_invalid)
++ {
++ ex_diffupdate(NULL);
++ curtab->tp_diff_update = FALSE;
++ }
++
+ /* Scroll-binding for diff mode may have been postponed until
+ * here. Avoids doing it for every change. */
+ if (diff_need_scrollbind)
+*** ../vim-8.1.0393/src/version.c 2018-09-15 19:17:07.514653227 +0200
+--- src/version.c 2018-09-15 20:13:51.888452794 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 394,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+60. As your car crashes through the guardrail on a mountain road, your first
+ instinct is to search for the "back" button.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0395 b/data/vim/patches/8.1.0395
new file mode 100644
index 000000000..bd9fdfad5
--- /dev/null
+++ b/data/vim/patches/8.1.0395
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0395
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0395
+Problem: Compiler warning on 64-bit MS-Windows.
+Solution: Add type cast. (Mike Williams)
+Files: src/diff.c
+
+
+*** ../vim-8.1.0394/src/diff.c 2018-09-16 14:10:28.300323360 +0200
+--- src/diff.c 2018-09-16 14:49:24.928809679 +0200
+***************
+*** 712,718 ****
+
+ // xdiff requires one big block of memory with all the text.
+ for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum)
+! len += STRLEN(ml_get_buf(buf, lnum, FALSE)) + 1;
+ ptr = lalloc(len, TRUE);
+ if (ptr == NULL)
+ {
+--- 712,718 ----
+
+ // xdiff requires one big block of memory with all the text.
+ for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum)
+! len += (long)STRLEN(ml_get_buf(buf, lnum, FALSE)) + 1;
+ ptr = lalloc(len, TRUE);
+ if (ptr == NULL)
+ {
+*** ../vim-8.1.0394/src/version.c 2018-09-16 14:10:28.300323360 +0200
+--- src/version.c 2018-09-16 14:50:28.972105814 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 395,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+63. You start using smileys in your snail mail.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0396 b/data/vim/patches/8.1.0396
new file mode 100644
index 000000000..3765bea14
--- /dev/null
+++ b/data/vim/patches/8.1.0396
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0396
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0396
+Problem: Another compiler warning on 64-bit MS-Windows.
+Solution: Add type cast. (Mike Williams)
+Files: src/xdiff/xutils.c
+
+
+*** ../vim-8.1.0395/src/xdiff/xutils.c 2018-09-10 17:50:32.717306902 +0200
+--- src/xdiff/xutils.c 2018-09-16 15:09:34.372976456 +0200
+***************
+*** 51,57 ****
+ mb[1].size = size;
+ if (size > 0 && rec[size - 1] != '\n') {
+ mb[2].ptr = (char *) "\n\\ No newline at end of file\n";
+! mb[2].size = strlen(mb[2].ptr);
+ i++;
+ }
+ if (ecb->outf(ecb->priv, mb, i) < 0) {
+--- 51,57 ----
+ mb[1].size = size;
+ if (size > 0 && rec[size - 1] != '\n') {
+ mb[2].ptr = (char *) "\n\\ No newline at end of file\n";
+! mb[2].size = (long)strlen(mb[2].ptr);
+ i++;
+ }
+ if (ecb->outf(ecb->priv, mb, i) < 0) {
+*** ../vim-8.1.0395/src/version.c 2018-09-16 14:51:34.003406787 +0200
+--- src/version.c 2018-09-16 15:14:09.618468629 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 396,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+65. The last time you looked at the clock it was 11:30pm, and in what
+ seems like only a few seconds later, your sister runs past you to
+ catch her 7am school bus.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0397 b/data/vim/patches/8.1.0397
new file mode 100644
index 000000000..3fab4180c
--- /dev/null
+++ b/data/vim/patches/8.1.0397
@@ -0,0 +1,335 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0397
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0397
+Problem: No event triggered after updating diffs.
+Solution: Add the DiffUpdated event.
+Files: src/vim.h, src/diff.c, src/fileio.c,
+ src/testdir/test_diffmode.vim, runtime/doc/autocmd.txt
+
+
+*** ../vim-8.1.0396/src/vim.h 2018-09-13 17:26:31.091401618 +0200
+--- src/vim.h 2018-09-16 15:28:57.984413860 +0200
+***************
+*** 1251,1354 ****
+ */
+ enum auto_event
+ {
+! EVENT_BUFADD = 0, /* after adding a buffer to the buffer list */
+! EVENT_BUFDELETE, /* deleting a buffer from the buffer list */
+! EVENT_BUFENTER, /* after entering a buffer */
+! EVENT_BUFFILEPOST, /* after renaming a buffer */
+! EVENT_BUFFILEPRE, /* before renaming a buffer */
+! EVENT_BUFHIDDEN, /* just after buffer becomes hidden */
+! EVENT_BUFLEAVE, /* before leaving a buffer */
+! EVENT_BUFNEW, /* after creating any buffer */
+! EVENT_BUFNEWFILE, /* when creating a buffer for a new file */
+! EVENT_BUFREADCMD, /* read buffer using command */
+! EVENT_BUFREADPOST, /* after reading a buffer */
+! EVENT_BUFREADPRE, /* before reading a buffer */
+! EVENT_BUFUNLOAD, /* just before unloading a buffer */
+! EVENT_BUFWINENTER, /* after showing a buffer in a window */
+! EVENT_BUFWINLEAVE, /* just after buffer removed from window */
+! EVENT_BUFWIPEOUT, /* just before really deleting a buffer */
+! EVENT_BUFWRITECMD, /* write buffer using command */
+! EVENT_BUFWRITEPOST, /* after writing a buffer */
+! EVENT_BUFWRITEPRE, /* before writing a buffer */
+! EVENT_CMDLINECHANGED, /* command line was modified*/
+! EVENT_CMDLINEENTER, /* after entering the command line */
+! EVENT_CMDLINELEAVE, /* before leaving the command line */
+! EVENT_CMDUNDEFINED, /* command undefined */
+! EVENT_CMDWINENTER, /* after entering the cmdline window */
+! EVENT_CMDWINLEAVE, /* before leaving the cmdline window */
+! EVENT_COLORSCHEME, /* after loading a colorscheme */
+! EVENT_COLORSCHEMEPRE, /* before loading a colorscheme */
+! EVENT_COMPLETEDONE, /* after finishing insert complete */
+! EVENT_CURSORHOLD, /* cursor in same position for a while */
+! EVENT_CURSORHOLDI, /* idem, in Insert mode */
+! EVENT_CURSORMOVED, /* cursor was moved */
+! EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */
+! EVENT_DIRCHANGED, /* after user changed directory */
+! EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */
+! EVENT_EXITPRE, /* before exiting */
+! EVENT_FILEAPPENDCMD, /* append to a file using command */
+! EVENT_FILEAPPENDPOST, /* after appending to a file */
+! EVENT_FILEAPPENDPRE, /* before appending to a file */
+! EVENT_FILECHANGEDRO, /* before first change to read-only file */
+! EVENT_FILECHANGEDSHELL, /* after shell command that changed file */
+! EVENT_FILECHANGEDSHELLPOST, /* after (not) reloading changed file */
+! EVENT_FILEREADCMD, /* read from a file using command */
+! EVENT_FILEREADPOST, /* after reading a file */
+! EVENT_FILEREADPRE, /* before reading a file */
+! EVENT_FILETYPE, /* new file type detected (user defined) */
+! EVENT_FILEWRITECMD, /* write to a file using command */
+! EVENT_FILEWRITEPOST, /* after writing a file */
+! EVENT_FILEWRITEPRE, /* before writing a file */
+! EVENT_FILTERREADPOST, /* after reading from a filter */
+! EVENT_FILTERREADPRE, /* before reading from a filter */
+! EVENT_FILTERWRITEPOST, /* after writing to a filter */
+! EVENT_FILTERWRITEPRE, /* before writing to a filter */
+! EVENT_FOCUSGAINED, /* got the focus */
+! EVENT_FOCUSLOST, /* lost the focus to another app */
+! EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */
+! EVENT_GUIENTER, /* after starting the GUI */
+! EVENT_GUIFAILED, /* after starting the GUI failed */
+! EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */
+! EVENT_INSERTCHARPRE, /* before inserting a char */
+! EVENT_INSERTENTER, /* when entering Insert mode */
+! EVENT_INSERTLEAVE, /* when leaving Insert mode */
+! EVENT_MENUPOPUP, /* just before popup menu is displayed */
+! EVENT_OPTIONSET, /* option was set */
+! EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc. */
+! EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc. */
+! EVENT_QUITPRE, /* before :quit */
+! EVENT_REMOTEREPLY, /* upon string reception from a remote vim */
+! EVENT_SESSIONLOADPOST, /* after loading a session file */
+! EVENT_SHELLCMDPOST, /* after ":!cmd" */
+! EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */
+! EVENT_SOURCECMD, /* sourcing a Vim script using command */
+! EVENT_SOURCEPRE, /* before sourcing a Vim script */
+! EVENT_SPELLFILEMISSING, /* spell file missing */
+! EVENT_STDINREADPOST, /* after reading from stdin */
+! EVENT_STDINREADPRE, /* before reading from stdin */
+! EVENT_SWAPEXISTS, /* found existing swap file */
+! EVENT_SYNTAX, /* syntax selected */
+! EVENT_TABCLOSED, /* after closing a tab page */
+! EVENT_TABENTER, /* after entering a tab page */
+! EVENT_TABLEAVE, /* before leaving a tab page */
+! EVENT_TABNEW, /* when entering a new tab page */
+! EVENT_TERMCHANGED, /* after changing 'term' */
+! EVENT_TERMINALOPEN, /* after a terminal buffer was created */
+! EVENT_TERMRESPONSE, /* after setting "v:termresponse" */
+! EVENT_TEXTCHANGED, /* text was modified not in Insert mode */
+! EVENT_TEXTCHANGEDI, /* text was modified in Insert mode */
+! EVENT_TEXTCHANGEDP, /* TextChangedI with popup menu visible */
+! EVENT_TEXTYANKPOST, /* after some text was yanked */
+! EVENT_USER, /* user defined autocommand */
+! EVENT_VIMENTER, /* after starting Vim */
+! EVENT_VIMLEAVE, /* before exiting Vim */
+! EVENT_VIMLEAVEPRE, /* before exiting Vim and writing .viminfo */
+! EVENT_VIMRESIZED, /* after Vim window was resized */
+! EVENT_WINENTER, /* after entering a window */
+! EVENT_WINLEAVE, /* before leaving a window */
+! EVENT_WINNEW, /* when entering a new window */
+
+! NUM_EVENTS /* MUST be the last one */
+ };
+
+ typedef enum auto_event event_T;
+--- 1251,1355 ----
+ */
+ enum auto_event
+ {
+! EVENT_BUFADD = 0, // after adding a buffer to the buffer list
+! EVENT_BUFDELETE, // deleting a buffer from the buffer list
+! EVENT_BUFENTER, // after entering a buffer
+! EVENT_BUFFILEPOST, // after renaming a buffer
+! EVENT_BUFFILEPRE, // before renaming a buffer
+! EVENT_BUFHIDDEN, // just after buffer becomes hidden
+! EVENT_BUFLEAVE, // before leaving a buffer
+! EVENT_BUFNEW, // after creating any buffer
+! EVENT_BUFNEWFILE, // when creating a buffer for a new file
+! EVENT_BUFREADCMD, // read buffer using command
+! EVENT_BUFREADPOST, // after reading a buffer
+! EVENT_BUFREADPRE, // before reading a buffer
+! EVENT_BUFUNLOAD, // just before unloading a buffer
+! EVENT_BUFWINENTER, // after showing a buffer in a window
+! EVENT_BUFWINLEAVE, // just after buffer removed from window
+! EVENT_BUFWIPEOUT, // just before really deleting a buffer
+! EVENT_BUFWRITECMD, // write buffer using command
+! EVENT_BUFWRITEPOST, // after writing a buffer
+! EVENT_BUFWRITEPRE, // before writing a buffer
+! EVENT_CMDLINECHANGED, // command line was modified*/
+! EVENT_CMDLINEENTER, // after entering the command line
+! EVENT_CMDLINELEAVE, // before leaving the command line
+! EVENT_CMDUNDEFINED, // command undefined
+! EVENT_CMDWINENTER, // after entering the cmdline window
+! EVENT_CMDWINLEAVE, // before leaving the cmdline window
+! EVENT_COLORSCHEME, // after loading a colorscheme
+! EVENT_COLORSCHEMEPRE, // before loading a colorscheme
+! EVENT_COMPLETEDONE, // after finishing insert complete
+! EVENT_CURSORHOLD, // cursor in same position for a while
+! EVENT_CURSORHOLDI, // idem, in Insert mode
+! EVENT_CURSORMOVED, // cursor was moved
+! EVENT_CURSORMOVEDI, // cursor was moved in Insert mode
+! EVENT_DIFFUPDATED, // after diffs were updated
+! EVENT_DIRCHANGED, // after user changed directory
+! EVENT_ENCODINGCHANGED, // after changing the 'encoding' option
+! EVENT_EXITPRE, // before exiting
+! EVENT_FILEAPPENDCMD, // append to a file using command
+! EVENT_FILEAPPENDPOST, // after appending to a file
+! EVENT_FILEAPPENDPRE, // before appending to a file
+! EVENT_FILECHANGEDRO, // before first change to read-only file
+! EVENT_FILECHANGEDSHELL, // after shell command that changed file
+! EVENT_FILECHANGEDSHELLPOST, // after (not) reloading changed file
+! EVENT_FILEREADCMD, // read from a file using command
+! EVENT_FILEREADPOST, // after reading a file
+! EVENT_FILEREADPRE, // before reading a file
+! EVENT_FILETYPE, // new file type detected (user defined)
+! EVENT_FILEWRITECMD, // write to a file using command
+! EVENT_FILEWRITEPOST, // after writing a file
+! EVENT_FILEWRITEPRE, // before writing a file
+! EVENT_FILTERREADPOST, // after reading from a filter
+! EVENT_FILTERREADPRE, // before reading from a filter
+! EVENT_FILTERWRITEPOST, // after writing to a filter
+! EVENT_FILTERWRITEPRE, // before writing to a filter
+! EVENT_FOCUSGAINED, // got the focus
+! EVENT_FOCUSLOST, // lost the focus to another app
+! EVENT_FUNCUNDEFINED, // if calling a function which doesn't exist
+! EVENT_GUIENTER, // after starting the GUI
+! EVENT_GUIFAILED, // after starting the GUI failed
+! EVENT_INSERTCHANGE, // when changing Insert/Replace mode
+! EVENT_INSERTCHARPRE, // before inserting a char
+! EVENT_INSERTENTER, // when entering Insert mode
+! EVENT_INSERTLEAVE, // when leaving Insert mode
+! EVENT_MENUPOPUP, // just before popup menu is displayed
+! EVENT_OPTIONSET, // option was set
+! EVENT_QUICKFIXCMDPOST, // after :make, :grep etc.
+! EVENT_QUICKFIXCMDPRE, // before :make, :grep etc.
+! EVENT_QUITPRE, // before :quit
+! EVENT_REMOTEREPLY, // upon string reception from a remote vim
+! EVENT_SESSIONLOADPOST, // after loading a session file
+! EVENT_SHELLCMDPOST, // after ":!cmd"
+! EVENT_SHELLFILTERPOST, // after ":1,2!cmd", ":w !cmd", ":r !cmd".
+! EVENT_SOURCECMD, // sourcing a Vim script using command
+! EVENT_SOURCEPRE, // before sourcing a Vim script
+! EVENT_SPELLFILEMISSING, // spell file missing
+! EVENT_STDINREADPOST, // after reading from stdin
+! EVENT_STDINREADPRE, // before reading from stdin
+! EVENT_SWAPEXISTS, // found existing swap file
+! EVENT_SYNTAX, // syntax selected
+! EVENT_TABCLOSED, // after closing a tab page
+! EVENT_TABENTER, // after entering a tab page
+! EVENT_TABLEAVE, // before leaving a tab page
+! EVENT_TABNEW, // when entering a new tab page
+! EVENT_TERMCHANGED, // after changing 'term'
+! EVENT_TERMINALOPEN, // after a terminal buffer was created
+! EVENT_TERMRESPONSE, // after setting "v:termresponse"
+! EVENT_TEXTCHANGED, // text was modified not in Insert mode
+! EVENT_TEXTCHANGEDI, // text was modified in Insert mode
+! EVENT_TEXTCHANGEDP, // TextChangedI with popup menu visible
+! EVENT_TEXTYANKPOST, // after some text was yanked
+! EVENT_USER, // user defined autocommand
+! EVENT_VIMENTER, // after starting Vim
+! EVENT_VIMLEAVE, // before exiting Vim
+! EVENT_VIMLEAVEPRE, // before exiting Vim and writing .viminfo
+! EVENT_VIMRESIZED, // after Vim window was resized
+! EVENT_WINENTER, // after entering a window
+! EVENT_WINLEAVE, // before leaving a window
+! EVENT_WINNEW, // when entering a new window
+
+! NUM_EVENTS // MUST be the last one
+ };
+
+ typedef enum auto_event event_T;
+*** ../vim-8.1.0396/src/diff.c 2018-09-16 14:51:34.003406787 +0200
+--- src/diff.c 2018-09-16 15:29:52.787858129 +0200
+***************
+*** 942,947 ****
+--- 942,949 ----
+ curwin->w_valid_cursor.lnum = 0;
+
+ diff_redraw(TRUE);
++
++ apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
+ }
+
+ /*
+*** ../vim-8.1.0396/src/fileio.c 2018-09-13 15:33:39.605712221 +0200
+--- src/fileio.c 2018-09-16 15:30:10.519679152 +0200
+***************
+*** 7761,7766 ****
+--- 7761,7767 ----
+ {"CursorHoldI", EVENT_CURSORHOLDI},
+ {"CursorMoved", EVENT_CURSORMOVED},
+ {"CursorMovedI", EVENT_CURSORMOVEDI},
++ {"DiffUpdated", EVENT_DIFFUPDATED},
+ {"DirChanged", EVENT_DIRCHANGED},
+ {"EncodingChanged", EVENT_ENCODINGCHANGED},
+ {"ExitPre", EVENT_EXITPRE},
+*** ../vim-8.1.0396/src/testdir/test_diffmode.vim 2018-09-15 19:17:07.510653263 +0200
+--- src/testdir/test_diffmode.vim 2018-09-16 15:42:46.704283160 +0200
+***************
+*** 4,9 ****
+--- 4,12 ----
+
+ func Test_diff_fold_sync()
+ enew!
++ let g:update_count = 0
++ au DiffUpdated * let g:update_count += 1
++
+ let l = range(50)
+ call setline(1, l)
+ diffthis
+***************
+*** 29,34 ****
+--- 32,40 ----
+ call win_gotoid(winone)
+ call assert_equal(23, getcurpos()[1])
+
++ call assert_equal(1, g:update_count)
++ au! DiffUpdated
++
+ windo diffoff
+ close!
+ set nomodified
+*** ../vim-8.1.0396/runtime/doc/autocmd.txt 2018-05-17 13:40:51.000000000 +0200
+--- runtime/doc/autocmd.txt 2018-09-16 15:46:22.166221491 +0200
+***************
+*** 656,667 ****
+ *E881*
+ If the number of lines changes saving for undo
+ may fail and the change will be aborted.
+ *DirChanged*
+ DirChanged The working directory has changed in response
+ to the |:cd| or |:lcd| commands, or as a
+ result of the 'autochdir' option.
+ The pattern can be:
+! "window" to trigger on `:lcd
+ "global" to trigger on `:cd`
+ "auto" to trigger on 'autochdir'.
+ "drop" to trigger on editing a file
+--- 656,672 ----
+ *E881*
+ If the number of lines changes saving for undo
+ may fail and the change will be aborted.
++ *DiffUpdated*
++ DiffUpdated After diffs have been updated. Depending on
++ what kind of diff is being used (internal or
++ external) this can be triggered on every
++ change or when doing |:diffupdate|.
+ *DirChanged*
+ DirChanged The working directory has changed in response
+ to the |:cd| or |:lcd| commands, or as a
+ result of the 'autochdir' option.
+ The pattern can be:
+! "window" to trigger on `:lcd`
+ "global" to trigger on `:cd`
+ "auto" to trigger on 'autochdir'.
+ "drop" to trigger on editing a file
+*** ../vim-8.1.0396/src/version.c 2018-09-16 15:14:15.078419097 +0200
+--- src/version.c 2018-09-16 15:44:10.039484480 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 397,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+67. Your hard drive crashes. You haven't logged in for two hours. You start
+ to twitch. You pick up the phone and manually dial your ISP's access
+ number. You try to hum to communicate with the modem. You succeed.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0398 b/data/vim/patches/8.1.0398
new file mode 100644
index 000000000..f30e8260f
--- /dev/null
+++ b/data/vim/patches/8.1.0398
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0398
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0398
+Problem: No test for -o and -O command line arguments.
+Solution: Add a test. (Dominique Pelle, closes #3438)
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.0397/src/testdir/test_startup.vim 2018-02-03 15:11:32.000000000 +0100
+--- src/testdir/test_startup.vim 2018-09-16 16:26:35.258985223 +0200
+***************
+*** 148,153 ****
+--- 148,230 ----
+ call delete('Xtestout')
+ endfunc
+
++ " Test the -o[N] and -O[N] arguments to open N windows split
++ " horizontally or vertically.
++ func Test_o_arg()
++ let after = [
++ \ 'call writefile([winnr("$"),
++ \ winheight(1), winheight(2), &lines,
++ \ winwidth(1), winwidth(2), &columns,
++ \ bufname(winbufnr(1)), bufname(winbufnr(2))],
++ \ "Xtestout")',
++ \ 'qall',
++ \ ]
++ if RunVim([], after, '-o2')
++ " Open 2 windows split horizontally. Expect:
++ " - 2 windows
++ " - both windows should have the same or almost the same height
++ " - sum of both windows height (+ 3 for both statusline and Ex command)
++ " should be equal to the number of lines
++ " - both windows should have the same width which should be equal to the
++ " number of columns
++ " - buffer of both windows should have no name
++ let [wn, wh1, wh2, ln, ww1, ww2, cn, bn1, bn2] = readfile('Xtestout')
++ call assert_equal('2', wn)
++ call assert_inrange(0, 1, wh1 - wh2)
++ call assert_equal(string(wh1 + wh2 + 3), ln)
++ call assert_equal(ww1, ww2)
++ call assert_equal(ww1, cn)
++ call assert_equal('', bn1)
++ call assert_equal('', bn2)
++ endif
++
++ if RunVim([], after, '-o foo bar')
++ " Same expectations as for -o2 but buffer names should be foo and bar
++ let [wn, wh1, wh2, ln, ww1, ww2, cn, bn1, bn2] = readfile('Xtestout')
++ call assert_equal('2', wn)
++ call assert_inrange(0, 1, wh1 - wh2)
++ call assert_equal(string(wh1 + wh2 + 3), ln)
++ call assert_equal(ww1, ww2)
++ call assert_equal(ww1, cn)
++ call assert_equal('foo', bn1)
++ call assert_equal('bar', bn2)
++ endif
++
++ if RunVim([], after, '-O2')
++ " Open 2 windows split vertically. Expect:
++ " - 2 windows
++ " - both windows should have the same or almost the same width
++ " - sum of both windows width (+ 1 separator) should be equal to the
++ " number of columns
++ " - both windows should have the same height
++ " - window height (+ 2 for the statusline and Ex command) should be equal
++ " to the number of lines
++ " - buffer of both windowns should have no name
++ let [wn, wh1, wh2, ln, ww1, ww2, cn, bn1, bn2] = readfile('Xtestout')
++ call assert_equal('2', wn)
++ call assert_inrange(0, 1, ww1 - ww2)
++ call assert_equal(string(ww1 + ww2 + 1), cn)
++ call assert_equal(wh1, wh2)
++ call assert_equal(string(wh1 + 2), ln)
++ call assert_equal('', bn1)
++ call assert_equal('', bn2)
++ endif
++
++ if RunVim([], after, '-O foo bar')
++ " Same expectations as for -O2 but buffer names should be foo and bar
++ let [wn, wh1, wh2, ln, ww1, ww2, cn, bn1, bn2] = readfile('Xtestout')
++ call assert_equal('2', wn)
++ call assert_inrange(0, 1, ww1 - ww2)
++ call assert_equal(string(ww1 + ww2 + 1), cn)
++ call assert_equal(wh1, wh2)
++ call assert_equal(string(wh1 + 2), ln)
++ call assert_equal('foo', bn1)
++ call assert_equal('bar', bn2)
++ endif
++
++ call delete('Xtestout')
++ endfunc
++
+ func Test_file_args()
+ let after = [
+ \ 'call writefile(argv(), "Xtestout")',
+*** ../vim-8.1.0397/src/version.c 2018-09-16 15:47:45.629425398 +0200
+--- src/version.c 2018-09-16 16:26:03.503223237 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 398,
+ /**/
+
+--
+"Thou shalt not follow the Null Pointer, for at its end Chaos and
+Madness lie."
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0399 b/data/vim/patches/8.1.0399
new file mode 100644
index 000000000..b6bad8d03
--- /dev/null
+++ b/data/vim/patches/8.1.0399
@@ -0,0 +1,270 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0399
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0399
+Problem: 'hlsearch' highlight remains in other window after cancelling
+ command.
+Solution: Redraw all windows. Also remove unnecessary delays. (closes #3437)
+Files: src/ex_getln.c, src/testdir/test_search.vim,
+ src/testdir/dumps/Test_incsearch_substitute_11.dump,
+ src/testdir/dumps/Test_incsearch_substitute_12.dump,
+ src/testdir/dumps/Test_incsearch_substitute_13.dump
+
+
+*** ../vim-8.1.0398/src/ex_getln.c 2018-09-15 15:42:36.501547749 +0200
+--- src/ex_getln.c 2018-09-16 17:05:34.778903616 +0200
+***************
+*** 445,454 ****
+ p_magic = is_state->magic_save;
+
+ validate_cursor(); /* needed for TAB */
+ if (call_update_screen)
+ update_screen(SOME_VALID);
+- else
+- redraw_all_later(SOME_VALID);
+ }
+ }
+
+--- 445,453 ----
+ p_magic = is_state->magic_save;
+
+ validate_cursor(); /* needed for TAB */
++ redraw_all_later(SOME_VALID);
+ if (call_update_screen)
+ update_screen(SOME_VALID);
+ }
+ }
+
+***************
+*** 589,596 ****
+ {
+ next_char = ccline.cmdbuff[skiplen + patlen];
+ ccline.cmdbuff[skiplen + patlen] = NUL;
+! if (empty_pattern(ccline.cmdbuff))
+ set_no_hlsearch(TRUE);
+ ccline.cmdbuff[skiplen + patlen] = next_char;
+ }
+
+--- 588,598 ----
+ {
+ next_char = ccline.cmdbuff[skiplen + patlen];
+ ccline.cmdbuff[skiplen + patlen] = NUL;
+! if (empty_pattern(ccline.cmdbuff) && !no_hlsearch)
+! {
+! redraw_all_later(SOME_VALID);
+ set_no_hlsearch(TRUE);
++ }
+ ccline.cmdbuff[skiplen + patlen] = next_char;
+ }
+
+*** ../vim-8.1.0398/src/testdir/test_search.vim 2018-09-15 15:42:36.501547749 +0200
+--- src/testdir/test_search.vim 2018-09-16 16:55:11.543875312 +0200
+***************
+*** 834,846 ****
+
+ " Need to send one key at a time to force a redraw.
+ call term_sendkeys(buf, '/fo')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_search_01', {})
+ call term_sendkeys(buf, "\<Esc>")
+ sleep 100m
+
+ call term_sendkeys(buf, '/\v')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_search_02', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+--- 834,844 ----
+***************
+*** 899,905 ****
+ call term_sendkeys(buf, 'o')
+ sleep 100m
+ call term_sendkeys(buf, 'o')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+--- 897,902 ----
+***************
+*** 907,936 ****
+ call term_sendkeys(buf, "/foo\<CR>")
+ sleep 100m
+ call term_sendkeys(buf, ':.,.+2s//')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_02', {})
+
+ " Deleting last slash should remove the match.
+ call term_sendkeys(buf, "\<BS>")
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ " Reverse range is accepted
+ call term_sendkeys(buf, ':5,2s/foo')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ " White space after the command is skipped
+ call term_sendkeys(buf, ':2,3sub /fo')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ " Command modifiers are skipped
+ call term_sendkeys(buf, ':above below browse botr confirm keepmar keepalt keeppat keepjum filter xxx hide lockm leftabove noau noswap rightbel sandbox silent silent! $tab top unsil vert verbose 4,5s/fo.')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_06', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+--- 904,928 ----
+***************
+*** 938,950 ****
+ call term_sendkeys(buf, ":set cursorline\<CR>")
+ call term_sendkeys(buf, 'G9G')
+ call term_sendkeys(buf, ':9,11s/bar')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_07', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ " Cursorline highlighting at cursor when no match
+ call term_sendkeys(buf, ':9,10s/bar')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+--- 930,940 ----
+***************
+*** 952,958 ****
+ call term_sendkeys(buf, '3G4G')
+ call term_sendkeys(buf, ":nohlsearch\<CR>")
+ call term_sendkeys(buf, ':6,7s/\v')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+--- 942,947 ----
+***************
+*** 965,970 ****
+--- 954,968 ----
+ call term_sendkeys(buf, "\<Esc>")
+ call VerifyScreenDump(buf, 'Test_incsearch_substitute_10', {})
+
++ call term_sendkeys(buf, ":split\<CR>")
++ call term_sendkeys(buf, ":let @/ = 'xyz'\<CR>")
++ call term_sendkeys(buf, ":%s/.")
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_11', {})
++ call term_sendkeys(buf, "\<BS>")
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_12', {})
++ call term_sendkeys(buf, "\<Esc>")
++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_13', {})
++
+ call StopVimInTerminal(buf)
+ call delete('Xis_subst_script')
+ endfunc
+***************
+*** 988,994 ****
+
+ " Need to send one key at a time to force a redraw.
+ call term_sendkeys(buf, ':sort ni u /on')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+--- 986,991 ----
+***************
+*** 1015,1041 ****
+
+ " Need to send one key at a time to force a redraw.
+ call term_sendkeys(buf, ':vimgrep on')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_01', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ call term_sendkeys(buf, ':vimg /on/ *.txt')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_02', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ call term_sendkeys(buf, ':vimgrepadd "\<on')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_03', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ call term_sendkeys(buf, ':lv "tha')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_04', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+ call term_sendkeys(buf, ':lvimgrepa "the" **/*.txt')
+- sleep 100m
+ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_05', {})
+ call term_sendkeys(buf, "\<Esc>")
+
+--- 1012,1033 ----
+*** ../vim-8.1.0398/src/testdir/dumps/Test_incsearch_substitute_11.dump 2018-09-16 17:07:07.942125313 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_11.dump 2018-09-16 16:51:19.114021175 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+1&#ffffff0|o+0&#ffff4012@1| |1| +0&#ffffff0@64
++ |f+0&#ffff4012|o@1| |2| +0&#ffffff0@64
++ |f+0&#ffff4012|o@1| |3| +0&#ffffff0@64
++ |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|1|,|1| @11|T|o|p
++ |f+0&#ffff4012|o@1| |1| +0&#ffffff0@64
++ |f+0&#ffff4012|o@1| |2| +0&#ffffff0@64
++ |f+0&#ffff4012|o@1| |3| +0&#ffffff0@64
++ |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p
++ |:+0&&|%|s|/|.> @64
+*** ../vim-8.1.0398/src/testdir/dumps/Test_incsearch_substitute_12.dump 2018-09-16 17:07:07.946125279 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_12.dump 2018-09-16 17:02:35.668361451 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |1| @64
++ |f|o@1| |2| @64
++ |f|o@1| |3| @64
++ |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|1|,|1| @11|T|o|p
++ |f+0&&|o@1| |1| @64
++ |f|o@1| |2| @64
++ |f|o@1| |3| @64
++ |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p
++ |:+0&&|%|s|/> @65
+*** ../vim-8.1.0398/src/testdir/dumps/Test_incsearch_substitute_13.dump 2018-09-16 17:07:07.950125246 +0200
+--- src/testdir/dumps/Test_incsearch_substitute_13.dump 2018-09-16 16:56:55.698917689 +0200
+***************
+*** 0 ****
+--- 1,9 ----
++ |f+0&#ffffff0|o@1| |1| @64
++ >f|o@1| |2| @64
++ |f|o@1| |3| @64
++ |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p
++ |f+0&&|o@1| |1| @64
++ |f|o@1| |2| @64
++ |f|o@1| |3| @64
++ |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @38|2|,|1| @11|T|o|p
++ | +0&&@69
+*** ../vim-8.1.0398/src/version.c 2018-09-16 16:28:08.358268312 +0200
+--- src/version.c 2018-09-16 17:06:16.446556974 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 399,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+73. You give your dog used motherboards instead of bones
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0400 b/data/vim/patches/8.1.0400
new file mode 100644
index 000000000..ded7bfb9c
--- /dev/null
+++ b/data/vim/patches/8.1.0400
@@ -0,0 +1,101 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0400
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0400
+Problem: Using freed memory with :diffget.
+Solution: Skip ex_diffupdate() while updating diffs. (closes #3442)
+Files: src/diff.c
+
+
+*** ../vim-8.1.0399/src/diff.c 2018-09-16 15:47:45.629425398 +0200
+--- src/diff.c 2018-09-16 18:05:01.223981230 +0200
+***************
+*** 21,27 ****
+
+ #if defined(FEAT_DIFF) || defined(PROTO)
+
+! static int diff_busy = FALSE; /* ex_diffgetput() is busy */
+
+ /* flags obtained from the 'diffopt' option */
+ #define DIFF_FILLER 0x001 // display filler lines
+--- 21,28 ----
+
+ #if defined(FEAT_DIFF) || defined(PROTO)
+
+! static int diff_busy = FALSE; // using diff structs, don't change them
+! static int diff_need_update = FALSE; // ex_diffupdate needs to be called
+
+ /* flags obtained from the 'diffopt' option */
+ #define DIFF_FILLER 0x001 // display filler lines
+***************
+*** 908,913 ****
+--- 909,920 ----
+ int idx_new;
+ diffio_T diffio;
+
++ if (diff_busy)
++ {
++ diff_need_update = TRUE;
++ return;
++ }
++
+ // Delete all diffblocks.
+ diff_clear(curtab);
+ curtab->tp_diff_invalid = FALSE;
+***************
+*** 2660,2666 ****
+ if (diff_buf_idx(curbuf) != idx_to)
+ {
+ EMSG(_("E787: Buffer changed unexpectedly"));
+! return;
+ }
+ }
+
+--- 2667,2673 ----
+ if (diff_buf_idx(curbuf) != idx_to)
+ {
+ EMSG(_("E787: Buffer changed unexpectedly"));
+! goto theend;
+ }
+ }
+
+***************
+*** 2831,2837 ****
+--- 2838,2850 ----
+ aucmd_restbuf(&aco);
+ }
+
++ theend:
+ diff_busy = FALSE;
++ if (diff_need_update)
++ {
++ diff_need_update = FALSE;
++ ex_diffupdate(NULL);
++ }
+
+ /* Check that the cursor is on a valid character and update it's position.
+ * When there were filler lines the topline has become invalid. */
+*** ../vim-8.1.0399/src/version.c 2018-09-16 17:07:40.125853848 +0200
+--- src/version.c 2018-09-16 18:09:16.718696612 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 400,
+ /**/
+
+--
+Q: How many legs does a giraffe have?
+A: Eight: two in front, two behind, two on the left and two on the right
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0401 b/data/vim/patches/8.1.0401
new file mode 100644
index 000000000..bc570efd6
--- /dev/null
+++ b/data/vim/patches/8.1.0401
@@ -0,0 +1,259 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0401
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0401
+Problem: Can't get swap name of another buffer.
+Solution: Add swapname(). (Ozaki Kiichi, closes #3441)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/testdir/test_swap.vim
+
+
+*** ../vim-8.1.0400/runtime/doc/eval.txt 2018-09-14 21:27:02.771741354 +0200
+--- runtime/doc/eval.txt 2018-09-16 18:41:36.931933772 +0200
+***************
+*** 2410,2415 ****
+--- 2417,2423 ----
+ substitute({expr}, {pat}, {sub}, {flags})
+ String all {pat} in {expr} replaced with {sub}
+ swapinfo({fname}) Dict information about swap file {fname}
++ swapname({expr}) String swap file of buffer {expr}
+ synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
+ synIDattr({synID}, {what} [, {mode}])
+ String attribute {what} of syntax ID {synID}
+***************
+*** 8011,8017 ****
+ |submatch()| returns. Example: >
+ :echo substitute(s, '%\(\x\x\)', {m -> '0x' . m[1]}, 'g')
+
+! swapinfo({fname}) swapinfo()
+ The result is a dictionary, which holds information about the
+ swapfile {fname}. The available fields are:
+ version VIM version
+--- 8024,8030 ----
+ |submatch()| returns. Example: >
+ :echo substitute(s, '%\(\x\x\)', {m -> '0x' . m[1]}, 'g')
+
+! swapinfo({fname}) *swapinfo()*
+ The result is a dictionary, which holds information about the
+ swapfile {fname}. The available fields are:
+ version VIM version
+***************
+*** 8023,8034 ****
+--- 8036,8055 ----
+ mtime last modification time in seconds
+ inode Optional: INODE number of the file
+ dirty 1 if file was modified, 0 if not
++ Note that "user" and "host" are truncated to at most 39 bytes.
+ In case of failure an "error" item is added with the reason:
+ Cannot open file: file not found or in accessible
+ Cannot read file: cannot read first block
+ Not a swap file: does not contain correct block ID
+ Magic number mismatch: Info in first block is invalid
+
++ swapname({expr}) *swapname()*
++ The result is the swap file path of the buffer {expr}.
++ For the use of {expr}, see |bufname()| above.
++ If buffer {expr} is the current buffer, the result is equal to
++ |:swapname| (unless no swap file).
++ If buffer {expr} has no swap file, returns an empty string.
++
+ synID({lnum}, {col}, {trans}) *synID()*
+ The result is a Number, which is the syntax ID at the position
+ {lnum} and {col} in the current window.
+*** ../vim-8.1.0400/src/evalfunc.c 2018-09-14 21:27:02.775741320 +0200
+--- src/evalfunc.c 2018-09-16 18:41:36.935933733 +0200
+***************
+*** 399,404 ****
+--- 399,405 ----
+ static void f_submatch(typval_T *argvars, typval_T *rettv);
+ static void f_substitute(typval_T *argvars, typval_T *rettv);
+ static void f_swapinfo(typval_T *argvars, typval_T *rettv);
++ static void f_swapname(typval_T *argvars, typval_T *rettv);
+ static void f_synID(typval_T *argvars, typval_T *rettv);
+ static void f_synIDattr(typval_T *argvars, typval_T *rettv);
+ static void f_synIDtrans(typval_T *argvars, typval_T *rettv);
+***************
+*** 865,870 ****
+--- 866,872 ----
+ {"submatch", 1, 2, f_submatch},
+ {"substitute", 4, 4, f_substitute},
+ {"swapinfo", 1, 1, f_swapinfo},
++ {"swapname", 1, 1, f_swapname},
+ {"synID", 3, 3, f_synID},
+ {"synIDattr", 2, 3, f_synIDattr},
+ {"synIDtrans", 1, 1, f_synIDtrans},
+***************
+*** 12342,12347 ****
+--- 12344,12366 ----
+ }
+
+ /*
++ * "swapname(expr)" function
++ */
++ static void
++ f_swapname(typval_T *argvars, typval_T *rettv)
++ {
++ buf_T *buf;
++
++ rettv->v_type = VAR_STRING;
++ buf = get_buf_tv(&argvars[0], FALSE);
++ if (buf == NULL || buf->b_ml.ml_mfp == NULL
++ || buf->b_ml.ml_mfp->mf_fname == NULL)
++ rettv->vval.v_string = NULL;
++ else
++ rettv->vval.v_string = vim_strsave(buf->b_ml.ml_mfp->mf_fname);
++ }
++
++ /*
+ * "synID(lnum, col, trans)" function
+ */
+ static void
+*** ../vim-8.1.0400/src/testdir/test_swap.vim 2018-08-22 11:27:57.118946770 +0200
+--- src/testdir/test_swap.vim 2018-09-16 18:41:36.935933733 +0200
+***************
+*** 1,5 ****
+--- 1,9 ----
+ " Tests for the swap feature
+
++ func s:swapname()
++ return trim(execute('swapname'))
++ endfunc
++
+ " Tests for 'directory' option.
+ func Test_swap_directory()
+ if !has("unix")
+***************
+*** 17,23 ****
+ " Verify that the swap file doesn't exist in the current directory
+ call assert_equal([], glob(".Xtest1*.swp", 1, 1, 1))
+ edit Xtest1
+! let swfname = split(execute("swapname"))[0]
+ call assert_equal([swfname], glob(swfname, 1, 1, 1))
+
+ " './dir', swap file in a directory relative to the file
+--- 21,27 ----
+ " Verify that the swap file doesn't exist in the current directory
+ call assert_equal([], glob(".Xtest1*.swp", 1, 1, 1))
+ edit Xtest1
+! let swfname = s:swapname()
+ call assert_equal([swfname], glob(swfname, 1, 1, 1))
+
+ " './dir', swap file in a directory relative to the file
+***************
+*** 27,33 ****
+ edit Xtest1
+ call assert_equal([], glob(swfname, 1, 1, 1))
+ let swfname = "Xtest2/Xtest1.swp"
+! call assert_equal(swfname, split(execute("swapname"))[0])
+ call assert_equal([swfname], glob("Xtest2/*", 1, 1, 1))
+
+ " 'dir', swap file in directory relative to the current dir
+--- 31,37 ----
+ edit Xtest1
+ call assert_equal([], glob(swfname, 1, 1, 1))
+ let swfname = "Xtest2/Xtest1.swp"
+! call assert_equal(swfname, s:swapname())
+ call assert_equal([swfname], glob("Xtest2/*", 1, 1, 1))
+
+ " 'dir', swap file in directory relative to the current dir
+***************
+*** 38,44 ****
+ edit Xtest2/Xtest3
+ call assert_equal(["Xtest2/Xtest3"], glob("Xtest2/*", 1, 1, 1))
+ let swfname = "Xtest.je/Xtest3.swp"
+! call assert_equal(swfname, split(execute("swapname"))[0])
+ call assert_equal([swfname], glob("Xtest.je/*", 1, 1, 1))
+
+ set dir&
+--- 42,48 ----
+ edit Xtest2/Xtest3
+ call assert_equal(["Xtest2/Xtest3"], glob("Xtest2/*", 1, 1, 1))
+ let swfname = "Xtest.je/Xtest3.swp"
+! call assert_equal(swfname, s:swapname())
+ call assert_equal([swfname], glob("Xtest.je/*", 1, 1, 1))
+
+ set dir&
+***************
+*** 70,76 ****
+ throw 'Skipped: cannot set second group on test file'
+ else
+ split Xtest
+! let swapname = substitute(execute('swapname'), '[[:space:]]', '', 'g')
+ call assert_match('Xtest', swapname)
+ " Group of swapfile must now match original file.
+ call assert_match(' ' . groups[1] . ' \d', system('ls -l ' . swapname))
+--- 74,80 ----
+ throw 'Skipped: cannot set second group on test file'
+ else
+ split Xtest
+! let swapname = s:swapname()
+ call assert_match('Xtest', swapname)
+ " Group of swapfile must now match original file.
+ call assert_match(' ' . groups[1] . ' \d', system('ls -l ' . swapname))
+***************
+*** 102,108 ****
+ new Xswapinfo
+ call setline(1, ['one', 'two', 'three'])
+ w
+! let fname = trim(execute('swapname'))
+ call assert_match('Xswapinfo', fname)
+ let info = swapinfo(fname)
+
+--- 106,112 ----
+ new Xswapinfo
+ call setline(1, ['one', 'two', 'three'])
+ w
+! let fname = s:swapname()
+ call assert_match('Xswapinfo', fname)
+ let info = swapinfo(fname)
+
+***************
+*** 136,138 ****
+--- 140,163 ----
+ call assert_equal('Not a swap file', info.error)
+ call delete('Xnotaswapfile')
+ endfunc
++
++ func Test_swapname()
++ edit Xtest1
++ let expected = s:swapname()
++ call assert_equal(expected, swapname('%'))
++
++ new Xtest2
++ let buf = bufnr('%')
++ let expected = s:swapname()
++ wincmd p
++ call assert_equal(expected, swapname(buf))
++
++ new Xtest3
++ setlocal noswapfile
++ call assert_equal('', swapname('%'))
++
++ bwipe!
++ call delete('Xtest1')
++ call delete('Xtest2')
++ call delete('Xtest3')
++ endfunc
+*** ../vim-8.1.0400/src/version.c 2018-09-16 18:10:45.246181729 +0200
+--- src/version.c 2018-09-16 18:42:35.483369791 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 401,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+77. The phone company asks you to test drive their new PBX system
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0402 b/data/vim/patches/8.1.0402
new file mode 100644
index 000000000..f5e1ac782
--- /dev/null
+++ b/data/vim/patches/8.1.0402
@@ -0,0 +1,171 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0402
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0402
+Problem: The DiffUpdate event isn't triggered for :diffput.
+Solution: Also trigger DiffUpdate for :diffget and :diffput.
+Files: src/diff.c
+
+
+*** ../vim-8.1.0401/src/diff.c 2018-09-16 18:10:45.246181729 +0200
+--- src/diff.c 2018-09-18 20:54:19.844268349 +0200
+***************
+*** 295,301 ****
+
+ if (diff_internal())
+ {
+! // Will udpate diffs before redrawing. Set _invalid to update the
+ // diffs themselves, set _update to also update folds properly just
+ // before redrawing.
+ tp->tp_diff_invalid = TRUE;
+--- 295,301 ----
+
+ if (diff_internal())
+ {
+! // Will update diffs before redrawing. Set _invalid to update the
+ // diffs themselves, set _update to also update folds properly just
+ // before redrawing.
+ tp->tp_diff_invalid = TRUE;
+***************
+*** 908,913 ****
+--- 908,914 ----
+ int idx_orig;
+ int idx_new;
+ diffio_T diffio;
++ int had_diffs = curtab->tp_first_diff != NULL;
+
+ if (diff_busy)
+ {
+***************
+*** 924,937 ****
+ if (curtab->tp_diffbuf[idx_orig] != NULL)
+ break;
+ if (idx_orig == DB_COUNT)
+! return;
+
+ // Only need to do something when there is another buffer.
+ for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
+ if (curtab->tp_diffbuf[idx_new] != NULL)
+ break;
+ if (idx_new == DB_COUNT)
+! return;
+
+ // Only use the internal method if it did not fail for one of the buffers.
+ vim_memset(&diffio, 0, sizeof(diffio));
+--- 925,938 ----
+ if (curtab->tp_diffbuf[idx_orig] != NULL)
+ break;
+ if (idx_orig == DB_COUNT)
+! goto theend;
+
+ // Only need to do something when there is another buffer.
+ for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
+ if (curtab->tp_diffbuf[idx_new] != NULL)
+ break;
+ if (idx_new == DB_COUNT)
+! goto theend;
+
+ // Only use the internal method if it did not fail for one of the buffers.
+ vim_memset(&diffio, 0, sizeof(diffio));
+***************
+*** 948,956 ****
+ // force updating cursor position on screen
+ curwin->w_valid_cursor.lnum = 0;
+
+! diff_redraw(TRUE);
+!
+! apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
+ }
+
+ /*
+--- 949,962 ----
+ // force updating cursor position on screen
+ curwin->w_valid_cursor.lnum = 0;
+
+! theend:
+! // A redraw is needed if there were diffs and they were cleared, or there
+! // are diffs now, which means they got updated.
+! if (had_diffs || curtab->tp_first_diff != NULL)
+! {
+! diff_redraw(TRUE);
+! apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
+! }
+ }
+
+ /*
+***************
+*** 2272,2278 ****
+ if ((diff_flags_new & DIFF_HORIZONTAL) && (diff_flags_new & DIFF_VERTICAL))
+ return FAIL;
+
+! /* If "icase" or "iwhite" was added or removed, need to update the diff. */
+ if (diff_flags != diff_flags_new || diff_algorithm != diff_algorithm_new)
+ FOR_ALL_TABPAGES(tp)
+ tp->tp_diff_invalid = TRUE;
+--- 2278,2285 ----
+ if ((diff_flags_new & DIFF_HORIZONTAL) && (diff_flags_new & DIFF_VERTICAL))
+ return FAIL;
+
+! // If flags were added or removed, or the algorithm was changed, need to
+! // update the diff.
+ if (diff_flags != diff_flags_new || diff_algorithm != diff_algorithm_new)
+ FOR_ALL_TABPAGES(tp)
+ tp->tp_diff_invalid = TRUE;
+***************
+*** 2845,2858 ****
+ diff_need_update = FALSE;
+ ex_diffupdate(NULL);
+ }
+!
+! /* Check that the cursor is on a valid character and update it's position.
+! * When there were filler lines the topline has become invalid. */
+! check_cursor();
+! changed_line_abv_curs();
+!
+! /* Also need to redraw the other buffers. */
+! diff_redraw(FALSE);
+ }
+
+ #ifdef FEAT_FOLDING
+--- 2852,2869 ----
+ diff_need_update = FALSE;
+ ex_diffupdate(NULL);
+ }
+! else
+! {
+! // Check that the cursor is on a valid character and update it's
+! // position. When there were filler lines the topline has become
+! // invalid.
+! check_cursor();
+! changed_line_abv_curs();
+!
+! // Also need to redraw the other buffers.
+! diff_redraw(FALSE);
+! apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
+! }
+ }
+
+ #ifdef FEAT_FOLDING
+*** ../vim-8.1.0401/src/version.c 2018-09-16 18:46:36.189127529 +0200
+--- src/version.c 2018-09-18 20:55:27.799635739 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 402,
+ /**/
+
+--
+If your nose runs, and your feet smell, you might be upside down.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0403 b/data/vim/patches/8.1.0403
new file mode 100644
index 000000000..a27814227
--- /dev/null
+++ b/data/vim/patches/8.1.0403
@@ -0,0 +1,45 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0403
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0403
+Problem: Header file missing from distribution.
+Solution: Add src/protodef.h.
+Files: Filelist
+
+
+*** ../vim-8.1.0402/Filelist 2018-09-10 21:15:34.637000672 +0200
+--- Filelist 2018-09-18 21:38:54.686006138 +0200
+***************
+*** 141,146 ****
+--- 141,147 ----
+ src/testdir/if_ver*.vim \
+ src/testdir/color_ramp.vim \
+ src/proto.h \
++ src/protodef.h \
+ src/proto/arabic.pro \
+ src/proto/beval.pro \
+ src/proto/blowfish.pro \
+*** ../vim-8.1.0402/src/version.c 2018-09-18 21:20:22.507148523 +0200
+--- src/version.c 2018-09-18 21:39:33.961691227 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 403,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+90. Instead of calling you to dinner, your spouse sends e-mail.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0404 b/data/vim/patches/8.1.0404
new file mode 100644
index 000000000..351e3096e
--- /dev/null
+++ b/data/vim/patches/8.1.0404
@@ -0,0 +1,69 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0404
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0404
+Problem: Accessing invalid memory with long argument name.
+Solution: Use item_count instead of checking for a terminating NULL.
+ (Dominique Pelle, closes #3444)
+Files: src/testdir/test_arglist.vim, src/version.c
+
+
+*** ../vim-8.1.0403/src/testdir/test_arglist.vim 2018-08-31 23:06:18.735841246 +0200
+--- src/testdir/test_arglist.vim 2018-09-18 21:48:47.705268287 +0200
+***************
+*** 411,413 ****
+--- 411,420 ----
+ call assert_equal('notexist Xx\ x runtest.vim', expand('##'))
+ call delete('Xx x')
+ endfunc
++
++ func Test_large_arg()
++ " Argument longer or equal to the number of columns used to cause
++ " access to invalid memory.
++ exe 'argadd ' .repeat('x', &columns)
++ args
++ endfunc
+*** ../vim-8.1.0403/src/version.c 2018-09-18 21:41:43.716652306 +0200
+--- src/version.c 2018-09-18 21:50:15.188571404 +0200
+***************
+*** 1725,1731 ****
+ if (Columns < width)
+ {
+ /* Not enough screen columns - show one per line */
+! for (i = 0; items[i] != NULL; ++i)
+ {
+ version_msg_wrap(items[i], i == current);
+ if (msg_col > 0)
+--- 1727,1733 ----
+ if (Columns < width)
+ {
+ /* Not enough screen columns - show one per line */
+! for (i = 0; i < item_count; ++i)
+ {
+ version_msg_wrap(items[i], i == current);
+ if (msg_col > 0)
+*** ../vim-8.1.0403/src/version.c 2018-09-18 21:41:43.716652306 +0200
+--- src/version.c 2018-09-18 21:50:15.188571404 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 404,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+91. It's Saturday afternoon in the middle of May and you
+ are on computer.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0405 b/data/vim/patches/8.1.0405
new file mode 100644
index 000000000..c287e078b
--- /dev/null
+++ b/data/vim/patches/8.1.0405
@@ -0,0 +1,2286 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0405
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0405
+Problem: Too many #ifdefs for GTK.
+Solution: Define macros instead of using #ifdef. (Ken Takata, closes #3436)
+Files: src/gui_beval.c, src/gui_gtk.c, src/gui_gtk_f.c,
+ src/gui_gtk_x11.c, src/vim.h
+
+
+*** ../vim-8.1.0404/src/gui_beval.c 2018-09-11 21:30:05.249070508 +0200
+--- src/gui_beval.c 2018-09-18 22:23:38.699477631 +0200
+***************
+*** 244,259 ****
+ * This allows us to catch events independently of the signal handlers
+ * in gui_gtk_x11.c.
+ */
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(target), "event",
+ G_CALLBACK(target_event_cb),
+ beval);
+- # else
+- /* Should use GTK_OBJECT() here, but that causes a lint warning... */
+- gtk_signal_connect((GtkObject*)(target), "event",
+- GTK_SIGNAL_FUNC(target_event_cb),
+- beval);
+- # endif
+ /*
+ * Nasty: Key press events go to the main window thus the drawing area
+ * will never see them. This means we have to connect to the main window
+--- 244,252 ----
+***************
+*** 262,306 ****
+ if (gtk_socket_id == 0 && gui.mainwin != NULL
+ && gtk_widget_is_ancestor(target, gui.mainwin))
+ {
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.mainwin), "event",
+ G_CALLBACK(mainwin_event_cb),
+ beval);
+- # else
+- gtk_signal_connect((GtkObject*)(gui.mainwin), "event",
+- GTK_SIGNAL_FUNC(mainwin_event_cb),
+- beval);
+- # endif
+ }
+ }
+
+ static void
+ removeEventHandler(BalloonEval *beval)
+ {
+- /* LINTED: avoid warning: dubious operation on enum */
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_handlers_disconnect_by_func(G_OBJECT(beval->target),
+ FUNC2GENERIC(target_event_cb),
+ beval);
+- # else
+- gtk_signal_disconnect_by_func((GtkObject*)(beval->target),
+- GTK_SIGNAL_FUNC(target_event_cb),
+- beval);
+- # endif
+
+ if (gtk_socket_id == 0 && gui.mainwin != NULL
+ && gtk_widget_is_ancestor(beval->target, gui.mainwin))
+ {
+- /* LINTED: avoid warning: dubious operation on enum */
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_handlers_disconnect_by_func(G_OBJECT(gui.mainwin),
+ FUNC2GENERIC(mainwin_event_cb),
+ beval);
+- # else
+- gtk_signal_disconnect_by_func((GtkObject*)(gui.mainwin),
+- GTK_SIGNAL_FUNC(mainwin_event_cb),
+- beval);
+- # endif
+ }
+ }
+
+--- 255,279 ----
+***************
+*** 433,445 ****
+ }
+ else
+ {
+- # if GTK_CHECK_VERSION(3,0,0)
+ beval->timerID = g_timeout_add((guint)p_bdlay,
+ &timeout_cb, beval);
+- # else
+- beval->timerID = gtk_timeout_add((guint32)p_bdlay,
+- &timeout_cb, beval);
+- # endif
+ }
+ }
+ }
+--- 406,413 ----
+***************
+*** 1039,1049 ****
+
+ if (beval->timerID != 0)
+ {
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_source_remove(beval->timerID);
+- # else
+- gtk_timeout_remove(beval->timerID);
+- # endif
+ beval->timerID = 0;
+ }
+ beval->showState = ShS_NEUTRAL;
+--- 1007,1013 ----
+***************
+*** 1055,1071 ****
+ beval->balloonShell = gtk_window_new(GTK_WINDOW_POPUP);
+
+ gtk_widget_set_app_paintable(beval->balloonShell, TRUE);
+- # if GTK_CHECK_VERSION(3,0,0)
+ gtk_window_set_resizable(GTK_WINDOW(beval->balloonShell), FALSE);
+- # else
+- gtk_window_set_policy(GTK_WINDOW(beval->balloonShell), FALSE, FALSE, TRUE);
+- # endif
+ gtk_widget_set_name(beval->balloonShell, "gtk-tooltips");
+- # if GTK_CHECK_VERSION(3,0,0)
+ gtk_container_set_border_width(GTK_CONTAINER(beval->balloonShell), 4);
+- # else
+- gtk_container_border_width(GTK_CONTAINER(beval->balloonShell), 4);
+- # endif
+
+ # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(beval->balloonShell), "draw",
+--- 1019,1027 ----
+*** ../vim-8.1.0404/src/gui_gtk.c 2018-09-11 21:30:05.249070508 +0200
+--- src/gui_gtk.c 2018-09-18 22:23:38.699477631 +0200
+***************
+*** 756,768 ****
+ # endif
+
+ if (gtk_socket_id != 0)
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(menu->id), "focus-in-event",
+ G_CALLBACK(toolbar_button_focus_in_event), NULL);
+- # else
+- gtk_signal_connect(GTK_OBJECT(menu->id), "focus_in_event",
+- GTK_SIGNAL_FUNC(toolbar_button_focus_in_event), NULL);
+- # endif
+
+ CONVERT_TO_UTF8_FREE(text);
+ CONVERT_TO_UTF8_FREE(tooltip);
+--- 756,763 ----
+***************
+*** 792,803 ****
+ gtk_widget_set_sensitive(menu->id, FALSE);
+ # endif
+ gtk_widget_show(menu->id);
+- # if GTK_CHECK_VERSION(3,0,0)
+ gtk_menu_shell_insert(GTK_MENU_SHELL(parent->submenu_id),
+ menu->id, idx);
+- # else
+- gtk_menu_insert(GTK_MENU(parent->submenu_id), menu->id, idx);
+- # endif
+
+ return;
+ }
+--- 787,794 ----
+***************
+*** 805,825 ****
+ /* Add textual menu item. */
+ menu_item_new(menu, parent->submenu_id);
+ gtk_widget_show(menu->id);
+- # if GTK_CHECK_VERSION(3,0,0)
+ gtk_menu_shell_insert(GTK_MENU_SHELL(parent->submenu_id),
+ menu->id, idx);
+- # else
+- gtk_menu_insert(GTK_MENU(parent->submenu_id), menu->id, idx);
+- # endif
+
+ if (menu->id != NULL)
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(menu->id), "activate",
+ G_CALLBACK(menu_item_activate), menu);
+- # else
+- gtk_signal_connect(GTK_OBJECT(menu->id), "activate",
+- GTK_SIGNAL_FUNC(menu_item_activate), menu);
+- # endif
+ }
+ }
+ #endif /* FEAT_MENU */
+--- 796,807 ----
+***************
+*** 1000,1006 ****
+
+ adjustment = gtk_range_get_adjustment(GTK_RANGE(sb->id));
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_adjustment_set_lower(adjustment, 0.0);
+ gtk_adjustment_set_value(adjustment, val);
+ gtk_adjustment_set_upper(adjustment, max + 1);
+--- 982,987 ----
+***************
+*** 1008,1041 ****
+ gtk_adjustment_set_page_increment(adjustment,
+ size < 3L ? 1L : size - 2L);
+ gtk_adjustment_set_step_increment(adjustment, 1.0);
+- #else
+- adjustment->lower = 0.0;
+- adjustment->value = val;
+- adjustment->upper = max + 1;
+- adjustment->page_size = size;
+- adjustment->page_increment = size < 3L ? 1L : size - 2L;
+- adjustment->step_increment = 1.0;
+- #endif
+
+! #if GTK_CHECK_VERSION(3,0,0)
+! g_signal_handler_block(G_OBJECT(adjustment),
+! (gulong)sb->handler_id);
+! #else
+! g_signal_handler_block(GTK_OBJECT(adjustment),
+! (gulong)sb->handler_id);
+! #endif
+
+ #if !GTK_CHECK_VERSION(3,18,0)
+ gtk_adjustment_changed(adjustment);
+ #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_handler_unblock(G_OBJECT(adjustment),
+ (gulong)sb->handler_id);
+- #else
+- g_signal_handler_unblock(GTK_OBJECT(adjustment),
+- (gulong)sb->handler_id);
+- #endif
+ }
+ }
+
+--- 989,1003 ----
+ gtk_adjustment_set_page_increment(adjustment,
+ size < 3L ? 1L : size - 2L);
+ gtk_adjustment_set_step_increment(adjustment, 1.0);
+
+! g_signal_handler_block(G_OBJECT(adjustment), (gulong)sb->handler_id);
+
+ #if !GTK_CHECK_VERSION(3,18,0)
+ gtk_adjustment_changed(adjustment);
+ #endif
+
+ g_signal_handler_unblock(G_OBJECT(adjustment),
+ (gulong)sb->handler_id);
+ }
+ }
+
+***************
+*** 1063,1073 ****
+ #endif
+
+ sb = gui_find_scrollbar((long)data);
+- #if GTK_CHECK_VERSION(3,0,0)
+ value = gtk_adjustment_get_value(adjustment);
+- #else
+- value = (long)adjustment->value;
+- #endif
+ #if !GTK_CHECK_VERSION(3,0,0)
+ /*
+ * The dragging argument must be right for the scrollbar to work with
+--- 1025,1031 ----
+***************
+*** 1136,1161 ****
+ {
+ GtkAdjustment *adjustment;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_can_focus(sb->id, FALSE);
+- #else
+- GTK_WIDGET_UNSET_FLAGS(sb->id, GTK_CAN_FOCUS);
+- #endif
+ gtk_form_put(GTK_FORM(gui.formwin), sb->id, 0, 0);
+
+ adjustment = gtk_range_get_adjustment(GTK_RANGE(sb->id));
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ sb->handler_id = g_signal_connect(
+ G_OBJECT(adjustment), "value-changed",
+ G_CALLBACK(adjustment_value_changed),
+ GINT_TO_POINTER(sb->ident));
+- #else
+- sb->handler_id = gtk_signal_connect(
+- GTK_OBJECT(adjustment), "value_changed",
+- GTK_SIGNAL_FUNC(adjustment_value_changed),
+- GINT_TO_POINTER(sb->ident));
+- #endif
+ gui_mch_update();
+ }
+ }
+--- 1094,1108 ----
+***************
+*** 1803,1809 ****
+
+ /* Allow activation of mnemonic accelerators without pressing <Alt> when
+ * there is no textfield. Handle pressing Esc. */
+! g_signal_connect(G_OBJECT(dialog), "key_press_event",
+ G_CALLBACK(&dialog_key_press_event_cb), &dialoginfo);
+
+ if (def_but > 0)
+--- 1750,1756 ----
+
+ /* Allow activation of mnemonic accelerators without pressing <Alt> when
+ * there is no textfield. Handle pressing Esc. */
+! g_signal_connect(G_OBJECT(dialog), "key-press-event",
+ G_CALLBACK(&dialog_key_press_event_cb), &dialoginfo);
+
+ if (def_but > 0)
+***************
+*** 2203,2219 ****
+ if (entry_text != NULL)
+ {
+ gtk_entry_set_text(GTK_ENTRY(frdp->what), (char *)entry_text);
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frdp->wword),
+ (gboolean)wword);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frdp->mcase),
+ (gboolean)mcase);
+- #else
+- gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(frdp->wword),
+- (gboolean)wword);
+- gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(frdp->mcase),
+- (gboolean)mcase);
+- #endif
+ }
+ gtk_window_present(GTK_WINDOW(frdp->dialog));
+
+--- 2150,2159 ----
+***************
+*** 2278,2288 ****
+ table = gtk_table_new(1024, 3, FALSE);
+ #endif
+ gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 0);
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_container_set_border_width(GTK_CONTAINER(table), 4);
+- #else
+- gtk_container_border_width(GTK_CONTAINER(table), 4);
+- #endif
+
+ tmp = gtk_label_new(CONV(_("Find what:")));
+ #if GTK_CHECK_VERSION(3,16,0)
+--- 2218,2224 ----
+***************
+*** 2315,2333 ****
+ sensitive = (entry_text != NULL && entry_text[0] != NUL);
+ if (entry_text != NULL)
+ gtk_entry_set_text(GTK_ENTRY(frdp->what), (char *)entry_text);
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(frdp->what), "changed",
+ G_CALLBACK(entry_changed_cb), frdp->dialog);
+ g_signal_connect_after(G_OBJECT(frdp->what), "key-press-event",
+ G_CALLBACK(find_key_press_event),
+ (gpointer) frdp);
+- #else
+- gtk_signal_connect(GTK_OBJECT(frdp->what), "changed",
+- GTK_SIGNAL_FUNC(entry_changed_cb), frdp->dialog);
+- gtk_signal_connect_after(GTK_OBJECT(frdp->what), "key_press_event",
+- GTK_SIGNAL_FUNC(find_key_press_event),
+- (gpointer) frdp);
+- #endif
+ #if GTK_CHECK_VERSION(3,4,0)
+ gtk_grid_attach(GTK_GRID(table), frdp->what, 2, 0, 5, 1);
+ #else
+--- 2251,2261 ----
+***************
+*** 2365,2385 ****
+ GTK_FILL, GTK_EXPAND, 2, 2);
+ #endif
+ frdp->with = gtk_entry_new();
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(frdp->with), "activate",
+ G_CALLBACK(find_replace_cb),
+ GINT_TO_POINTER(FRD_R_FINDNEXT));
+ g_signal_connect_after(G_OBJECT(frdp->with), "key-press-event",
+ G_CALLBACK(find_key_press_event),
+ (gpointer) frdp);
+- #else
+- gtk_signal_connect(GTK_OBJECT(frdp->with), "activate",
+- GTK_SIGNAL_FUNC(find_replace_cb),
+- GINT_TO_POINTER(FRD_R_FINDNEXT));
+- gtk_signal_connect_after(GTK_OBJECT(frdp->with), "key_press_event",
+- GTK_SIGNAL_FUNC(find_key_press_event),
+- (gpointer) frdp);
+- #endif
+ #if GTK_CHECK_VERSION(3,4,0)
+ gtk_grid_attach(GTK_GRID(table), frdp->with, 2, 1, 5, 1);
+ #else
+--- 2293,2304 ----
+***************
+*** 2391,2429 ****
+ * Make the entry activation only change the input focus onto the
+ * with item.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(frdp->what), "activate",
+ G_CALLBACK(entry_activate_cb), frdp->with);
+- #else
+- gtk_signal_connect(GTK_OBJECT(frdp->what), "activate",
+- GTK_SIGNAL_FUNC(entry_activate_cb), frdp->with);
+- #endif
+ }
+ else
+ {
+ /*
+ * Make the entry activation do the search.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(frdp->what), "activate",
+ G_CALLBACK(find_replace_cb),
+ GINT_TO_POINTER(FRD_FINDNEXT));
+- #else
+- gtk_signal_connect(GTK_OBJECT(frdp->what), "activate",
+- GTK_SIGNAL_FUNC(find_replace_cb),
+- GINT_TO_POINTER(FRD_FINDNEXT));
+- #endif
+ }
+
+ /* whole word only button */
+ frdp->wword = gtk_check_button_new_with_label(CONV(_("Match whole word only")));
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frdp->wword),
+ (gboolean)wword);
+- #else
+- gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(frdp->wword),
+- (gboolean)wword);
+- #endif
+ if (do_replace)
+ #if GTK_CHECK_VERSION(3,4,0)
+ gtk_grid_attach(GTK_GRID(table), frdp->wword, 0, 2, 5, 1);
+--- 2310,2332 ----
+***************
+*** 2441,2453 ****
+
+ /* match case button */
+ frdp->mcase = gtk_check_button_new_with_label(CONV(_("Match case")));
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frdp->mcase),
+ (gboolean)mcase);
+- #else
+- gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(frdp->mcase),
+- (gboolean)mcase);
+- #endif
+ if (do_replace)
+ #if GTK_CHECK_VERSION(3,4,0)
+ gtk_grid_attach(GTK_GRID(table), frdp->mcase, 0, 3, 5, 1);
+--- 2344,2351 ----
+***************
+*** 2484,2513 ****
+ #else
+ vbox = gtk_vbox_new(FALSE, 0);
+ #endif
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 0);
+- #else
+- gtk_container_border_width(GTK_CONTAINER(vbox), 0);
+- #endif
+ gtk_container_add(GTK_CONTAINER(tmp), vbox);
+
+ /* 'Up' and 'Down' buttons */
+ frdp->up = gtk_radio_button_new_with_label(NULL, CONV(_("Up")));
+ gtk_box_pack_start(GTK_BOX(vbox), frdp->up, TRUE, TRUE, 0);
+- #if GTK_CHECK_VERSION(3,0,0)
+ frdp->down = gtk_radio_button_new_with_label(
+ gtk_radio_button_get_group(GTK_RADIO_BUTTON(frdp->up)),
+ CONV(_("Down")));
+- #else
+- frdp->down = gtk_radio_button_new_with_label(
+- gtk_radio_button_group(GTK_RADIO_BUTTON(frdp->up)),
+- CONV(_("Down")));
+- #endif
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frdp->down), TRUE);
+- #else
+- gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(frdp->down), TRUE);
+- #endif
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
+ gtk_box_pack_start(GTK_BOX(vbox), frdp->down, TRUE, TRUE, 0);
+
+--- 2382,2397 ----
+***************
+*** 2517,2527 ****
+ #else
+ actionarea = gtk_vbutton_box_new();
+ #endif
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_container_set_border_width(GTK_CONTAINER(actionarea), 2);
+- #else
+- gtk_container_border_width(GTK_CONTAINER(actionarea), 2);
+- #endif
+ gtk_box_pack_end(GTK_BOX(hbox), actionarea, FALSE, FALSE, 0);
+
+ /* 'Find Next' button */
+--- 2401,2407 ----
+***************
+*** 2532,2554 ****
+ #endif
+ gtk_widget_set_sensitive(frdp->find, sensitive);
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(frdp->find), "clicked",
+ G_CALLBACK(find_replace_cb),
+ (do_replace) ? GINT_TO_POINTER(FRD_R_FINDNEXT)
+ : GINT_TO_POINTER(FRD_FINDNEXT));
+- #else
+- gtk_signal_connect(GTK_OBJECT(frdp->find), "clicked",
+- GTK_SIGNAL_FUNC(find_replace_cb),
+- (do_replace) ? GINT_TO_POINTER(FRD_R_FINDNEXT)
+- : GINT_TO_POINTER(FRD_FINDNEXT));
+- #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_can_default(frdp->find, TRUE);
+- #else
+- GTK_WIDGET_SET_FLAGS(frdp->find, GTK_CAN_DEFAULT);
+- #endif
+ gtk_box_pack_start(GTK_BOX(actionarea), frdp->find, FALSE, FALSE, 0);
+ gtk_widget_grab_default(frdp->find);
+
+--- 2412,2423 ----
+***************
+*** 2561,2581 ****
+ frdp->replace = create_image_button(GTK_STOCK_CONVERT, _("Replace"));
+ #endif
+ gtk_widget_set_sensitive(frdp->replace, sensitive);
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_can_default(frdp->find, TRUE);
+- #else
+- GTK_WIDGET_SET_FLAGS(frdp->replace, GTK_CAN_DEFAULT);
+- #endif
+ gtk_box_pack_start(GTK_BOX(actionarea), frdp->replace, FALSE, FALSE, 0);
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(frdp->replace), "clicked",
+ G_CALLBACK(find_replace_cb),
+ GINT_TO_POINTER(FRD_REPLACE));
+- #else
+- gtk_signal_connect(GTK_OBJECT(frdp->replace), "clicked",
+- GTK_SIGNAL_FUNC(find_replace_cb),
+- GINT_TO_POINTER(FRD_REPLACE));
+- #endif
+
+ /* 'Replace All' button */
+ #if GTK_CHECK_VERSION(3,10,0)
+--- 2430,2440 ----
+***************
+*** 2584,2604 ****
+ frdp->all = create_image_button(GTK_STOCK_CONVERT, _("Replace All"));
+ #endif
+ gtk_widget_set_sensitive(frdp->all, sensitive);
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_can_default(frdp->all, TRUE);
+- #else
+- GTK_WIDGET_SET_FLAGS(frdp->all, GTK_CAN_DEFAULT);
+- #endif
+ gtk_box_pack_start(GTK_BOX(actionarea), frdp->all, FALSE, FALSE, 0);
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(frdp->all), "clicked",
+ G_CALLBACK(find_replace_cb),
+ GINT_TO_POINTER(FRD_REPLACEALL));
+- #else
+- gtk_signal_connect(GTK_OBJECT(frdp->all), "clicked",
+- GTK_SIGNAL_FUNC(find_replace_cb),
+- GINT_TO_POINTER(FRD_REPLACEALL));
+- #endif
+ }
+
+ /* 'Cancel' button */
+--- 2443,2453 ----
+***************
+*** 2607,2633 ****
+ #else
+ tmp = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+ #endif
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_can_default(tmp, TRUE);
+- #else
+- GTK_WIDGET_SET_FLAGS(tmp, GTK_CAN_DEFAULT);
+- #endif
+ gtk_box_pack_end(GTK_BOX(actionarea), tmp, FALSE, FALSE, 0);
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect_swapped(G_OBJECT(tmp),
+ "clicked", G_CALLBACK(gtk_widget_hide),
+ G_OBJECT(frdp->dialog));
+ g_signal_connect_swapped(G_OBJECT(frdp->dialog),
+ "delete-event", G_CALLBACK(gtk_widget_hide_on_delete),
+ G_OBJECT(frdp->dialog));
+- #else
+- gtk_signal_connect_object(GTK_OBJECT(tmp),
+- "clicked", GTK_SIGNAL_FUNC(gtk_widget_hide),
+- GTK_OBJECT(frdp->dialog));
+- gtk_signal_connect_object(GTK_OBJECT(frdp->dialog),
+- "delete_event", GTK_SIGNAL_FUNC(gtk_widget_hide_on_delete),
+- GTK_OBJECT(frdp->dialog));
+- #endif
+
+ #if GTK_CHECK_VERSION(3,2,0)
+ tmp = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
+--- 2456,2469 ----
+***************
+*** 2693,2715 ****
+ }
+
+ find_text = (char_u *)gtk_entry_get_text(GTK_ENTRY(sfr->what));
+- #if GTK_CHECK_VERSION(3,0,0)
+ direction_down = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sfr->down));
+- #else
+- direction_down = GTK_TOGGLE_BUTTON(sfr->down)->active;
+- #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sfr->wword)))
+- #else
+- if (GTK_TOGGLE_BUTTON(sfr->wword)->active)
+- #endif
+ flags |= FRD_WHOLE_WORD;
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sfr->mcase)))
+- #else
+- if (GTK_TOGGLE_BUTTON(sfr->mcase)->active)
+- #endif
+ flags |= FRD_MATCH_CASE;
+
+ repl_text = CONVERT_FROM_UTF8(repl_text);
+--- 2529,2539 ----
+*** ../vim-8.1.0404/src/gui_gtk_f.c 2018-09-11 21:30:05.249070508 +0200
+--- src/gui_gtk_f.c 2018-09-18 22:23:38.699477631 +0200
+***************
+*** 150,170 ****
+ * that gtk_widget_set_parent() realizes the widget if it's visible
+ * and its parent is mapped.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_realized(GTK_WIDGET(form)))
+- #else
+- if (GTK_WIDGET_REALIZED(form))
+- #endif
+ gtk_form_attach_child_window(form, child);
+
+ gtk_widget_set_parent(child_widget, GTK_WIDGET(form));
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_realized(GTK_WIDGET(form))
+ && !gtk_widget_get_realized(child_widget))
+- #else
+- if (GTK_WIDGET_REALIZED(form) && !GTK_WIDGET_REALIZED(child_widget))
+- #endif
+ gtk_form_realize_child(form, child);
+
+ gtk_form_position_child(form, child, TRUE);
+--- 150,162 ----
+***************
+*** 300,331 ****
+ GtkForm *form;
+ GdkWindowAttr attributes;
+ gint attributes_mask;
+
+ g_return_if_fail(GTK_IS_FORM(widget));
+
+ form = GTK_FORM(widget);
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_realized(widget, TRUE);
+- #else
+- GTK_WIDGET_SET_FLAGS(form, GTK_REALIZED);
+- #endif
+
+ attributes.window_type = GDK_WINDOW_CHILD;
+! #if GTK_CHECK_VERSION(3,0,0)
+! {
+! GtkAllocation allocation;
+! gtk_widget_get_allocation(widget, &allocation);
+! attributes.x = allocation.x;
+! attributes.y = allocation.y;
+! attributes.width = allocation.width;
+! attributes.height = allocation.height;
+! }
+! #else
+! attributes.x = widget->allocation.x;
+! attributes.y = widget->allocation.y;
+! attributes.width = widget->allocation.width;
+! attributes.height = widget->allocation.height;
+! #endif
+ attributes.wclass = GDK_INPUT_OUTPUT;
+ attributes.visual = gtk_widget_get_visual(widget);
+ #if GTK_CHECK_VERSION(3,0,0)
+--- 292,310 ----
+ GtkForm *form;
+ GdkWindowAttr attributes;
+ gint attributes_mask;
++ GtkAllocation allocation;
+
+ g_return_if_fail(GTK_IS_FORM(widget));
+
+ form = GTK_FORM(widget);
+ gtk_widget_set_realized(widget, TRUE);
+
++ gtk_widget_get_allocation(widget, &allocation);
+ attributes.window_type = GDK_WINDOW_CHILD;
+! attributes.x = allocation.x;
+! attributes.y = allocation.y;
+! attributes.width = allocation.width;
+! attributes.height = allocation.height;
+ attributes.wclass = GDK_INPUT_OUTPUT;
+ attributes.visual = gtk_widget_get_visual(widget);
+ #if GTK_CHECK_VERSION(3,0,0)
+***************
+*** 341,354 ****
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_window(widget,
+ gdk_window_new(gtk_widget_get_parent_window(widget),
+ &attributes, attributes_mask));
+- #else
+- widget->window = gdk_window_new(gtk_widget_get_parent_window(widget),
+- &attributes, attributes_mask);
+- #endif
+ gdk_window_set_user_data(gtk_widget_get_window(widget), widget);
+
+ attributes.x = 0;
+--- 320,328 ----
+***************
+*** 382,392 ****
+
+ gtk_form_attach_child_window(form, child);
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_visible(child->widget))
+- #else
+- if (GTK_WIDGET_VISIBLE(child->widget))
+- #endif
+ gtk_form_realize_child(form, child);
+ }
+ }
+--- 356,362 ----
+***************
+*** 410,420 ****
+
+ form = GTK_FORM(widget);
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_mapped(widget, TRUE);
+- #else
+- GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED);
+- #endif
+
+ gdk_window_show(gtk_widget_get_window(widget));
+ gdk_window_show(form->bin_window);
+--- 380,386 ----
+***************
+*** 423,435 ****
+ {
+ GtkFormChild *child = tmp_list->data;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_visible(child->widget)
+ && !gtk_widget_get_mapped(child->widget))
+- #else
+- if (GTK_WIDGET_VISIBLE(child->widget)
+- && !GTK_WIDGET_MAPPED(child->widget))
+- #endif
+ gtk_widget_map(child->widget);
+ }
+ }
+--- 389,396 ----
+***************
+*** 456,476 ****
+
+ if (child->window != NULL)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
+ FUNC2GENERIC(gtk_form_child_map),
+ child);
+ g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
+ FUNC2GENERIC(gtk_form_child_unmap),
+ child);
+- #else
+- gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
+- GTK_SIGNAL_FUNC(gtk_form_child_map),
+- child);
+- gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
+- GTK_SIGNAL_FUNC(gtk_form_child_unmap),
+- child);
+- #endif
+
+ gdk_window_set_user_data(child->window, NULL);
+ gdk_window_destroy(child->window);
+--- 417,428 ----
+***************
+*** 534,567 ****
+ GList *tmp_list;
+ GtkForm *form;
+ gboolean need_reposition;
+- #if GTK_CHECK_VERSION(3,0,0)
+ GtkAllocation cur_alloc;
+- #endif
+
+ g_return_if_fail(GTK_IS_FORM(widget));
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_get_allocation(widget, &cur_alloc);
+
+ if (cur_alloc.x == allocation->x
+ && cur_alloc.y == allocation->y
+ && cur_alloc.width == allocation->width
+ && cur_alloc.height == allocation->height)
+- #else
+- if (widget->allocation.x == allocation->x
+- && widget->allocation.y == allocation->y
+- && widget->allocation.width == allocation->width
+- && widget->allocation.height == allocation->height)
+- #endif
+ return;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ need_reposition = cur_alloc.width != allocation->width
+ || cur_alloc.height != allocation->height;
+- #else
+- need_reposition = widget->allocation.width != allocation->width
+- || widget->allocation.height != allocation->height;
+- #endif
+ form = GTK_FORM(widget);
+
+ if (need_reposition)
+--- 486,505 ----
+***************
+*** 577,587 ****
+ }
+ }
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_realized(widget))
+- #else
+- if (GTK_WIDGET_REALIZED(widget))
+- #endif
+ {
+ gdk_window_move_resize(gtk_widget_get_window(widget),
+ allocation->x, allocation->y,
+--- 515,521 ----
+***************
+*** 590,600 ****
+ 0, 0,
+ allocation->width, allocation->height);
+ }
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_allocation(widget, allocation);
+- #else
+- widget->allocation = *allocation;
+- #endif
+ if (need_reposition)
+ gtk_form_send_configure(form);
+ }
+--- 524,530 ----
+***************
+*** 697,713 ****
+ #endif
+ if (child->window)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
+ FUNC2GENERIC(&gtk_form_child_map), child);
+ g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
+ FUNC2GENERIC(&gtk_form_child_unmap), child);
+- #else
+- gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
+- GTK_SIGNAL_FUNC(&gtk_form_child_map), child);
+- gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
+- GTK_SIGNAL_FUNC(&gtk_form_child_unmap), child);
+- #endif
+
+ /* FIXME: This will cause problems for reparenting NO_WINDOW
+ * widgets out of a GtkForm
+--- 627,636 ----
+***************
+*** 760,793 ****
+ if (child->window != NULL)
+ return; /* been there, done that */
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (!gtk_widget_get_has_window(child->widget))
+- #else
+- if (GTK_WIDGET_NO_WINDOW(child->widget))
+- #endif
+ {
+ GtkWidget *widget;
+ GdkWindowAttr attributes;
+ gint attributes_mask;
+
+ widget = GTK_WIDGET(form);
+
+- attributes.window_type = GDK_WINDOW_CHILD;
+- attributes.x = child->x;
+- attributes.y = child->y;
+ #if GTK_CHECK_VERSION(3,0,0)
+! {
+! GtkRequisition requisition;
+!
+! gtk_widget_get_preferred_size(child->widget, &requisition, NULL);
+!
+! attributes.width = requisition.width;
+! attributes.height = requisition.height;
+! }
+ #else
+! attributes.width = child->widget->requisition.width;
+! attributes.height = child->widget->requisition.height;
+ #endif
+ attributes.wclass = GDK_INPUT_OUTPUT;
+ attributes.visual = gtk_widget_get_visual(widget);
+ #if !GTK_CHECK_VERSION(3,0,0)
+--- 683,707 ----
+ if (child->window != NULL)
+ return; /* been there, done that */
+
+ if (!gtk_widget_get_has_window(child->widget))
+ {
+ GtkWidget *widget;
+ GdkWindowAttr attributes;
+ gint attributes_mask;
++ GtkRequisition requisition;
+
+ widget = GTK_WIDGET(form);
+
+ #if GTK_CHECK_VERSION(3,0,0)
+! gtk_widget_get_preferred_size(child->widget, &requisition, NULL);
+ #else
+! requisition = child->widget->requisition;
+ #endif
++ attributes.window_type = GDK_WINDOW_CHILD;
++ attributes.x = child->x;
++ attributes.y = child->y;
++ attributes.width = requisition.width;
++ attributes.height = requisition.height;
+ attributes.wclass = GDK_INPUT_OUTPUT;
+ attributes.visual = gtk_widget_get_visual(widget);
+ #if !GTK_CHECK_VERSION(3,0,0)
+***************
+*** 824,846 ****
+ * Install signal handlers to map/unmap child->window
+ * alongside with the actual widget.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(child->widget), "map",
+ G_CALLBACK(&gtk_form_child_map), child);
+ g_signal_connect(G_OBJECT(child->widget), "unmap",
+ G_CALLBACK(&gtk_form_child_unmap), child);
+- #else
+- gtk_signal_connect(GTK_OBJECT(child->widget), "map",
+- GTK_SIGNAL_FUNC(&gtk_form_child_map), child);
+- gtk_signal_connect(GTK_OBJECT(child->widget), "unmap",
+- GTK_SIGNAL_FUNC(&gtk_form_child_unmap), child);
+- #endif
+ }
+- #if GTK_CHECK_VERSION(3,0,0)
+ else if (!gtk_widget_get_realized(child->widget))
+- #else
+- else if (!GTK_WIDGET_REALIZED(child->widget))
+- #endif
+ {
+ gtk_widget_set_parent_window(child->widget, form->bin_window);
+ }
+--- 738,749 ----
+***************
+*** 868,885 ****
+ {
+ if (!child->mapped)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_mapped(GTK_WIDGET(form))
+ && gtk_widget_get_visible(child->widget))
+- #else
+- if (GTK_WIDGET_MAPPED(form) && GTK_WIDGET_VISIBLE(child->widget))
+- #endif
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (!gtk_widget_get_mapped(child->widget))
+- #else
+- if (!GTK_WIDGET_MAPPED(child->widget))
+- #endif
+ gtk_widget_map(child->widget);
+
+ child->mapped = TRUE;
+--- 771,780 ----
+***************
+*** 890,920 ****
+ if (force_allocate)
+ {
+ GtkAllocation allocation;
+- #if GTK_CHECK_VERSION(3,0,0)
+ GtkRequisition requisition;
+
+ gtk_widget_get_preferred_size(child->widget, &requisition, NULL);
+ #endif
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (!gtk_widget_get_has_window(child->widget))
+- #else
+- if (GTK_WIDGET_NO_WINDOW(child->widget))
+- #endif
+ {
+ if (child->window)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_move_resize(child->window,
+ x, y,
+ requisition.width,
+ requisition.height);
+- #else
+- gdk_window_move_resize(child->window,
+- x, y,
+- child->widget->requisition.width,
+- child->widget->requisition.height);
+- #endif
+ }
+
+ allocation.x = 0;
+--- 785,806 ----
+ if (force_allocate)
+ {
+ GtkAllocation allocation;
+ GtkRequisition requisition;
+
++ #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_get_preferred_size(child->widget, &requisition, NULL);
++ #else
++ requisition = child->widget->requisition;
+ #endif
+
+ if (!gtk_widget_get_has_window(child->widget))
+ {
+ if (child->window)
+ {
+ gdk_window_move_resize(child->window,
+ x, y,
+ requisition.width,
+ requisition.height);
+ }
+
+ allocation.x = 0;
+***************
+*** 926,938 ****
+ allocation.y = y;
+ }
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ allocation.width = requisition.width;
+ allocation.height = requisition.height;
+- #else
+- allocation.width = child->widget->requisition.width;
+- allocation.height = child->widget->requisition.height;
+- #endif
+
+ gtk_widget_size_allocate(child->widget, &allocation);
+ }
+--- 812,819 ----
+***************
+*** 943,953 ****
+ {
+ child->mapped = FALSE;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_mapped(child->widget))
+- #else
+- if (GTK_WIDGET_MAPPED(child->widget))
+- #endif
+ gtk_widget_unmap(child->widget);
+ }
+ }
+--- 824,830 ----
+***************
+*** 981,1008 ****
+ {
+ GtkWidget *widget;
+ GdkEventConfigure event;
+
+ widget = GTK_WIDGET(form);
+
+ event.type = GDK_CONFIGURE;
+- #if GTK_CHECK_VERSION(3,0,0)
+ event.window = gtk_widget_get_window(widget);
+! {
+! GtkAllocation allocation;
+!
+! gtk_widget_get_allocation(widget, &allocation);
+! event.x = allocation.x;
+! event.y = allocation.y;
+! event.width = allocation.width;
+! event.height = allocation.height;
+! }
+! #else
+! event.window = widget->window;
+! event.x = widget->allocation.x;
+! event.y = widget->allocation.y;
+! event.width = widget->allocation.width;
+! event.height = widget->allocation.height;
+! #endif
+
+ gtk_main_do_event((GdkEvent*)&event);
+ }
+--- 858,874 ----
+ {
+ GtkWidget *widget;
+ GdkEventConfigure event;
++ GtkAllocation allocation;
+
+ widget = GTK_WIDGET(form);
+
++ gtk_widget_get_allocation(widget, &allocation);
+ event.type = GDK_CONFIGURE;
+ event.window = gtk_widget_get_window(widget);
+! event.x = allocation.x;
+! event.y = allocation.y;
+! event.width = allocation.width;
+! event.height = allocation.height;
+
+ gtk_main_do_event((GdkEvent*)&event);
+ }
+*** ../vim-8.1.0404/src/gui_gtk_x11.c 2018-09-11 21:30:05.253070476 +0200
+--- src/gui_gtk_x11.c 2018-09-18 22:23:38.699477631 +0200
+***************
+*** 804,814 ****
+ }
+ }
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ typedef gboolean timeout_cb_type;
+- #else
+- typedef gint timeout_cb_type;
+- #endif
+
+ /*
+ * Start a timer that will invoke the specified callback.
+--- 804,810 ----
+***************
+*** 817,837 ****
+ static guint
+ timeout_add(int time, timeout_cb_type (*callback)(gpointer), int *flagp)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ return g_timeout_add((guint)time, (GSourceFunc)callback, flagp);
+- #else
+- return gtk_timeout_add((guint32)time, (GtkFunction)callback, flagp);
+- #endif
+ }
+
+ static void
+ timeout_remove(guint timer)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_source_remove(timer);
+- #else
+- gtk_timeout_remove(timer);
+- #endif
+ }
+
+
+--- 813,825 ----
+***************
+*** 974,984 ****
+ gui_mch_start_blink();
+
+ /* make sure keyboard input goes there */
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_socket_id == 0 || !gtk_widget_has_focus(gui.drawarea))
+- #else
+- if (gtk_socket_id == 0 || !GTK_WIDGET_HAS_FOCUS(gui.drawarea))
+- #endif
+ gtk_widget_grab_focus(gui.drawarea);
+
+ return FALSE;
+--- 962,968 ----
+***************
+*** 1418,1439 ****
+ int len;
+ int motion_type = MAUTO;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_selection_data_get_selection(data) == clip_plus.gtk_sel_atom)
+- #else
+- if (data->selection == clip_plus.gtk_sel_atom)
+- #endif
+ cbd = &clip_plus;
+ else
+ cbd = &clip_star;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ text = (char_u *)gtk_selection_data_get_data(data);
+ len = gtk_selection_data_get_length(data);
+- #else
+- text = (char_u *)data->data;
+- len = data->length;
+- #endif
+
+ if (text == NULL || len <= 0)
+ {
+--- 1402,1414 ----
+***************
+*** 1443,1462 ****
+ return;
+ }
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_selection_data_get_data_type(data) == vim_atom)
+- #else
+- if (data->type == vim_atom)
+- #endif
+ {
+ motion_type = *text++;
+ --len;
+ }
+- #if GTK_CHECK_VERSION(3,0,0)
+ else if (gtk_selection_data_get_data_type(data) == vimenc_atom)
+- #else
+- else if (data->type == vimenc_atom)
+- #endif
+ {
+ char_u *enc;
+ vimconv_T conv;
+--- 1418,1429 ----
+***************
+*** 1547,1558 ****
+ GdkAtom type;
+ VimClipboard *cbd;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_selection_data_get_selection(selection_data)
+ == clip_plus.gtk_sel_atom)
+- #else
+- if (selection_data->selection == clip_plus.gtk_sel_atom)
+- #endif
+ cbd = &clip_plus;
+ else
+ cbd = &clip_star;
+--- 1514,1521 ----
+***************
+*** 1785,1793 ****
+ {
+ int button;
+ int_u vim_modifiers;
+- #if GTK_CHECK_VERSION(3,0,0)
+ GtkAllocation allocation;
+- #endif
+
+ button = (state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK |
+ GDK_BUTTON3_MASK | GDK_BUTTON4_MASK |
+--- 1748,1754 ----
+***************
+*** 1814,1830 ****
+ /*
+ * Auto repeat timer handling.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_get_allocation(gui.drawarea, &allocation);
+
+ if (x < 0 || y < 0
+ || x >= allocation.width
+ || y >= allocation.height)
+- #else
+- if (x < 0 || y < 0
+- || x >= gui.drawarea->allocation.width
+- || y >= gui.drawarea->allocation.height)
+- #endif
+ {
+
+ int dx;
+--- 1775,1785 ----
+***************
+*** 1835,1847 ****
+ /* Calculate the maximal distance of the cursor from the drawing area.
+ * (offshoot can't become negative here!).
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ dx = x < 0 ? -x : x - allocation.width;
+ dy = y < 0 ? -y : y - allocation.height;
+- #else
+- dx = x < 0 ? -x : x - gui.drawarea->allocation.width;
+- dy = y < 0 ? -y : y - gui.drawarea->allocation.height;
+- #endif
+
+ offshoot = dx > dy ? dx : dy;
+
+--- 1790,1797 ----
+***************
+*** 1907,1912 ****
+--- 1857,1866 ----
+ return gdk_device_get_window_at_position(dev, x, y);
+ }
+ # endif
++ #else /* !GTK_CHECK_VERSION(3,0,0) */
++ # define gui_gtk_get_pointer(wid, x, y, s) \
++ gdk_window_get_pointer((wid)->window, x, y, s)
++ # define gui_gtk_window_at_position(wid, x, y) gdk_window_at_pointer(x, y)
+ #endif
+
+ /*
+***************
+*** 1919,1929 ****
+ int y;
+ GdkModifierType state;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gui_gtk_get_pointer(gui.drawarea, &x, &y, &state);
+- #else
+- gdk_window_get_pointer(gui.drawarea->window, &x, &y, &state);
+- #endif
+
+ if (!(state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK |
+ GDK_BUTTON3_MASK | GDK_BUTTON4_MASK |
+--- 1873,1879 ----
+***************
+*** 1968,1978 ****
+ int y;
+ GdkModifierType state;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gui_gtk_get_pointer(widget, &x, &y, &state);
+- #else
+- gdk_window_get_pointer(widget->window, &x, &y, &state);
+- #endif
+ process_motion_notify(x, y, state);
+ }
+ else
+--- 1918,1924 ----
+***************
+*** 2003,2013 ****
+ gui.event_time = event->time;
+
+ /* Make sure we have focus now we've been selected */
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_socket_id != 0 && !gtk_widget_has_focus(widget))
+- #else
+- if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
+- #endif
+ gtk_widget_grab_focus(widget);
+
+ /*
+--- 1949,1955 ----
+***************
+*** 2069,2079 ****
+ int button;
+ int_u vim_modifiers;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_socket_id != 0 && !gtk_widget_has_focus(widget))
+- #else
+- if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
+- #endif
+ gtk_widget_grab_focus(widget);
+
+ switch (event->direction)
+--- 2011,2017 ----
+***************
+*** 2239,2251 ****
+ char_u **fnames;
+ int nfiles = 0;
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ fnames = parse_uri_list(&nfiles,
+ (char_u *)gtk_selection_data_get_data(data),
+ gtk_selection_data_get_length(data));
+- # else
+- fnames = parse_uri_list(&nfiles, data->data, data->length);
+- # endif
+
+ if (fnames != NULL && nfiles > 0)
+ {
+--- 2177,2185 ----
+***************
+*** 2272,2290 ****
+ int len;
+ char_u *tmpbuf = NULL;
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ text = (char_u *)gtk_selection_data_get_data(data);
+ len = gtk_selection_data_get_length(data);
+- # else
+- text = data->data;
+- len = data->length;
+- # endif
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_selection_data_get_data_type(data) == utf8_string_atom)
+- # else
+- if (data->type == utf8_string_atom)
+- # endif
+ {
+ if (input_conv.vc_type != CONV_NONE)
+ tmpbuf = string_convert(&input_conv, text, &len);
+--- 2206,2215 ----
+***************
+*** 2320,2326 ****
+ GdkModifierType state;
+
+ /* Guard against trash */
+- # if GTK_CHECK_VERSION(3,0,0)
+ const guchar * const data_data = gtk_selection_data_get_data(data);
+ const gint data_length = gtk_selection_data_get_length(data);
+ const gint data_format = gtk_selection_data_get_format(data);
+--- 2245,2250 ----
+***************
+*** 2329,2340 ****
+ || data_length <= 0
+ || data_format != 8
+ || data_data[data_length] != '\0')
+- # else
+- if (data->data == NULL
+- || data->length <= 0
+- || data->format != 8
+- || data->data[data->length] != '\0')
+- # endif
+ {
+ gtk_drag_finish(context, FALSE, FALSE, time_);
+ return;
+--- 2253,2258 ----
+***************
+*** 2342,2352 ****
+
+ /* Get the current modifier state for proper distinguishment between
+ * different operations later. */
+- #if GTK_CHECK_VERSION(3,0,0)
+ gui_gtk_get_pointer(widget, NULL, NULL, &state);
+- # else
+- gdk_window_get_pointer(widget->window, NULL, NULL, &state);
+- # endif
+
+ /* Not sure about the role of "text/plain" here... */
+ if (info == (guint)TARGET_TEXT_URI_LIST)
+--- 2260,2266 ----
+***************
+*** 2810,2822 ****
+ GDK_WINDOW_XID(mainwin_win));
+ }
+ gtk_widget_add_events(gui.mainwin, GDK_PROPERTY_CHANGE_MASK);
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.mainwin), "property-notify-event",
+ G_CALLBACK(property_event), NULL);
+- # else
+- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "property_notify_event",
+- GTK_SIGNAL_FUNC(property_event), NULL);
+- # endif
+ #endif
+ }
+
+--- 2724,2731 ----
+***************
+*** 2935,2943 ****
+ drawarea_realize_cb(GtkWidget *widget, gpointer data UNUSED)
+ {
+ GtkWidget *sbar;
+- #if GTK_CHECK_VERSION(3,0,0)
+ GtkAllocation allocation;
+- #endif
+
+ #ifdef FEAT_XIM
+ xim_init();
+--- 2844,2850 ----
+***************
+*** 2962,2984 ****
+ if (!sbar || (!gui.which_scrollbars[SBAR_LEFT]
+ && firstwin->w_scrollbars[SBAR_RIGHT].id))
+ sbar = firstwin->w_scrollbars[SBAR_RIGHT].id;
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_get_allocation(sbar, &allocation);
+ if (sbar && gtk_widget_get_realized(sbar) && allocation.width)
+ gui.scrollbar_width = allocation.width;
+- #else
+- if (sbar && GTK_WIDGET_REALIZED(sbar) && sbar->allocation.width)
+- gui.scrollbar_width = sbar->allocation.width;
+- #endif
+
+ sbar = gui.bottom_sbar.id;
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (sbar && gtk_widget_get_realized(sbar) && allocation.height)
+ gui.scrollbar_height = allocation.height;
+- #else
+- if (sbar && GTK_WIDGET_REALIZED(sbar) && sbar->allocation.height)
+- gui.scrollbar_height = sbar->allocation.height;
+- #endif
+ }
+
+ /*
+--- 2869,2881 ----
+***************
+*** 3142,3173 ****
+ # define item_orientation GTK_ORIENTATION_HORIZONTAL
+ # endif
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (widget != NULL
+ && item_orientation == orientation
+ && gtk_widget_get_realized(widget)
+ && gtk_widget_get_visible(widget))
+- # else
+- if (widget != NULL
+- && item_orientation == orientation
+- && GTK_WIDGET_REALIZED(widget)
+- && GTK_WIDGET_VISIBLE(widget))
+- # endif
+ {
+! # if GTK_CHECK_VERSION(3,0,0)
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation(widget, &allocation);
+ return allocation.height;
+ # else
+- # ifdef FEAT_GUI_GNOME
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
+ return widget->allocation.height;
+ else
+ return widget->allocation.width;
+- # else
+- return widget->allocation.height;
+- # endif
+ # endif
+ }
+ return 0;
+--- 3039,3059 ----
+ # define item_orientation GTK_ORIENTATION_HORIZONTAL
+ # endif
+
+ if (widget != NULL
+ && item_orientation == orientation
+ && gtk_widget_get_realized(widget)
+ && gtk_widget_get_visible(widget))
+ {
+! # if GTK_CHECK_VERSION(3,0,0) || !defined(FEAT_GUI_GNOME)
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation(widget, &allocation);
+ return allocation.height;
+ # else
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
+ return widget->allocation.height;
+ else
+ return widget->allocation.width;
+ # endif
+ }
+ return 0;
+***************
+*** 3438,3452 ****
+ CONVERT_TO_UTF8_FREE(utf_text);
+
+ gtk_container_add(GTK_CONTAINER(menu), item);
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(item), "activate",
+ G_CALLBACK(tabline_menu_handler),
+ GINT_TO_POINTER(resp));
+- # else
+- gtk_signal_connect(GTK_OBJECT(item), "activate",
+- GTK_SIGNAL_FUNC(tabline_menu_handler),
+- (gpointer)(long)resp);
+- # endif
+ }
+
+ /*
+--- 3324,3332 ----
+***************
+*** 3488,3507 ****
+ )
+ return TRUE;
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ tabwin = gui_gtk_window_at_position(gui.mainwin, &x, &y);
+- # else
+- tabwin = gdk_window_at_pointer(&x, &y);
+- # endif
+
+ gdk_window_get_user_data(tabwin, (gpointer)&tabwidget);
+- # if GTK_CHECK_VERSION(3,0,0)
+ clicked_page = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(tabwidget),
+ "tab_num"));
+- # else
+- clicked_page = (int)(long)gtk_object_get_user_data(
+- GTK_OBJECT(tabwidget));
+- # endif
+
+ /* If the event was generated for 3rd button popup the menu. */
+ if (bevent->button == 3)
+--- 3368,3378 ----
+***************
+*** 3536,3546 ****
+ static void
+ on_select_tab(
+ GtkNotebook *notebook UNUSED,
+- # if GTK_CHECK_VERSION(3,0,0)
+ gpointer *page UNUSED,
+- # else
+- GtkNotebookPage *page UNUSED,
+- # endif
+ gint idx,
+ gpointer data UNUSED)
+ {
+--- 3407,3413 ----
+***************
+*** 3554,3564 ****
+ static void
+ on_tab_reordered(
+ GtkNotebook *notebook UNUSED,
+- # if GTK_CHECK_VERSION(3,0,0)
+ gpointer *page UNUSED,
+- # else
+- GtkNotebookPage *page UNUSED,
+- # endif
+ gint idx,
+ gpointer data UNUSED)
+ {
+--- 3421,3427 ----
+***************
+*** 3586,3596 ****
+ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), showit);
+ update_window_manager_hints(0, 0);
+ if (showit)
+- # if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_can_focus(GTK_WIDGET(gui.tabline), FALSE);
+- # else
+- GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(gui.tabline), GTK_CAN_FOCUS);
+- # endif
+ }
+
+ gui_mch_update();
+--- 3449,3455 ----
+***************
+*** 3663,3680 ****
+ }
+
+ event_box = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gui.tabline), page);
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_object_set_data(G_OBJECT(event_box), "tab_num",
+ GINT_TO_POINTER(tab_num));
+- # else
+- gtk_object_set_user_data(GTK_OBJECT(event_box),
+- (gpointer)(long)tab_num);
+- # endif
+- # if GTK_CHECK_VERSION(3,0,0)
+ label = gtk_bin_get_child(GTK_BIN(event_box));
+- # else
+- label = GTK_BIN(event_box)->child;
+- # endif
+ get_tabline_label(tp, FALSE);
+ labeltext = CONVERT_TO_UTF8(NameBuff);
+ gtk_label_set_text(GTK_LABEL(label), (const char *)labeltext);
+--- 3522,3530 ----
+***************
+*** 3695,3707 ****
+ while (gtk_notebook_get_nth_page(GTK_NOTEBOOK(gui.tabline), nr) != NULL)
+ gtk_notebook_remove_page(GTK_NOTEBOOK(gui.tabline), nr);
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(gui.tabline)) != curtabidx)
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(gui.tabline), curtabidx);
+- # else
+- if (gtk_notebook_current_page(GTK_NOTEBOOK(gui.tabline)) != curtabidx)
+- gtk_notebook_set_page(GTK_NOTEBOOK(gui.tabline), curtabidx);
+- # endif
+
+ /* Make sure everything is in place before drawing text. */
+ gui_mch_update();
+--- 3545,3552 ----
+***************
+*** 3719,3731 ****
+ return;
+
+ ignore_tabline_evt = TRUE;
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(gui.tabline)) != nr - 1)
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(gui.tabline), nr - 1);
+- # else
+- if (gtk_notebook_current_page(GTK_NOTEBOOK(gui.tabline)) != nr - 1)
+- gtk_notebook_set_page(GTK_NOTEBOOK(gui.tabline), nr - 1);
+- # endif
+ ignore_tabline_evt = FALSE;
+ }
+
+--- 3564,3571 ----
+***************
+*** 3872,3882 ****
+ /* Use GtkSocket from another app. */
+ plug = gtk_plug_new_for_display(gdk_display_get_default(),
+ gtk_socket_id);
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (plug != NULL && gtk_plug_get_socket_window(GTK_PLUG(plug)) != NULL)
+- #else
+- if (plug != NULL && GTK_PLUG(plug)->socket_window != NULL)
+- #endif
+ {
+ gui.mainwin = plug;
+ }
+--- 3712,3718 ----
+***************
+*** 3911,3936 ****
+ gui.text_context = gtk_widget_create_pango_context(gui.mainwin);
+ pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR);
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_container_set_border_width(GTK_CONTAINER(gui.mainwin), 0);
+- #else
+- gtk_container_border_width(GTK_CONTAINER(gui.mainwin), 0);
+- #endif
+ gtk_widget_add_events(gui.mainwin, GDK_VISIBILITY_NOTIFY_MASK);
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.mainwin), "delete-event",
+ G_CALLBACK(&delete_event_cb), NULL);
+
+ g_signal_connect(G_OBJECT(gui.mainwin), "realize",
+ G_CALLBACK(&mainwin_realize), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "delete_event",
+- GTK_SIGNAL_FUNC(&delete_event_cb), NULL);
+-
+- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "realize",
+- GTK_SIGNAL_FUNC(&mainwin_realize), NULL);
+- #endif
+
+ g_signal_connect(G_OBJECT(gui.mainwin), "screen-changed",
+ G_CALLBACK(&mainwin_screen_changed_cb), NULL);
+--- 3747,3760 ----
+***************
+*** 4084,4094 ****
+ gtk_widget_show(label);
+ event_box = gtk_event_box_new();
+ gtk_widget_show(event_box);
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_object_set_data(G_OBJECT(event_box), "tab_num", GINT_TO_POINTER(1L));
+- # else
+- gtk_object_set_user_data(GTK_OBJECT(event_box), (gpointer)1L);
+- # endif
+ # if !GTK_CHECK_VERSION(3,14,0)
+ gtk_misc_set_padding(GTK_MISC(label), 2, 2);
+ # endif
+--- 3908,3914 ----
+***************
+*** 4097,4131 ****
+ gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline), page, TRUE);
+ }
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.tabline), "switch-page",
+ G_CALLBACK(on_select_tab), NULL);
+ g_signal_connect(G_OBJECT(gui.tabline), "page-reordered",
+ G_CALLBACK(on_tab_reordered), NULL);
+- # else
+- gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
+- GTK_SIGNAL_FUNC(on_select_tab), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.tabline), "page-reordered",
+- GTK_SIGNAL_FUNC(on_tab_reordered), NULL);
+- # endif
+
+ /* Create a popup menu for the tab line and connect it. */
+ tabline_menu = create_tabline_menu();
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect_swapped(G_OBJECT(gui.tabline), "button-press-event",
+ G_CALLBACK(on_tabline_menu), G_OBJECT(tabline_menu));
+- # else
+- gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event",
+- GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu));
+- # endif
+ #endif /* FEAT_GUI_TABLINE */
+
+ gui.formwin = gtk_form_new();
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_container_set_border_width(GTK_CONTAINER(gui.formwin), 0);
+- #else
+- gtk_container_border_width(GTK_CONTAINER(gui.formwin), 0);
+- #endif
+ #if !GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK);
+ #endif
+--- 3917,3935 ----
+***************
+*** 4159,4175 ****
+
+ /* For GtkSockets, key-presses must go to the focus widget (drawarea)
+ * and not the window. */
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect((gtk_socket_id == 0) ? G_OBJECT(gui.mainwin)
+ : G_OBJECT(gui.drawarea),
+ "key-press-event",
+ G_CALLBACK(key_press_event), NULL);
+- #else
+- gtk_signal_connect((gtk_socket_id == 0) ? GTK_OBJECT(gui.mainwin)
+- : GTK_OBJECT(gui.drawarea),
+- "key_press_event",
+- GTK_SIGNAL_FUNC(key_press_event), NULL);
+- #endif
+ #if defined(FEAT_XIM) || GTK_CHECK_VERSION(3,0,0)
+ /* Also forward key release events for the benefit of GTK+ 2 input
+ * modules. Try CTRL-SHIFT-xdigits to enter a Unicode code point. */
+--- 3963,3972 ----
+***************
+*** 4178,4205 ****
+ "key-release-event",
+ G_CALLBACK(&key_release_event), NULL);
+ #endif
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "realize",
+ G_CALLBACK(drawarea_realize_cb), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "unrealize",
+ G_CALLBACK(drawarea_unrealize_cb), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "configure-event",
+ G_CALLBACK(drawarea_configure_event_cb), NULL);
+! # if GTK_CHECK_VERSION(3,22,2)
+ g_signal_connect_after(G_OBJECT(gui.drawarea), "style-updated",
+ G_CALLBACK(&drawarea_style_updated_cb), NULL);
+! # else
+ g_signal_connect_after(G_OBJECT(gui.drawarea), "style-set",
+ G_CALLBACK(&drawarea_style_set_cb), NULL);
+- # endif
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "realize",
+- GTK_SIGNAL_FUNC(drawarea_realize_cb), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "unrealize",
+- GTK_SIGNAL_FUNC(drawarea_unrealize_cb), NULL);
+-
+- gtk_signal_connect_after(GTK_OBJECT(gui.drawarea), "style_set",
+- GTK_SIGNAL_FUNC(&drawarea_style_set_cb), NULL);
+ #endif
+
+ #if !GTK_CHECK_VERSION(3,0,0)
+--- 3975,3994 ----
+ "key-release-event",
+ G_CALLBACK(&key_release_event), NULL);
+ #endif
+ g_signal_connect(G_OBJECT(gui.drawarea), "realize",
+ G_CALLBACK(drawarea_realize_cb), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "unrealize",
+ G_CALLBACK(drawarea_unrealize_cb), NULL);
++ #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "configure-event",
+ G_CALLBACK(drawarea_configure_event_cb), NULL);
+! #endif
+! #if GTK_CHECK_VERSION(3,22,2)
+ g_signal_connect_after(G_OBJECT(gui.drawarea), "style-updated",
+ G_CALLBACK(&drawarea_style_updated_cb), NULL);
+! #else
+ g_signal_connect_after(G_OBJECT(gui.drawarea), "style-set",
+ G_CALLBACK(&drawarea_style_set_cb), NULL);
+ #endif
+
+ #if !GTK_CHECK_VERSION(3,0,0)
+***************
+*** 4213,4223 ****
+
+ if (gtk_socket_id != 0)
+ /* make sure keyboard input can go to the drawarea */
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_can_focus(gui.drawarea, TRUE);
+- #else
+- GTK_WIDGET_SET_FLAGS(gui.drawarea, GTK_CAN_FOCUS);
+- #endif
+
+ /*
+ * Set clipboard specific atoms
+--- 4002,4008 ----
+***************
+*** 4248,4264 ****
+ */
+ if (vim_strchr(p_go, GO_POINTER) != NULL)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "leave-notify-event",
+ G_CALLBACK(leave_notify_event), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "enter-notify-event",
+ G_CALLBACK(enter_notify_event), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "leave_notify_event",
+- GTK_SIGNAL_FUNC(leave_notify_event), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "enter_notify_event",
+- GTK_SIGNAL_FUNC(enter_notify_event), NULL);
+- #endif
+ }
+
+ /* Real windows can get focus ... GtkPlug, being a mere container can't,
+--- 4033,4042 ----
+***************
+*** 4267,4313 ****
+ */
+ if (gtk_socket_id == 0)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.mainwin), "focus-out-event",
+ G_CALLBACK(focus_out_event), NULL);
+ g_signal_connect(G_OBJECT(gui.mainwin), "focus-in-event",
+ G_CALLBACK(focus_in_event), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_out_event",
+- GTK_SIGNAL_FUNC(focus_out_event), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_in_event",
+- GTK_SIGNAL_FUNC(focus_in_event), NULL);
+- #endif
+ }
+ else
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "focus-out-event",
+ G_CALLBACK(focus_out_event), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "focus-in-event",
+ G_CALLBACK(focus_in_event), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "focus_out_event",
+- GTK_SIGNAL_FUNC(focus_out_event), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "focus_in_event",
+- GTK_SIGNAL_FUNC(focus_in_event), NULL);
+- #endif
+ #ifdef FEAT_GUI_TABLINE
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.tabline), "focus-out-event",
+ G_CALLBACK(focus_out_event), NULL);
+ g_signal_connect(G_OBJECT(gui.tabline), "focus-in-event",
+ G_CALLBACK(focus_in_event), NULL);
+- # else
+- gtk_signal_connect(GTK_OBJECT(gui.tabline), "focus_out_event",
+- GTK_SIGNAL_FUNC(focus_out_event), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.tabline), "focus_in_event",
+- GTK_SIGNAL_FUNC(focus_in_event), NULL);
+- # endif
+ #endif /* FEAT_GUI_TABLINE */
+ }
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "motion-notify-event",
+ G_CALLBACK(motion_notify_event), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "button-press-event",
+--- 4045,4069 ----
+***************
+*** 4316,4356 ****
+ G_CALLBACK(button_release_event), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "scroll-event",
+ G_CALLBACK(&scroll_event), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "motion_notify_event",
+- GTK_SIGNAL_FUNC(motion_notify_event), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "button_press_event",
+- GTK_SIGNAL_FUNC(button_press_event), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "button_release_event",
+- GTK_SIGNAL_FUNC(button_release_event), NULL);
+- g_signal_connect(G_OBJECT(gui.drawarea), "scroll_event",
+- G_CALLBACK(&scroll_event), NULL);
+- #endif
+
+ /*
+ * Add selection handler functions.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "selection-clear-event",
+ G_CALLBACK(selection_clear_event), NULL);
+ g_signal_connect(G_OBJECT(gui.drawarea), "selection-received",
+ G_CALLBACK(selection_received_cb), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "selection_clear_event",
+- GTK_SIGNAL_FUNC(selection_clear_event), NULL);
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "selection_received",
+- GTK_SIGNAL_FUNC(selection_received_cb), NULL);
+- #endif
+
+ gui_gtk_set_selection_targets();
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "selection-get",
+ G_CALLBACK(selection_get_cb), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "selection_get",
+- GTK_SIGNAL_FUNC(selection_get_cb), NULL);
+- #endif
+
+ /* Pretend we don't have input focus, we will get an event if we do. */
+ gui.in_focus = FALSE;
+--- 4072,4090 ----
+***************
+*** 4415,4430 ****
+ void
+ gui_mch_new_colors(void)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+- # if !GTK_CHECK_VERSION(3,22,2)
+- GdkWindow * const da_win = gtk_widget_get_window(gui.drawarea);
+- # endif
+-
+ if (gui.drawarea != NULL && gtk_widget_get_window(gui.drawarea) != NULL)
+- #else
+- if (gui.drawarea != NULL && gui.drawarea->window != NULL)
+- #endif
+ {
+ #if GTK_CHECK_VERSION(3,22,2)
+ GtkStyleContext * const context
+ = gtk_widget_get_style_context(gui.drawarea);
+--- 4149,4160 ----
+ void
+ gui_mch_new_colors(void)
+ {
+ if (gui.drawarea != NULL && gtk_widget_get_window(gui.drawarea) != NULL)
+ {
++ #if !GTK_CHECK_VERSION(3,22,2)
++ GdkWindow * const da_win = gtk_widget_get_window(gui.drawarea);
++ #endif
++
+ #if GTK_CHECK_VERSION(3,22,2)
+ GtkStyleContext * const context
+ = gtk_widget_get_style_context(gui.drawarea);
+***************
+*** 4462,4472 ****
+ GdkColor color = { 0, 0, 0, 0 };
+
+ color.pixel = gui.back_pixel;
+- # if GTK_CHECK_VERSION(3,0,0)
+ gdk_window_set_background(da_win, &color);
+- # else
+- gdk_window_set_background(gui.drawarea->window, &color);
+- # endif
+ #endif /* !GTK_CHECK_VERSION(3,22,2) */
+ }
+ }
+--- 4192,4198 ----
+***************
+*** 4524,4536 ****
+ * We can't do much more here than to trying to preserve what had been done,
+ * since the window is already inevitably going away.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ static void
+ mainwin_destroy_cb(GObject *object UNUSED, gpointer data UNUSED)
+- #else
+- static void
+- mainwin_destroy_cb(GtkObject *object UNUSED, gpointer data UNUSED)
+- #endif
+ {
+ /* Don't write messages to the GUI anymore */
+ full_screen = FALSE;
+--- 4250,4257 ----
+***************
+*** 4709,4721 ****
+ * changed them). */
+ highlight_gui_started(); /* re-init colors and fonts */
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.mainwin), "destroy",
+ G_CALLBACK(mainwin_destroy_cb), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "destroy",
+- GTK_SIGNAL_FUNC(mainwin_destroy_cb), NULL);
+- #endif
+
+ #ifdef FEAT_HANGULIN
+ hangul_keyboard_set();
+--- 4430,4437 ----
+***************
+*** 4731,4755 ****
+ * manager upon us and should not interfere with what VIM is requesting
+ * upon startup.
+ */
+- #if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.formwin), "configure-event",
+ G_CALLBACK(form_configure_event), NULL);
+- #else
+- gtk_signal_connect(GTK_OBJECT(gui.formwin), "configure_event",
+- GTK_SIGNAL_FUNC(form_configure_event), NULL);
+- #endif
+
+ #ifdef FEAT_DND
+ /* Set up for receiving DND items. */
+ gui_gtk_set_dnd_targets();
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ g_signal_connect(G_OBJECT(gui.drawarea), "drag-data-received",
+ G_CALLBACK(drag_data_received_cb), NULL);
+- # else
+- gtk_signal_connect(GTK_OBJECT(gui.drawarea), "drag_data_received",
+- GTK_SIGNAL_FUNC(drag_data_received_cb), NULL);
+- # endif
+ #endif
+
+ /* With GTK+ 2, we need to iconify the window before calling show()
+--- 4447,4461 ----
+***************
+*** 5036,5046 ****
+ widget = gui.menubar;
+
+ /* Do not disable the menu while starting up, otherwise F10 doesn't work. */
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (!showit != !gtk_widget_get_visible(widget) && !gui.starting)
+- # else
+- if (!showit != !GTK_WIDGET_VISIBLE(widget) && !gui.starting)
+- # endif
+ {
+ if (showit)
+ gtk_widget_show(widget);
+--- 4742,4748 ----
+***************
+*** 5071,5081 ****
+ if (showit)
+ set_toolbar_style(GTK_TOOLBAR(gui.toolbar));
+
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (!showit != !gtk_widget_get_visible(widget))
+- # else
+- if (!showit != !GTK_WIDGET_VISIBLE(widget))
+- # endif
+ {
+ if (showit)
+ gtk_widget_show(widget);
+--- 4773,4779 ----
+***************
+*** 6336,6346 ****
+ {
+ GdkDisplay *display;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin))
+- #else
+- if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin))
+- #endif
+ display = gtk_widget_get_display(gui.mainwin);
+ else
+ display = gdk_display_get_default();
+--- 6034,6040 ----
+***************
+*** 6700,6710 ****
+ void
+ gui_mch_flush(void)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin))
+- #else
+- if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin))
+- #endif
+ gdk_display_flush(gtk_widget_get_display(gui.mainwin));
+ }
+
+--- 6394,6400 ----
+***************
+*** 7060,7070 ****
+
+ gui_mch_menu_hidden(menu, FALSE);
+ /* Be clever about bitfields versus true booleans here! */
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (!gtk_widget_get_sensitive(menu->id) == !grey)
+- # else
+- if (!GTK_WIDGET_SENSITIVE(menu->id) == !grey)
+- # endif
+ {
+ gtk_widget_set_sensitive(menu->id, !grey);
+ gui_mch_update();
+--- 6750,6756 ----
+***************
+*** 7082,7092 ****
+
+ if (hidden)
+ {
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (gtk_widget_get_visible(menu->id))
+- # else
+- if (GTK_WIDGET_VISIBLE(menu->id))
+- # endif
+ {
+ gtk_widget_hide(menu->id);
+ gui_mch_update();
+--- 6768,6774 ----
+***************
+*** 7094,7104 ****
+ }
+ else
+ {
+- # if GTK_CHECK_VERSION(3,0,0)
+ if (!gtk_widget_get_visible(menu->id))
+- # else
+- if (!GTK_WIDGET_VISIBLE(menu->id))
+- # endif
+ {
+ gtk_widget_show(menu->id);
+ gui_mch_update();
+--- 6776,6782 ----
+***************
+*** 7126,7140 ****
+ if (sb->id == NULL)
+ return;
+
+- #if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_visible(sb->id, flag);
+- #else
+- if (flag)
+- gtk_widget_show(sb->id);
+- else
+- gtk_widget_hide(sb->id);
+- #endif
+-
+ update_window_manager_hints(0, 0);
+ }
+
+--- 6804,6810 ----
+***************
+*** 7166,7176 ****
+ void
+ gui_mch_getmouse(int *x, int *y)
+ {
+- #if GTK_CHECK_VERSION(3,0,0)
+ gui_gtk_get_pointer(gui.drawarea, x, y, NULL);
+- #else
+- gdk_window_get_pointer(gui.drawarea->window, x, y, NULL);
+- #endif
+ }
+
+ void
+--- 6836,6842 ----
+*** ../vim-8.1.0404/src/vim.h 2018-09-16 15:47:45.629425398 +0200
+--- src/vim.h 2018-09-18 22:23:38.699477631 +0200
+***************
+*** 2330,2335 ****
+--- 2330,2384 ----
+ #ifdef FEAT_GUI_GTK
+ # if !GTK_CHECK_VERSION(2,14,0)
+ # define gtk_widget_get_window(wid) ((wid)->window)
++ # define gtk_plug_get_socket_window(wid) ((wid)->socket_window)
++ # define gtk_selection_data_get_data(sel) ((sel)->data)
++ # define gtk_selection_data_get_data_type(sel) ((sel)->type)
++ # define gtk_selection_data_get_format(sel) ((sel)->format)
++ # define gtk_selection_data_get_length(sel) ((sel)->length)
++ # define gtk_adjustment_set_lower(adj, low) \
++ do { (adj)->lower = low; } while (0)
++ # define gtk_adjustment_set_upper(adj, up) \
++ do { (adj)->upper = up; } while (0)
++ # define gtk_adjustment_set_page_size(adj, size) \
++ do { (adj)->page_size = size; } while (0)
++ # define gtk_adjustment_set_page_increment(adj, inc) \
++ do { (adj)->page_increment = inc; } while (0)
++ # define gtk_adjustment_set_step_increment(adj, inc) \
++ do { (adj)->step_increment = inc; } while (0)
++ # endif
++ # if !GTK_CHECK_VERSION(2,16,0)
++ # define gtk_selection_data_get_selection(sel) ((sel)->selection)
++ # endif
++ # if !GTK_CHECK_VERSION(2,18,0)
++ # define gtk_widget_get_allocation(wid, alloc) \
++ do { *(alloc) = (wid)->allocation; } while (0)
++ # define gtk_widget_set_allocation(wid, alloc) \
++ do { (wid)->allocation = *(alloc); } while (0)
++ # define gtk_widget_get_has_window(wid) !GTK_WIDGET_NO_WINDOW(wid)
++ # define gtk_widget_get_sensitive(wid) GTK_WIDGET_SENSITIVE(wid)
++ # define gtk_widget_get_visible(wid) GTK_WIDGET_VISIBLE(wid)
++ # define gtk_widget_has_focus(wid) GTK_WIDGET_HAS_FOCUS(wid)
++ # define gtk_widget_set_window(wid, win) \
++ do { (wid)->window = (win); } while (0)
++ # define gtk_widget_set_can_default(wid, can) \
++ do { if (can) { GTK_WIDGET_SET_FLAGS(wid, GTK_CAN_DEFAULT); } \
++ else { GTK_WIDGET_UNSET_FLAGS(wid, GTK_CAN_DEFAULT); } } while (0)
++ # define gtk_widget_set_can_focus(wid, can) \
++ do { if (can) { GTK_WIDGET_SET_FLAGS(wid, GTK_CAN_FOCUS); } \
++ else { GTK_WIDGET_UNSET_FLAGS(wid, GTK_CAN_FOCUS); } } while (0)
++ # define gtk_widget_set_visible(wid, vis) \
++ do { if (vis) { gtk_widget_show(wid); } \
++ else { gtk_widget_hide(wid); } } while (0)
++ # endif
++ # if !GTK_CHECK_VERSION(2,20,0)
++ # define gtk_widget_get_mapped(wid) GTK_WIDGET_MAPPED(wid)
++ # define gtk_widget_get_realized(wid) GTK_WIDGET_REALIZED(wid)
++ # define gtk_widget_set_mapped(wid, map) \
++ do { if (map) { GTK_WIDGET_SET_FLAGS(wid, GTK_MAPPED); } \
++ else { GTK_WIDGET_UNSET_FLAGS(wid, GTK_MAPPED); } } while (0)
++ # define gtk_widget_set_realized(wid, rea) \
++ do { if (rea) { GTK_WIDGET_SET_FLAGS(wid, GTK_REALIZED); } \
++ else { GTK_WIDGET_UNSET_FLAGS(wid, GTK_REALIZED); } } while (0)
+ # endif
+ #endif
+
+*** ../vim-8.1.0404/src/version.c 2018-09-18 21:51:42.423876797 +0200
+--- src/version.c 2018-09-18 22:24:58.906658670 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 405,
+ /**/
+
+--
+From "know your smileys":
+ y:-) Bad toupee
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0406 b/data/vim/patches/8.1.0406
new file mode 100644
index 000000000..3614d17f8
--- /dev/null
+++ b/data/vim/patches/8.1.0406
@@ -0,0 +1,125 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0406
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0406
+Problem: Several command line arguments are not tested.
+Solution: Add tests for -A, -F, -H, -p and -V. (Dominique Pelle,
+ closes #3446)
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.0405/src/testdir/test_startup.vim 2018-09-16 16:28:08.358268312 +0200
+--- src/testdir/test_startup.vim 2018-09-18 22:34:16.977798058 +0200
+***************
+*** 199,205 ****
+ " - both windows should have the same height
+ " - window height (+ 2 for the statusline and Ex command) should be equal
+ " to the number of lines
+! " - buffer of both windowns should have no name
+ let [wn, wh1, wh2, ln, ww1, ww2, cn, bn1, bn2] = readfile('Xtestout')
+ call assert_equal('2', wn)
+ call assert_inrange(0, 1, ww1 - ww2)
+--- 199,205 ----
+ " - both windows should have the same height
+ " - window height (+ 2 for the statusline and Ex command) should be equal
+ " to the number of lines
+! " - buffer of both windows should have no name
+ let [wn, wh1, wh2, ln, ww1, ww2, cn, bn1, bn2] = readfile('Xtestout')
+ call assert_equal('2', wn)
+ call assert_inrange(0, 1, ww1 - ww2)
+***************
+*** 223,228 ****
+--- 223,291 ----
+ endif
+
+ call delete('Xtestout')
++ endfunc
++
++ " Test the -p[N] argument to open N tabpages.
++ func Test_p_arg()
++ let after = [
++ \ 'call writefile(split(execute("tabs"), "\n"), "Xtestout")',
++ \ 'qall',
++ \ ]
++ if RunVim([], after, '-p2')
++ let lines = readfile('Xtestout')
++ call assert_equal(4, len(lines))
++ call assert_equal('Tab page 1', lines[0])
++ call assert_equal('> [No Name]', lines[1])
++ call assert_equal('Tab page 2', lines[2])
++ call assert_equal(' [No Name]', lines[3])
++ endif
++
++ if RunVim([], after, '-p foo bar')
++ let lines = readfile('Xtestout')
++ call assert_equal(4, len(lines))
++ call assert_equal('Tab page 1', lines[0])
++ call assert_equal('> foo', lines[1])
++ call assert_equal('Tab page 2', lines[2])
++ call assert_equal(' bar', lines[3])
++ endif
++
++ call delete('Xtestout')
++ endfunc
++
++ " Test the -V[N] argument to set the 'version' option to [N]
++ func Test_V_arg()
++ let out = system(GetVimCommand() . ' --clean -es -X -V0 -c "set verbose?" -cq')
++ call assert_equal(" verbose=0\n", out)
++
++ let out = system(GetVimCommand() . ' --clean -es -X -V2 -c "set verbose?" -cq')
++ call assert_match("^sourcing \"$VIMRUNTIME/defaults\.vim\"\r\nSearching for \"filetype\.vim\".*\n verbose=2\n$", out)
++
++ let out = system(GetVimCommand() . ' --clean -es -X -V15 -c "set verbose?" -cq')
++ call assert_match("\+*\nsourcing \"$VIMRUNTIME/defaults\.vim\"\r\nline 1: \" The default vimrc file\..*\n verbose=15\n\+*", out)
++ endfunc
++
++ " Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes).
++ func Test_A_F_H_arg()
++ let after = [
++ \ 'call writefile([&rightleft, &arabic, &fkmap, &hkmap], "Xtestout")',
++ \ 'qall',
++ \ ]
++ if has('arabic') && RunVim([], after, '-A')
++ let lines = readfile('Xtestout')
++ call assert_equal(['1', '1', '0', '0'], lines)
++ endif
++
++ if has('farsi') && RunVim([], after, '-F')
++ let lines = readfile('Xtestout')
++ call assert_equal(['1', '0', '1', '0'], lines)
++ endif
++
++ if has('rightleft') && RunVim([], after, '-H')
++ let lines = readfile('Xtestout')
++ call assert_equal(['1', '0', '0', '1'], lines)
++ endif
++
++ call delete('Xtestout')
+ endfunc
+
+ func Test_file_args()
+*** ../vim-8.1.0405/src/version.c 2018-09-18 22:29:59.888041388 +0200
+--- src/version.c 2018-09-18 22:35:58.352883122 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 406,
+ /**/
+
+--
+From "know your smileys":
+ :----} You lie like Pinocchio
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0407 b/data/vim/patches/8.1.0407
new file mode 100644
index 000000000..aef42ebe7
--- /dev/null
+++ b/data/vim/patches/8.1.0407
@@ -0,0 +1,1253 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0407
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0407
+Problem: Quickfix code mixes using the stack and a list pointer.
+Solution: Use a list pointer in more places. (Yegappan Lakshmanan,
+ closes #3443)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0406/src/quickfix.c 2018-09-02 15:18:38.910627833 +0200
+--- src/quickfix.c 2018-09-18 22:47:16.706525861 +0200
+***************
+*** 136,153 ****
+
+ static void qf_new_list(qf_info_T *qi, char_u *qf_title);
+ static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, char_u *module, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
+! static void qf_free(qf_info_T *qi, int idx);
+ static char_u *qf_types(int, int);
+ static int qf_get_fnum(qf_info_T *qi, int qf_idx, char_u *, char_u *);
+ static char_u *qf_push_dir(char_u *, struct dir_stack_T **, int is_file_stack);
+ static char_u *qf_pop_dir(struct dir_stack_T **);
+! static char_u *qf_guess_filepath(qf_info_T *qi, int qf_idx, char_u *);
+ static void qf_fmt_text(char_u *text, char_u *buf, int bufsize);
+ static int qf_win_pos_update(qf_info_T *qi, int old_qf_index);
+ static win_T *qf_find_win(qf_info_T *qi);
+ static buf_T *qf_find_buf(qf_info_T *qi);
+ static void qf_update_buffer(qf_info_T *qi, qfline_T *old_last);
+- static void qf_set_title_var(qf_info_T *qi);
+ static void qf_fill_buffer(qf_info_T *qi, buf_T *buf, qfline_T *old_last);
+ static char_u *get_mef_name(void);
+ static buf_T *load_dummy_buffer(char_u *fname, char_u *dirname_start, char_u *resulting_dir);
+--- 136,152 ----
+
+ static void qf_new_list(qf_info_T *qi, char_u *qf_title);
+ static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, char_u *module, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
+! static void qf_free(qf_list_T *qfl);
+ static char_u *qf_types(int, int);
+ static int qf_get_fnum(qf_info_T *qi, int qf_idx, char_u *, char_u *);
+ static char_u *qf_push_dir(char_u *, struct dir_stack_T **, int is_file_stack);
+ static char_u *qf_pop_dir(struct dir_stack_T **);
+! static char_u *qf_guess_filepath(qf_list_T *qfl, char_u *);
+ static void qf_fmt_text(char_u *text, char_u *buf, int bufsize);
+ static int qf_win_pos_update(qf_info_T *qi, int old_qf_index);
+ static win_T *qf_find_win(qf_info_T *qi);
+ static buf_T *qf_find_buf(qf_info_T *qi);
+ static void qf_update_buffer(qf_info_T *qi, qfline_T *old_last);
+ static void qf_fill_buffer(qf_info_T *qi, buf_T *buf, qfline_T *old_last);
+ static char_u *get_mef_name(void);
+ static buf_T *load_dummy_buffer(char_u *fname, char_u *dirname_start, char_u *resulting_dir);
+***************
+*** 1757,1763 ****
+ if (!adding)
+ {
+ /* Error when creating a new list. Free the new list */
+! qf_free(qi, qi->qf_curlist);
+ qi->qf_listcount--;
+ if (qi->qf_curlist > 0)
+ --qi->qf_curlist;
+--- 1756,1762 ----
+ if (!adding)
+ {
+ /* Error when creating a new list. Free the new list */
+! qf_free(&qi->qf_lists[qi->qf_curlist]);
+ qi->qf_listcount--;
+ if (qi->qf_curlist > 0)
+ --qi->qf_curlist;
+***************
+*** 1802,1816 ****
+ * Prepends ':' to the title.
+ */
+ static void
+! qf_store_title(qf_info_T *qi, int qf_idx, char_u *title)
+ {
+! VIM_CLEAR(qi->qf_lists[qf_idx].qf_title);
+
+ if (title != NULL)
+ {
+ char_u *p = alloc((int)STRLEN(title) + 2);
+
+! qi->qf_lists[qf_idx].qf_title = p;
+ if (p != NULL)
+ STRCPY(p, title);
+ }
+--- 1801,1815 ----
+ * Prepends ':' to the title.
+ */
+ static void
+! qf_store_title(qf_list_T *qfl, char_u *title)
+ {
+! VIM_CLEAR(qfl->qf_title);
+
+ if (title != NULL)
+ {
+ char_u *p = alloc((int)STRLEN(title) + 2);
+
+! qfl->qf_title = p;
+ if (p != NULL)
+ STRCPY(p, title);
+ }
+***************
+*** 1847,1853 ****
+ * way with ":grep'.
+ */
+ while (qi->qf_listcount > qi->qf_curlist + 1)
+! qf_free(qi, --qi->qf_listcount);
+
+ /*
+ * When the stack is full, remove to oldest entry
+--- 1846,1852 ----
+ * way with ":grep'.
+ */
+ while (qi->qf_listcount > qi->qf_curlist + 1)
+! qf_free(&qi->qf_lists[--qi->qf_listcount]);
+
+ /*
+ * When the stack is full, remove to oldest entry
+***************
+*** 1855,1861 ****
+ */
+ if (qi->qf_listcount == LISTCOUNT)
+ {
+! qf_free(qi, 0);
+ for (i = 1; i < LISTCOUNT; ++i)
+ qi->qf_lists[i - 1] = qi->qf_lists[i];
+ qi->qf_curlist = LISTCOUNT - 1;
+--- 1854,1860 ----
+ */
+ if (qi->qf_listcount == LISTCOUNT)
+ {
+! qf_free(&qi->qf_lists[0]);
+ for (i = 1; i < LISTCOUNT; ++i)
+ qi->qf_lists[i - 1] = qi->qf_lists[i];
+ qi->qf_curlist = LISTCOUNT - 1;
+***************
+*** 1863,1874 ****
+ else
+ qi->qf_curlist = qi->qf_listcount++;
+ vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
+! qf_store_title(qi, qi->qf_curlist, qf_title);
+ qi->qf_lists[qi->qf_curlist].qf_id = ++last_qf_id;
+ }
+
+ /*
+! * Free a location list
+ */
+ static void
+ ll_free_all(qf_info_T **pqi)
+--- 1862,1873 ----
+ else
+ qi->qf_curlist = qi->qf_listcount++;
+ vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
+! qf_store_title(&qi->qf_lists[qi->qf_curlist], qf_title);
+ qi->qf_lists[qi->qf_curlist].qf_id = ++last_qf_id;
+ }
+
+ /*
+! * Free a location list stack
+ */
+ static void
+ ll_free_all(qf_info_T **pqi)
+***************
+*** 1886,1892 ****
+ {
+ /* No references to this location list */
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(qi, i);
+ vim_free(qi);
+ }
+ }
+--- 1885,1891 ----
+ {
+ /* No references to this location list */
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+ vim_free(qi);
+ }
+ }
+***************
+*** 1909,1915 ****
+ else
+ /* quickfix list */
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(qi, i);
+ }
+
+ /*
+--- 1908,1914 ----
+ else
+ /* quickfix list */
+ for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+ }
+
+ /*
+***************
+*** 1933,1938 ****
+--- 1932,1938 ----
+ int type, /* type character */
+ int valid) /* valid entry */
+ {
++ qf_list_T *qfl = &qi->qf_lists[qf_idx];
+ qfline_T *qfp;
+ qfline_T **lastp; /* pointer to qf_last or NULL */
+
+***************
+*** 1980,1991 ****
+ qfp->qf_type = type;
+ qfp->qf_valid = valid;
+
+! lastp = &qi->qf_lists[qf_idx].qf_last;
+ if (qf_list_empty(qi, qf_idx)) /* first element in the list */
+ {
+! qi->qf_lists[qf_idx].qf_start = qfp;
+! qi->qf_lists[qf_idx].qf_ptr = qfp;
+! qi->qf_lists[qf_idx].qf_index = 0;
+ qfp->qf_prev = NULL;
+ }
+ else
+--- 1980,1991 ----
+ qfp->qf_type = type;
+ qfp->qf_valid = valid;
+
+! lastp = &qfl->qf_last;
+ if (qf_list_empty(qi, qf_idx)) /* first element in the list */
+ {
+! qfl->qf_start = qfp;
+! qfl->qf_ptr = qfp;
+! qfl->qf_index = 0;
+ qfp->qf_prev = NULL;
+ }
+ else
+***************
+*** 1996,2015 ****
+ qfp->qf_next = NULL;
+ qfp->qf_cleared = FALSE;
+ *lastp = qfp;
+! ++qi->qf_lists[qf_idx].qf_count;
+! if (qi->qf_lists[qf_idx].qf_index == 0 && qfp->qf_valid)
+ /* first valid entry */
+ {
+! qi->qf_lists[qf_idx].qf_index =
+! qi->qf_lists[qf_idx].qf_count;
+! qi->qf_lists[qf_idx].qf_ptr = qfp;
+ }
+
+ return OK;
+ }
+
+ /*
+! * Allocate a new location list
+ */
+ static qf_info_T *
+ ll_new_list(void)
+--- 1996,2014 ----
+ qfp->qf_next = NULL;
+ qfp->qf_cleared = FALSE;
+ *lastp = qfp;
+! ++qfl->qf_count;
+! if (qfl->qf_index == 0 && qfp->qf_valid)
+ /* first valid entry */
+ {
+! qfl->qf_index = qfl->qf_count;
+! qfl->qf_ptr = qfp;
+ }
+
+ return OK;
+ }
+
+ /*
+! * Allocate a new location list stack
+ */
+ static qf_info_T *
+ ll_new_list(void)
+***************
+*** 2023,2030 ****
+ }
+
+ /*
+! * Return the location list for window 'wp'.
+! * If not present, allocate a location list
+ */
+ static qf_info_T *
+ ll_get_or_alloc_list(win_T *wp)
+--- 2022,2029 ----
+ }
+
+ /*
+! * Return the location list stack for window 'wp'.
+! * If not present, allocate a location list stack
+ */
+ static qf_info_T *
+ ll_get_or_alloc_list(win_T *wp)
+***************
+*** 2197,2203 ****
+ if (mch_getperm(ptr) < 0)
+ {
+ vim_free(ptr);
+! directory = qf_guess_filepath(qi, qf_idx, fname);
+ if (directory)
+ ptr = concat_fnames(directory, fname, TRUE);
+ else
+--- 2196,2202 ----
+ if (mch_getperm(ptr) < 0)
+ {
+ vim_free(ptr);
+! directory = qf_guess_filepath(&qi->qf_lists[qf_idx], fname);
+ if (directory)
+ ptr = concat_fnames(directory, fname, TRUE);
+ else
+***************
+*** 2365,2376 ****
+ * qf_guess_filepath will return NULL.
+ */
+ static char_u *
+! qf_guess_filepath(qf_info_T *qi, int qf_idx, char_u *filename)
+ {
+ struct dir_stack_T *ds_ptr;
+ struct dir_stack_T *ds_tmp;
+ char_u *fullname;
+- qf_list_T *qfl = &qi->qf_lists[qf_idx];
+
+ /* no dirs on the stack - there's nothing we can do */
+ if (qfl->qf_dir_stack == NULL)
+--- 2364,2374 ----
+ * qf_guess_filepath will return NULL.
+ */
+ static char_u *
+! qf_guess_filepath(qf_list_T *qfl, char_u *filename)
+ {
+ struct dir_stack_T *ds_ptr;
+ struct dir_stack_T *ds_tmp;
+ char_u *fullname;
+
+ /* no dirs on the stack - there's nothing we can do */
+ if (qfl->qf_dir_stack == NULL)
+***************
+*** 2436,2449 ****
+ * Similar to location list.
+ */
+ static int
+! is_qf_entry_present(qf_info_T *qi, qfline_T *qf_ptr)
+ {
+- qf_list_T *qfl;
+ qfline_T *qfp;
+ int i;
+
+- qfl = &qi->qf_lists[qi->qf_curlist];
+-
+ /* Search for the entry in the current list */
+ for (i = 0, qfp = qfl->qf_start; i < qfl->qf_count;
+ ++i, qfp = qfp->qf_next)
+--- 2434,2444 ----
+ * Similar to location list.
+ */
+ static int
+! is_qf_entry_present(qf_list_T *qfl, qfline_T *qf_ptr)
+ {
+ qfline_T *qfp;
+ int i;
+
+ /* Search for the entry in the current list */
+ for (i = 0, qfp = qfl->qf_start; i < qfl->qf_count;
+ ++i, qfp = qfp->qf_next)
+***************
+*** 2462,2468 ****
+ */
+ static qfline_T *
+ get_next_valid_entry(
+! qf_info_T *qi,
+ qfline_T *qf_ptr,
+ int *qf_index,
+ int dir)
+--- 2457,2463 ----
+ */
+ static qfline_T *
+ get_next_valid_entry(
+! qf_list_T *qfl,
+ qfline_T *qf_ptr,
+ int *qf_index,
+ int dir)
+***************
+*** 2475,2487 ****
+
+ do
+ {
+! if (idx == qi->qf_lists[qi->qf_curlist].qf_count
+! || qf_ptr->qf_next == NULL)
+ return NULL;
+ ++idx;
+ qf_ptr = qf_ptr->qf_next;
+! } while ((!qi->qf_lists[qi->qf_curlist].qf_nonevalid
+! && !qf_ptr->qf_valid)
+ || (dir == FORWARD_FILE && qf_ptr->qf_fnum == old_qf_fnum));
+
+ *qf_index = idx;
+--- 2470,2480 ----
+
+ do
+ {
+! if (idx == qfl->qf_count || qf_ptr->qf_next == NULL)
+ return NULL;
+ ++idx;
+ qf_ptr = qf_ptr->qf_next;
+! } while ((!qfl->qf_nonevalid && !qf_ptr->qf_valid)
+ || (dir == FORWARD_FILE && qf_ptr->qf_fnum == old_qf_fnum));
+
+ *qf_index = idx;
+***************
+*** 2494,2500 ****
+ */
+ static qfline_T *
+ get_prev_valid_entry(
+! qf_info_T *qi,
+ qfline_T *qf_ptr,
+ int *qf_index,
+ int dir)
+--- 2487,2493 ----
+ */
+ static qfline_T *
+ get_prev_valid_entry(
+! qf_list_T *qfl,
+ qfline_T *qf_ptr,
+ int *qf_index,
+ int dir)
+***************
+*** 2511,2518 ****
+ return NULL;
+ --idx;
+ qf_ptr = qf_ptr->qf_prev;
+! } while ((!qi->qf_lists[qi->qf_curlist].qf_nonevalid
+! && !qf_ptr->qf_valid)
+ || (dir == BACKWARD_FILE && qf_ptr->qf_fnum == old_qf_fnum));
+
+ *qf_index = idx;
+--- 2504,2510 ----
+ return NULL;
+ --idx;
+ qf_ptr = qf_ptr->qf_prev;
+! } while ((!qfl->qf_nonevalid && !qf_ptr->qf_valid)
+ || (dir == BACKWARD_FILE && qf_ptr->qf_fnum == old_qf_fnum));
+
+ *qf_index = idx;
+***************
+*** 2527,2533 ****
+ */
+ static qfline_T *
+ get_nth_valid_entry(
+! qf_info_T *qi,
+ int errornr,
+ qfline_T *qf_ptr,
+ int *qf_index,
+--- 2519,2525 ----
+ */
+ static qfline_T *
+ get_nth_valid_entry(
+! qf_list_T *qfl,
+ int errornr,
+ qfline_T *qf_ptr,
+ int *qf_index,
+***************
+*** 2544,2552 ****
+ prev_index = *qf_index;
+
+ if (dir == FORWARD || dir == FORWARD_FILE)
+! qf_ptr = get_next_valid_entry(qi, qf_ptr, qf_index, dir);
+ else
+! qf_ptr = get_prev_valid_entry(qi, qf_ptr, qf_index, dir);
+ if (qf_ptr == NULL)
+ {
+ qf_ptr = prev_qf_ptr;
+--- 2536,2544 ----
+ prev_index = *qf_index;
+
+ if (dir == FORWARD || dir == FORWARD_FILE)
+! qf_ptr = get_next_valid_entry(qfl, qf_ptr, qf_index, dir);
+ else
+! qf_ptr = get_prev_valid_entry(qfl, qf_ptr, qf_index, dir);
+ if (qf_ptr == NULL)
+ {
+ qf_ptr = prev_qf_ptr;
+***************
+*** 2570,2576 ****
+ */
+ static qfline_T *
+ get_nth_entry(
+! qf_info_T *qi,
+ int errornr,
+ qfline_T *qf_ptr,
+ int *cur_qfidx)
+--- 2562,2568 ----
+ */
+ static qfline_T *
+ get_nth_entry(
+! qf_list_T *qfl,
+ int errornr,
+ qfline_T *qf_ptr,
+ int *cur_qfidx)
+***************
+*** 2584,2592 ****
+ qf_ptr = qf_ptr->qf_prev;
+ }
+ /* New error number is greater than the current error number */
+! while (errornr > qf_idx &&
+! qf_idx < qi->qf_lists[qi->qf_curlist].qf_count &&
+! qf_ptr->qf_next != NULL)
+ {
+ ++qf_idx;
+ qf_ptr = qf_ptr->qf_next;
+--- 2576,2583 ----
+ qf_ptr = qf_ptr->qf_prev;
+ }
+ /* New error number is greater than the current error number */
+! while (errornr > qf_idx && qf_idx < qfl->qf_count &&
+! qf_ptr->qf_next != NULL)
+ {
+ ++qf_idx;
+ qf_ptr = qf_ptr->qf_next;
+***************
+*** 2784,2792 ****
+ }
+
+ /*
+! * Go to a window that shows the specified file. If a window is not found, go
+! * to the window just above the quickfix window. This is used for opening a
+! * file from a quickfix window and not from a location window.
+ */
+ static void
+ qf_goto_win_with_qfl_file(int qf_fnum)
+--- 2775,2784 ----
+ }
+
+ /*
+! * Go to a window that contains the specified buffer 'qf_fnum'. If a window is
+! * not found, then go to the window just above the quickfix window. This is
+! * used for opening a file from a quickfix window and not from a location
+! * window.
+ */
+ static void
+ qf_goto_win_with_qfl_file(int qf_fnum)
+***************
+*** 2899,2904 ****
+--- 2891,2897 ----
+ int *opened_window,
+ int *abort)
+ {
++ qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+ int retval = OK;
+
+ if (qf_ptr->qf_type == 1)
+***************
+*** 2918,2924 ****
+ else
+ {
+ int old_qf_curlist = qi->qf_curlist;
+! int save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+
+ retval = buflist_getfile(qf_ptr->qf_fnum,
+ (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+--- 2911,2917 ----
+ else
+ {
+ int old_qf_curlist = qi->qf_curlist;
+! int save_qfid = qfl->qf_id;
+
+ retval = buflist_getfile(qf_ptr->qf_fnum,
+ (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+***************
+*** 2942,2948 ****
+ }
+ }
+ else if (old_qf_curlist != qi->qf_curlist
+! || !is_qf_entry_present(qi, qf_ptr))
+ {
+ if (IS_QF_STACK(qi))
+ EMSG(_("E925: Current quickfix was changed"));
+--- 2935,2941 ----
+ }
+ }
+ else if (old_qf_curlist != qi->qf_curlist
+! || !is_qf_entry_present(qfl, qf_ptr))
+ {
+ if (IS_QF_STACK(qi))
+ EMSG(_("E925: Current quickfix was changed"));
+***************
+*** 3087,3092 ****
+--- 3080,3086 ----
+ int errornr,
+ int forceit)
+ {
++ qf_list_T *qfl;
+ qfline_T *qf_ptr;
+ qfline_T *old_qf_ptr;
+ int qf_index;
+***************
+*** 3113,3125 ****
+ return;
+ }
+
+! qf_ptr = qi->qf_lists[qi->qf_curlist].qf_ptr;
+ old_qf_ptr = qf_ptr;
+! qf_index = qi->qf_lists[qi->qf_curlist].qf_index;
+ old_qf_index = qf_index;
+ if (dir != 0) /* next/prev valid entry */
+ {
+! qf_ptr = get_nth_valid_entry(qi, errornr, qf_ptr, &qf_index, dir);
+ if (qf_ptr == NULL)
+ {
+ qf_ptr = old_qf_ptr;
+--- 3107,3121 ----
+ return;
+ }
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+!
+! qf_ptr = qfl->qf_ptr;
+ old_qf_ptr = qf_ptr;
+! qf_index = qfl->qf_index;
+ old_qf_index = qf_index;
+ if (dir != 0) /* next/prev valid entry */
+ {
+! qf_ptr = get_nth_valid_entry(qfl, errornr, qf_ptr, &qf_index, dir);
+ if (qf_ptr == NULL)
+ {
+ qf_ptr = old_qf_ptr;
+***************
+*** 3128,3136 ****
+ }
+ }
+ else if (errornr != 0) /* go to specified number */
+! qf_ptr = get_nth_entry(qi, errornr, qf_ptr, &qf_index);
+
+! qi->qf_lists[qi->qf_curlist].qf_index = qf_index;
+ if (qf_win_pos_update(qi, old_qf_index))
+ /* No need to print the error message if it's visible in the error
+ * window */
+--- 3124,3132 ----
+ }
+ }
+ else if (errornr != 0) /* go to specified number */
+! qf_ptr = get_nth_entry(qfl, errornr, qf_ptr, &qf_index);
+
+! qfl->qf_index = qf_index;
+ if (qf_win_pos_update(qi, old_qf_index))
+ /* No need to print the error message if it's visible in the error
+ * window */
+***************
+*** 3215,3222 ****
+ theend:
+ if (qi != NULL)
+ {
+! qi->qf_lists[qi->qf_curlist].qf_ptr = qf_ptr;
+! qi->qf_lists[qi->qf_curlist].qf_index = qf_index;
+ }
+ if (p_swb != old_swb && opened_window)
+ {
+--- 3211,3218 ----
+ theend:
+ if (qi != NULL)
+ {
+! qfl->qf_ptr = qf_ptr;
+! qfl->qf_index = qf_index;
+ }
+ if (p_swb != old_swb && opened_window)
+ {
+***************
+*** 3242,3250 ****
+ /*
+ * Display information about a single entry from the quickfix/location list.
+ * Used by ":clist/:llist" commands.
+ */
+ static void
+! qf_list_entry(qf_info_T *qi, qfline_T *qfp, int qf_idx)
+ {
+ char_u *fname;
+ buf_T *buf;
+--- 3238,3248 ----
+ /*
+ * Display information about a single entry from the quickfix/location list.
+ * Used by ":clist/:llist" commands.
++ * 'cursel' will be set to TRUE for the currently selected entry in the
++ * quickfix list.
+ */
+ static void
+! qf_list_entry(qfline_T *qfp, int qf_idx, int cursel)
+ {
+ char_u *fname;
+ buf_T *buf;
+***************
+*** 3285,3292 ****
+ return;
+
+ msg_putchar('\n');
+! msg_outtrans_attr(IObuff, qf_idx == qi->qf_lists[qi->qf_curlist].qf_index
+! ? HL_ATTR(HLF_QFL) : qfFileAttr);
+
+ if (qfp->qf_lnum != 0)
+ msg_puts_attr((char_u *)":", qfSepAttr);
+--- 3283,3289 ----
+ return;
+
+ msg_putchar('\n');
+! msg_outtrans_attr(IObuff, cursel ? HL_ATTR(HLF_QFL) : qfFileAttr);
+
+ if (qfp->qf_lnum != 0)
+ msg_puts_attr((char_u *)":", qfSepAttr);
+***************
+*** 3326,3331 ****
+--- 3323,3329 ----
+ void
+ qf_list(exarg_T *eap)
+ {
++ qf_list_T *qfl;
+ qfline_T *qfp;
+ int i;
+ int idx1 = 1;
+***************
+*** 3362,3376 ****
+ EMSG(_(e_trailing));
+ return;
+ }
+ if (plus)
+ {
+! i = qi->qf_lists[qi->qf_curlist].qf_index;
+ idx2 = i + idx1;
+ idx1 = i;
+ }
+ else
+ {
+! i = qi->qf_lists[qi->qf_curlist].qf_count;
+ if (idx1 < 0)
+ idx1 = (-idx1 > i) ? 0 : idx1 + i + 1;
+ if (idx2 < 0)
+--- 3360,3375 ----
+ EMSG(_(e_trailing));
+ return;
+ }
++ qfl = &qi->qf_lists[qi->qf_curlist];
+ if (plus)
+ {
+! i = qfl->qf_index;
+ idx2 = i + idx1;
+ idx1 = i;
+ }
+ else
+ {
+! i = qfl->qf_count;
+ if (idx1 < 0)
+ idx1 = (-idx1 > i) ? 0 : idx1 + i + 1;
+ if (idx2 < 0)
+***************
+*** 3394,3410 ****
+ if (qfLineAttr == 0)
+ qfLineAttr = HL_ATTR(HLF_N);
+
+! if (qi->qf_lists[qi->qf_curlist].qf_nonevalid)
+ all = TRUE;
+! qfp = qi->qf_lists[qi->qf_curlist].qf_start;
+! for (i = 1; !got_int && i <= qi->qf_lists[qi->qf_curlist].qf_count; )
+ {
+ if ((qfp->qf_valid || all) && idx1 <= i && i <= idx2)
+ {
+ if (got_int)
+ break;
+
+! qf_list_entry(qi, qfp, i);
+ }
+
+ qfp = qfp->qf_next;
+--- 3393,3409 ----
+ if (qfLineAttr == 0)
+ qfLineAttr = HL_ATTR(HLF_N);
+
+! if (qfl->qf_nonevalid)
+ all = TRUE;
+! qfp = qfl->qf_start;
+! for (i = 1; !got_int && i <= qfl->qf_count; )
+ {
+ if ((qfp->qf_valid || all) && idx1 <= i && i <= idx2)
+ {
+ if (got_int)
+ break;
+
+! qf_list_entry(qfp, i, i == qfl->qf_index);
+ }
+
+ qfp = qfp->qf_next;
+***************
+*** 3547,3558 ****
+ * associated with the list like context and title are not freed.
+ */
+ static void
+! qf_free_items(qf_info_T *qi, int idx)
+ {
+ qfline_T *qfp;
+ qfline_T *qfpnext;
+ int stop = FALSE;
+- qf_list_T *qfl = &qi->qf_lists[idx];
+
+ while (qfl->qf_count && qfl->qf_start != NULL)
+ {
+--- 3546,3556 ----
+ * associated with the list like context and title are not freed.
+ */
+ static void
+! qf_free_items(qf_list_T *qfl)
+ {
+ qfline_T *qfp;
+ qfline_T *qfpnext;
+ int stop = FALSE;
+
+ while (qfl->qf_count && qfl->qf_start != NULL)
+ {
+***************
+*** 3595,3605 ****
+ * associated context information and the title.
+ */
+ static void
+! qf_free(qf_info_T *qi, int idx)
+ {
+! qf_list_T *qfl = &qi->qf_lists[idx];
+!
+! qf_free_items(qi, idx);
+
+ VIM_CLEAR(qfl->qf_title);
+ free_tv(qfl->qf_ctx);
+--- 3593,3601 ----
+ * associated context information and the title.
+ */
+ static void
+! qf_free(qf_list_T *qfl)
+ {
+! qf_free_items(qfl);
+
+ VIM_CLEAR(qfl->qf_title);
+ free_tv(qfl->qf_ctx);
+***************
+*** 3801,3806 ****
+--- 3797,3812 ----
+ }
+
+ /*
++ * Set "w:quickfix_title" if "qi" has a title.
++ */
++ static void
++ qf_set_title_var(qf_list_T *qfl)
++ {
++ if (qfl->qf_title != NULL)
++ set_internal_string_var((char_u *)"w:quickfix_title", qfl->qf_title);
++ }
++
++ /*
+ * ":copen": open a window that shows the list of errors.
+ * ":lopen": open a window that shows the location list.
+ */
+***************
+*** 3919,3925 ****
+ prevwin = win;
+ }
+
+! qf_set_title_var(qi);
+
+ /*
+ * Fill the buffer with the quickfix list.
+--- 3925,3931 ----
+ prevwin = win;
+ }
+
+! qf_set_title_var(&qi->qf_lists[qi->qf_curlist]);
+
+ /*
+ * Fill the buffer with the quickfix list.
+***************
+*** 4033,4039 ****
+
+ /*
+ * Check whether the given window is displaying the specified quickfix/location
+! * list buffer
+ */
+ static int
+ is_qf_win(win_T *win, qf_info_T *qi)
+--- 4039,4045 ----
+
+ /*
+ * Check whether the given window is displaying the specified quickfix/location
+! * stack.
+ */
+ static int
+ is_qf_win(win_T *win, qf_info_T *qi)
+***************
+*** 4053,4059 ****
+ }
+
+ /*
+! * Find a window displaying the quickfix/location list 'qi'
+ * Only searches in the current tabpage.
+ */
+ static win_T *
+--- 4059,4065 ----
+ }
+
+ /*
+! * Find a window displaying the quickfix/location stack 'qi'
+ * Only searches in the current tabpage.
+ */
+ static win_T *
+***************
+*** 4097,4103 ****
+ {
+ curwin_save = curwin;
+ curwin = win;
+! qf_set_title_var(qi);
+ curwin = curwin_save;
+ }
+ }
+--- 4103,4109 ----
+ {
+ curwin_save = curwin;
+ curwin = win;
+! qf_set_title_var(&qi->qf_lists[qi->qf_curlist]);
+ curwin = curwin_save;
+ }
+ }
+***************
+*** 4143,4159 ****
+ }
+
+ /*
+- * Set "w:quickfix_title" if "qi" has a title.
+- */
+- static void
+- qf_set_title_var(qf_info_T *qi)
+- {
+- if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
+- set_internal_string_var((char_u *)"w:quickfix_title",
+- qi->qf_lists[qi->qf_curlist].qf_title);
+- }
+-
+- /*
+ * Add an error line to the quickfix buffer.
+ */
+ static int
+--- 4149,4154 ----
+***************
+*** 4679,4687 ****
+ * For :cfdo and :lfdo returns the 'n'th valid file entry.
+ */
+ static int
+! qf_get_nth_valid_entry(qf_info_T *qi, int n, int fdo)
+ {
+- qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+ qfline_T *qfp = qfl->qf_start;
+ int i, eidx;
+ int prev_fnum = 0;
+--- 4674,4681 ----
+ * For :cfdo and :lfdo returns the 'n'th valid file entry.
+ */
+ static int
+! qf_get_nth_valid_entry(qf_list_T *qfl, int n, int fdo)
+ {
+ qfline_T *qfp = qfl->qf_start;
+ int i, eidx;
+ int prev_fnum = 0;
+***************
+*** 4762,4768 ****
+ */
+ if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
+ || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
+! errornr = qf_get_nth_valid_entry(qi,
+ eap->addr_count > 0 ? (int)eap->line1 : 1,
+ eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo);
+
+--- 4756,4762 ----
+ */
+ if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
+ || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
+! errornr = qf_get_nth_valid_entry(&qi->qf_lists[qi->qf_curlist],
+ eap->addr_count > 0 ? (int)eap->line1 : 1,
+ eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo);
+
+***************
+*** 5712,5718 ****
+ TRUE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0)
+ {
+ (void)get_errorlist(qi, NULL, 0, l);
+! qf_free(qi, 0);
+ }
+ free(qi);
+ }
+--- 5706,5712 ----
+ TRUE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0)
+ {
+ (void)get_errorlist(qi, NULL, 0, l);
+! qf_free(&qi->qf_lists[0]);
+ }
+ free(qi);
+ }
+***************
+*** 5983,5988 ****
+--- 5977,5983 ----
+ qf_get_properties(win_T *wp, dict_T *what, dict_T *retdict)
+ {
+ qf_info_T *qi = &ql_info;
++ qf_list_T *qfl;
+ int status = OK;
+ int qf_idx;
+ dictitem_T *di;
+***************
+*** 6003,6008 ****
+--- 5998,6005 ----
+ if (qi == NULL || qi->qf_listcount == 0 || qf_idx == INVALID_QFIDX)
+ return qf_getprop_defaults(qi, flags, retdict);
+
++ qfl = &qi->qf_lists[qf_idx];
++
+ if (flags & QF_GETLIST_TITLE)
+ status = qf_getprop_title(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_NR))
+***************
+*** 6014,6028 ****
+ if ((status == OK) && (flags & QF_GETLIST_CONTEXT))
+ status = qf_getprop_ctx(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_ID))
+! status = dict_add_number(retdict, "id", qi->qf_lists[qf_idx].qf_id);
+ if ((status == OK) && (flags & QF_GETLIST_IDX))
+ status = qf_getprop_idx(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_SIZE))
+! status = dict_add_number(retdict, "size",
+! qi->qf_lists[qf_idx].qf_count);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+! status = dict_add_number(retdict, "changedtick",
+! qi->qf_lists[qf_idx].qf_changedtick);
+ if ((status == OK) && (wp != NULL) && (flags & QF_GETLIST_FILEWINID))
+ status = qf_getprop_filewinid(wp, qi, retdict);
+
+--- 6011,6023 ----
+ if ((status == OK) && (flags & QF_GETLIST_CONTEXT))
+ status = qf_getprop_ctx(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_ID))
+! status = dict_add_number(retdict, "id", qfl->qf_id);
+ if ((status == OK) && (flags & QF_GETLIST_IDX))
+ status = qf_getprop_idx(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_SIZE))
+! status = dict_add_number(retdict, "size", qfl->qf_count);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+! status = dict_add_number(retdict, "changedtick", qfl->qf_changedtick);
+ if ((status == OK) && (wp != NULL) && (flags & QF_GETLIST_FILEWINID))
+ status = qf_getprop_filewinid(wp, qi, retdict);
+
+***************
+*** 6118,6123 ****
+--- 6113,6119 ----
+ char_u *title,
+ int action)
+ {
++ qf_list_T *qfl = &qi->qf_lists[qf_idx];
+ listitem_T *li;
+ dict_T *d;
+ qfline_T *old_last = NULL;
+***************
+*** 6128,6141 ****
+ /* make place for a new list */
+ qf_new_list(qi, title);
+ qf_idx = qi->qf_curlist;
+ }
+ else if (action == 'a' && !qf_list_empty(qi, qf_idx))
+ /* Adding to existing list, use last entry. */
+! old_last = qi->qf_lists[qf_idx].qf_last;
+ else if (action == 'r')
+ {
+! qf_free_items(qi, qf_idx);
+! qf_store_title(qi, qf_idx, title);
+ }
+
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+--- 6124,6138 ----
+ /* make place for a new list */
+ qf_new_list(qi, title);
+ qf_idx = qi->qf_curlist;
++ qfl = &qi->qf_lists[qf_idx];
+ }
+ else if (action == 'a' && !qf_list_empty(qi, qf_idx))
+ /* Adding to existing list, use last entry. */
+! old_last = qfl->qf_last;
+ else if (action == 'r')
+ {
+! qf_free_items(qfl);
+! qf_store_title(qfl, title);
+ }
+
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+***************
+*** 6152,6168 ****
+ break;
+ }
+
+! if (qi->qf_lists[qf_idx].qf_index == 0)
+ /* no valid entry */
+! qi->qf_lists[qf_idx].qf_nonevalid = TRUE;
+ else
+! qi->qf_lists[qf_idx].qf_nonevalid = FALSE;
+ if (action != 'a')
+ {
+! qi->qf_lists[qf_idx].qf_ptr =
+! qi->qf_lists[qf_idx].qf_start;
+ if (!qf_list_empty(qi, qf_idx))
+! qi->qf_lists[qf_idx].qf_index = 1;
+ }
+
+ /* Don't update the cursor in quickfix window when appending entries */
+--- 6149,6164 ----
+ break;
+ }
+
+! if (qfl->qf_index == 0)
+ /* no valid entry */
+! qfl->qf_nonevalid = TRUE;
+ else
+! qfl->qf_nonevalid = FALSE;
+ if (action != 'a')
+ {
+! qfl->qf_ptr = qfl->qf_start;
+ if (!qf_list_empty(qi, qf_idx))
+! qfl->qf_index = 1;
+ }
+
+ /* Don't update the cursor in quickfix window when appending entries */
+***************
+*** 6302,6308 ****
+ return FAIL;
+
+ if (action == 'r')
+! qf_free_items(qi, qf_idx);
+ if (qf_init_ext(qi, qf_idx, NULL, NULL, &di->di_tv, errorformat,
+ FALSE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0)
+ retval = OK;
+--- 6298,6304 ----
+ return FAIL;
+
+ if (action == 'r')
+! qf_free_items(&qi->qf_lists[qf_idx]);
+ if (qf_init_ext(qi, qf_idx, NULL, NULL, &di->di_tv, errorformat,
+ FALSE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0)
+ retval = OK;
+***************
+*** 6314,6328 ****
+ * Set quickfix list context.
+ */
+ static int
+! qf_setprop_context(qf_info_T *qi, int qf_idx, dictitem_T *di)
+ {
+ typval_T *ctx;
+
+! free_tv(qi->qf_lists[qf_idx].qf_ctx);
+ ctx = alloc_tv();
+ if (ctx != NULL)
+ copy_tv(&di->di_tv, ctx);
+! qi->qf_lists[qf_idx].qf_ctx = ctx;
+
+ return OK;
+ }
+--- 6310,6324 ----
+ * Set quickfix list context.
+ */
+ static int
+! qf_setprop_context(qf_list_T *qfl, dictitem_T *di)
+ {
+ typval_T *ctx;
+
+! free_tv(qfl->qf_ctx);
+ ctx = alloc_tv();
+ if (ctx != NULL)
+ copy_tv(&di->di_tv, ctx);
+! qfl->qf_ctx = ctx;
+
+ return OK;
+ }
+***************
+*** 6361,6367 ****
+ if ((di = dict_find(what, (char_u *)"lines", -1)) != NULL)
+ retval = qf_setprop_items_from_lines(qi, qf_idx, what, di, action);
+ if ((di = dict_find(what, (char_u *)"context", -1)) != NULL)
+! retval = qf_setprop_context(qi, qf_idx, di);
+
+ if (retval == OK)
+ qf_list_changed(qi, qf_idx);
+--- 6357,6363 ----
+ if ((di = dict_find(what, (char_u *)"lines", -1)) != NULL)
+ retval = qf_setprop_items_from_lines(qi, qf_idx, what, di, action);
+ if ((di = dict_find(what, (char_u *)"context", -1)) != NULL)
+! retval = qf_setprop_context(&qi->qf_lists[qf_idx], di);
+
+ if (retval == OK)
+ qf_list_changed(qi, qf_idx);
+***************
+*** 6370,6376 ****
+ }
+
+ /*
+! * Find the non-location list window with the specified location list.
+ */
+ static win_T *
+ find_win_with_ll(qf_info_T *qi)
+--- 6366,6373 ----
+ }
+
+ /*
+! * Find the non-location list window with the specified location list in the
+! * current tabpage.
+ */
+ static win_T *
+ find_win_with_ll(qf_info_T *qi)
+***************
+*** 6399,6405 ****
+ {
+ /* If the quickfix/location list window is open, then clear it */
+ if (qi->qf_curlist < qi->qf_listcount)
+! qf_free(qi, qi->qf_curlist);
+ qf_update_buffer(qi, NULL);
+ }
+
+--- 6396,6402 ----
+ {
+ /* If the quickfix/location list window is open, then clear it */
+ if (qi->qf_curlist < qi->qf_listcount)
+! qf_free(&qi->qf_lists[qi->qf_curlist]);
+ qf_update_buffer(qi, NULL);
+ }
+
+*** ../vim-8.1.0406/src/version.c 2018-09-18 22:37:26.976072822 +0200
+--- src/version.c 2018-09-18 22:49:11.893423547 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 407,
+ /**/
+
+--
+From "know your smileys":
+¯\_(ツ)_/¯ Shrug
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0408 b/data/vim/patches/8.1.0408
new file mode 100644
index 000000000..7502a0142
--- /dev/null
+++ b/data/vim/patches/8.1.0408
@@ -0,0 +1,219 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0408
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0408
+Problem: MSVC: cannot use the "x64" native compiler option.
+Solution: Ignore case for %Platform%. Improve documentation. (Ken Takata)
+Files: src/INSTALLpc.txt, src/msvc2015.bat
+
+
+*** ../vim-8.1.0407/src/INSTALLpc.txt 2018-06-30 17:06:50.424853479 +0200
+--- src/INSTALLpc.txt 2018-09-18 22:57:48.532445642 +0200
+***************
+*** 3,9 ****
+ This file contains instructions for compiling Vim. If you already have an
+ executable version of Vim, you don't need this.
+
+! You can find the lastest here: https://github.com/vim/vim-win32-installer
+ This page also has links to install support for interfaces such as Perl,
+ Python, Lua, etc.
+
+--- 3,9 ----
+ This file contains instructions for compiling Vim. If you already have an
+ executable version of Vim, you don't need this.
+
+! You can find the latest here: https://github.com/vim/vim-win32-installer
+ This page also has links to install support for interfaces such as Perl,
+ Python, Lua, etc.
+
+***************
+*** 164,169 ****
+--- 164,174 ----
+ msvc2015
+ For x64 builds run this with the "x86_amd64" option:
+ msvc2015 x86_amd64
++ This enables x86_x64 cross compiler. This works on any editions including
++ Express edition.
++ If you use Community (or Professional) edition, you can enable the x64 native
++ compiler by using the "x64" option:
++ msvc2015 x64
+
+ The following Visual C++ team blog can serve as a reference page:
+ http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
+***************
+*** 182,188 ****
+
+ You could download the Microsoft Visual C++ Toolkit 2003 from
+ http://msdn.microsoft.com/visualc/vctoolkit2003/
+! Unfortunately this URL is no longer valid. Inofficial downloads appear to be
+ available from links mentioned on these pages (use at your own risk):
+ http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html
+ http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit
+--- 187,193 ----
+
+ You could download the Microsoft Visual C++ Toolkit 2003 from
+ http://msdn.microsoft.com/visualc/vctoolkit2003/
+! Unfortunately this URL is no longer valid. Unofficial downloads appear to be
+ available from links mentioned on these pages (use at your own risk):
+ http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html
+ http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit
+***************
+*** 276,287 ****
+
+ Execute the installer and follow the instructions to update basic packages.
+ At the end keep the checkbox checked to run msys2 now. If needed, you can
+! open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS
+
+ Execute:
+ $ pacman -Syu
+!
+! And restart MSYS2 window (select "MSYS2 MSYS" icon from the Start Menu).
+ Then execute:
+ $ pacman -Su
+
+--- 281,292 ----
+
+ Execute the installer and follow the instructions to update basic packages.
+ At the end keep the checkbox checked to run msys2 now. If needed, you can
+! open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS.
+
+ Execute:
+ $ pacman -Syu
+!
+! And restart MSYS2 console (select "MSYS2 MSYS" icon from the Start Menu).
+ Then execute:
+ $ pacman -Su
+
+***************
+*** 297,302 ****
+--- 302,308 ----
+ * mingw-w64-i686-toolchain (for building 32-bit Vim)
+ * mingw-w64-x86_64-toolchain (for building 64-bit Vim)
+
++ (These groups also include some useful packages which are not used by Vim.)
+ Use the following command to install them:
+
+ $ pacman -S base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
+***************
+*** 305,312 ****
+--- 311,328 ----
+
+ $ pacboy -S base-devel: toolchain:m
+
++ The suffix ":" means that it disables the package name translation.
++ The suffix ":m" means both i686 and x86_64. You can also use the ":i" suffix
++ to install only i686, and the ":x" suffix to install only x86_64.
+ (See `pacboy help` for the help.)
+
++ See also the pacman page in ArchWiki for the general usage of pacman:
++ https://wiki.archlinux.org/index.php/pacman
++
++ MSYS2 has its own git package, and you can also install it via pacman:
++
++ $ pacman -S git
++
+
+ 2.3. Keep the build environment up-to-date
+
+***************
+*** 316,322 ****
+ $ pacman -Syu
+
+
+! # Build Vim
+
+ Select one of the following icon from the Start Menu:
+
+--- 332,338 ----
+ $ pacman -Syu
+
+
+! 2.4. Build Vim
+
+ Select one of the following icon from the Start Menu:
+
+***************
+*** 329,340 ****
+ make -f Make_ming.mak GUI=no
+ make -f Make_ming.mak GUI=no DEBUG=yes
+
+! NOTE: you can't execute the vim.exe in the MSYS console, open a normal Windows
+ console for that. You need to set $PATH to be able to build there, e.g.:
+
+ set PATH=c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%
+
+! This command is in msys32.bat. Or or the 64 bit compiler use msys64.bat:
+
+ set PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%
+
+--- 345,356 ----
+ make -f Make_ming.mak GUI=no
+ make -f Make_ming.mak GUI=no DEBUG=yes
+
+! NOTE: you can't execute vim.exe in the MSYS2 console, open a normal Windows
+ console for that. You need to set $PATH to be able to build there, e.g.:
+
+ set PATH=c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%
+
+! This command is in msys32.bat. Or for the 64 bit compiler use msys64.bat:
+
+ set PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%
+
+*** ../vim-8.1.0407/src/msvc2015.bat 2017-10-07 17:58:14.000000000 +0200
+--- src/msvc2015.bat 2018-09-18 22:52:10.463708085 +0200
+***************
+*** 7,12 ****
+--- 7,16 ----
+ rem msvc2015
+ rem For x64 builds run this with "x86_amd64" option:
+ rem msvc2015 x86_amd64
++ rem This works on any editions including Express edition.
++ rem If you use Community (or Professional) edition, you can also use "x64"
++ rem option:
++ rem msvc2015 x64
+ @echo on
+
+ call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %*
+***************
+*** 23,29 ****
+ )
+
+ set INCLUDE=%WinSdk71%\Include;%INCLUDE%
+! if "%Platform%"=="x64" (
+ set "LIB=%WinSdk71%\Lib\x64;%LIB%"
+ set SUBSYSTEM_VER=5.02
+ ) else (
+--- 27,33 ----
+ )
+
+ set INCLUDE=%WinSdk71%\Include;%INCLUDE%
+! if /i "%Platform%"=="x64" (
+ set "LIB=%WinSdk71%\Lib\x64;%LIB%"
+ set SUBSYSTEM_VER=5.02
+ ) else (
+*** ../vim-8.1.0407/src/version.c 2018-09-18 22:50:02.692936259 +0200
+--- src/version.c 2018-09-18 22:54:22.394436775 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 408,
+ /**/
+
+--
+From "know your smileys":
+ :-) Funny
+ |-) Funny Oriental
+ (-: Funny Australian
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0409 b/data/vim/patches/8.1.0409
new file mode 100644
index 000000000..9f2a52606
--- /dev/null
+++ b/data/vim/patches/8.1.0409
@@ -0,0 +1,93 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0409
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0409 (after 8.1.0406)
+Problem: Startup test fails on MS-Windows.
+Solution: Do the Arabic test in silent Ex mode. Loosen the check for -V2.
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.0408/src/testdir/test_startup.vim 2018-09-18 22:37:26.976072822 +0200
+--- src/testdir/test_startup.vim 2018-09-19 21:05:48.480522312 +0200
+***************
+*** 252,267 ****
+ call delete('Xtestout')
+ endfunc
+
+! " Test the -V[N] argument to set the 'version' option to [N]
+ func Test_V_arg()
+ let out = system(GetVimCommand() . ' --clean -es -X -V0 -c "set verbose?" -cq')
+ call assert_equal(" verbose=0\n", out)
+
+ let out = system(GetVimCommand() . ' --clean -es -X -V2 -c "set verbose?" -cq')
+! call assert_match("^sourcing \"$VIMRUNTIME/defaults\.vim\"\r\nSearching for \"filetype\.vim\".*\n verbose=2\n$", out)
+
+ let out = system(GetVimCommand() . ' --clean -es -X -V15 -c "set verbose?" -cq')
+! call assert_match("\+*\nsourcing \"$VIMRUNTIME/defaults\.vim\"\r\nline 1: \" The default vimrc file\..*\n verbose=15\n\+*", out)
+ endfunc
+
+ " Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes).
+--- 252,272 ----
+ call delete('Xtestout')
+ endfunc
+
+! " Test the -V[N] argument to set the 'verbose' option to [N]
+ func Test_V_arg()
++ if has('gui_running')
++ " Can't catch the output of gvim.
++ return
++ endif
+ let out = system(GetVimCommand() . ' --clean -es -X -V0 -c "set verbose?" -cq')
+ call assert_equal(" verbose=0\n", out)
+
+ let out = system(GetVimCommand() . ' --clean -es -X -V2 -c "set verbose?" -cq')
+! call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nSearching for \"filetype\.vim\".*\n", out)
+! call assert_match(" verbose=2\n", out)
+
+ let out = system(GetVimCommand() . ' --clean -es -X -V15 -c "set verbose?" -cq')
+! call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline 1: \" The default vimrc file\..* verbose=15\n", out)
+ endfunc
+
+ " Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes).
+***************
+*** 270,276 ****
+ \ 'call writefile([&rightleft, &arabic, &fkmap, &hkmap], "Xtestout")',
+ \ 'qall',
+ \ ]
+! if has('arabic') && RunVim([], after, '-A')
+ let lines = readfile('Xtestout')
+ call assert_equal(['1', '1', '0', '0'], lines)
+ endif
+--- 275,283 ----
+ \ 'call writefile([&rightleft, &arabic, &fkmap, &hkmap], "Xtestout")',
+ \ 'qall',
+ \ ]
+! " Use silent Ex mode to avoid the hit-Enter prompt for the warning that
+! " 'encoding' is not utf-8.
+! if has('arabic') && &encoding == 'utf-8' && RunVim([], after, '-e -s -A')
+ let lines = readfile('Xtestout')
+ call assert_equal(['1', '1', '0', '0'], lines)
+ endif
+*** ../vim-8.1.0408/src/version.c 2018-09-18 22:58:36.999976835 +0200
+--- src/version.c 2018-09-19 21:01:31.298375990 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 409,
+ /**/
+
+--
+How many light bulbs does it take to change a person?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0410 b/data/vim/patches/8.1.0410
new file mode 100644
index 000000000..0a1cac9e0
--- /dev/null
+++ b/data/vim/patches/8.1.0410
@@ -0,0 +1,307 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0410
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0410
+Problem: The ex_copen() function is too long.
+Solution: Refactor to split off two functions. (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0409/src/quickfix.c 2018-09-18 22:50:02.692936259 +0200
+--- src/quickfix.c 2018-09-19 21:54:26.509737127 +0200
+***************
+*** 3807,3812 ****
+--- 3807,3918 ----
+ }
+
+ /*
++ * Goto a quickfix or location list window (if present).
++ * Returns OK if the window is found, FAIL otherwise.
++ */
++ static int
++ qf_goto_cwindow(qf_info_T *qi, int resize, int sz, int vertsplit)
++ {
++ win_T *win;
++
++ win = qf_find_win(qi);
++ if (win == NULL)
++ return FAIL;
++
++ win_goto(win);
++ if (resize)
++ {
++ if (vertsplit)
++ {
++ if (sz != win->w_width)
++ win_setwidth(sz);
++ }
++ else if (sz != win->w_height)
++ win_setheight(sz);
++ }
++
++ return OK;
++ }
++
++ /*
++ * Open a new quickfix or location list window, load the quickfix buffer and
++ * set the appropriate options for the window.
++ * Returns FAIL if the window could not be opened.
++ */
++ static int
++ qf_open_new_cwindow(qf_info_T *qi, int height)
++ {
++ buf_T *qf_buf;
++ win_T *oldwin = curwin;
++ tabpage_T *prevtab = curtab;
++ int flags = 0;
++ win_T *win;
++
++ qf_buf = qf_find_buf(qi);
++
++ // The current window becomes the previous window afterwards.
++ win = curwin;
++
++ if (IS_QF_STACK(qi) && cmdmod.split == 0)
++ // Create the new quickfix window at the very bottom, except when
++ // :belowright or :aboveleft is used.
++ win_goto(lastwin);
++ // Default is to open the window below the current window
++ if (cmdmod.split == 0)
++ flags = WSP_BELOW;
++ flags |= WSP_NEWLOC;
++ if (win_split(height, flags) == FAIL)
++ return FAIL; // not enough room for window
++ RESET_BINDING(curwin);
++
++ if (IS_LL_STACK(qi))
++ {
++ // For the location list window, create a reference to the
++ // location list from the window 'win'.
++ curwin->w_llist_ref = win->w_llist;
++ win->w_llist->qf_refcount++;
++ }
++
++ if (oldwin != curwin)
++ oldwin = NULL; // don't store info when in another window
++ if (qf_buf != NULL)
++ {
++ // Use the existing quickfix buffer
++ (void)do_ecmd(qf_buf->b_fnum, NULL, NULL, NULL, ECMD_ONE,
++ ECMD_HIDE + ECMD_OLDBUF, oldwin);
++ }
++ else
++ {
++ // Create a new quickfix buffer
++ (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, oldwin);
++
++ // switch off 'swapfile'
++ set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL);
++ set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix",
++ OPT_LOCAL);
++ set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL);
++ RESET_BINDING(curwin);
++ #ifdef FEAT_DIFF
++ curwin->w_p_diff = FALSE;
++ #endif
++ #ifdef FEAT_FOLDING
++ set_option_value((char_u *)"fdm", 0L, (char_u *)"manual",
++ OPT_LOCAL);
++ #endif
++ }
++
++ // Only set the height when still in the same tab page and there is no
++ // window to the side.
++ if (curtab == prevtab && curwin->w_width == Columns)
++ win_setheight(height);
++ curwin->w_p_wfh = TRUE; // set 'winfixheight'
++ if (win_valid(win))
++ prevwin = win;
++
++ return OK;
++ }
++
++ /*
+ * ":copen": open a window that shows the list of errors.
+ * ":lopen": open a window that shows the location list.
+ */
+***************
+*** 3815,3824 ****
+ {
+ qf_info_T *qi = &ql_info;
+ int height;
+! win_T *win;
+! tabpage_T *prevtab = curtab;
+! buf_T *qf_buf;
+! win_T *oldwin = curwin;
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+--- 3921,3927 ----
+ {
+ qf_info_T *qi = &ql_info;
+ int height;
+! int status = FAIL;
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+***************
+*** 3835,3941 ****
+ else
+ height = QF_WINHEIGHT;
+
+! reset_VIsual_and_resel(); /* stop Visual mode */
+ #ifdef FEAT_GUI
+ need_mouse_correct = TRUE;
+ #endif
+
+! /*
+! * Find existing quickfix window, or open a new one.
+! */
+! win = qf_find_win(qi);
+!
+! if (win != NULL && cmdmod.tab == 0)
+! {
+! win_goto(win);
+! if (eap->addr_count != 0)
+! {
+! if (cmdmod.split & WSP_VERT)
+! {
+! if (height != win->w_width)
+! win_setwidth(height);
+! }
+! else if (height != win->w_height)
+! win_setheight(height);
+! }
+! }
+! else
+! {
+! int flags = 0;
+!
+! qf_buf = qf_find_buf(qi);
+!
+! /* The current window becomes the previous window afterwards. */
+! win = curwin;
+!
+! if ((eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
+! && cmdmod.split == 0)
+! /* Create the new quickfix window at the very bottom, except when
+! * :belowright or :aboveleft is used. */
+! win_goto(lastwin);
+! /* Default is to open the window below the current window */
+! if (cmdmod.split == 0)
+! flags = WSP_BELOW;
+! flags |= WSP_NEWLOC;
+! if (win_split(height, flags) == FAIL)
+! return; /* not enough room for window */
+! RESET_BINDING(curwin);
+!
+! if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
+! {
+! /*
+! * For the location list window, create a reference to the
+! * location list from the window 'win'.
+! */
+! curwin->w_llist_ref = win->w_llist;
+! win->w_llist->qf_refcount++;
+! }
+!
+! if (oldwin != curwin)
+! oldwin = NULL; /* don't store info when in another window */
+! if (qf_buf != NULL)
+! /* Use the existing quickfix buffer */
+! (void)do_ecmd(qf_buf->b_fnum, NULL, NULL, NULL, ECMD_ONE,
+! ECMD_HIDE + ECMD_OLDBUF, oldwin);
+! else
+! {
+! /* Create a new quickfix buffer */
+! (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, oldwin);
+! /* switch off 'swapfile' */
+! set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL);
+! set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix",
+! OPT_LOCAL);
+! set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL);
+! RESET_BINDING(curwin);
+! #ifdef FEAT_DIFF
+! curwin->w_p_diff = FALSE;
+! #endif
+! #ifdef FEAT_FOLDING
+! set_option_value((char_u *)"fdm", 0L, (char_u *)"manual",
+! OPT_LOCAL);
+! #endif
+! }
+!
+! /* Only set the height when still in the same tab page and there is no
+! * window to the side. */
+! if (curtab == prevtab && curwin->w_width == Columns)
+! win_setheight(height);
+! curwin->w_p_wfh = TRUE; /* set 'winfixheight' */
+! if (win_valid(win))
+! prevwin = win;
+! }
+
+ qf_set_title_var(&qi->qf_lists[qi->qf_curlist]);
+
+! /*
+! * Fill the buffer with the quickfix list.
+! */
+ qf_fill_buffer(qi, curbuf, NULL);
+
+ curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
+ curwin->w_cursor.col = 0;
+ check_cursor();
+! update_topline(); /* scroll to show the line */
+ }
+
+ /*
+--- 3938,3965 ----
+ else
+ height = QF_WINHEIGHT;
+
+! reset_VIsual_and_resel(); // stop Visual mode
+ #ifdef FEAT_GUI
+ need_mouse_correct = TRUE;
+ #endif
+
+! // Find an existing quickfix window, or open a new one.
+! if (cmdmod.tab == 0)
+! status = qf_goto_cwindow(qi, eap->addr_count != 0, height,
+! cmdmod.split & WSP_VERT);
+! if (status == FAIL)
+! if (qf_open_new_cwindow(qi, height) == FAIL)
+! return;
+
+ qf_set_title_var(&qi->qf_lists[qi->qf_curlist]);
+
+! // Fill the buffer with the quickfix list.
+ qf_fill_buffer(qi, curbuf, NULL);
+
+ curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
+ curwin->w_cursor.col = 0;
+ check_cursor();
+! update_topline(); // scroll to show the line
+ }
+
+ /*
+*** ../vim-8.1.0409/src/version.c 2018-09-19 21:06:28.344234982 +0200
+--- src/version.c 2018-09-19 21:54:49.149575674 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 410,
+ /**/
+
+--
+You are only young once, but you can stay immature indefinitely.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0411 b/data/vim/patches/8.1.0411
new file mode 100644
index 000000000..bed221b9f
--- /dev/null
+++ b/data/vim/patches/8.1.0411
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0411
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0411
+Problem: Renamed file missing from distribution.
+Solution: Rename screen.c to termscreen.c (Zdenek Dohnal, closes #3449)
+Files: Filelist
+
+
+*** ../vim-8.1.0410/Filelist 2018-09-18 21:41:43.716652306 +0200
+--- Filelist 2018-09-19 21:57:47.544243757 +0200
+***************
+*** 228,234 ****
+ src/libvterm/src/parser.c \
+ src/libvterm/src/pen.c \
+ src/libvterm/src/rect.h \
+! src/libvterm/src/screen.c \
+ src/libvterm/src/state.c \
+ src/libvterm/src/unicode.c \
+ src/libvterm/src/utf8.h \
+--- 228,234 ----
+ src/libvterm/src/parser.c \
+ src/libvterm/src/pen.c \
+ src/libvterm/src/rect.h \
+! src/libvterm/src/termscreen.c \
+ src/libvterm/src/state.c \
+ src/libvterm/src/unicode.c \
+ src/libvterm/src/utf8.h \
+*** ../vim-8.1.0410/src/version.c 2018-09-19 21:55:58.681068412 +0200
+--- src/version.c 2018-09-19 21:59:01.431666094 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 411,
+ /**/
+
+--
+Where do you want to crash today?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0412 b/data/vim/patches/8.1.0412
new file mode 100644
index 000000000..f41303905
--- /dev/null
+++ b/data/vim/patches/8.1.0412
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0412
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0412
+Problem: Cannot build with GTK 2.4.
+Solution: Add back a few #ifdefs. (Ken Takata, closes #3447)
+ Also support older GTK. (Tom Christensen)
+Files: src/gui_gtk_x11.c
+
+
+*** ../vim-8.1.0411/src/gui_gtk_x11.c 2018-09-18 22:29:59.888041388 +0200
+--- src/gui_gtk_x11.c 2018-09-19 22:38:37.832960461 +0200
+***************
+*** 3415,3420 ****
+--- 3415,3421 ----
+ send_tabline_event(idx + 1);
+ }
+
++ # if GTK_CHECK_VERSION(2,10,0)
+ /*
+ * Handle reordering the tabs (using D&D).
+ */
+***************
+*** 3433,3438 ****
+--- 3434,3440 ----
+ tabpage_move(idx);
+ }
+ }
++ # endif
+
+ /*
+ * Show or hide the tabline.
+***************
+*** 3516,3524 ****
+--- 3518,3528 ----
+ page,
+ event_box,
+ nr++);
++ # if GTK_CHECK_VERSION(2,10,0)
+ gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline),
+ page,
+ TRUE);
++ # endif
+ }
+
+ event_box = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gui.tabline), page);
+***************
+*** 3914,3926 ****
+--- 3918,3934 ----
+ # endif
+ gtk_container_add(GTK_CONTAINER(event_box), label);
+ gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, event_box);
++ # if GTK_CHECK_VERSION(2,10,0)
+ gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline), page, TRUE);
++ # endif
+ }
+
+ g_signal_connect(G_OBJECT(gui.tabline), "switch-page",
+ G_CALLBACK(on_select_tab), NULL);
++ # if GTK_CHECK_VERSION(2,10,0)
+ g_signal_connect(G_OBJECT(gui.tabline), "page-reordered",
+ G_CALLBACK(on_tab_reordered), NULL);
++ # endif
+
+ /* Create a popup menu for the tab line and connect it. */
+ tabline_menu = create_tabline_menu();
+***************
+*** 6395,6401 ****
+--- 6403,6413 ----
+ gui_mch_flush(void)
+ {
+ if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin))
++ #if GTK_CHECK_VERSION(2,4,0)
+ gdk_display_flush(gtk_widget_get_display(gui.mainwin));
++ #else
++ gdk_display_sync(gtk_widget_get_display(gui.mainwin));
++ #endif
+ }
+
+ /*
+*** ../vim-8.1.0411/src/version.c 2018-09-19 22:00:26.150988737 +0200
+--- src/version.c 2018-09-19 22:39:13.452611172 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 412,
+ /**/
+
+--
+From "know your smileys":
+ (:-# Said something he shouldn't have
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0413 b/data/vim/patches/8.1.0413
new file mode 100644
index 000000000..766ff2756
--- /dev/null
+++ b/data/vim/patches/8.1.0413
@@ -0,0 +1,75 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0413
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0413
+Problem: Test output is duplicated or missing.
+Solution: Adjust the MS-Windows and Unix test makefiles. (Ken Takata,
+ closes #3452)
+Files: src/testdir/Make_dos.mak, src/testdir/Makefile
+
+
+*** ../vim-8.1.0412/src/testdir/Make_dos.mak 2018-07-14 21:48:42.444978086 +0200
+--- src/testdir/Make_dos.mak 2018-09-20 21:33:05.054779441 +0200
+***************
+*** 112,118 ****
+ # to write and a lot easier to read and debug.
+ # Limitation: Only works with the +eval feature.
+
+! newtests: $(NEW_TESTS)
+
+ .vim.res:
+ @echo $(VIMPROG) > vimcmd
+--- 112,121 ----
+ # to write and a lot easier to read and debug.
+ # Limitation: Only works with the +eval feature.
+
+! newtests: newtestssilent
+! @if exist messages (findstr "SKIPPED FAILED" messages > nul) && type messages
+!
+! newtestssilent: $(NEW_TESTS)
+
+ .vim.res:
+ @echo $(VIMPROG) > vimcmd
+*** ../vim-8.1.0412/src/testdir/Makefile 2018-07-14 21:48:42.448978060 +0200
+--- src/testdir/Makefile 2018-09-20 21:33:05.054779441 +0200
+***************
+*** 121,127 ****
+ RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim
+
+ newtests: newtestssilent
+! @/bin/sh -c "if test -f messages && grep -q 'SKIPPED\|FAILED' messages; then cat messages && if test -f test.log; then cat test.log; fi ; fi"
+
+ newtestssilent: $(NEW_TESTS)
+
+--- 121,127 ----
+ RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim
+
+ newtests: newtestssilent
+! @/bin/sh -c "if test -f messages && grep -q 'SKIPPED\|FAILED' messages; then cat messages; fi"
+
+ newtestssilent: $(NEW_TESTS)
+
+*** ../vim-8.1.0412/src/version.c 2018-09-19 22:39:59.816157865 +0200
+--- src/version.c 2018-09-20 21:36:32.656899510 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 413,
+ /**/
+
+--
+From "know your smileys":
+ =):-) Uncle Sam
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0414 b/data/vim/patches/8.1.0414
new file mode 100644
index 000000000..1de47e6b2
--- /dev/null
+++ b/data/vim/patches/8.1.0414
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0414
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0414
+Problem: v:option_old and v:option_new are cleared when using :set in
+ OptionSet autocmd. (Gary Johnson)
+Solution: Don't trigger OptionSet recursively.
+Files: src/option.c
+
+
+*** ../vim-8.1.0413/src/option.c 2018-09-13 20:31:47.103018229 +0200
+--- src/option.c 2018-09-20 21:26:55.954190027 +0200
+***************
+*** 4359,4365 ****
+ char_u *oldval,
+ char_u *newval)
+ {
+! if (oldval != NULL && newval != NULL)
+ {
+ char_u buf_type[7];
+
+--- 4359,4367 ----
+ char_u *oldval,
+ char_u *newval)
+ {
+! // Don't do this recursively.
+! if (oldval != NULL && newval != NULL
+! && *get_vim_var_str(VV_OPTION_TYPE) == NUL)
+ {
+ char_u buf_type[7];
+
+***************
+*** 8858,8866 ****
+ options[opt_idx].flags |= P_WAS_SET;
+
+ #if defined(FEAT_EVAL)
+! if (!starting)
+ {
+ char_u buf_old[2], buf_new[2], buf_type[7];
+ vim_snprintf((char *)buf_old, 2, "%d", old_value ? TRUE: FALSE);
+ vim_snprintf((char *)buf_new, 2, "%d", value ? TRUE: FALSE);
+ vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global");
+--- 8860,8870 ----
+ options[opt_idx].flags |= P_WAS_SET;
+
+ #if defined(FEAT_EVAL)
+! // Don't do this while starting up or recursively.
+! if (!starting && *get_vim_var_str(VV_OPTION_TYPE) == NUL)
+ {
+ char_u buf_old[2], buf_new[2], buf_type[7];
++
+ vim_snprintf((char *)buf_old, 2, "%d", old_value ? TRUE: FALSE);
+ vim_snprintf((char *)buf_new, 2, "%d", value ? TRUE: FALSE);
+ vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global");
+***************
+*** 9415,9421 ****
+ options[opt_idx].flags |= P_WAS_SET;
+
+ #if defined(FEAT_EVAL)
+! if (!starting && errmsg == NULL)
+ {
+ char_u buf_old[11], buf_new[11], buf_type[7];
+ vim_snprintf((char *)buf_old, 10, "%ld", old_value);
+--- 9419,9426 ----
+ options[opt_idx].flags |= P_WAS_SET;
+
+ #if defined(FEAT_EVAL)
+! // Don't do this while starting up, failure or recursively.
+! if (!starting && errmsg == NULL && *get_vim_var_str(VV_OPTION_TYPE) == NUL)
+ {
+ char_u buf_old[11], buf_new[11], buf_type[7];
+ vim_snprintf((char *)buf_old, 10, "%ld", old_value);
+*** ../vim-8.1.0413/src/version.c 2018-09-20 21:39:29.643309960 +0200
+--- src/version.c 2018-09-21 11:58:57.971879329 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 414,
+ /**/
+
+--
+From "know your smileys":
+ (X0||) Double hamburger with lettuce and tomato
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0415 b/data/vim/patches/8.1.0415
new file mode 100644
index 000000000..68dd40a34
--- /dev/null
+++ b/data/vim/patches/8.1.0415
@@ -0,0 +1,122 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0415
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0415
+Problem: Not actually using 16 colors with vtp.
+Solution: Always use 256 colors when vtp is used. (Nobuhiro Takasaki,
+ closes #3432)
+Files: src/option.c, src/term.c
+
+
+*** ../vim-8.1.0414/src/option.c 2018-09-21 11:59:28.287579498 +0200
+--- src/option.c 2018-09-21 12:14:29.955639702 +0200
+***************
+*** 7785,7792 ****
+ #if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
+ if (did_swaptcap)
+ {
+- if (t_colors < 256)
+- p_tgc = 0;
+ set_termname((char_u *)"win32");
+ init_highlight(TRUE, FALSE);
+ }
+--- 7785,7790 ----
+*** ../vim-8.1.0414/src/term.c 2018-09-13 15:33:39.609712174 +0200
+--- src/term.c 2018-09-21 12:14:05.095844454 +0200
+***************
+*** 6743,6777 ****
+ # define KSSIZE 20
+ struct ks_tbl_s
+ {
+! int code; /* value of KS_ */
+! char *vtp; /* code in vtp mode */
+! char *vtp2; /* code in vtp2 mode */
+! char buf[KSSIZE]; /* save buffer in non-vtp mode */
+! char vbuf[KSSIZE]; /* save buffer in vtp mode */
+! char v2buf[KSSIZE]; /* save buffer in vtp2 mode */
+! char arr[KSSIZE]; /* real buffer */
+ };
+
+ static struct ks_tbl_s ks_tbl[] =
+ {
+! {(int)KS_ME, "\033|0m", "\033|0m"}, /* normal */
+! {(int)KS_MR, "\033|7m", "\033|7m"}, /* reverse */
+! {(int)KS_MD, "\033|1m", "\033|1m"}, /* bold */
+! {(int)KS_SO, "\033|91m", "\033|91m"}, /* standout: bright red text */
+! {(int)KS_SE, "\033|39m", "\033|39m"}, /* standout end: default color */
+! {(int)KS_CZH, "\033|95m", "\033|95m"}, /* italic: bright magenta text */
+! {(int)KS_CZR, "\033|0m", "\033|0m"}, /* italic end */
+! {(int)KS_US, "\033|4m", "\033|4m"}, /* underscore */
+! {(int)KS_UE, "\033|24m", "\033|24m"}, /* underscore end */
+ # ifdef TERMINFO
+! {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm"}, /* set background color */
+! {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm"}, /* set foreground color */
+ # else
+! {(int)KS_CAB, "\033|%db", "\033|4%dm"}, /* set background color */
+! {(int)KS_CAF, "\033|%df", "\033|3%dm"}, /* set foreground color */
+ # endif
+! {(int)KS_CCO, "16", "256"}, /* colors */
+! {(int)KS_NAME} /* terminator */
+ };
+
+ static struct builtin_term *
+--- 6743,6777 ----
+ # define KSSIZE 20
+ struct ks_tbl_s
+ {
+! int code; // value of KS_
+! char *vtp; // code in vtp mode
+! char *vtp2; // code in vtp2 mode
+! char buf[KSSIZE]; // save buffer in non-vtp mode
+! char vbuf[KSSIZE]; // save buffer in vtp mode
+! char v2buf[KSSIZE]; // save buffer in vtp2 mode
+! char arr[KSSIZE]; // real buffer
+ };
+
+ static struct ks_tbl_s ks_tbl[] =
+ {
+! {(int)KS_ME, "\033|0m", "\033|0m"}, // normal
+! {(int)KS_MR, "\033|7m", "\033|7m"}, // reverse
+! {(int)KS_MD, "\033|1m", "\033|1m"}, // bold
+! {(int)KS_SO, "\033|91m", "\033|91m"}, // standout: bright red text
+! {(int)KS_SE, "\033|39m", "\033|39m"}, // standout end: default color
+! {(int)KS_CZH, "\033|95m", "\033|95m"}, // italic: bright magenta text
+! {(int)KS_CZR, "\033|0m", "\033|0m"}, // italic end
+! {(int)KS_US, "\033|4m", "\033|4m"}, // underscore
+! {(int)KS_UE, "\033|24m", "\033|24m"}, // underscore end
+ # ifdef TERMINFO
+! {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm"}, // set background color
+! {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm"}, // set foreground color
+ # else
+! {(int)KS_CAB, "\033|%db", "\033|4%dm"}, // set background color
+! {(int)KS_CAF, "\033|%df", "\033|3%dm"}, // set foreground color
+ # endif
+! {(int)KS_CCO, "256", "256"}, // colors
+! {(int)KS_NAME} // terminator
+ };
+
+ static struct builtin_term *
+*** ../vim-8.1.0414/src/version.c 2018-09-21 11:59:28.291579459 +0200
+--- src/version.c 2018-09-21 12:23:58.275038358 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 415,
+ /**/
+
+--
+From "know your smileys":
+ 8<}} Glasses, big nose, beard
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0416 b/data/vim/patches/8.1.0416
new file mode 100644
index 000000000..2c53c5f63
--- /dev/null
+++ b/data/vim/patches/8.1.0416
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0416
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0416
+Problem: Sort doesn't report deleted lines.
+Solution: Call msgmore(). (Christian Brabandt, closes #3454)
+Files: src/ex_cmds.c, src/testdir/test_sort.vim
+
+
+*** ../vim-8.1.0415/src/ex_cmds.c 2018-09-13 15:33:39.605712221 +0200
+--- src/ex_cmds.c 2018-09-21 12:44:17.494880453 +0200
+***************
+*** 649,655 ****
+--- 649,658 ----
+ /* Adjust marks for deleted (or added) lines and prepare for displaying. */
+ deleted = (long)(count - (lnum - eap->line2));
+ if (deleted > 0)
++ {
+ mark_adjust(eap->line2 - deleted, eap->line2, (long)MAXLNUM, -deleted);
++ msgmore(-deleted);
++ }
+ else if (deleted < 0)
+ mark_adjust(eap->line2, MAXLNUM, -deleted, 0L);
+
+*** ../vim-8.1.0415/src/testdir/test_sort.vim 2018-06-28 11:28:04.797455530 +0200
+--- src/testdir/test_sort.vim 2018-09-21 12:43:02.327593721 +0200
+***************
+*** 1221,1223 ****
+--- 1221,1253 ----
+
+ enew!
+ endfunc
++
++ func Test_sort_cmd_report()
++ enew!
++ call append(0, repeat([1], 3) + repeat([2], 3) + repeat([3], 3))
++ $delete _
++ setlocal nomodified
++ let res = execute('%sort u')
++
++ call assert_equal([1,2,3], map(getline(1, '$'), 'v:val+0'))
++ call assert_match("6 fewer lines", res)
++ enew!
++ call append(0, repeat([1], 3) + repeat([2], 3) + repeat([3], 3))
++ $delete _
++ setlocal nomodified report=10
++ let res = execute('%sort u')
++
++ call assert_equal([1,2,3], map(getline(1, '$'), 'v:val+0'))
++ call assert_equal("", res)
++ enew!
++ call append(0, repeat([1], 3) + repeat([2], 3) + repeat([3], 3))
++ $delete _
++ setl report&vim
++ setlocal nomodified
++ let res = execute('1g/^/%sort u')
++
++ call assert_equal([1,2,3], map(getline(1, '$'), 'v:val+0'))
++ " the output comes from the :g command, not from the :sort
++ call assert_match("6 fewer lines", res)
++ enew!
++ endfunc
+*** ../vim-8.1.0415/src/version.c 2018-09-21 12:24:08.618955563 +0200
+--- src/version.c 2018-09-21 12:45:59.157931707 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 416,
+ /**/
+
+--
+From "know your smileys":
+ %-) After staring at screen for 15 hours
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0417 b/data/vim/patches/8.1.0417
new file mode 100644
index 000000000..3fb1603be
--- /dev/null
+++ b/data/vim/patches/8.1.0417
@@ -0,0 +1,140 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0417
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0417
+Problem: Several command line arguments are not tested.
+Solution: Add tests for -m, -M, -R and -Vfile. (Dominique Pelle,
+ closes #3458)
+Files: src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.0416/src/testdir/test_startup.vim 2018-09-19 21:06:28.344234982 +0200
+--- src/testdir/test_startup.vim 2018-09-21 12:52:01.786654278 +0200
+***************
+*** 194,201 ****
+ " Open 2 windows split vertically. Expect:
+ " - 2 windows
+ " - both windows should have the same or almost the same width
+! " - sum of both windows width (+ 1 separator) should be equal to the
+! " number of columns
+ " - both windows should have the same height
+ " - window height (+ 2 for the statusline and Ex command) should be equal
+ " to the number of lines
+--- 194,201 ----
+ " Open 2 windows split vertically. Expect:
+ " - 2 windows
+ " - both windows should have the same or almost the same width
+! " - sum of both windows width (+ 1 for the separator) should be equal to
+! " the number of columns
+ " - both windows should have the same height
+ " - window height (+ 2 for the statusline and Ex command) should be equal
+ " to the number of lines
+***************
+*** 269,274 ****
+--- 269,316 ----
+ call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline 1: \" The default vimrc file\..* verbose=15\n", out)
+ endfunc
+
++ " Test the -V[N]{filename} argument to set the 'verbose' option to N
++ " and set 'verbosefile' to filename.
++ func Test_V_file_arg()
++ if RunVim([], [], ' --clean -X -V2Xverbosefile -c "set verbose? verbosefile?" -cq')
++ let out = join(readfile('Xverbosefile'), "\n")
++ call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\n", out)
++ call assert_match("\n verbose=2\n", out)
++ call assert_match("\n verbosefile=Xverbosefile", out)
++ endif
++
++ call delete('Xverbosefile')
++ endfunc
++
++ " Test the -m, -M and -R arguments:
++ " -m resets 'write'
++ " -M resets 'modifiable' and 'write'
++ " -R sets 'readonly'
++ func Test_m_M_R()
++ let after = [
++ \ 'call writefile([&write, &modifiable, &readonly, &updatecount], "Xtestout")',
++ \ 'qall',
++ \ ]
++ if RunVim([], after, '')
++ let lines = readfile('Xtestout')
++ call assert_equal(['1', '1', '0', '200'], lines)
++ endif
++ if RunVim([], after, '-m')
++ let lines = readfile('Xtestout')
++ call assert_equal(['0', '1', '0', '200'], lines)
++ endif
++ if RunVim([], after, '-M')
++ let lines = readfile('Xtestout')
++ call assert_equal(['0', '0', '0', '200'], lines)
++ endif
++ if RunVim([], after, '-R')
++ let lines = readfile('Xtestout')
++ call assert_equal(['1', '1', '1', '10000'], lines)
++ endif
++
++ call delete('Xtestout')
++ endfunc
++
+ " Test the -A, -F and -H arguments (Arabic, Farsi and Hebrew modes).
+ func Test_A_F_H_arg()
+ let after = [
+***************
+*** 430,436 ****
+ call writefile(['123456'], 'Xtestout')
+ let after = [
+ \ ':startinsert',
+! \ 'call feedkeys("foobar\<c-o>:wq\<cr>","t")'
+ \ ]
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+--- 472,478 ----
+ call writefile(['123456'], 'Xtestout')
+ let after = [
+ \ ':startinsert',
+! \ 'call feedkeys("foobar\<c-o>:wq\<cr>","t")'
+ \ ]
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+***************
+*** 440,446 ****
+ call writefile(['123456'], 'Xtestout')
+ let after = [
+ \ ':startinsert!',
+! \ 'call feedkeys("foobar\<c-o>:wq\<cr>","t")'
+ \ ]
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+--- 482,488 ----
+ call writefile(['123456'], 'Xtestout')
+ let after = [
+ \ ':startinsert!',
+! \ 'call feedkeys("foobar\<c-o>:wq\<cr>","t")'
+ \ ]
+ if RunVim([], after, 'Xtestout')
+ let lines = readfile('Xtestout')
+*** ../vim-8.1.0416/src/version.c 2018-09-21 12:46:16.341772938 +0200
+--- src/version.c 2018-09-21 12:53:03.382109316 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 417,
+ /**/
+
+--
+From "know your smileys":
+ <>:-) Bishop
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0418 b/data/vim/patches/8.1.0418
new file mode 100644
index 000000000..db473f74e
--- /dev/null
+++ b/data/vim/patches/8.1.0418
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0418
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0418
+Problem: MS-Windows: cannot separate Lua include and library directories.
+Solution: Add LUA_LIBDIR and LUA_INCDIR. (Ken Takata, closes #3464)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0417/src/Make_cyg_ming.mak 2018-09-13 17:23:05.169150892 +0200
+--- src/Make_cyg_ming.mak 2018-09-21 13:42:59.711938356 +0200
+***************
+*** 244,249 ****
+--- 244,251 ----
+
+ # Lua interface:
+ # LUA=[Path to Lua directory] (Set inside Make_cyg.mak or Make_ming.mak)
++ # LUA_LIBDIR=[Path to Lua library directory] (default: $LUA/lib)
++ # LUA_INCDIR=[Path to Lua include directory] (default: $LUA/include)
+ # DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
+ # LUA_VER=[Lua version, eg 51, 52] (default is 53)
+ ifdef LUA
+***************
+*** 256,262 ****
+ endif
+
+ ifeq (no,$(DYNAMIC_LUA))
+! LUA_LIB = -L$(LUA)/lib -llua
+ endif
+
+ endif
+--- 258,265 ----
+ endif
+
+ ifeq (no,$(DYNAMIC_LUA))
+! LUA_LIBDIR = $(LUA)/lib
+! LUA_LIB = -L$(LUA_LIBDIR) -llua
+ endif
+
+ endif
+***************
+*** 524,530 ****
+ endif
+
+ ifdef LUA
+! CFLAGS += -I$(LUA)/include -I$(LUA) -DFEAT_LUA
+ ifeq (yes, $(DYNAMIC_LUA))
+ CFLAGS += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
+ endif
+--- 527,534 ----
+ endif
+
+ ifdef LUA
+! LUA_INCDIR = $(LUA)/include
+! CFLAGS += -I$(LUA_INCDIR) -I$(LUA) -DFEAT_LUA
+ ifeq (yes, $(DYNAMIC_LUA))
+ CFLAGS += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
+ endif
+*** ../vim-8.1.0417/src/version.c 2018-09-21 12:54:02.685586971 +0200
+--- src/version.c 2018-09-21 13:43:17.639865260 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 418,
+ /**/
+
+--
+From "know your smileys":
+ +<(:-) The Pope
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0419 b/data/vim/patches/8.1.0419
new file mode 100644
index 000000000..737189835
--- /dev/null
+++ b/data/vim/patches/8.1.0419
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0419
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0419
+Problem: Cygwin: running cproto fails with -O2.
+Solution: Strip -O2 for cproto. (Ken Takata, closes #3465)
+Files: src/Makefile
+
+
+*** ../vim-8.1.0418/src/Makefile 2018-09-15 15:08:48.348852704 +0200
+--- src/Makefile 2018-09-21 13:55:37.399172113 +0200
+***************
+*** 2028,2035 ****
+ # them as a list of individual flags.
+ # The -E"gcc -E" argument must be separate to avoid problems with shell
+ # quoting.
+ CPROTO = cproto $(PROTO_FLAGS) -DPROTO \
+! `echo '$(LINT_CFLAGS)' | sed -e 's/ -[a-z-]\+//g'`
+
+ ### Would be nice if this would work for "normal" make.
+ ### Currently it only works for (Free)BSD make.
+--- 2028,2036 ----
+ # them as a list of individual flags.
+ # The -E"gcc -E" argument must be separate to avoid problems with shell
+ # quoting.
++ # Strip -O2, it may cause cproto to write stderr to the file "2".
+ CPROTO = cproto $(PROTO_FLAGS) -DPROTO \
+! `echo '$(LINT_CFLAGS)' | sed -e 's/ -[a-z-]\+//g' -e 's/ -O[^ ]\+//g'`
+
+ ### Would be nice if this would work for "normal" make.
+ ### Currently it only works for (Free)BSD make.
+*** ../vim-8.1.0418/src/version.c 2018-09-21 13:44:04.307661575 +0200
+--- src/version.c 2018-09-21 13:53:52.263969338 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 419,
+ /**/
+
+--
+From "know your smileys":
+ 2B|^2B Message from Shakespeare
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0420 b/data/vim/patches/8.1.0420
new file mode 100644
index 000000000..a630103f3
--- /dev/null
+++ b/data/vim/patches/8.1.0420
@@ -0,0 +1,73 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0420
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0420
+Problem: Generating vim.lib when using ActivePerl 5.20.3 or later.
+Solution: Redefine XS_EXTERNAL(). (Ken Takata, closes #3462)
+Files: src/if_perl.xs
+
+
+*** ../vim-8.1.0419/src/if_perl.xs 2018-08-02 21:46:47.575548793 +0200
+--- src/if_perl.xs 2018-09-21 13:59:48.885177259 +0200
+***************
+*** 88,97 ****
+ # endif
+ #endif
+
+! /* Perl compatibility stuff. This should ensure compatibility with older
+! * versions of Perl.
+! */
+!
+ #ifndef PERL_VERSION
+ # include <patchlevel.h>
+ # define PERL_REVISION 5
+--- 88,95 ----
+ # endif
+ #endif
+
+! // Perl compatibility stuff. This should ensure compatibility with older
+! // versions of Perl.
+ #ifndef PERL_VERSION
+ # include <patchlevel.h>
+ # define PERL_REVISION 5
+***************
+*** 99,104 ****
+--- 97,110 ----
+ # define PERL_SUBVERSION SUBVERSION
+ #endif
+
++
++ // Work around for ActivePerl 5.20.3+: Avoid generating (g)vim.lib.
++ #if defined(ACTIVEPERL_VERSION) && (ACTIVEPERL_VERSION >= 2003) \
++ && defined(WIN32) && defined(USE_DYNAMIC_LOADING)
++ # undef XS_EXTERNAL
++ # define XS_EXTERNAL(name) XSPROTO(name)
++ #endif
++
+ /*
+ * Quoting Jan Dubois of Active State:
+ * ActivePerl build 822 still identifies itself as 5.8.8 but already
+*** ../vim-8.1.0419/src/version.c 2018-09-21 13:56:21.522830206 +0200
+--- src/version.c 2018-09-21 14:00:53.928646015 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 420,
+ /**/
+
+--
+From "know your smileys":
+ :-D Big smile
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0421 b/data/vim/patches/8.1.0421
new file mode 100644
index 000000000..81dc863a7
--- /dev/null
+++ b/data/vim/patches/8.1.0421
@@ -0,0 +1,76 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0421
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0421
+Problem: MS-Windows: Ruby path is wrong for Ruby 1.9 and later.
+Solution: Let -I argument depend on Ruby version. (Ken Takata, closes #3461)
+Files: src/Make_cyg_ming.mak, src/Make_mvc.mak
+
+
+*** ../vim-8.1.0420/src/Make_cyg_ming.mak 2018-09-21 13:44:04.307661575 +0200
+--- src/Make_cyg_ming.mak 2018-09-21 14:13:13.894175913 +0200
+***************
+*** 475,483 ****
+ RUBY_19_OR_LATER = 1
+ endif
+
+- RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
+ ifdef RUBY_19_OR_LATER
+! RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
+ endif
+ ifeq (no, $(DYNAMIC_RUBY))
+ RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
+--- 475,484 ----
+ RUBY_19_OR_LATER = 1
+ endif
+
+ ifdef RUBY_19_OR_LATER
+! RUBYINC = -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
+! else
+! RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
+ endif
+ ifeq (no, $(DYNAMIC_RUBY))
+ RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
+*** ../vim-8.1.0420/src/Make_mvc.mak 2018-09-13 18:05:45.291070558 +0200
+--- src/Make_mvc.mak 2018-09-21 14:13:13.894175913 +0200
+***************
+*** 1136,1142 ****
+ CFLAGS = $(CFLAGS) -DFEAT_RUBY
+ RUBY_OBJ = $(OUTDIR)\if_ruby.obj
+ !if $(RUBY_VER) >= 19
+! RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_API_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)"
+ !else
+ RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)"
+ !endif
+--- 1136,1142 ----
+ CFLAGS = $(CFLAGS) -DFEAT_RUBY
+ RUBY_OBJ = $(OUTDIR)\if_ruby.obj
+ !if $(RUBY_VER) >= 19
+! RUBY_INC = /I "$(RUBY)\include\ruby-$(RUBY_API_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)"
+ !else
+ RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)"
+ !endif
+*** ../vim-8.1.0420/src/version.c 2018-09-21 14:01:23.152405707 +0200
+--- src/version.c 2018-09-21 14:12:58.190389981 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 421,
+ /**/
+
+--
+From "know your smileys":
+ :'-D Laughing so much that they're crying
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0422 b/data/vim/patches/8.1.0422
new file mode 100644
index 000000000..c7fc13658
--- /dev/null
+++ b/data/vim/patches/8.1.0422
@@ -0,0 +1,60 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0422
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0422
+Problem: Cannot create map file with MinGW.
+Solution: Add support for $MAP. (Ken Takata, closes #3460)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0421/src/Make_cyg_ming.mak 2018-09-21 14:31:48.037839069 +0200
+--- src/Make_cyg_ming.mak 2018-09-21 14:42:31.835638592 +0200
+***************
+*** 35,40 ****
+--- 35,43 ----
+ # set to yes for a debug build
+ DEBUG=no
+
++ # set to yes to create a mapfile
++ # MAP=yes
++
+ # set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
+ OPTIMIZE=MAXSPEED
+
+***************
+*** 936,941 ****
+--- 939,948 ----
+ LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
+ endif
+
++ ifeq (yes, $(MAP))
++ LFLAGS += -Wl,-Map=$(TARGET).map
++ endif
++
+ all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
+
+ vimrun.exe: vimrun.c
+*** ../vim-8.1.0421/src/version.c 2018-09-21 14:31:48.037839069 +0200
+--- src/version.c 2018-09-21 14:40:52.312584994 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 422,
+ /**/
+
+--
+From "know your smileys":
+ @:-() Elvis Presley
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0423 b/data/vim/patches/8.1.0423
new file mode 100644
index 000000000..3ce553fe2
--- /dev/null
+++ b/data/vim/patches/8.1.0423
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0423
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0423
+Problem: MS-Windows: using dup-close for flushing a file.
+Solution: Use _commit(). (Ken Takata, closes #3463)
+Files: src/memfile.c, src/os_mac.h, src/os_win32.h
+
+
+*** ../vim-8.1.0422/src/memfile.c 2018-02-10 18:34:22.000000000 +0100
+--- src/memfile.c 2018-09-21 14:47:04.965080463 +0200
+***************
+*** 539,547 ****
+ {
+ int status;
+ bhdr_T *hp;
+- #if defined(SYNC_DUP_CLOSE)
+- int fd;
+- #endif
+ int got_int_save = got_int;
+
+ if (mfp->mf_fd < 0) /* there is no file, nothing to do */
+--- 539,544 ----
+***************
+*** 624,636 ****
+ status = FAIL;
+ }
+ #endif
+! #ifdef SYNC_DUP_CLOSE
+! /*
+! * Win32 is a bit more work: Duplicate the file handle and close it.
+! * This should flush the file to disk.
+! */
+! if ((fd = dup(mfp->mf_fd)) >= 0)
+! close(fd);
+ #endif
+ #ifdef AMIGA
+ # if defined(__AROS__) || defined(__amigaos4__)
+--- 621,629 ----
+ status = FAIL;
+ }
+ #endif
+! #ifdef WIN32
+! if (_commit(mfp->mf_fd))
+! status = FAIL;
+ #endif
+ #ifdef AMIGA
+ # if defined(__AROS__) || defined(__amigaos4__)
+*** ../vim-8.1.0422/src/os_mac.h 2018-03-01 21:50:36.000000000 +0100
+--- src/os_mac.h 2018-09-21 14:47:04.965080463 +0200
+***************
+*** 101,107 ****
+ #define HAVE_AVAIL_MEM
+
+ #ifndef HAVE_CONFIG_H
+- /* #define SYNC_DUP_CLOSE sync() a file with dup() and close() */
+ # define HAVE_STRING_H
+ # define HAVE_STRCSPN
+ # define HAVE_MEMSET
+--- 101,106 ----
+*** ../vim-8.1.0422/src/os_win32.h 2018-08-21 19:47:44.724053803 +0200
+--- src/os_win32.h 2018-09-21 14:47:04.965080463 +0200
+***************
+*** 26,32 ****
+
+ #define BINARY_FILE_IO
+ #define USE_EXE_NAME /* use argv[0] for $VIM */
+- #define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */
+ #define USE_TERM_CONSOLE
+ #ifndef HAVE_STRING_H
+ # define HAVE_STRING_H
+--- 26,31 ----
+*** ../vim-8.1.0422/src/version.c 2018-09-21 14:43:06.795306782 +0200
+--- src/version.c 2018-09-21 14:47:32.464854956 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 423,
+ /**/
+
+--
+From "know your smileys":
+ :-F Bucktoothed vampire with one tooth missing
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0424 b/data/vim/patches/8.1.0424
new file mode 100644
index 000000000..e1ea78f41
--- /dev/null
+++ b/data/vim/patches/8.1.0424
@@ -0,0 +1,115 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0424
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0424
+Problem: Test output is very verbose, loading CI log is slow.
+Solution: Redirect output to /dev/null. (Ken Takata, closes #3456)
+Files: src/testdir/Makefile
+
+
+*** ../vim-8.1.0423/src/testdir/Makefile 2018-09-20 21:39:29.643309960 +0200
+--- src/testdir/Makefile 2018-09-21 16:32:28.010556536 +0200
+***************
+*** 9,14 ****
+--- 9,17 ----
+
+ SCRIPTSOURCE = ../../runtime
+
++ # Change this to empty to see the verbose output of tests.
++ REDIR_TEST_TO_NULL = > /dev/null
++
+ # Uncomment this line to use valgrind for memory leaks and extra warnings.
+ # The output goes into a file "valgrind.testN"
+ # Vim should be compiled with EXITFREE to avoid false warnings.
+***************
+*** 59,65 ****
+
+ test1.out: test1.in
+ -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
+! $(RUN_VIM) $*.in
+ @/bin/sh -c "if test -f wrongtermsize; \
+ then echo; \
+ echo test1 FAILED - terminal size must be 80x24 or larger; \
+--- 62,68 ----
+
+ test1.out: test1.in
+ -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
+! $(RUN_VIM) $*.in $(REDIR_TEST_TO_NULL)
+ @/bin/sh -c "if test -f wrongtermsize; \
+ then echo; \
+ echo test1 FAILED - terminal size must be 80x24 or larger; \
+***************
+*** 78,84 ****
+ # 200 msec is sufficient, but only modern sleep supports a fraction of
+ # a second, fall back to a second if it fails.
+ @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
+! $(RUN_VIM) $*.in
+
+ # For flaky tests retry one time. No tests at the moment.
+ #@/bin/sh -c "if test -f test.out -a $* = test61; then \
+--- 81,87 ----
+ # 200 msec is sufficient, but only modern sleep supports a fraction of
+ # a second, fall back to a second if it fails.
+ @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
+! $(RUN_VIM) $*.in $(REDIR_TEST_TO_NULL)
+
+ # For flaky tests retry one time. No tests at the moment.
+ #@/bin/sh -c "if test -f test.out -a $* = test61; then \
+***************
+*** 108,114 ****
+ # 200 msec is sufficient, but only modern sleep supports a fraction of
+ # a second, fall back to a second if it fails.
+ @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
+! $(RUN_VIM) $*.in
+ @/bin/sh -c "if test -f benchmark.out; then cat benchmark.out; fi"
+
+ nolog:
+--- 111,117 ----
+ # 200 msec is sufficient, but only modern sleep supports a fraction of
+ # a second, fall back to a second if it fails.
+ @-/bin/sh -c "sleep .2 > /dev/null 2>&1 || sleep 1"
+! $(RUN_VIM) $*.in $(REDIR_TEST_TO_NULL)
+ @/bin/sh -c "if test -f benchmark.out; then cat benchmark.out; fi"
+
+ nolog:
+***************
+*** 129,135 ****
+ .vim.res: writevimcmd
+ @echo "$(VIMPROG)" > vimcmd
+ @echo "$(RUN_VIMTEST)" >> vimcmd
+! $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim
+ @rm vimcmd
+
+ test_gui.res: test_gui.vim
+--- 132,138 ----
+ .vim.res: writevimcmd
+ @echo "$(VIMPROG)" > vimcmd
+ @echo "$(RUN_VIMTEST)" >> vimcmd
+! $(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim $(REDIR_TEST_TO_NULL)
+ @rm vimcmd
+
+ test_gui.res: test_gui.vim
+*** ../vim-8.1.0423/src/version.c 2018-09-21 14:48:49.644214400 +0200
+--- src/version.c 2018-09-21 16:35:42.513022884 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 424,
+ /**/
+
+--
+I AM THANKFUL...
+...for the taxes that I pay because it means that I am employed.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0425 b/data/vim/patches/8.1.0425
new file mode 100644
index 000000000..cde8ff826
--- /dev/null
+++ b/data/vim/patches/8.1.0425
@@ -0,0 +1,99 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0425
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0425
+Problem: ml_get error and crash with appendbufline(). (Masashi Iizuka)
+Solution: Set per-window buffer info. (Hirohito Higashi, closes #3455)
+Files: src/buffer.c, src/testdir/test_bufline.vim
+
+
+*** ../vim-8.1.0424/src/buffer.c 2018-09-13 18:33:02.366426166 +0200
+--- src/buffer.c 2018-09-21 16:58:58.049829001 +0200
+***************
+*** 428,434 ****
+--- 428,437 ----
+
+ FOR_ALL_WINDOWS(wp)
+ if (wp->w_buffer == buf)
++ {
+ can_unload = FALSE;
++ break;
++ }
+ }
+ if (!can_unload)
+ EMSG(_("E937: Attempt to delete a buffer that is in use"));
+***************
+*** 1742,1747 ****
+--- 1745,1753 ----
+ /* mark cursor position as being invalid */
+ curwin->w_valid = 0;
+
++ buflist_setfpos(curbuf, curwin, curbuf->b_last_cursor.lnum,
++ curbuf->b_last_cursor.col, TRUE);
++
+ /* Make sure the buffer is loaded. */
+ if (curbuf->b_ml.ml_mfp == NULL) /* need to load the file */
+ {
+*** ../vim-8.1.0424/src/testdir/test_bufline.vim 2018-06-07 18:17:42.278227523 +0200
+--- src/testdir/test_bufline.vim 2018-09-21 16:49:25.778439112 +0200
+***************
+*** 91,96 ****
+--- 91,123 ----
+ exe "bwipe! " . b
+ endfunc
+
++ func Test_appendbufline_no_E315()
++ let after = [
++ \ 'set stl=%f ls=2',
++ \ 'new',
++ \ 'let buf = bufnr("%")',
++ \ 'quit',
++ \ 'vsp',
++ \ 'exec "buffer" buf',
++ \ 'wincmd w',
++ \ 'call appendbufline(buf, 0, "abc")',
++ \ 'redraw',
++ \ 'while getbufline(buf, 1)[0] =~ "^\\s*$"',
++ \ ' sleep 10m',
++ \ 'endwhile',
++ \ 'au VimLeavePre * call writefile([v:errmsg], "Xerror")',
++ \ 'au VimLeavePre * call writefile(["done"], "Xdone")',
++ \ 'qall!',
++ \ ]
++ if !RunVim([], after, '--clean')
++ return
++ endif
++ call assert_notmatch("^E315:", readfile("Xerror")[0])
++ call assert_equal("done", readfile("Xdone")[0])
++ call delete("Xerror")
++ call delete("Xdone")
++ endfunc
++
+ func Test_deletebufline()
+ new
+ let b = bufnr('%')
+*** ../vim-8.1.0424/src/version.c 2018-09-21 16:37:20.084248861 +0200
+--- src/version.c 2018-09-21 16:58:24.382100516 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 425,
+ /**/
+
+--
+I AM THANKFUL...
+...for the mess to clean after a party because it means I have
+been surrounded by friends.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0426 b/data/vim/patches/8.1.0426
new file mode 100644
index 000000000..cd096bb5f
--- /dev/null
+++ b/data/vim/patches/8.1.0426
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0426
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0426
+Problem: Accessing invalid memory in SmcOpenConnection().
+Solution: Reduce size of errorstring by one. (Dominique Pelle, closes #3469)
+Files: src/os_unix.c, src/testdir/test_startup.vim
+
+
+*** ../vim-8.1.0425/src/os_unix.c 2018-09-13 15:33:39.609712174 +0200
+--- src/os_unix.c 2018-09-22 14:02:39.348661291 +0200
+***************
+*** 8032,8038 ****
+ &smcallbacks,
+ NULL,
+ &xsmp.clientid,
+! sizeof(errorstring),
+ errorstring);
+ if (xsmp.smcconn == NULL)
+ {
+--- 8032,8038 ----
+ &smcallbacks,
+ NULL,
+ &xsmp.clientid,
+! sizeof(errorstring) - 1,
+ errorstring);
+ if (xsmp.smcconn == NULL)
+ {
+*** ../vim-8.1.0425/src/testdir/test_startup.vim 2018-09-21 12:54:02.685586971 +0200
+--- src/testdir/test_startup.vim 2018-09-22 14:02:39.348661291 +0200
+***************
+*** 272,278 ****
+ " Test the -V[N]{filename} argument to set the 'verbose' option to N
+ " and set 'verbosefile' to filename.
+ func Test_V_file_arg()
+! if RunVim([], [], ' --clean -X -V2Xverbosefile -c "set verbose? verbosefile?" -cq')
+ let out = join(readfile('Xverbosefile'), "\n")
+ call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\n", out)
+ call assert_match("\n verbose=2\n", out)
+--- 272,278 ----
+ " Test the -V[N]{filename} argument to set the 'verbose' option to N
+ " and set 'verbosefile' to filename.
+ func Test_V_file_arg()
+! if RunVim([], [], ' --clean -V2Xverbosefile -c "set verbose? verbosefile?" -cq')
+ let out = join(readfile('Xverbosefile'), "\n")
+ call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\n", out)
+ call assert_match("\n verbose=2\n", out)
+*** ../vim-8.1.0425/src/version.c 2018-09-21 16:59:40.113489779 +0200
+--- src/version.c 2018-09-22 14:06:41.382926281 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 426,
+ /**/
+
+--
+I AM THANKFUL...
+...for a lawn that needs mowing, windows that need cleaning
+and gutters that need fixing because it means I have a home.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0427 b/data/vim/patches/8.1.0427
new file mode 100644
index 000000000..9f073acfa
--- /dev/null
+++ b/data/vim/patches/8.1.0427
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0427
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0427
+Problem: MS-Windows GUI: using invalid encoded file name.
+Solution: Drop the file name and return NULL. (Ken Takata, closes #3467)
+Files: src/gui_w32.c
+
+
+*** ../vim-8.1.0426/src/gui_w32.c 2018-07-20 05:03:10.561146715 +0200
+--- src/gui_w32.c 2018-09-22 14:32:47.488261584 +0200
+***************
+*** 3627,3633 ****
+ WCHAR *extp = NULL;
+ WCHAR *initdirp = NULL;
+ WCHAR *filterp;
+! char_u *p;
+
+ if (dflt == NULL)
+ fileBuf[0] = NUL;
+--- 3627,3633 ----
+ WCHAR *extp = NULL;
+ WCHAR *initdirp = NULL;
+ WCHAR *filterp;
+! char_u *p, *q;
+
+ if (dflt == NULL)
+ fileBuf[0] = NUL;
+***************
+*** 3713,3728 ****
+
+ /* Convert from UCS2 to 'encoding'. */
+ p = utf16_to_enc(fileBuf, NULL);
+! if (p != NULL)
+! /* when out of memory we get garbage for non-ASCII chars */
+! STRCPY(fileBuf, p);
+! vim_free(p);
+
+ /* Give focus back to main window (when using MDI). */
+ SetFocus(s_hwnd);
+
+ /* Shorten the file name if possible */
+! return vim_strsave(shorten_fname1((char_u *)fileBuf));
+ }
+ # endif /* FEAT_MBYTE */
+
+--- 3713,3728 ----
+
+ /* Convert from UCS2 to 'encoding'. */
+ p = utf16_to_enc(fileBuf, NULL);
+! if (p == NULL)
+! return NULL;
+
+ /* Give focus back to main window (when using MDI). */
+ SetFocus(s_hwnd);
+
+ /* Shorten the file name if possible */
+! q = vim_strsave(shorten_fname1(p));
+! vim_free(p);
+! return q;
+ }
+ # endif /* FEAT_MBYTE */
+
+*** ../vim-8.1.0426/src/version.c 2018-09-22 14:08:41.926157823 +0200
+--- src/version.c 2018-09-22 14:38:22.921907692 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 427,
+ /**/
+
+--
+A fool learns from his mistakes, a wise man from someone else's.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0428 b/data/vim/patches/8.1.0428
new file mode 100644
index 000000000..6e3a7b264
--- /dev/null
+++ b/data/vim/patches/8.1.0428
@@ -0,0 +1,114 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0428
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0428
+Problem: The :suspend command is not tested.
+Solution: Add a test. (Dominique Pelle, closes #3472)
+Files: src/Make_all.mak, src/testdir/test_alot.vim,
+ src/testdir/test_suspend.vim
+
+
+*** ../vim-8.1.0427/src/Make_all.mak 2018-09-14 20:10:15.874499472 +0200
+--- src/Make_all.mak 2018-09-22 21:27:23.453506886 +0200
+***************
+*** 168,173 ****
+--- 168,174 ----
+ test_stat \
+ test_statusline \
+ test_substitute \
++ test_suspend \
+ test_swap \
+ test_syn_attr \
+ test_syntax \
+*** ../vim-8.1.0427/src/testdir/test_alot.vim 2018-09-14 20:10:15.874499472 +0200
+--- src/testdir/test_alot.vim 2018-09-22 21:27:23.453506886 +0200
+***************
+*** 52,57 ****
+--- 52,58 ----
+ source test_sort.vim
+ source test_sha256.vim
+ source test_statusline.vim
++ source test_suspend.vim
+ source test_syn_attr.vim
+ source test_tabline.vim
+ source test_tabpage.vim
+*** ../vim-8.1.0427/src/testdir/test_suspend.vim 2018-09-22 21:36:00.066330569 +0200
+--- src/testdir/test_suspend.vim 2018-09-22 21:27:23.453506886 +0200
+***************
+*** 0 ****
+--- 1,51 ----
++ " Test :suspend
++
++ source shared.vim
++
++ func Test_suspend()
++ if !has('terminal') || !executable('/bin/sh')
++ return
++ endif
++
++ let buf = term_start('/bin/sh')
++ " Wait for shell prompt.
++ call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
++
++ call term_sendkeys(buf, v:progpath
++ \ . " --clean -X"
++ \ . " -c 'set nu'"
++ \ . " -c 'call setline(1, \"foo\")'"
++ \ . " Xfoo\<CR>")
++ " Cursor in terminal buffer should be on first line in spawned vim.
++ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
++
++ for suspend_cmd in [":suspend\<CR>",
++ \ ":stop\<CR>",
++ \ ":suspend!\<CR>",
++ \ ":stop!\<CR>",
++ \ "\<C-Z>"]
++ " Suspend and wait for shell prompt.
++ call term_sendkeys(buf, suspend_cmd)
++ call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
++
++ " Without 'autowrite', buffer should not be written.
++ call assert_equal(0, filereadable('Xfoo'))
++
++ call term_sendkeys(buf, "fg\<CR>")
++ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
++ endfor
++
++ " Test that :suspend! with 'autowrite' writes content of buffers if modified.
++ call term_sendkeys(buf, ":set autowrite\<CR>")
++ call assert_equal(0, filereadable('Xfoo'))
++ call term_sendkeys(buf, ":suspend\<CR>")
++ " Wait for shell prompt.
++ call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
++ call assert_equal(['foo'], readfile('Xfoo'))
++ call term_sendkeys(buf, "fg\<CR>")
++ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
++
++ exe buf . 'bwipe!'
++ call delete('Xfoo')
++ set autowrite&
++ endfunc
+*** ../vim-8.1.0427/src/version.c 2018-09-22 14:39:07.681593221 +0200
+--- src/version.c 2018-09-22 21:29:51.436437049 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 428,
+ /**/
+
+--
+From "know your smileys":
+ [:-) Frankenstein's monster
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0429 b/data/vim/patches/8.1.0429
new file mode 100644
index 000000000..462fae42d
--- /dev/null
+++ b/data/vim/patches/8.1.0429
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0429
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0429 (after 8.1.0343)
+Problem: No test for :lcd with 'shellslash'.
+Solution: Add a test. (Daniel Hahler, closes #3475)
+Files: src/testdir/test_getcwd.vim
+
+
+*** ../vim-8.1.0428/src/testdir/test_getcwd.vim 2018-02-09 20:40:03.000000000 +0100
+--- src/testdir/test_getcwd.vim 2018-09-23 19:32:18.801561143 +0200
+***************
+*** 98,100 ****
+--- 98,112 ----
+ call assert_equal("z Xdir3 1", GetCwdInfo(1, tp_nr))
+ call assert_equal(g:topdir, getcwd(-1))
+ endfunc
++
++ function Test_GetCwd_lcd_shellslash()
++ new
++ let root = fnamemodify('/', ':p')
++ exe 'lcd '.root
++ let cwd = getcwd()
++ if !exists('+shellslash') || &shellslash
++ call assert_equal(cwd[-1:], '/')
++ else
++ call assert_equal(cwd[-1:], '\')
++ endif
++ endfunc
+*** ../vim-8.1.0428/src/version.c 2018-09-22 21:36:38.162098496 +0200
+--- src/version.c 2018-09-23 19:34:59.448311507 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 429,
+ /**/
+
+--
+From "know your smileys":
+ C=}>;*{)) Drunk, devilish chef with a toupee in an updraft,
+ a mustache, and a double chin
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0430 b/data/vim/patches/8.1.0430
new file mode 100644
index 000000000..92a8df2ca
--- /dev/null
+++ b/data/vim/patches/8.1.0430
@@ -0,0 +1,44 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0430
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0430
+Problem: Xargadd file left behind after running test.
+Solution: Delete the file. (Dominique Pelle)
+Files: src/testdir/test_arglist.vim
+
+
+*** ../vim-8.1.0429/src/testdir/test_arglist.vim 2018-09-18 21:51:42.419876829 +0200
+--- src/testdir/test_arglist.vim 2018-09-23 23:15:06.204835313 +0200
+***************
+*** 94,99 ****
+--- 94,100 ----
+ call assert_equal('Xargadd', bufname('%'))
+ call assert_equal(2, line('$'))
+
++ call delete('Xargadd')
+ %argd
+ bwipe!
+ endfunc
+*** ../vim-8.1.0429/src/version.c 2018-09-23 19:36:10.215763496 +0200
+--- src/version.c 2018-09-24 21:20:21.845295031 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 430,
+ /**/
+
+--
+Common sense is what tells you that the world is flat.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0431 b/data/vim/patches/8.1.0431
new file mode 100644
index 000000000..3ccc35c90
--- /dev/null
+++ b/data/vim/patches/8.1.0431
@@ -0,0 +1,562 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0431
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0431
+Problem: The qf_jump() function is too long.
+Solution: Refactor to split it into several functions. (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0430/src/quickfix.c 2018-09-19 21:55:58.681068412 +0200
+--- src/quickfix.c 2018-09-24 21:46:42.589868380 +0200
+***************
+*** 2521,2530 ****
+ get_nth_valid_entry(
+ qf_list_T *qfl,
+ int errornr,
+! qfline_T *qf_ptr,
+! int *qf_index,
+! int dir)
+ {
+ qfline_T *prev_qf_ptr;
+ int prev_index;
+ static char_u *e_no_more_items = (char_u *)N_("E553: No more items");
+--- 2521,2531 ----
+ get_nth_valid_entry(
+ qf_list_T *qfl,
+ int errornr,
+! int dir,
+! int *new_qfidx)
+ {
++ qfline_T *qf_ptr = qfl->qf_ptr;
++ int qf_idx = qfl->qf_index;
+ qfline_T *prev_qf_ptr;
+ int prev_index;
+ static char_u *e_no_more_items = (char_u *)N_("E553: No more items");
+***************
+*** 2533,2548 ****
+ while (errornr--)
+ {
+ prev_qf_ptr = qf_ptr;
+! prev_index = *qf_index;
+
+ if (dir == FORWARD || dir == FORWARD_FILE)
+! qf_ptr = get_next_valid_entry(qfl, qf_ptr, qf_index, dir);
+ else
+! qf_ptr = get_prev_valid_entry(qfl, qf_ptr, qf_index, dir);
+ if (qf_ptr == NULL)
+ {
+ qf_ptr = prev_qf_ptr;
+! *qf_index = prev_index;
+ if (err != NULL)
+ {
+ EMSG(_(err));
+--- 2534,2549 ----
+ while (errornr--)
+ {
+ prev_qf_ptr = qf_ptr;
+! prev_index = qf_idx;
+
+ if (dir == FORWARD || dir == FORWARD_FILE)
+! qf_ptr = get_next_valid_entry(qfl, qf_ptr, &qf_idx, dir);
+ else
+! qf_ptr = get_prev_valid_entry(qfl, qf_ptr, &qf_idx, dir);
+ if (qf_ptr == NULL)
+ {
+ qf_ptr = prev_qf_ptr;
+! qf_idx = prev_index;
+ if (err != NULL)
+ {
+ EMSG(_(err));
+***************
+*** 2554,2581 ****
+ err = NULL;
+ }
+
+ return qf_ptr;
+ }
+
+ /*
+! * Get n'th (errornr) quickfix entry
+ */
+ static qfline_T *
+! get_nth_entry(
+! qf_list_T *qfl,
+! int errornr,
+! qfline_T *qf_ptr,
+! int *cur_qfidx)
+ {
+! int qf_idx = *cur_qfidx;
+
+! /* New error number is less than the current error number */
+ while (errornr < qf_idx && qf_idx > 1 && qf_ptr->qf_prev != NULL)
+ {
+ --qf_idx;
+ qf_ptr = qf_ptr->qf_prev;
+ }
+! /* New error number is greater than the current error number */
+ while (errornr > qf_idx && qf_idx < qfl->qf_count &&
+ qf_ptr->qf_next != NULL)
+ {
+--- 2555,2581 ----
+ err = NULL;
+ }
+
++ *new_qfidx = qf_idx;
+ return qf_ptr;
+ }
+
+ /*
+! * Get n'th (errornr) quickfix entry from the current entry in the quickfix
+! * list 'qfl'. Returns a pointer to the new entry and the index in 'new_qfidx'
+ */
+ static qfline_T *
+! get_nth_entry(qf_list_T *qfl, int errornr, int *new_qfidx)
+ {
+! qfline_T *qf_ptr = qfl->qf_ptr;
+! int qf_idx = qfl->qf_index;
+
+! // New error number is less than the current error number
+ while (errornr < qf_idx && qf_idx > 1 && qf_ptr->qf_prev != NULL)
+ {
+ --qf_idx;
+ qf_ptr = qf_ptr->qf_prev;
+ }
+! // New error number is greater than the current error number
+ while (errornr > qf_idx && qf_idx < qfl->qf_count &&
+ qf_ptr->qf_next != NULL)
+ {
+***************
+*** 2583,2589 ****
+ qf_ptr = qf_ptr->qf_next;
+ }
+
+! *cur_qfidx = qf_idx;
+ return qf_ptr;
+ }
+
+--- 2583,2615 ----
+ qf_ptr = qf_ptr->qf_next;
+ }
+
+! *new_qfidx = qf_idx;
+! return qf_ptr;
+! }
+!
+! /*
+! * Get a entry specied by 'errornr' and 'dir' from the current
+! * quickfix/location list. 'errornr' specifies the index of the entry and 'dir'
+! * specifies the direction (FORWARD/BACKWARD/FORWARD_FILE/BACKWARD_FILE).
+! * Returns a pointer to the entry and the index of the new entry is stored in
+! * 'new_qfidx'.
+! */
+! static qfline_T *
+! qf_get_entry(
+! qf_list_T *qfl,
+! int errornr,
+! int dir,
+! int *new_qfidx)
+! {
+! qfline_T *qf_ptr = qfl->qf_ptr;
+! int qfidx = qfl->qf_index;
+!
+! if (dir != 0) // next/prev valid entry
+! qf_ptr = get_nth_valid_entry(qfl, errornr, dir, &qfidx);
+! else if (errornr != 0) // go to specified number
+! qf_ptr = get_nth_entry(qfl, errornr, &qfidx);
+!
+! *new_qfidx = qfidx;
+ return qf_ptr;
+ }
+
+***************
+*** 2881,2886 ****
+--- 2907,2915 ----
+
+ /*
+ * Edit the selected file or help file.
++ * Returns OK if successfully edited the file, FAIL on failing to open the
++ * buffer and NOTDONE if the quickfix/location list was freed by an autocmd
++ * when opening the buffer.
+ */
+ static int
+ qf_jump_edit_buffer(
+***************
+*** 2888,2895 ****
+ qfline_T *qf_ptr,
+ int forceit,
+ win_T *oldwin,
+! int *opened_window,
+! int *abort)
+ {
+ qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+ int retval = OK;
+--- 2917,2923 ----
+ qfline_T *qf_ptr,
+ int forceit,
+ win_T *oldwin,
+! int *opened_window)
+ {
+ qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+ int retval = OK;
+***************
+*** 2925,2937 ****
+ if (!win_valid_any_tab(oldwin))
+ {
+ EMSG(_("E924: Current window was closed"));
+- *abort = TRUE;
+ *opened_window = FALSE;
+ }
+ else if (!qflist_valid(oldwin, save_qfid))
+ {
+ EMSG(_(e_loc_list_changed));
+! *abort = TRUE;
+ }
+ }
+ else if (old_qf_curlist != qi->qf_curlist
+--- 2953,2965 ----
+ if (!win_valid_any_tab(oldwin))
+ {
+ EMSG(_("E924: Current window was closed"));
+ *opened_window = FALSE;
++ return NOTDONE;
+ }
+ else if (!qflist_valid(oldwin, save_qfid))
+ {
+ EMSG(_(e_loc_list_changed));
+! return NOTDONE;
+ }
+ }
+ else if (old_qf_curlist != qi->qf_curlist
+***************
+*** 2941,2951 ****
+ EMSG(_("E925: Current quickfix was changed"));
+ else
+ EMSG(_(e_loc_list_changed));
+! *abort = TRUE;
+ }
+-
+- if (*abort)
+- retval = FAIL;
+ }
+
+ return retval;
+--- 2969,2976 ----
+ EMSG(_("E925: Current quickfix was changed"));
+ else
+ EMSG(_(e_loc_list_changed));
+! return NOTDONE;
+ }
+ }
+
+ return retval;
+***************
+*** 3066,3071 ****
+--- 3091,3180 ----
+ }
+
+ /*
++ * Find a usable window for opening a file from the quickfix/location list. If
++ * a window is not found then open a new window.
++ * Returns OK if successfully jumped or opened a window. Returns FAIL if not
++ * able to jump/open a window. Returns NOTDONE if a file is not associated
++ * with the entry.
++ */
++ static int
++ qf_jump_open_window(qf_info_T *qi, qfline_T *qf_ptr, int *opened_window)
++ {
++ // For ":helpgrep" find a help window or open one.
++ if (qf_ptr->qf_type == 1 && (!bt_help(curwin->w_buffer) || cmdmod.tab != 0))
++ if (jump_to_help_window(qi, opened_window) == FAIL)
++ return FAIL;
++
++ // If currently in the quickfix window, find another window to show the
++ // file in.
++ if (bt_quickfix(curbuf) && !*opened_window)
++ {
++ // If there is no file specified, we don't know where to go.
++ // But do advance, otherwise ":cn" gets stuck.
++ if (qf_ptr->qf_fnum == 0)
++ return NOTDONE;
++
++ if (qf_jump_to_usable_window(qf_ptr->qf_fnum, opened_window) == FAIL)
++ return FAIL;
++ }
++
++ return OK;
++ }
++
++ /*
++ * Edit a selected file from the quickfix/location list and jump to a
++ * particular line/column, adjust the folds and display a message about the
++ * jump.
++ * Returns OK on success and FAIL on failing to open the file/buffer. Returns
++ * NOTDONE if the quickfix/location list is freed by an autocmd when opening
++ * the file.
++ */
++ static int
++ qf_jump_to_buffer(
++ qf_info_T *qi,
++ int qf_index,
++ qfline_T *qf_ptr,
++ int forceit,
++ win_T *oldwin,
++ int *opened_window,
++ int openfold,
++ int print_message)
++ {
++ buf_T *old_curbuf;
++ linenr_T old_lnum;
++ int retval = OK;
++
++ // If there is a file name, read the wanted file if needed, and check
++ // autowrite etc.
++ old_curbuf = curbuf;
++ old_lnum = curwin->w_cursor.lnum;
++
++ if (qf_ptr->qf_fnum != 0)
++ {
++ retval = qf_jump_edit_buffer(qi, qf_ptr, forceit, oldwin,
++ opened_window);
++ if (retval != OK)
++ return retval;
++ }
++
++ // When not switched to another buffer, still need to set pc mark
++ if (curbuf == old_curbuf)
++ setpcmark();
++
++ qf_jump_goto_line(qf_ptr->qf_lnum, qf_ptr->qf_col, qf_ptr->qf_viscol,
++ qf_ptr->qf_pattern);
++
++ #ifdef FEAT_FOLDING
++ if ((fdo_flags & FDO_QUICKFIX) && openfold)
++ foldOpenCursor();
++ #endif
++ if (print_message)
++ qf_jump_print_msg(qi, qf_index, qf_ptr, old_curbuf, old_lnum);
++
++ return retval;
++ }
++
++ /*
+ * jump to a quickfix line
+ * if dir == FORWARD go "errornr" valid entries forward
+ * if dir == BACKWARD go "errornr" valid entries backward
+***************
+*** 3085,3099 ****
+ qfline_T *old_qf_ptr;
+ int qf_index;
+ int old_qf_index;
+- buf_T *old_curbuf;
+- linenr_T old_lnum;
+ char_u *old_swb = p_swb;
+ unsigned old_swb_flags = swb_flags;
+ int opened_window = FALSE;
+ win_T *oldwin = curwin;
+ int print_message = TRUE;
+ #ifdef FEAT_FOLDING
+! int old_KeyTyped = KeyTyped; /* getting file may reset it */
+ #endif
+ int retval = OK;
+
+--- 3194,3206 ----
+ qfline_T *old_qf_ptr;
+ int qf_index;
+ int old_qf_index;
+ char_u *old_swb = p_swb;
+ unsigned old_swb_flags = swb_flags;
+ int opened_window = FALSE;
+ win_T *oldwin = curwin;
+ int print_message = TRUE;
+ #ifdef FEAT_FOLDING
+! int old_KeyTyped = KeyTyped; // getting file may reset it
+ #endif
+ int retval = OK;
+
+***************
+*** 3113,3208 ****
+ old_qf_ptr = qf_ptr;
+ qf_index = qfl->qf_index;
+ old_qf_index = qf_index;
+! if (dir != 0) /* next/prev valid entry */
+ {
+! qf_ptr = get_nth_valid_entry(qfl, errornr, qf_ptr, &qf_index, dir);
+! if (qf_ptr == NULL)
+! {
+! qf_ptr = old_qf_ptr;
+! qf_index = old_qf_index;
+! goto theend;
+! }
+ }
+- else if (errornr != 0) /* go to specified number */
+- qf_ptr = get_nth_entry(qfl, errornr, qf_ptr, &qf_index);
+
+ qfl->qf_index = qf_index;
+ if (qf_win_pos_update(qi, old_qf_index))
+! /* No need to print the error message if it's visible in the error
+! * window */
+ print_message = FALSE;
+
+! /*
+! * For ":helpgrep" find a help window or open one.
+! */
+! if (qf_ptr->qf_type == 1 && (!bt_help(curwin->w_buffer) || cmdmod.tab != 0))
+! if (jump_to_help_window(qi, &opened_window) == FAIL)
+! goto theend;
+!
+! /*
+! * If currently in the quickfix window, find another window to show the
+! * file in.
+! */
+! if (bt_quickfix(curbuf) && !opened_window)
+! {
+! /*
+! * If there is no file specified, we don't know where to go.
+! * But do advance, otherwise ":cn" gets stuck.
+! */
+! if (qf_ptr->qf_fnum == 0)
+! goto theend;
+!
+! if (qf_jump_to_usable_window(qf_ptr->qf_fnum, &opened_window) == FAIL)
+! goto failed;
+ }
+
+! /*
+! * If there is a file name,
+! * read the wanted file if needed, and check autowrite etc.
+! */
+! old_curbuf = curbuf;
+! old_lnum = curwin->w_cursor.lnum;
+!
+! if (qf_ptr->qf_fnum != 0)
+! {
+! int abort = FALSE;
+!
+! retval = qf_jump_edit_buffer(qi, qf_ptr, forceit, oldwin,
+! &opened_window, &abort);
+! if (abort)
+! {
+! qi = NULL;
+! qf_ptr = NULL;
+! }
+! }
+!
+! if (retval == OK)
+! {
+! /* When not switched to another buffer, still need to set pc mark */
+! if (curbuf == old_curbuf)
+! setpcmark();
+!
+! if (qf_ptr != NULL)
+! qf_jump_goto_line(qf_ptr->qf_lnum, qf_ptr->qf_col,
+! qf_ptr->qf_viscol, qf_ptr->qf_pattern);
+!
+! #ifdef FEAT_FOLDING
+! if ((fdo_flags & FDO_QUICKFIX) && old_KeyTyped)
+! foldOpenCursor();
+! #endif
+! if (print_message)
+! qf_jump_print_msg(qi, qf_index, qf_ptr, old_curbuf, old_lnum);
+! }
+! else
+ {
+ if (opened_window)
+! win_close(curwin, TRUE); /* Close opened window */
+ if (qf_ptr != NULL && qf_ptr->qf_fnum != 0)
+ {
+! /*
+! * Couldn't open file, so put index back where it was. This could
+! * happen if the file was readonly and we changed something.
+! */
+ failed:
+ qf_ptr = old_qf_ptr;
+ qf_index = old_qf_index;
+--- 3220,3263 ----
+ old_qf_ptr = qf_ptr;
+ qf_index = qfl->qf_index;
+ old_qf_index = qf_index;
+!
+! qf_ptr = qf_get_entry(qfl, errornr, dir, &qf_index);
+! if (qf_ptr == NULL)
+ {
+! qf_ptr = old_qf_ptr;
+! qf_index = old_qf_index;
+! goto theend;
+ }
+
+ qfl->qf_index = qf_index;
+ if (qf_win_pos_update(qi, old_qf_index))
+! // No need to print the error message if it's visible in the error
+! // window
+ print_message = FALSE;
+
+! retval = qf_jump_open_window(qi, qf_ptr, &opened_window);
+! if (retval == FAIL)
+! goto failed;
+! if (retval == NOTDONE)
+! goto theend;
+!
+! retval = qf_jump_to_buffer(qi, qf_index, qf_ptr, forceit, oldwin,
+! &opened_window, old_KeyTyped, print_message);
+! if (retval == NOTDONE)
+! {
+! // Quickfix/location list is freed by an autocmd
+! qi = NULL;
+! qf_ptr = NULL;
+ }
+
+! if (retval != OK)
+ {
+ if (opened_window)
+! win_close(curwin, TRUE); // Close opened window
+ if (qf_ptr != NULL && qf_ptr->qf_fnum != 0)
+ {
+! // Couldn't open file, so put index back where it was. This could
+! // happen if the file was readonly and we changed something.
+ failed:
+ qf_ptr = old_qf_ptr;
+ qf_index = old_qf_index;
+***************
+*** 3216,3223 ****
+ }
+ if (p_swb != old_swb && opened_window)
+ {
+! /* Restore old 'switchbuf' value, but not when an autocommand or
+! * modeline has changed the value. */
+ if (p_swb == empty_option)
+ {
+ p_swb = old_swb;
+--- 3271,3278 ----
+ }
+ if (p_swb != old_swb && opened_window)
+ {
+! // Restore old 'switchbuf' value, but not when an autocommand or
+! // modeline has changed the value.
+ if (p_swb == empty_option)
+ {
+ p_swb = old_swb;
+*** ../vim-8.1.0430/src/version.c 2018-09-24 21:32:07.321727079 +0200
+--- src/version.c 2018-09-24 21:47:33.241429809 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 431,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+92. It takes you two hours to check all 14 of your mailboxes.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0432 b/data/vim/patches/8.1.0432
new file mode 100644
index 000000000..fa1b786f9
--- /dev/null
+++ b/data/vim/patches/8.1.0432
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0432
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0432
+Problem: Compiler warning for signed/unsigned.
+Solution: Add type cast. (Mike Williams)
+Files: src/xdiff/xemit.c
+
+
+*** ../vim-8.1.0431/src/xdiff/xemit.c 2018-09-10 22:18:47.785610418 +0200
+--- src/xdiff/xemit.c 2018-09-25 18:57:25.291739843 +0200
+***************
+*** 31,37 ****
+
+
+ static int xdl_emit_record(xdfile_t *xdf, long ri, char const *pre, xdemitcb_t *ecb) {
+! long size, psize = strlen(pre);
+ char const *rec;
+
+ size = xdl_get_rec(xdf, ri, &rec);
+--- 31,37 ----
+
+
+ static int xdl_emit_record(xdfile_t *xdf, long ri, char const *pre, xdemitcb_t *ecb) {
+! long size, psize = (long)strlen(pre);
+ char const *rec;
+
+ size = xdl_get_rec(xdf, ri, &rec);
+*** ../vim-8.1.0431/src/version.c 2018-09-24 21:50:08.932086794 +0200
+--- src/version.c 2018-09-25 18:58:40.595292389 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 432,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+96. On Super Bowl Sunday, you followed the score by going to the
+ Yahoo main page instead of turning on the TV.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0433 b/data/vim/patches/8.1.0433
new file mode 100644
index 000000000..0a8dddde8
--- /dev/null
+++ b/data/vim/patches/8.1.0433
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0433
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0433
+Problem: Mapping can obtain text from inputsecret(). (Tommy Allen)
+Solution: Disallow CTRL-R = and CTRL-\ e when using inputsecret().
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0432/src/ex_getln.c 2018-09-16 17:07:40.125853848 +0200
+--- src/ex_getln.c 2018-09-25 20:44:56.972610421 +0200
+***************
+*** 1308,1314 ****
+ /* CTRL-\ e doesn't work when obtaining an expression, unless it
+ * is in a mapping. */
+ if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
+! || (ccline.cmdfirstc == '=' && KeyTyped)))
+ {
+ vungetc(c);
+ c = Ctrl_BSL;
+--- 1308,1318 ----
+ /* CTRL-\ e doesn't work when obtaining an expression, unless it
+ * is in a mapping. */
+ if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
+! || (ccline.cmdfirstc == '=' && KeyTyped)
+! #ifdef FEAT_EVAL
+! || cmdline_star
+! #endif
+! ))
+ {
+ vungetc(c);
+ c = Ctrl_BSL;
+***************
+*** 1801,1807 ****
+ new_cmdpos = -1;
+ if (c == '=')
+ {
+! if (ccline.cmdfirstc == '=')/* can't do this recursively */
+ {
+ beep_flush();
+ c = ESC;
+--- 1805,1812 ----
+ new_cmdpos = -1;
+ if (c == '=')
+ {
+! if (ccline.cmdfirstc == '=' // can't do this recursively
+! || cmdline_star) // or when typing a password
+ {
+ beep_flush();
+ c = ESC;
+*** ../vim-8.1.0432/src/version.c 2018-09-25 18:59:16.903072148 +0200
+--- src/version.c 2018-09-25 20:46:03.368127754 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 433,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+99. The hum of a cooling fan and the click of keys is comforting to you.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0434 b/data/vim/patches/8.1.0434
new file mode 100644
index 000000000..4fd7d7394
--- /dev/null
+++ b/data/vim/patches/8.1.0434
@@ -0,0 +1,335 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0434
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0434
+Problem: copy_loclist() is too long.
+Solution: Split in multiple functions. (Yegappan Lakshmanan)
+Files: src/proto/quickfix.pro, src/quickfix.c, src/window.c
+
+
+*** ../vim-8.1.0433/src/proto/quickfix.pro 2018-07-25 22:36:48.987518583 +0200
+--- src/proto/quickfix.pro 2018-09-25 22:06:03.183095511 +0200
+***************
+*** 1,7 ****
+ /* quickfix.c */
+ int qf_init(win_T *wp, char_u *efile, char_u *errorformat, int newlist, char_u *qf_title, char_u *enc);
+ void qf_free_all(win_T *wp);
+! void copy_loclist(win_T *from, win_T *to);
+ void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
+ void qf_list(exarg_T *eap);
+ void qf_age(exarg_T *eap);
+--- 1,7 ----
+ /* quickfix.c */
+ int qf_init(win_T *wp, char_u *efile, char_u *errorformat, int newlist, char_u *qf_title, char_u *enc);
+ void qf_free_all(win_T *wp);
+! void copy_loclist_stack(win_T *from, win_T *to);
+ void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
+ void qf_list(exarg_T *eap);
+ void qf_age(exarg_T *eap);
+*** ../vim-8.1.0433/src/quickfix.c 2018-09-24 21:50:08.932086794 +0200
+--- src/quickfix.c 2018-09-25 22:06:03.187095471 +0200
+***************
+*** 2044,2165 ****
+ }
+
+ /*
+! * Copy the location list from window "from" to window "to".
+ */
+ void
+! copy_loclist(win_T *from, win_T *to)
+ {
+ qf_info_T *qi;
+ int idx;
+- int i;
+
+! /*
+! * When copying from a location list window, copy the referenced
+! * location list. For other windows, copy the location list for
+! * that window.
+! */
+ if (IS_LL_WINDOW(from))
+ qi = from->w_llist_ref;
+ else
+ qi = from->w_llist;
+
+! if (qi == NULL) /* no location list to copy */
+ return;
+
+! /* allocate a new location list */
+ if ((to->w_llist = ll_new_list()) == NULL)
+ return;
+
+ to->w_llist->qf_listcount = qi->qf_listcount;
+
+! /* Copy the location lists one at a time */
+ for (idx = 0; idx < qi->qf_listcount; ++idx)
+ {
+- qf_list_T *from_qfl;
+- qf_list_T *to_qfl;
+-
+ to->w_llist->qf_curlist = idx;
+
+! from_qfl = &qi->qf_lists[idx];
+! to_qfl = &to->w_llist->qf_lists[idx];
+!
+! /* Some of the fields are populated by qf_add_entry() */
+! to_qfl->qf_nonevalid = from_qfl->qf_nonevalid;
+! to_qfl->qf_count = 0;
+! to_qfl->qf_index = 0;
+! to_qfl->qf_start = NULL;
+! to_qfl->qf_last = NULL;
+! to_qfl->qf_ptr = NULL;
+! if (from_qfl->qf_title != NULL)
+! to_qfl->qf_title = vim_strsave(from_qfl->qf_title);
+! else
+! to_qfl->qf_title = NULL;
+! if (from_qfl->qf_ctx != NULL)
+! {
+! to_qfl->qf_ctx = alloc_tv();
+! if (to_qfl->qf_ctx != NULL)
+! copy_tv(from_qfl->qf_ctx, to_qfl->qf_ctx);
+! }
+! else
+! to_qfl->qf_ctx = NULL;
+!
+! if (from_qfl->qf_count)
+! {
+! qfline_T *from_qfp;
+! qfline_T *prevp;
+!
+! /* copy all the location entries in this list */
+! for (i = 0, from_qfp = from_qfl->qf_start;
+! i < from_qfl->qf_count && from_qfp != NULL;
+! ++i, from_qfp = from_qfp->qf_next)
+! {
+! if (qf_add_entry(to->w_llist,
+! to->w_llist->qf_curlist,
+! NULL,
+! NULL,
+! from_qfp->qf_module,
+! 0,
+! from_qfp->qf_text,
+! from_qfp->qf_lnum,
+! from_qfp->qf_col,
+! from_qfp->qf_viscol,
+! from_qfp->qf_pattern,
+! from_qfp->qf_nr,
+! 0,
+! from_qfp->qf_valid) == FAIL)
+! {
+! qf_free_all(to);
+! return;
+! }
+! /*
+! * qf_add_entry() will not set the qf_num field, as the
+! * directory and file names are not supplied. So the qf_fnum
+! * field is copied here.
+! */
+! prevp = to->w_llist->qf_lists[to->w_llist->qf_curlist].qf_last;
+! prevp->qf_fnum = from_qfp->qf_fnum; /* file number */
+! prevp->qf_type = from_qfp->qf_type; /* error type */
+! if (from_qfl->qf_ptr == from_qfp)
+! to_qfl->qf_ptr = prevp; /* current location */
+! }
+! }
+!
+! to_qfl->qf_index = from_qfl->qf_index; /* current index in the list */
+!
+! /* Assign a new ID for the location list */
+! to_qfl->qf_id = ++last_qf_id;
+! to_qfl->qf_changedtick = 0L;
+!
+! /* When no valid entries are present in the list, qf_ptr points to
+! * the first item in the list */
+! if (to_qfl->qf_nonevalid)
+ {
+! to_qfl->qf_ptr = to_qfl->qf_start;
+! to_qfl->qf_index = 1;
+ }
+ }
+
+! to->w_llist->qf_curlist = qi->qf_curlist; /* current list */
+ }
+
+ /*
+--- 2044,2179 ----
+ }
+
+ /*
+! * Copy location list entries from 'from_qfl' to 'to_qfl'.
+! */
+! static int
+! copy_loclist_entries(qf_list_T *from_qfl, qf_list_T *to_qfl, qf_info_T *to_qi)
+! {
+! int i;
+! qfline_T *from_qfp;
+! qfline_T *prevp;
+!
+! // copy all the location entries in this list
+! for (i = 0, from_qfp = from_qfl->qf_start;
+! i < from_qfl->qf_count && from_qfp != NULL;
+! ++i, from_qfp = from_qfp->qf_next)
+! {
+! if (qf_add_entry(to_qi,
+! to_qi->qf_curlist,
+! NULL,
+! NULL,
+! from_qfp->qf_module,
+! 0,
+! from_qfp->qf_text,
+! from_qfp->qf_lnum,
+! from_qfp->qf_col,
+! from_qfp->qf_viscol,
+! from_qfp->qf_pattern,
+! from_qfp->qf_nr,
+! 0,
+! from_qfp->qf_valid) == FAIL)
+! return FAIL;
+!
+! // qf_add_entry() will not set the qf_num field, as the
+! // directory and file names are not supplied. So the qf_fnum
+! // field is copied here.
+! prevp = to_qfl->qf_last;
+! prevp->qf_fnum = from_qfp->qf_fnum; // file number
+! prevp->qf_type = from_qfp->qf_type; // error type
+! if (from_qfl->qf_ptr == from_qfp)
+! to_qfl->qf_ptr = prevp; // current location
+! }
+!
+! return OK;
+! }
+!
+! /*
+! * Copy the specified location list 'from_qfl' to 'to_qfl'.
+! */
+! static int
+! copy_loclist(qf_list_T *from_qfl, qf_list_T *to_qfl, qf_info_T *to_qi)
+! {
+! // Some of the fields are populated by qf_add_entry()
+! to_qfl->qf_nonevalid = from_qfl->qf_nonevalid;
+! to_qfl->qf_count = 0;
+! to_qfl->qf_index = 0;
+! to_qfl->qf_start = NULL;
+! to_qfl->qf_last = NULL;
+! to_qfl->qf_ptr = NULL;
+! if (from_qfl->qf_title != NULL)
+! to_qfl->qf_title = vim_strsave(from_qfl->qf_title);
+! else
+! to_qfl->qf_title = NULL;
+! if (from_qfl->qf_ctx != NULL)
+! {
+! to_qfl->qf_ctx = alloc_tv();
+! if (to_qfl->qf_ctx != NULL)
+! copy_tv(from_qfl->qf_ctx, to_qfl->qf_ctx);
+! }
+! else
+! to_qfl->qf_ctx = NULL;
+!
+! if (from_qfl->qf_count)
+! if (copy_loclist_entries(from_qfl, to_qfl, to_qi) == FAIL)
+! return FAIL;
+!
+! to_qfl->qf_index = from_qfl->qf_index; // current index in the list
+!
+! // Assign a new ID for the location list
+! to_qfl->qf_id = ++last_qf_id;
+! to_qfl->qf_changedtick = 0L;
+!
+! // When no valid entries are present in the list, qf_ptr points to
+! // the first item in the list
+! if (to_qfl->qf_nonevalid)
+! {
+! to_qfl->qf_ptr = to_qfl->qf_start;
+! to_qfl->qf_index = 1;
+! }
+!
+! return OK;
+! }
+!
+! /*
+! * Copy the location list stack 'from' window to 'to' window.
+ */
+ void
+! copy_loclist_stack(win_T *from, win_T *to)
+ {
+ qf_info_T *qi;
+ int idx;
+
+! // When copying from a location list window, copy the referenced
+! // location list. For other windows, copy the location list for
+! // that window.
+ if (IS_LL_WINDOW(from))
+ qi = from->w_llist_ref;
+ else
+ qi = from->w_llist;
+
+! if (qi == NULL) // no location list to copy
+ return;
+
+! // allocate a new location list
+ if ((to->w_llist = ll_new_list()) == NULL)
+ return;
+
+ to->w_llist->qf_listcount = qi->qf_listcount;
+
+! // Copy the location lists one at a time
+ for (idx = 0; idx < qi->qf_listcount; ++idx)
+ {
+ to->w_llist->qf_curlist = idx;
+
+! if (copy_loclist(&qi->qf_lists[idx],
+! &to->w_llist->qf_lists[idx], to->w_llist) == FAIL)
+ {
+! qf_free_all(to);
+! return;
+ }
+ }
+
+! to->w_llist->qf_curlist = qi->qf_curlist; // current list
+ }
+
+ /*
+*** ../vim-8.1.0433/src/window.c 2018-09-13 15:33:39.609712174 +0200
+--- src/window.c 2018-09-25 22:06:03.187095471 +0200
+***************
+*** 1308,1314 ****
+ newp->w_llist_ref = NULL;
+ }
+ else
+! copy_loclist(oldp, newp);
+ #endif
+ newp->w_localdir = (oldp->w_localdir == NULL)
+ ? NULL : vim_strsave(oldp->w_localdir);
+--- 1308,1314 ----
+ newp->w_llist_ref = NULL;
+ }
+ else
+! copy_loclist_stack(oldp, newp);
+ #endif
+ newp->w_localdir = (oldp->w_localdir == NULL)
+ ? NULL : vim_strsave(oldp->w_localdir);
+*** ../vim-8.1.0433/src/version.c 2018-09-25 20:48:53.882887698 +0200
+--- src/version.c 2018-09-25 22:07:03.802483924 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 434,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+100. The most exciting sporting events you noticed during summer 1996
+ was Netscape vs. Microsoft.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0435 b/data/vim/patches/8.1.0435
new file mode 100644
index 000000000..f31fa31f3
--- /dev/null
+++ b/data/vim/patches/8.1.0435
@@ -0,0 +1,78 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0435
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0435
+Problem: Cursorline highlight not removed in some situation. (Vitaly
+ Yashin)
+Solution: Reset last_cursorline when resetting 'cursorline'. (Christian
+ Brabandt, closes #3481)
+Files: src/move.c, src/proto/move.pro, src/option.c
+
+
+*** ../vim-8.1.0434/src/move.c 2018-09-12 23:15:45.257659803 +0200
+--- src/move.c 2018-09-25 22:17:39.176082368 +0200
+***************
+*** 125,130 ****
+--- 125,136 ----
+
+ #ifdef FEAT_SYN_HL
+ static linenr_T last_cursorline = 0;
++
++ void
++ reset_cursorline(void)
++ {
++ last_cursorline = 0;
++ }
+ #endif
+
+ /*
+*** ../vim-8.1.0434/src/proto/move.pro 2018-05-17 13:52:46.000000000 +0200
+--- src/proto/move.pro 2018-09-25 22:13:06.338829816 +0200
+***************
+*** 1,4 ****
+--- 1,5 ----
+ /* move.c */
++ void reset_cursorline(void);
+ void update_topline_redraw(void);
+ void update_topline(void);
+ void update_curswant(void);
+*** ../vim-8.1.0434/src/option.c 2018-09-21 12:24:08.618955563 +0200
+--- src/option.c 2018-09-25 22:14:29.057996665 +0200
+***************
+*** 8306,8311 ****
+--- 8306,8316 ----
+ p_lrm = !p_lnr;
+ #endif
+
++ #ifdef FEAT_SYN_HL
++ else if ((int *)varp == &curwin->w_p_cul && !value && old_value)
++ reset_cursorline();
++ #endif
++
+ #ifdef FEAT_PERSISTENT_UNDO
+ /* 'undofile' */
+ else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf)
+*** ../vim-8.1.0434/src/version.c 2018-09-25 22:08:10.933806882 +0200
+--- src/version.c 2018-09-25 22:16:09.888981316 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 435,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+101. U can read htis w/o ny porblm and cant figur eout Y its evn listd.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0436 b/data/vim/patches/8.1.0436
new file mode 100644
index 000000000..4f8fabb03
--- /dev/null
+++ b/data/vim/patches/8.1.0436
@@ -0,0 +1,92 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0436
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0436
+Problem: Can get the text of inputsecret() with getcmdline(). (Tommy Allen)
+Solution: Don't return the text.
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0435/src/ex_getln.c 2018-09-25 20:48:53.882887698 +0200
+--- src/ex_getln.c 2018-09-25 22:24:49.489341379 +0200
+***************
+*** 1310,1316 ****
+ if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
+ || (ccline.cmdfirstc == '=' && KeyTyped)
+ #ifdef FEAT_EVAL
+! || cmdline_star
+ #endif
+ ))
+ {
+--- 1310,1316 ----
+ if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
+ || (ccline.cmdfirstc == '=' && KeyTyped)
+ #ifdef FEAT_EVAL
+! || cmdline_star > 0
+ #endif
+ ))
+ {
+***************
+*** 1805,1812 ****
+ new_cmdpos = -1;
+ if (c == '=')
+ {
+! if (ccline.cmdfirstc == '=' // can't do this recursively
+! || cmdline_star) // or when typing a password
+ {
+ beep_flush();
+ c = ESC;
+--- 1805,1812 ----
+ new_cmdpos = -1;
+ if (c == '=')
+ {
+! if (ccline.cmdfirstc == '=' // can't do this recursively
+! || cmdline_star > 0) // or when typing a password
+ {
+ beep_flush();
+ c = ESC;
+***************
+*** 6506,6513 ****
+ char_u *
+ get_cmdline_str(void)
+ {
+! struct cmdline_info *p = get_ccline_ptr();
+
+ if (p == NULL)
+ return NULL;
+ return vim_strnsave(p->cmdbuff, p->cmdlen);
+--- 6506,6516 ----
+ char_u *
+ get_cmdline_str(void)
+ {
+! struct cmdline_info *p;
+
++ if (cmdline_star > 0)
++ return NULL;
++ p = get_ccline_ptr();
+ if (p == NULL)
+ return NULL;
+ return vim_strnsave(p->cmdbuff, p->cmdlen);
+*** ../vim-8.1.0435/src/version.c 2018-09-25 22:17:51.111962197 +0200
+--- src/version.c 2018-09-25 22:27:15.498025693 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 436,
+ /**/
+
+--
+To be rich is not the end, but only a change of worries.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0437 b/data/vim/patches/8.1.0437
new file mode 100644
index 000000000..0e573f976
--- /dev/null
+++ b/data/vim/patches/8.1.0437
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0437
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0437
+Problem: May access freed memory when syntax HL times out. (Philipp Gesang)
+Solution: Clear b_sst_first when clearing b_sst_array.
+Files: src/syntax.c
+
+
+*** ../vim-8.1.0436/src/syntax.c 2018-09-10 21:04:09.872392623 +0200
+--- src/syntax.c 2018-09-28 22:18:50.261769939 +0200
+***************
+*** 1192,1197 ****
+--- 1192,1198 ----
+ for (p = block->b_sst_first; p != NULL; p = p->sst_next)
+ clear_syn_state(p);
+ VIM_CLEAR(block->b_sst_array);
++ block->b_sst_first = NULL;
+ block->b_sst_len = 0;
+ }
+ }
+***************
+*** 1323,1331 ****
+ synstate_T *p, *prev, *np;
+ linenr_T n;
+
+- if (block->b_sst_array == NULL) /* nothing to do */
+- return;
+-
+ prev = NULL;
+ for (p = block->b_sst_first; p != NULL; )
+ {
+--- 1324,1329 ----
+***************
+*** 1378,1384 ****
+ int dist;
+ int retval = FALSE;
+
+! if (syn_block->b_sst_array == NULL || syn_block->b_sst_first == NULL)
+ return retval;
+
+ /* Compute normal distance between non-displayed entries. */
+--- 1376,1382 ----
+ int dist;
+ int retval = FALSE;
+
+! if (syn_block->b_sst_first == NULL)
+ return retval;
+
+ /* Compute normal distance between non-displayed entries. */
+*** ../vim-8.1.0436/src/version.c 2018-09-25 22:27:31.958075001 +0200
+--- src/version.c 2018-09-28 22:18:00.054149809 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 437,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+109. You actually read -- and enjoy -- lists like this.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0438 b/data/vim/patches/8.1.0438
new file mode 100644
index 000000000..b3354224c
--- /dev/null
+++ b/data/vim/patches/8.1.0438
@@ -0,0 +1,344 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0438
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0438
+Problem: The ex_make() function is too long.
+Solution: Split it into several functions. (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0437/src/quickfix.c 2018-09-25 22:08:10.933806882 +0200
+--- src/quickfix.c 2018-09-28 23:07:22.967590997 +0200
+***************
+*** 148,154 ****
+ static buf_T *qf_find_buf(qf_info_T *qi);
+ static void qf_update_buffer(qf_info_T *qi, qfline_T *old_last);
+ static void qf_fill_buffer(qf_info_T *qi, buf_T *buf, qfline_T *old_last);
+- static char_u *get_mef_name(void);
+ static buf_T *load_dummy_buffer(char_u *fname, char_u *dirname_start, char_u *resulting_dir);
+ static void wipe_dummy_buffer(buf_T *buf, char_u *dirname_start);
+ static void unload_dummy_buffer(buf_T *buf, char_u *dirname_start);
+--- 148,153 ----
+***************
+*** 4480,4485 ****
+--- 4479,4594 ----
+ }
+
+ /*
++ * Return the make/grep autocmd name.
++ */
++ static char_u *
++ make_get_auname(cmdidx_T cmdidx)
++ {
++ switch (cmdidx)
++ {
++ case CMD_make: return (char_u *)"make";
++ case CMD_lmake: return (char_u *)"lmake";
++ case CMD_grep: return (char_u *)"grep";
++ case CMD_lgrep: return (char_u *)"lgrep";
++ case CMD_grepadd: return (char_u *)"grepadd";
++ case CMD_lgrepadd: return (char_u *)"lgrepadd";
++ default: return NULL;
++ }
++ }
++
++ /*
++ * Return the name for the errorfile, in allocated memory.
++ * Find a new unique name when 'makeef' contains "##".
++ * Returns NULL for error.
++ */
++ static char_u *
++ get_mef_name(void)
++ {
++ char_u *p;
++ char_u *name;
++ static int start = -1;
++ static int off = 0;
++ #ifdef HAVE_LSTAT
++ stat_T sb;
++ #endif
++
++ if (*p_mef == NUL)
++ {
++ name = vim_tempname('e', FALSE);
++ if (name == NULL)
++ EMSG(_(e_notmp));
++ return name;
++ }
++
++ for (p = p_mef; *p; ++p)
++ if (p[0] == '#' && p[1] == '#')
++ break;
++
++ if (*p == NUL)
++ return vim_strsave(p_mef);
++
++ // Keep trying until the name doesn't exist yet.
++ for (;;)
++ {
++ if (start == -1)
++ start = mch_get_pid();
++ else
++ off += 19;
++
++ name = alloc((unsigned)STRLEN(p_mef) + 30);
++ if (name == NULL)
++ break;
++ STRCPY(name, p_mef);
++ sprintf((char *)name + (p - p_mef), "%d%d", start, off);
++ STRCAT(name, p + 2);
++ if (mch_getperm(name) < 0
++ #ifdef HAVE_LSTAT
++ // Don't accept a symbolic link, it's a security risk.
++ && mch_lstat((char *)name, &sb) < 0
++ #endif
++ )
++ break;
++ vim_free(name);
++ }
++ return name;
++ }
++
++ /*
++ * Form the complete command line to invoke 'make'/'grep'. Quote the command
++ * using 'shellquote' and append 'shellpipe'. Echo the fully formed command.
++ */
++ static char_u *
++ make_get_fullcmd(char_u *makecmd, char_u *fname)
++ {
++ char_u *cmd;
++ unsigned len;
++
++ len = (unsigned)STRLEN(p_shq) * 2 + (unsigned)STRLEN(makecmd) + 1;
++ if (*p_sp != NUL)
++ len += (unsigned)STRLEN(p_sp) + (unsigned)STRLEN(fname) + 3;
++ cmd = alloc(len);
++ if (cmd == NULL)
++ return NULL;
++ sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)makecmd,
++ (char *)p_shq);
++
++ // If 'shellpipe' empty: don't redirect to 'errorfile'.
++ if (*p_sp != NUL)
++ append_redir(cmd, len, p_sp, fname);
++
++ // Display the fully formed command. Output a newline if there's something
++ // else than the :make command that was typed (in which case the cursor is
++ // in column 0).
++ if (msg_col == 0)
++ msg_didout = FALSE;
++ msg_start();
++ MSG_PUTS(":!");
++ msg_outtrans(cmd); // show what we are doing
++
++ return cmd;
++ }
++
++ /*
+ * Used for ":make", ":lmake", ":grep", ":lgrep", ":grepadd", and ":lgrepadd"
+ */
+ void
+***************
+*** 4488,4517 ****
+ char_u *fname;
+ char_u *cmd;
+ char_u *enc = NULL;
+- unsigned len;
+ win_T *wp = NULL;
+ qf_info_T *qi = &ql_info;
+ int res;
+ char_u *au_name = NULL;
+ int_u save_qfid;
+
+! /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */
+ if (grep_internal(eap->cmdidx))
+ {
+ ex_vimgrep(eap);
+ return;
+ }
+
+! switch (eap->cmdidx)
+! {
+! case CMD_make: au_name = (char_u *)"make"; break;
+! case CMD_lmake: au_name = (char_u *)"lmake"; break;
+! case CMD_grep: au_name = (char_u *)"grep"; break;
+! case CMD_lgrep: au_name = (char_u *)"lgrep"; break;
+! case CMD_grepadd: au_name = (char_u *)"grepadd"; break;
+! case CMD_lgrepadd: au_name = (char_u *)"lgrepadd"; break;
+! default: break;
+! }
+ if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+ curbuf->b_fname, TRUE, curbuf))
+ {
+--- 4597,4616 ----
+ char_u *fname;
+ char_u *cmd;
+ char_u *enc = NULL;
+ win_T *wp = NULL;
+ qf_info_T *qi = &ql_info;
+ int res;
+ char_u *au_name = NULL;
+ int_u save_qfid;
+
+! // Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal".
+ if (grep_internal(eap->cmdidx))
+ {
+ ex_vimgrep(eap);
+ return;
+ }
+
+! au_name = make_get_auname(eap->cmdidx);
+ if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+ curbuf->b_fname, TRUE, curbuf))
+ {
+***************
+*** 4531,4567 ****
+ fname = get_mef_name();
+ if (fname == NULL)
+ return;
+! mch_remove(fname); /* in case it's not unique */
+
+! /*
+! * If 'shellpipe' empty: don't redirect to 'errorfile'.
+! */
+! len = (unsigned)STRLEN(p_shq) * 2 + (unsigned)STRLEN(eap->arg) + 1;
+! if (*p_sp != NUL)
+! len += (unsigned)STRLEN(p_sp) + (unsigned)STRLEN(fname) + 3;
+! cmd = alloc(len);
+ if (cmd == NULL)
+ return;
+- sprintf((char *)cmd, "%s%s%s", (char *)p_shq, (char *)eap->arg,
+- (char *)p_shq);
+- if (*p_sp != NUL)
+- append_redir(cmd, len, p_sp, fname);
+- /*
+- * Output a newline if there's something else than the :make command that
+- * was typed (in which case the cursor is in column 0).
+- */
+- if (msg_col == 0)
+- msg_didout = FALSE;
+- msg_start();
+- MSG_PUTS(":!");
+- msg_outtrans(cmd); /* show what we are doing */
+
+! /* let the shell know if we are redirecting output or not */
+ do_shell(cmd, *p_sp != NUL ? SHELL_DOOUT : 0);
+
+ #ifdef AMIGA
+ out_flush();
+! /* read window status report and redraw before message */
+ (void)char_avail();
+ #endif
+
+--- 4630,4647 ----
+ fname = get_mef_name();
+ if (fname == NULL)
+ return;
+! mch_remove(fname); // in case it's not unique
+
+! cmd = make_get_fullcmd(eap->arg, fname);
+ if (cmd == NULL)
+ return;
+
+! // let the shell know if we are redirecting output or not
+ do_shell(cmd, *p_sp != NUL ? SHELL_DOOUT : 0);
+
+ #ifdef AMIGA
+ out_flush();
+! // read window status report and redraw before message
+ (void)char_avail();
+ #endif
+
+***************
+*** 4596,4658 ****
+ }
+
+ /*
+- * Return the name for the errorfile, in allocated memory.
+- * Find a new unique name when 'makeef' contains "##".
+- * Returns NULL for error.
+- */
+- static char_u *
+- get_mef_name(void)
+- {
+- char_u *p;
+- char_u *name;
+- static int start = -1;
+- static int off = 0;
+- #ifdef HAVE_LSTAT
+- stat_T sb;
+- #endif
+-
+- if (*p_mef == NUL)
+- {
+- name = vim_tempname('e', FALSE);
+- if (name == NULL)
+- EMSG(_(e_notmp));
+- return name;
+- }
+-
+- for (p = p_mef; *p; ++p)
+- if (p[0] == '#' && p[1] == '#')
+- break;
+-
+- if (*p == NUL)
+- return vim_strsave(p_mef);
+-
+- /* Keep trying until the name doesn't exist yet. */
+- for (;;)
+- {
+- if (start == -1)
+- start = mch_get_pid();
+- else
+- off += 19;
+-
+- name = alloc((unsigned)STRLEN(p_mef) + 30);
+- if (name == NULL)
+- break;
+- STRCPY(name, p_mef);
+- sprintf((char *)name + (p - p_mef), "%d%d", start, off);
+- STRCAT(name, p + 2);
+- if (mch_getperm(name) < 0
+- #ifdef HAVE_LSTAT
+- /* Don't accept a symbolic link, it's a security risk. */
+- && mch_lstat((char *)name, &sb) < 0
+- #endif
+- )
+- break;
+- vim_free(name);
+- }
+- return name;
+- }
+-
+- /*
+ * Returns the number of valid entries in the current quickfix/location list.
+ */
+ int
+--- 4676,4681 ----
+*** ../vim-8.1.0437/src/version.c 2018-09-28 22:26:47.790139298 +0200
+--- src/version.c 2018-09-28 23:08:51.738912574 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 438,
+ /**/
+
+--
+Nobody will ever need more than 640 kB RAM.
+ -- Bill Gates, 1983
+Windows 98 requires 16 MB RAM.
+ -- Bill Gates, 1999
+Logical conclusion: Nobody will ever need Windows 98.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0439 b/data/vim/patches/8.1.0439
new file mode 100644
index 000000000..98670415a
--- /dev/null
+++ b/data/vim/patches/8.1.0439
@@ -0,0 +1,600 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0439
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0439
+Problem: Recursive use of getcmdline() still not protected.
+Solution: Instead of saving the command buffer when making a call which may
+ cause recursiveness, save the buffer when actually being called
+ recursively.
+Files: src/ex_getln.c, src/proto/ex_getln.pro, src/getchar.c, src/main.c
+
+
+*** ../vim-8.1.0438/src/ex_getln.c 2018-09-25 22:27:31.958075001 +0200
+--- src/ex_getln.c 2018-09-30 17:09:47.106527162 +0200
+***************
+*** 44,56 ****
+ # endif
+ };
+
+! /* The current cmdline_info. It is initialized in getcmdline() and after that
+! * used by other functions. When invoking getcmdline() recursively it needs
+! * to be saved with save_cmdline() and restored with restore_cmdline().
+! * TODO: make it local to getcmdline() and pass it around. */
+ static struct cmdline_info ccline;
+
+! static int cmd_showtail; /* Only show path tail in lists ? */
+
+ #ifdef FEAT_EVAL
+ static int new_cmdpos; /* position set by set_cmdline_pos() */
+--- 44,55 ----
+ # endif
+ };
+
+! // The current cmdline_info. It is initialized in getcmdline() and after that
+! // used by other functions. When invoking getcmdline() recursively it needs
+! // to be saved with save_cmdline() and restored with restore_cmdline().
+ static struct cmdline_info ccline;
+
+! static int cmd_showtail; /* Only show path tail in lists ? */
+
+ #ifdef FEAT_EVAL
+ static int new_cmdpos; /* position set by set_cmdline_pos() */
+***************
+*** 91,96 ****
+--- 90,96 ----
+ static int cmd_fkmap = 0; /* Farsi mapping during command line */
+ #endif
+
++ static char_u *getcmdline_int(int firstc, long count, int indent, int init_ccline);
+ static int cmdline_charsize(int idx);
+ static void set_cmdspos(void);
+ static void set_cmdspos_cursor(void);
+***************
+*** 463,469 ****
+ int skiplen, patlen;
+ int found; // do_search() result
+ pos_T end_pos;
+- struct cmdline_info save_ccline;
+ #ifdef FEAT_RELTIME
+ proftime_T tm;
+ #endif
+--- 463,468 ----
+***************
+*** 601,609 ****
+ if (p_ru && curwin->w_status_height > 0)
+ curwin->w_redr_status = TRUE;
+
+- save_cmdline(&save_ccline);
+ update_screen(SOME_VALID);
+- restore_cmdline(&save_ccline);
+ restore_last_search_pattern();
+
+ // Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the
+--- 600,606 ----
+***************
+*** 800,807 ****
+ char_u *
+ getcmdline(
+ int firstc,
+! long count UNUSED, /* only used for incremental search */
+! int indent) /* indent for inside conditionals */
+ {
+ int c;
+ int i;
+--- 797,814 ----
+ char_u *
+ getcmdline(
+ int firstc,
+! long count, // only used for incremental search
+! int indent) // indent for inside conditionals
+! {
+! return getcmdline_int(firstc, count, indent, TRUE);
+! }
+!
+! static char_u *
+! getcmdline_int(
+! int firstc,
+! long count UNUSED, // only used for incremental search
+! int indent, // indent for inside conditionals
+! int init_ccline) // clear ccline first
+ {
+ int c;
+ int i;
+***************
+*** 832,845 ****
+ #endif
+ expand_T xpc;
+ long *b_im_ptr = NULL;
+- #if defined(FEAT_WILDMENU) || defined(FEAT_EVAL)
+- /* Everything that may work recursively should save and restore the
+- * current command line in save_ccline. That includes update_screen(), a
+- * custom status line may invoke ":normal". */
+ struct cmdline_info save_ccline;
+! #endif
+ int cmdline_type;
+
+ #ifdef FEAT_EVAL
+ if (firstc == -1)
+ {
+--- 839,858 ----
+ #endif
+ expand_T xpc;
+ long *b_im_ptr = NULL;
+ struct cmdline_info save_ccline;
+! int did_save_ccline = FALSE;
+ int cmdline_type;
+
++ if (ccline.cmdbuff != NULL)
++ {
++ // Being called recursively. Since ccline is global, we need to save
++ // the current buffer and restore it when returning.
++ save_cmdline(&save_ccline);
++ did_save_ccline = TRUE;
++ }
++ if (init_ccline)
++ vim_memset(&ccline, 0, sizeof(struct cmdline_info));
++
+ #ifdef FEAT_EVAL
+ if (firstc == -1)
+ {
+***************
+*** 868,874 ****
+ /* alloc initial ccline.cmdbuff */
+ alloc_cmdbuff(exmode_active ? 250 : indent + 1);
+ if (ccline.cmdbuff == NULL)
+! return NULL; /* out of memory */
+ ccline.cmdlen = ccline.cmdpos = 0;
+ ccline.cmdbuff[0] = NUL;
+ sb_text_start_cmdline();
+--- 881,887 ----
+ /* alloc initial ccline.cmdbuff */
+ alloc_cmdbuff(exmode_active ? 250 : indent + 1);
+ if (ccline.cmdbuff == NULL)
+! goto theend; // out of memory
+ ccline.cmdlen = ccline.cmdpos = 0;
+ ccline.cmdbuff[0] = NUL;
+ sb_text_start_cmdline();
+***************
+*** 1125,1133 ****
+ p_ls = save_p_ls;
+ p_wmh = save_p_wmh;
+ last_status(FALSE);
+- save_cmdline(&save_ccline);
+ update_screen(VALID); /* redraw the screen NOW */
+- restore_cmdline(&save_ccline);
+ redrawcmd();
+ save_p_ls = -1;
+ }
+--- 1138,1144 ----
+***************
+*** 1333,1351 ****
+ else
+ new_cmdpos = ccline.cmdpos;
+
+- save_cmdline(&save_ccline);
+ c = get_expr_register();
+- restore_cmdline(&save_ccline);
+ if (c == '=')
+ {
+ /* Need to save and restore ccline. And set "textlock"
+ * to avoid nasty things like going to another buffer when
+ * evaluating an expression. */
+- save_cmdline(&save_ccline);
+ ++textlock;
+ p = get_expr_line();
+ --textlock;
+- restore_cmdline(&save_ccline);
+
+ if (p != NULL)
+ {
+--- 1344,1358 ----
+***************
+*** 1812,1822 ****
+ c = ESC;
+ }
+ else
+- {
+- save_cmdline(&save_ccline);
+ c = get_expr_register();
+- restore_cmdline(&save_ccline);
+- }
+ }
+ #endif
+ if (c != ESC) /* use ESC to cancel inserting register */
+--- 1819,1825 ----
+***************
+*** 2187,2193 ****
+ int len;
+ int old_firstc;
+
+! vim_free(ccline.cmdbuff);
+ xpc.xp_context = EXPAND_NOTHING;
+ if (hiscnt == hislen)
+ p = lookfor; /* back to the old one */
+--- 2190,2196 ----
+ int len;
+ int old_firstc;
+
+! VIM_CLEAR(ccline.cmdbuff);
+ xpc.xp_context = EXPAND_NOTHING;
+ if (hiscnt == hislen)
+ p = lookfor; /* back to the old one */
+***************
+*** 2486,2496 ****
+ #endif
+ sb_text_end_cmdline();
+
+ {
+ char_u *p = ccline.cmdbuff;
+
+! /* Make ccline empty, getcmdline() may try to use it. */
+! ccline.cmdbuff = NULL;
+ return p;
+ }
+ }
+--- 2489,2502 ----
+ #endif
+ sb_text_end_cmdline();
+
++ theend:
+ {
+ char_u *p = ccline.cmdbuff;
+
+! if (did_save_ccline)
+! restore_cmdline(&save_ccline);
+! else
+! ccline.cmdbuff = NULL;
+ return p;
+ }
+ }
+***************
+*** 2512,2521 ****
+ {
+ char_u *s;
+ struct cmdline_info save_ccline;
+ int msg_col_save = msg_col;
+ int msg_silent_save = msg_silent;
+
+! save_cmdline(&save_ccline);
+ ccline.cmdprompt = prompt;
+ ccline.cmdattr = attr;
+ # ifdef FEAT_EVAL
+--- 2518,2535 ----
+ {
+ char_u *s;
+ struct cmdline_info save_ccline;
++ int did_save_ccline = FALSE;
+ int msg_col_save = msg_col;
+ int msg_silent_save = msg_silent;
+
+! if (ccline.cmdbuff != NULL)
+! {
+! // Save the values of the current cmdline and restore them below.
+! save_cmdline(&save_ccline);
+! did_save_ccline = TRUE;
+! }
+!
+! vim_memset(&ccline, 0, sizeof(struct cmdline_info));
+ ccline.cmdprompt = prompt;
+ ccline.cmdattr = attr;
+ # ifdef FEAT_EVAL
+***************
+*** 2524,2531 ****
+ ccline.input_fn = (firstc == '@');
+ # endif
+ msg_silent = 0;
+! s = getcmdline(firstc, 1L, 0);
+! restore_cmdline(&save_ccline);
+ msg_silent = msg_silent_save;
+ /* Restore msg_col, the prompt from input() may have changed it.
+ * But only if called recursively and the commandline is therefore being
+--- 2538,2548 ----
+ ccline.input_fn = (firstc == '@');
+ # endif
+ msg_silent = 0;
+! s = getcmdline_int(firstc, 1L, 0, FALSE);
+!
+! if (did_save_ccline)
+! restore_cmdline(&save_ccline);
+!
+ msg_silent = msg_silent_save;
+ /* Restore msg_col, the prompt from input() may have changed it.
+ * But only if called recursively and the commandline is therefore being
+***************
+*** 3121,3127 ****
+ /*
+ * Allocate a new command line buffer.
+ * Assigns the new buffer to ccline.cmdbuff and ccline.cmdbufflen.
+- * Returns the new value of ccline.cmdbuff and ccline.cmdbufflen.
+ */
+ static void
+ alloc_cmdbuff(int len)
+--- 3138,3143 ----
+***************
+*** 3542,3550 ****
+ }
+ *ccp = prev_ccline;
+ prev_ccline = ccline;
+! ccline.cmdbuff = NULL;
+! ccline.cmdprompt = NULL;
+! ccline.xpc = NULL;
+ }
+
+ /*
+--- 3558,3564 ----
+ }
+ *ccp = prev_ccline;
+ prev_ccline = ccline;
+! ccline.cmdbuff = NULL; // signal that ccline is not in use
+ }
+
+ /*
+***************
+*** 3557,3593 ****
+ prev_ccline = *ccp;
+ }
+
+- #if defined(FEAT_EVAL) || defined(PROTO)
+- /*
+- * Save the command line into allocated memory. Returns a pointer to be
+- * passed to restore_cmdline_alloc() later.
+- * Returns NULL when failed.
+- */
+- char_u *
+- save_cmdline_alloc(void)
+- {
+- struct cmdline_info *p;
+-
+- p = (struct cmdline_info *)alloc((unsigned)sizeof(struct cmdline_info));
+- if (p != NULL)
+- save_cmdline(p);
+- return (char_u *)p;
+- }
+-
+- /*
+- * Restore the command line from the return value of save_cmdline_alloc().
+- */
+- void
+- restore_cmdline_alloc(char_u *p)
+- {
+- if (p != NULL)
+- {
+- restore_cmdline((struct cmdline_info *)p);
+- vim_free(p);
+- }
+- }
+- #endif
+-
+ /*
+ * Paste a yank register into the command line.
+ * Used by CTRL-R command in command-line mode.
+--- 3571,3576 ----
+***************
+*** 3606,3612 ****
+ char_u *arg;
+ char_u *p;
+ int allocated;
+- struct cmdline_info save_ccline;
+
+ /* check for valid regname; also accept special characters for CTRL-R in
+ * the command line */
+--- 3589,3594 ----
+***************
+*** 3625,3637 ****
+ regname = may_get_selection(regname);
+ #endif
+
+! /* Need to save and restore ccline. And set "textlock" to avoid nasty
+! * things like going to another buffer when evaluating an expression. */
+! save_cmdline(&save_ccline);
+ ++textlock;
+ i = get_spec_reg(regname, &arg, &allocated, TRUE);
+ --textlock;
+- restore_cmdline(&save_ccline);
+
+ if (i)
+ {
+--- 3607,3617 ----
+ regname = may_get_selection(regname);
+ #endif
+
+! // Need to set "textlock" to avoid nasty things like going to another
+! // buffer when evaluating an expression.
+ ++textlock;
+ i = get_spec_reg(regname, &arg, &allocated, TRUE);
+ --textlock;
+
+ if (i)
+ {
+***************
+*** 5601,5607 ****
+ sctx_T save_current_sctx = current_sctx;
+ char_u *pat = NULL;
+ void *ret;
+- struct cmdline_info save_ccline;
+
+ if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0' || xp->xp_line == NULL)
+ return NULL;
+--- 5581,5586 ----
+***************
+*** 5624,5638 ****
+ args[2].vval.v_number = xp->xp_col;
+ args[3].v_type = VAR_UNKNOWN;
+
+- /* Save the cmdline, we don't know what the function may do. */
+- save_ccline = ccline;
+- ccline.cmdbuff = NULL;
+- ccline.cmdprompt = NULL;
+ current_sctx = xp->xp_script_ctx;
+
+ ret = user_expand_func(xp->xp_arg, 3, args);
+
+- ccline = save_ccline;
+ current_sctx = save_current_sctx;
+ if (ccline.cmdbuff != NULL)
+ ccline.cmdbuff[ccline.cmdlen] = keep;
+--- 5603,5612 ----
+***************
+*** 6481,6487 ****
+
+ #if defined(FEAT_EVAL) || defined(FEAT_CMDWIN) || defined(PROTO)
+ /*
+! * Get pointer to the command line info to use. cmdline_paste() may clear
+ * ccline and put the previous value in prev_ccline.
+ */
+ static struct cmdline_info *
+--- 6455,6461 ----
+
+ #if defined(FEAT_EVAL) || defined(FEAT_CMDWIN) || defined(PROTO)
+ /*
+! * Get pointer to the command line info to use. save_ccline() may clear
+ * ccline and put the previous value in prev_ccline.
+ */
+ static struct cmdline_info *
+***************
+*** 7072,7077 ****
+--- 7046,7057 ----
+ }
+ }
+
++ void
++ cmdline_init(void)
++ {
++ vim_memset(&ccline, 0, sizeof(struct cmdline_info));
++ }
++
+ /*
+ * Write history to viminfo file in "fp".
+ * When "merge" is TRUE merge history lines with a previously read viminfo
+***************
+*** 7238,7244 ****
+ static int
+ open_cmdwin(void)
+ {
+- struct cmdline_info save_ccline;
+ bufref_T old_curbuf;
+ win_T *old_curwin = curwin;
+ bufref_T bufref;
+--- 7218,7223 ----
+***************
+*** 7355,7363 ****
+ invalidate_botline();
+ redraw_later(SOME_VALID);
+
+- /* Save the command line info, can be used recursively. */
+- save_cmdline(&save_ccline);
+-
+ /* No Ex mode here! */
+ exmode_active = 0;
+
+--- 7334,7339 ----
+***************
+*** 7394,7403 ****
+ KeyTyped = save_KeyTyped;
+ # endif
+
+- /* Restore the command line info. */
+- restore_cmdline(&save_ccline);
+ cmdwin_type = 0;
+-
+ exmode_active = save_exmode;
+
+ /* Safety check: The old window or buffer was deleted: It's a bug when
+--- 7370,7376 ----
+*** ../vim-8.1.0438/src/proto/ex_getln.pro 2018-05-17 13:52:35.000000000 +0200
+--- src/proto/ex_getln.pro 2018-09-30 15:11:35.810356311 +0200
+***************
+*** 15,22 ****
+ void putcmdline(int c, int shift);
+ void unputcmdline(void);
+ int put_on_cmdline(char_u *str, int len, int redraw);
+- char_u *save_cmdline_alloc(void);
+- void restore_cmdline_alloc(char_u *p);
+ void cmdline_paste_str(char_u *s, int literally);
+ void redrawcmdline(void);
+ void redrawcmdline_ex(int do_compute_cmdrow);
+--- 15,20 ----
+***************
+*** 54,59 ****
+--- 52,58 ----
+ int read_viminfo_history(vir_T *virp, int writing);
+ void handle_viminfo_history(garray_T *values, int writing);
+ void finish_viminfo_history(vir_T *virp);
++ void cmdline_init(void);
+ void write_viminfo_history(FILE *fp, int merge);
+ void cmd_pchar(int c, int offset);
+ int cmd_gchar(int offset);
+*** ../vim-8.1.0438/src/getchar.c 2018-09-10 21:04:09.868392665 +0200
+--- src/getchar.c 2018-09-30 14:32:29.424816910 +0200
+***************
+*** 4666,4672 ****
+ char_u *res;
+ char_u *p;
+ char_u *expr;
+- char_u *save_cmd;
+ pos_T save_cursor;
+ int save_msg_col;
+ int save_msg_row;
+--- 4666,4671 ----
+***************
+*** 4678,4690 ****
+ return NULL;
+ vim_unescape_csi(expr);
+
+- save_cmd = save_cmdline_alloc();
+- if (save_cmd == NULL)
+- {
+- vim_free(expr);
+- return NULL;
+- }
+-
+ /* Forbid changing text or using ":normal" to avoid most of the bad side
+ * effects. Also restore the cursor position. */
+ ++textlock;
+--- 4677,4682 ----
+***************
+*** 4700,4706 ****
+ msg_col = save_msg_col;
+ msg_row = save_msg_row;
+
+- restore_cmdline_alloc(save_cmd);
+ vim_free(expr);
+
+ if (p == NULL)
+--- 4692,4697 ----
+*** ../vim-8.1.0438/src/main.c 2018-09-16 14:10:28.300323360 +0200
+--- src/main.c 2018-09-30 15:10:50.358720630 +0200
+***************
+*** 929,934 ****
+--- 929,935 ----
+ void
+ common_init(mparm_T *paramp)
+ {
++ cmdline_init();
+
+ #ifdef FEAT_MBYTE
+ (void)mb_init(); /* init mb_bytelen_tab[] to ones */
+*** ../vim-8.1.0438/src/version.c 2018-09-28 23:09:50.558463030 +0200
+--- src/version.c 2018-09-30 17:07:43.183446960 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 439,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+124. You begin conversations with, "Who is your internet service provider?"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0440 b/data/vim/patches/8.1.0440
new file mode 100644
index 000000000..ca0bfe05a
--- /dev/null
+++ b/data/vim/patches/8.1.0440
@@ -0,0 +1,100 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0440
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0440
+Problem: remove() with a range not sufficiently tested.
+Solution: Add a test. (Dominique Pelle, closes #3497)
+Files: src/testdir/test_listdict.vim
+
+
+*** ../vim-8.1.0439/src/testdir/test_listdict.vim 2017-11-05 20:53:03.000000000 +0100
+--- src/testdir/test_listdict.vim 2018-09-30 17:14:40.140106358 +0200
+***************
+*** 106,111 ****
+--- 106,148 ----
+ call assert_equal([1, 2], l)
+ endfunc
+
++ " Test removing items in list
++ func Test_list_func_remove()
++ " Test removing 1 element
++ let l = [1, 2, 3, 4]
++ call assert_equal(1, remove(l, 0))
++ call assert_equal([2, 3, 4], l)
++
++ let l = [1, 2, 3, 4]
++ call assert_equal(2, remove(l, 1))
++ call assert_equal([1, 3, 4], l)
++
++ let l = [1, 2, 3, 4]
++ call assert_equal(4, remove(l, -1))
++ call assert_equal([1, 2, 3], l)
++
++ " Test removing range of element(s)
++ let l = [1, 2, 3, 4]
++ call assert_equal([3], remove(l, 2, 2))
++ call assert_equal([1, 2, 4], l)
++
++ let l = [1, 2, 3, 4]
++ call assert_equal([2, 3], remove(l, 1, 2))
++ call assert_equal([1, 4], l)
++
++ let l = [1, 2, 3, 4]
++ call assert_equal([2, 3], remove(l, -3, -2))
++ call assert_equal([1, 4], l)
++
++ " Test invalid cases
++ let l = [1, 2, 3, 4]
++ call assert_fails("call remove(l, 5)", 'E684:')
++ call assert_fails("call remove(l, 1, 5)", 'E684:')
++ call assert_fails("call remove(l, 3, 2)", 'E16:')
++ call assert_fails("call remove(1, 0)", 'E712:')
++ call assert_fails("call remove(l, l)", 'E745:')
++ endfunc
++
+ " Tests for Dictionary type
+
+ func Test_dict()
+***************
+*** 222,227 ****
+--- 259,275 ----
+ unlet g:dict
+ endfunc
+
++ " Test removing items in la dictionary
++ func Test_dict_func_remove()
++ let d = {1:'a', 2:'b', 3:'c'}
++ call assert_equal('b', remove(d, 2))
++ call assert_equal({1:'a', 3:'c'}, d)
++
++ call assert_fails("call remove(d, 1, 2)", 'E118:')
++ call assert_fails("call remove(d, 'a')", 'E716:')
++ call assert_fails("call remove(d, [])", 'E730:')
++ endfunc
++
+ " Nasty: remove func from Dict that's being called (works)
+ func Test_dict_func_remove_in_use()
+ let d = {1:1}
+*** ../vim-8.1.0439/src/version.c 2018-09-30 17:11:45.305649987 +0200
+--- src/version.c 2018-09-30 17:15:38.475550891 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 440,
+ /**/
+
+--
+I have a watch cat! Just break in and she'll watch.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0441 b/data/vim/patches/8.1.0441
new file mode 100644
index 000000000..5c003113f
--- /dev/null
+++ b/data/vim/patches/8.1.0441
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0441
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0441
+Problem: Build failure without command line history.
+Solution: Move cmdline_init() outside of #ifdef.
+Files: src/ex_getln.c
+
+
+*** ../vim-8.1.0440/src/ex_getln.c 2018-09-30 17:11:45.301650017 +0200
+--- src/ex_getln.c 2018-09-30 17:44:23.961403257 +0200
+***************
+*** 775,780 ****
+--- 775,786 ----
+ }
+ #endif
+
++ void
++ cmdline_init(void)
++ {
++ vim_memset(&ccline, 0, sizeof(struct cmdline_info));
++ }
++
+ /*
+ * getcmdline() - accept a command line starting with firstc.
+ *
+***************
+*** 7046,7057 ****
+ }
+ }
+
+- void
+- cmdline_init(void)
+- {
+- vim_memset(&ccline, 0, sizeof(struct cmdline_info));
+- }
+-
+ /*
+ * Write history to viminfo file in "fp".
+ * When "merge" is TRUE merge history lines with a previously read viminfo
+--- 7052,7057 ----
+*** ../vim-8.1.0440/src/version.c 2018-09-30 17:16:22.203142058 +0200
+--- src/version.c 2018-09-30 17:44:59.609126418 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 441,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+125. You begin to wonder how often it REALLY is necessary to get up
+ and shower or bathe.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0442 b/data/vim/patches/8.1.0442
new file mode 100644
index 000000000..cb1f89f12
--- /dev/null
+++ b/data/vim/patches/8.1.0442
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0442
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0442
+Problem: GUI: Cursor not drawn after ":redraw | sleep".
+Solution: Flush the output. (closes #3496)
+Files: src/ex_docmd.c
+
+
+*** ../vim-8.1.0441/src/ex_docmd.c 2018-09-15 15:42:36.501547749 +0200
+--- src/ex_docmd.c 2018-09-30 18:19:29.578225817 +0200
+***************
+*** 9272,9278 ****
+ long wait_now;
+
+ cursor_on();
+! out_flush();
+ for (done = 0; !got_int && done < msec; done += wait_now)
+ {
+ wait_now = msec - done > 1000L ? 1000L : msec - done;
+--- 9272,9278 ----
+ long wait_now;
+
+ cursor_on();
+! out_flush_cursor(FALSE, FALSE);
+ for (done = 0; !got_int && done < msec; done += wait_now)
+ {
+ wait_now = msec - done > 1000L ? 1000L : msec - done;
+*** ../vim-8.1.0441/src/version.c 2018-09-30 17:45:26.860914873 +0200
+--- src/version.c 2018-09-30 18:21:43.617240782 +0200
+***************
+*** 796,797 ****
+--- 796,799 ----
+ { /* Add new patch number below this line */
++ /**/
++ 442,
+ /**/
+
+--
+A: Because it messes up the order in which people normally read text.
+Q: Why is top-posting such a bad thing?
+A: Top-posting.
+Q: What is the most annoying thing on usenet and in e-mail?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0443 b/data/vim/patches/8.1.0443
new file mode 100644
index 000000000..be17858f0
--- /dev/null
+++ b/data/vim/patches/8.1.0443
@@ -0,0 +1,3395 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0443
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0443
+Problem: Unnecessary static function prototypes.
+Solution: Remove unnecessary prototypes.
+Files: src/arabic.c, src/blowfish.c, src/buffer.c, src/charset.c,
+ src/crypt_zip.c, src/digraph.c, src/edit.c, src/eval.c,
+ src/evalfunc.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c,
+ src/ex_eval.c, src/ex_getln.c, src/fileio.c, src/getchar.c,
+ src/gui.c, src/gui_at_fs.c, src/gui_athena.c, src/gui_gtk_x11.c,
+ src/gui_mac.c, src/gui_motif.c, src/gui_photon.c, src/gui_w32.c,
+ src/gui_x11.c, src/hangulin.c, src/hardcopy.c, src/if_cscope.c,
+ src/if_mzsch.c, src/if_python3.c, src/if_xcmdsrv.c,
+ src/integration.c, src/json.c, src/main.c, src/mbyte.c,
+ src/memline.c, src/message.c, src/misc1.c, src/misc2.c,
+ src/move.c, src/netbeans.c, src/normal.c, src/ops.c, src/option.c,
+ src/os_unix.c, src/os_win32.c, src/pty.c, src/regexp.c,
+ src/screen.c, src/search.c, src/sha256.c, src/spell.c,
+ src/spellfile.c, src/syntax.c, src/tag.c, src/term.c, src/ui.c,
+ src/undo.c, src/version.c, src/window.c, src/workshop.c
+
+
+*** ../vim-8.1.0442/src/arabic.c 2017-03-21 12:31:49.000000000 +0100
+--- src/arabic.c 2018-09-30 20:13:36.792906838 +0200
+***************
+*** 17,36 ****
+
+ #if defined(FEAT_ARABIC) || defined(PROTO)
+
+- static int A_is_a(int cur_c);
+- static int A_is_s(int cur_c);
+- static int A_is_f(int cur_c);
+- static int chg_c_a2s(int cur_c);
+- static int chg_c_a2i(int cur_c);
+- static int chg_c_a2m(int cur_c);
+- static int chg_c_a2f(int cur_c);
+- #if 0
+- static int chg_c_i2m(int cur_c);
+- #endif
+- static int chg_c_f2m(int cur_c);
+- static int chg_c_laa2i(int hid_c);
+- static int chg_c_laa2f(int hid_c);
+- static int half_shape(int c);
+ static int A_firstc_laa(int c1, int c);
+ static int A_is_harakat(int c);
+ static int A_is_iso(int c);
+--- 17,22 ----
+*** ../vim-8.1.0442/src/blowfish.c 2016-11-12 20:08:09.000000000 +0100
+--- src/blowfish.c 2018-09-30 20:14:12.496675423 +0200
+***************
+*** 56,68 ****
+ } bf_state_T;
+
+
+- static void bf_e_block(bf_state_T *state, UINT32_T *p_xl, UINT32_T *p_xr);
+- static void bf_e_cblock(bf_state_T *state, char_u *block);
+- static int bf_check_tables(UINT32_T pax[18], UINT32_T sbx[4][256], UINT32_T val);
+- static int bf_self_test(void);
+- static void bf_key_init(bf_state_T *state, char_u *password, char_u *salt, int salt_len);
+- static void bf_cfb_init(bf_state_T *state, char_u *seed, int seed_len);
+-
+ /* Blowfish code */
+ static UINT32_T pax_init[18] = {
+ 0x243f6a88u, 0x85a308d3u, 0x13198a2eu,
+--- 56,61 ----
+*** ../vim-8.1.0442/src/buffer.c 2018-09-21 16:59:40.113489779 +0200
+--- src/buffer.c 2018-09-30 20:14:44.852464316 +0200
+***************
+*** 51,60 ****
+ # define dev_T unsigned
+ #endif
+
+- #if defined(FEAT_SIGNS)
+- static void insert_sign(buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr);
+- #endif
+-
+ #if defined(FEAT_QUICKFIX)
+ static char *msg_loclist = N_("[Location List]");
+ static char *msg_qflist = N_("[Quickfix List]");
+--- 51,56 ----
+***************
+*** 2839,2846 ****
+ }
+
+ #ifdef FEAT_DIFF
+- static int wininfo_other_tab_diff(wininfo_T *wip);
+-
+ /*
+ * Return TRUE when "wip" has 'diff' set and the diff is only for another tab
+ * page. That's because a diff is local to a tab page.
+--- 2835,2840 ----
+*** ../vim-8.1.0442/src/charset.c 2018-06-23 19:22:45.602486336 +0200
+--- src/charset.c 2018-09-30 20:16:46.467660371 +0200
+***************
+*** 9,18 ****
+
+ #include "vim.h"
+
+- #ifdef FEAT_LINEBREAK
+- static int win_chartabsize(win_T *wp, char_u *p, colnr_T col);
+- #endif
+-
+ #ifdef FEAT_MBYTE
+ # if defined(HAVE_WCHAR_H)
+ # include <wchar.h> /* for towupper() and towlower() */
+--- 9,14 ----
+*** ../vim-8.1.0442/src/crypt_zip.c 2016-08-29 22:42:20.000000000 +0200
+--- src/crypt_zip.c 2018-09-30 20:17:36.571324947 +0200
+***************
+*** 36,43 ****
+ } zip_state_T;
+
+
+- static void make_crc_tab(void);
+-
+ static u32_T crc_32_table[256];
+
+ /*
+--- 36,41 ----
+*** ../vim-8.1.0442/src/digraph.c 2018-06-16 17:25:17.997346631 +0200
+--- src/digraph.c 2018-09-30 20:17:55.407198290 +0200
+***************
+*** 28,34 ****
+ result_T result;
+ } digr_T;
+
+- static int getexactdigraph(int, int, int);
+ static void printdigraph(digr_T *);
+
+ /* digraphs added by the user */
+--- 28,33 ----
+*** ../vim-8.1.0442/src/edit.c 2018-09-12 21:52:14.319799760 +0200
+--- src/edit.c 2018-09-30 20:19:36.046516906 +0200
+***************
+*** 155,169 ****
+ static int has_compl_option(int dict_opt);
+ static int ins_compl_accept_char(int c);
+ static int ins_compl_add(char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup);
+- static int ins_compl_equal(compl_T *match, char_u *str, int len);
+ static void ins_compl_longest_match(compl_T *match);
+- static void ins_compl_add_matches(int num_matches, char_u **matches, int icase);
+- static int ins_compl_make_cyclic(void);
+- static void ins_compl_upd_pum(void);
+ static void ins_compl_del_pum(void);
+ static int pum_wanted(void);
+- static int pum_enough_matches(void);
+- static void ins_compl_dictionaries(char_u *dict, char_u *pat, int flags, int thesaurus);
+ static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir);
+ static char_u *find_line_end(char_u *ptr);
+ static void ins_compl_free(void);
+--- 155,163 ----
+***************
+*** 178,196 ****
+ static void ins_compl_addfrommatch(void);
+ static int ins_compl_prep(int c);
+ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg);
+- static buf_T *ins_compl_next_buf(buf_T *buf, int flag);
+ # if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL)
+ static void ins_compl_add_list(list_T *list);
+ static void ins_compl_add_dict(dict_T *dict);
+ # endif
+- static int ins_compl_get_exp(pos_T *ini);
+ static void ins_compl_delete(void);
+ static void ins_compl_insert(int in_compl_func);
+- static int ins_compl_next(int allow_get_expansion, int count, int insert_match, int in_compl_func);
+ static int ins_compl_key2dir(int c);
+ static int ins_compl_pum_key(int c);
+ static int ins_compl_key2count(int c);
+- static int ins_compl_use_match(int c);
+ static int ins_complete(int c, int enable_pum);
+ static void show_pum(int prev_w_wrow, int prev_w_leftcol);
+ static unsigned quote_meta(char_u *dest, char_u *str, int len);
+--- 172,186 ----
+***************
+*** 212,218 ****
+ static void check_auto_format(int);
+ static void redo_literal(int c);
+ static void start_arrow(pos_T *end_insert_pos);
+- static void start_arrow_with_change(pos_T *end_insert_pos, int change);
+ static void start_arrow_common(pos_T *end_insert_pos, int change);
+ #ifdef FEAT_SPELL
+ static void check_spell_redraw(void);
+--- 202,207 ----
+***************
+*** 221,229 ****
+ #endif
+ static void stop_insert(pos_T *end_insert_pos, int esc, int nomove);
+ static int echeck_abbr(int);
+- static int replace_pop(void);
+ static void replace_join(int off);
+- static void replace_pop_ins(void);
+ #ifdef FEAT_MBYTE
+ static void mb_replace_pop_ins(int cc);
+ #endif
+--- 210,216 ----
+***************
+*** 9052,9059 ****
+ AppendCharToRedobuff(K_DEL);
+ }
+
+- static void ins_bs_one(colnr_T *vcolp);
+-
+ /*
+ * Delete one character for ins_bs().
+ */
+--- 9039,9044 ----
+*** ../vim-8.1.0442/src/eval.c 2018-09-10 21:04:09.864392710 +0200
+--- src/eval.c 2018-09-30 20:20:38.942087538 +0200
+***************
+*** 232,238 ****
+ static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string);
+ static int eval7(char_u **arg, typval_T *rettv, int evaluate, int want_string);
+
+- static int eval_index(char_u **arg, typval_T *rettv, int evaluate, int verbose);
+ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate);
+ static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
+ static int free_unref_items(int copyID);
+--- 232,237 ----
+***************
+*** 3050,3057 ****
+ * get_user_var_name().
+ */
+
+- static char_u *cat_prefix_varname(int prefix, char_u *name);
+-
+ static char_u *varnamebuf = NULL;
+ static int varnamebuflen = 0;
+
+--- 3049,3054 ----
+***************
+*** 7957,7962 ****
+--- 7954,7960 ----
+ if (defstr != NULL)
+ {
+ int save_ex_normal_busy = ex_normal_busy;
++
+ ex_normal_busy = 0;
+ rettv->vval.v_string =
+ getcmdline_prompt(secret ? NUL : '@', p, echo_attr,
+***************
+*** 8507,8514 ****
+ VAR_FLAVOUR_VIMINFO /* all uppercase */
+ } var_flavour_T;
+
+- static var_flavour_T var_flavour(char_u *varname);
+-
+ static var_flavour_T
+ var_flavour(char_u *varname)
+ {
+--- 8505,8510 ----
+***************
+*** 9431,9439 ****
+ /*
+ * Functions for ":8" filename modifier: get 8.3 version of a filename.
+ */
+- static int get_short_pathname(char_u **fnamep, char_u **bufp, int *fnamelen);
+- static int shortpath_for_invalid_fname(char_u **fname, char_u **bufp, int *fnamelen);
+- static int shortpath_for_partial(char_u **fnamep, char_u **bufp, int *fnamelen);
+
+ /*
+ * Get the short path (8.3) for the filename in "fnamep".
+--- 9427,9432 ----
+*** ../vim-8.1.0442/src/evalfunc.c 2018-09-16 18:46:36.189127529 +0200
+--- src/evalfunc.c 2018-09-30 20:23:18.824986134 +0200
+***************
+*** 1121,1128 ****
+ }
+
+ #ifdef FEAT_FLOAT
+- static int get_float_arg(typval_T *argvars, float_T *f);
+-
+ /*
+ * Get the float value of "argvars[0]" into "f".
+ * Returns FAIL when the argument is not a Number or Float.
+--- 1121,1126 ----
+***************
+*** 1722,1729 ****
+ rettv->v_type = VAR_STRING;
+ }
+
+- static buf_T *find_buffer(typval_T *avar);
+-
+ /*
+ * Find a buffer by number or exact name.
+ */
+--- 1720,1725 ----
+***************
+*** 3826,3833 ****
+ vim_free(fbuf);
+ }
+
+- static void foldclosed_both(typval_T *argvars, typval_T *rettv, int end);
+-
+ /*
+ * "foldclosed()" function
+ */
+--- 3822,3827 ----
+***************
+*** 4485,4492 ****
+ }
+ }
+
+- static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end, int retlist, typval_T *rettv);
+-
+ /*
+ * Get line or list of lines from buffer "buf" into "rettv".
+ * Return a range (from start to end) of lines in rettv from the specified
+--- 4479,4484 ----
+***************
+*** 7566,7573 ****
+ rettv->vval.v_number = (varnumber_T)time(NULL);
+ }
+
+- static void get_maparg(typval_T *argvars, typval_T *rettv, int exact);
+-
+ static void
+ get_maparg(typval_T *argvars, typval_T *rettv, int exact)
+ {
+--- 7558,7563 ----
+***************
+*** 8177,8184 ****
+ find_some_match(argvars, rettv, MATCH_POS);
+ }
+
+- static void max_min(typval_T *argvars, typval_T *rettv, int domax);
+-
+ static void
+ max_min(typval_T *argvars, typval_T *rettv, int domax)
+ {
+--- 8167,8172 ----
+***************
+*** 8261,8268 ****
+ max_min(argvars, rettv, FALSE);
+ }
+
+- static int mkdir_recurse(char_u *dir, int prot);
+-
+ /*
+ * Create the directory in which "dir" is located, and higher levels when
+ * needed.
+--- 8249,8254 ----
+***************
+*** 9057,9064 ****
+ }
+
+ #if defined(FEAT_RELTIME)
+- static int list2proftime(typval_T *arg, proftime_T *tm);
+-
+ /*
+ * Convert a List to proftime_T.
+ * Return FAIL when there is something wrong.
+--- 9043,9048 ----
+***************
+*** 9171,9179 ****
+ }
+
+ #if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
+- static void make_connection(void);
+- static int check_connection(void);
+-
+ static void
+ make_connection(void)
+ {
+--- 9155,9160 ----
+***************
+*** 9843,9850 ****
+ #define SP_END 0x40 /* leave cursor at end of match */
+ #define SP_COLUMN 0x80 /* start at cursor column */
+
+- static int get_search_arg(typval_T *varp, int *flagsp);
+-
+ /*
+ * Get flags for a search function.
+ * Possibly sets "p_ws".
+--- 9824,9829 ----
+***************
+*** 10674,10681 ****
+ set_buffer_lines(curbuf, lnum, FALSE, &argvars[1], rettv);
+ }
+
+- static void set_qf_ll_list(win_T *wp, typval_T *list_arg, typval_T *action_arg, typval_T *what_arg, typval_T *rettv);
+-
+ /*
+ * Used by "setqflist()" and "setloclist()" functions
+ */
+--- 10653,10658 ----
+***************
+*** 11215,11221 ****
+ int item_compare_keep_zero;
+ } sortinfo_T;
+ static sortinfo_T *sortinfo = NULL;
+- static void do_sort_uniq(typval_T *argvars, typval_T *rettv, int sort);
+ #define ITEM_COMPARE_FAIL 999
+
+ /*
+--- 11192,11197 ----
+***************
+*** 12860,12867 ****
+ }
+
+
+- static int get_winnr(tabpage_T *tp, typval_T *argvar);
+-
+ /*
+ * Common code for tabpagewinnr() and winnr().
+ */
+--- 12836,12841 ----
+*** ../vim-8.1.0442/src/ex_cmds.c 2018-09-21 12:46:16.341772938 +0200
+--- src/ex_cmds.c 2018-09-30 20:23:56.636723898 +0200
+***************
+*** 1813,1819 ****
+
+ #if defined(FEAT_VIMINFO) || defined(PROTO)
+
+- static int no_viminfo(void);
+ static int read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing);
+ static void write_viminfo_version(FILE *fp_out);
+ static void write_viminfo_barlines(vir_T *virp, FILE *fp_out);
+--- 1813,1818 ----
+***************
+*** 7568,7574 ****
+ static sign_T *first_sign = NULL;
+ static int next_sign_typenr = 1;
+
+- static int sign_cmd_idx(char_u *begin_cmd, char_u *end_cmd);
+ static void sign_list_defined(sign_T *sp);
+ static void sign_undefine(sign_T *sp, sign_T *sp_prev);
+
+--- 7567,7572 ----
+*** ../vim-8.1.0442/src/ex_cmds2.c 2018-09-11 22:36:48.125548396 +0200
+--- src/ex_cmds2.c 2018-09-30 20:24:55.984311160 +0200
+***************
+*** 68,74 ****
+ #if defined(FEAT_EVAL) || defined(PROTO)
+ static int debug_greedy = FALSE; /* batch mode debugging: don't save
+ and restore typeahead. */
+- static int get_maxbacktrace_level(void);
+ static void do_setdebugtracelevel(char_u *arg);
+ static void do_checkbacktracelevel(void);
+ static void do_showbacktrace(char_u *cmd);
+--- 68,73 ----
+***************
+*** 573,579 ****
+ #define DBG_FILE 2
+ #define DBG_EXPR 3
+
+- static int dbg_parsearg(char_u *arg, garray_T *gap);
+ static linenr_T debuggy_find(int file,char_u *fname, linenr_T after, garray_T *gap, int *fp);
+
+ /*
+--- 572,577 ----
+***************
+*** 1611,1617 ****
+ /*
+ * Functions for profiling.
+ */
+- static void script_do_profile(scriptitem_T *si);
+ static void script_dump_profile(FILE *fd);
+ static proftime_T prof_wait_time;
+
+--- 1609,1614 ----
+***************
+*** 2242,2249 ****
+ || forceit);
+ }
+
+- static void add_bufnum(int *bufnrs, int *bufnump, int nr);
+-
+ /*
+ * Add a buffer number to "bufnrs", unless it's already there.
+ */
+--- 2239,2244 ----
+***************
+*** 2444,2453 ****
+ * Code to handle the argument list.
+ */
+
+- static char_u *do_one_arg(char_u *str);
+ static int do_arglist(char_u *str, int what, int after, int will_edit);
+ static void alist_check_arg_idx(void);
+- static int editing_arg_idx(win_T *win);
+ static void alist_add_list(int count, char_u **files, int after, int will_edit);
+ #define AL_SET 1
+ #define AL_ADD 2
+--- 2439,2446 ----
+***************
+*** 4299,4306 ****
+
+ #if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
+ # define USE_FOPEN_NOINH
+- static FILE *fopen_noinh_readbin(char *filename);
+-
+ /*
+ * Special function to open a file without handle inheritance.
+ * When possible the handle is closed on exec().
+--- 4292,4297 ----
+***************
+*** 5291,5298 ****
+ #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+ && (defined(FEAT_EVAL) || defined(FEAT_MULTI_LANG))
+ # define HAVE_GET_LOCALE_VAL
+- static char_u *get_locale_val(int what);
+-
+ static char_u *
+ get_locale_val(int what)
+ {
+--- 5282,5287 ----
+***************
+*** 5410,5417 ****
+ || ((defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) \
+ && !defined(LC_MESSAGES))
+- static char_u *get_mess_env(void);
+-
+ /*
+ * Get the language used for messages from the environment.
+ */
+--- 5399,5404 ----
+*** ../vim-8.1.0442/src/ex_docmd.c 2018-09-30 18:22:22.568974801 +0200
+--- src/ex_docmd.c 2018-09-30 20:31:05.769715873 +0200
+***************
+*** 61,67 ****
+ # define IS_USER_CMDIDX(idx) (FALSE)
+ #endif
+
+- static int compute_buffer_local_count(int addr_type, int lnum, int local);
+ #ifdef FEAT_EVAL
+ static char_u *do_one_cmd(char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie);
+ #else
+--- 61,66 ----
+***************
+*** 116,122 ****
+ # define ex_cexpr ex_ni
+ #endif
+
+- static int check_more(int, int);
+ static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int silent, int to_other_file, int address_count);
+ static void get_flags(exarg_T *eap);
+ #if !defined(FEAT_PERL) \
+--- 115,120 ----
+***************
+*** 498,506 ****
+ except_T *current_exception;
+ };
+
+- static void save_dbg_stuff(struct dbg_stuff *dsp);
+- static void restore_dbg_stuff(struct dbg_stuff *dsp);
+-
+ static void
+ save_dbg_stuff(struct dbg_stuff *dsp)
+ {
+--- 496,501 ----
+***************
+*** 1633,1641 ****
+ return buf->b_fnum;
+ }
+
+- static int current_win_nr(win_T *win);
+- static int current_tab_nr(tabpage_T *tab);
+-
+ static int
+ current_win_nr(win_T *win)
+ {
+--- 1628,1633 ----
+***************
+*** 4910,4917 ****
+ }
+
+ #ifdef FEAT_QUICKFIX
+- static char_u *skip_grep_pat(exarg_T *eap);
+-
+ /*
+ * For a ":vimgrep" or ":vimgrepadd" command return a pointer past the
+ * pattern. Otherwise return eap->arg.
+--- 4902,4907 ----
+***************
+*** 5818,5829 ****
+ #endif
+
+ #if defined(FEAT_USR_CMDS) || defined(PROTO)
+- static int uc_add_command(char_u *name, size_t name_len, char_u *rep, long argt, long def, int flags, int compl, char_u *compl_arg, int addr_type, int force);
+- static void uc_list(char_u *name, size_t name_len);
+- static int uc_scan_attr(char_u *attr, size_t len, long *argt, long *def, int *flags, int *compl, char_u **compl_arg, int* attr_type_arg);
+- static char_u *uc_split_args(char_u *arg, size_t *lenp);
+- static size_t uc_check_code(char_u *code, size_t len, char_u *buf, ucmd_T *cmd, exarg_T *eap, char_u **split_buf, size_t *split_len);
+-
+ static int
+ uc_add_command(
+ char_u *name,
+--- 5808,5813 ----
+*** ../vim-8.1.0442/src/ex_eval.c 2017-07-10 21:50:04.000000000 +0200
+--- src/ex_eval.c 2018-09-30 20:12:01.345516685 +0200
+***************
+*** 15,21 ****
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+
+- static void free_msglist(struct msglist *l);
+ static int throw_exception(void *, except_type_T, char_u *);
+ static char_u *get_end_emsg(struct condstack *cstack);
+
+--- 15,20 ----
+***************
+*** 65,75 ****
+ # define THROW_ON_INTERRUPT_TRUE
+ #endif
+
+- static void catch_exception(except_T *excp);
+- static void finish_exception(except_T *excp);
+- static void discard_exception(except_T *excp, int was_finished);
+- static void report_pending(int action, int pending, void *value);
+-
+ /*
+ * When several errors appear in a row, setting "force_abort" is delayed until
+ * the failing command returned. "cause_abort" is set to TRUE meanwhile, in
+--- 64,69 ----
+*** ../vim-8.1.0442/src/ex_getln.c 2018-09-30 17:45:26.860914873 +0200
+--- src/ex_getln.c 2018-09-30 20:32:06.389287602 +0200
+***************
+*** 75,85 ****
+ static int hislen = 0; /* actual length of history tables */
+
+ static int hist_char2type(int c);
+-
+- static int in_history(int, char_u *, int, int, int);
+- # ifdef FEAT_EVAL
+- static int calc_hist_idx(int histype, int num);
+- # endif
+ #endif
+
+ #ifdef FEAT_RIGHTLEFT
+--- 75,80 ----
+***************
+*** 103,111 ****
+ static void save_cmdline(struct cmdline_info *ccp);
+ static void restore_cmdline(struct cmdline_info *ccp);
+ static int cmdline_paste(int regname, int literally, int remcr);
+- #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+- static void redrawcmd_preedit(void);
+- #endif
+ #ifdef FEAT_WILDMENU
+ static void cmdline_del(int from);
+ #endif
+--- 98,103 ----
+***************
+*** 5049,5056 ****
+ * Remove "@ab" if the top of 'helplang' is "ab" and the language of the first
+ * tag matches it. Otherwise remove "@en" if "en" is the only language.
+ */
+- static void cleanup_help_tags(int num_file, char_u **file);
+-
+ static void
+ cleanup_help_tags(int num_file, char_u **file)
+ {
+--- 5041,5046 ----
+***************
+*** 6707,6714 ****
+ static int viminfo_hislen[HIST_COUNT] = {0, 0, 0, 0, 0};
+ static int viminfo_add_at_front = FALSE;
+
+- static int hist_type2char(int type, int use_question);
+-
+ /*
+ * Translate a history type number to the associated character.
+ */
+--- 6697,6702 ----
+*** ../vim-8.1.0442/src/fileio.c 2018-09-16 15:47:45.629425398 +0200
+--- src/fileio.c 2018-09-30 20:33:44.836590897 +0200
+***************
+*** 39,47 ****
+ #ifdef FEAT_CRYPT
+ static char_u *check_for_cryptkey(char_u *cryptkey, char_u *ptr, long *sizep, off_T *filesizep, int newfile, char_u *fname, int *did_ask);
+ #endif
+- #ifdef UNIX
+- static void set_file_time(char_u *fname, time_t atime, time_t mtime);
+- #endif
+ static int set_rw_fname(char_u *fname, char_u *sfname);
+ static int msg_add_fileformat(int eol_type);
+ static void msg_add_eol(void);
+--- 39,44 ----
+***************
+*** 129,138 ****
+ static int get_mac_fio_flags(char_u *ptr);
+ # endif
+ #endif
+- static int move_lines(buf_T *frombuf, buf_T *tobuf);
+- #ifdef TEMPDIRNAMES
+- static void vim_settempdir(char_u *tempdir);
+- #endif
+ static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
+
+ /*
+--- 126,131 ----
+***************
+*** 7884,7899 ****
+
+ static int au_need_clean = FALSE; /* need to delete marked patterns */
+
+- static void show_autocmd(AutoPat *ap, event_T event);
+- static void au_remove_pat(AutoPat *ap);
+- static void au_remove_cmds(AutoPat *ap);
+- static void au_cleanup(void);
+- static int au_new_group(char_u *name);
+- static void au_del_group(char_u *name);
+- static event_T event_name2nr(char_u *start, char_u **end);
+ static char_u *event_nr2name(event_T event);
+- static char_u *find_end_event(char_u *arg, int have_group);
+- static int event_ignored(event_T event);
+ static int au_get_grouparg(char_u **argp);
+ static int do_autocmd_event(event_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group);
+ static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap);
+--- 7877,7883 ----
+*** ../vim-8.1.0442/src/getchar.c 2018-09-30 17:11:45.305649987 +0200
+--- src/getchar.c 2018-09-30 20:34:39.744201771 +0200
+***************
+*** 108,124 ****
+
+ static int last_recorded_len = 0; /* number of last recorded chars */
+
+- static char_u *get_buffcont(buffheader_T *, int);
+- static void add_buff(buffheader_T *, char_u *, long n);
+- static void add_num_buff(buffheader_T *, long);
+- static void add_char_buff(buffheader_T *, int);
+- static int read_readbuffers(int advance);
+ static int read_readbuf(buffheader_T *buf, int advance);
+- static void start_stuff(void);
+- static int read_redo(int, int);
+- static void copy_redo(int);
+ static void init_typebuf(void);
+- static void gotchars(char_u *, int);
+ static void may_sync_undo(void);
+ static void closescript(void);
+ static int vgetorpeek(int);
+--- 108,115 ----
+*** ../vim-8.1.0442/src/gui.c 2018-07-29 17:35:19.493750319 +0200
+--- src/gui.c 2018-09-30 20:35:36.795797084 +0200
+***************
+*** 17,37 ****
+ static void set_guifontwide(char_u *font_name);
+ #endif
+ static void gui_check_pos(void);
+- static void gui_position_components(int);
+ static void gui_outstr(char_u *, int);
+ static int gui_screenchar(int off, int flags, guicolor_T fg, guicolor_T bg, int back);
+- #ifdef FEAT_GUI_GTK
+- static int gui_screenstr(int off, int len, int flags, guicolor_T fg, guicolor_T bg, int back);
+- #endif
+ static void gui_delete_lines(int row, int count);
+ static void gui_insert_lines(int row, int count);
+- static void fill_mouse_coord(char_u *p, int col, int row);
+ #if defined(FEAT_GUI_TABLINE) || defined(PROTO)
+ static int gui_has_tabline(void);
+ #endif
+ static void gui_do_scrollbar(win_T *wp, int which, int enable);
+- static colnr_T scroll_line_len(linenr_T lnum);
+- static linenr_T gui_find_longest_lnum(void);
+ static void gui_update_horiz_scrollbar(int);
+ static void gui_set_fg_color(char_u *name);
+ static void gui_set_bg_color(char_u *name);
+--- 17,30 ----
+***************
+*** 5023,5029 ****
+ /*
+ * This is shared between Athena, Motif and GTK.
+ */
+- static void gfp_setname(char_u *fname, void *cookie);
+
+ /*
+ * Callback function for do_in_runtimepath().
+--- 5016,5021 ----
+***************
+*** 5384,5392 ****
+ #endif
+
+ #if defined(HAVE_DROP_FILE) || defined(PROTO)
+-
+- static void gui_wingoto_xy(int x, int y);
+-
+ /*
+ * Jump to the window at specified point (x, y).
+ */
+--- 5376,5381 ----
+*** ../vim-8.1.0442/src/gui_at_fs.c 2016-08-29 22:42:20.000000000 +0200
+--- src/gui_at_fs.c 2018-09-30 20:38:54.746400534 +0200
+***************
+*** 170,207 ****
+
+ static int SFstatus = SEL_FILE_NULL;
+
+! /***************** static functions */
+
+ static void SFsetText(char *path);
+ static void SFtextChanged(void);
+- static char *SFgetText(void);
+- static void SFupdatePath(void);
+ static int SFgetDir(SFDir *dir);
+ static void SFdrawLists(int doScroll);
+ static void SFdrawList(int n, int doScroll);
+ static void SFclearList(int n, int doScroll);
+- static void SFbuttonPressList(Widget w, int n, XButtonPressedEvent *event);
+- static void SFbuttonReleaseList(Widget w, int n, XButtonReleasedEvent *event);
+- static void SFdirModTimer(XtPointer cl, XtIntervalId *id);
+ static char SFstatChar(stat_T *statBuf);
+- static void SFdrawStrings(Window w, SFDir *dir, int from, int to);
+- static int SFnewInvertEntry(int n, XMotionEvent *event);
+- static void SFinvertEntry(int n);
+- static void SFenterList(Widget w, int n, XEnterWindowEvent *event);
+- static void SFleaveList(Widget w, int n, XEvent *event);
+ static void SFmotionList(Widget w, int n, XMotionEvent *event);
+- static void SFvFloatSliderMovedCallback(Widget w, XtPointer n, XtPointer fnew);
+ static void SFvSliderMovedCallback(Widget w, int n, int nw);
+- static void SFvAreaSelectedCallback(Widget w, XtPointer n, XtPointer pnew);
+- static void SFhSliderMovedCallback(Widget w, XtPointer n, XtPointer nw);
+- static void SFhAreaSelectedCallback(Widget w, XtPointer n, XtPointer pnew);
+- static void SFpathSliderMovedCallback(Widget w, XtPointer client_data, XtPointer nw);
+- static void SFpathAreaSelectedCallback(Widget w, XtPointer client_data, XtPointer pnew);
+ static Boolean SFworkProc(void);
+ static int SFcompareEntries(const void *p, const void *q);
+- static void SFprepareToReturn(void);
+- static void SFcreateWidgets(Widget toplevel, char *prompt, char *ok, char *cancel);
+- static void SFsetColors(guicolor_T bg, guicolor_T fg, guicolor_T scroll_bg, guicolor_T scrollfg);
+
+ /***************** xstat.h */
+
+--- 170,188 ----
+
+ static int SFstatus = SEL_FILE_NULL;
+
+! /***************** forward declare static functions */
+
+ static void SFsetText(char *path);
+ static void SFtextChanged(void);
+ static int SFgetDir(SFDir *dir);
+ static void SFdrawLists(int doScroll);
+ static void SFdrawList(int n, int doScroll);
+ static void SFclearList(int n, int doScroll);
+ static char SFstatChar(stat_T *statBuf);
+ static void SFmotionList(Widget w, int n, XMotionEvent *event);
+ static void SFvSliderMovedCallback(Widget w, int n, int nw);
+ static Boolean SFworkProc(void);
+ static int SFcompareEntries(const void *p, const void *q);
+
+ /***************** xstat.h */
+
+***************
+*** 237,244 ****
+
+ static int SFtwiddle = 0;
+
+- static int SFchdir(char *path);
+-
+ static int
+ SFchdir(char *path)
+ {
+--- 218,223 ----
+***************
+*** 256,263 ****
+ return result;
+ }
+
+- static void SFfree(int i);
+-
+ static void
+ SFfree(int i)
+ {
+--- 235,240 ----
+***************
+*** 279,294 ****
+ dir->dir = NULL;
+ }
+
+- static void SFstrdup(char **s1, char *s2);
+-
+ static void
+ SFstrdup(char **s1, char *s2)
+ {
+ *s1 = strcpy(XtMalloc((unsigned)(strlen(s2) + 1)), s2);
+ }
+
+- static void SFunreadableDir(SFDir *dir);
+-
+ static void
+ SFunreadableDir(SFDir *dir)
+ {
+--- 256,267 ----
+***************
+*** 302,309 ****
+ dir->nChars = strlen(cannotOpen);
+ }
+
+- static void SFreplaceText(SFDir *dir, char *str);
+-
+ static void
+ SFreplaceText(SFDir *dir, char *str)
+ {
+--- 275,280 ----
+***************
+*** 323,330 ****
+ SFtextChanged();
+ }
+
+- static void SFexpand(char *str);
+-
+ static void
+ SFexpand(char *str)
+ {
+--- 294,299 ----
+***************
+*** 379,386 ****
+ XtFree(growing);
+ }
+
+- static int SFfindFile(SFDir *dir, char *str);
+-
+ static int
+ SFfindFile(SFDir *dir, char *str)
+ {
+--- 348,353 ----
+***************
+*** 478,485 ****
+ return 0;
+ }
+
+- static void SFunselect(void);
+-
+ static void
+ SFunselect(void)
+ {
+--- 445,450 ----
+***************
+*** 492,507 ****
+ dir->endSelection = -1;
+ }
+
+- static int SFcompareLogins(const void *p, const void *q);
+-
+ static int
+ SFcompareLogins(const void *p, const void *q)
+ {
+ return strcmp(((SFLogin *)p)->name, ((SFLogin *)q)->name);
+ }
+
+- static void SFgetHomeDirs(void);
+-
+ static void
+ SFgetHomeDirs(void)
+ {
+--- 457,468 ----
+***************
+*** 568,575 ****
+ (void)strcat(entries[i].real, "/");
+ }
+
+- static int SFfindHomeDir(char *begin, char *end);
+-
+ static int
+ SFfindHomeDir(char *begin, char *end)
+ {
+--- 529,534 ----
+***************
+*** 868,875 ****
+ }
+ }
+
+- static int SFcheckDir(int n, SFDir *dir);
+-
+ static int
+ SFcheckDir(int n, SFDir *dir)
+ {
+--- 827,832 ----
+***************
+*** 932,939 ****
+ return 0;
+ }
+
+- static int SFcheckFiles(SFDir *dir);
+-
+ static int
+ SFcheckFiles(SFDir *dir)
+ {
+--- 889,894 ----
+***************
+*** 1077,1084 ****
+
+ static XtIntervalId SFscrollTimerId;
+
+- static void SFinitFont(void);
+-
+ static void
+ SFinitFont(void)
+ {
+--- 1032,1037 ----
+***************
+*** 1128,1135 ****
+ #endif
+ }
+
+- static void SFcreateGC(void);
+-
+ static void
+ SFcreateGC(void)
+ {
+--- 1081,1086 ----
+***************
+*** 1261,1268 ****
+ }
+ }
+
+- static void SFdeleteEntry(SFDir *dir, SFEntry *entry);
+-
+ static void
+ SFdeleteEntry(SFDir *dir, SFEntry *entry)
+ {
+--- 1212,1217 ----
+***************
+*** 1313,1320 ****
+ #endif
+ }
+
+- static void SFwriteStatChar(char *name, int last, stat_T *statBuf);
+-
+ static void
+ SFwriteStatChar(
+ char *name,
+--- 1262,1267 ----
+***************
+*** 1324,1331 ****
+ name[last] = SFstatChar(statBuf);
+ }
+
+- static int SFstatAndCheck(SFDir *dir, SFEntry *entry);
+-
+ static int
+ SFstatAndCheck(SFDir *dir, SFEntry *entry)
+ {
+--- 1271,1276 ----
+***************
+*** 1532,1539 ****
+ SFentryHeight);
+ }
+
+- static unsigned long SFscrollTimerInterval(void);
+-
+ static unsigned long
+ SFscrollTimerInterval(void)
+ {
+--- 1477,1482 ----
+***************
+*** 1561,1568 ****
+ return (unsigned long)t;
+ }
+
+- static void SFscrollTimer(XtPointer p, XtIntervalId *id);
+-
+ static void
+ SFscrollTimer(XtPointer p, XtIntervalId *id UNUSED)
+ {
+--- 1504,1509 ----
+***************
+*** 2131,2138 ****
+ Ctrl<Key>M: redraw-display()\n\
+ ";
+
+- static void SFexposeList(Widget w, XtPointer n, XEvent *event, Boolean *cont);
+-
+ static void
+ SFexposeList(
+ Widget w UNUSED,
+--- 2072,2077 ----
+***************
+*** 2146,2153 ****
+ SFdrawList((int)(long)n, SF_DO_NOT_SCROLL);
+ }
+
+- static void SFmodVerifyCallback(Widget w, XtPointer client_data, XEvent *event, Boolean *cont);
+-
+ static void
+ SFmodVerifyCallback(
+ Widget w UNUSED,
+--- 2085,2090 ----
+***************
+*** 2164,2171 ****
+ SFstatus = SEL_FILE_TEXT;
+ }
+
+- static void SFokCallback(Widget w, XtPointer cl, XtPointer cd);
+-
+ static void
+ SFokCallback(Widget w UNUSED, XtPointer cl UNUSED, XtPointer cd UNUSED)
+ {
+--- 2101,2106 ----
+***************
+*** 2178,2185 ****
+ { NULL, (XtPointer) NULL },
+ };
+
+- static void SFcancelCallback(Widget w, XtPointer cl, XtPointer cd);
+-
+ static void
+ SFcancelCallback(Widget w UNUSED, XtPointer cl UNUSED, XtPointer cd UNUSED)
+ {
+--- 2113,2118 ----
+***************
+*** 2192,2199 ****
+ { NULL, (XtPointer) NULL },
+ };
+
+- static void SFdismissAction(Widget w, XEvent *event, String *params, Cardinal *num_params);
+-
+ static void
+ SFdismissAction(
+ Widget w UNUSED,
+--- 2125,2130 ----
+*** ../vim-8.1.0442/src/gui_athena.c 2017-11-18 20:37:02.000000000 +0100
+--- src/gui_athena.c 2018-09-30 20:40:00.885938817 +0200
+***************
+*** 52,59 ****
+ static vimmenu_T *a_cur_menu = NULL;
+ static Cardinal athena_calculate_ins_pos(Widget);
+
+- static Pixmap gui_athena_create_pullright_pixmap(Widget);
+- static void gui_athena_menu_timeout(XtPointer, XtIntervalId *);
+ static void gui_athena_popup_callback(Widget, XtPointer, XtPointer);
+ static void gui_athena_delayed_arm_action(Widget, XEvent *, String *,
+ Cardinal *);
+--- 52,57 ----
+***************
+*** 70,77 ****
+ static Widget toolBar = (Widget)0;
+ #endif
+
+- static void gui_athena_scroll_cb_jump(Widget, XtPointer, XtPointer);
+- static void gui_athena_scroll_cb_scroll(Widget, XtPointer, XtPointer);
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_MENU)
+ static void gui_athena_menu_colors(Widget id);
+ #endif
+--- 68,73 ----
+***************
+*** 445,451 ****
+ # endif
+
+ static void createXpmImages(char_u *path, char **xpm, Pixmap *sen);
+- static void get_toolbar_pixmap(vimmenu_T *menu, Pixmap *sen);
+
+ /*
+ * Allocated a pixmap for toolbar menu "menu".
+--- 441,446 ----
+***************
+*** 646,652 ****
+ static Boolean has_submenu(Widget);
+ static void gui_mch_submenu_change(vimmenu_T *mp, int colors);
+ static void gui_athena_menu_font(Widget id);
+- static Boolean gui_athena_menu_has_submenus(Widget, Widget);
+
+ void
+ gui_mch_enable_menu(int flag)
+--- 641,646 ----
+***************
+*** 2041,2050 ****
+ static int dialogStatus;
+ static Atom dialogatom;
+
+- static void keyhit_callback(Widget w, XtPointer client_data, XEvent *event, Boolean *cont);
+- static void butproc(Widget w, XtPointer client_data, XtPointer call_data);
+- static void dialog_wm_handler(Widget w, XtPointer client_data, XEvent *event, Boolean *dum);
+-
+ /*
+ * Callback function for the textfield. When CR is hit this works like
+ * hitting the "OK" button, ESC like "Cancel".
+--- 2035,2040 ----
+*** ../vim-8.1.0442/src/gui_gtk_x11.c 2018-09-19 22:39:59.816157865 +0200
+--- src/gui_gtk_x11.c 2018-09-30 20:41:32.733295842 +0200
+***************
+*** 618,624 ****
+ static gboolean blink_mode = TRUE;
+
+ static gboolean gui_gtk_is_blink_on(void);
+- static void gui_gtk_window_clear(GdkWindow *win);
+
+ static void
+ gui_gtk3_redraw(int x, int y, int width, int height)
+--- 618,623 ----
+*** ../vim-8.1.0442/src/gui_mac.c 2018-07-29 17:35:19.497750288 +0200
+--- src/gui_mac.c 2018-09-30 20:41:48.389186056 +0200
+***************
+*** 300,306 ****
+
+ #ifdef USE_ATSUI_DRAWING
+ static void gui_mac_set_font_attributes(GuiFont font);
+- static void gui_mac_dispose_atsui_style(void);
+ #endif
+
+ /*
+--- 300,305 ----
+*** ../vim-8.1.0442/src/gui_motif.c 2017-11-18 20:37:55.000000000 +0100
+--- src/gui_motif.c 2018-09-30 20:43:31.232463721 +0200
+***************
+*** 83,95 ****
+ static Widget menuBar;
+ #endif
+
+- static void scroll_cb(Widget w, XtPointer client_data, XtPointer call_data);
+- #ifdef FEAT_GUI_TABLINE
+- static void tabline_cb(Widget w, XtPointer client_data, XtPointer call_data);
+- static void tabline_button_cb(Widget w, XtPointer client_data, XtPointer call_data);
+- static void tabline_menu_cb(Widget w, XtPointer closure, XEvent *e, Boolean *continue_dispatch);
+- static void tabline_balloon_cb(BalloonEval *beval, int state);
+- #endif
+ #ifdef FEAT_TOOLBAR
+ # ifdef FEAT_FOOTER
+ static void toolbarbutton_enter_cb(Widget, XtPointer, XEvent *, Boolean *);
+--- 83,88 ----
+***************
+*** 97,108 ****
+ # endif
+ static void reset_focus(void);
+ #endif
+- #ifdef FEAT_FOOTER
+- static int gui_mch_compute_footer_height(void);
+- #endif
+- #ifdef WSDEBUG
+- static void attachDump(Widget, char *);
+- #endif
+
+ static void gui_motif_menu_colors(Widget id);
+ static void gui_motif_scroll_colors(Widget id);
+--- 90,95 ----
+***************
+*** 306,313 ****
+
+ static XtExposeProc old_label_expose = NULL;
+
+- static void label_expose(Widget _w, XEvent *_event, Region _region);
+-
+ static void
+ label_expose(Widget _w, XEvent *_event, Region _region)
+ {
+--- 293,298 ----
+***************
+*** 1173,1181 ****
+ */
+ #include "gui_x11_pm.h"
+
+- static int check_xpm(char_u *path);
+ static char **get_toolbar_pixmap(vimmenu_T *menu, char **fname);
+- static int add_pixmap_args(vimmenu_T *menu, Arg *args, int n);
+
+ /*
+ * Read an Xpm file. Return OK or FAIL.
+--- 1158,1164 ----
+***************
+*** 2088,2095 ****
+ }
+
+ #if defined(FEAT_BROWSE) || defined(FEAT_GUI_DIALOG)
+- static void set_fontlist(Widget wg);
+-
+ /*
+ * Use the 'guifont' or 'guifontset' as a fontlist for a dialog widget.
+ */
+--- 2071,2076 ----
+***************
+*** 2172,2179 ****
+ * - equalize the messages between different GUI implementations as far as
+ * possible.
+ */
+- static void set_predefined_label(Widget parent, String name, char *new_label);
+-
+ static void
+ set_predefined_label(Widget parent, String name, char *new_label)
+ {
+--- 2153,2158 ----
+***************
+*** 2404,2412 ****
+
+ static int dialogStatus;
+
+- static void keyhit_callback(Widget w, XtPointer client_data, XEvent *event, Boolean *cont);
+- static void butproc(Widget w, XtPointer client_data, XtPointer call_data);
+-
+ /*
+ * Callback function for the textfield. When CR is hit this works like
+ * hitting the "OK" button, ESC like "Cancel".
+--- 2383,2388 ----
+***************
+*** 2444,2451 ****
+
+ #ifdef HAVE_XPM
+
+- static Widget create_pixmap_label(Widget parent, String name, char **data, ArgList args, Cardinal arg);
+-
+ static Widget
+ create_pixmap_label(
+ Widget parent,
+--- 2420,2425 ----
+***************
+*** 3492,3504 ****
+ static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+ static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+
+- static void find_replace_destroy_callback(Widget w, XtPointer client_data, XtPointer call_data);
+- static void find_replace_dismiss_callback(Widget w, XtPointer client_data, XtPointer call_data);
+- static void entry_activate_callback(Widget w, XtPointer client_data, XtPointer call_data);
+- static void find_replace_callback(Widget w, XtPointer client_data, XtPointer call_data);
+- static void find_replace_keypress(Widget w, SharedFindReplace * frdp, XKeyEvent * event);
+- static void find_replace_dialog_create(char_u *entry_text, int do_replace);
+-
+ static void
+ find_replace_destroy_callback(
+ Widget w UNUSED,
+--- 3466,3471 ----
+*** ../vim-8.1.0442/src/gui_photon.c 2018-02-10 18:34:22.000000000 +0100
+--- src/gui_photon.c 2018-09-30 20:43:50.156330604 +0200
+***************
+*** 212,221 ****
+ static void gui_ph_get_panelgroup_margins(short*, short*, short*, short*);
+ #endif
+
+- #ifdef FEAT_TOOLBAR
+- static PhImage_t *gui_ph_toolbar_find_icon(vimmenu_T *menu);
+- #endif
+-
+ static void gui_ph_draw_start(void);
+ static void gui_ph_draw_end(void);
+
+--- 212,217 ----
+*** ../vim-8.1.0442/src/gui_w32.c 2018-09-22 14:39:07.681593221 +0200
+--- src/gui_w32.c 2018-09-30 20:44:47.155929310 +0200
+***************
+*** 4336,4345 ****
+ # define UINT_PTR UINT
+ #endif
+
+- static void make_tooltip(BalloonEval *beval, char *text, POINT pt);
+- static void delete_tooltip(BalloonEval *beval);
+- static VOID CALLBACK BevalTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
+-
+ static BalloonEval *cur_beval = NULL;
+ static UINT_PTR BevalTimerId = 0;
+ static DWORD LastActivity = 0;
+--- 4336,4341 ----
+***************
+*** 4463,4472 ****
+ /*
+ * stuff for dialogs, menus, tearoffs etc.
+ */
+- static LRESULT APIENTRY dialog_callback(HWND, UINT, WPARAM, LPARAM);
+- #ifdef FEAT_TEAROFF
+- static LRESULT APIENTRY tearoff_callback(HWND, UINT, WPARAM, LPARAM);
+- #endif
+ static PWORD
+ add_dialog_element(
+ PWORD p,
+--- 4459,4464 ----
+*** ../vim-8.1.0442/src/gui_x11.c 2018-05-13 16:21:50.000000000 +0200
+--- src/gui_x11.c 2018-09-30 20:45:11.659756649 +0200
+***************
+*** 138,144 ****
+ #endif
+ static void gui_x11_wm_protocol_handler(Widget, XtPointer, XEvent *, Boolean *);
+ static Cursor gui_x11_create_blank_mouse(void);
+- static void draw_curl(int row, int col, int cells);
+
+
+ /*
+--- 138,143 ----
+***************
+*** 1309,1316 ****
+ */
+ static XtInputId _xsmp_xtinputid;
+
+- static void local_xsmp_handle_requests(XtPointer c, int *s, XtInputId *i);
+-
+ static void
+ local_xsmp_handle_requests(
+ XtPointer c UNUSED,
+--- 1308,1313 ----
+*** ../vim-8.1.0442/src/hangulin.c 2016-11-10 18:24:37.000000000 +0100
+--- src/hangulin.c 2018-09-30 20:45:38.015570851 +0200
+***************
+*** 37,44 ****
+
+ static void convert_ks_to_3(const char_u *src, int *fp, int *mp, int *lp);
+ static int convert_3_to_ks(int fv, int mv, int lv, char_u *des);
+- static int hangul_automata2(char_u *buf, unsigned int *c);
+- static int hangul_automata3(char_u *buf, unsigned int *c);
+
+ #define push(x) {stack[ sp++ ] = *(x); stack[sp++] = *((x)+1);}
+ #define pop(x) {*((x) + 1) = stack[--sp]; *(x) = stack[--sp];}
+--- 37,42 ----
+*** ../vim-8.1.0442/src/hardcopy.c 2018-06-23 19:22:45.606486311 +0200
+--- src/hardcopy.c 2018-09-30 20:48:36.238312294 +0200
+***************
+*** 137,156 ****
+
+ static char_u *parse_list_options(char_u *option_str, option_table_T *table, int table_size);
+
+- #ifdef FEAT_SYN_HL
+- static long_u darken_rgb(long_u rgb);
+- static long_u prt_get_term_color(int colorindex);
+- #endif
+- static void prt_set_fg(long_u fg);
+- static void prt_set_bg(long_u bg);
+- static void prt_set_font(int bold, int italic, int underline);
+- static void prt_line_number(prt_settings_T *psettings, int page_line, linenr_T lnum);
+- static void prt_header(prt_settings_T *psettings, int pagenum, linenr_T lnum);
+- static void prt_message(char_u *s);
+ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T *ppos);
+- #ifdef FEAT_SYN_HL
+- static void prt_get_attr(int hl_id, prt_text_attr_T* pattr, int modec);
+- #endif
+
+ /*
+ * Parse 'printoptions' and set the flags in "printer_opts".
+--- 137,143 ----
+***************
+*** 1357,1404 ****
+ PRT_DSC_ENDCOMMENTS_TYPE}
+ };
+
+- static void prt_write_file_raw_len(char_u *buffer, int bytes);
+- static void prt_write_file(char_u *buffer);
+ static void prt_write_file_len(char_u *buffer, int bytes);
+- static void prt_write_string(char *s);
+- static void prt_write_int(int i);
+- static void prt_write_boolean(int b);
+- static void prt_def_font(char *new_name, char *encoding, int height, char *font);
+- static void prt_real_bits(double real, int precision, int *pinteger, int *pfraction);
+- static void prt_write_real(double val, int prec);
+- static void prt_def_var(char *name, double value, int prec);
+- static void prt_flush_buffer(void);
+- static void prt_resource_name(char_u *filename, void *cookie);
+- static int prt_find_resource(char *name, struct prt_ps_resource_S *resource);
+- static int prt_open_resource(struct prt_ps_resource_S *resource);
+- static int prt_check_resource(struct prt_ps_resource_S *resource, char_u *version);
+- static void prt_dsc_start(void);
+- static void prt_dsc_noarg(char *comment);
+- static void prt_dsc_textline(char *comment, char *text);
+- static void prt_dsc_text(char *comment, char *text);
+- static void prt_dsc_ints(char *comment, int count, int *ints);
+- static void prt_dsc_requirements(int duplex, int tumble, int collate, int color, int num_copies);
+- static void prt_dsc_docmedia(char *paper_name, double width, double height, double weight, char *colour, char *type);
+- static void prt_dsc_resources(char *comment, char *type, char *strings);
+- static void prt_dsc_font_resource(char *resource, struct prt_ps_font_S *ps_font);
+- static float to_device_units(int idx, double physsize, int def_number);
+- static void prt_page_margins(double width, double height, double *left, double *right, double *top, double *bottom);
+- static void prt_font_metrics(int font_scale);
+- static int prt_get_cpl(void);
+- static int prt_get_lpp(void);
+- static int prt_add_resource(struct prt_ps_resource_S *resource);
+- static int prt_resfile_next_line(void);
+- static int prt_resfile_strncmp(int offset, char *string, int len);
+- static int prt_resfile_skip_nonws(int offset);
+- static int prt_resfile_skip_ws(int offset);
+ static int prt_next_dsc(struct prt_dsc_line_S *p_dsc_line);
+- #ifdef FEAT_MBYTE
+- static int prt_build_cid_fontname(int font, char_u *name, int name_len);
+- static void prt_def_cidfont(char *new_name, int height, char *cidfont);
+- static void prt_dup_cidfont(char *original_name, char *new_name);
+- static int prt_match_encoding(char *p_encoding, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_encoding_S **pp_mbenc);
+- static int prt_match_charset(char *p_charset, struct prt_ps_mbfont_S *p_cmap, struct prt_ps_charset_S **pp_mbchar);
+- #endif
+
+ /*
+ * Variables for the output PostScript file.
+--- 1344,1351 ----
+*** ../vim-8.1.0442/src/if_cscope.c 2018-08-11 13:57:16.211969806 +0200
+--- src/if_cscope.c 2018-09-30 20:49:35.845890662 +0200
+***************
+*** 20,37 ****
+ #endif
+ #include "if_cscope.h"
+
+- static void cs_usage_msg(csid_e x);
+ static int cs_add(exarg_T *eap);
+- static void cs_stat_emsg(char *fname);
+ static int cs_add_common(char *, char *, char *);
+ static int cs_check_for_connections(void);
+ static int cs_check_for_tags(void);
+ static int cs_cnt_connections(void);
+- static void cs_reading_emsg(int idx);
+- static int cs_cnt_matches(int idx);
+- static char * cs_create_cmd(char *csoption, char *pattern);
+ static int cs_create_connection(int i);
+- static void do_cscope_general(exarg_T *eap, int make_split);
+ #ifdef FEAT_QUICKFIX
+ static void cs_file_results(FILE *, int *);
+ #endif
+--- 20,31 ----
+***************
+*** 40,46 ****
+ static int cs_find(exarg_T *eap);
+ static int cs_find_common(char *opt, char *pat, int, int, int, char_u *cmdline);
+ static int cs_help(exarg_T *eap);
+- static void clear_csinfo(int i);
+ static int cs_insert_filelist(char *, char *, char *,
+ stat_T *);
+ static int cs_kill(exarg_T *eap);
+--- 34,39 ----
+***************
+*** 49,56 ****
+ static char * cs_make_vim_style_matches(char *, char *,
+ char *, char *);
+ static char * cs_manage_matches(char **, char **, int, mcmd_e);
+- static char * cs_parse_results(int cnumber, char *buf, int bufsize, char **context, char **linenumber, char **search);
+- static char * cs_pathcomponents(char *path);
+ static void cs_print_tags_priv(char **, char **, int);
+ static int cs_read_prompt(int);
+ static void cs_release_csp(int, int freefnpp);
+--- 42,47 ----
+***************
+*** 1345,1352 ****
+ }
+
+ #ifndef UNIX
+- static char *GetWin32Error(void);
+-
+ static char *
+ GetWin32Error(void)
+ {
+--- 1336,1341 ----
+*** ../vim-8.1.0442/src/if_mzsch.c 2018-07-25 22:02:32.231966301 +0200
+--- src/if_mzsch.c 2018-09-30 21:00:03.033441617 +0200
+***************
+*** 117,168 ****
+ #endif
+ /* Buffer-related commands */
+ static Scheme_Object *buffer_new(buf_T *buf);
+- static Scheme_Object *get_buffer_by_name(void *, int, Scheme_Object **);
+ static Scheme_Object *get_buffer_by_num(void *, int, Scheme_Object **);
+- static Scheme_Object *get_buffer_count(void *, int, Scheme_Object **);
+- static Scheme_Object *get_buffer_line(void *, int, Scheme_Object **);
+- static Scheme_Object *get_buffer_line_list(void *, int, Scheme_Object **);
+- static Scheme_Object *get_buffer_name(void *, int, Scheme_Object **);
+- static Scheme_Object *get_buffer_num(void *, int, Scheme_Object **);
+- static Scheme_Object *get_buffer_size(void *, int, Scheme_Object **);
+- static Scheme_Object *get_curr_buffer(void *, int, Scheme_Object **);
+- static Scheme_Object *get_next_buffer(void *, int, Scheme_Object **);
+- static Scheme_Object *get_prev_buffer(void *, int, Scheme_Object **);
+- static Scheme_Object *mzscheme_open_buffer(void *, int, Scheme_Object **);
+- static Scheme_Object *set_buffer_line(void *, int, Scheme_Object **);
+- static Scheme_Object *set_buffer_line_list(void *, int, Scheme_Object **);
+- static Scheme_Object *insert_buffer_line_list(void *, int, Scheme_Object **);
+- static Scheme_Object *get_range_start(void *, int, Scheme_Object **);
+- static Scheme_Object *get_range_end(void *, int, Scheme_Object **);
+ static vim_mz_buffer *get_vim_curr_buffer(void);
+
+ /* Window-related commands */
+ static Scheme_Object *window_new(win_T *win);
+- static Scheme_Object *get_curr_win(void *, int, Scheme_Object **);
+- static Scheme_Object *get_window_count(void *, int, Scheme_Object **);
+- static Scheme_Object *get_window_by_num(void *, int, Scheme_Object **);
+- static Scheme_Object *get_window_num(void *, int, Scheme_Object **);
+- static Scheme_Object *get_window_buffer(void *, int, Scheme_Object **);
+- static Scheme_Object *get_window_height(void *, int, Scheme_Object **);
+- static Scheme_Object *set_window_height(void *, int, Scheme_Object **);
+- static Scheme_Object *get_window_width(void *, int, Scheme_Object **);
+- static Scheme_Object *set_window_width(void *, int, Scheme_Object **);
+- static Scheme_Object *get_cursor(void *, int, Scheme_Object **);
+- static Scheme_Object *set_cursor(void *, int, Scheme_Object **);
+- static Scheme_Object *get_window_list(void *, int, Scheme_Object **);
+ static vim_mz_window *get_vim_curr_window(void);
+
+- /* Vim-related commands */
+- static Scheme_Object *mzscheme_beep(void *, int, Scheme_Object **);
+- static Scheme_Object *get_option(void *, int, Scheme_Object **);
+- static Scheme_Object *set_option(void *, int, Scheme_Object **);
+- static Scheme_Object *vim_command(void *, int, Scheme_Object **);
+- static Scheme_Object *vim_eval(void *, int, Scheme_Object **);
+- static Scheme_Object *vim_bufferp(void *data, int, Scheme_Object **);
+- static Scheme_Object *vim_windowp(void *data, int, Scheme_Object **);
+- static Scheme_Object *vim_buffer_validp(void *data, int, Scheme_Object **);
+- static Scheme_Object *vim_window_validp(void *data, int, Scheme_Object **);
+-
+ /*
+ *========================================================================
+ * Internal Function Prototypes
+--- 117,129 ----
+*** ../vim-8.1.0442/src/if_python3.c 2018-07-04 22:03:22.106919847 +0200
+--- src/if_python3.c 2018-09-30 21:10:55.304803503 +0200
+***************
+*** 709,716 ****
+ /* Load the standard Python exceptions - don't import the symbols from the
+ * DLL, as this can cause errors (importing data symbols is not reliable).
+ */
+- static void get_py3_exceptions(void);
+-
+ static void
+ get_py3_exceptions(void)
+ {
+--- 709,714 ----
+***************
+*** 788,795 ****
+ static int ListSetattro(PyObject *, PyObject *, PyObject *);
+ static PyObject *FunctionGetattro(PyObject *, PyObject *);
+
+- static PyObject *VimPathHook(PyObject *, PyObject *);
+-
+ static struct PyModuleDef vimmodule;
+
+ #define PY_CAN_RECURSE
+--- 786,791 ----
+*** ../vim-8.1.0442/src/if_xcmdsrv.c 2018-03-04 16:07:56.000000000 +0100
+--- src/if_xcmdsrv.c 2018-09-30 21:05:05.415292167 +0200
+***************
+*** 192,201 ****
+ static void DeleteAnyLingerer(Display *dpy, Window w);
+ static int GetRegProp(Display *dpy, char_u **regPropp, long_u *numItemsp, int domsg);
+ static int WaitForPend(void *p);
+- static int WaitForReply(void *p);
+ static int WindowValid(Display *dpy, Window w);
+ static void ServerWait(Display *dpy, Window w, EndCond endCond, void *endData, int localLoop, int seconds);
+- static struct ServerReply *ServerReplyFind(Window w, enum ServerReplyOp op);
+ static int AppendPropCarefully(Display *display, Window window, Atom property, char_u *value, int length);
+ static int x_error_check(Display *dpy, XErrorEvent *error_event);
+ static int IsSerialName(char_u *name);
+--- 192,199 ----
+*** ../vim-8.1.0442/src/integration.c 2017-11-18 20:39:10.000000000 +0100
+--- src/integration.c 2018-09-30 21:07:49.510125154 +0200
+***************
+*** 76,83 ****
+ #endif
+
+ /* Functions private to this file */
+- static void workshop_connection_closed(void);
+- static void messageFromEserve(XtPointer clientData, int *dum1, XtInputId *dum2);
+ static void workshop_disconnect(void);
+ static void workshop_sensitivity(int num, char *table);
+ static void adjust_sign_name(char *filename);
+--- 76,81 ----
+***************
+*** 111,117 ****
+
+ Boolean save_files = True; /* When true, save all files before build actions */
+
+! void
+ workshop_connection_closed(void)
+ {
+ /*
+--- 109,115 ----
+
+ Boolean save_files = True; /* When true, save all files before build actions */
+
+! static void
+ workshop_connection_closed(void)
+ {
+ /*
+***************
+*** 157,163 ****
+
+ }
+
+! void
+ messageFromEserve(XtPointer clientData UNUSED,
+ int *dum1 UNUSED,
+ XtInputId *dum2 UNUSED)
+--- 155,161 ----
+
+ }
+
+! static void
+ messageFromEserve(XtPointer clientData UNUSED,
+ int *dum1 UNUSED,
+ XtInputId *dum2 UNUSED)
+***************
+*** 518,524 ****
+ }
+ }
+
+! static void
+ process_menuItem(
+ char *cmd)
+ {
+--- 516,522 ----
+ }
+ }
+
+! static void
+ process_menuItem(
+ char *cmd)
+ {
+***************
+*** 540,546 ****
+ }
+
+
+! static void
+ process_toolbarButton(
+ char *cmd) /* button definition */
+ {
+--- 538,544 ----
+ }
+
+
+! static void
+ process_toolbarButton(
+ char *cmd) /* button definition */
+ {
+***************
+*** 571,577 ****
+
+
+ #ifdef DEBUG
+! void
+ unrecognised_message(
+ char *cmd)
+ {
+--- 569,575 ----
+
+
+ #ifdef DEBUG
+! static void
+ unrecognised_message(
+ char *cmd)
+ {
+***************
+*** 587,593 ****
+ * x.xpm : largest icon
+ * x1.xpm : smaller icon
+ * x2.xpm : smallest icon */
+! void
+ adjust_sign_name(char *filename)
+ {
+ char *s;
+--- 585,591 ----
+ * x.xpm : largest icon
+ * x1.xpm : smaller icon
+ * x2.xpm : smallest icon */
+! static void
+ adjust_sign_name(char *filename)
+ {
+ char *s;
+***************
+*** 735,741 ****
+ dummy = write(sd, buf, strlen(buf));
+ }
+
+! void workshop_disconnect(void)
+ {
+ /* Probably need to send some message here */
+
+--- 733,740 ----
+ dummy = write(sd, buf, strlen(buf));
+ }
+
+! static void
+! workshop_disconnect(void)
+ {
+ /* Probably need to send some message here */
+
+***************
+*** 891,897 ****
+ * Toolbar code
+ */
+
+! void workshop_sensitivity(int num, char *table)
+ {
+ /* build up a verb table */
+ VerbSense *vs;
+--- 890,897 ----
+ * Toolbar code
+ */
+
+! static void
+! workshop_sensitivity(int num, char *table)
+ {
+ /* build up a verb table */
+ VerbSense *vs;
+***************
+*** 947,953 ****
+ /* Set an editor option.
+ * IGNORE an option if you do not recognize it.
+ */
+! void workshop_set_option_first(char *name, char *value)
+ {
+ /* Currently value can only be on/off. This may change later (for
+ * example to set an option like "balloon evaluate delay", but
+--- 947,954 ----
+ /* Set an editor option.
+ * IGNORE an option if you do not recognize it.
+ */
+! static void
+! workshop_set_option_first(char *name, char *value)
+ {
+ /* Currently value can only be on/off. This may change later (for
+ * example to set an option like "balloon evaluate delay", but
+***************
+*** 1092,1098 ****
+
+ #ifdef DEBUG
+
+! void
+ pldebug(
+ char *fmt, /* a printf style format line */
+ ...)
+--- 1093,1099 ----
+
+ #ifdef DEBUG
+
+! static void
+ pldebug(
+ char *fmt, /* a printf style format line */
+ ...)
+*** ../vim-8.1.0442/src/json.c 2018-04-08 12:53:40.000000000 +0200
+--- src/json.c 2018-09-30 21:11:23.644601886 +0200
+***************
+*** 19,25 ****
+ #if defined(FEAT_EVAL) || defined(PROTO)
+
+ static int json_encode_item(garray_T *gap, typval_T *val, int copyID, int options);
+- static int json_decode_item(js_read_T *reader, typval_T *res, int options);
+
+ /*
+ * Encode "val" into a JSON format string.
+--- 19,24 ----
+*** ../vim-8.1.0442/src/main.c 2018-09-30 17:11:45.305649987 +0200
+--- src/main.c 2018-09-30 21:12:02.308333694 +0200
+***************
+*** 39,47 ****
+ # endif
+ static void early_arg_scan(mparm_T *parmp);
+ #ifndef NO_VIM_MAIN
+- static void main_msg(char *s);
+ static void usage(void);
+- static int get_number_arg(char_u *p, int *idx, int def);
+ static void parse_command_name(mparm_T *parmp);
+ static void command_line_scan(mparm_T *parmp);
+ static void check_tty(mparm_T *parmp);
+--- 39,45 ----
+***************
+*** 3476,3483 ****
+ #endif /* NO_VIM_MAIN */
+
+ #if defined(STARTUPTIME) || defined(PROTO)
+- static void time_diff(struct timeval *then, struct timeval *now);
+-
+ static struct timeval prev_timeval;
+
+ # ifdef WIN3264
+--- 3474,3479 ----
+*** ../vim-8.1.0442/src/mbyte.c 2018-09-13 15:33:39.605712221 +0200
+--- src/mbyte.c 2018-09-30 21:12:44.184079214 +0200
+***************
+*** 138,144 ****
+
+ #if defined(FEAT_MBYTE) || defined(PROTO)
+
+- static int enc_canon_search(char_u *name);
+ static int dbcs_char2len(int c);
+ static int dbcs_char2bytes(int c, char_u *buf);
+ static int dbcs_ptr2len(char_u *p);
+--- 138,143 ----
+***************
+*** 147,153 ****
+ static int dbcs_char2cells(int c);
+ static int dbcs_ptr2cells_len(char_u *p, int size);
+ static int dbcs_ptr2char(char_u *p);
+- static int utf_safe_read_char_adv(char_u **s, size_t *n);
+
+ /*
+ * Lookup table to quickly get the length in bytes of a UTF-8 character from
+--- 146,151 ----
+***************
+*** 3133,3141 ****
+ {0x1e900,0x1e921,1,34}
+ };
+
+- static int utf_convert(int a, convertStruct table[], int tableSize);
+- static int utf_strnicmp(char_u *s1, char_u *s2, size_t n1, size_t n2);
+-
+ /*
+ * Generic conversion function for case operations.
+ * Return the converted equivalent of "a", which is a UCS-4 character. Use
+--- 3131,3136 ----
+***************
+*** 4542,4549 ****
+
+ # if defined(USE_ICONV) || defined(PROTO)
+
+- static char_u *iconv_string(vimconv_T *vcp, char_u *str, int slen, int *unconvlenp, int *resultlenp);
+-
+ /*
+ * Call iconv_open() with a check if iconv() works properly (there are broken
+ * versions).
+--- 4537,4542 ----
+***************
+*** 6053,6060 ****
+
+
+ # ifdef USE_X11R6_XIM
+- static void xim_destroy_cb(XIM im, XPointer client_data, XPointer call_data);
+-
+ static void
+ xim_instantiate_cb(
+ Display *display,
+--- 6046,6051 ----
+*** ../vim-8.1.0442/src/memline.c 2018-08-23 23:01:22.898019607 +0200
+--- src/memline.c 2018-09-30 21:13:19.415862753 +0200
+***************
+*** 235,244 ****
+ } upd_block0_T;
+
+ #ifdef FEAT_CRYPT
+- static void ml_set_mfp_crypt(buf_T *buf);
+ static void ml_set_b0_crypt(buf_T *buf, ZERO_BL *b0p);
+ #endif
+- static int ml_check_b0_id(ZERO_BL *b0p);
+ static void ml_upd_block0(buf_T *buf, upd_block0_T what);
+ static void set_b0_fname(ZERO_BL *, buf_T *buf);
+ static void set_b0_dir_flag(ZERO_BL *b0p, buf_T *buf);
+--- 235,242 ----
+***************
+*** 4070,4077 ****
+ return retval;
+ }
+
+- static void attention_message(buf_T *buf, char_u *fname);
+-
+ /*
+ * Print the ATTENTION message: info about an existing swap file.
+ */
+--- 4068,4073 ----
+*** ../vim-8.1.0442/src/message.c 2018-07-01 16:43:59.850736541 +0200
+--- src/message.c 2018-09-30 21:14:50.747292645 +0200
+***************
+*** 16,30 ****
+
+ #include "vim.h"
+
+- static int other_sourcing_name(void);
+- static char_u *get_emsg_source(void);
+- static char_u *get_emsg_lnum(void);
+ static void add_msg_hist(char_u *s, int len, int attr);
+ static void hit_return_msg(void);
+ static void msg_home_replace_attr(char_u *fname, int attr);
+- #ifdef FEAT_MBYTE
+- static char_u *screen_puts_mbyte(char_u *s, int l, int attr);
+- #endif
+ static void msg_puts_attr_len(char_u *str, int maxlen, int attr);
+ static void msg_puts_display(char_u *str, int maxlen, int attr, int recurse);
+ static void msg_scroll_up(void);
+--- 16,24 ----
+***************
+*** 2407,2413 ****
+ static msgchunk_T *last_msgchunk = NULL; /* last displayed text */
+
+ static msgchunk_T *msg_sb_start(msgchunk_T *mps);
+- static msgchunk_T *disp_sb_line(int row, msgchunk_T *smp);
+
+ typedef enum {
+ SB_CLEAR_NONE = 0,
+--- 2401,2406 ----
+***************
+*** 3686,3693 ****
+ return retval;
+ }
+
+- static int copy_char(char_u *from, char_u *to, int lowercase);
+-
+ /*
+ * Copy one character from "*from" to "*to", taking care of multi-byte
+ * characters. Return the length of the character in bytes.
+--- 3679,3684 ----
+***************
+*** 4131,4142 ****
+ #if defined(FEAT_EVAL)
+ static char *e_printf = N_("E766: Insufficient arguments for printf()");
+
+- static varnumber_T tv_nr(typval_T *tvs, int *idxp);
+- static char *tv_str(typval_T *tvs, int *idxp, char_u **tofree);
+- # ifdef FEAT_FLOAT
+- static double tv_float(typval_T *tvs, int *idxp);
+- # endif
+-
+ /*
+ * Get number argument from "idxp" entry in "tvs". First entry is 1.
+ */
+--- 4122,4127 ----
+*** ../vim-8.1.0442/src/misc1.c 2018-09-16 14:10:28.300323360 +0200
+--- src/misc1.c 2018-09-30 21:18:08.322023222 +0200
+***************
+*** 20,29 ****
+
+ static char_u *vim_version_dir(char_u *vimdir);
+ static char_u *remove_tail(char_u *p, char_u *pend, char_u *name);
+- #if defined(FEAT_CMDL_COMPL)
+- static void init_users(void);
+- #endif
+- static int copy_indent(int size, char_u *src);
+
+ /* All user names (for ~user completion as done by shell). */
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+--- 20,25 ----
+***************
+*** 705,712 ****
+
+ #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
+
+- static int cin_is_cinword(char_u *line);
+-
+ /*
+ * Return TRUE if the string "line" starts with a word from 'cinwords'.
+ */
+--- 701,706 ----
+***************
+*** 5103,5110 ****
+ }
+
+ #if defined(FEAT_SEARCHPATH)
+- static char_u *gettail_dir(char_u *fname);
+-
+ /*
+ * Return the end of the directory name, on the first path
+ * separator:
+--- 5097,5102 ----
+***************
+*** 5455,5462 ****
+ #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
+
+ static char_u *skip_string(char_u *p);
+- static pos_T *ind_find_start_comment(void);
+- static pos_T *ind_find_start_CORS(linenr_T *is_raw);
+ static pos_T *find_start_rawstring(int ind_maxcomment);
+
+ /*
+--- 5447,5452 ----
+***************
+*** 5680,5721 ****
+ * Below "XXX" means that this function may unlock the current line.
+ */
+
+- static char_u *cin_skipcomment(char_u *);
+- static int cin_nocode(char_u *);
+- static pos_T *find_line_comment(void);
+- static int cin_has_js_key(char_u *text);
+- static int cin_islabel_skip(char_u **);
+ static int cin_isdefault(char_u *);
+- static char_u *after_label(char_u *l);
+- static int get_indent_nolabel(linenr_T lnum);
+- static int skip_label(linenr_T, char_u **pp);
+- static int cin_first_id_amount(void);
+- static int cin_get_equal_amount(linenr_T lnum);
+ static int cin_ispreproc(char_u *);
+ static int cin_iscomment(char_u *);
+ static int cin_islinecomment(char_u *);
+ static int cin_isterminated(char_u *, int, int);
+- static int cin_isinit(void);
+- static int cin_isfuncdecl(char_u **, linenr_T, linenr_T);
+- static int cin_isif(char_u *);
+ static int cin_iselse(char_u *);
+- static int cin_isdo(char_u *);
+- static int cin_iswhileofdo(char_u *, linenr_T);
+- static int cin_is_if_for_while_before_offset(char_u *line, int *poffset);
+- static int cin_iswhileofdo_end(int terminated);
+- static int cin_isbreak(char_u *);
+- static int cin_is_cpp_baseclass(cpp_baseclass_cache_T *cached);
+- static int get_baseclass_amount(int col);
+ static int cin_ends_in(char_u *, char_u *, char_u *);
+ static int cin_starts_with(char_u *s, char *word);
+- static int cin_skip2pos(pos_T *trypos);
+- static pos_T *find_start_brace(void);
+ static pos_T *find_match_paren(int);
+ static pos_T *find_match_char(int c, int ind_maxparen);
+- static int corr_ind_maxparen(pos_T *startpos);
+ static int find_last_paren(char_u *l, int start, int end);
+ static int find_match(int lookfor, linenr_T ourscope);
+- static int cin_is_cpp_namespace(char_u *);
+
+ /*
+ * Skip over white space and C comments within the line.
+--- 5670,5687 ----
+***************
+*** 7028,7034 ****
+ }
+
+ static pos_T *
+! find_match_char (int c, int ind_maxparen) /* XXX */
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+--- 6994,7000 ----
+ }
+
+ static pos_T *
+! find_match_char(int c, int ind_maxparen) /* XXX */
+ {
+ pos_T cursor_save;
+ pos_T *trypos;
+***************
+*** 9570,9577 ****
+
+ #if defined(FEAT_LISP) || defined(PROTO)
+
+- static int lisp_match(char_u *p);
+-
+ static int
+ lisp_match(char_u *p)
+ {
+--- 9536,9541 ----
+***************
+*** 10391,10398 ****
+ * Unix style wildcard expansion code.
+ * It's here because it's used both for Unix and Mac.
+ */
+- static int pstrcmp(const void *, const void *);
+-
+ static int
+ pstrcmp(const void *a, const void *b)
+ {
+--- 10355,10360 ----
+***************
+*** 10624,10636 ****
+ #endif
+
+ #if defined(FEAT_SEARCHPATH)
+- static int find_previous_pathsep(char_u *path, char_u **psep);
+- static int is_unique(char_u *maybe_unique, garray_T *gap, int i);
+- static void expand_path_option(char_u *curdir, garray_T *gap);
+- static char_u *get_path_cutoff(char_u *fname, garray_T *gap);
+- static void uniquefy_paths(garray_T *gap, char_u *pattern);
+- static int expand_in_path(garray_T *gap, char_u *pattern, int flags);
+-
+ /*
+ * Moves "*psep" back to the previous path separator in "path".
+ * Returns FAIL is "*psep" ends up at the beginning of "path".
+--- 10586,10591 ----
+***************
+*** 11055,11062 ****
+ }
+ #endif
+
+- static int has_env_var(char_u *p);
+-
+ /*
+ * Return TRUE if "p" contains what looks like an environment variable.
+ * Allowing for escaping.
+--- 11010,11015 ----
+***************
+*** 11081,11088 ****
+ }
+
+ #ifdef SPECIAL_WILDCHAR
+- static int has_special_wildchar(char_u *p);
+-
+ /*
+ * Return TRUE if "p" contains a special wildcard character, one that Vim
+ * cannot expand, requires using a shell.
+--- 11034,11039 ----
+*** ../vim-8.1.0442/src/misc2.c 2018-09-01 15:29:58.754429402 +0200
+--- src/misc2.c 2018-09-30 21:18:43.737791457 +0200
+***************
+*** 744,754 ****
+ static long_u num_alloc;
+ static long_u num_freed;
+
+- static void mem_pre_alloc_s(size_t *sizep);
+- static void mem_pre_alloc_l(long_u *sizep);
+- static void mem_post_alloc(void **pp, size_t size);
+- static void mem_pre_free(void **pp);
+-
+ static void
+ mem_pre_alloc_s(size_t *sizep)
+ {
+--- 744,749 ----
+***************
+*** 840,847 ****
+ #endif /* MEM_PROFILE */
+
+ #ifdef FEAT_EVAL
+- static int alloc_does_fail(long_u size);
+-
+ static int
+ alloc_does_fail(long_u size)
+ {
+--- 835,840 ----
+***************
+*** 4035,4043 ****
+ static void vim_findfile_free_visited_list(ff_visited_list_hdr_T **list_headp);
+ static void ff_free_visited_list(ff_visited_T *vl);
+ static ff_visited_list_hdr_T* ff_get_visited_list(char_u *, ff_visited_list_hdr_T **list_headp);
+- #ifdef FEAT_PATH_EXTRA
+- static int ff_wc_equal(char_u *s1, char_u *s2);
+- #endif
+
+ static void ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr);
+ static ff_stack_T *ff_pop(ff_search_ctx_T *search_ctx);
+--- 4028,4033 ----
+*** ../vim-8.1.0442/src/move.c 2018-09-25 22:17:51.111962197 +0200
+--- src/move.c 2018-09-30 21:19:14.405589893 +0200
+***************
+*** 19,30 ****
+
+ #include "vim.h"
+
+- static void comp_botline(win_T *wp);
+ static void redraw_for_cursorline(win_T *wp);
+ static int scrolljump_value(void);
+ static int check_top_offset(void);
+ static void curs_rows(win_T *wp);
+- static void validate_cheight(void);
+
+ typedef struct
+ {
+--- 19,28 ----
+***************
+*** 37,47 ****
+
+ static void topline_back(lineoff_T *lp);
+ static void botline_forw(lineoff_T *lp);
+- #ifdef FEAT_DIFF
+- static void botline_topline(lineoff_T *lp);
+- static void topline_botline(lineoff_T *lp);
+- static void max_topfill(void);
+- #endif
+
+ /*
+ * Compute wp->w_botline for the current wp->w_topline. Can be called after
+--- 35,40 ----
+*** ../vim-8.1.0442/src/netbeans.c 2018-09-13 15:33:39.605712221 +0200
+--- src/netbeans.c 2018-09-30 21:19:43.449398298 +0200
+***************
+*** 49,58 ****
+ static pos_T *get_off_or_lnum(buf_T *buf, char_u **argp);
+ static long get_buf_size(buf_T *);
+ static int netbeans_keystring(char_u *keystr);
+- static void postpone_keycommand(char_u *keystr);
+ static void special_keys(char_u *args);
+
+- static int netbeans_connect(char *, int);
+ static int getConnInfo(char *file, char **host, char **port, char **password);
+
+ static void nb_init_graphics(void);
+--- 49,56 ----
+*** ../vim-8.1.0442/src/normal.c 2018-08-01 19:05:59.286223185 +0200
+--- src/normal.c 2018-09-30 21:20:26.917110378 +0200
+***************
+*** 32,38 ****
+ _RTLENTRYF
+ #endif
+ nv_compare(const void *s1, const void *s2);
+- static int find_command(int cmdchar);
+ static void op_colon(oparg_T *oap);
+ static void op_function(oparg_T *oap);
+ #if defined(FEAT_MOUSE)
+--- 32,37 ----
+***************
+*** 40,49 ****
+ static void find_end_of_word(pos_T *);
+ static int get_mouse_class(char_u *p);
+ #endif
+- static void prep_redo_cmd(cmdarg_T *cap);
+ static void prep_redo(int regname, long, int, int, int, int, int);
+- static int checkclearop(oparg_T *oap);
+- static int checkclearopq(oparg_T *oap);
+ static void clearop(oparg_T *oap);
+ static void clearopbeep(oparg_T *oap);
+ static void unshift_special(cmdarg_T *cap);
+--- 39,45 ----
+***************
+*** 63,70 ****
+ static void nv_help(cmdarg_T *cap);
+ static void nv_addsub(cmdarg_T *cap);
+ static void nv_page(cmdarg_T *cap);
+- static void nv_gd(oparg_T *oap, int nchar, int thisblock);
+- static int nv_screengo(oparg_T *oap, int dir, long dist);
+ #ifdef FEAT_MOUSE
+ static void nv_mousescroll(cmdarg_T *cap);
+ static void nv_mouse(cmdarg_T *cap);
+--- 59,64 ----
+***************
+*** 94,102 ****
+ static void nv_left(cmdarg_T *cap);
+ static void nv_up(cmdarg_T *cap);
+ static void nv_down(cmdarg_T *cap);
+- #ifdef FEAT_SEARCHPATH
+- static void nv_gotofile(cmdarg_T *cap);
+- #endif
+ static void nv_end(cmdarg_T *cap);
+ static void nv_dollar(cmdarg_T *cap);
+ static void nv_search(cmdarg_T *cap);
+--- 88,93 ----
+***************
+*** 111,120 ****
+ static void nv_undo(cmdarg_T *cap);
+ static void nv_kundo(cmdarg_T *cap);
+ static void nv_Replace(cmdarg_T *cap);
+- static void nv_vreplace(cmdarg_T *cap);
+- static void v_swap_corners(int cmdchar);
+ static void nv_replace(cmdarg_T *cap);
+- static void n_swapchar(cmdarg_T *cap);
+ static void nv_cursormark(cmdarg_T *cap, int flag, pos_T *pos);
+ static void v_visop(cmdarg_T *cap);
+ static void nv_subst(cmdarg_T *cap);
+--- 102,108 ----
+***************
+*** 128,134 ****
+ static void nv_window(cmdarg_T *cap);
+ static void nv_suspend(cmdarg_T *cap);
+ static void nv_g_cmd(cmdarg_T *cap);
+- static void n_opencmd(cmdarg_T *cap);
+ static void nv_dot(cmdarg_T *cap);
+ static void nv_redo(cmdarg_T *cap);
+ static void nv_Undo(cmdarg_T *cap);
+--- 116,121 ----
+*** ../vim-8.1.0442/src/ops.c 2018-08-21 15:12:10.843801621 +0200
+--- src/ops.c 2018-09-30 21:21:10.520820228 +0200
+***************
+*** 95,101 ****
+
+ #ifdef FEAT_VISUALEXTRA
+ static void shift_block(oparg_T *oap, int amount);
+- static void block_insert(oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp);
+ #endif
+ static int stuff_yank(int, char_u *);
+ static void put_reedit_in_typebuf(int silent);
+--- 95,100 ----
+***************
+*** 105,111 ****
+ #ifdef FEAT_MBYTE
+ static void mb_adjust_opend(oparg_T *oap);
+ #endif
+- static void free_yank(long);
+ static void free_yank_all(void);
+ static int yank_copy_line(struct block_def *bd, long y_idx);
+ #ifdef FEAT_CLIPBOARD
+--- 104,109 ----
+***************
+*** 120,126 ****
+ #endif
+ static int ends_in_white(linenr_T lnum);
+ #ifdef FEAT_COMMENTS
+- static int same_leader(linenr_T lnum, int, char_u *, int, char_u *);
+ static int fmt_check_par(linenr_T, int *, char_u **, int do_comments);
+ #else
+ static int fmt_check_par(linenr_T);
+--- 118,123 ----
+***************
+*** 6829,6836 ****
+ return MAUTO;
+ }
+
+- static char_u *getreg_wrap_one_line(char_u *s, int flags);
+-
+ /*
+ * When "flags" has GREG_LIST return a list with text "s".
+ * Otherwise just return "s".
+--- 6826,6831 ----
+***************
+*** 7302,7309 ****
+ vim_memset(oap, 0, sizeof(oparg_T));
+ }
+
+- static varnumber_T line_count_info(char_u *line, varnumber_T *wc, varnumber_T *cc, varnumber_T limit, int eol_size);
+-
+ /*
+ * Count the number of bytes, characters and "words" in a line.
+ *
+--- 7297,7302 ----
+*** ../vim-8.1.0442/src/option.c 2018-09-25 22:17:51.111962197 +0200
+--- src/option.c 2018-09-30 21:22:02.368473644 +0200
+***************
+*** 3281,3295 ****
+ static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
+ #endif
+
+- static void set_option_default(int, int opt_flags, int compatible);
+ static void set_options_default(int opt_flags);
+ static void set_string_default_esc(char *name, char_u *val, int escape);
+ static char_u *term_bg_default(void);
+ static void did_set_option(int opt_idx, int opt_flags, int new_value);
+- static char_u *illegal_char(char_u *, int);
+- #ifdef FEAT_CMDWIN
+- static char_u *check_cedit(void);
+- #endif
+ static char_u *option_expand(int opt_idx, char_u *val);
+ static void didset_options(void);
+ static void didset_options2(void);
+--- 3281,3290 ----
+***************
+*** 3300,3311 ****
+ # define insecure_flag(opt_idx, opt_flags) (&options[opt_idx].flags)
+ #endif
+ static void set_string_option_global(int opt_idx, char_u **varp);
+- static char_u *set_string_option(int opt_idx, char_u *value, int opt_flags);
+ static char_u *did_set_string_option(int opt_idx, char_u **varp, int new_value_alloced, char_u *oldval, char_u *errbuf, int opt_flags);
+ static char_u *set_chars_option(char_u **varp);
+- #ifdef FEAT_SYN_HL
+- static int int_cmp(const void *a, const void *b);
+- #endif
+ #ifdef FEAT_CLIPBOARD
+ static char_u *check_clipboard_option(void);
+ #endif
+--- 3295,3302 ----
+***************
+*** 4279,4286 ****
+ #endif
+
+ #ifdef FEAT_GUI
+- static char_u *gui_bg_default(void);
+-
+ static char_u *
+ gui_bg_default(void)
+ {
+--- 4270,4275 ----
+***************
+*** 5875,5882 ****
+ #endif
+
+ #ifdef FEAT_TITLE
+- static void redraw_titles(void);
+-
+ /*
+ * Redraw the window title and/or tab page text later.
+ */
+--- 5864,5869 ----
+***************
+*** 12027,12033 ****
+ } langmap_entry_T;
+
+ static garray_T langmap_mapga;
+- static void langmap_set_entry(int from, int to);
+
+ /*
+ * Search for an entry in "langmap_mapga" for "from". If found set the "to"
+--- 12014,12019 ----
+*** ../vim-8.1.0442/src/os_unix.c 2018-09-22 14:08:41.926157823 +0200
+--- src/os_unix.c 2018-09-30 21:25:32.319055740 +0200
+***************
+*** 128,144 ****
+ Window x11_window = 0;
+ # endif
+ Display *x11_display = NULL;
+-
+- # ifdef FEAT_TITLE
+- static int get_x11_windis(void);
+- static void set_x11_title(char_u *);
+- static void set_x11_icon(char_u *);
+- # endif
+ #endif
+
+ #ifdef FEAT_TITLE
+ static int get_x11_title(int);
+- static int get_x11_icon(int);
+
+ static char_u *oldtitle = NULL;
+ static volatile sig_atomic_t oldtitle_outdated = FALSE;
+--- 128,137 ----
+***************
+*** 154,161 ****
+ #else
+ typedef int waitstatus;
+ #endif
+- static pid_t wait4pid(pid_t, waitstatus *);
+-
+ static int WaitForChar(long msec, int *interrupted, int ignore_input);
+ static int WaitForCharOrMouse(long msec, int *interrupted, int ignore_input);
+ #if defined(__BEOS__) || defined(VMS)
+--- 147,152 ----
+***************
+*** 789,795 ****
+ * Return a pointer to an item on the stack. Used to find out if the stack
+ * grows up or down.
+ */
+- static void check_stack_growth(char *p);
+ static int stack_grows_downwards;
+
+ /*
+--- 780,785 ----
+***************
+*** 907,913 ****
+ static struct sigstack sigstk; /* for sigstack() */
+ # endif
+
+- static void init_signal_stack(void);
+ static char *signal_stack;
+
+ static void
+--- 897,902 ----
+***************
+*** 1273,1284 ****
+ }
+ #endif
+
+! # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
+! static void loose_clipboard(void);
+ # ifdef USE_SYSTEM
+- static void save_clipboard(void);
+- static void restore_clipboard(void);
+-
+ static void *clip_star_save = NULL;
+ static void *clip_plus_save = NULL;
+ # endif
+--- 1262,1269 ----
+ }
+ #endif
+
+! #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
+ # ifdef USE_SYSTEM
+ static void *clip_star_save = NULL;
+ static void *clip_plus_save = NULL;
+ # endif
+***************
+*** 1644,1653 ****
+ /*
+ * A few functions shared by X11 title and clipboard code.
+ */
+- static int x_error_handler(Display *dpy, XErrorEvent *error_event);
+- static int x_error_check(Display *dpy, XErrorEvent *error_event);
+- static int x_connect_to_server(void);
+- static int test_x11_window(Display *dpy);
+
+ static int got_x_error = FALSE;
+
+--- 1629,1634 ----
+***************
+*** 1683,1690 ****
+ /*
+ * An X IO Error handler, used to catch error while opening the display.
+ */
+- static int x_IOerror_check(Display *dpy);
+-
+ static int
+ x_IOerror_check(Display *dpy UNUSED)
+ {
+--- 1664,1669 ----
+***************
+*** 1699,1706 ****
+ /*
+ * An X IO Error handler, used to catch terminal errors.
+ */
+- static int x_IOerror_handler(Display *dpy);
+- static void may_restore_clipboard(void);
+ static int xterm_dpy_was_reset = FALSE;
+
+ static int
+--- 1678,1683 ----
+***************
+*** 2510,2517 ****
+ }
+
+ #if !defined(HAVE_STRERROR) && defined(USE_GETCWD)
+- static char *strerror(int);
+-
+ static char *
+ strerror(int err)
+ {
+--- 2487,2492 ----
+***************
+*** 3136,3143 ****
+ return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
+ }
+
+- static int executable_file(char_u *name);
+-
+ /*
+ * Return 1 if "name" is an executable file, 0 if not or it doesn't exist.
+ */
+--- 3111,3116 ----
+***************
+*** 3340,3347 ****
+ }
+ #endif
+
+- static void exit_scroll(void);
+-
+ /*
+ * Output a newline when exiting.
+ * Make sure the newline goes to the same stream as the text.
+--- 3313,3318 ----
+***************
+*** 7818,7833 ****
+ /*
+ * Code for X Session Management Protocol.
+ */
+- static void xsmp_handle_save_yourself(SmcConn smc_conn, SmPointer client_data, int save_type, Bool shutdown, int interact_style, Bool fast);
+- static void xsmp_die(SmcConn smc_conn, SmPointer client_data);
+- static void xsmp_save_complete(SmcConn smc_conn, SmPointer client_data);
+- static void xsmp_shutdown_cancelled(SmcConn smc_conn, SmPointer client_data);
+- static void xsmp_ice_connection(IceConn iceConn, IcePointer clientData, Bool opening, IcePointer *watchData);
+-
+
+ # if defined(FEAT_GUI) && defined(USE_XSMP_INTERACT)
+- static void xsmp_handle_interaction(SmcConn smc_conn, SmPointer client_data);
+-
+ /*
+ * This is our chance to ask the user if they want to save,
+ * or abort the logout
+--- 7789,7796 ----
+*** ../vim-8.1.0442/src/os_win32.c 2018-09-13 15:33:39.609712174 +0200
+--- src/os_win32.c 2018-09-30 21:27:20.702316630 +0200
+***************
+*** 168,195 ****
+ static int g_fCtrlCPressed = FALSE; /* set when ctrl-C or ctrl-break detected */
+ static int g_fForceExit = FALSE; /* set when forcefully exiting */
+
+- static void termcap_mode_start(void);
+- static void termcap_mode_end(void);
+- static void clear_chars(COORD coord, DWORD n);
+- static void clear_screen(void);
+- static void clear_to_end_of_display(void);
+- static void clear_to_end_of_line(void);
+ static void scroll(unsigned cLines);
+ static void set_scroll_region(unsigned left, unsigned top,
+ unsigned right, unsigned bottom);
+- static void insert_lines(unsigned cLines);
+ static void delete_lines(unsigned cLines);
+ static void gotoxy(unsigned x, unsigned y);
+- static void normvideo(void);
+- static void textattr(WORD wAttr);
+- static void textcolor(WORD wAttr);
+- static void textbackground(WORD wAttr);
+ static void standout(void);
+- static void standend(void);
+- static void visual_bell(void);
+- static void cursor_visible(BOOL fVisible);
+- static DWORD write_chars(char_u *pchBuf, DWORD cbToWrite);
+- static void create_conin(void);
+ static int s_cursor_visible = TRUE;
+ static int did_create_conin = FALSE;
+ #else
+--- 168,179 ----
+***************
+*** 3487,3494 ****
+ *
+ * return -1 for failure, 0 otherwise
+ */
+! static
+! int
+ win32_setattrs(char_u *name, int attrs)
+ {
+ int res;
+--- 3471,3477 ----
+ *
+ * return -1 for failure, 0 otherwise
+ */
+! static int
+ win32_setattrs(char_u *name, int attrs)
+ {
+ int res;
+***************
+*** 3513,3520 ****
+ /*
+ * Set archive flag for "name".
+ */
+! static
+! int
+ win32_set_archive(char_u *name)
+ {
+ int attrs = win32_getattrs(name);
+--- 3496,3502 ----
+ /*
+ * Set archive flag for "name".
+ */
+! static int
+ win32_set_archive(char_u *name)
+ {
+ int attrs = win32_getattrs(name);
+*** ../vim-8.1.0442/src/pty.c 2018-02-04 14:39:45.000000000 +0100
+--- src/pty.c 2018-09-30 21:27:44.854151402 +0200
+***************
+*** 126,133 ****
+ # undef HAVE_SVR4_PTYS
+ #endif
+
+- static void initmaster(int);
+-
+ /*
+ * Open all ptys with O_NOCTTY, just to be on the safe side.
+ */
+--- 126,131 ----
+*** ../vim-8.1.0442/src/regexp.c 2018-07-18 06:02:04.084736178 +0200
+--- src/regexp.c 2018-09-30 21:28:48.185717335 +0200
+***************
+*** 3466,3472 ****
+ save_se_T save_end[NSUBEXP];
+ } regbehind_T;
+
+- static char_u *reg_getline(linenr_T lnum);
+ static long bt_regexec_both(char_u *line, colnr_T col, proftime_T *tm, int *timed_out);
+ static long regtry(bt_regprog_T *prog, colnr_T col, proftime_T *tm, int *timed_out);
+ static void cleanup_subexpr(void);
+--- 3466,3471 ----
+***************
+*** 4009,4016 ****
+ }
+
+ #ifdef FEAT_SYN_HL
+- static reg_extmatch_T *make_extmatch(void);
+-
+ /*
+ * Create a new extmatch and mark it as referenced once.
+ */
+--- 4008,4013 ----
+***************
+*** 4137,4144 ****
+ }
+
+ #ifdef FEAT_MBYTE
+- static int reg_prev_class(void);
+-
+ /*
+ * Get class of previous character.
+ */
+--- 4134,4139 ----
+***************
+*** 4152,4159 ****
+ }
+ #endif
+
+- static int reg_match_visual(void);
+-
+ /*
+ * Return TRUE if the current rex.input position matches the Visual area.
+ */
+--- 4147,4152 ----
+***************
+*** 7010,7017 ****
+ }
+
+ #ifdef FEAT_MBYTE
+- static void mb_decompose(int c, int *c1, int *c2, int *c3);
+-
+ typedef struct
+ {
+ int a, b, c;
+--- 7003,7008 ----
+***************
+*** 7215,7225 ****
+ */
+ typedef void (*(*fptr_T)(int *, int))();
+
+- static fptr_T do_upper(int *, int);
+- static fptr_T do_Upper(int *, int);
+- static fptr_T do_lower(int *, int);
+- static fptr_T do_Lower(int *, int);
+-
+ static int vim_regsub_both(char_u *source, typval_T *expr, char_u *dest, int copy, int magic, int backslash);
+
+ static fptr_T
+--- 7206,7211 ----
+***************
+*** 7883,7890 ****
+ }
+
+ #ifdef FEAT_EVAL
+- static char_u *reg_getline_submatch(linenr_T lnum);
+-
+ /*
+ * Call reg_getline() with the line numbers from the submatch. If a
+ * substitute() was used the reg_maxline and other values have been
+--- 7869,7874 ----
+***************
+*** 8212,8219 ****
+ }
+
+ #ifdef FEAT_EVAL
+- static void report_re_switch(char_u *pat);
+-
+ static void
+ report_re_switch(char_u *pat)
+ {
+--- 8196,8201 ----
+*** ../vim-8.1.0442/src/screen.c 2018-09-13 14:57:37.915261048 +0200
+--- src/screen.c 2018-09-30 21:29:41.773349225 +0200
+***************
+*** 107,115 ****
+ static match_T search_hl; /* used for 'hlsearch' highlight matching */
+ #endif
+
+- #if defined(FEAT_MENU) || defined(FEAT_FOLDING)
+- static int text_to_screenline(win_T *wp, char_u *text, int col);
+- #endif
+ #ifdef FEAT_FOLDING
+ static foldinfo_T win_foldinfo; /* info for 'foldcolumn' */
+ static int compute_foldcolumn(win_T *wp, int col);
+--- 107,112 ----
+***************
+*** 133,139 ****
+ static void copy_text_attr(int off, char_u *buf, int len, int attr);
+ #endif
+ static int win_line(win_T *, linenr_T, int, int, int nochange, int number_only);
+- static int char_needs_redraw(int off_from, int off_to, int cols);
+ static void draw_vsep_win(win_T *wp, int row);
+ #ifdef FEAT_STL_OPT
+ static void redraw_custom_statusline(win_T *wp);
+--- 130,135 ----
+***************
+*** 147,153 ****
+ static void next_search_hl(win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol, matchitem_T *cur);
+ static int next_search_hl_pos(match_T *shl, linenr_T lnum, posmatch_T *pos, colnr_T mincol);
+ #endif
+- static void screen_start_highlight(int attr);
+ static void screen_char(unsigned off, int row, int col);
+ #ifdef FEAT_MBYTE
+ static void screen_char_2(unsigned off, int row, int col);
+--- 143,148 ----
+***************
+*** 155,162 ****
+ static void screenclear2(void);
+ static void lineclear(unsigned off, int width, int attr);
+ static void lineinvalid(unsigned off, int width);
+- static void linecopy(int to, int from, win_T *wp);
+- static void redraw_block(int row, int end, win_T *wp);
+ static int win_do_lines(win_T *wp, int row, int line_count, int mayclear, int del, int clear_attr);
+ static void win_rest_invalid(win_T *wp);
+ static void msg_pos_mode(void);
+--- 150,155 ----
+***************
+*** 2495,2502 ****
+ }
+
+ #ifdef FEAT_SYN_HL
+- static int advance_color_col(int vcol, int **color_cols);
+-
+ /*
+ * Advance **color_cols and return TRUE when there are columns to draw.
+ */
+--- 2488,2493 ----
+***************
+*** 6034,6041 ****
+ }
+
+ #ifdef FEAT_MBYTE
+- static int comp_char_differs(int, int);
+-
+ /*
+ * Return if the composing characters at "off_from" and "off_to" differ.
+ * Only to be used when ScreenLinesUC[off_from] != 0.
+--- 6025,6030 ----
+***************
+*** 6617,6623 ****
+ }
+
+ #ifdef FEAT_WILDMENU
+- static int status_match_len(expand_T *xp, char_u *s);
+ static int skip_status_match_char(expand_T *xp, char_u *s);
+
+ /*
+--- 6606,6611 ----
+***************
+*** 7414,7421 ****
+ }
+
+ #ifdef FEAT_MBYTE
+- static int screen_comp_differs(int, int*);
+-
+ /*
+ * Return TRUE if composing characters for screen posn "off" differs from
+ * composing characters in "u8cc".
+--- 7402,7407 ----
+*** ../vim-8.1.0442/src/search.c 2018-08-16 21:37:46.389318767 +0200
+--- src/search.c 2018-09-30 21:30:25.877045753 +0200
+***************
+*** 16,31 ****
+ static void set_vv_searchforward(void);
+ static int first_submatch(regmmatch_T *rp);
+ #endif
+- static int check_prevcol(char_u *linep, int col, int ch, int *prevcol);
+- static int inmacro(char_u *, char_u *);
+ static int check_linecomment(char_u *line);
+ static int cls(void);
+ static int skip_chars(int, int);
+- #ifdef FEAT_TEXTOBJ
+- static void back_in_line(void);
+- static void find_first_blank(pos_T *);
+- static void findsent_forward(long count, int at_start_sent);
+- #endif
+ #ifdef FEAT_FIND_ID
+ static void show_pat_in_path(char_u *, int,
+ int, int, FILE *, linenr_T *, long);
+--- 16,24 ----
+***************
+*** 1835,1842 ****
+ return (col >= 0 && linep[col] == ch) ? TRUE : FALSE;
+ }
+
+- static int find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos);
+-
+ /*
+ * Raw string start is found at linep[startpos.col - 1].
+ * Return TRUE if the matching end can be found between startpos and endpos.
+--- 1828,1833 ----
+***************
+*** 3866,3873 ****
+ return OK;
+ }
+
+- static int in_html_tag(int);
+-
+ /*
+ * Return TRUE if the cursor is on a "<aaa>" tag. Ignore "<aaa/>".
+ * When "end_tag" is TRUE return TRUE if the cursor is on "</aaa>".
+--- 3857,3862 ----
+***************
+*** 4326,4334 ****
+ return OK;
+ }
+
+- static int find_next_quote(char_u *top_ptr, int col, int quotechar, char_u *escape);
+- static int find_prev_quote(char_u *line, int col_start, int quotechar, char_u *escape);
+-
+ /*
+ * Search quote char from string line[col].
+ * Quote character escaped by one of the characters in "escape" is not counted
+--- 4315,4320 ----
+*** ../vim-8.1.0442/src/sha256.c 2017-01-24 20:06:49.000000000 +0100
+--- src/sha256.c 2018-09-30 21:30:54.716847080 +0200
+***************
+*** 24,31 ****
+
+ #if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO)
+
+- static void sha256_process(context_sha256_T *ctx, char_u data[64]);
+-
+ #define GET_UINT32(n, b, i) \
+ { \
+ (n) = ( (UINT32_T)(b)[(i) ] << 24) \
+--- 24,29 ----
+***************
+*** 265,272 ****
+ #endif /* FEAT_CRYPT || FEAT_PERSISTENT_UNDO */
+
+ #if defined(FEAT_CRYPT) || defined(PROTO)
+- static unsigned int get_some_time(void);
+-
+ /*
+ * Returns hex digest of "buf[buf_len]" in a static array.
+ * if "salt" is not NULL also do "salt[salt_len]".
+--- 263,268 ----
+*** ../vim-8.1.0442/src/spell.c 2018-03-04 16:22:07.000000000 +0100
+--- src/spell.c 2018-09-30 21:31:37.576551512 +0200
+***************
+*** 251,257 ****
+ static int spell_iswordp(char_u *p, win_T *wp);
+ #ifdef FEAT_MBYTE
+ static int spell_mb_isword_class(int cl, win_T *wp);
+- static int spell_iswordp_w(int *p, win_T *wp);
+ #endif
+
+ /*
+--- 251,256 ----
+***************
+*** 337,358 ****
+ static void find_word(matchinf_T *mip, int mode);
+ static int match_checkcompoundpattern(char_u *ptr, int wlen, garray_T *gap);
+ static int can_compound(slang_T *slang, char_u *word, char_u *flags);
+- static int can_be_compound(trystate_T *sp, slang_T *slang, char_u *compflags, int flag);
+ static int match_compoundrule(slang_T *slang, char_u *compflags);
+ static int valid_word_prefix(int totprefcnt, int arridx, int flags, char_u *word, slang_T *slang, int cond_req);
+ static void find_prefix(matchinf_T *mip, int mode);
+ static int fold_more(matchinf_T *mip);
+ static int spell_valid_case(int wordflags, int treeflags);
+- static int no_spell_checking(win_T *wp);
+- static void spell_load_lang(char_u *lang);
+- static void int_wordlist_spl(char_u *fname);
+ static void spell_load_cb(char_u *fname, void *cookie);
+- static int score_wordcount_adj(slang_T *slang, int score, char_u *word, int split);
+ static int count_syllables(slang_T *slang, char_u *word);
+ static void clear_midword(win_T *buf);
+ static void use_midword(slang_T *lp, win_T *buf);
+ static int find_region(char_u *rp, char_u *region);
+- static int badword_captype(char_u *word, char_u *end);
+ static int check_need_cap(linenr_T lnum, colnr_T col);
+ static void spell_find_suggest(char_u *badptr, int badlen, suginfo_T *su, int maxcount, int banbadword, int need_cap, int interactive);
+ #ifdef FEAT_EVAL
+--- 336,351 ----
+***************
+*** 361,367 ****
+ static void spell_suggest_file(suginfo_T *su, char_u *fname);
+ static void spell_suggest_intern(suginfo_T *su, int interactive);
+ static void spell_find_cleanup(suginfo_T *su);
+- static void allcap_copy(char_u *word, char_u *wcopy);
+ static void suggest_try_special(suginfo_T *su);
+ static void suggest_try_change(suginfo_T *su);
+ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, int soundfold);
+--- 354,359 ----
+*** ../vim-8.1.0442/src/spellfile.c 2018-06-19 14:23:50.298866932 +0200
+--- src/spellfile.c 2018-09-30 21:32:30.492186122 +0200
+***************
+*** 296,302 ****
+
+ static int set_spell_finish(spelltab_T *new_st);
+ static int write_spell_prefcond(FILE *fd, garray_T *gap);
+- static char_u *read_cnt_string(FILE *fd, int cnt_bytes, int *lenp);
+ static int read_region_section(FILE *fd, slang_T *slang, int len);
+ static int read_charflags_section(FILE *fd);
+ static int read_prefcond_section(FILE *fd, slang_T *lp);
+--- 296,301 ----
+***************
+*** 312,318 ****
+ #endif
+ static int spell_read_tree(FILE *fd, char_u **bytsp, idx_T **idxsp, int prefixtree, int prefixcnt);
+ static idx_T read_tree_node(FILE *fd, char_u *byts, idx_T *idxs, int maxidx, idx_T startidx, int prefixtree, int maxprefcondnr);
+- static void spell_reload_one(char_u *fname, int added_word);
+ static void set_spell_charflags(char_u *flags, int cnt, char_u *upp);
+ static int set_spell_chartab(char_u *fol, char_u *low, char_u *upp);
+ static void set_map_str(slang_T *lp, char_u *map);
+--- 311,316 ----
+***************
+*** 1985,1991 ****
+ int si_newcompID; /* current value for compound ID */
+ } spellinfo_T;
+
+- static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname);
+ static int is_aff_rule(char_u **items, int itemcnt, char *rulename, int mincount);
+ static void aff_process_flags(afffile_T *affile, affentry_T *entry);
+ static int spell_info_item(char_u *s);
+--- 1983,1988 ----
+***************
+*** 1993,2027 ****
+ static unsigned get_affitem(int flagtype, char_u **pp);
+ static void process_compflags(spellinfo_T *spin, afffile_T *aff, char_u *compflags);
+ static void check_renumber(spellinfo_T *spin);
+- static int flag_in_afflist(int flagtype, char_u *afflist, unsigned flag);
+ static void aff_check_number(int spinval, int affval, char *name);
+ static void aff_check_string(char_u *spinval, char_u *affval, char *name);
+ static int str_equal(char_u *s1, char_u *s2);
+ static void add_fromto(spellinfo_T *spin, garray_T *gap, char_u *from, char_u *to);
+ static int sal_to_bool(char_u *s);
+- static void spell_free_aff(afffile_T *aff);
+- static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile);
+ static int get_affix_flags(afffile_T *affile, char_u *afflist);
+ static int get_pfxlist(afffile_T *affile, char_u *afflist, char_u *store_afflist);
+ static void get_compflags(afffile_T *affile, char_u *afflist, char_u *store_afflist);
+ static int store_aff_word(spellinfo_T *spin, char_u *word, char_u *afflist, afffile_T *affile, hashtab_T *ht, hashtab_T *xht, int condit, int flags, char_u *pfxlist, int pfxlen);
+- static int spell_read_wordfile(spellinfo_T *spin, char_u *fname);
+ static void *getroom(spellinfo_T *spin, size_t len, int align);
+ static char_u *getroom_save(spellinfo_T *spin, char_u *s);
+- static void free_blocks(sblock_T *bl);
+- static wordnode_T *wordtree_alloc(spellinfo_T *spin);
+ static int store_word(spellinfo_T *spin, char_u *word, int flags, int region, char_u *pfxlist, int need_affix);
+ static int tree_add_word(spellinfo_T *spin, char_u *word, wordnode_T *tree, int flags, int region, int affixID);
+ static wordnode_T *get_wordnode(spellinfo_T *spin);
+- static int deref_wordnode(spellinfo_T *spin, wordnode_T *node);
+ static void free_wordnode(spellinfo_T *spin, wordnode_T *n);
+ static void wordtree_compress(spellinfo_T *spin, wordnode_T *root);
+ static int node_compress(spellinfo_T *spin, wordnode_T *node, hashtab_T *ht, int *tot);
+ static int node_equal(wordnode_T *n1, wordnode_T *n2);
+- static int write_vim_spell(spellinfo_T *spin, char_u *fname);
+ static void clear_node(wordnode_T *node);
+ static int put_node(FILE *fd, wordnode_T *node, int idx, int regionmask, int prefixtree);
+- static void spell_make_sugfile(spellinfo_T *spin, char_u *wfname);
+ static int sug_filltree(spellinfo_T *spin, slang_T *slang);
+ static int sug_maketable(spellinfo_T *spin);
+ static int sug_filltable(spellinfo_T *spin, wordnode_T *node, int startwordnr, garray_T *gap);
+--- 1990,2015 ----
+*** ../vim-8.1.0442/src/syntax.c 2018-09-28 22:26:47.786139328 +0200
+--- src/syntax.c 2018-09-30 21:35:08.551092059 +0200
+***************
+*** 91,97 ****
+ {HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, HL_NOCOMBINE, HL_STRIKETHROUGH, 0};
+ #define ATTR_COMBINE(attr_a, attr_b) ((((attr_b) & HL_NOCOMBINE) ? attr_b : (attr_a)) | (attr_b))
+
+- static int get_attr_entry(garray_T *table, attrentry_T *aep);
+ static void syn_unadd_group(void);
+ static void set_hl_attr(int idx);
+ static void highlight_list_one(int id);
+--- 91,96 ----
+***************
+*** 106,115 ****
+ #endif
+ #ifdef FEAT_GUI
+ static int set_group_colors(char_u *name, guicolor_T *fgp, guicolor_T *bgp, int do_menu, int use_norm, int do_tooltip);
+- static GuiFont font_name2handle(char_u *name);
+- # ifdef FEAT_XFONTSET
+- static GuiFontset fontset_name2handle(char_u *name, int fixed_width);
+- # endif
+ static void hl_do_font(int idx, char_u *arg, int do_normal, int do_menu, int do_tooltip, int free_font);
+ #endif
+
+--- 105,110 ----
+***************
+*** 386,393 ****
+ #define CUR_STATE(idx) ((stateitem_T *)(current_state.ga_data))[idx]
+
+ static void syn_sync(win_T *wp, linenr_T lnum, synstate_T *last_valid);
+- static void save_chartab(char_u *chartab);
+- static void restore_chartab(char_u *chartab);
+ static int syn_match_linecont(linenr_T lnum);
+ static void syn_start_line(void);
+ static void syn_update_ends(int startofline);
+--- 381,386 ----
+***************
+*** 415,425 ****
+ #ifdef FEAT_PROFILE
+ static void syn_clear_time(syn_time_T *tt);
+ static void syntime_clear(void);
+- #ifdef __BORLANDC__
+- static int _RTLENTRYF syn_compare_syntime(const void *v1, const void *v2);
+- #else
+- static int syn_compare_syntime(const void *v1, const void *v2);
+- #endif
+ static void syntime_report(void);
+ static int syn_time_on = FALSE;
+ # define IF_SYN_TIME(p) (p)
+--- 408,413 ----
+***************
+*** 430,437 ****
+
+ static void syn_stack_apply_changes_block(synblock_T *block, buf_T *buf);
+ static void find_endpos(int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_endpos, long *flagsp, lpos_T *end_endpos, int *end_idx, reg_extmatch_T *start_ext);
+- static void clear_syn_state(synstate_T *p);
+- static void clear_current_state(void);
+
+ static void limit_pos(lpos_T *pos, lpos_T *limit);
+ static void limit_pos_zero(lpos_T *pos, lpos_T *limit);
+--- 418,423 ----
+***************
+*** 440,464 ****
+ static char_u *syn_getcurline(void);
+ static int syn_regexec(regmmatch_T *rmp, linenr_T lnum, colnr_T col, syn_time_T *st);
+ static int check_keyword_id(char_u *line, int startcol, int *endcol, long *flags, short **next_list, stateitem_T *cur_si, int *ccharp);
+- static void syn_cmd_case(exarg_T *eap, int syncing);
+- static void syn_cmd_spell(exarg_T *eap, int syncing);
+- static void syntax_sync_clear(void);
+ static void syn_remove_pattern(synblock_T *block, int idx);
+ static void syn_clear_pattern(synblock_T *block, int i);
+ static void syn_clear_cluster(synblock_T *block, int i);
+- static void syn_cmd_clear(exarg_T *eap, int syncing);
+- static void syn_cmd_conceal(exarg_T *eap, int syncing);
+ static void syn_clear_one(int id, int syncing);
+- static void syn_cmd_on(exarg_T *eap, int syncing);
+- static void syn_cmd_enable(exarg_T *eap, int syncing);
+- static void syn_cmd_reset(exarg_T *eap, int syncing);
+- static void syn_cmd_manual(exarg_T *eap, int syncing);
+- static void syn_cmd_off(exarg_T *eap, int syncing);
+ static void syn_cmd_onoff(exarg_T *eap, char *name);
+- static void syn_cmd_list(exarg_T *eap, int syncing);
+ static void syn_lines_msg(void);
+ static void syn_match_msg(void);
+- static void syn_stack_free_block(synblock_T *block);
+ static void syn_list_one(int id, int syncing, int link_only);
+ static void syn_list_cluster(int id);
+ static void put_id_list(char_u *name, short *list, int attr);
+--- 426,438 ----
+***************
+*** 466,495 ****
+ static int syn_list_keywords(int id, hashtab_T *ht, int did_header, int attr);
+ static void syn_clear_keyword(int id, hashtab_T *ht);
+ static void clear_keywtab(hashtab_T *ht);
+- static void add_keyword(char_u *name, int id, int flags, short *cont_in_list, short *next_list, int conceal_char);
+- static char_u *get_group_name(char_u *arg, char_u **name_end);
+- static char_u *get_syn_options(char_u *arg, syn_opt_arg_T *opt, int *conceal_char, int skip);
+- static void syn_cmd_include(exarg_T *eap, int syncing);
+- static void syn_cmd_iskeyword(exarg_T *eap, int syncing);
+- static void syn_cmd_keyword(exarg_T *eap, int syncing);
+- static void syn_cmd_match(exarg_T *eap, int syncing);
+- static void syn_cmd_region(exarg_T *eap, int syncing);
+- #ifdef __BORLANDC__
+- static int _RTLENTRYF syn_compare_stub(const void *v1, const void *v2);
+- #else
+- static int syn_compare_stub(const void *v1, const void *v2);
+- #endif
+- static void syn_cmd_cluster(exarg_T *eap, int syncing);
+- static int syn_scl_name2id(char_u *name);
+ static int syn_scl_namen2id(char_u *linep, int len);
+ static int syn_check_cluster(char_u *pp, int len);
+ static int syn_add_cluster(char_u *name);
+ static void init_syn_patterns(void);
+ static char_u *get_syn_pattern(char_u *arg, synpat_T *ci);
+- static void syn_cmd_sync(exarg_T *eap, int syncing);
+ static int get_id_list(char_u **arg, int keylen, short **list, int skip);
+ static void syn_combine_list(short **clstr1, short **clstr2, int list_op);
+- static void syn_incl_toplevel(int id, int *flagsp);
+
+ #if defined(FEAT_RELTIME) || defined(PROTO)
+ /*
+--- 440,452 ----
+*** ../vim-8.1.0442/src/tag.c 2018-07-08 16:50:33.111216814 +0200
+--- src/tag.c 2018-09-30 21:35:32.702924583 +0200
+***************
+*** 1155,1162 ****
+ #endif
+
+ #ifdef FEAT_TAG_BINS
+- static int tag_strnicmp(char_u *s1, char_u *s2, size_t len);
+-
+ /*
+ * Compare two strings, for length "len", ignoring case the ASCII way.
+ * return 0 for match, < 0 for smaller, > 0 for bigger
+--- 1155,1160 ----
+***************
+*** 1194,1201 ****
+ regmatch_T regmatch; /* regexp program, may be NULL */
+ } pat_T;
+
+- static void prepare_pats(pat_T *pats, int has_re);
+-
+ /*
+ * Extract info from the tag search pattern "pats->pat".
+ */
+--- 1192,1197 ----
+***************
+*** 3878,3885 ****
+ #endif
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+- static int add_tag_field(dict_T *dict, char *field_name, char_u *start, char_u *end);
+-
+ /*
+ * Add a tag field to the dictionary "dict".
+ * Return OK or FAIL.
+--- 3874,3879 ----
+*** ../vim-8.1.0442/src/term.c 2018-09-21 12:24:08.618955563 +0200
+--- src/term.c 2018-09-30 21:39:43.881179267 +0200
+***************
+*** 74,80 ****
+ /* start of keys that are not directly used by Vim but can be mapped */
+ #define BT_EXTRA_KEYS 0x101
+
+- static struct builtin_term *find_builtin_term(char_u *name);
+ static void parse_builtin_tcap(char_u *s);
+ static void gather_termleader(void);
+ #ifdef FEAT_TERMRESPONSE
+--- 74,79 ----
+***************
+*** 91,99 ****
+ static void del_termcode_idx(int idx);
+ static int term_is_builtin(char_u *name);
+ static int term_7to8bit(char_u *p);
+- #ifdef FEAT_TERMRESPONSE
+- static void switch_to_8bit(void);
+- #endif
+
+ #ifdef HAVE_TGETENT
+ static char_u *tgetent_error(char_u *, char_u *);
+--- 90,95 ----
+***************
+*** 2429,2436 ****
+ * minimal tgoto() implementation.
+ * no padding and we only parse for %i %d and %+char
+ */
+- static char *tgoto(char *, int, int);
+-
+ static char *
+ tgoto(char *cm, int x, int y)
+ {
+--- 2425,2430 ----
+***************
+*** 3147,3154 ****
+ }
+ }
+
+- static int get_long_from_buf(char_u *buf, long_u *val);
+-
+ /*
+ * Interpret the next string of bytes in buf as a long integer, with the most
+ * significant byte first. Note that it is assumed that buf has been through
+--- 3141,3146 ----
+*** ../vim-8.1.0442/src/ui.c 2018-09-13 15:33:39.609712174 +0200
+--- src/ui.c 2018-09-30 21:36:42.842437833 +0200
+***************
+*** 715,721 ****
+ * Stuff for general mouse selection, without using Visual mode.
+ */
+
+- static int clip_compare_pos(int row1, int col1, int row2, int col2);
+ static void clip_invert_area(int, int, int, int, int how);
+ static void clip_invert_rectangle(int row, int col, int height, int width, int invert);
+ static void clip_get_word_boundaries(VimClipboard *, int, int);
+--- 715,720 ----
+***************
+*** 2069,2076 ****
+ static Boolean clip_x11_convert_selection_cb(Widget w, Atom *sel_atom, Atom *target, Atom *type, XtPointer *value, long_u *length, int *format);
+ static void clip_x11_lose_ownership_cb(Widget w, Atom *sel_atom);
+ static void clip_x11_notify_cb(Widget w, Atom *sel_atom, Atom *target);
+- static void clip_x11_timestamp_cb(Widget w, XtPointer n, XEvent *event, Boolean *cont);
+- static void clip_x11_request_selection_cb(Widget w, XtPointer success, Atom *sel_atom, Atom *type, XtPointer value, long_u *length, int *format);
+
+ /*
+ * Property callback to get a timestamp for XtOwnSelection.
+--- 2068,2073 ----
+*** ../vim-8.1.0442/src/undo.c 2018-08-21 17:07:40.155188638 +0200
+--- src/undo.c 2018-09-30 21:37:48.205983765 +0200
+***************
+*** 100,106 ****
+ } bufinfo_T;
+
+
+- static long get_undolevel(void);
+ static void u_unch_branch(u_header_T *uhp);
+ static u_entry_T *u_get_headentry(void);
+ static void u_getbot(void);
+--- 100,105 ----
+***************
+*** 113,136 ****
+ static void u_freeentries(buf_T *buf, u_header_T *uhp, u_header_T **uhpp);
+ static void u_freeentry(u_entry_T *, long);
+ #ifdef FEAT_PERSISTENT_UNDO
+- static void corruption_error(char *mesg, char_u *file_name);
+- static void u_free_uhp(u_header_T *uhp);
+- static int undo_write(bufinfo_T *bi, char_u *ptr, size_t len);
+ # ifdef FEAT_CRYPT
+ static int undo_flush(bufinfo_T *bi);
+ # endif
+- static int fwrite_crypt(bufinfo_T *bi, char_u *ptr, size_t len);
+- static int undo_write_bytes(bufinfo_T *bi, long_u nr, int len);
+- static void put_header_ptr(bufinfo_T *bi, u_header_T *uhp);
+- static int undo_read_4c(bufinfo_T *bi);
+- static int undo_read_2c(bufinfo_T *bi);
+- static int undo_read_byte(bufinfo_T *bi);
+- static time_t undo_read_time(bufinfo_T *bi);
+ static int undo_read(bufinfo_T *bi, char_u *buffer, size_t size);
+- static char_u *read_string_decrypt(bufinfo_T *bi, int len);
+- static int serialize_header(bufinfo_T *bi, char_u *hash);
+- static int serialize_uhp(bufinfo_T *bi, u_header_T *uhp);
+- static u_header_T *unserialize_uhp(bufinfo_T *bi, char_u *file_name);
+ static int serialize_uep(bufinfo_T *bi, u_entry_T *uep);
+ static u_entry_T *unserialize_uep(bufinfo_T *bi, int *error, char_u *file_name);
+ static void serialize_pos(bufinfo_T *bi, pos_T pos);
+--- 112,121 ----
+*** ../vim-8.1.0442/src/version.c 2018-09-30 18:22:22.568974801 +0200
+--- src/version.c 2018-09-30 21:40:06.745020131 +0200
+***************
+*** 79,86 ****
+ }
+ #endif
+
+- static void list_features(void);
+-
+ static char *(features[]) =
+ {
+ #ifdef HAVE_ACL
+--- 79,84 ----
+*** ../vim-8.1.0442/src/window.c 2018-09-25 22:08:10.933806882 +0200
+--- src/window.c 2018-09-30 21:38:45.485585533 +0200
+***************
+*** 20,27 ****
+ static void win_rotate(int, int);
+ static void win_totop(int size, int flags);
+ static void win_equal_rec(win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height);
+- static int last_window(void);
+- static int close_last_window_tabpage(win_T *win, int free_buf, tabpage_T *prev_curtab);
+ static win_T *win_free_mem(win_T *win, int *dirp, tabpage_T *tp);
+ static frame_T *win_altframe(win_T *win, tabpage_T *tp);
+ static tabpage_T *alt_tabpage(void);
+--- 20,25 ----
+***************
+*** 6246,6253 ****
+ }
+
+ # if defined(FEAT_FIND_ID) && defined(FEAT_EVAL)
+- static char_u *eval_includeexpr(char_u *ptr, int len);
+-
+ static char_u *
+ eval_includeexpr(char_u *ptr, int len)
+ {
+--- 6244,6249 ----
+*** ../vim-8.1.0442/src/workshop.c 2018-09-13 17:26:31.091401618 +0200
+--- src/workshop.c 2018-09-30 21:39:05.577445783 +0200
+***************
+*** 45,51 ****
+ static char *fixup(char *);
+ static char *get_selection(buf_T *);
+ static char *append_selection(int, char *, int *, int *);
+- static void load_buffer_by_name(char *, int);
+ static void load_window(char *, int lnum);
+ static void warp_to_pc(int);
+ #ifdef FEAT_BEVAL_GUI
+--- 45,50 ----
+***************
+*** 1228,1234 ****
+ }
+
+
+-
+ static void
+ load_buffer_by_name(
+ char *filename, /* the file to load */
+--- 1227,1232 ----
+*** ../vim-8.1.0442/src/version.c 2018-09-30 18:22:22.568974801 +0200
+--- src/version.c 2018-09-30 21:40:06.745020131 +0200
+***************
+*** 796,797 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 443,
+ /**/
+
+--
+The difference between theory and practice, is that in theory, there
+is no difference between theory and practice.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0444 b/data/vim/patches/8.1.0444
new file mode 100644
index 000000000..1281471d0
--- /dev/null
+++ b/data/vim/patches/8.1.0444
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0444
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0444
+Problem: Unnecessary check for NULL pointer.
+Solution: Remove check and call vim_free() directly.
+Files: src/beval.c
+
+
+*** ../vim-8.1.0443/src/beval.c 2018-06-23 19:22:45.598486362 +0200
+--- src/beval.c 2018-06-28 12:03:47.277451318 +0200
+***************
+*** 125,132 ****
+ *textp = lbuf;
+ *colp = col;
+ #ifdef FEAT_VARTABS
+! if (beval->vts)
+! vim_free(beval->vts);
+ beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array);
+ #endif
+ beval->ts = wp->w_buffer->b_p_ts;
+--- 125,131 ----
+ *textp = lbuf;
+ *colp = col;
+ #ifdef FEAT_VARTABS
+! vim_free(beval->vts);
+ beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array);
+ #endif
+ beval->ts = wp->w_buffer->b_p_ts;
+*** ../vim-8.1.0443/src/version.c 2018-09-30 21:43:17.207693209 +0200
+--- src/version.c 2018-10-02 14:14:26.115583047 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 444,
+ /**/
+
+--
+In a world without fences, who needs Gates and Windows?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0445 b/data/vim/patches/8.1.0445
new file mode 100644
index 000000000..41076aeeb
--- /dev/null
+++ b/data/vim/patches/8.1.0445
@@ -0,0 +1,317 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0445
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0445
+Problem: Setting 'term' does not store location for termcap options.
+Solution: Set the script context for termcap options that are changed when
+ 'term' is set.
+Files: src/option.c, src/proto/option.pro, src/term.c,
+ src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0444/src/option.c 2018-09-30 21:43:17.199693265 +0200
+--- src/option.c 2018-10-02 14:12:11.856267373 +0200
+***************
+*** 1755,1766 ****
+ {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_langmap, PV_NONE,
+! {(char_u *)"", /* unmatched } */
+ #else
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)NULL,
+ #endif
+! (char_u *)0L} SCTX_INIT},
+ {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
+ #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
+ (char_u *)&p_lm, PV_NONE,
+--- 1755,1766 ----
+ {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE,
+ #ifdef FEAT_LANGMAP
+ (char_u *)&p_langmap, PV_NONE,
+! {(char_u *)"", (char_u *)0L}
+ #else
+ (char_u *)NULL, PV_NONE,
+! {(char_u *)NULL, (char_u *)0L}
+ #endif
+! SCTX_INIT},
+ {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME,
+ #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
+ (char_u *)&p_lm, PV_NONE,
+***************
+*** 5790,5809 ****
+ }
+
+ /*
+! * Mark a terminal option as allocated, found by a pointer into term_strings[].
+ */
+! void
+! set_term_option_alloced(char_u **p)
+ {
+! int opt_idx;
+
+ for (opt_idx = 1; options[opt_idx].fullname != NULL; opt_idx++)
+ if (options[opt_idx].var == (char_u *)p)
+! {
+! options[opt_idx].flags |= P_ALLOCED;
+! return;
+! }
+! return; /* cannot happen: didn't find it! */
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+--- 5790,5821 ----
+ }
+
+ /*
+! * Return the option index found by a pointer into term_strings[].
+! * Return -1 if not found.
+ */
+! int
+! get_term_opt_idx(char_u **p)
+ {
+! int opt_idx;
+
+ for (opt_idx = 1; options[opt_idx].fullname != NULL; opt_idx++)
+ if (options[opt_idx].var == (char_u *)p)
+! return opt_idx;
+! return -1; // cannot happen: didn't find it!
+! }
+!
+! /*
+! * Mark a terminal option as allocated, found by a pointer into term_strings[].
+! * Return the option index or -1 if not found.
+! */
+! int
+! set_term_option_alloced(char_u **p)
+! {
+! int opt_idx = get_term_opt_idx(p);
+!
+! if (opt_idx >= 0)
+! options[opt_idx].flags |= P_ALLOCED;
+! return opt_idx;
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+***************
+*** 8237,8242 ****
+--- 8249,8280 ----
+ curwin->w_p_script_ctx[indir & PV_MASK] = new_script_ctx;
+ }
+ }
++
++ /*
++ * Set the script_ctx for a termcap option.
++ * "name" must be the two character code, e.g. "RV".
++ * When "name" is NULL use "opt_idx".
++ */
++ void
++ set_term_option_sctx_idx(char *name, int opt_idx)
++ {
++ char_u buf[5];
++ int idx;
++
++ if (name == NULL)
++ idx = opt_idx;
++ else
++ {
++ buf[0] = 't';
++ buf[1] = '_';
++ buf[2] = name[0];
++ buf[3] = name[1];
++ buf[4] = 0;
++ idx = findoption(buf);
++ }
++ if (idx >= 0)
++ set_option_sctx_idx(idx, OPT_GLOBAL, current_sctx);
++ }
+ #endif
+
+ /*
+***************
+*** 10445,10451 ****
+ {
+ struct vimoption *p;
+
+! for (p = &options[0]; p->fullname != NULL; p++)
+ if (istermoption(p))
+ {
+ if (p->flags & P_ALLOCED)
+--- 10483,10489 ----
+ {
+ struct vimoption *p;
+
+! for (p = options; p->fullname != NULL; p++)
+ if (istermoption(p))
+ {
+ if (p->flags & P_ALLOCED)
+***************
+*** 10455,10460 ****
+--- 10493,10502 ----
+ *(char_u **)(p->var) = empty_option;
+ p->def_val[VI_DEFAULT] = empty_option;
+ p->flags &= ~(P_ALLOCED|P_DEF_ALLOCED);
++ #ifdef FEAT_EVAL
++ // remember where the option was cleared
++ set_option_sctx_idx((int)(p - options), OPT_GLOBAL, current_sctx);
++ #endif
+ }
+ clear_termcodes();
+ }
+*** ../vim-8.1.0444/src/proto/option.pro 2018-09-13 20:31:47.103018229 +0200
+--- src/proto/option.pro 2018-10-02 14:12:15.040243605 +0200
+***************
+*** 17,27 ****
+ void check_buf_options(buf_T *buf);
+ void free_string_option(char_u *p);
+ void clear_string_option(char_u **pp);
+! void set_term_option_alloced(char_u **p);
+ int was_set_insecurely(char_u *opt, int opt_flags);
+ void set_string_option_direct(char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
+ char_u *check_colorcolumn(win_T *wp);
+ char_u *check_stl_option(char_u *s);
+ int get_option_value(char_u *name, long *numval, char_u **stringval, int opt_flags);
+ int get_option_value_strict(char_u *name, long *numval, char_u **stringval, int opt_type, void *from);
+ char_u *option_iter_next(void **option, int opt_type);
+--- 17,29 ----
+ void check_buf_options(buf_T *buf);
+ void free_string_option(char_u *p);
+ void clear_string_option(char_u **pp);
+! int get_term_opt_idx(char_u **p);
+! int set_term_option_alloced(char_u **p);
+ int was_set_insecurely(char_u *opt, int opt_flags);
+ void set_string_option_direct(char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid);
+ char_u *check_colorcolumn(win_T *wp);
+ char_u *check_stl_option(char_u *s);
++ void set_term_option_sctx_idx(char *name, int opt_idx);
+ int get_option_value(char_u *name, long *numval, char_u **stringval, int opt_flags);
+ int get_option_value_strict(char_u *name, long *numval, char_u **stringval, int opt_type, void *from);
+ char_u *option_iter_next(void **option, int opt_type);
+*** ../vim-8.1.0444/src/term.c 2018-09-30 21:43:17.207693209 +0200
+--- src/term.c 2018-10-02 14:44:51.335763377 +0200
+***************
+*** 1471,1476 ****
+--- 1471,1479 ----
+ if (term_strings[p->bt_entry] == NULL
+ || term_strings[p->bt_entry] == empty_option)
+ {
++ #ifdef FEAT_EVAL
++ int opt_idx = -1;
++ #endif
+ /* 8bit terminal: use CSI instead of <Esc>[ */
+ if (term_8bit && term_7to8bit((char_u *)p->bt_string) != 0)
+ {
+***************
+*** 1486,1496 ****
+ STRMOVE(t + 1, t + 2);
+ }
+ term_strings[p->bt_entry] = s;
+! set_term_option_alloced(&term_strings[p->bt_entry]);
+ }
+ }
+ else
+ term_strings[p->bt_entry] = (char_u *)p->bt_string;
+ }
+ }
+ else
+--- 1489,1511 ----
+ STRMOVE(t + 1, t + 2);
+ }
+ term_strings[p->bt_entry] = s;
+! #ifdef FEAT_EVAL
+! opt_idx =
+! #endif
+! set_term_option_alloced(
+! &term_strings[p->bt_entry]);
+ }
+ }
+ else
++ {
+ term_strings[p->bt_entry] = (char_u *)p->bt_string;
++ #ifdef FEAT_EVAL
++ opt_idx = get_term_opt_idx(&term_strings[p->bt_entry]);
++ #endif
++ }
++ #ifdef FEAT_EVAL
++ set_term_option_sctx_idx(NULL, opt_idx);
++ #endif
+ }
+ }
+ else
+***************
+*** 1616,1622 ****
+--- 1631,1642 ----
+ {
+ if (TERM_STR(string_names[i].dest) == NULL
+ || TERM_STR(string_names[i].dest) == empty_option)
++ {
+ TERM_STR(string_names[i].dest) = TGETSTR(string_names[i].name, &tp);
++ #ifdef FEAT_EVAL
++ set_term_option_sctx_idx(string_names[i].name, -1);
++ #endif
++ }
+ }
+
+ /* tgetflag() returns 1 if the flag is present, 0 if not and
+***************
+*** 1658,1664 ****
+--- 1678,1689 ----
+ * Get number of colors (if not done already).
+ */
+ if (TERM_STR(KS_CCO) == NULL || TERM_STR(KS_CCO) == empty_option)
++ {
+ set_color_count(tgetnum("Co"));
++ #ifdef FEAT_EVAL
++ set_term_option_sctx_idx("Co", -1);
++ #endif
++ }
+
+ # ifndef hpux
+ BC = (char *)TGETSTR("bc", &tp);
+*** ../vim-8.1.0444/src/testdir/test_options.vim 2018-08-23 22:20:31.449852029 +0200
+--- src/testdir/test_options.vim 2018-10-02 14:42:18.764840113 +0200
+***************
+*** 270,275 ****
+--- 270,287 ----
+ call assert_fails('set t_foo=', 'E846:')
+ endfunc
+
++ " Must be executed before other tests that set 'term'.
++ func Test_000_term_option_verbose()
++ let verb_cm = execute('verbose set t_cm')
++ call assert_notmatch('Last set from', verb_cm)
++
++ let term_save = &term
++ set term=ansi
++ let verb_cm = execute('verbose set t_cm')
++ call assert_match('Last set from.*test_options.vim', verb_cm)
++ let &term = term_save
++ endfunc
++
+ func Test_set_ttytype()
+ if !has('gui_running') && has('unix')
+ " Setting 'ttytype' used to cause a double-free when exiting vim and
+*** ../vim-8.1.0444/src/version.c 2018-10-02 14:15:08.991376909 +0200
+--- src/version.c 2018-10-02 14:42:46.984641236 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 445,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+132. You come back and check this list every half-hour.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0446 b/data/vim/patches/8.1.0446
new file mode 100644
index 000000000..83d1ec3f5
--- /dev/null
+++ b/data/vim/patches/8.1.0446
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0446
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0446
+Problem: Options test fails in the GUI.
+Solution: Don't try changing 'term' in the GUI.
+Files: src/testdir/test_options.vim
+
+
+*** ../vim-8.1.0445/src/testdir/test_options.vim 2018-10-02 14:45:07.023652468 +0200
+--- src/testdir/test_options.vim 2018-10-02 15:04:35.238391450 +0200
+***************
+*** 272,277 ****
+--- 272,280 ----
+
+ " Must be executed before other tests that set 'term'.
+ func Test_000_term_option_verbose()
++ if has('gui_running')
++ return
++ endif
+ let verb_cm = execute('verbose set t_cm')
+ call assert_notmatch('Last set from', verb_cm)
+
+*** ../vim-8.1.0445/src/version.c 2018-10-02 14:45:07.023652468 +0200
+--- src/version.c 2018-10-02 15:05:10.390126789 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 446,
+ /**/
+
+--
+There are three kinds of persons: Those who can count and those who can't.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0447 b/data/vim/patches/8.1.0447
new file mode 100644
index 000000000..34d400d02
--- /dev/null
+++ b/data/vim/patches/8.1.0447
@@ -0,0 +1,133 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0447
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0447
+Problem: GUI scrollbar test fails with Athena and Motif.
+Solution: When not using on-the-fly scrolling call normal_cmd().
+Files: src/evalfunc.c, src/ex_docmd.c, src/proto/ex_docmd.pro
+
+
+*** ../vim-8.1.0446/src/evalfunc.c 2018-09-30 21:43:17.183693376 +0200
+--- src/evalfunc.c 2018-10-02 16:21:11.584227329 +0200
+***************
+*** 3588,3594 ****
+
+ if (!dangerous)
+ ++ex_normal_busy;
+! exec_normal(TRUE, TRUE);
+ if (!dangerous)
+ --ex_normal_busy;
+
+--- 3588,3594 ----
+
+ if (!dangerous)
+ ++ex_normal_busy;
+! exec_normal(TRUE, FALSE, TRUE);
+ if (!dangerous)
+ --ex_normal_busy;
+
+***************
+*** 13233,13238 ****
+--- 13233,13242 ----
+ return;
+ }
+ gui_drag_scrollbar(sb, value, dragging);
++ # ifndef USE_ON_FLY_SCROLL
++ // need to loop through normal_cmd() to handle the scroll events
++ exec_normal(FALSE, TRUE, FALSE);
++ # endif
+ }
+ #endif
+
+*** ../vim-8.1.0446/src/ex_docmd.c 2018-09-30 21:43:17.187693348 +0200
+--- src/ex_docmd.c 2018-10-02 16:22:09.711805347 +0200
+***************
+*** 10471,10491 ****
+ {
+ /* Stuff the argument into the typeahead buffer. */
+ ins_typebuf(cmd, remap, 0, TRUE, silent);
+! exec_normal(FALSE, FALSE);
+ }
+
+ /*
+ * Execute normal_cmd() until there is no typeahead left.
+ */
+ void
+! exec_normal(int was_typed, int may_use_terminal_loop UNUSED)
+ {
+ oparg_T oa;
+
+ clear_oparg(&oa);
+ finish_op = FALSE;
+! while ((!stuff_empty() || ((was_typed || !typebuf_typed())
+! && typebuf.tb_len > 0)) && !got_int)
+ {
+ update_topline_cursor();
+ #ifdef FEAT_TERMINAL
+--- 10471,10494 ----
+ {
+ /* Stuff the argument into the typeahead buffer. */
+ ins_typebuf(cmd, remap, 0, TRUE, silent);
+! exec_normal(FALSE, FALSE, FALSE);
+ }
+
+ /*
+ * Execute normal_cmd() until there is no typeahead left.
++ * When "use_vpeekc" is TRUE use vpeekc() to check for available chars.
+ */
+ void
+! exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop UNUSED)
+ {
+ oparg_T oa;
+
+ clear_oparg(&oa);
+ finish_op = FALSE;
+! while ((!stuff_empty()
+! || ((was_typed || !typebuf_typed()) && typebuf.tb_len > 0)
+! || (use_vpeekc && vpeekc() != NUL))
+! && !got_int)
+ {
+ update_topline_cursor();
+ #ifdef FEAT_TERMINAL
+*** ../vim-8.1.0446/src/proto/ex_docmd.pro 2018-09-15 15:42:36.501547749 +0200
+--- src/proto/ex_docmd.pro 2018-10-02 16:21:31.332084040 +0200
+***************
+*** 59,65 ****
+ void restore_current_state(save_state_T *sst);
+ void ex_normal(exarg_T *eap);
+ void exec_normal_cmd(char_u *cmd, int remap, int silent);
+! void exec_normal(int was_typed, int may_use_terminal_loop);
+ int find_cmdline_var(char_u *src, int *usedlen);
+ char_u *eval_vars(char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped);
+ char_u *expand_sfile(char_u *arg);
+--- 59,65 ----
+ void restore_current_state(save_state_T *sst);
+ void ex_normal(exarg_T *eap);
+ void exec_normal_cmd(char_u *cmd, int remap, int silent);
+! void exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop);
+ int find_cmdline_var(char_u *src, int *usedlen);
+ char_u *eval_vars(char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped);
+ char_u *expand_sfile(char_u *arg);
+*** ../vim-8.1.0446/src/version.c 2018-10-02 15:06:36.761478333 +0200
+--- src/version.c 2018-10-02 16:22:59.479443571 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 447,
+ /**/
+
+--
+Birthdays are healthy. The more you have them, the longer you live.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0448 b/data/vim/patches/8.1.0448
new file mode 100644
index 000000000..f67b31d48
--- /dev/null
+++ b/data/vim/patches/8.1.0448
@@ -0,0 +1,233 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0448
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0448
+Problem: Cursorline not removed when using 'cursorbind'. (Justin Keyes)
+Solution: Store the last cursor line per window. (closes #3488)
+Files: src/testdir/test_diffmode.vim,
+ src/testdir/dumps/Test_diff_with_cursorline_01.dump,
+ src/testdir/dumps/Test_diff_with_cursorline_02.dump,
+ src/testdir/dumps/Test_diff_with_cursorline_03.dump,
+ src/structs.h, src/move.c
+
+
+*** ../vim-8.1.0447/src/testdir/test_diffmode.vim 2018-09-16 15:47:45.629425398 +0200
+--- src/testdir/test_diffmode.vim 2018-10-02 17:13:44.568029822 +0200
+***************
+*** 817,819 ****
+--- 817,845 ----
+ call delete('Xfile2')
+ endfunc
+
++ func Test_diff_with_cursorline()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ call writefile([
++ \ 'hi CursorLine ctermbg=red ctermfg=white',
++ \ 'set cursorline',
++ \ 'call setline(1, ["foo","foo","foo","bar"])',
++ \ 'vnew',
++ \ 'call setline(1, ["bee","foo","foo","baz"])',
++ \ 'windo diffthis',
++ \ '2wincmd w',
++ \ ], 'Xtest_diff_cursorline')
++ let buf = RunVimInTerminal('-S Xtest_diff_cursorline', {})
++
++ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_01', {})
++ call term_sendkeys(buf, "j")
++ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_02', {})
++ call term_sendkeys(buf, "j")
++ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_03', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('Xtest_diff_cursorline')
++ endfunc
+*** ../vim-8.1.0447/src/testdir/dumps/Test_diff_with_cursorline_01.dump 2018-10-02 18:24:28.837408182 +0200
+--- src/testdir/dumps/Test_diff_with_cursorline_01.dump 2018-10-02 17:13:50.367983071 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|b+8#ffffff16#ff404010|e@1| @31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1>f+8#ffffff16#ff404010|o@1| @31
++ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
++ | +0#0000e05#a8a8a8255@1|b+2#0000000#ff404010|a|z| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0447/src/testdir/dumps/Test_diff_with_cursorline_02.dump 2018-10-02 18:24:28.841408152 +0200
+--- src/testdir/dumps/Test_diff_with_cursorline_02.dump 2018-10-02 17:58:28.616935305 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|e@1| @31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
++ | +0#0000e05#a8a8a8255@1|f+8#ffffff16#ff404010|o@1| @31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1>f+8#ffffff16#ff404010|o@1| @31
++ | +0#0000e05#a8a8a8255@1|b+2#0000000#ff404010|a|z| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|1| @11|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0447/src/testdir/dumps/Test_diff_with_cursorline_03.dump 2018-10-02 18:24:28.845408122 +0200
+--- src/testdir/dumps/Test_diff_with_cursorline_03.dump 2018-10-02 17:58:29.668927931 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|e@1| @31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
++ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
++ | +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
++ | +0#0000e05#a8a8a8255@1|b+10#ffffff16#ff404010|a|z| +8&&@31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1>f+10#ffffff16#ff404010|o@1| +8&&@31
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|4|,|1| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0447/src/structs.h 2018-09-16 14:10:28.300323360 +0200
+--- src/structs.h 2018-10-02 17:27:47.385431264 +0200
+***************
+*** 2686,2691 ****
+--- 2686,2695 ----
+ time through cursupdate() to the
+ current virtual column */
+
++ #ifdef FEAT_SYN_HL
++ linenr_T w_last_cursorline; // where last time 'cursorline' was drawn
++ #endif
++
+ /*
+ * the next seven are used to update the visual part
+ */
+*** ../vim-8.1.0447/src/move.c 2018-09-30 21:43:17.195693290 +0200
+--- src/move.c 2018-10-02 17:29:27.368662974 +0200
+***************
+*** 117,128 ****
+ }
+
+ #ifdef FEAT_SYN_HL
+- static linenr_T last_cursorline = 0;
+-
+ void
+ reset_cursorline(void)
+ {
+! last_cursorline = 0;
+ }
+ #endif
+
+--- 117,126 ----
+ }
+
+ #ifdef FEAT_SYN_HL
+ void
+ reset_cursorline(void)
+ {
+! curwin->w_last_cursorline = 0;
+ }
+ #endif
+
+***************
+*** 150,167 ****
+ #ifdef FEAT_SYN_HL
+ if (wp->w_p_cul)
+ {
+! if (wp->w_redr_type <= VALID && last_cursorline != 0)
+ {
+! // "last_cursorline" may be set for another window, worst case
+! // we redraw too much. This is optimized for moving the cursor
+! // around in the same window.
+! redrawWinline(wp, last_cursorline, FALSE);
+ redrawWinline(wp, wp->w_cursor.lnum, FALSE);
+ redraw_win_later(wp, VALID);
+ }
+ else
+ redraw_win_later(wp, SOME_VALID);
+! last_cursorline = wp->w_cursor.lnum;
+ }
+ #endif
+ }
+--- 148,165 ----
+ #ifdef FEAT_SYN_HL
+ if (wp->w_p_cul)
+ {
+! if (wp->w_redr_type <= VALID && wp->w_last_cursorline != 0)
+ {
+! // "w_last_cursorline" may be outdated, worst case we redraw
+! // too much. This is optimized for moving the cursor around in
+! // the current window.
+! redrawWinline(wp, wp->w_last_cursorline, FALSE);
+ redrawWinline(wp, wp->w_cursor.lnum, FALSE);
+ redraw_win_later(wp, VALID);
+ }
+ else
+ redraw_win_later(wp, SOME_VALID);
+! wp->w_last_cursorline = wp->w_cursor.lnum;
+ }
+ #endif
+ }
+*** ../vim-8.1.0447/src/version.c 2018-10-02 16:23:55.323037143 +0200
+--- src/version.c 2018-10-02 18:24:16.109503149 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 448,
+ /**/
+
+--
+"The sun oozed over the horizon, shoved aside darkness, crept along the
+greensward, and, with sickly fingers, pushed through the castle window,
+revealing the pillaged princess, hand at throat, crown asunder, gaping
+in frenzied horror at the sated, sodden amphibian lying beside her,
+disbelieving the magnitude of the frog's deception, screaming madly,
+"You lied!"
+ - Winner of the Bulwer-Lytton contest (San Jose State University),
+ wherein one writes only the first line of a bad novel
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0449 b/data/vim/patches/8.1.0449
new file mode 100644
index 000000000..c5d31defa
--- /dev/null
+++ b/data/vim/patches/8.1.0449
@@ -0,0 +1,188 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0449
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0449
+Problem: When 'rnu' is set folded lines are not displayed correctly.
+ (Vitaly Yashin)
+Solution: When only redrawing line numbers do draw folded lines.
+ (closes #3484)
+Files: src/screen.c, src/testdir/test_fold.vim,
+ src/testdir/dumps/Test_folds_with_rnu_01.dump,
+ src/testdir/dumps/Test_folds_with_rnu_02.dump
+
+
+*** ../vim-8.1.0448/src/screen.c 2018-09-30 21:43:17.203693237 +0200
+--- src/screen.c 2018-10-02 21:17:41.161356069 +0200
+***************
+*** 2176,2182 ****
+ {
+ // 'relativenumber' set: The text doesn't need to be drawn, but
+ // the number column nearly always does.
+! (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE);
+ }
+
+ // This line does not need to be drawn, advance to the next one.
+--- 2176,2189 ----
+ {
+ // 'relativenumber' set: The text doesn't need to be drawn, but
+ // the number column nearly always does.
+! fold_count = foldedCount(wp, lnum, &win_foldinfo);
+! if (fold_count != 0)
+! {
+! fold_line(wp, fold_count, &win_foldinfo, lnum, row);
+! --fold_count;
+! }
+! else
+! (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE);
+ }
+
+ // This line does not need to be drawn, advance to the next one.
+***************
+*** 3315,3322 ****
+ has_spell = TRUE;
+ extra_check = TRUE;
+
+! /* Get the start of the next line, so that words that wrap to the next
+! * line are found too: "et<line-break>al.".
+ * Trick: skip a few chars for C/shell/Vim comments */
+ nextline[SPWORDLEN] = NUL;
+ if (lnum < wp->w_buffer->b_ml.ml_line_count)
+--- 3322,3329 ----
+ has_spell = TRUE;
+ extra_check = TRUE;
+
+! /* Get the start of the next line, so that words that wrap to the
+! * next line are found too: "et<line-break>al.".
+ * Trick: skip a few chars for C/shell/Vim comments */
+ nextline[SPWORDLEN] = NUL;
+ if (lnum < wp->w_buffer->b_ml.ml_line_count)
+***************
+*** 3325,3332 ****
+ spell_cat_line(nextline + SPWORDLEN, line, SPWORDLEN);
+ }
+
+! /* When a word wrapped from the previous line the start of the current
+! * line is valid. */
+ if (lnum == checked_lnum)
+ cur_checked_col = checked_col;
+ checked_lnum = 0;
+--- 3332,3339 ----
+ spell_cat_line(nextline + SPWORDLEN, line, SPWORDLEN);
+ }
+
+! /* When a word wrapped from the previous line the start of the
+! * current line is valid. */
+ if (lnum == checked_lnum)
+ cur_checked_col = checked_col;
+ checked_lnum = 0;
+*** ../vim-8.1.0448/src/testdir/test_fold.vim 2018-07-10 15:07:11.779668824 +0200
+--- src/testdir/test_fold.vim 2018-10-02 21:15:55.182278183 +0200
+***************
+*** 1,6 ****
+--- 1,7 ----
+ " Test for folding
+
+ source view_util.vim
++ source screendump.vim
+
+ func PrepIndent(arg)
+ return [a:arg] + repeat(["\t".a:arg], 5)
+***************
+*** 674,676 ****
+--- 675,697 ----
+ set fdm&
+ enew!
+ endfunc
++
++ func Test_folds_with_rnu()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ call writefile([
++ \ 'set fdm=marker rnu foldcolumn=2',
++ \ 'call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])',
++ \ ], 'Xtest_folds_with_rnu')
++ let buf = RunVimInTerminal('-S Xtest_folds_with_rnu', {})
++
++ call VerifyScreenDump(buf, 'Test_folds_with_rnu_01', {})
++ call term_sendkeys(buf, "j")
++ call VerifyScreenDump(buf, 'Test_folds_with_rnu_02', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('Xtest_folds_with_rnu')
++ endfunc
+*** ../vim-8.1.0448/src/testdir/dumps/Test_folds_with_rnu_01.dump 2018-10-02 21:19:43.940299759 +0200
+--- src/testdir/dumps/Test_folds_with_rnu_01.dump 2018-10-02 21:16:04.846193642 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| @2|0| >+|-@1| @1|2| |l|i|n|e|s|:| |-@54
++ |+| @2|1| |+|-@1| @1|2| |l|i|n|e|s|:| |-@54
++ | @1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000000&@56|1|,|1| @10|A|l@1|
+*** ../vim-8.1.0448/src/testdir/dumps/Test_folds_with_rnu_02.dump 2018-10-02 21:19:43.944299727 +0200
+--- src/testdir/dumps/Test_folds_with_rnu_02.dump 2018-10-02 21:16:05.894184479 +0200
+***************
+*** 0 ****
+--- 1,20 ----
++ |++0#0000e05#a8a8a8255| @2|1| |+|-@1| @1|2| |l|i|n|e|s|:| |-@54
++ |+| @2|0| >+|-@1| @1|2| |l|i|n|e|s|:| |-@54
++ | @1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71
++ | +0#0000000&@56|3|,|1| @10|A|l@1|
+*** ../vim-8.1.0448/src/version.c 2018-10-02 18:25:41.424867560 +0200
+--- src/version.c 2018-10-02 21:18:46.028796562 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 449,
+ /**/
+
+--
+The coffee just wasn't strong enough to defend itself -- Tom Waits
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0450 b/data/vim/patches/8.1.0450
new file mode 100644
index 000000000..7dbcf3816
--- /dev/null
+++ b/data/vim/patches/8.1.0450
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0450
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0450 (after patch 8.1.0449)
+Problem: Build failure without the +fold feature.
+Solution: Add #ifdef.
+Files: src/screen.c
+
+
+*** ../vim-8.1.0449/src/screen.c 2018-10-02 21:20:08.688088162 +0200
+--- src/screen.c 2018-10-02 21:46:41.722564273 +0200
+***************
+*** 2174,2188 ****
+ {
+ if (wp->w_p_rnu)
+ {
+ // 'relativenumber' set: The text doesn't need to be drawn, but
+ // the number column nearly always does.
+ fold_count = foldedCount(wp, lnum, &win_foldinfo);
+ if (fold_count != 0)
+- {
+ fold_line(wp, fold_count, &win_foldinfo, lnum, row);
+- --fold_count;
+- }
+ else
+ (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE);
+ }
+
+--- 2174,2187 ----
+ {
+ if (wp->w_p_rnu)
+ {
++ #ifdef FEAT_FOLDING
+ // 'relativenumber' set: The text doesn't need to be drawn, but
+ // the number column nearly always does.
+ fold_count = foldedCount(wp, lnum, &win_foldinfo);
+ if (fold_count != 0)
+ fold_line(wp, fold_count, &win_foldinfo, lnum, row);
+ else
++ #endif
+ (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE);
+ }
+
+*** ../vim-8.1.0449/src/version.c 2018-10-02 21:20:08.688088162 +0200
+--- src/version.c 2018-10-02 21:48:14.785774472 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 450,
+ /**/
+
+--
+Amazing but true: If all the salmon caught in Canada in one year were laid
+end to end across the Sahara Desert, the smell would be absolutely awful.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0451 b/data/vim/patches/8.1.0451
new file mode 100644
index 000000000..232e0abe7
--- /dev/null
+++ b/data/vim/patches/8.1.0451
@@ -0,0 +1,148 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0451
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0451
+Problem: Win32 console: keypad keys don't work.
+Solution: Use numbers instead of characters to avoid the value becoming
+ negative. (Mike Williams)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0450/src/os_win32.c 2018-09-30 21:43:17.203693237 +0200
+--- src/os_win32.c 2018-10-03 20:44:09.309019768 +0200
+***************
+*** 847,853 ****
+ int chAlt;
+ } VirtKeyMap[] =
+ {
+-
+ /* Key ANSI alone shift ctrl alt */
+ { VK_ESCAPE,FALSE, ESC, ESC, ESC, ESC, },
+
+--- 847,852 ----
+***************
+*** 861,910 ****
+ { VK_F8, TRUE, 'B', '[', 'e', 'o', },
+ { VK_F9, TRUE, 'C', '\\', 'f', 'p', },
+ { VK_F10, TRUE, 'D', ']', 'g', 'q', },
+! { VK_F11, TRUE, '\205', '\207', '\211', '\213', },
+! { VK_F12, TRUE, '\206', '\210', '\212', '\214', },
+
+! { VK_HOME, TRUE, 'G', '\302', 'w', '\303', },
+! { VK_UP, TRUE, 'H', '\304', '\305', '\306', },
+! { VK_PRIOR, TRUE, 'I', '\307', '\204', '\310', }, /*PgUp*/
+! { VK_LEFT, TRUE, 'K', '\311', 's', '\312', },
+! { VK_RIGHT, TRUE, 'M', '\313', 't', '\314', },
+! { VK_END, TRUE, 'O', '\315', 'u', '\316', },
+! { VK_DOWN, TRUE, 'P', '\317', '\320', '\321', },
+! { VK_NEXT, TRUE, 'Q', '\322', 'v', '\323', }, /*PgDn*/
+! { VK_INSERT,TRUE, 'R', '\324', '\325', '\326', },
+! { VK_DELETE,TRUE, 'S', '\327', '\330', '\331', },
+
+ { VK_SNAPSHOT,TRUE, 0, 0, 0, 'r', }, /*PrtScrn*/
+
+ #if 0
+ /* Most people don't have F13-F20, but what the hell... */
+! { VK_F13, TRUE, '\332', '\333', '\334', '\335', },
+! { VK_F14, TRUE, '\336', '\337', '\340', '\341', },
+! { VK_F15, TRUE, '\342', '\343', '\344', '\345', },
+! { VK_F16, TRUE, '\346', '\347', '\350', '\351', },
+! { VK_F17, TRUE, '\352', '\353', '\354', '\355', },
+! { VK_F18, TRUE, '\356', '\357', '\360', '\361', },
+! { VK_F19, TRUE, '\362', '\363', '\364', '\365', },
+! { VK_F20, TRUE, '\366', '\367', '\370', '\371', },
+ #endif
+ { VK_ADD, TRUE, 'N', 'N', 'N', 'N', }, /* keyp '+' */
+ { VK_SUBTRACT, TRUE,'J', 'J', 'J', 'J', }, /* keyp '-' */
+ /* { VK_DIVIDE, TRUE,'N', 'N', 'N', 'N', }, keyp '/' */
+ { VK_MULTIPLY, TRUE,'7', '7', '7', '7', }, /* keyp '*' */
+
+! { VK_NUMPAD0,TRUE, '\332', '\333', '\334', '\335', },
+! { VK_NUMPAD1,TRUE, '\336', '\337', '\340', '\341', },
+! { VK_NUMPAD2,TRUE, '\342', '\343', '\344', '\345', },
+! { VK_NUMPAD3,TRUE, '\346', '\347', '\350', '\351', },
+! { VK_NUMPAD4,TRUE, '\352', '\353', '\354', '\355', },
+! { VK_NUMPAD5,TRUE, '\356', '\357', '\360', '\361', },
+! { VK_NUMPAD6,TRUE, '\362', '\363', '\364', '\365', },
+! { VK_NUMPAD7,TRUE, '\366', '\367', '\370', '\371', },
+! { VK_NUMPAD8,TRUE, '\372', '\373', '\374', '\375', },
+ /* Sorry, out of number space! <negri>*/
+! { VK_NUMPAD9,TRUE, '\376', '\377', '\377', '\367', },
+!
+ };
+
+
+--- 860,908 ----
+ { VK_F8, TRUE, 'B', '[', 'e', 'o', },
+ { VK_F9, TRUE, 'C', '\\', 'f', 'p', },
+ { VK_F10, TRUE, 'D', ']', 'g', 'q', },
+! { VK_F11, TRUE, 0x85, 0x87, 0x89, 0x8B, },
+! { VK_F12, TRUE, 0x86, 0x88, 0x8a, 0x8c, },
+
+! { VK_HOME, TRUE, 'G', 0xc2, 'w', 0xc3, },
+! { VK_UP, TRUE, 'H', 0xc4, 0xc5, 0xc6, },
+! { VK_PRIOR, TRUE, 'I', 0xc7, 0x84, 0xc8, }, /*PgUp*/
+! { VK_LEFT, TRUE, 'K', 0xc9, 's', 0xca, },
+! { VK_RIGHT, TRUE, 'M', 0xcb, 't', 0xcc, },
+! { VK_END, TRUE, 'O', 0xcd, 'u', 0xce, },
+! { VK_DOWN, TRUE, 'P', 0xcf, 0xd0, 0xd1, },
+! { VK_NEXT, TRUE, 'Q', 0xd2, 'v', 0xd3, }, /*PgDn*/
+! { VK_INSERT,TRUE, 'R', 0xd4, 0xd5, 0xd6, },
+! { VK_DELETE,TRUE, 'S', 0xd7, 0xd8, 0xd9, },
+
+ { VK_SNAPSHOT,TRUE, 0, 0, 0, 'r', }, /*PrtScrn*/
+
+ #if 0
+ /* Most people don't have F13-F20, but what the hell... */
+! { VK_F13, TRUE, 0xda, 0xdb, 0xdc, 0xdd, },
+! { VK_F14, TRUE, 0xde, 0xdf, 0xe0, 0xe1, },
+! { VK_F15, TRUE, 0xe2, 0xe3, 0xe4, 0xe5, },
+! { VK_F16, TRUE, 0xe6, 0xe7, 0xe8, 0xe9, },
+! { VK_F17, TRUE, 0xea, 0xeb, 0xec, 0xed, },
+! { VK_F18, TRUE, 0xee, 0xef, 0xf0, 0xf1, },
+! { VK_F19, TRUE, 0xf2, 0xf3, 0xf4, 0xf5, },
+! { VK_F20, TRUE, 0xf6, 0xf7, 0xf8, 0xf9, },
+ #endif
+ { VK_ADD, TRUE, 'N', 'N', 'N', 'N', }, /* keyp '+' */
+ { VK_SUBTRACT, TRUE,'J', 'J', 'J', 'J', }, /* keyp '-' */
+ /* { VK_DIVIDE, TRUE,'N', 'N', 'N', 'N', }, keyp '/' */
+ { VK_MULTIPLY, TRUE,'7', '7', '7', '7', }, /* keyp '*' */
+
+! { VK_NUMPAD0,TRUE, 0xda, 0xdb, 0xdc, 0xdd, },
+! { VK_NUMPAD1,TRUE, 0xde, 0xdf, 0xe0, 0xe1, },
+! { VK_NUMPAD2,TRUE, 0xe2, 0xe3, 0xe4, 0xe5, },
+! { VK_NUMPAD3,TRUE, 0xe6, 0xe7, 0xe8, 0xe9, },
+! { VK_NUMPAD4,TRUE, 0xea, 0xeb, 0xec, 0xed, },
+! { VK_NUMPAD5,TRUE, 0xee, 0xef, 0xf0, 0xf1, },
+! { VK_NUMPAD6,TRUE, 0xf2, 0xf3, 0xf4, 0xf5, },
+! { VK_NUMPAD7,TRUE, 0xf6, 0xf7, 0xf8, 0xf9, },
+! { VK_NUMPAD8,TRUE, 0xfa, 0xfb, 0xfc, 0xfd, },
+ /* Sorry, out of number space! <negri>*/
+! { VK_NUMPAD9,TRUE, 0xfe, 0xff, 0xff, 0xf7, },
+ };
+
+
+*** ../vim-8.1.0450/src/version.c 2018-10-02 21:48:30.641640211 +0200
+--- src/version.c 2018-10-03 20:43:41.313572933 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 451,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+141. You'd rather go to http://www.weather.com/ than look out your window.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0452 b/data/vim/patches/8.1.0452
new file mode 100644
index 000000000..94459684e
--- /dev/null
+++ b/data/vim/patches/8.1.0452
@@ -0,0 +1,123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0452
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0452
+Problem: MS-Windows: not finding intl.dll.
+Solution: Also find intl.dll next to libintl.dll. (Ken Takata)
+Files: src/os_win32.c, runtime/doc/mlang.txt
+
+
+*** ../vim-8.1.0451/src/os_win32.c 2018-10-03 20:44:16.340886213 +0200
+--- src/os_win32.c 2018-10-06 14:57:21.420211524 +0200
+***************
+*** 573,579 ****
+ #if defined(DYNAMIC_GETTEXT) || defined(PROTO)
+ # ifndef GETTEXT_DLL
+ # define GETTEXT_DLL "libintl.dll"
+! # define GETTEXT_DLL_ALT "libintl-8.dll"
+ # endif
+ /* Dummy functions */
+ static char *null_libintl_gettext(const char *);
+--- 573,580 ----
+ #if defined(DYNAMIC_GETTEXT) || defined(PROTO)
+ # ifndef GETTEXT_DLL
+ # define GETTEXT_DLL "libintl.dll"
+! # define GETTEXT_DLL_ALT1 "libintl-8.dll"
+! # define GETTEXT_DLL_ALT2 "intl.dll"
+ # endif
+ /* Dummy functions */
+ static char *null_libintl_gettext(const char *);
+***************
+*** 614,627 ****
+ };
+ HINSTANCE hmsvcrt;
+
+! /* No need to initialize twice. */
+! if (hLibintlDLL)
+ return 1;
+! /* Load gettext library (libintl.dll) */
+ hLibintlDLL = vimLoadLib(GETTEXT_DLL);
+! #ifdef GETTEXT_DLL_ALT
+ if (!hLibintlDLL)
+! hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT);
+ #endif
+ if (!hLibintlDLL)
+ {
+--- 615,632 ----
+ };
+ HINSTANCE hmsvcrt;
+
+! // No need to initialize twice.
+! if (hLibintlDLL != NULL)
+ return 1;
+! // Load gettext library (libintl.dll and other names).
+ hLibintlDLL = vimLoadLib(GETTEXT_DLL);
+! #ifdef GETTEXT_DLL_ALT1
+ if (!hLibintlDLL)
+! hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT1);
+! #endif
+! #ifdef GETTEXT_DLL_ALT2
+! if (!hLibintlDLL)
+! hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT2);
+ #endif
+ if (!hLibintlDLL)
+ {
+*** ../vim-8.1.0451/runtime/doc/mlang.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/mlang.txt 2018-10-06 14:59:44.978840351 +0200
+***************
+*** 102,109 ****
+
+ This also contains tools xgettext, msgformat and others.
+
+! libintl.dll should be placed in same directory with (g)vim.exe, or some
+! place where PATH environment value describe. Vim also finds libintl-8.dll.
+ Message files (vim.mo) have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES",
+ where "xx" is the abbreviation of the language (mostly two letters).
+
+--- 102,111 ----
+
+ This also contains tools xgettext, msgformat and others.
+
+! libintl.dll should be placed in same directory as (g)vim.exe, or one of the
+! directories listed in the PATH environment value. Vim also looks for the
+! alternate names "libintl-8.dll" and "intl.dll".
+!
+ Message files (vim.mo) have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES",
+ where "xx" is the abbreviation of the language (mostly two letters).
+
+***************
+*** 210,213 ****
+ :endif
+ <
+
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 212,215 ----
+ :endif
+ <
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0451/src/version.c 2018-10-03 20:44:16.340886213 +0200
+--- src/version.c 2018-10-06 14:55:54.765045584 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 452,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+161. You get up before the sun rises to check your e-mail, and you
+ find yourself in the very same chair long after the sun has set.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0453 b/data/vim/patches/8.1.0453
new file mode 100644
index 000000000..cdd9e7d30
--- /dev/null
+++ b/data/vim/patches/8.1.0453
@@ -0,0 +1,126 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0453
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0453
+Problem: MS-Windows: executable() is not reliable.
+Solution: Use $PATHEXT properly. (Yasuhiro Matsumoto, closes #3412)
+Files: src/os_win32.c, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0452/src/os_win32.c 2018-10-06 15:02:53.797052261 +0200
+--- src/os_win32.c 2018-10-06 15:18:33.140733117 +0200
+***************
+*** 3535,3555 ****
+ {
+ char_u buf[_MAX_PATH];
+ int len = (int)STRLEN(name);
+! char_u *p;
+
+ if (len >= _MAX_PATH) /* safety check */
+ return FALSE;
+
+! /* If there already is an extension try using the name directly. Also do
+! * this with a Unix-shell like 'shell'. */
+! if (vim_strchr(gettail(name), '.') != NULL
+! || strstr((char *)gettail(p_sh), "sh") != NULL)
+ if (executable_exists((char *)name, path, use_path))
+ return TRUE;
+
+ /*
+ * Loop over all extensions in $PATHEXT.
+ */
+ vim_strncpy(buf, name, _MAX_PATH - 1);
+ p = mch_getenv("PATHEXT");
+ if (p == NULL)
+--- 3535,3578 ----
+ {
+ char_u buf[_MAX_PATH];
+ int len = (int)STRLEN(name);
+! char_u *p, *saved;
+
+ if (len >= _MAX_PATH) /* safety check */
+ return FALSE;
+
+! /* Ty using the name directly when a Unix-shell like 'shell'. */
+! if (strstr((char *)gettail(p_sh), "sh") != NULL)
+ if (executable_exists((char *)name, path, use_path))
+ return TRUE;
+
+ /*
+ * Loop over all extensions in $PATHEXT.
+ */
++ p = mch_getenv("PATHEXT");
++ if (p == NULL)
++ p = (char_u *)".com;.exe;.bat;.cmd";
++ saved = vim_strsave(p);
++ if (saved == NULL)
++ return FALSE;
++ p = saved;
++ while (*p)
++ {
++ char_u *tmp = vim_strchr(p, ';');
++
++ if (tmp != NULL)
++ *tmp = NUL;
++ if (_stricoll((char *)name + len - STRLEN(p), (char *)p) == 0
++ && executable_exists((char *)name, path, use_path))
++ {
++ vim_free(saved);
++ return TRUE;
++ }
++ if (tmp == NULL)
++ break;
++ p = tmp + 1;
++ }
++ vim_free(saved);
++
+ vim_strncpy(buf, name, _MAX_PATH - 1);
+ p = mch_getenv("PATHEXT");
+ if (p == NULL)
+*** ../vim-8.1.0452/src/testdir/test_functions.vim 2018-09-03 22:08:05.676736128 +0200
+--- src/testdir/test_functions.vim 2018-10-06 15:14:28.462908180 +0200
+***************
+*** 800,805 ****
+--- 800,818 ----
+ bw!
+ endfunc
+
++ func Test_Executable()
++ if has('win32')
++ call assert_equal(1, executable('notepad'))
++ call assert_equal(1, executable('notepad.exe'))
++ call assert_equal(0, executable('notepad.exe.exe'))
++ call assert_equal(0, executable('shell32.dll'))
++ call assert_equal(0, executable('win.ini'))
++ elseif has('unix')
++ call assert_equal(1, executable('cat'))
++ call assert_equal(0, executable('dog'))
++ endif
++ endfunc
++
+ func Test_hostname()
+ let hostname_vim = hostname()
+ if has('unix')
+*** ../vim-8.1.0452/src/version.c 2018-10-06 15:02:53.797052261 +0200
+--- src/version.c 2018-10-06 15:15:48.630198494 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 453,
+ /**/
+
+--
+Send $25.00 for handy leaflet on how to make money by selling leaflets
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0454 b/data/vim/patches/8.1.0454
new file mode 100644
index 000000000..3df2b7ddd
--- /dev/null
+++ b/data/vim/patches/8.1.0454
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0454
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0454
+Problem: resolve() was not tested with a symlink cycle.
+Solution: Add a test. (Dominique Pelle, closes #3513)
+Files: src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0453/src/testdir/test_functions.vim 2018-10-06 15:18:41.616657339 +0200
+--- src/testdir/test_functions.vim 2018-10-06 15:41:03.832363288 +0200
+***************
+*** 190,195 ****
+--- 190,241 ----
+ call assert_fails('call strftime("%Y", [])', 'E745:')
+ endfunc
+
++ func Test_resolve()
++ if !has('unix')
++ return
++ endif
++
++ " Xlink1 -> Xlink2
++ " Xlink2 -> Xlink3
++ silent !ln -s -f Xlink2 Xlink1
++ silent !ln -s -f Xlink3 Xlink2
++ call assert_equal('Xlink3', resolve('Xlink1'))
++ call assert_equal('./Xlink3', resolve('./Xlink1'))
++ call assert_equal('Xlink3/', resolve('Xlink2/'))
++ " FIXME: these tests result in things like "Xlink2/" instead of "Xlink3/"?!
++ "call assert_equal('Xlink3/', resolve('Xlink1/'))
++ "call assert_equal('./Xlink3/', resolve('./Xlink1/'))
++ "call assert_equal(getcwd() . '/Xlink3/', resolve(getcwd() . '/Xlink1/'))
++ call assert_equal(getcwd() . '/Xlink3', resolve(getcwd() . '/Xlink1'))
++
++ " Test resolve() with a symlink cycle.
++ " Xlink1 -> Xlink2
++ " Xlink2 -> Xlink3
++ " Xlink3 -> Xlink1
++ silent !ln -s -f Xlink1 Xlink3
++ call assert_fails('call resolve("Xlink1")', 'E655:')
++ call assert_fails('call resolve("./Xlink1")', 'E655:')
++ call assert_fails('call resolve("Xlink2")', 'E655:')
++ call assert_fails('call resolve("Xlink3")', 'E655:')
++ call delete('Xlink1')
++ call delete('Xlink2')
++ call delete('Xlink3')
++
++ silent !ln -s -f Xdir//Xfile Xlink
++ call assert_equal('Xdir/Xfile', resolve('Xlink'))
++ call delete('Xlink')
++
++ silent !ln -s -f Xlink2/ Xlink1
++ call assert_equal('Xlink2', resolve('Xlink1'))
++ call assert_equal('Xlink2/', resolve('Xlink1/'))
++ call delete('Xlink1')
++
++ silent !ln -s -f ./Xlink2 Xlink1
++ call assert_equal('Xlink2', resolve('Xlink1'))
++ call assert_equal('./Xlink2', resolve('./Xlink1'))
++ call delete('Xlink1')
++ endfunc
++
+ func Test_simplify()
+ call assert_equal('', simplify(''))
+ call assert_equal('/', simplify('/'))
+*** ../vim-8.1.0453/src/version.c 2018-10-06 15:18:41.616657339 +0200
+--- src/version.c 2018-10-06 15:42:05.823641492 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 454,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+162. You go outside and look for a brightness knob to turn down the sun.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0455 b/data/vim/patches/8.1.0455
new file mode 100644
index 000000000..3aae4b76a
--- /dev/null
+++ b/data/vim/patches/8.1.0455
@@ -0,0 +1,238 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0455
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0455
+Problem: Checking for empty quickfix stack is not consistent.
+Solution: Use qf_stack_empty(). (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0454/src/quickfix.c 2018-09-28 23:09:50.558463030 +0200
+--- src/quickfix.c 2018-10-07 14:34:59.832140408 +0200
+***************
+*** 1499,1504 ****
+--- 1499,1513 ----
+ }
+
+ /*
++ * Returns TRUE if the specified quickfix/location stack is empty
++ */
++ static int
++ qf_stack_empty(qf_info_T *qi)
++ {
++ return qi == NULL || qi->qf_listcount <= 0;
++ }
++
++ /*
+ * Returns TRUE if the specified quickfix/location list is empty.
+ */
+ static int
+***************
+*** 3220,3227 ****
+ if (qi == NULL)
+ qi = &ql_info;
+
+! if (qi->qf_curlist >= qi->qf_listcount
+! || qf_list_empty(qi, qi->qf_curlist))
+ {
+ EMSG(_(e_quickfix));
+ return;
+--- 3229,3235 ----
+ if (qi == NULL)
+ qi = &ql_info;
+
+! if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+ EMSG(_(e_quickfix));
+ return;
+***************
+*** 3412,3419 ****
+ }
+ }
+
+! if (qi->qf_curlist >= qi->qf_listcount
+! || qf_list_empty(qi, qi->qf_curlist))
+ {
+ EMSG(_(e_quickfix));
+ return;
+--- 3420,3426 ----
+ }
+ }
+
+! if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ {
+ EMSG(_(e_quickfix));
+ return;
+***************
+*** 3601,3608 ****
+
+ if (is_loclist_cmd(eap->cmdidx))
+ qi = GET_LOC_LIST(curwin);
+! if (qi == NULL || (qi->qf_listcount == 0
+! && qf_list_empty(qi, qi->qf_curlist)))
+ MSG(_("No entries"));
+ else
+ for (i = 0; i < qi->qf_listcount; ++i)
+--- 3608,3614 ----
+
+ if (is_loclist_cmd(eap->cmdidx))
+ qi = GET_LOC_LIST(curwin);
+! if (qf_stack_empty(qi) || qf_list_empty(qi, qi->qf_curlist))
+ MSG(_("No entries"));
+ else
+ for (i = 0; i < qi->qf_listcount; ++i)
+***************
+*** 3830,3838 ****
+ * close the window. If a quickfix window is not open, then open
+ * it if we have errors; otherwise, leave it closed.
+ */
+! if (qi->qf_lists[qi->qf_curlist].qf_nonevalid
+! || qf_list_empty(qi, qi->qf_curlist)
+! || qi->qf_curlist >= qi->qf_listcount)
+ {
+ if (win != NULL)
+ ex_cclose(eap);
+--- 3836,3844 ----
+ * close the window. If a quickfix window is not open, then open
+ * it if we have errors; otherwise, leave it closed.
+ */
+! if (qf_stack_empty(qi)
+! || qi->qf_lists[qi->qf_curlist].qf_nonevalid
+! || qf_list_empty(qi, qi->qf_curlist))
+ {
+ if (win != NULL)
+ ex_cclose(eap);
+***************
+*** 4342,4348 ****
+ }
+
+ /* Check if there is anything to display */
+! if (qi->qf_curlist < qi->qf_listcount)
+ {
+ char_u dirname[MAXPATHL];
+
+--- 4348,4354 ----
+ }
+
+ /* Check if there is anything to display */
+! if (!qf_stack_empty(qi))
+ {
+ char_u dirname[MAXPATHL];
+
+***************
+*** 5333,5339 ****
+ if ((eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd
+ && eap->cmdidx != CMD_vimgrepadd
+ && eap->cmdidx != CMD_lvimgrepadd)
+! || qi->qf_curlist == qi->qf_listcount)
+ /* make place for a new list */
+ qf_new_list(qi, title != NULL ? title : qf_cmdtitle(*eap->cmdlinep));
+
+--- 5339,5345 ----
+ if ((eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd
+ && eap->cmdidx != CMD_vimgrepadd
+ && eap->cmdidx != CMD_lvimgrepadd)
+! || qf_stack_empty(qi))
+ /* make place for a new list */
+ qf_new_list(qi, title != NULL ? title : qf_cmdtitle(*eap->cmdlinep));
+
+***************
+*** 6107,6117 ****
+
+ flags = qf_getprop_keys2flags(what, (wp != NULL));
+
+! if (qi != NULL && qi->qf_listcount != 0)
+ qf_idx = qf_getprop_qfidx(qi, what);
+
+ /* List is not present or is empty */
+! if (qi == NULL || qi->qf_listcount == 0 || qf_idx == INVALID_QFIDX)
+ return qf_getprop_defaults(qi, flags, retdict);
+
+ qfl = &qi->qf_lists[qf_idx];
+--- 6113,6123 ----
+
+ flags = qf_getprop_keys2flags(what, (wp != NULL));
+
+! if (!qf_stack_empty(qi))
+ qf_idx = qf_getprop_qfidx(qi, what);
+
+ /* List is not present or is empty */
+! if (qf_stack_empty(qi) || qf_idx == INVALID_QFIDX)
+ return qf_getprop_defaults(qi, flags, retdict);
+
+ qfl = &qi->qf_lists[qf_idx];
+***************
+*** 6313,6319 ****
+ * stack.
+ */
+ *newlist = TRUE;
+! qf_idx = qi->qf_listcount > 0 ? qi->qf_listcount - 1 : 0;
+ }
+ else if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
+ return INVALID_QFIDX;
+--- 6319,6325 ----
+ * stack.
+ */
+ *newlist = TRUE;
+! qf_idx = qf_stack_empty(qi) ? 0 : qi->qf_listcount - 1;
+ }
+ else if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
+ return INVALID_QFIDX;
+***************
+*** 6324,6330 ****
+ && di->di_tv.vval.v_string != NULL
+ && STRCMP(di->di_tv.vval.v_string, "$") == 0)
+ {
+! if (qi->qf_listcount > 0)
+ qf_idx = qi->qf_listcount - 1;
+ else if (*newlist)
+ qf_idx = 0;
+--- 6330,6336 ----
+ && di->di_tv.vval.v_string != NULL
+ && STRCMP(di->di_tv.vval.v_string, "$") == 0)
+ {
+! if (!qf_stack_empty(qi))
+ qf_idx = qi->qf_listcount - 1;
+ else if (*newlist)
+ qf_idx = 0;
+***************
+*** 6452,6458 ****
+ int qf_idx;
+ int newlist = FALSE;
+
+! if (action == ' ' || qi->qf_curlist == qi->qf_listcount)
+ newlist = TRUE;
+
+ qf_idx = qf_setprop_get_qfidx(qi, what, action, &newlist);
+--- 6458,6464 ----
+ int qf_idx;
+ int newlist = FALSE;
+
+! if (action == ' ' || qf_stack_empty(qi))
+ newlist = TRUE;
+
+ qf_idx = qf_setprop_get_qfidx(qi, what, action, &newlist);
+*** ../vim-8.1.0454/src/version.c 2018-10-06 15:43:13.062876189 +0200
+--- src/version.c 2018-10-07 14:36:35.659323843 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 455,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+165. You have a web page burned into your glasses
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0456 b/data/vim/patches/8.1.0456
new file mode 100644
index 000000000..80c704354
--- /dev/null
+++ b/data/vim/patches/8.1.0456
@@ -0,0 +1,91 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0456
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0456
+Problem: Running test hangs when the input file is being edited.
+Solution: Use a SwapExists autocommand to ignore editing the test script.
+Files: src/testdir/Makefile, src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0455/src/testdir/Makefile 2018-09-21 16:37:20.084248861 +0200
+--- src/testdir/Makefile 2018-10-07 15:34:14.706152514 +0200
+***************
+*** 9,16 ****
+
+ SCRIPTSOURCE = ../../runtime
+
+! # Change this to empty to see the verbose output of tests.
+! REDIR_TEST_TO_NULL = > /dev/null
+
+ # Uncomment this line to use valgrind for memory leaks and extra warnings.
+ # The output goes into a file "valgrind.testN"
+--- 9,18 ----
+
+ SCRIPTSOURCE = ../../runtime
+
+! # Comment out this line to see the verbose output of tests.
+! #
+! # Catches SwapExists to avoid hanging at the ATTENTION prompt.
+! REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' > /dev/null
+
+ # Uncomment this line to use valgrind for memory leaks and extra warnings.
+ # The output goes into a file "valgrind.testN"
+*** ../vim-8.1.0455/src/testdir/runtest.vim 2018-08-19 17:03:57.365405046 +0200
+--- src/testdir/runtest.vim 2018-10-07 15:36:08.881535882 +0200
+***************
+*** 57,62 ****
+--- 57,75 ----
+ set encoding=latin1
+ endif
+
++ " REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for
++ " the test_name.vim file itself. Replace it here with a more restrictive one,
++ " so we still catch mistakes.
++ let s:test_script_fname = expand('%')
++ au! SwapExists * call HandleSwapExists()
++ func HandleSwapExists()
++ " Only ignore finding a swap file for the test script (the user might be
++ " editing it and do ":make test_name") and the output file.
++ if expand('<afile>') == 'messages' || expand('<afile>') =~ s:test_script_fname
++ let v:swapchoice = 'e'
++ endif
++ endfunc
++
+ " Avoid stopping at the "hit enter" prompt
+ set nomore
+
+***************
+*** 146,151 ****
+--- 159,165 ----
+
+ " Clear any autocommands
+ au!
++ au SwapExists * call HandleSwapExists()
+
+ " Close any extra tab pages and windows and make the current one not modified.
+ while tabpagenr('$') > 1
+*** ../vim-8.1.0455/src/version.c 2018-10-07 14:38:43.714247899 +0200
+--- src/version.c 2018-10-07 15:32:36.262911893 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 456,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+166. You have been on your computer soo long that you didn't realize
+ you had grandchildren.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0457 b/data/vim/patches/8.1.0457
new file mode 100644
index 000000000..4bb016bc7
--- /dev/null
+++ b/data/vim/patches/8.1.0457
@@ -0,0 +1,193 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0457
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0457 (after 8.1.0451)
+Problem: Win32 console: key mappings don't work.
+Solution: Use another solution for the keypad keys that doesn't break
+ mappings. Some values will be negative. (Mike Williams)
+Files: src/os_win32.c
+
+
+*** ../vim-8.1.0456/src/os_win32.c 2018-10-06 15:18:41.616657339 +0200
+--- src/os_win32.c 2018-10-07 15:49:37.060090624 +0200
+***************
+*** 852,858 ****
+ int chAlt;
+ } VirtKeyMap[] =
+ {
+! /* Key ANSI alone shift ctrl alt */
+ { VK_ESCAPE,FALSE, ESC, ESC, ESC, ESC, },
+
+ { VK_F1, TRUE, ';', 'T', '^', 'h', },
+--- 852,858 ----
+ int chAlt;
+ } VirtKeyMap[] =
+ {
+! // Key ANSI alone shift ctrl alt
+ { VK_ESCAPE,FALSE, ESC, ESC, ESC, ESC, },
+
+ { VK_F1, TRUE, ';', 'T', '^', 'h', },
+***************
+*** 865,913 ****
+ { VK_F8, TRUE, 'B', '[', 'e', 'o', },
+ { VK_F9, TRUE, 'C', '\\', 'f', 'p', },
+ { VK_F10, TRUE, 'D', ']', 'g', 'q', },
+! { VK_F11, TRUE, 0x85, 0x87, 0x89, 0x8B, },
+! { VK_F12, TRUE, 0x86, 0x88, 0x8a, 0x8c, },
+
+! { VK_HOME, TRUE, 'G', 0xc2, 'w', 0xc3, },
+! { VK_UP, TRUE, 'H', 0xc4, 0xc5, 0xc6, },
+! { VK_PRIOR, TRUE, 'I', 0xc7, 0x84, 0xc8, }, /*PgUp*/
+! { VK_LEFT, TRUE, 'K', 0xc9, 's', 0xca, },
+! { VK_RIGHT, TRUE, 'M', 0xcb, 't', 0xcc, },
+! { VK_END, TRUE, 'O', 0xcd, 'u', 0xce, },
+! { VK_DOWN, TRUE, 'P', 0xcf, 0xd0, 0xd1, },
+! { VK_NEXT, TRUE, 'Q', 0xd2, 'v', 0xd3, }, /*PgDn*/
+! { VK_INSERT,TRUE, 'R', 0xd4, 0xd5, 0xd6, },
+! { VK_DELETE,TRUE, 'S', 0xd7, 0xd8, 0xd9, },
+
+! { VK_SNAPSHOT,TRUE, 0, 0, 0, 'r', }, /*PrtScrn*/
+
+ #if 0
+! /* Most people don't have F13-F20, but what the hell... */
+! { VK_F13, TRUE, 0xda, 0xdb, 0xdc, 0xdd, },
+! { VK_F14, TRUE, 0xde, 0xdf, 0xe0, 0xe1, },
+! { VK_F15, TRUE, 0xe2, 0xe3, 0xe4, 0xe5, },
+! { VK_F16, TRUE, 0xe6, 0xe7, 0xe8, 0xe9, },
+! { VK_F17, TRUE, 0xea, 0xeb, 0xec, 0xed, },
+! { VK_F18, TRUE, 0xee, 0xef, 0xf0, 0xf1, },
+! { VK_F19, TRUE, 0xf2, 0xf3, 0xf4, 0xf5, },
+! { VK_F20, TRUE, 0xf6, 0xf7, 0xf8, 0xf9, },
+! #endif
+! { VK_ADD, TRUE, 'N', 'N', 'N', 'N', }, /* keyp '+' */
+! { VK_SUBTRACT, TRUE,'J', 'J', 'J', 'J', }, /* keyp '-' */
+! /* { VK_DIVIDE, TRUE,'N', 'N', 'N', 'N', }, keyp '/' */
+! { VK_MULTIPLY, TRUE,'7', '7', '7', '7', }, /* keyp '*' */
+!
+! { VK_NUMPAD0,TRUE, 0xda, 0xdb, 0xdc, 0xdd, },
+! { VK_NUMPAD1,TRUE, 0xde, 0xdf, 0xe0, 0xe1, },
+! { VK_NUMPAD2,TRUE, 0xe2, 0xe3, 0xe4, 0xe5, },
+! { VK_NUMPAD3,TRUE, 0xe6, 0xe7, 0xe8, 0xe9, },
+! { VK_NUMPAD4,TRUE, 0xea, 0xeb, 0xec, 0xed, },
+! { VK_NUMPAD5,TRUE, 0xee, 0xef, 0xf0, 0xf1, },
+! { VK_NUMPAD6,TRUE, 0xf2, 0xf3, 0xf4, 0xf5, },
+! { VK_NUMPAD7,TRUE, 0xf6, 0xf7, 0xf8, 0xf9, },
+! { VK_NUMPAD8,TRUE, 0xfa, 0xfb, 0xfc, 0xfd, },
+! /* Sorry, out of number space! <negri>*/
+! { VK_NUMPAD9,TRUE, 0xfe, 0xff, 0xff, 0xf7, },
+ };
+
+
+--- 865,914 ----
+ { VK_F8, TRUE, 'B', '[', 'e', 'o', },
+ { VK_F9, TRUE, 'C', '\\', 'f', 'p', },
+ { VK_F10, TRUE, 'D', ']', 'g', 'q', },
+! { VK_F11, TRUE, '\205', '\207', '\211', '\213', },
+! { VK_F12, TRUE, '\206', '\210', '\212', '\214', },
+
+! { VK_HOME, TRUE, 'G', '\302', 'w', '\303', },
+! { VK_UP, TRUE, 'H', '\304', '\305', '\306', },
+! { VK_PRIOR, TRUE, 'I', '\307', '\204', '\310', }, // PgUp
+! { VK_LEFT, TRUE, 'K', '\311', 's', '\312', },
+! { VK_RIGHT, TRUE, 'M', '\313', 't', '\314', },
+! { VK_END, TRUE, 'O', '\315', 'u', '\316', },
+! { VK_DOWN, TRUE, 'P', '\317', '\320', '\321', },
+! { VK_NEXT, TRUE, 'Q', '\322', 'v', '\323', }, // PgDn
+! { VK_INSERT,TRUE, 'R', '\324', '\325', '\326', },
+! { VK_DELETE,TRUE, 'S', '\327', '\330', '\331', },
+
+! { VK_SNAPSHOT,TRUE, 0, 0, 0, 'r', }, // PrtScrn
+
+ #if 0
+! // Most people don't have F13-F20, but what the hell...
+! { VK_F13, TRUE, '\332', '\333', '\334', '\335', },
+! { VK_F14, TRUE, '\336', '\337', '\340', '\341', },
+! { VK_F15, TRUE, '\342', '\343', '\344', '\345', },
+! { VK_F16, TRUE, '\346', '\347', '\350', '\351', },
+! { VK_F17, TRUE, '\352', '\353', '\354', '\355', },
+! { VK_F18, TRUE, '\356', '\357', '\360', '\361', },
+! { VK_F19, TRUE, '\362', '\363', '\364', '\365', },
+! { VK_F20, TRUE, '\366', '\367', '\370', '\371', },
+! #endif
+! { VK_ADD, TRUE, 'N', 'N', 'N', 'N', }, // keyp '+'
+! { VK_SUBTRACT, TRUE,'J', 'J', 'J', 'J', }, // keyp '-'
+! // { VK_DIVIDE, TRUE,'N', 'N', 'N', 'N', }, // keyp '/'
+! { VK_MULTIPLY, TRUE,'7', '7', '7', '7', }, // keyp '*'
+!
+! { VK_NUMPAD0,TRUE, '\332', '\333', '\334', '\335', },
+! { VK_NUMPAD1,TRUE, '\336', '\337', '\340', '\341', },
+! { VK_NUMPAD2,TRUE, '\342', '\343', '\344', '\345', },
+! { VK_NUMPAD3,TRUE, '\346', '\347', '\350', '\351', },
+! { VK_NUMPAD4,TRUE, '\352', '\353', '\354', '\355', },
+! { VK_NUMPAD5,TRUE, '\356', '\357', '\360', '\361', },
+! { VK_NUMPAD6,TRUE, '\362', '\363', '\364', '\365', },
+! { VK_NUMPAD7,TRUE, '\366', '\367', '\370', '\371', },
+! { VK_NUMPAD8,TRUE, '\372', '\373', '\374', '\375', },
+! // Sorry, out of number space! <negri>
+! { VK_NUMPAD9,TRUE, '\376', '\377', '\377', '\367', },
+!
+ };
+
+
+***************
+*** 1914,1924 ****
+ typeahead[typeaheadlen] = c;
+ if (ch2 != NUL)
+ {
+! if (c == K_NUL && (ch2 & 0xff00) != 0)
+ {
+! /* fAnsiKey with modifier keys */
+! typeahead[typeaheadlen + n] = (char_u)ch2;
+! n++;
+ }
+ else
+ {
+--- 1915,1938 ----
+ typeahead[typeaheadlen] = c;
+ if (ch2 != NUL)
+ {
+! if (c == K_NUL)
+ {
+! switch (ch2)
+! {
+! case (WCHAR)'\324': // SHIFT+Insert
+! case (WCHAR)'\325': // CTRL+Insert
+! case (WCHAR)'\327': // SHIFT+Delete
+! case (WCHAR)'\330': // CTRL+Delete
+! typeahead[typeaheadlen + n] = (char_u)ch2;
+! n++;
+! break;
+!
+! default:
+! typeahead[typeaheadlen + n] = 3;
+! typeahead[typeaheadlen + n + 1] = (char_u)ch2;
+! n += 2;
+! break;
+! }
+ }
+ else
+ {
+*** ../vim-8.1.0456/src/version.c 2018-10-07 15:42:04.279309175 +0200
+--- src/version.c 2018-10-07 15:48:23.012634542 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 457,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+167. You have more than 200 websites bookmarked.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0458 b/data/vim/patches/8.1.0458
new file mode 100644
index 000000000..387a61192
--- /dev/null
+++ b/data/vim/patches/8.1.0458
@@ -0,0 +1,109 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0458
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0458
+Problem: Ml_get error and crash when using "do".
+Solution: Adjust cursor position also when diffupdate is not needed.
+ (Hirohito Higashi)
+Files: src/diff.c, src/testdir/test_diffmode.vim
+
+
+*** ../vim-8.1.0457/src/diff.c 2018-09-18 21:20:22.507148523 +0200
+--- src/diff.c 2018-10-07 17:18:59.663334194 +0200
+***************
+*** 2848,2865 ****
+ theend:
+ diff_busy = FALSE;
+ if (diff_need_update)
+- {
+- diff_need_update = FALSE;
+ ex_diffupdate(NULL);
+! }
+ else
+ {
+- // Check that the cursor is on a valid character and update it's
+- // position. When there were filler lines the topline has become
+- // invalid.
+- check_cursor();
+- changed_line_abv_curs();
+-
+ // Also need to redraw the other buffers.
+ diff_redraw(FALSE);
+ apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
+--- 2848,2866 ----
+ theend:
+ diff_busy = FALSE;
+ if (diff_need_update)
+ ex_diffupdate(NULL);
+!
+! // Check that the cursor is on a valid character and update it's
+! // position. When there were filler lines the topline has become
+! // invalid.
+! check_cursor();
+! changed_line_abv_curs();
+!
+! if (diff_need_update)
+! // redraw already done by ex_diffupdate()
+! diff_need_update = FALSE;
+ else
+ {
+ // Also need to redraw the other buffers.
+ diff_redraw(FALSE);
+ apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
+*** ../vim-8.1.0457/src/testdir/test_diffmode.vim 2018-10-02 18:25:41.420867587 +0200
+--- src/testdir/test_diffmode.vim 2018-10-07 17:14:16.980965139 +0200
+***************
+*** 277,282 ****
+--- 277,304 ----
+ %bwipe!
+ endfunc
+
++ func Test_do_lastline()
++ e! one
++ call setline(1, ['1','2','3','4','5','6'])
++ diffthis
++
++ new two
++ call setline(1, ['2','4','5'])
++ diffthis
++
++ 1
++ norm dp]c
++ norm dp]c
++ wincmd w
++ call assert_equal(4, line('$'))
++ norm G
++ norm do
++ call assert_equal(3, line('$'))
++
++ windo diffoff
++ %bwipe!
++ endfunc
++
+ func Test_diffoff()
+ enew!
+ call setline(1, ['Two', 'Three'])
+*** ../vim-8.1.0457/src/version.c 2018-10-07 15:49:50.819989002 +0200
+--- src/version.c 2018-10-07 17:46:14.728013142 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 458,
+ /**/
+
+--
+"The question of whether computers can think is just like the question
+of whether submarines can swim." -- Edsger W. Dijkstra
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0459 b/data/vim/patches/8.1.0459
new file mode 100644
index 000000000..6cad6c289
--- /dev/null
+++ b/data/vim/patches/8.1.0459
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0459
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0459
+Problem: Test_executable fails when there is a dog in the system.
+Solution: Rename the dog. (Hirohito Higashi)
+Files: src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0458/src/testdir/test_functions.vim 2018-10-06 15:43:13.062876189 +0200
+--- src/testdir/test_functions.vim 2018-10-07 18:37:24.796308417 +0200
+***************
+*** 855,861 ****
+ call assert_equal(0, executable('win.ini'))
+ elseif has('unix')
+ call assert_equal(1, executable('cat'))
+! call assert_equal(0, executable('dog'))
+ endif
+ endfunc
+
+--- 855,861 ----
+ call assert_equal(0, executable('win.ini'))
+ elseif has('unix')
+ call assert_equal(1, executable('cat'))
+! call assert_equal(0, executable('nodogshere'))
+ endif
+ endfunc
+
+*** ../vim-8.1.0458/src/version.c 2018-10-07 17:46:37.699826982 +0200
+--- src/version.c 2018-10-07 18:41:07.553885998 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 459,
+ /**/
+
+--
+Apathy Error: Don't bother striking any key.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0460 b/data/vim/patches/8.1.0460
new file mode 100644
index 000000000..15d5d8617
--- /dev/null
+++ b/data/vim/patches/8.1.0460
@@ -0,0 +1,124 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0460
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0460
+Problem: assert_fails() does not take a message argument
+Solution: Add the argument.
+Files: src/evalfunc.c, src/eval.c, src/testdir/test_assert.vim
+
+
+*** ../vim-8.1.0459/src/evalfunc.c 2018-10-02 16:23:55.323037143 +0200
+--- src/evalfunc.c 2018-10-07 19:19:21.730142635 +0200
+***************
+*** 512,518 ****
+ {"assert_equal", 2, 3, f_assert_equal},
+ {"assert_equalfile", 2, 2, f_assert_equalfile},
+ {"assert_exception", 1, 2, f_assert_exception},
+! {"assert_fails", 1, 2, f_assert_fails},
+ {"assert_false", 1, 2, f_assert_false},
+ {"assert_inrange", 3, 4, f_assert_inrange},
+ {"assert_match", 2, 3, f_assert_match},
+--- 512,518 ----
+ {"assert_equal", 2, 3, f_assert_equal},
+ {"assert_equalfile", 2, 2, f_assert_equalfile},
+ {"assert_exception", 1, 2, f_assert_exception},
+! {"assert_fails", 1, 3, f_assert_fails},
+ {"assert_false", 1, 2, f_assert_false},
+ {"assert_inrange", 3, 4, f_assert_inrange},
+ {"assert_match", 2, 3, f_assert_match},
+***************
+*** 1507,1513 ****
+ }
+
+ /*
+! * "assert_fails(cmd [, error])" function
+ */
+ static void
+ f_assert_fails(typval_T *argvars, typval_T *rettv)
+--- 1507,1513 ----
+ }
+
+ /*
+! * "assert_fails(cmd [, error[, msg]])" function
+ */
+ static void
+ f_assert_fails(typval_T *argvars, typval_T *rettv)
+*** ../vim-8.1.0459/src/eval.c 2018-09-30 21:43:17.179693404 +0200
+--- src/eval.c 2018-10-07 19:41:59.353098530 +0200
+***************
+*** 9041,9046 ****
+--- 9041,9048 ----
+ char_u *cmd = get_tv_string_chk(&argvars[0]);
+ garray_T ga;
+ int ret = 0;
++ char_u numbuf[NUMBUFLEN];
++ char_u *tofree;
+
+ called_emsg = FALSE;
+ suppress_errthrow = TRUE;
+***************
+*** 9050,9056 ****
+ {
+ prepare_assert_error(&ga);
+ ga_concat(&ga, (char_u *)"command did not fail: ");
+! ga_concat(&ga, cmd);
+ assert_error(&ga);
+ ga_clear(&ga);
+ ret = 1;
+--- 9052,9065 ----
+ {
+ prepare_assert_error(&ga);
+ ga_concat(&ga, (char_u *)"command did not fail: ");
+! if (argvars[1].v_type != VAR_UNKNOWN
+! && argvars[2].v_type != VAR_UNKNOWN)
+! {
+! ga_concat(&ga, echo_string(&argvars[2], &tofree, numbuf, 0));
+! vim_free(tofree);
+! }
+! else
+! ga_concat(&ga, cmd);
+ assert_error(&ga);
+ ga_clear(&ga);
+ ret = 1;
+*** ../vim-8.1.0459/src/testdir/test_assert.vim 2018-06-12 14:58:35.566840630 +0200
+--- src/testdir/test_assert.vim 2018-10-07 20:13:06.084010801 +0200
+***************
+*** 152,157 ****
+--- 152,165 ----
+ call assert_equal(1, assert_fails('xxx', {}))
+ call assert_match("Expected {} but got 'E731:", v:errors[0])
+ call remove(v:errors, 0)
++
++ call assert_equal(1, assert_fails('xxx', {}, 'stupid'))
++ call assert_match("stupid: Expected {} but got 'E731:", v:errors[0])
++ call remove(v:errors, 0)
++
++ call assert_equal(1, assert_fails('echo', '', 'echo command'))
++ call assert_match("command did not fail: echo command", v:errors[0])
++ call remove(v:errors, 0)
+ endfunc
+
+ func Test_assert_beeps()
+*** ../vim-8.1.0459/src/version.c 2018-10-07 18:43:02.528682005 +0200
+--- src/version.c 2018-10-07 20:06:14.534617784 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 460,
+ /**/
+
+--
+Did you ever see a "Hit any key to continue" message in a music piece?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0461 b/data/vim/patches/8.1.0461
new file mode 100644
index 000000000..bf1088431
--- /dev/null
+++ b/data/vim/patches/8.1.0461
@@ -0,0 +1,4568 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0461
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0461
+Problem: Quickfix code uses too many /* */ comments.
+Solution: Change to // comments. (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0460/src/quickfix.c 2018-10-07 14:38:43.714247899 +0200
+--- src/quickfix.c 2018-10-07 20:20:56.652633675 +0200
+***************
+*** 27,46 ****
+ typedef struct qfline_S qfline_T;
+ struct qfline_S
+ {
+! qfline_T *qf_next; /* pointer to next error in the list */
+! qfline_T *qf_prev; /* pointer to previous error in the list */
+! linenr_T qf_lnum; /* line number where the error occurred */
+! int qf_fnum; /* file number for the line */
+! int qf_col; /* column where the error occurred */
+! int qf_nr; /* error number */
+! char_u *qf_module; /* module name for this error */
+! char_u *qf_pattern; /* search pattern for the error */
+! char_u *qf_text; /* description of the error */
+! char_u qf_viscol; /* set to TRUE if qf_col is screen column */
+! char_u qf_cleared; /* set to TRUE if line has been deleted */
+! char_u qf_type; /* type of the error (mostly 'E'); 1 for
+! :helpgrep */
+! char_u qf_valid; /* valid error message detected */
+ };
+
+ /*
+--- 27,46 ----
+ typedef struct qfline_S qfline_T;
+ struct qfline_S
+ {
+! qfline_T *qf_next; // pointer to next error in the list
+! qfline_T *qf_prev; // pointer to previous error in the list
+! linenr_T qf_lnum; // line number where the error occurred
+! int qf_fnum; // file number for the line
+! int qf_col; // column where the error occurred
+! int qf_nr; // error number
+! char_u *qf_module; // module name for this error
+! char_u *qf_pattern; // search pattern for the error
+! char_u *qf_text; // description of the error
+! char_u qf_viscol; // set to TRUE if qf_col is screen column
+! char_u qf_cleared; // set to TRUE if line has been deleted
+! char_u qf_type; // type of the error (mostly 'E'); 1 for
+! // :helpgrep
+! char_u qf_valid; // valid error message detected
+ };
+
+ /*
+***************
+*** 60,75 ****
+ */
+ typedef struct qf_list_S
+ {
+! int_u qf_id; /* Unique identifier for this list */
+! qfline_T *qf_start; /* pointer to the first error */
+! qfline_T *qf_last; /* pointer to the last error */
+! qfline_T *qf_ptr; /* pointer to the current error */
+! int qf_count; /* number of errors (0 means empty list) */
+! int qf_index; /* current index in the error list */
+! int qf_nonevalid; /* TRUE if not a single valid entry found */
+! char_u *qf_title; /* title derived from the command that created
+! * the error list or set by setqflist */
+! typval_T *qf_ctx; /* context set by setqflist/setloclist */
+
+ struct dir_stack_T *qf_dir_stack;
+ char_u *qf_directory;
+--- 60,75 ----
+ */
+ typedef struct qf_list_S
+ {
+! int_u qf_id; // Unique identifier for this list
+! qfline_T *qf_start; // pointer to the first error
+! qfline_T *qf_last; // pointer to the last error
+! qfline_T *qf_ptr; // pointer to the current error
+! int qf_count; // number of errors (0 means empty list)
+! int qf_index; // current index in the error list
+! int qf_nonevalid; // TRUE if not a single valid entry found
+! char_u *qf_title; // title derived from the command that created
+! // the error list or set by setqflist
+! typval_T *qf_ctx; // context set by setqflist/setloclist
+
+ struct dir_stack_T *qf_dir_stack;
+ char_u *qf_directory;
+***************
+*** 87,108 ****
+ */
+ struct qf_info_S
+ {
+! /*
+! * Count of references to this list. Used only for location lists.
+! * When a location list window reference this list, qf_refcount
+! * will be 2. Otherwise, qf_refcount will be 1. When qf_refcount
+! * reaches 0, the list is freed.
+! */
+ int qf_refcount;
+! int qf_listcount; /* current number of lists */
+! int qf_curlist; /* current error list */
+ qf_list_T qf_lists[LISTCOUNT];
+ };
+
+! static qf_info_T ql_info; /* global quickfix list */
+! static int_u last_qf_id = 0; /* Last used quickfix list id */
+
+! #define FMT_PATTERNS 11 /* maximum number of % recognized */
+
+ /*
+ * Structure used to hold the info of one part of 'errorformat'
+--- 87,106 ----
+ */
+ struct qf_info_S
+ {
+! // Count of references to this list. Used only for location lists.
+! // When a location list window reference this list, qf_refcount
+! // will be 2. Otherwise, qf_refcount will be 1. When qf_refcount
+! // reaches 0, the list is freed.
+ int qf_refcount;
+! int qf_listcount; // current number of lists
+! int qf_curlist; // current error list
+ qf_list_T qf_lists[LISTCOUNT];
+ };
+
+! static qf_info_T ql_info; // global quickfix list
+! static int_u last_qf_id = 0; // Last used quickfix list id
+
+! #define FMT_PATTERNS 11 // maximum number of % recognized
+
+ /*
+ * Structure used to hold the info of one part of 'errorformat'
+***************
+*** 110,138 ****
+ typedef struct efm_S efm_T;
+ struct efm_S
+ {
+! regprog_T *prog; /* pre-formatted part of 'errorformat' */
+! efm_T *next; /* pointer to next (NULL if last) */
+! char_u addr[FMT_PATTERNS]; /* indices of used % patterns */
+! char_u prefix; /* prefix of this format line: */
+! /* 'D' enter directory */
+! /* 'X' leave directory */
+! /* 'A' start of multi-line message */
+! /* 'E' error message */
+! /* 'W' warning message */
+! /* 'I' informational message */
+! /* 'C' continuation line */
+! /* 'Z' end of multi-line message */
+! /* 'G' general, unspecific message */
+! /* 'P' push file (partial) message */
+! /* 'Q' pop/quit file (partial) message */
+! /* 'O' overread (partial) message */
+! char_u flags; /* additional flags given in prefix */
+! /* '-' do not include this line */
+! /* '+' include whole line in message */
+! int conthere; /* %> used */
+ };
+
+! static efm_T *fmt_start = NULL; /* cached across qf_parse_line() calls */
+
+ static void qf_new_list(qf_info_T *qi, char_u *qf_title);
+ static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, char_u *module, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
+--- 108,136 ----
+ typedef struct efm_S efm_T;
+ struct efm_S
+ {
+! regprog_T *prog; // pre-formatted part of 'errorformat'
+! efm_T *next; // pointer to next (NULL if last)
+! char_u addr[FMT_PATTERNS]; // indices of used % patterns
+! char_u prefix; // prefix of this format line:
+! // 'D' enter directory
+! // 'X' leave directory
+! // 'A' start of multi-line message
+! // 'E' error message
+! // 'W' warning message
+! // 'I' informational message
+! // 'C' continuation line
+! // 'Z' end of multi-line message
+! // 'G' general, unspecific message
+! // 'P' push file (partial) message
+! // 'Q' pop/quit file (partial) message
+! // 'O' overread (partial) message
+! char_u flags; // additional flags given in prefix
+! // '-' do not include this line
+! // '+' include whole line in message
+! int conthere; // %> used
+ };
+
+! static efm_T *fmt_start = NULL; // cached across qf_parse_line() calls
+
+ static void qf_new_list(qf_info_T *qi, char_u *qf_title);
+ static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, char_u *module, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
+***************
+*** 153,161 ****
+ static void unload_dummy_buffer(buf_T *buf, char_u *dirname_start);
+ static qf_info_T *ll_get_or_alloc_list(win_T *);
+
+! /* Quickfix window check helper macro */
+ #define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL)
+! /* Location list window check helper macro */
+ #define IS_LL_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL)
+
+ // Quickfix and location list stack check helper macros
+--- 151,159 ----
+ static void unload_dummy_buffer(buf_T *buf, char_u *dirname_start);
+ static qf_info_T *ll_get_or_alloc_list(win_T *);
+
+! // Quickfix window check helper macro
+ #define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL)
+! // Location list window check helper macro
+ #define IS_LL_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL)
+
+ // Quickfix and location list stack check helper macros
+***************
+*** 189,195 ****
+ char *pattern;
+ } fmt_pat[FMT_PATTERNS] =
+ {
+! {'f', ".\\+"}, /* only used when at end */
+ {'n', "\\d\\+"},
+ {'l', "\\d\\+"},
+ {'c', "\\d\\+"},
+--- 187,193 ----
+ char *pattern;
+ } fmt_pat[FMT_PATTERNS] =
+ {
+! {'f', ".\\+"}, // only used when at end
+ {'n', "\\d\\+"},
+ {'l', "\\d\\+"},
+ {'c', "\\d\\+"},
+***************
+*** 221,227 ****
+
+ if (efminfo->addr[idx])
+ {
+! /* Each errorformat pattern can occur only once */
+ sprintf((char *)errmsg,
+ _("E372: Too many %%%c in format string"), *efmpat);
+ EMSG(errmsg);
+--- 219,225 ----
+
+ if (efminfo->addr[idx])
+ {
+! // Each errorformat pattern can occur only once
+ sprintf((char *)errmsg,
+ _("E372: Too many %%%c in format string"), *efmpat);
+ EMSG(errmsg);
+***************
+*** 243,251 ****
+ #ifdef BACKSLASH_IN_FILENAME
+ if (*efmpat == 'f')
+ {
+! /* Also match "c:" in the file name, even when
+! * checking for a colon next: "%f:".
+! * "\%(\a:\)\=" */
+ STRCPY(regpat, "\\%(\\a:\\)\\=");
+ regpat += 10;
+ }
+--- 241,249 ----
+ #ifdef BACKSLASH_IN_FILENAME
+ if (*efmpat == 'f')
+ {
+! // Also match "c:" in the file name, even when
+! // checking for a colon next: "%f:".
+! // "\%(\a:\)\="
+ STRCPY(regpat, "\\%(\\a:\\)\\=");
+ regpat += 10;
+ }
+***************
+*** 254,271 ****
+ {
+ if (efmpat[1] != '\\' && efmpat[1] != '%')
+ {
+! /* A file name may contain spaces, but this isn't
+! * in "\f". For "%f:%l:%m" there may be a ":" in
+! * the file name. Use ".\{-1,}x" instead (x is
+! * the next character), the requirement that :999:
+! * follows should work. */
+ STRCPY(regpat, ".\\{-1,}");
+ regpat += 7;
+ }
+ else
+ {
+! /* File name followed by '\\' or '%': include as
+! * many file name chars as possible. */
+ STRCPY(regpat, "\\f\\+");
+ regpat += 4;
+ }
+--- 252,269 ----
+ {
+ if (efmpat[1] != '\\' && efmpat[1] != '%')
+ {
+! // A file name may contain spaces, but this isn't
+! // in "\f". For "%f:%l:%m" there may be a ":" in
+! // the file name. Use ".\{-1,}x" instead (x is
+! // the next character), the requirement that :999:
+! // follows should work.
+ STRCPY(regpat, ".\\{-1,}");
+ regpat += 7;
+ }
+ else
+ {
+! // File name followed by '\\' or '%': include as
+! // many file name chars as possible.
+ STRCPY(regpat, "\\f\\+");
+ regpat += 4;
+ }
+***************
+*** 298,313 ****
+
+ if (*efmp == '[' || *efmp == '\\')
+ {
+! if ((*regpat++ = *efmp) == '[') /* %*[^a-z0-9] etc. */
+ {
+ if (efmp[1] == '^')
+ *regpat++ = *++efmp;
+ if (efmp < efm + len)
+ {
+! *regpat++ = *++efmp; /* could be ']' */
+ while (efmp < efm + len
+ && (*regpat++ = *++efmp) != ']')
+! /* skip */;
+ if (efmp == efm + len)
+ {
+ EMSG(_("E374: Missing ] in format string"));
+--- 296,311 ----
+
+ if (*efmp == '[' || *efmp == '\\')
+ {
+! if ((*regpat++ = *efmp) == '[') // %*[^a-z0-9] etc.
+ {
+ if (efmp[1] == '^')
+ *regpat++ = *++efmp;
+ if (efmp < efm + len)
+ {
+! *regpat++ = *++efmp; // could be ']'
+ while (efmp < efm + len
+ && (*regpat++ = *++efmp) != ']')
+! // skip ;
+ if (efmp == efm + len)
+ {
+ EMSG(_("E374: Missing ] in format string"));
+***************
+*** 315,328 ****
+ }
+ }
+ }
+! else if (efmp < efm + len) /* %*\D, %*\s etc. */
+ *regpat++ = *++efmp;
+ *regpat++ = '\\';
+ *regpat++ = '+';
+ }
+ else
+ {
+! /* TODO: scanf()-like: %*ud, %*3c, %*f, ... ? */
+ sprintf((char *)errmsg,
+ _("E375: Unsupported %%%c in format string"), *efmp);
+ EMSG(errmsg);
+--- 313,326 ----
+ }
+ }
+ }
+! else if (efmp < efm + len) // %*\D, %*\s etc.
+ *regpat++ = *++efmp;
+ *regpat++ = '\\';
+ *regpat++ = '+';
+ }
+ else
+ {
+! // TODO: scanf()-like: %*ud, %*3c, %*f, ... ?
+ sprintf((char *)errmsg,
+ _("E375: Unsupported %%%c in format string"), *efmp);
+ EMSG(errmsg);
+***************
+*** 374,382 ****
+ int round;
+ int idx = 0;
+
+! /*
+! * Build a regexp pattern for a 'errorformat' option part
+! */
+ ptr = regpat;
+ *ptr++ = '^';
+ round = 0;
+--- 372,378 ----
+ int round;
+ int idx = 0;
+
+! // Build a regexp pattern for a 'errorformat' option part
+ ptr = regpat;
+ *ptr++ = '^';
+ round = 0;
+***************
+*** 404,420 ****
+ return FAIL;
+ }
+ else if (vim_strchr((char_u *)"%\\.^$~[", *efmp) != NULL)
+! *ptr++ = *efmp; /* regexp magic characters */
+ else if (*efmp == '#')
+ *ptr++ = '*';
+ else if (*efmp == '>')
+ fmt_ptr->conthere = TRUE;
+! else if (efmp == efm + 1) /* analyse prefix */
+ {
+! /*
+! * prefix is allowed only at the beginning of the errorformat
+! * option part
+! */
+ efmp = efm_analyze_prefix(efmp, fmt_ptr, errmsg);
+ if (efmp == NULL)
+ return FAIL;
+--- 400,414 ----
+ return FAIL;
+ }
+ else if (vim_strchr((char_u *)"%\\.^$~[", *efmp) != NULL)
+! *ptr++ = *efmp; // regexp magic characters
+ else if (*efmp == '#')
+ *ptr++ = '*';
+ else if (*efmp == '>')
+ fmt_ptr->conthere = TRUE;
+! else if (efmp == efm + 1) // analyse prefix
+ {
+! // prefix is allowed only at the beginning of the errorformat
+! // option part
+ efmp = efm_analyze_prefix(efmp, fmt_ptr, errmsg);
+ if (efmp == NULL)
+ return FAIL;
+***************
+*** 427,438 ****
+ return FAIL;
+ }
+ }
+! else /* copy normal character */
+ {
+ if (*efmp == '\\' && efmp + 1 < efm + len)
+ ++efmp;
+ else if (vim_strchr((char_u *)".*^$~[", *efmp) != NULL)
+! *ptr++ = '\\'; /* escape regexp atoms */
+ if (*efmp)
+ *ptr++ = *efmp;
+ }
+--- 421,432 ----
+ return FAIL;
+ }
+ }
+! else // copy normal character
+ {
+ if (*efmp == '\\' && efmp + 1 < efm + len)
+ ++efmp;
+ else if (vim_strchr((char_u *)".*^$~[", *efmp) != NULL)
+! *ptr++ = '\\'; // escape regexp atoms
+ if (*efmp)
+ *ptr++ = *efmp;
+ }
+***************
+*** 474,482 ****
+ for (i = FMT_PATTERNS; i > 0; )
+ sz += (int)STRLEN(fmt_pat[--i].pattern);
+ #ifdef BACKSLASH_IN_FILENAME
+! sz += 12; /* "%f" can become twelve chars longer (see efm_to_regpat) */
+ #else
+! sz += 2; /* "%f" can become two chars longer */
+ #endif
+
+ return sz;
+--- 468,476 ----
+ for (i = FMT_PATTERNS; i > 0; )
+ sz += (int)STRLEN(fmt_pat[--i].pattern);
+ #ifdef BACKSLASH_IN_FILENAME
+! sz += 12; // "%f" can become twelve chars longer (see efm_to_regpat)
+ #else
+! sz += 2; // "%f" can become two chars longer
+ #endif
+
+ return sz;
+***************
+*** 519,566 ****
+ if (errmsg == NULL)
+ goto parse_efm_end;
+
+! /*
+! * Each part of the format string is copied and modified from errorformat
+! * to regex prog. Only a few % characters are allowed.
+! */
+!
+! /*
+! * Get some space to modify the format string into.
+! */
+ sz = efm_regpat_bufsz(efm);
+ if ((fmtstr = alloc(sz)) == NULL)
+ goto parse_efm_error;
+
+ while (efm[0] != NUL)
+ {
+! /*
+! * Allocate a new eformat structure and put it at the end of the list
+! */
+ fmt_ptr = (efm_T *)alloc_clear((unsigned)sizeof(efm_T));
+ if (fmt_ptr == NULL)
+ goto parse_efm_error;
+! if (fmt_first == NULL) /* first one */
+ fmt_first = fmt_ptr;
+ else
+ fmt_last->next = fmt_ptr;
+ fmt_last = fmt_ptr;
+
+! /*
+! * Isolate one part in the 'errorformat' option
+! */
+ len = efm_option_part_len(efm);
+
+ if (efm_to_regpat(efm, len, fmt_ptr, fmtstr, errmsg) == FAIL)
+ goto parse_efm_error;
+ if ((fmt_ptr->prog = vim_regcomp(fmtstr, RE_MAGIC + RE_STRING)) == NULL)
+ goto parse_efm_error;
+! /*
+! * Advance to next part
+! */
+! efm = skip_to_option_part(efm + len); /* skip comma and spaces */
+ }
+
+! if (fmt_first == NULL) /* nothing found */
+ EMSG(_("E378: 'errorformat' contains no pattern"));
+
+ goto parse_efm_end;
+--- 513,550 ----
+ if (errmsg == NULL)
+ goto parse_efm_end;
+
+! // Each part of the format string is copied and modified from errorformat
+! // to regex prog. Only a few % characters are allowed.
+!
+! // Get some space to modify the format string into.
+ sz = efm_regpat_bufsz(efm);
+ if ((fmtstr = alloc(sz)) == NULL)
+ goto parse_efm_error;
+
+ while (efm[0] != NUL)
+ {
+! // Allocate a new eformat structure and put it at the end of the list
+ fmt_ptr = (efm_T *)alloc_clear((unsigned)sizeof(efm_T));
+ if (fmt_ptr == NULL)
+ goto parse_efm_error;
+! if (fmt_first == NULL) // first one
+ fmt_first = fmt_ptr;
+ else
+ fmt_last->next = fmt_ptr;
+ fmt_last = fmt_ptr;
+
+! // Isolate one part in the 'errorformat' option
+ len = efm_option_part_len(efm);
+
+ if (efm_to_regpat(efm, len, fmt_ptr, fmtstr, errmsg) == FAIL)
+ goto parse_efm_error;
+ if ((fmt_ptr->prog = vim_regcomp(fmtstr, RE_MAGIC + RE_STRING)) == NULL)
+ goto parse_efm_error;
+! // Advance to next part
+! efm = skip_to_option_part(efm + len); // skip comma and spaces
+ }
+
+! if (fmt_first == NULL) // nothing found
+ EMSG(_("E378: 'errorformat' contains no pattern"));
+
+ goto parse_efm_end;
+***************
+*** 611,620 ****
+ {
+ char_u *p;
+
+! /*
+! * If the line exceeds LINE_MAXLEN exclude the last
+! * byte since it's not a NL character.
+! */
+ state->linelen = newsz > LINE_MAXLEN ? LINE_MAXLEN - 1 : newsz;
+ if (state->growbuf == NULL)
+ {
+--- 595,602 ----
+ {
+ char_u *p;
+
+! // If the line exceeds LINE_MAXLEN exclude the last
+! // byte since it's not a NL character.
+ state->linelen = newsz > LINE_MAXLEN ? LINE_MAXLEN - 1 : newsz;
+ if (state->growbuf == NULL)
+ {
+***************
+*** 639,650 ****
+ static int
+ qf_get_next_str_line(qfstate_T *state)
+ {
+! /* Get the next line from the supplied string */
+ char_u *p_str = state->p_str;
+ char_u *p;
+ int len;
+
+! if (*p_str == NUL) /* Reached the end of the string */
+ return QF_END_OF_INPUT;
+
+ p = vim_strchr(p_str, '\n');
+--- 621,632 ----
+ static int
+ qf_get_next_str_line(qfstate_T *state)
+ {
+! // Get the next line from the supplied string
+ char_u *p_str = state->p_str;
+ char_u *p;
+ int len;
+
+! if (*p_str == NUL) // Reached the end of the string
+ return QF_END_OF_INPUT;
+
+ p = vim_strchr(p_str, '\n');
+***************
+*** 666,675 ****
+ }
+ vim_strncpy(state->linebuf, p_str, state->linelen);
+
+! /*
+! * Increment using len in order to discard the rest of the
+! * line if it exceeds LINE_MAXLEN.
+! */
+ p_str += len;
+ state->p_str = p_str;
+
+--- 648,655 ----
+ }
+ vim_strncpy(state->linebuf, p_str, state->linelen);
+
+! // Increment using len in order to discard the rest of the
+! // line if it exceeds LINE_MAXLEN.
+ p_str += len;
+ state->p_str = p_str;
+
+***************
+*** 688,696 ****
+ while (p_li != NULL
+ && (p_li->li_tv.v_type != VAR_STRING
+ || p_li->li_tv.vval.v_string == NULL))
+! p_li = p_li->li_next; /* Skip non-string items */
+
+! if (p_li == NULL) /* End of the list */
+ {
+ state->p_li = NULL;
+ return QF_END_OF_INPUT;
+--- 668,676 ----
+ while (p_li != NULL
+ && (p_li->li_tv.v_type != VAR_STRING
+ || p_li->li_tv.vval.v_string == NULL))
+! p_li = p_li->li_next; // Skip non-string items
+
+! if (p_li == NULL) // End of the list
+ {
+ state->p_li = NULL;
+ return QF_END_OF_INPUT;
+***************
+*** 711,717 ****
+
+ vim_strncpy(state->linebuf, p_li->li_tv.vval.v_string, state->linelen);
+
+! state->p_li = p_li->li_next; /* next item */
+ return QF_OK;
+ }
+
+--- 691,697 ----
+
+ vim_strncpy(state->linebuf, p_li->li_tv.vval.v_string, state->linelen);
+
+! state->p_li = p_li->li_next; // next item
+ return QF_OK;
+ }
+
+***************
+*** 724,730 ****
+ char_u *p_buf = NULL;
+ int len;
+
+! /* Get the next line from the supplied buffer */
+ if (state->buflnum > state->lnumlast)
+ return QF_END_OF_INPUT;
+
+--- 704,710 ----
+ char_u *p_buf = NULL;
+ int len;
+
+! // Get the next line from the supplied buffer
+ if (state->buflnum > state->lnumlast)
+ return QF_END_OF_INPUT;
+
+***************
+*** 764,773 ****
+ state->linelen = (int)STRLEN(IObuff);
+ if (state->linelen == IOSIZE - 1 && !(IObuff[state->linelen - 1] == '\n'))
+ {
+! /*
+! * The current line exceeds IObuff, continue reading using
+! * growbuf until EOL or LINE_MAXLEN bytes is read.
+! */
+ if (state->growbuf == NULL)
+ {
+ state->growbufsiz = 2 * (IOSIZE - 1);
+--- 744,751 ----
+ state->linelen = (int)STRLEN(IObuff);
+ if (state->linelen == IOSIZE - 1 && !(IObuff[state->linelen - 1] == '\n'))
+ {
+! // The current line exceeds IObuff, continue reading using
+! // growbuf until EOL or LINE_MAXLEN bytes is read.
+ if (state->growbuf == NULL)
+ {
+ state->growbufsiz = 2 * (IOSIZE - 1);
+***************
+*** 776,782 ****
+ return QF_NOMEM;
+ }
+
+! /* Copy the read part of the line, excluding null-terminator */
+ memcpy(state->growbuf, IObuff, IOSIZE - 1);
+ growbuflen = state->linelen;
+
+--- 754,760 ----
+ return QF_NOMEM;
+ }
+
+! // Copy the read part of the line, excluding null-terminator
+ memcpy(state->growbuf, IObuff, IOSIZE - 1);
+ growbuflen = state->linelen;
+
+***************
+*** 806,816 ****
+
+ while (discard)
+ {
+! /*
+! * The current line is longer than LINE_MAXLEN, continue
+! * reading but discard everything until EOL or EOF is
+! * reached.
+! */
+ if (fgets((char *)IObuff, IOSIZE, state->fd) == NULL
+ || (int)STRLEN(IObuff) < IOSIZE - 1
+ || IObuff[IOSIZE - 1] == '\n')
+--- 784,792 ----
+
+ while (discard)
+ {
+! // The current line is longer than LINE_MAXLEN, continue
+! // reading but discard everything until EOL or EOF is
+! // reached.
+ if (fgets((char *)IObuff, IOSIZE, state->fd) == NULL
+ || (int)STRLEN(IObuff) < IOSIZE - 1
+ || IObuff[IOSIZE - 1] == '\n')
+***************
+*** 824,830 ****
+ state->linebuf = IObuff;
+
+ #ifdef FEAT_MBYTE
+! /* Convert a line if it contains a non-ASCII character. */
+ if (state->vc.vc_type != CONV_NONE && has_non_ascii(state->linebuf))
+ {
+ char_u *line;
+--- 800,806 ----
+ state->linebuf = IObuff;
+
+ #ifdef FEAT_MBYTE
+! // Convert a line if it contains a non-ASCII character.
+ if (state->vc.vc_type != CONV_NONE && has_non_ascii(state->linebuf))
+ {
+ char_u *line;
+***************
+*** 864,887 ****
+ if (state->tv != NULL)
+ {
+ if (state->tv->v_type == VAR_STRING)
+! /* Get the next line from the supplied string */
+ status = qf_get_next_str_line(state);
+ else if (state->tv->v_type == VAR_LIST)
+! /* Get the next line from the supplied list */
+ status = qf_get_next_list_line(state);
+ }
+ else
+! /* Get the next line from the supplied buffer */
+ status = qf_get_next_buf_line(state);
+ }
+ else
+! /* Get the next line from the supplied file */
+ status = qf_get_next_file_line(state);
+
+ if (status != QF_OK)
+ return status;
+
+! /* remove newline/CR from the line */
+ if (state->linelen > 0 && state->linebuf[state->linelen - 1] == '\n')
+ {
+ state->linebuf[state->linelen - 1] = NUL;
+--- 840,863 ----
+ if (state->tv != NULL)
+ {
+ if (state->tv->v_type == VAR_STRING)
+! // Get the next line from the supplied string
+ status = qf_get_next_str_line(state);
+ else if (state->tv->v_type == VAR_LIST)
+! // Get the next line from the supplied list
+ status = qf_get_next_list_line(state);
+ }
+ else
+! // Get the next line from the supplied buffer
+ status = qf_get_next_buf_line(state);
+ }
+ else
+! // Get the next line from the supplied file
+ status = qf_get_next_file_line(state);
+
+ if (status != QF_OK)
+ return status;
+
+! // remove newline/CR from the line
+ if (state->linelen > 0 && state->linebuf[state->linelen - 1] == '\n')
+ {
+ state->linebuf[state->linelen - 1] = NUL;
+***************
+*** 924,939 ****
+ if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL)
+ return QF_FAIL;
+
+! /* Expand ~/file and $HOME/file to full path. */
+ c = *rmp->endp[midx];
+ *rmp->endp[midx] = NUL;
+ expand_env(rmp->startp[midx], fields->namebuf, CMDBUFFSIZE);
+ *rmp->endp[midx] = c;
+
+! /*
+! * For separate filename patterns (%O, %P and %Q), the specified file
+! * should exist.
+! */
+ if (vim_strchr((char_u *)"OPQ", prefix) != NULL
+ && mch_getperm(fields->namebuf) == -1)
+ return QF_FAIL;
+--- 900,913 ----
+ if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL)
+ return QF_FAIL;
+
+! // Expand ~/file and $HOME/file to full path.
+ c = *rmp->endp[midx];
+ *rmp->endp[midx] = NUL;
+ expand_env(rmp->startp[midx], fields->namebuf, CMDBUFFSIZE);
+ *rmp->endp[midx] = c;
+
+! // For separate filename patterns (%O, %P and %Q), the specified file
+! // should exist.
+ if (vim_strchr((char_u *)"OPQ", prefix) != NULL
+ && mch_getperm(fields->namebuf) == -1)
+ return QF_FAIL;
+***************
+*** 1004,1010 ****
+
+ if (linelen >= fields->errmsglen)
+ {
+! /* linelen + null terminator */
+ if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL)
+ return QF_NOMEM;
+ fields->errmsg = p;
+--- 978,984 ----
+
+ if (linelen >= fields->errmsglen)
+ {
+! // linelen + null terminator
+ if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL)
+ return QF_NOMEM;
+ fields->errmsg = p;
+***************
+*** 1029,1035 ****
+ len = (int)(rmp->endp[midx] - rmp->startp[midx]);
+ if (len >= fields->errmsglen)
+ {
+! /* len + null terminator */
+ if ((p = vim_realloc(fields->errmsg, len + 1)) == NULL)
+ return QF_NOMEM;
+ fields->errmsg = p;
+--- 1003,1009 ----
+ len = (int)(rmp->endp[midx] - rmp->startp[midx]);
+ if (len >= fields->errmsglen)
+ {
+! // len + null terminator
+ if ((p = vim_realloc(fields->errmsg, len + 1)) == NULL)
+ return QF_NOMEM;
+ fields->errmsg = p;
+***************
+*** 1181,1207 ****
+ fields->type = idx;
+ else
+ fields->type = 0;
+! /*
+! * Extract error message data from matched line.
+! * We check for an actual submatch, because "\[" and "\]" in
+! * the 'errorformat' may cause the wrong submatch to be used.
+! */
+ for (i = 0; i < FMT_PATTERNS; i++)
+ {
+ status = QF_OK;
+ midx = (int)fmt_ptr->addr[i];
+! if (i == 0 && midx > 0) /* %f */
+ status = qf_parse_fmt_f(regmatch, midx, fields, idx);
+ else if (i == 5)
+ {
+! if (fmt_ptr->flags == '+' && !qf_multiscan) /* %+ */
+ status = qf_parse_fmt_plus(linebuf, linelen, fields);
+! else if (midx > 0) /* %m */
+ status = qf_parse_fmt_m(regmatch, midx, fields);
+ }
+! else if (i == 6 && midx > 0) /* %r */
+ status = qf_parse_fmt_r(regmatch, midx, tail);
+! else if (midx > 0) /* others */
+ status = (qf_parse_fmt[i])(regmatch, midx, fields);
+
+ if (status != QF_OK)
+--- 1155,1180 ----
+ fields->type = idx;
+ else
+ fields->type = 0;
+!
+! // Extract error message data from matched line.
+! // We check for an actual submatch, because "\[" and "\]" in
+! // the 'errorformat' may cause the wrong submatch to be used.
+ for (i = 0; i < FMT_PATTERNS; i++)
+ {
+ status = QF_OK;
+ midx = (int)fmt_ptr->addr[i];
+! if (i == 0 && midx > 0) // %f
+ status = qf_parse_fmt_f(regmatch, midx, fields, idx);
+ else if (i == 5)
+ {
+! if (fmt_ptr->flags == '+' && !qf_multiscan) // %+
+ status = qf_parse_fmt_plus(linebuf, linelen, fields);
+! else if (midx > 0) // %m
+ status = qf_parse_fmt_m(regmatch, midx, fields);
+ }
+! else if (i == 6 && midx > 0) // %r
+ status = qf_parse_fmt_r(regmatch, midx, tail);
+! else if (midx > 0) // others
+ status = (qf_parse_fmt[i])(regmatch, midx, fields);
+
+ if (status != QF_OK)
+***************
+*** 1247,1253 ****
+ fields->type = 0;
+ *tail = NULL;
+
+! /* Always ignore case when looking for a matching error. */
+ regmatch.rm_ic = TRUE;
+ regmatch.regprog = fmt_ptr->prog;
+ r = vim_regexec(&regmatch, linebuf, (colnr_T)0);
+--- 1220,1226 ----
+ fields->type = 0;
+ *tail = NULL;
+
+! // Always ignore case when looking for a matching error.
+ regmatch.rm_ic = TRUE;
+ regmatch.regprog = fmt_ptr->prog;
+ r = vim_regexec(&regmatch, linebuf, (colnr_T)0);
+***************
+*** 1267,1273 ****
+ static int
+ qf_parse_dir_pfx(int idx, qffields_T *fields, qf_list_T *qfl)
+ {
+! if (idx == 'D') /* enter directory */
+ {
+ if (*fields->namebuf == NUL)
+ {
+--- 1240,1246 ----
+ static int
+ qf_parse_dir_pfx(int idx, qffields_T *fields, qf_list_T *qfl)
+ {
+! if (idx == 'D') // enter directory
+ {
+ if (*fields->namebuf == NUL)
+ {
+***************
+*** 1279,1285 ****
+ if (qfl->qf_directory == NULL)
+ return QF_FAIL;
+ }
+! else if (idx == 'X') /* leave directory */
+ qfl->qf_directory = qf_pop_dir(&qfl->qf_dir_stack);
+
+ return QF_OK;
+--- 1252,1258 ----
+ if (qfl->qf_directory == NULL)
+ return QF_FAIL;
+ }
+! else if (idx == 'X') // leave directory
+ qfl->qf_directory = qf_pop_dir(&qfl->qf_dir_stack);
+
+ return QF_OK;
+***************
+*** 1324,1341 ****
+ {
+ char_u *p;
+
+! fields->namebuf[0] = NUL; /* no match found, remove file name */
+! fields->lnum = 0; /* don't jump to this line */
+ fields->valid = FALSE;
+ if (linelen >= fields->errmsglen)
+ {
+! /* linelen + null terminator */
+ if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL)
+ return QF_NOMEM;
+ fields->errmsg = p;
+ fields->errmsglen = linelen + 1;
+ }
+! /* copy whole line to error message */
+ vim_strncpy(fields->errmsg, linebuf, linelen);
+
+ return QF_OK;
+--- 1297,1314 ----
+ {
+ char_u *p;
+
+! fields->namebuf[0] = NUL; // no match found, remove file name
+! fields->lnum = 0; // don't jump to this line
+ fields->valid = FALSE;
+ if (linelen >= fields->errmsglen)
+ {
+! // linelen + null terminator
+ if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL)
+ return QF_NOMEM;
+ fields->errmsg = p;
+ fields->errmsglen = linelen + 1;
+ }
+! // copy whole line to error message
+ vim_strncpy(fields->errmsg, linebuf, linelen);
+
+ return QF_OK;
+***************
+*** 1376,1382 ****
+ if (qfprev->qf_nr == -1)
+ qfprev->qf_nr = fields->enr;
+ if (vim_isprintc(fields->type) && !qfprev->qf_type)
+! /* only printable chars allowed */
+ qfprev->qf_type = fields->type;
+
+ if (!qfprev->qf_lnum)
+--- 1349,1355 ----
+ if (qfprev->qf_nr == -1)
+ qfprev->qf_nr = fields->enr;
+ if (vim_isprintc(fields->type) && !qfprev->qf_type)
+! // only printable chars allowed
+ qfprev->qf_type = fields->type;
+
+ if (!qfprev->qf_lnum)
+***************
+*** 1419,1438 ****
+ int status;
+
+ restofline:
+! /* If there was no %> item start at the first pattern */
+ if (fmt_start == NULL)
+ fmt_ptr = fmt_first;
+ else
+ {
+! /* Otherwise start from the last used pattern */
+ fmt_ptr = fmt_start;
+ fmt_start = NULL;
+ }
+
+! /*
+! * Try to match each part of 'errorformat' until we find a complete
+! * match or no match.
+! */
+ fields->valid = TRUE;
+ for ( ; fmt_ptr != NULL; fmt_ptr = fmt_ptr->next)
+ {
+--- 1392,1409 ----
+ int status;
+
+ restofline:
+! // If there was no %> item start at the first pattern
+ if (fmt_start == NULL)
+ fmt_ptr = fmt_first;
+ else
+ {
+! // Otherwise start from the last used pattern
+ fmt_ptr = fmt_start;
+ fmt_start = NULL;
+ }
+
+! // Try to match each part of 'errorformat' until we find a complete
+! // match or no match.
+ fields->valid = TRUE;
+ for ( ; fmt_ptr != NULL; fmt_ptr = fmt_ptr->next)
+ {
+***************
+*** 1450,1456 ****
+ {
+ if (fmt_ptr != NULL)
+ {
+! /* 'D' and 'X' directory specifiers */
+ status = qf_parse_dir_pfx(idx, fields, qfl);
+ if (status != QF_OK)
+ return status;
+--- 1421,1427 ----
+ {
+ if (fmt_ptr != NULL)
+ {
+! // 'D' and 'X' directory specifiers
+ status = qf_parse_dir_pfx(idx, fields, qfl);
+ if (status != QF_OK)
+ return status;
+***************
+*** 1465,1495 ****
+ }
+ else if (fmt_ptr != NULL)
+ {
+! /* honor %> item */
+ if (fmt_ptr->conthere)
+ fmt_start = fmt_ptr;
+
+ if (vim_strchr((char_u *)"AEWI", idx) != NULL)
+ {
+! qfl->qf_multiline = TRUE; /* start of a multi-line message */
+! qfl->qf_multiignore = FALSE;/* reset continuation */
+ }
+ else if (vim_strchr((char_u *)"CZ", idx) != NULL)
+! { /* continuation of multi-line msg */
+ status = qf_parse_multiline_pfx(qi, qf_idx, idx, qfl, fields);
+ if (status != QF_OK)
+ return status;
+ }
+ else if (vim_strchr((char_u *)"OPQ", idx) != NULL)
+! { /* global file names */
+ status = qf_parse_file_pfx(idx, fields, qfl, tail);
+ if (status == QF_MULTISCAN)
+ goto restofline;
+ }
+! if (fmt_ptr->flags == '-') /* generally exclude this line */
+ {
+ if (qfl->qf_multiline)
+! /* also exclude continuation lines */
+ qfl->qf_multiignore = TRUE;
+ return QF_IGNORE_LINE;
+ }
+--- 1436,1466 ----
+ }
+ else if (fmt_ptr != NULL)
+ {
+! // honor %> item
+ if (fmt_ptr->conthere)
+ fmt_start = fmt_ptr;
+
+ if (vim_strchr((char_u *)"AEWI", idx) != NULL)
+ {
+! qfl->qf_multiline = TRUE; // start of a multi-line message
+! qfl->qf_multiignore = FALSE;// reset continuation
+ }
+ else if (vim_strchr((char_u *)"CZ", idx) != NULL)
+! { // continuation of multi-line msg
+ status = qf_parse_multiline_pfx(qi, qf_idx, idx, qfl, fields);
+ if (status != QF_OK)
+ return status;
+ }
+ else if (vim_strchr((char_u *)"OPQ", idx) != NULL)
+! { // global file names
+ status = qf_parse_file_pfx(idx, fields, qfl, tail);
+ if (status == QF_MULTISCAN)
+ goto restofline;
+ }
+! if (fmt_ptr->flags == '-') // generally exclude this line
+ {
+ if (qfl->qf_multiline)
+! // also exclude continuation lines
+ qfl->qf_multiignore = TRUE;
+ return QF_IGNORE_LINE;
+ }
+***************
+*** 1624,1632 ****
+ buf_T *buf,
+ typval_T *tv,
+ char_u *errorformat,
+! int newlist, /* TRUE: start a new error list */
+! linenr_T lnumfirst, /* first line number to use */
+! linenr_T lnumlast, /* last line number to use */
+ char_u *qf_title,
+ char_u *enc)
+ {
+--- 1595,1603 ----
+ buf_T *buf,
+ typval_T *tv,
+ char_u *errorformat,
+! int newlist, // TRUE: start a new error list
+! linenr_T lnumfirst, // first line number to use
+! linenr_T lnumlast, // last line number to use
+ char_u *qf_title,
+ char_u *enc)
+ {
+***************
+*** 1638,1647 ****
+ static efm_T *fmt_first = NULL;
+ char_u *efm;
+ static char_u *last_efm = NULL;
+! int retval = -1; /* default: return error flag */
+ int status;
+
+! /* Do not used the cached buffer, it may have been wiped out. */
+ VIM_CLEAR(qf_last_bufname);
+
+ vim_memset(&state, 0, sizeof(state));
+--- 1609,1618 ----
+ static efm_T *fmt_first = NULL;
+ char_u *efm;
+ static char_u *last_efm = NULL;
+! int retval = -1; // default: return error flag
+ int status;
+
+! // Do not used the cached buffer, it may have been wiped out.
+ VIM_CLEAR(qf_last_bufname);
+
+ vim_memset(&state, 0, sizeof(state));
+***************
+*** 1653,1665 ****
+
+ if (newlist || qf_idx == qi->qf_listcount)
+ {
+! /* make place for a new list */
+ qf_new_list(qi, qf_title);
+ qf_idx = qi->qf_curlist;
+ }
+ else
+ {
+! /* Adding to existing list, use last entry. */
+ adding = TRUE;
+ if (!qf_list_empty(qi, qf_idx))
+ old_last = qi->qf_lists[qf_idx].qf_last;
+--- 1624,1636 ----
+
+ if (newlist || qf_idx == qi->qf_listcount)
+ {
+! // make place for a new list
+ qf_new_list(qi, qf_title);
+ qf_idx = qi->qf_curlist;
+ }
+ else
+ {
+! // Adding to existing list, use last entry.
+ adding = TRUE;
+ if (!qf_list_empty(qi, qf_idx))
+ old_last = qi->qf_lists[qf_idx].qf_last;
+***************
+*** 1667,1714 ****
+
+ qfl = &qi->qf_lists[qf_idx];
+
+! /* Use the local value of 'errorformat' if it's set. */
+ if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL)
+ efm = buf->b_p_efm;
+ else
+ efm = errorformat;
+
+! /*
+! * If the errorformat didn't change between calls, then reuse the
+! * previously parsed values.
+! */
+ if (last_efm == NULL || (STRCMP(last_efm, efm) != 0))
+ {
+! /* free the previously parsed data */
+ VIM_CLEAR(last_efm);
+ free_efm_list(&fmt_first);
+
+! /* parse the current 'efm' */
+ fmt_first = parse_efm_option(efm);
+ if (fmt_first != NULL)
+ last_efm = vim_strsave(efm);
+ }
+
+! if (fmt_first == NULL) /* nothing found */
+ goto error2;
+
+! /*
+! * got_int is reset here, because it was probably set when killing the
+! * ":make" command, but we still want to read the errorfile then.
+! */
+ got_int = FALSE;
+
+! /*
+! * Read the lines in the error file one by one.
+! * Try to recognize one of the error formats in each line.
+! */
+ while (!got_int)
+ {
+! /* Get the next line from a file/buffer/list/string */
+ status = qf_get_nextline(&state);
+! if (status == QF_NOMEM) /* memory alloc failure */
+ goto qf_init_end;
+! if (status == QF_END_OF_INPUT) /* end of input */
+ break;
+
+ status = qf_parse_line(qi, qf_idx, state.linebuf, state.linelen,
+--- 1638,1679 ----
+
+ qfl = &qi->qf_lists[qf_idx];
+
+! // Use the local value of 'errorformat' if it's set.
+ if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL)
+ efm = buf->b_p_efm;
+ else
+ efm = errorformat;
+
+! // If the errorformat didn't change between calls, then reuse the
+! // previously parsed values.
+ if (last_efm == NULL || (STRCMP(last_efm, efm) != 0))
+ {
+! // free the previously parsed data
+ VIM_CLEAR(last_efm);
+ free_efm_list(&fmt_first);
+
+! // parse the current 'efm'
+ fmt_first = parse_efm_option(efm);
+ if (fmt_first != NULL)
+ last_efm = vim_strsave(efm);
+ }
+
+! if (fmt_first == NULL) // nothing found
+ goto error2;
+
+! // got_int is reset here, because it was probably set when killing the
+! // ":make" command, but we still want to read the errorfile then.
+ got_int = FALSE;
+
+! // Read the lines in the error file one by one.
+! // Try to recognize one of the error formats in each line.
+ while (!got_int)
+ {
+! // Get the next line from a file/buffer/list/string
+ status = qf_get_nextline(&state);
+! if (status == QF_NOMEM) // memory alloc failure
+ goto qf_init_end;
+! if (status == QF_END_OF_INPUT) // end of input
+ break;
+
+ status = qf_parse_line(qi, qf_idx, state.linebuf, state.linelen,
+***************
+*** 1744,1750 ****
+ {
+ if (qfl->qf_index == 0)
+ {
+! /* no valid entry found */
+ qfl->qf_ptr = qfl->qf_start;
+ qfl->qf_index = 1;
+ qfl->qf_nonevalid = TRUE;
+--- 1709,1715 ----
+ {
+ if (qfl->qf_index == 0)
+ {
+! // no valid entry found
+ qfl->qf_ptr = qfl->qf_start;
+ qfl->qf_index = 1;
+ qfl->qf_nonevalid = TRUE;
+***************
+*** 1755,1761 ****
+ if (qfl->qf_ptr == NULL)
+ qfl->qf_ptr = qfl->qf_start;
+ }
+! /* return number of matches */
+ retval = qfl->qf_count;
+ goto qf_init_end;
+ }
+--- 1720,1726 ----
+ if (qfl->qf_ptr == NULL)
+ qfl->qf_ptr = qfl->qf_start;
+ }
+! // return number of matches
+ retval = qfl->qf_count;
+ goto qf_init_end;
+ }
+***************
+*** 1763,1769 ****
+ error2:
+ if (!adding)
+ {
+! /* Error when creating a new list. Free the new list */
+ qf_free(&qi->qf_lists[qi->qf_curlist]);
+ qi->qf_listcount--;
+ if (qi->qf_curlist > 0)
+--- 1728,1734 ----
+ error2:
+ if (!adding)
+ {
+! // Error when creating a new list. Free the new list
+ qf_free(&qi->qf_lists[qi->qf_curlist]);
+ qi->qf_listcount--;
+ if (qi->qf_curlist > 0)
+***************
+*** 1787,1793 ****
+ qf_init(win_T *wp,
+ char_u *efile,
+ char_u *errorformat,
+! int newlist, /* TRUE: start a new error list */
+ char_u *qf_title,
+ char_u *enc)
+ {
+--- 1752,1758 ----
+ qf_init(win_T *wp,
+ char_u *efile,
+ char_u *errorformat,
+! int newlist, // TRUE: start a new error list
+ char_u *qf_title,
+ char_u *enc)
+ {
+***************
+*** 1848,1865 ****
+ {
+ int i;
+
+! /*
+! * If the current entry is not the last entry, delete entries beyond
+! * the current entry. This makes it possible to browse in a tree-like
+! * way with ":grep'.
+! */
+ while (qi->qf_listcount > qi->qf_curlist + 1)
+ qf_free(&qi->qf_lists[--qi->qf_listcount]);
+
+! /*
+! * When the stack is full, remove to oldest entry
+! * Otherwise, add a new entry.
+! */
+ if (qi->qf_listcount == LISTCOUNT)
+ {
+ qf_free(&qi->qf_lists[0]);
+--- 1813,1826 ----
+ {
+ int i;
+
+! // If the current entry is not the last entry, delete entries beyond
+! // the current entry. This makes it possible to browse in a tree-like
+! // way with ":grep'.
+ while (qi->qf_listcount > qi->qf_curlist + 1)
+ qf_free(&qi->qf_lists[--qi->qf_listcount]);
+
+! // When the stack is full, remove to oldest entry
+! // Otherwise, add a new entry.
+ if (qi->qf_listcount == LISTCOUNT)
+ {
+ qf_free(&qi->qf_lists[0]);
+***************
+*** 1886,1897 ****
+ qi = *pqi;
+ if (qi == NULL)
+ return;
+! *pqi = NULL; /* Remove reference to this list */
+
+ qi->qf_refcount--;
+ if (qi->qf_refcount < 1)
+ {
+! /* No references to this location list */
+ for (i = 0; i < qi->qf_listcount; ++i)
+ qf_free(&qi->qf_lists[i]);
+ vim_free(qi);
+--- 1847,1858 ----
+ qi = *pqi;
+ if (qi == NULL)
+ return;
+! *pqi = NULL; // Remove reference to this list
+
+ qi->qf_refcount--;
+ if (qi->qf_refcount < 1)
+ {
+! // No references to this location list
+ for (i = 0; i < qi->qf_listcount; ++i)
+ qf_free(&qi->qf_lists[i]);
+ vim_free(qi);
+***************
+*** 1909,1920 ****
+
+ if (wp != NULL)
+ {
+! /* location list */
+ ll_free_all(&wp->w_llist);
+ ll_free_all(&wp->w_llist_ref);
+ }
+ else
+! /* quickfix list */
+ for (i = 0; i < qi->qf_listcount; ++i)
+ qf_free(&qi->qf_lists[i]);
+ }
+--- 1870,1881 ----
+
+ if (wp != NULL)
+ {
+! // location list
+ ll_free_all(&wp->w_llist);
+ ll_free_all(&wp->w_llist_ref);
+ }
+ else
+! // quickfix list
+ for (i = 0; i < qi->qf_listcount; ++i)
+ qf_free(&qi->qf_lists[i]);
+ }
+***************
+*** 1925,1948 ****
+ */
+ static int
+ qf_add_entry(
+! qf_info_T *qi, /* quickfix list */
+! int qf_idx, /* list index */
+! char_u *dir, /* optional directory name */
+! char_u *fname, /* file name or NULL */
+! char_u *module, /* module name or NULL */
+! int bufnum, /* buffer number or zero */
+! char_u *mesg, /* message */
+! long lnum, /* line number */
+! int col, /* column */
+! int vis_col, /* using visual column */
+! char_u *pattern, /* search pattern */
+! int nr, /* error number */
+! int type, /* type character */
+! int valid) /* valid entry */
+ {
+ qf_list_T *qfl = &qi->qf_lists[qf_idx];
+ qfline_T *qfp;
+! qfline_T **lastp; /* pointer to qf_last or NULL */
+
+ if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
+ return FAIL;
+--- 1886,1909 ----
+ */
+ static int
+ qf_add_entry(
+! qf_info_T *qi, // quickfix list
+! int qf_idx, // list index
+! char_u *dir, // optional directory name
+! char_u *fname, // file name or NULL
+! char_u *module, // module name or NULL
+! int bufnum, // buffer number or zero
+! char_u *mesg, // message
+! long lnum, // line number
+! int col, // column
+! int vis_col, // using visual column
+! char_u *pattern, // search pattern
+! int nr, // error number
+! int type, // type character
+! int valid) // valid entry
+ {
+ qf_list_T *qfl = &qi->qf_lists[qf_idx];
+ qfline_T *qfp;
+! qfline_T **lastp; // pointer to qf_last or NULL
+
+ if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
+ return FAIL;
+***************
+*** 1983,1995 ****
+ return FAIL;
+ }
+ qfp->qf_nr = nr;
+! if (type != 1 && !vim_isprintc(type)) /* only printable chars allowed */
+ type = 0;
+ qfp->qf_type = type;
+ qfp->qf_valid = valid;
+
+ lastp = &qfl->qf_last;
+! if (qf_list_empty(qi, qf_idx)) /* first element in the list */
+ {
+ qfl->qf_start = qfp;
+ qfl->qf_ptr = qfp;
+--- 1944,1956 ----
+ return FAIL;
+ }
+ qfp->qf_nr = nr;
+! if (type != 1 && !vim_isprintc(type)) // only printable chars allowed
+ type = 0;
+ qfp->qf_type = type;
+ qfp->qf_valid = valid;
+
+ lastp = &qfl->qf_last;
+! if (qf_list_empty(qi, qf_idx)) // first element in the list
+ {
+ qfl->qf_start = qfp;
+ qfl->qf_ptr = qfp;
+***************
+*** 2005,2012 ****
+ qfp->qf_cleared = FALSE;
+ *lastp = qfp;
+ ++qfl->qf_count;
+! if (qfl->qf_index == 0 && qfp->qf_valid)
+! /* first valid entry */
+ {
+ qfl->qf_index = qfl->qf_count;
+ qfl->qf_ptr = qfp;
+--- 1966,1972 ----
+ qfp->qf_cleared = FALSE;
+ *lastp = qfp;
+ ++qfl->qf_count;
+! if (qfl->qf_index == 0 && qfp->qf_valid) // first valid entry
+ {
+ qfl->qf_index = qfl->qf_count;
+ qfl->qf_ptr = qfp;
+***************
+*** 2037,2053 ****
+ ll_get_or_alloc_list(win_T *wp)
+ {
+ if (IS_LL_WINDOW(wp))
+! /* For a location list window, use the referenced location list */
+ return wp->w_llist_ref;
+
+! /*
+! * For a non-location list window, w_llist_ref should not point to a
+! * location list.
+! */
+ ll_free_all(&wp->w_llist_ref);
+
+ if (wp->w_llist == NULL)
+! wp->w_llist = ll_new_list(); /* new location list */
+ return wp->w_llist;
+ }
+
+--- 1997,2011 ----
+ ll_get_or_alloc_list(win_T *wp)
+ {
+ if (IS_LL_WINDOW(wp))
+! // For a location list window, use the referenced location list
+ return wp->w_llist_ref;
+
+! // For a non-location list window, w_llist_ref should not point to a
+! // location list.
+ ll_free_all(&wp->w_llist_ref);
+
+ if (wp->w_llist == NULL)
+! wp->w_llist = ll_new_list(); // new location list
+ return wp->w_llist;
+ }
+
+***************
+*** 2195,2201 ****
+ buf_T *buf;
+ char_u *bufname;
+
+! if (fname == NULL || *fname == NUL) /* no file name */
+ return 0;
+
+ #ifdef VMS
+--- 2153,2159 ----
+ buf_T *buf;
+ char_u *bufname;
+
+! if (fname == NULL || *fname == NUL) // no file name
+ return 0;
+
+ #ifdef VMS
+***************
+*** 2209,2220 ****
+ if (directory != NULL && !vim_isAbsName(fname)
+ && (ptr = concat_fnames(directory, fname, TRUE)) != NULL)
+ {
+! /*
+! * Here we check if the file really exists.
+! * This should normally be true, but if make works without
+! * "leaving directory"-messages we might have missed a
+! * directory change.
+! */
+ if (mch_getperm(ptr) < 0)
+ {
+ vim_free(ptr);
+--- 2167,2176 ----
+ if (directory != NULL && !vim_isAbsName(fname)
+ && (ptr = concat_fnames(directory, fname, TRUE)) != NULL)
+ {
+! // Here we check if the file really exists.
+! // This should normally be true, but if make works without
+! // "leaving directory"-messages we might have missed a
+! // directory change.
+ if (mch_getperm(ptr) < 0)
+ {
+ vim_free(ptr);
+***************
+*** 2224,2230 ****
+ else
+ ptr = vim_strsave(fname);
+ }
+! /* Use concatenated directory name and file name */
+ bufname = ptr;
+ }
+ else
+--- 2180,2186 ----
+ else
+ ptr = vim_strsave(fname);
+ }
+! // Use concatenated directory name and file name
+ bufname = ptr;
+ }
+ else
+***************
+*** 2264,2270 ****
+ struct dir_stack_T *ds_new;
+ struct dir_stack_T *ds_ptr;
+
+! /* allocate new stack element and hook it in */
+ ds_new = (struct dir_stack_T *)alloc((unsigned)sizeof(struct dir_stack_T));
+ if (ds_new == NULL)
+ return NULL;
+--- 2220,2226 ----
+ struct dir_stack_T *ds_new;
+ struct dir_stack_T *ds_ptr;
+
+! // allocate new stack element and hook it in
+ ds_new = (struct dir_stack_T *)alloc((unsigned)sizeof(struct dir_stack_T));
+ if (ds_new == NULL)
+ return NULL;
+***************
+*** 2272,2288 ****
+ ds_new->next = *stackptr;
+ *stackptr = ds_new;
+
+! /* store directory on the stack */
+ if (vim_isAbsName(dirbuf)
+ || (*stackptr)->next == NULL
+ || (*stackptr && is_file_stack))
+ (*stackptr)->dirname = vim_strsave(dirbuf);
+ else
+ {
+! /* Okay we don't have an absolute path.
+! * dirbuf must be a subdir of one of the directories on the stack.
+! * Let's search...
+! */
+ ds_new = (*stackptr)->next;
+ (*stackptr)->dirname = NULL;
+ while (ds_new)
+--- 2228,2243 ----
+ ds_new->next = *stackptr;
+ *stackptr = ds_new;
+
+! // store directory on the stack
+ if (vim_isAbsName(dirbuf)
+ || (*stackptr)->next == NULL
+ || (*stackptr && is_file_stack))
+ (*stackptr)->dirname = vim_strsave(dirbuf);
+ else
+ {
+! // Okay we don't have an absolute path.
+! // dirbuf must be a subdir of one of the directories on the stack.
+! // Let's search...
+ ds_new = (*stackptr)->next;
+ (*stackptr)->dirname = NULL;
+ while (ds_new)
+***************
+*** 2296,2302 ****
+ ds_new = ds_new->next;
+ }
+
+! /* clean up all dirs we already left */
+ while ((*stackptr)->next != ds_new)
+ {
+ ds_ptr = (*stackptr)->next;
+--- 2251,2257 ----
+ ds_new = ds_new->next;
+ }
+
+! // clean up all dirs we already left
+ while ((*stackptr)->next != ds_new)
+ {
+ ds_ptr = (*stackptr)->next;
+***************
+*** 2305,2311 ****
+ vim_free(ds_ptr);
+ }
+
+! /* Nothing found -> it must be on top level */
+ if (ds_new == NULL)
+ {
+ vim_free((*stackptr)->dirname);
+--- 2260,2266 ----
+ vim_free(ds_ptr);
+ }
+
+! // Nothing found -> it must be on top level
+ if (ds_new == NULL)
+ {
+ vim_free((*stackptr)->dirname);
+***************
+*** 2333,2342 ****
+ {
+ struct dir_stack_T *ds_ptr;
+
+! /* TODO: Should we check if dirbuf is the directory on top of the stack?
+! * What to do if it isn't? */
+
+! /* pop top element and free it */
+ if (*stackptr != NULL)
+ {
+ ds_ptr = *stackptr;
+--- 2288,2297 ----
+ {
+ struct dir_stack_T *ds_ptr;
+
+! // TODO: Should we check if dirbuf is the directory on top of the stack?
+! // What to do if it isn't?
+
+! // pop top element and free it
+ if (*stackptr != NULL)
+ {
+ ds_ptr = *stackptr;
+***************
+*** 2345,2351 ****
+ vim_free(ds_ptr);
+ }
+
+! /* return NEW top element as current dir or NULL if stack is empty*/
+ return *stackptr ? (*stackptr)->dirname : NULL;
+ }
+
+--- 2300,2306 ----
+ vim_free(ds_ptr);
+ }
+
+! // return NEW top element as current dir or NULL if stack is empty
+ return *stackptr ? (*stackptr)->dirname : NULL;
+ }
+
+***************
+*** 2392,2398 ****
+ struct dir_stack_T *ds_tmp;
+ char_u *fullname;
+
+! /* no dirs on the stack - there's nothing we can do */
+ if (qfl->qf_dir_stack == NULL)
+ return NULL;
+
+--- 2347,2353 ----
+ struct dir_stack_T *ds_tmp;
+ char_u *fullname;
+
+! // no dirs on the stack - there's nothing we can do
+ if (qfl->qf_dir_stack == NULL)
+ return NULL;
+
+***************
+*** 2403,2411 ****
+ vim_free(fullname);
+ fullname = concat_fnames(ds_ptr->dirname, filename, TRUE);
+
+! /* If concat_fnames failed, just go on. The worst thing that can happen
+! * is that we delete the entire stack.
+! */
+ if ((fullname != NULL) && (mch_getperm(fullname) >= 0))
+ break;
+
+--- 2358,2365 ----
+ vim_free(fullname);
+ fullname = concat_fnames(ds_ptr->dirname, filename, TRUE);
+
+! // If concat_fnames failed, just go on. The worst thing that can happen
+! // is that we delete the entire stack.
+ if ((fullname != NULL) && (mch_getperm(fullname) >= 0))
+ break;
+
+***************
+*** 2414,2420 ****
+
+ vim_free(fullname);
+
+! /* clean up all dirs we already left */
+ while (qfl->qf_dir_stack->next != ds_ptr)
+ {
+ ds_tmp = qfl->qf_dir_stack->next;
+--- 2368,2374 ----
+
+ vim_free(fullname);
+
+! // clean up all dirs we already left
+ while (qfl->qf_dir_stack->next != ds_ptr)
+ {
+ ds_tmp = qfl->qf_dir_stack->next;
+***************
+*** 2437,2443 ****
+
+ if (wp != NULL)
+ {
+! qi = GET_LOC_LIST(wp); /* Location list */
+ if (qi == NULL)
+ return FALSE;
+ }
+--- 2391,2397 ----
+
+ if (wp != NULL)
+ {
+! qi = GET_LOC_LIST(wp); // Location list
+ if (qi == NULL)
+ return FALSE;
+ }
+***************
+*** 2461,2473 ****
+ qfline_T *qfp;
+ int i;
+
+! /* Search for the entry in the current list */
+ for (i = 0, qfp = qfl->qf_start; i < qfl->qf_count;
+ ++i, qfp = qfp->qf_next)
+ if (qfp == NULL || qfp == qf_ptr)
+ break;
+
+! if (i == qfl->qf_count) /* Entry is not found */
+ return FALSE;
+
+ return TRUE;
+--- 2415,2427 ----
+ qfline_T *qfp;
+ int i;
+
+! // Search for the entry in the current list
+ for (i = 0, qfp = qfl->qf_start; i < qfl->qf_count;
+ ++i, qfp = qfp->qf_next)
+ if (qfp == NULL || qfp == qf_ptr)
+ break;
+
+! if (i == qfl->qf_count) // Entry is not found
+ return FALSE;
+
+ return TRUE;
+***************
+*** 2667,2682 ****
+ win_enter(wp, TRUE);
+ else
+ {
+! /*
+! * Split off help window; put it at far top if no position
+! * specified, the current window is vertically split and narrow.
+! */
+ flags = WSP_HELP;
+ if (cmdmod.split == 0 && curwin->w_width != Columns
+ && curwin->w_width < 80)
+ flags |= WSP_TOP;
+ if (IS_LL_STACK(qi))
+! flags |= WSP_NEWLOC; /* don't copy the location list */
+
+ if (win_split(0, flags) == FAIL)
+ return FAIL;
+--- 2621,2634 ----
+ win_enter(wp, TRUE);
+ else
+ {
+! // Split off help window; put it at far top if no position
+! // specified, the current window is vertically split and narrow.
+ flags = WSP_HELP;
+ if (cmdmod.split == 0 && curwin->w_width != Columns
+ && curwin->w_width < 80)
+ flags |= WSP_TOP;
+ if (IS_LL_STACK(qi))
+! flags |= WSP_NEWLOC; // don't copy the location list
+
+ if (win_split(0, flags) == FAIL)
+ return FAIL;
+***************
+*** 2688,2701 ****
+
+ if (IS_LL_STACK(qi)) // not a quickfix list
+ {
+! /* The new window should use the supplied location list */
+ curwin->w_llist = qi;
+ qi->qf_refcount++;
+ }
+ }
+
+ if (!p_im)
+! restart_edit = 0; /* don't want insert mode in help file */
+
+ return OK;
+ }
+--- 2640,2653 ----
+
+ if (IS_LL_STACK(qi)) // not a quickfix list
+ {
+! // The new window should use the supplied location list
+ curwin->w_llist = qi;
+ qi->qf_refcount++;
+ }
+ }
+
+ if (!p_im)
+! restart_edit = 0; // don't want insert mode in help file
+
+ return OK;
+ }
+***************
+*** 2764,2777 ****
+ if (ll_ref != NULL)
+ flags |= WSP_NEWLOC;
+ if (win_split(0, flags) == FAIL)
+! return FAIL; /* not enough room for window */
+! p_swb = empty_option; /* don't split again */
+ swb_flags = 0;
+ RESET_BINDING(curwin);
+ if (ll_ref != NULL)
+ {
+! /* The new window should use the location list from the
+! * location list window */
+ curwin->w_llist = ll_ref;
+ ll_ref->qf_refcount++;
+ }
+--- 2716,2729 ----
+ if (ll_ref != NULL)
+ flags |= WSP_NEWLOC;
+ if (win_split(0, flags) == FAIL)
+! return FAIL; // not enough room for window
+! p_swb = empty_option; // don't split again
+ swb_flags = 0;
+ RESET_BINDING(curwin);
+ if (ll_ref != NULL)
+ {
+! // The new window should use the location list from the
+! // location list window
+ curwin->w_llist = ll_ref;
+ ll_ref->qf_refcount++;
+ }
+***************
+*** 2791,2819 ****
+
+ if (win == NULL)
+ {
+! /* Find the window showing the selected file */
+ FOR_ALL_WINDOWS(win)
+ if (win->w_buffer->b_fnum == qf_fnum)
+ break;
+ if (win == NULL)
+ {
+! /* Find a previous usable window */
+ win = curwin;
+ do
+ {
+ if (bt_normal(win->w_buffer))
+ break;
+ if (win->w_prev == NULL)
+! win = lastwin; /* wrap around the top */
+ else
+! win = win->w_prev; /* go to previous window */
+ } while (win != curwin);
+ }
+ }
+ win_goto(win);
+
+! /* If the location list for the window is not set, then set it
+! * to the location list from the location window */
+ if (win->w_llist == NULL)
+ {
+ win->w_llist = ll_ref;
+--- 2743,2771 ----
+
+ if (win == NULL)
+ {
+! // Find the window showing the selected file
+ FOR_ALL_WINDOWS(win)
+ if (win->w_buffer->b_fnum == qf_fnum)
+ break;
+ if (win == NULL)
+ {
+! // Find a previous usable window
+ win = curwin;
+ do
+ {
+ if (bt_normal(win->w_buffer))
+ break;
+ if (win->w_prev == NULL)
+! win = lastwin; // wrap around the top
+ else
+! win = win->w_prev; // go to previous window
+ } while (win != curwin);
+ }
+ }
+ win_goto(win);
+
+! // If the location list for the window is not set, then set it
+! // to the location list from the location window
+ if (win->w_llist == NULL)
+ {
+ win->w_llist = ll_ref;
+***************
+*** 2841,2854 ****
+ if (win->w_buffer->b_fnum == qf_fnum)
+ break;
+ if (win->w_prev == NULL)
+! win = lastwin; /* wrap around the top */
+ else
+! win = win->w_prev; /* go to previous window */
+
+ if (IS_QF_WINDOW(win))
+ {
+! /* Didn't find it, go to the window before the quickfix
+! * window. */
+ if (altwin != NULL)
+ win = altwin;
+ else if (curwin->w_prev != NULL)
+--- 2793,2806 ----
+ if (win->w_buffer->b_fnum == qf_fnum)
+ break;
+ if (win->w_prev == NULL)
+! win = lastwin; // wrap around the top
+ else
+! win = win->w_prev; // go to previous window
+
+ if (IS_QF_WINDOW(win))
+ {
+! // Didn't find it, go to the window before the quickfix
+! // window.
+ if (altwin != NULL)
+ win = altwin;
+ else if (curwin->w_prev != NULL)
+***************
+*** 2858,2864 ****
+ break;
+ }
+
+! /* Remember a usable window. */
+ if (altwin == NULL && !win->w_p_pvw && bt_normal(win->w_buffer))
+ altwin = win;
+ }
+--- 2810,2816 ----
+ break;
+ }
+
+! // Remember a usable window.
+ if (altwin == NULL && !win->w_p_pvw && bt_normal(win->w_buffer))
+ altwin = win;
+ }
+***************
+*** 2885,2891 ****
+ ll_ref = curwin->w_llist_ref;
+ if (ll_ref != NULL)
+ {
+! /* Find a non-quickfix window with this location list */
+ usable_win_ptr = qf_find_win_with_loclist(ll_ref);
+ if (usable_win_ptr != NULL)
+ usable_win = 1;
+--- 2837,2843 ----
+ ll_ref = curwin->w_llist_ref;
+ if (ll_ref != NULL)
+ {
+! // Find a non-quickfix window with this location list
+ usable_win_ptr = qf_find_win_with_loclist(ll_ref);
+ if (usable_win_ptr != NULL)
+ usable_win = 1;
+***************
+*** 2893,2926 ****
+
+ if (!usable_win)
+ {
+! /* Locate a window showing a normal buffer */
+ win = qf_find_win_with_normal_buf();
+ if (win != NULL)
+ usable_win = 1;
+ }
+
+! /*
+! * If no usable window is found and 'switchbuf' contains "usetab"
+! * then search in other tabs.
+! */
+ if (!usable_win && (swb_flags & SWB_USETAB))
+ usable_win = qf_goto_tabwin_with_file(qf_fnum);
+
+! /*
+! * If there is only one window and it is the quickfix window, create a
+! * new one above the quickfix window.
+! */
+ if ((ONE_WINDOW && bt_quickfix(curbuf)) || !usable_win)
+ {
+ if (qf_open_new_file_win(ll_ref) != OK)
+ return FAIL;
+! *opened_window = TRUE; /* close it when fail */
+ }
+ else
+ {
+! if (curwin->w_llist_ref != NULL) /* In a location window */
+ qf_goto_win_with_ll_file(usable_win_ptr, qf_fnum, ll_ref);
+! else /* In a quickfix window */
+ qf_goto_win_with_qfl_file(qf_fnum);
+ }
+
+--- 2845,2874 ----
+
+ if (!usable_win)
+ {
+! // Locate a window showing a normal buffer
+ win = qf_find_win_with_normal_buf();
+ if (win != NULL)
+ usable_win = 1;
+ }
+
+! // If no usable window is found and 'switchbuf' contains "usetab"
+! // then search in other tabs.
+ if (!usable_win && (swb_flags & SWB_USETAB))
+ usable_win = qf_goto_tabwin_with_file(qf_fnum);
+
+! // If there is only one window and it is the quickfix window, create a
+! // new one above the quickfix window.
+ if ((ONE_WINDOW && bt_quickfix(curbuf)) || !usable_win)
+ {
+ if (qf_open_new_file_win(ll_ref) != OK)
+ return FAIL;
+! *opened_window = TRUE; // close it when fail
+ }
+ else
+ {
+! if (curwin->w_llist_ref != NULL) // In a location window
+ qf_goto_win_with_ll_file(usable_win_ptr, qf_fnum, ll_ref);
+! else // In a quickfix window
+ qf_goto_win_with_qfl_file(qf_fnum);
+ }
+
+***************
+*** 2946,2953 ****
+
+ if (qf_ptr->qf_type == 1)
+ {
+! /* Open help file (do_ecmd() will set b_help flag, readfile() will
+! * set b_p_ro flag). */
+ if (!can_abandon(curbuf, forceit))
+ {
+ no_write_message();
+--- 2894,2901 ----
+
+ if (qf_ptr->qf_type == 1)
+ {
+! // Open help file (do_ecmd() will set b_help flag, readfile() will
+! // set b_p_ro flag).
+ if (!can_abandon(curbuf, forceit))
+ {
+ no_write_message();
+***************
+*** 2968,2977 ****
+
+ if (IS_LL_STACK(qi))
+ {
+! /*
+! * Location list. Check whether the associated window is still
+! * present and the list is still valid.
+! */
+ if (!win_valid_any_tab(oldwin))
+ {
+ EMSG(_("E924: Current window was closed"));
+--- 2916,2923 ----
+
+ if (IS_LL_STACK(qi))
+ {
+! // Location list. Check whether the associated window is still
+! // present and the list is still valid.
+ if (!win_valid_any_tab(oldwin))
+ {
+ EMSG(_("E924: Current window was closed"));
+***************
+*** 3016,3024 ****
+
+ if (qf_pattern == NULL)
+ {
+! /*
+! * Go to line with error, unless qf_lnum is 0.
+! */
+ i = qf_lnum;
+ if (i > 0)
+ {
+--- 2962,2968 ----
+
+ if (qf_pattern == NULL)
+ {
+! // Go to line with error, unless qf_lnum is 0.
+ i = qf_lnum;
+ if (i > 0)
+ {
+***************
+*** 3034,3045 ****
+ #endif
+ if (qf_viscol == TRUE)
+ {
+! /*
+! * Check each character from the beginning of the error
+! * line up to the error column. For each tab character
+! * found, reduce the error column value by the length of
+! * a tab character.
+! */
+ line = ml_get_curline();
+ screen_col = 0;
+ for (char_col = 0; char_col < curwin->w_cursor.col; ++char_col)
+--- 2978,2987 ----
+ #endif
+ if (qf_viscol == TRUE)
+ {
+! // Check each character from the beginning of the error
+! // line up to the error column. For each tab character
+! // found, reduce the error column value by the length of
+! // a tab character.
+ line = ml_get_curline();
+ screen_col = 0;
+ for (char_col = 0; char_col < curwin->w_cursor.col; ++char_col)
+***************
+*** 3065,3071 ****
+ {
+ pos_T save_cursor;
+
+! /* Move the cursor to the first line in the buffer */
+ save_cursor = curwin->w_cursor;
+ curwin->w_cursor.lnum = 0;
+ if (!do_search(NULL, '/', qf_pattern, (long)1,
+--- 3007,3013 ----
+ {
+ pos_T save_cursor;
+
+! // Move the cursor to the first line in the buffer
+ save_cursor = curwin->w_cursor;
+ curwin->w_cursor.lnum = 0;
+ if (!do_search(NULL, '/', qf_pattern, (long)1,
+***************
+*** 3088,3108 ****
+ linenr_T i;
+ int len;
+
+! /* Update the screen before showing the message, unless the screen
+! * scrolled up. */
+ if (!msg_scrolled)
+ update_topline_redraw();
+ sprintf((char *)IObuff, _("(%d of %d)%s%s: "), qf_index,
+ qi->qf_lists[qi->qf_curlist].qf_count,
+ qf_ptr->qf_cleared ? _(" (line deleted)") : "",
+ (char *)qf_types(qf_ptr->qf_type, qf_ptr->qf_nr));
+! /* Add the message, skipping leading whitespace and newlines. */
+ len = (int)STRLEN(IObuff);
+ qf_fmt_text(skipwhite(qf_ptr->qf_text), IObuff + len, IOSIZE - len);
+
+! /* Output the message. Overwrite to avoid scrolling when the 'O'
+! * flag is present in 'shortmess'; But when not jumping, print the
+! * whole message. */
+ i = msg_scroll;
+ if (curbuf == old_curbuf && curwin->w_cursor.lnum == old_lnum)
+ msg_scroll = TRUE;
+--- 3030,3050 ----
+ linenr_T i;
+ int len;
+
+! // Update the screen before showing the message, unless the screen
+! // scrolled up.
+ if (!msg_scrolled)
+ update_topline_redraw();
+ sprintf((char *)IObuff, _("(%d of %d)%s%s: "), qf_index,
+ qi->qf_lists[qi->qf_curlist].qf_count,
+ qf_ptr->qf_cleared ? _(" (line deleted)") : "",
+ (char *)qf_types(qf_ptr->qf_type, qf_ptr->qf_nr));
+! // Add the message, skipping leading whitespace and newlines.
+ len = (int)STRLEN(IObuff);
+ qf_fmt_text(skipwhite(qf_ptr->qf_text), IObuff + len, IOSIZE - len);
+
+! // Output the message. Overwrite to avoid scrolling when the 'O'
+! // flag is present in 'shortmess'; But when not jumping, print the
+! // whole message.
+ i = msg_scroll;
+ if (curbuf == old_curbuf && curwin->w_cursor.lnum == old_lnum)
+ msg_scroll = TRUE;
+***************
+*** 3304,3312 ****
+ }
+ }
+
+! /*
+! * Highlight attributes used for displaying entries from the quickfix list.
+! */
+ static int qfFileAttr;
+ static int qfSepAttr;
+ static int qfLineAttr;
+--- 3246,3252 ----
+ }
+ }
+
+! // Highlight attributes used for displaying entries from the quickfix list.
+ static int qfFileAttr;
+ static int qfSepAttr;
+ static int qfLineAttr;
+***************
+*** 3333,3339 ****
+ && (buf = buflist_findnr(qfp->qf_fnum)) != NULL)
+ {
+ fname = buf->b_fname;
+! if (qfp->qf_type == 1) /* :helpgrep */
+ fname = gettail(fname);
+ }
+ if (fname == NULL)
+--- 3273,3279 ----
+ && (buf = buflist_findnr(qfp->qf_fnum)) != NULL)
+ {
+ fname = buf->b_fname;
+! if (qfp->qf_type == 1) // :helpgrep
+ fname = gettail(fname);
+ }
+ if (fname == NULL)
+***************
+*** 3382,3395 ****
+ }
+ msg_puts((char_u *)" ");
+
+! /* Remove newlines and leading whitespace from the text. For an
+! * unrecognized line keep the indent, the compiler may mark a word
+! * with ^^^^. */
+ qf_fmt_text((fname != NULL || qfp->qf_lnum != 0)
+ ? skipwhite(qfp->qf_text) : qfp->qf_text,
+ IObuff, IOSIZE);
+ msg_prt_line(IObuff, FALSE);
+! out_flush(); /* show one line at a time */
+ }
+
+ /*
+--- 3322,3335 ----
+ }
+ msg_puts((char_u *)" ");
+
+! // Remove newlines and leading whitespace from the text. For an
+! // unrecognized line keep the indent, the compiler may mark a word
+! // with ^^^^.
+ qf_fmt_text((fname != NULL || qfp->qf_lnum != 0)
+ ? skipwhite(qfp->qf_text) : qfp->qf_text,
+ IObuff, IOSIZE);
+ msg_prt_line(IObuff, FALSE);
+! out_flush(); // show one line at a time
+ }
+
+ /*
+***************
+*** 3406,3413 ****
+ int idx2 = -1;
+ char_u *arg = eap->arg;
+ int plus = FALSE;
+! int all = eap->forceit; /* if not :cl!, only show
+! recognised errors */
+ qf_info_T *qi = &ql_info;
+
+ if (is_loclist_cmd(eap->cmdidx))
+--- 3346,3353 ----
+ int idx2 = -1;
+ char_u *arg = eap->arg;
+ int plus = FALSE;
+! int all = eap->forceit; // if not :cl!, only show
+! // recognised errors
+ qf_info_T *qi = &ql_info;
+
+ if (is_loclist_cmd(eap->cmdidx))
+***************
+*** 3451,3463 ****
+ idx2 = (-idx2 > i) ? 0 : idx2 + i + 1;
+ }
+
+! /* Shorten all the file names, so that it is easy to read */
+ shorten_fnames(FALSE);
+
+! /*
+! * Get the attributes for the different quickfix highlight items. Note
+! * that this depends on syntax items defined in the qf.vim syntax file
+! */
+ qfFileAttr = syn_name2attr((char_u *)"qfFileName");
+ if (qfFileAttr == 0)
+ qfFileAttr = HL_ATTR(HLF_D);
+--- 3391,3401 ----
+ idx2 = (-idx2 > i) ? 0 : idx2 + i + 1;
+ }
+
+! // Shorten all the file names, so that it is easy to read
+ shorten_fnames(FALSE);
+
+! // Get the attributes for the different quickfix highlight items. Note
+! // that this depends on syntax items defined in the qf.vim syntax file
+ qfFileAttr = syn_name2attr((char_u *)"qfFileName");
+ if (qfFileAttr == 0)
+ qfFileAttr = HL_ATTR(HLF_D);
+***************
+*** 3638,3646 ****
+ stop = (qfp == qfpnext);
+ vim_free(qfp);
+ if (stop)
+! /* Somehow qf_count may have an incorrect value, set it to 1
+! * to avoid crashing when it's wrong.
+! * TODO: Avoid qf_count being incorrect. */
+ qfl->qf_count = 1;
+ }
+ qfl->qf_start = qfpnext;
+--- 3576,3584 ----
+ stop = (qfp == qfpnext);
+ vim_free(qfp);
+ if (stop)
+! // Somehow qf_count may have an incorrect value, set it to 1
+! // to avoid crashing when it's wrong.
+! // TODO: Avoid qf_count being incorrect.
+ qfl->qf_count = 1;
+ }
+ qfl->qf_start = qfpnext;
+***************
+*** 3828,3841 ****
+ return;
+ }
+
+! /* Look for an existing quickfix window. */
+ win = qf_find_win(qi);
+
+! /*
+! * If a quickfix window is open but we have no errors to display,
+! * close the window. If a quickfix window is not open, then open
+! * it if we have errors; otherwise, leave it closed.
+! */
+ if (qf_stack_empty(qi)
+ || qi->qf_lists[qi->qf_curlist].qf_nonevalid
+ || qf_list_empty(qi, qi->qf_curlist))
+--- 3766,3777 ----
+ return;
+ }
+
+! // Look for an existing quickfix window.
+ win = qf_find_win(qi);
+
+! // If a quickfix window is open but we have no errors to display,
+! // close the window. If a quickfix window is not open, then open
+! // it if we have errors; otherwise, leave it closed.
+ if (qf_stack_empty(qi)
+ || qi->qf_lists[qi->qf_curlist].qf_nonevalid
+ || qf_list_empty(qi, qi->qf_curlist))
+***************
+*** 3864,3870 ****
+ return;
+ }
+
+! /* Find existing quickfix window and close it. */
+ win = qf_find_win(qi);
+ if (win != NULL)
+ win_close(win, FALSE);
+--- 3800,3806 ----
+ return;
+ }
+
+! // Find existing quickfix window and close it.
+ win = qf_find_win(qi);
+ if (win != NULL)
+ win_close(win, FALSE);
+***************
+*** 4052,4060 ****
+ curwin->w_cursor.coladd = 0;
+ #endif
+ curwin->w_curswant = 0;
+! update_topline(); /* scroll to show the line */
+ redraw_later(VALID);
+! curwin->w_redr_status = TRUE; /* update ruler */
+ curwin = old_curwin;
+ curbuf = curwin->w_buffer;
+ }
+--- 3988,3996 ----
+ curwin->w_cursor.coladd = 0;
+ #endif
+ curwin->w_curswant = 0;
+! update_topline(); // scroll to show the line
+ redraw_later(VALID);
+! curwin->w_redr_status = TRUE; // update ruler
+ curwin = old_curwin;
+ curbuf = curwin->w_buffer;
+ }
+***************
+*** 4093,4099 ****
+ qf_info_T *qi = &ql_info;
+
+ if (IS_LL_WINDOW(wp))
+! /* In the location list window, use the referenced location list */
+ qi = wp->w_llist_ref;
+
+ return qi->qf_lists[qi->qf_curlist].qf_index;
+--- 4029,4035 ----
+ qf_info_T *qi = &ql_info;
+
+ if (IS_LL_WINDOW(wp))
+! // In the location list window, use the referenced location list
+ qi = wp->w_llist_ref;
+
+ return qi->qf_lists[qi->qf_curlist].qf_index;
+***************
+*** 4106,4120 ****
+ static int
+ qf_win_pos_update(
+ qf_info_T *qi,
+! int old_qf_index) /* previous qf_index or zero */
+ {
+ win_T *win;
+ int qf_index = qi->qf_lists[qi->qf_curlist].qf_index;
+
+! /*
+! * Put the cursor on the current error in the quickfix window, so that
+! * it's viewable.
+! */
+ win = qf_find_win(qi);
+ if (win != NULL
+ && qf_index <= win->w_buffer->b_ml.ml_line_count
+--- 4042,4054 ----
+ static int
+ qf_win_pos_update(
+ qf_info_T *qi,
+! int old_qf_index) // previous qf_index or zero
+ {
+ win_T *win;
+ int qf_index = qi->qf_lists[qi->qf_curlist].qf_index;
+
+! // Put the cursor on the current error in the quickfix window, so that
+! // it's viewable.
+ win = qf_find_win(qi);
+ if (win != NULL
+ && qf_index <= win->w_buffer->b_ml.ml_line_count
+***************
+*** 4142,4153 ****
+ static int
+ is_qf_win(win_T *win, qf_info_T *qi)
+ {
+! /*
+! * A window displaying the quickfix buffer will have the w_llist_ref field
+! * set to NULL.
+! * A window displaying a location list buffer will have the w_llist_ref
+! * pointing to the location list.
+! */
+ if (bt_quickfix(win->w_buffer))
+ if ((IS_QF_STACK(qi) && win->w_llist_ref == NULL)
+ || (IS_LL_STACK(qi) && win->w_llist_ref == qi))
+--- 4076,4085 ----
+ static int
+ is_qf_win(win_T *win, qf_info_T *qi)
+ {
+! // A window displaying the quickfix buffer will have the w_llist_ref field
+! // set to NULL.
+! // A window displaying a location list buffer will have the w_llist_ref
+! // pointing to the location list.
+ if (bt_quickfix(win->w_buffer))
+ if ((IS_QF_STACK(qi) && win->w_llist_ref == NULL)
+ || (IS_LL_STACK(qi) && win->w_llist_ref == qi))
+***************
+*** 4216,4229 ****
+ win_T *win;
+ aco_save_T aco;
+
+! /* Check if a buffer for the quickfix list exists. Update it. */
+ buf = qf_find_buf(qi);
+ if (buf != NULL)
+ {
+ linenr_T old_line_count = buf->b_ml.ml_line_count;
+
+ if (old_last == NULL)
+! /* set curwin/curbuf to buf and save a few things */
+ aucmd_prepbuf(&aco, buf);
+
+ qf_update_win_titlevar(qi);
+--- 4148,4161 ----
+ win_T *win;
+ aco_save_T aco;
+
+! // Check if a buffer for the quickfix list exists. Update it.
+ buf = qf_find_buf(qi);
+ if (buf != NULL)
+ {
+ linenr_T old_line_count = buf->b_ml.ml_line_count;
+
+ if (old_last == NULL)
+! // set curwin/curbuf to buf and save a few things
+ aucmd_prepbuf(&aco, buf);
+
+ qf_update_win_titlevar(qi);
+***************
+*** 4235,4246 ****
+ {
+ (void)qf_win_pos_update(qi, 0);
+
+! /* restore curwin/curbuf and a few other things */
+ aucmd_restbuf(&aco);
+ }
+
+! /* Only redraw when added lines are visible. This avoids flickering
+! * when the added lines are not visible. */
+ if ((win = qf_find_win(qi)) != NULL && old_line_count < win->w_botline)
+ redraw_buf_later(buf, NOT_VALID);
+ }
+--- 4167,4178 ----
+ {
+ (void)qf_win_pos_update(qi, 0);
+
+! // restore curwin/curbuf and a few other things
+ aucmd_restbuf(&aco);
+ }
+
+! // Only redraw when added lines are visible. This avoids flickering
+! // when the added lines are not visible.
+ if ((win = qf_find_win(qi)) != NULL && old_line_count < win->w_botline)
+ redraw_buf_later(buf, NOT_VALID);
+ }
+***************
+*** 4264,4274 ****
+ && (errbuf = buflist_findnr(qfp->qf_fnum)) != NULL
+ && errbuf->b_fname != NULL)
+ {
+! if (qfp->qf_type == 1) /* :helpgrep */
+ STRCPY(IObuff, gettail(errbuf->b_fname));
+ else
+ {
+! /* shorten the file name if not done already */
+ if (errbuf->b_sfname == NULL
+ || mch_isFullName(errbuf->b_sfname))
+ {
+--- 4196,4206 ----
+ && (errbuf = buflist_findnr(qfp->qf_fnum)) != NULL
+ && errbuf->b_fname != NULL)
+ {
+! if (qfp->qf_type == 1) // :helpgrep
+ STRCPY(IObuff, gettail(errbuf->b_fname));
+ else
+ {
+! // shorten the file name if not done already
+ if (errbuf->b_sfname == NULL
+ || mch_isFullName(errbuf->b_sfname))
+ {
+***************
+*** 4307,4315 ****
+ IObuff[len++] = '|';
+ IObuff[len++] = ' ';
+
+! /* Remove newlines and leading whitespace from the text.
+! * For an unrecognized line keep the indent, the compiler may
+! * mark a word with ^^^^. */
+ qf_fmt_text(len > 3 ? skipwhite(qfp->qf_text) : qfp->qf_text,
+ IObuff + len, IOSIZE - len);
+
+--- 4239,4247 ----
+ IObuff[len++] = '|';
+ IObuff[len++] = ' ';
+
+! // Remove newlines and leading whitespace from the text.
+! // For an unrecognized line keep the indent, the compiler may
+! // mark a word with ^^^^.
+ qf_fmt_text(len > 3 ? skipwhite(qfp->qf_text) : qfp->qf_text,
+ IObuff + len, IOSIZE - len);
+
+***************
+*** 4342,4360 ****
+ return;
+ }
+
+! /* delete all existing lines */
+ while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0)
+ (void)ml_delete((linenr_T)1, FALSE);
+ }
+
+! /* Check if there is anything to display */
+ if (!qf_stack_empty(qi))
+ {
+ char_u dirname[MAXPATHL];
+
+ *dirname = NUL;
+
+! /* Add one line for each error */
+ if (old_last == NULL)
+ {
+ qfp = qi->qf_lists[qi->qf_curlist].qf_start;
+--- 4274,4292 ----
+ return;
+ }
+
+! // delete all existing lines
+ while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0)
+ (void)ml_delete((linenr_T)1, FALSE);
+ }
+
+! // Check if there is anything to display
+ if (!qf_stack_empty(qi))
+ {
+ char_u dirname[MAXPATHL];
+
+ *dirname = NUL;
+
+! // Add one line for each error
+ if (old_last == NULL)
+ {
+ qfp = qi->qf_lists[qi->qf_curlist].qf_start;
+***************
+*** 4377,4399 ****
+ }
+
+ if (old_last == NULL)
+! /* Delete the empty line which is now at the end */
+ (void)ml_delete(lnum + 1, FALSE);
+ }
+
+! /* correct cursor position */
+ check_lnums(TRUE);
+
+ if (old_last == NULL)
+ {
+! /* Set the 'filetype' to "qf" each time after filling the buffer.
+! * This resembles reading a file into a buffer, it's more logical when
+! * using autocommands. */
+ ++curbuf_lock;
+ set_option_value((char_u *)"ft", 0L, (char_u *)"qf", OPT_LOCAL);
+ curbuf->b_p_ma = FALSE;
+
+! keep_filetype = TRUE; /* don't detect 'filetype' */
+ apply_autocmds(EVENT_BUFREADPOST, (char_u *)"quickfix", NULL,
+ FALSE, curbuf);
+ apply_autocmds(EVENT_BUFWINENTER, (char_u *)"quickfix", NULL,
+--- 4309,4331 ----
+ }
+
+ if (old_last == NULL)
+! // Delete the empty line which is now at the end
+ (void)ml_delete(lnum + 1, FALSE);
+ }
+
+! // correct cursor position
+ check_lnums(TRUE);
+
+ if (old_last == NULL)
+ {
+! // Set the 'filetype' to "qf" each time after filling the buffer.
+! // This resembles reading a file into a buffer, it's more logical when
+! // using autocommands.
+ ++curbuf_lock;
+ set_option_value((char_u *)"ft", 0L, (char_u *)"qf", OPT_LOCAL);
+ curbuf->b_p_ma = FALSE;
+
+! keep_filetype = TRUE; // don't detect 'filetype'
+ apply_autocmds(EVENT_BUFREADPOST, (char_u *)"quickfix", NULL,
+ FALSE, curbuf);
+ apply_autocmds(EVENT_BUFWINENTER, (char_u *)"quickfix", NULL,
+***************
+*** 4401,4411 ****
+ keep_filetype = FALSE;
+ --curbuf_lock;
+
+! /* make sure it will be redrawn */
+ redraw_curbuf_later(NOT_VALID);
+ }
+
+! /* Restore KeyTyped, setting 'filetype' may reset it. */
+ KeyTyped = old_KeyTyped;
+ }
+
+--- 4333,4343 ----
+ keep_filetype = FALSE;
+ --curbuf_lock;
+
+! // make sure it will be redrawn
+ redraw_curbuf_later(NOT_VALID);
+ }
+
+! // Restore KeyTyped, setting 'filetype' may reset it.
+ KeyTyped = old_KeyTyped;
+ }
+
+***************
+*** 4694,4700 ****
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+! /* Location list */
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ return 0;
+--- 4626,4632 ----
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+! // Location list
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ return 0;
+***************
+*** 4707,4716 ****
+ if (qfp->qf_valid)
+ {
+ if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo)
+! sz++; /* Count all valid entries */
+ else if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
+ {
+! /* Count the number of files */
+ sz++;
+ prev_fnum = qfp->qf_fnum;
+ }
+--- 4639,4648 ----
+ if (qfp->qf_valid)
+ {
+ if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo)
+! sz++; // Count all valid entries
+ else if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
+ {
+! // Count the number of files
+ sz++;
+ prev_fnum = qfp->qf_fnum;
+ }
+***************
+*** 4731,4737 ****
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+! /* Location list */
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ return 0;
+--- 4663,4669 ----
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+! // Location list
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ return 0;
+***************
+*** 4755,4761 ****
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+! /* Location list */
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ return 1;
+--- 4687,4693 ----
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+! // Location list
+ qi = GET_LOC_LIST(curwin);
+ if (qi == NULL)
+ return 1;
+***************
+*** 4764,4770 ****
+ qfl = &qi->qf_lists[qi->qf_curlist];
+ qfp = qfl->qf_start;
+
+! /* check if the list has valid errors */
+ if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+--- 4696,4702 ----
+ qfl = &qi->qf_lists[qi->qf_curlist];
+ qfp = qfl->qf_start;
+
+! // check if the list has valid errors
+ if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+***************
+*** 4776,4782 ****
+ {
+ if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
+ {
+! /* Count the number of files */
+ eidx++;
+ prev_fnum = qfp->qf_fnum;
+ }
+--- 4708,4714 ----
+ {
+ if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
+ {
+! // Count the number of files
+ eidx++;
+ prev_fnum = qfp->qf_fnum;
+ }
+***************
+*** 4802,4808 ****
+ int i, eidx;
+ int prev_fnum = 0;
+
+! /* check if the list has valid errors */
+ if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+--- 4734,4740 ----
+ int i, eidx;
+ int prev_fnum = 0;
+
+! // check if the list has valid errors
+ if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
+ return 1;
+
+***************
+*** 4815,4821 ****
+ {
+ if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
+ {
+! /* Count the number of files */
+ eidx++;
+ prev_fnum = qfp->qf_fnum;
+ }
+--- 4747,4753 ----
+ {
+ if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
+ {
+! // Count the number of files
+ eidx++;
+ prev_fnum = qfp->qf_fnum;
+ }
+***************
+*** 4873,4881 ****
+ }
+ }
+
+! /* For cdo and ldo commands, jump to the nth valid error.
+! * For cfdo and lfdo commands, jump to the nth valid file entry.
+! */
+ if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
+ || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
+ errornr = qf_get_nth_valid_entry(&qi->qf_lists[qi->qf_curlist],
+--- 4805,4812 ----
+ }
+ }
+
+! // For cdo and ldo commands, jump to the nth valid error.
+! // For cfdo and lfdo commands, jump to the nth valid file entry.
+ if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
+ || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
+ errornr = qf_get_nth_valid_entry(&qi->qf_lists[qi->qf_curlist],
+***************
+*** 4949,4955 ****
+ win_T *wp = NULL;
+ qf_info_T *qi = &ql_info;
+ char_u *au_name = NULL;
+! int_u save_qfid = 0; /* init for gcc */
+ int res;
+
+ switch (eap->cmdidx)
+--- 4880,4886 ----
+ win_T *wp = NULL;
+ qf_info_T *qi = &ql_info;
+ char_u *au_name = NULL;
+! int_u save_qfid = 0; // init for gcc
+ int res;
+
+ switch (eap->cmdidx)
+***************
+*** 4986,5001 ****
+ if (is_loclist_cmd(eap->cmdidx))
+ wp = curwin;
+
+! /*
+! * This function is used by the :cfile, :cgetfile and :caddfile
+! * commands.
+! * :cfile always creates a new quickfix list and jumps to the
+! * first error.
+! * :cgetfile creates a new quickfix list but doesn't jump to the
+! * first error.
+! * :caddfile adds to an existing quickfix list. If there is no
+! * quickfix list then a new list is created.
+! */
+ res = qf_init(wp, p_ef, p_efm, (eap->cmdidx != CMD_caddfile
+ && eap->cmdidx != CMD_laddfile),
+ qf_cmdtitle(*eap->cmdlinep), enc);
+--- 4917,4930 ----
+ if (is_loclist_cmd(eap->cmdidx))
+ wp = curwin;
+
+! // This function is used by the :cfile, :cgetfile and :caddfile
+! // commands.
+! // :cfile always creates a new quickfix list and jumps to the
+! // first error.
+! // :cgetfile creates a new quickfix list but doesn't jump to the
+! // first error.
+! // :caddfile adds to an existing quickfix list. If there is no
+! // quickfix list then a new list is created.
+ res = qf_init(wp, p_ef, p_efm, (eap->cmdidx != CMD_caddfile
+ && eap->cmdidx != CMD_laddfile),
+ qf_cmdtitle(*eap->cmdlinep), enc);
+***************
+*** 5045,5056 ****
+ static void
+ vgr_init_regmatch(regmmatch_T *regmatch, char_u *s)
+ {
+! /* Get the search pattern: either white-separated or enclosed in // */
+ regmatch->regprog = NULL;
+
+ if (s == NULL || *s == NUL)
+ {
+! /* Pattern is empty, use last search pattern. */
+ if (last_search_pat() == NULL)
+ {
+ EMSG(_(e_noprevre));
+--- 4974,4985 ----
+ static void
+ vgr_init_regmatch(regmmatch_T *regmatch, char_u *s)
+ {
+! // Get the search pattern: either white-separated or enclosed in //
+ regmatch->regprog = NULL;
+
+ if (s == NULL || *s == NUL)
+ {
+! // Pattern is empty, use last search pattern.
+ if (last_search_pat() == NULL)
+ {
+ EMSG(_(e_noprevre));
+***************
+*** 5083,5090 ****
+ vim_free(p);
+ }
+ msg_clr_eos();
+! msg_didout = FALSE; /* overwrite this message */
+! msg_nowait = TRUE; /* don't wait for this message */
+ msg_col = 0;
+ out_flush();
+ }
+--- 5012,5019 ----
+ vim_free(p);
+ }
+ msg_clr_eos();
+! msg_didout = FALSE; // overwrite this message
+! msg_nowait = TRUE; // don't wait for this message
+ msg_col = 0;
+ out_flush();
+ }
+***************
+*** 5105,5120 ****
+ buf_T *buf;
+
+ #if defined(FEAT_SYN_HL)
+! /* Don't do Filetype autocommands to avoid loading syntax and
+! * indent scripts, a great speed improvement. */
+ save_ei = au_event_disable(",Filetype");
+ #endif
+! /* Don't use modelines here, it's useless. */
+ save_mls = p_mls;
+ p_mls = 0;
+
+! /* Load file into a buffer, so that 'fileencoding' is detected,
+! * autocommands applied, etc. */
+ buf = load_dummy_buffer(fname, dirname_start, dirname_now);
+
+ p_mls = save_mls;
+--- 5034,5049 ----
+ buf_T *buf;
+
+ #if defined(FEAT_SYN_HL)
+! // Don't do Filetype autocommands to avoid loading syntax and
+! // indent scripts, a great speed improvement.
+ save_ei = au_event_disable(",Filetype");
+ #endif
+! // Don't use modelines here, it's useless.
+ save_mls = p_mls;
+ p_mls = 0;
+
+! // Load file into a buffer, so that 'fileencoding' is detected,
+! // autocommands applied, etc.
+ buf = load_dummy_buffer(fname, dirname_start, dirname_now);
+
+ p_mls = save_mls;
+***************
+*** 5137,5154 ****
+ int_u qfid,
+ char_u *title)
+ {
+! /* Verify that the quickfix/location list was not freed by an autocmd */
+ if (!qflist_valid(wp, qfid))
+ {
+ if (wp != NULL)
+ {
+! /* An autocmd has freed the location list. */
+ EMSG(_(e_loc_list_changed));
+ return FALSE;
+ }
+ else
+ {
+! /* Quickfix list is not found, create a new one. */
+ qf_new_list(qi, title);
+ return TRUE;
+ }
+--- 5066,5083 ----
+ int_u qfid,
+ char_u *title)
+ {
+! // Verify that the quickfix/location list was not freed by an autocmd
+ if (!qflist_valid(wp, qfid))
+ {
+ if (wp != NULL)
+ {
+! // An autocmd has freed the location list.
+ EMSG(_(e_loc_list_changed));
+ return FALSE;
+ }
+ else
+ {
+! // Quickfix list is not found, create a new one.
+ qf_new_list(qi, title);
+ return TRUE;
+ }
+***************
+*** 5184,5195 ****
+ while (vim_regexec_multi(regmatch, curwin, buf, lnum,
+ col, NULL, NULL) > 0)
+ {
+! /* Pass the buffer number so that it gets used even for a
+! * dummy buffer, unless duplicate_name is set, then the
+! * buffer will be wiped out below. */
+ if (qf_add_entry(qi,
+ qi->qf_curlist,
+! NULL, /* dir */
+ fname,
+ NULL,
+ duplicate_name ? 0 : buf->b_fnum,
+--- 5113,5124 ----
+ while (vim_regexec_multi(regmatch, curwin, buf, lnum,
+ col, NULL, NULL) > 0)
+ {
+! // Pass the buffer number so that it gets used even for a
+! // dummy buffer, unless duplicate_name is set, then the
+! // buffer will be wiped out below.
+ if (qf_add_entry(qi,
+ qi->qf_curlist,
+! NULL, // dir
+ fname,
+ NULL,
+ duplicate_name ? 0 : buf->b_fnum,
+***************
+*** 5197,5207 ****
+ regmatch->startpos[0].lnum + lnum, FALSE),
+ regmatch->startpos[0].lnum + lnum,
+ regmatch->startpos[0].col + 1,
+! FALSE, /* vis_col */
+! NULL, /* search pattern */
+! 0, /* nr */
+! 0, /* type */
+! TRUE /* valid */
+ ) == FAIL)
+ {
+ got_int = TRUE;
+--- 5126,5136 ----
+ regmatch->startpos[0].lnum + lnum, FALSE),
+ regmatch->startpos[0].lnum + lnum,
+ regmatch->startpos[0].col + 1,
+! FALSE, // vis_col
+! NULL, // search pattern
+! 0, // nr
+! 0, // type
+! TRUE // valid
+ ) == FAIL)
+ {
+ got_int = TRUE;
+***************
+*** 5242,5252 ****
+ buf = curbuf;
+ qf_jump(qi, 0, 0, forceit);
+ if (buf != curbuf)
+! /* If we jumped to another buffer redrawing will already be
+! * taken care of. */
+ *redraw_for_dummy = FALSE;
+
+! /* Jump to the directory used after loading the buffer. */
+ if (curbuf == first_match_buf && target_dir != NULL)
+ {
+ exarg_T ea;
+--- 5171,5181 ----
+ buf = curbuf;
+ qf_jump(qi, 0, 0, forceit);
+ if (buf != curbuf)
+! // If we jumped to another buffer redrawing will already be
+! // taken care of.
+ *redraw_for_dummy = FALSE;
+
+! // Jump to the directory used after loading the buffer.
+ if (curbuf == first_match_buf && target_dir != NULL)
+ {
+ exarg_T ea;
+***************
+*** 5315,5321 ****
+ else
+ tomatch = MAXLNUM;
+
+! /* Get the search pattern: either white-separated or enclosed in // */
+ regmatch.regprog = NULL;
+ title = vim_strsave(qf_cmdtitle(*eap->cmdlinep));
+ p = skip_vimgrep_pat(eap->arg, &s, &flags);
+--- 5244,5250 ----
+ else
+ tomatch = MAXLNUM;
+
+! // Get the search pattern: either white-separated or enclosed in //
+ regmatch.regprog = NULL;
+ title = vim_strsave(qf_cmdtitle(*eap->cmdlinep));
+ p = skip_vimgrep_pat(eap->arg, &s, &flags);
+***************
+*** 5340,5349 ****
+ && eap->cmdidx != CMD_vimgrepadd
+ && eap->cmdidx != CMD_lvimgrepadd)
+ || qf_stack_empty(qi))
+! /* make place for a new list */
+ qf_new_list(qi, title != NULL ? title : qf_cmdtitle(*eap->cmdlinep));
+
+! /* parse the list of arguments */
+ if (get_arglist_exp(p, &fcount, &fnames, TRUE) == FAIL)
+ goto theend;
+ if (fcount == 0)
+--- 5269,5278 ----
+ && eap->cmdidx != CMD_vimgrepadd
+ && eap->cmdidx != CMD_lvimgrepadd)
+ || qf_stack_empty(qi))
+! // make place for a new list
+ qf_new_list(qi, title != NULL ? title : qf_cmdtitle(*eap->cmdlinep));
+
+! // parse the list of arguments
+ if (get_arglist_exp(p, &fcount, &fnames, TRUE) == FAIL)
+ goto theend;
+ if (fcount == 0)
+***************
+*** 5360,5371 ****
+ goto theend;
+ }
+
+! /* Remember the current directory, because a BufRead autocommand that does
+! * ":lcd %:p:h" changes the meaning of short path names. */
+ mch_dirname(dirname_start, MAXPATHL);
+
+! /* Remember the current quickfix list identifier, so that we can check for
+! * autocommands changing the current quickfix list. */
+ save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+
+ seconds = (time_t)0;
+--- 5289,5300 ----
+ goto theend;
+ }
+
+! // Remember the current directory, because a BufRead autocommand that does
+! // ":lcd %:p:h" changes the meaning of short path names.
+ mch_dirname(dirname_start, MAXPATHL);
+
+! // Remember the current quickfix list identifier, so that we can check for
+! // autocommands changing the current quickfix list.
+ save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+
+ seconds = (time_t)0;
+***************
+*** 5374,5381 ****
+ fname = shorten_fname1(fnames[fi]);
+ if (time(NULL) > seconds)
+ {
+! /* Display the file name every second or so, show the user we are
+! * working on it. */
+ seconds = time(NULL);
+ vgr_display_fname(fname);
+ }
+--- 5303,5310 ----
+ fname = shorten_fname1(fnames[fi]);
+ if (time(NULL) > seconds)
+ {
+! // Display the file name every second or so, show the user we are
+! // working on it.
+ seconds = time(NULL);
+ vgr_display_fname(fname);
+ }
+***************
+*** 5383,5389 ****
+ buf = buflist_findname_exp(fnames[fi]);
+ if (buf == NULL || buf->b_ml.ml_mfp == NULL)
+ {
+! /* Remember that a buffer with this name already exists. */
+ duplicate_name = (buf != NULL);
+ using_dummy = TRUE;
+ redraw_for_dummy = TRUE;
+--- 5312,5318 ----
+ buf = buflist_findname_exp(fnames[fi]);
+ if (buf == NULL || buf->b_ml.ml_mfp == NULL)
+ {
+! // Remember that a buffer with this name already exists.
+ duplicate_name = (buf != NULL);
+ using_dummy = TRUE;
+ redraw_for_dummy = TRUE;
+***************
+*** 5391,5401 ****
+ buf = vgr_load_dummy_buf(fname, dirname_start, dirname_now);
+ }
+ else
+! /* Use existing, loaded buffer. */
+ using_dummy = FALSE;
+
+! /* Check whether the quickfix list is still valid. When loading a
+! * buffer above, autocommands might have changed the quickfix list. */
+ if (!vgr_qflist_valid(wp, qi, save_qfid, qf_cmdtitle(*eap->cmdlinep)))
+ {
+ FreeWild(fcount, fnames);
+--- 5320,5330 ----
+ buf = vgr_load_dummy_buf(fname, dirname_start, dirname_now);
+ }
+ else
+! // Use existing, loaded buffer.
+ using_dummy = FALSE;
+
+! // Check whether the quickfix list is still valid. When loading a
+! // buffer above, autocommands might have changed the quickfix list.
+ if (!vgr_qflist_valid(wp, qi, save_qfid, qf_cmdtitle(*eap->cmdlinep)))
+ {
+ FreeWild(fcount, fnames);
+***************
+*** 5410,5417 ****
+ }
+ else
+ {
+! /* Try for a match in all lines of the buffer.
+! * For ":1vimgrep" look for first match only. */
+ found_match = vgr_match_buflines(qi, fname, buf, &regmatch,
+ tomatch, duplicate_name, flags);
+
+--- 5339,5346 ----
+ }
+ else
+ {
+! // Try for a match in all lines of the buffer.
+! // For ":1vimgrep" look for first match only.
+ found_match = vgr_match_buflines(qi, fname, buf, &regmatch,
+ tomatch, duplicate_name, flags);
+
+***************
+*** 5421,5442 ****
+ first_match_buf = buf;
+ if (duplicate_name)
+ {
+! /* Never keep a dummy buffer if there is another buffer
+! * with the same name. */
+ wipe_dummy_buffer(buf, dirname_start);
+ buf = NULL;
+ }
+ else if (!cmdmod.hide
+! || buf->b_p_bh[0] == 'u' /* "unload" */
+! || buf->b_p_bh[0] == 'w' /* "wipe" */
+! || buf->b_p_bh[0] == 'd') /* "delete" */
+ {
+! /* When no match was found we don't need to remember the
+! * buffer, wipe it out. If there was a match and it
+! * wasn't the first one or we won't jump there: only
+! * unload the buffer.
+! * Ignore 'hidden' here, because it may lead to having too
+! * many swap files. */
+ if (!found_match)
+ {
+ wipe_dummy_buffer(buf, dirname_start);
+--- 5350,5371 ----
+ first_match_buf = buf;
+ if (duplicate_name)
+ {
+! // Never keep a dummy buffer if there is another buffer
+! // with the same name.
+ wipe_dummy_buffer(buf, dirname_start);
+ buf = NULL;
+ }
+ else if (!cmdmod.hide
+! || buf->b_p_bh[0] == 'u' // "unload"
+! || buf->b_p_bh[0] == 'w' // "wipe"
+! || buf->b_p_bh[0] == 'd') // "delete"
+ {
+! // When no match was found we don't need to remember the
+! // buffer, wipe it out. If there was a match and it
+! // wasn't the first one or we won't jump there: only
+! // unload the buffer.
+! // Ignore 'hidden' here, because it may lead to having too
+! // many swap files.
+ if (!found_match)
+ {
+ wipe_dummy_buffer(buf, dirname_start);
+***************
+*** 5445,5451 ****
+ else if (buf != first_match_buf || (flags & VGR_NOJUMP))
+ {
+ unload_dummy_buffer(buf, dirname_start);
+! /* Keeping the buffer, remove the dummy flag. */
+ buf->b_flags &= ~BF_DUMMY;
+ buf = NULL;
+ }
+--- 5374,5380 ----
+ else if (buf != first_match_buf || (flags & VGR_NOJUMP))
+ {
+ unload_dummy_buffer(buf, dirname_start);
+! // Keeping the buffer, remove the dummy flag.
+ buf->b_flags &= ~BF_DUMMY;
+ buf = NULL;
+ }
+***************
+*** 5453,5472 ****
+
+ if (buf != NULL)
+ {
+! /* Keeping the buffer, remove the dummy flag. */
+ buf->b_flags &= ~BF_DUMMY;
+
+! /* If the buffer is still loaded we need to use the
+! * directory we jumped to below. */
+ if (buf == first_match_buf
+ && target_dir == NULL
+ && STRCMP(dirname_start, dirname_now) != 0)
+ target_dir = vim_strsave(dirname_now);
+
+! /* The buffer is still loaded, the Filetype autocommands
+! * need to be done now, in that buffer. And the modelines
+! * need to be done (again). But not the window-local
+! * options! */
+ aucmd_prepbuf(&aco, buf);
+ #if defined(FEAT_SYN_HL)
+ apply_autocmds(EVENT_FILETYPE, buf->b_p_ft,
+--- 5382,5401 ----
+
+ if (buf != NULL)
+ {
+! // Keeping the buffer, remove the dummy flag.
+ buf->b_flags &= ~BF_DUMMY;
+
+! // If the buffer is still loaded we need to use the
+! // directory we jumped to below.
+ if (buf == first_match_buf
+ && target_dir == NULL
+ && STRCMP(dirname_start, dirname_now) != 0)
+ target_dir = vim_strsave(dirname_now);
+
+! // The buffer is still loaded, the Filetype autocommands
+! // need to be done now, in that buffer. And the modelines
+! // need to be done (again). But not the window-local
+! // options!
+ aucmd_prepbuf(&aco, buf);
+ #if defined(FEAT_SYN_HL)
+ apply_autocmds(EVENT_FILETYPE, buf->b_p_ft,
+***************
+*** 5491,5500 ****
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+! /*
+! * The QuickFixCmdPost autocmd may free the quickfix list. Check the list
+! * is still valid.
+! */
+ if (!qflist_valid(wp, save_qfid))
+ goto theend;
+
+--- 5420,5427 ----
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+! // The QuickFixCmdPost autocmd may free the quickfix list. Check the list
+! // is still valid.
+ if (!qflist_valid(wp, save_qfid))
+ goto theend;
+
+***************
+*** 5511,5518 ****
+ else
+ EMSG2(_(e_nomatch2), s);
+
+! /* If we loaded a dummy buffer into the current window, the autocommands
+! * may have messed up things, need to redraw and recompute folds. */
+ if (redraw_for_dummy)
+ {
+ #ifdef FEAT_FOLDING
+--- 5438,5445 ----
+ else
+ EMSG2(_(e_nomatch2), s);
+
+! // If we loaded a dummy buffer into the current window, the autocommands
+! // may have messed up things, need to redraw and recompute folds.
+ if (redraw_for_dummy)
+ {
+ #ifdef FEAT_FOLDING
+***************
+*** 5544,5551 ****
+ mch_dirname(dirname_now, MAXPATHL);
+ if (STRCMP(dirname_start, dirname_now) != 0)
+ {
+! /* If the directory has changed, change it back by building up an
+! * appropriate ex command and executing it. */
+ exarg_T ea;
+
+ ea.arg = dirname_start;
+--- 5471,5478 ----
+ mch_dirname(dirname_now, MAXPATHL);
+ if (STRCMP(dirname_start, dirname_now) != 0)
+ {
+! // If the directory has changed, change it back by building up an
+! // appropriate ex command and executing it.
+ exarg_T ea;
+
+ ea.arg = dirname_start;
+***************
+*** 5571,5578 ****
+ static buf_T *
+ load_dummy_buffer(
+ char_u *fname,
+! char_u *dirname_start, /* in: old directory */
+! char_u *resulting_dir) /* out: new directory */
+ {
+ buf_T *newbuf;
+ bufref_T newbufref;
+--- 5498,5505 ----
+ static buf_T *
+ load_dummy_buffer(
+ char_u *fname,
+! char_u *dirname_start, // in: old directory
+! char_u *resulting_dir) // out: new directory
+ {
+ buf_T *newbuf;
+ bufref_T newbufref;
+***************
+*** 5581,5612 ****
+ aco_save_T aco;
+ int readfile_result;
+
+! /* Allocate a buffer without putting it in the buffer list. */
+ newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY);
+ if (newbuf == NULL)
+ return NULL;
+ set_bufref(&newbufref, newbuf);
+
+! /* Init the options. */
+ buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP);
+
+! /* need to open the memfile before putting the buffer in a window */
+ if (ml_open(newbuf) == OK)
+ {
+! /* Make sure this buffer isn't wiped out by autocommands. */
+ ++newbuf->b_locked;
+
+! /* set curwin/curbuf to buf and save a few things */
+ aucmd_prepbuf(&aco, newbuf);
+
+! /* Need to set the filename for autocommands. */
+ (void)setfname(curbuf, fname, NULL, FALSE);
+
+! /* Create swap file now to avoid the ATTENTION message. */
+ check_need_swap(TRUE);
+
+! /* Remove the "dummy" flag, otherwise autocommands may not
+! * work. */
+ curbuf->b_flags &= ~BF_DUMMY;
+
+ newbuf_to_wipe.br_buf = NULL;
+--- 5508,5539 ----
+ aco_save_T aco;
+ int readfile_result;
+
+! // Allocate a buffer without putting it in the buffer list.
+ newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY);
+ if (newbuf == NULL)
+ return NULL;
+ set_bufref(&newbufref, newbuf);
+
+! // Init the options.
+ buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP);
+
+! // need to open the memfile before putting the buffer in a window
+ if (ml_open(newbuf) == OK)
+ {
+! // Make sure this buffer isn't wiped out by autocommands.
+ ++newbuf->b_locked;
+
+! // set curwin/curbuf to buf and save a few things
+ aucmd_prepbuf(&aco, newbuf);
+
+! // Need to set the filename for autocommands.
+ (void)setfname(curbuf, fname, NULL, FALSE);
+
+! // Create swap file now to avoid the ATTENTION message.
+ check_need_swap(TRUE);
+
+! // Remove the "dummy" flag, otherwise autocommands may not
+! // work.
+ curbuf->b_flags &= ~BF_DUMMY;
+
+ newbuf_to_wipe.br_buf = NULL;
+***************
+*** 5621,5650 ****
+ failed = FALSE;
+ if (curbuf != newbuf)
+ {
+! /* Bloody autocommands changed the buffer! Can happen when
+! * using netrw and editing a remote file. Use the current
+! * buffer instead, delete the dummy one after restoring the
+! * window stuff. */
+ set_bufref(&newbuf_to_wipe, newbuf);
+ newbuf = curbuf;
+ }
+ }
+
+! /* restore curwin/curbuf and a few other things */
+ aucmd_restbuf(&aco);
+ if (newbuf_to_wipe.br_buf != NULL && bufref_valid(&newbuf_to_wipe))
+ wipe_buffer(newbuf_to_wipe.br_buf, FALSE);
+
+! /* Add back the "dummy" flag, otherwise buflist_findname_stat() won't
+! * skip it. */
+ newbuf->b_flags |= BF_DUMMY;
+ }
+
+! /*
+! * When autocommands/'autochdir' option changed directory: go back.
+! * Let the caller know what the resulting dir was first, in case it is
+! * important.
+! */
+ mch_dirname(resulting_dir, MAXPATHL);
+ restore_start_dir(dirname_start);
+
+--- 5548,5575 ----
+ failed = FALSE;
+ if (curbuf != newbuf)
+ {
+! // Bloody autocommands changed the buffer! Can happen when
+! // using netrw and editing a remote file. Use the current
+! // buffer instead, delete the dummy one after restoring the
+! // window stuff.
+ set_bufref(&newbuf_to_wipe, newbuf);
+ newbuf = curbuf;
+ }
+ }
+
+! // restore curwin/curbuf and a few other things
+ aucmd_restbuf(&aco);
+ if (newbuf_to_wipe.br_buf != NULL && bufref_valid(&newbuf_to_wipe))
+ wipe_buffer(newbuf_to_wipe.br_buf, FALSE);
+
+! // Add back the "dummy" flag, otherwise buflist_findname_stat() won't
+! // skip it.
+ newbuf->b_flags |= BF_DUMMY;
+ }
+
+! // When autocommands/'autochdir' option changed directory: go back.
+! // Let the caller know what the resulting dir was first, in case it is
+! // important.
+ mch_dirname(resulting_dir, MAXPATHL);
+ restore_start_dir(dirname_start);
+
+***************
+*** 5666,5690 ****
+ static void
+ wipe_dummy_buffer(buf_T *buf, char_u *dirname_start)
+ {
+! if (curbuf != buf) /* safety check */
+ {
+ #if defined(FEAT_EVAL)
+ cleanup_T cs;
+
+! /* Reset the error/interrupt/exception state here so that aborting()
+! * returns FALSE when wiping out the buffer. Otherwise it doesn't
+! * work when got_int is set. */
+ enter_cleanup(&cs);
+ #endif
+
+ wipe_buffer(buf, FALSE);
+
+ #if defined(FEAT_EVAL)
+! /* Restore the error/interrupt/exception state if not discarded by a
+! * new aborting error, interrupt, or uncaught exception. */
+ leave_cleanup(&cs);
+ #endif
+! /* When autocommands/'autochdir' option changed directory: go back. */
+ restore_start_dir(dirname_start);
+ }
+ }
+--- 5591,5615 ----
+ static void
+ wipe_dummy_buffer(buf_T *buf, char_u *dirname_start)
+ {
+! if (curbuf != buf) // safety check
+ {
+ #if defined(FEAT_EVAL)
+ cleanup_T cs;
+
+! // Reset the error/interrupt/exception state here so that aborting()
+! // returns FALSE when wiping out the buffer. Otherwise it doesn't
+! // work when got_int is set.
+ enter_cleanup(&cs);
+ #endif
+
+ wipe_buffer(buf, FALSE);
+
+ #if defined(FEAT_EVAL)
+! // Restore the error/interrupt/exception state if not discarded by a
+! // new aborting error, interrupt, or uncaught exception.
+ leave_cleanup(&cs);
+ #endif
+! // When autocommands/'autochdir' option changed directory: go back.
+ restore_start_dir(dirname_start);
+ }
+ }
+***************
+*** 5697,5707 ****
+ static void
+ unload_dummy_buffer(buf_T *buf, char_u *dirname_start)
+ {
+! if (curbuf != buf) /* safety check */
+ {
+ close_buffer(NULL, buf, DOBUF_UNLOAD, FALSE);
+
+! /* When autocommands/'autochdir' option changed directory: go back. */
+ restore_start_dir(dirname_start);
+ }
+ }
+--- 5622,5632 ----
+ static void
+ unload_dummy_buffer(buf_T *buf, char_u *dirname_start)
+ {
+! if (curbuf != buf) // safety check
+ {
+ close_buffer(NULL, buf, DOBUF_UNLOAD, FALSE);
+
+! // When autocommands/'autochdir' option changed directory: go back.
+ restore_start_dir(dirname_start);
+ }
+ }
+***************
+*** 5741,5747 ****
+ qfp = qi->qf_lists[qf_idx].qf_start;
+ for (i = 1; !got_int && i <= qi->qf_lists[qf_idx].qf_count; ++i)
+ {
+! /* Handle entries with a non-existing buffer number. */
+ bufnum = qfp->qf_fnum;
+ if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
+ bufnum = 0;
+--- 5666,5672 ----
+ qfp = qi->qf_lists[qf_idx].qf_start;
+ for (i = 1; !got_int && i <= qi->qf_lists[qf_idx].qf_count; ++i)
+ {
+! // Handle entries with a non-existing buffer number.
+ bufnum = qfp->qf_fnum;
+ if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
+ bufnum = 0;
+***************
+*** 5772,5780 ****
+ return OK;
+ }
+
+! /*
+! * Flags used by getqflist()/getloclist() to determine which fields to return.
+! */
+ enum {
+ QF_GETLIST_NONE = 0x0,
+ QF_GETLIST_TITLE = 0x1,
+--- 5697,5703 ----
+ return OK;
+ }
+
+! // Flags used by getqflist()/getloclist() to determine which fields to return.
+ enum {
+ QF_GETLIST_NONE = 0x0,
+ QF_GETLIST_TITLE = 0x1,
+***************
+*** 5803,5814 ****
+ dictitem_T *efm_di;
+ list_T *l;
+
+! /* Only a List value is supported */
+ if (di->di_tv.v_type == VAR_LIST && di->di_tv.vval.v_list != NULL)
+ {
+! /* If errorformat is supplied then use it, otherwise use the 'efm'
+! * option setting
+! */
+ if ((efm_di = dict_find(what, (char_u *)"efm", -1)) != NULL)
+ {
+ if (efm_di->di_tv.v_type != VAR_STRING ||
+--- 5726,5736 ----
+ dictitem_T *efm_di;
+ list_T *l;
+
+! // Only a List value is supported
+ if (di->di_tv.v_type == VAR_LIST && di->di_tv.vval.v_list != NULL)
+ {
+! // If errorformat is supplied then use it, otherwise use the 'efm'
+! // option setting
+ if ((efm_di = dict_find(what, (char_u *)"efm", -1)) != NULL)
+ {
+ if (efm_di->di_tv.v_type != VAR_STRING ||
+***************
+*** 5847,5854 ****
+ {
+ win_T *win;
+
+! /* The quickfix window can be opened even if the quickfix list is not set
+! * using ":copen". This is not true for location lists. */
+ if (qi == NULL)
+ return 0;
+ win = qf_find_win(qi);
+--- 5769,5776 ----
+ {
+ win_T *win;
+
+! // The quickfix window can be opened even if the quickfix list is not set
+! // using ":copen". This is not true for location lists.
+ if (qi == NULL)
+ return 0;
+ win = qf_find_win(qi);
+***************
+*** 5922,5934 ****
+ int qf_idx;
+ dictitem_T *di;
+
+! qf_idx = qi->qf_curlist; /* default is the current list */
+ if ((di = dict_find(what, (char_u *)"nr", -1)) != NULL)
+ {
+! /* Use the specified quickfix/location list */
+ if (di->di_tv.v_type == VAR_NUMBER)
+ {
+! /* for zero use the current list */
+ if (di->di_tv.vval.v_number != 0)
+ {
+ qf_idx = di->di_tv.vval.v_number - 1;
+--- 5844,5856 ----
+ int qf_idx;
+ dictitem_T *di;
+
+! qf_idx = qi->qf_curlist; // default is the current list
+ if ((di = dict_find(what, (char_u *)"nr", -1)) != NULL)
+ {
+! // Use the specified quickfix/location list
+ if (di->di_tv.v_type == VAR_NUMBER)
+ {
+! // for zero use the current list
+ if (di->di_tv.vval.v_number != 0)
+ {
+ qf_idx = di->di_tv.vval.v_number - 1;
+***************
+*** 5939,5945 ****
+ else if (di->di_tv.v_type == VAR_STRING
+ && di->di_tv.vval.v_string != NULL
+ && STRCMP(di->di_tv.vval.v_string, "$") == 0)
+! /* Get the last quickfix list number */
+ qf_idx = qi->qf_listcount - 1;
+ else
+ qf_idx = INVALID_QFIDX;
+--- 5861,5867 ----
+ else if (di->di_tv.v_type == VAR_STRING
+ && di->di_tv.vval.v_string != NULL
+ && STRCMP(di->di_tv.vval.v_string, "$") == 0)
+! // Get the last quickfix list number
+ qf_idx = qi->qf_listcount - 1;
+ else
+ qf_idx = INVALID_QFIDX;
+***************
+*** 5947,5958 ****
+
+ if ((di = dict_find(what, (char_u *)"id", -1)) != NULL)
+ {
+! /* Look for a list with the specified id */
+ if (di->di_tv.v_type == VAR_NUMBER)
+ {
+! /*
+! * For zero, use the current list or the list specified by 'nr'
+! */
+ if (di->di_tv.vval.v_number != 0)
+ qf_idx = qf_id2nr(qi, di->di_tv.vval.v_number);
+ }
+--- 5869,5878 ----
+
+ if ((di = dict_find(what, (char_u *)"id", -1)) != NULL)
+ {
+! // Look for a list with the specified id
+ if (di->di_tv.v_type == VAR_NUMBER)
+ {
+! // For zero, use the current list or the list specified by 'nr'
+ if (di->di_tv.vval.v_number != 0)
+ qf_idx = qf_id2nr(qi, di->di_tv.vval.v_number);
+ }
+***************
+*** 6085,6091 ****
+ {
+ int idx = qi->qf_lists[qf_idx].qf_index;
+ if (qf_list_empty(qi, qf_idx))
+! /* For empty lists, qf_index is set to 1 */
+ idx = 0;
+ return dict_add_number(retdict, "idx", idx);
+ }
+--- 6005,6011 ----
+ {
+ int idx = qi->qf_lists[qf_idx].qf_index;
+ if (qf_list_empty(qi, qf_idx))
+! // For empty lists, qf_index is set to 1
+ idx = 0;
+ return dict_add_number(retdict, "idx", idx);
+ }
+***************
+*** 6116,6122 ****
+ if (!qf_stack_empty(qi))
+ qf_idx = qf_getprop_qfidx(qi, what);
+
+! /* List is not present or is empty */
+ if (qf_stack_empty(qi) || qf_idx == INVALID_QFIDX)
+ return qf_getprop_defaults(qi, flags, retdict);
+
+--- 6036,6042 ----
+ if (!qf_stack_empty(qi))
+ qf_idx = qf_getprop_qfidx(qi, what);
+
+! // List is not present or is empty
+ if (qf_stack_empty(qi) || qf_idx == INVALID_QFIDX)
+ return qf_getprop_defaults(qi, flags, retdict);
+
+***************
+*** 6243,6255 ****
+
+ if (action == ' ' || qf_idx == qi->qf_listcount)
+ {
+! /* make place for a new list */
+ qf_new_list(qi, title);
+ qf_idx = qi->qf_curlist;
+ qfl = &qi->qf_lists[qf_idx];
+ }
+ else if (action == 'a' && !qf_list_empty(qi, qf_idx))
+! /* Adding to existing list, use last entry. */
+ old_last = qfl->qf_last;
+ else if (action == 'r')
+ {
+--- 6163,6175 ----
+
+ if (action == ' ' || qf_idx == qi->qf_listcount)
+ {
+! // make place for a new list
+ qf_new_list(qi, title);
+ qf_idx = qi->qf_curlist;
+ qfl = &qi->qf_lists[qf_idx];
+ }
+ else if (action == 'a' && !qf_list_empty(qi, qf_idx))
+! // Adding to existing list, use last entry.
+ old_last = qfl->qf_last;
+ else if (action == 'r')
+ {
+***************
+*** 6260,6266 ****
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+ {
+ if (li->li_tv.v_type != VAR_DICT)
+! continue; /* Skip non-dict items */
+
+ d = li->li_tv.vval.v_dict;
+ if (d == NULL)
+--- 6180,6186 ----
+ for (li = list->lv_first; li != NULL; li = li->li_next)
+ {
+ if (li->li_tv.v_type != VAR_DICT)
+! continue; // Skip non-dict items
+
+ d = li->li_tv.vval.v_dict;
+ if (d == NULL)
+***************
+*** 6272,6278 ****
+ }
+
+ if (qfl->qf_index == 0)
+! /* no valid entry */
+ qfl->qf_nonevalid = TRUE;
+ else
+ qfl->qf_nonevalid = FALSE;
+--- 6192,6198 ----
+ }
+
+ if (qfl->qf_index == 0)
+! // no valid entry
+ qfl->qf_nonevalid = TRUE;
+ else
+ qfl->qf_nonevalid = FALSE;
+***************
+*** 6283,6289 ****
+ qfl->qf_index = 1;
+ }
+
+! /* Don't update the cursor in quickfix window when appending entries */
+ qf_update_buffer(qi, old_last);
+
+ return retval;
+--- 6203,6209 ----
+ qfl->qf_index = 1;
+ }
+
+! // Don't update the cursor in quickfix window when appending entries
+ qf_update_buffer(qi, old_last);
+
+ return retval;
+***************
+*** 6300,6330 ****
+ int *newlist)
+ {
+ dictitem_T *di;
+! int qf_idx = qi->qf_curlist; /* default is the current list */
+
+ if ((di = dict_find(what, (char_u *)"nr", -1)) != NULL)
+ {
+! /* Use the specified quickfix/location list */
+ if (di->di_tv.v_type == VAR_NUMBER)
+ {
+! /* for zero use the current list */
+ if (di->di_tv.vval.v_number != 0)
+ qf_idx = di->di_tv.vval.v_number - 1;
+
+ if ((action == ' ' || action == 'a') && qf_idx == qi->qf_listcount)
+ {
+! /*
+! * When creating a new list, accept qf_idx pointing to the next
+! * non-available list and add the new list at the end of the
+! * stack.
+! */
+ *newlist = TRUE;
+ qf_idx = qf_stack_empty(qi) ? 0 : qi->qf_listcount - 1;
+ }
+ else if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
+ return INVALID_QFIDX;
+ else if (action != ' ')
+! *newlist = FALSE; /* use the specified list */
+ }
+ else if (di->di_tv.v_type == VAR_STRING
+ && di->di_tv.vval.v_string != NULL
+--- 6220,6248 ----
+ int *newlist)
+ {
+ dictitem_T *di;
+! int qf_idx = qi->qf_curlist; // default is the current list
+
+ if ((di = dict_find(what, (char_u *)"nr", -1)) != NULL)
+ {
+! // Use the specified quickfix/location list
+ if (di->di_tv.v_type == VAR_NUMBER)
+ {
+! // for zero use the current list
+ if (di->di_tv.vval.v_number != 0)
+ qf_idx = di->di_tv.vval.v_number - 1;
+
+ if ((action == ' ' || action == 'a') && qf_idx == qi->qf_listcount)
+ {
+! // When creating a new list, accept qf_idx pointing to the next
+! // non-available list and add the new list at the end of the
+! // stack.
+ *newlist = TRUE;
+ qf_idx = qf_stack_empty(qi) ? 0 : qi->qf_listcount - 1;
+ }
+ else if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
+ return INVALID_QFIDX;
+ else if (action != ' ')
+! *newlist = FALSE; // use the specified list
+ }
+ else if (di->di_tv.v_type == VAR_STRING
+ && di->di_tv.vval.v_string != NULL
+***************
+*** 6343,6349 ****
+
+ if (!*newlist && (di = dict_find(what, (char_u *)"id", -1)) != NULL)
+ {
+! /* Use the quickfix/location list with the specified id */
+ if (di->di_tv.v_type != VAR_NUMBER)
+ return INVALID_QFIDX;
+
+--- 6261,6267 ----
+
+ if (!*newlist && (di = dict_find(what, (char_u *)"id", -1)) != NULL)
+ {
+! // Use the quickfix/location list with the specified id
+ if (di->di_tv.v_type != VAR_NUMBER)
+ return INVALID_QFIDX;
+
+***************
+*** 6406,6412 ****
+ dictitem_T *efm_di;
+ int retval = FAIL;
+
+! /* Use the user supplied errorformat settings (if present) */
+ if ((efm_di = dict_find(what, (char_u *)"efm", -1)) != NULL)
+ {
+ if (efm_di->di_tv.v_type != VAR_STRING ||
+--- 6324,6330 ----
+ dictitem_T *efm_di;
+ int retval = FAIL;
+
+! // Use the user supplied errorformat settings (if present)
+ if ((efm_di = dict_find(what, (char_u *)"efm", -1)) != NULL)
+ {
+ if (efm_di->di_tv.v_type != VAR_STRING ||
+***************
+*** 6415,6421 ****
+ errorformat = efm_di->di_tv.vval.v_string;
+ }
+
+! /* Only a List value is supported */
+ if (di->di_tv.v_type != VAR_LIST || di->di_tv.vval.v_list == NULL)
+ return FAIL;
+
+--- 6333,6339 ----
+ errorformat = efm_di->di_tv.vval.v_string;
+ }
+
+! // Only a List value is supported
+ if (di->di_tv.v_type != VAR_LIST || di->di_tv.vval.v_list == NULL)
+ return FAIL;
+
+***************
+*** 6462,6468 ****
+ newlist = TRUE;
+
+ qf_idx = qf_setprop_get_qfidx(qi, what, action, &newlist);
+! if (qf_idx == INVALID_QFIDX) /* List not found */
+ return FAIL;
+
+ if (newlist)
+--- 6380,6386 ----
+ newlist = TRUE;
+
+ qf_idx = qf_setprop_get_qfidx(qi, what, action, &newlist);
+! if (qf_idx == INVALID_QFIDX) // List not found
+ return FAIL;
+
+ if (newlist)
+***************
+*** 6516,6522 ****
+
+ if (qfwin != NULL)
+ {
+! /* If the quickfix/location list window is open, then clear it */
+ if (qi->qf_curlist < qi->qf_listcount)
+ qf_free(&qi->qf_lists[qi->qf_curlist]);
+ qf_update_buffer(qi, NULL);
+--- 6434,6440 ----
+
+ if (qfwin != NULL)
+ {
+! // If the quickfix/location list window is open, then clear it
+ if (qi->qf_curlist < qi->qf_listcount)
+ qf_free(&qi->qf_lists[qi->qf_curlist]);
+ qf_update_buffer(qi, NULL);
+***************
+*** 6524,6532 ****
+
+ if (wp != NULL && IS_LL_WINDOW(wp))
+ {
+! /* If in the location list window, then use the non-location list
+! * window with this location list (if present)
+! */
+ llwin = find_win_with_ll(qi);
+ if (llwin != NULL)
+ wp = llwin;
+--- 6442,6449 ----
+
+ if (wp != NULL && IS_LL_WINDOW(wp))
+ {
+! // If in the location list window, then use the non-location list
+! // window with this location list (if present)
+ llwin = find_win_with_ll(qi);
+ if (llwin != NULL)
+ wp = llwin;
+***************
+*** 6535,6551 ****
+ qf_free_all(wp);
+ if (wp == NULL)
+ {
+! /* quickfix list */
+ qi->qf_curlist = 0;
+ qi->qf_listcount = 0;
+ }
+ else if (IS_LL_WINDOW(orig_wp))
+ {
+! /* If the location list window is open, then create a new empty
+! * location list */
+ qf_info_T *new_ll = ll_new_list();
+
+! /* first free the list reference in the location list window */
+ ll_free_all(&orig_wp->w_llist_ref);
+
+ orig_wp->w_llist_ref = new_ll;
+--- 6452,6468 ----
+ qf_free_all(wp);
+ if (wp == NULL)
+ {
+! // quickfix list
+ qi->qf_curlist = 0;
+ qi->qf_listcount = 0;
+ }
+ else if (IS_LL_WINDOW(orig_wp))
+ {
+! // If the location list window is open, then create a new empty
+! // location list
+ qf_info_T *new_ll = ll_new_list();
+
+! // first free the list reference in the location list window
+ ll_free_all(&orig_wp->w_llist_ref);
+
+ orig_wp->w_llist_ref = new_ll;
+***************
+*** 6582,6588 ****
+
+ if (action == 'f')
+ {
+! /* Free the entire quickfix or location list stack */
+ qf_free_stack(wp, qi);
+ }
+ else if (what != NULL)
+--- 6499,6505 ----
+
+ if (action == 'f')
+ {
+! // Free the entire quickfix or location list stack
+ qf_free_stack(wp, qi);
+ }
+ else if (what != NULL)
+***************
+*** 6643,6652 ****
+ }
+ if (IS_LL_WINDOW(win) && (win->w_llist_ref->qf_refcount == 1))
+ {
+! /* In a location list window and none of the other windows is
+! * referring to this location list. Mark the location list
+! * context as still in use.
+! */
+ abort = mark_quickfix_ctx(win->w_llist_ref, copyID);
+ if (abort)
+ return abort;
+--- 6560,6568 ----
+ }
+ if (IS_LL_WINDOW(win) && (win->w_llist_ref->qf_refcount == 1))
+ {
+! // In a location list window and none of the other windows is
+! // referring to this location list. Mark the location list
+! // context as still in use.
+ abort = mark_quickfix_ctx(win->w_llist_ref, copyID);
+ if (abort)
+ return abort;
+***************
+*** 6694,6700 ****
+ #endif
+ }
+
+! /* Must come after autocommands. */
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = ll_get_or_alloc_list(curwin);
+--- 6610,6616 ----
+ #endif
+ }
+
+! // Must come after autocommands.
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+ qi = ll_get_or_alloc_list(curwin);
+***************
+*** 6807,6814 ****
+ wp = curwin;
+ }
+
+! /* Evaluate the expression. When the result is a string or a list we can
+! * use it to fill the errorlist. */
+ tv = eval_expr(eap->arg, NULL);
+ if (tv != NULL)
+ {
+--- 6723,6730 ----
+ wp = curwin;
+ }
+
+! // Evaluate the expression. When the result is a string or a list we can
+! // use it to fill the errorlist.
+ tv = eval_expr(eap->arg, NULL);
+ if (tv != NULL)
+ {
+***************
+*** 6854,6874 ****
+ win_T *wp;
+ qf_info_T *qi;
+
+! /* If the current window is a help window, then use it */
+ if (bt_help(curwin->w_buffer))
+ wp = curwin;
+ else
+! /* Find an existing help window */
+ wp = qf_find_help_win();
+
+! if (wp == NULL) /* Help window not found */
+ qi = NULL;
+ else
+ qi = wp->w_llist;
+
+ if (qi == NULL)
+ {
+! /* Allocate a new location list for help text matches */
+ if ((qi = ll_new_list()) == NULL)
+ return NULL;
+ *new_ll = TRUE;
+--- 6770,6790 ----
+ win_T *wp;
+ qf_info_T *qi;
+
+! // If the current window is a help window, then use it
+ if (bt_help(curwin->w_buffer))
+ wp = curwin;
+ else
+! // Find an existing help window
+ wp = qf_find_help_win();
+
+! if (wp == NULL) // Help window not found
+ qi = NULL;
+ else
+ qi = wp->w_llist;
+
+ if (qi == NULL)
+ {
+! // Allocate a new location list for help text matches
+ if ((qi = ll_new_list()) == NULL)
+ return NULL;
+ *new_ll = TRUE;
+***************
+*** 6901,6908 ****
+ {
+ char_u *line = IObuff;
+ #ifdef FEAT_MBYTE
+! /* Convert a line if 'encoding' is not utf-8 and
+! * the line contains a non-ASCII character. */
+ if (p_vc->vc_type != CONV_NONE
+ && has_non_ascii(IObuff))
+ {
+--- 6817,6824 ----
+ {
+ char_u *line = IObuff;
+ #ifdef FEAT_MBYTE
+! // Convert a line if 'encoding' is not utf-8 and
+! // the line contains a non-ASCII character.
+ if (p_vc->vc_type != CONV_NONE
+ && has_non_ascii(IObuff))
+ {
+***************
+*** 6916,6940 ****
+ {
+ int l = (int)STRLEN(line);
+
+! /* remove trailing CR, LF, spaces, etc. */
+ while (l > 0 && line[l - 1] <= ' ')
+ line[--l] = NUL;
+
+ if (qf_add_entry(qi,
+ qi->qf_curlist,
+! NULL, /* dir */
+ fname,
+ NULL,
+ 0,
+ line,
+ lnum,
+ (int)(p_regmatch->startp[0] - line)
+! + 1, /* col */
+! FALSE, /* vis_col */
+! NULL, /* search pattern */
+! 0, /* nr */
+! 1, /* type */
+! TRUE /* valid */
+ ) == FAIL)
+ {
+ got_int = TRUE;
+--- 6832,6856 ----
+ {
+ int l = (int)STRLEN(line);
+
+! // remove trailing CR, LF, spaces, etc.
+ while (l > 0 && line[l - 1] <= ' ')
+ line[--l] = NUL;
+
+ if (qf_add_entry(qi,
+ qi->qf_curlist,
+! NULL, // dir
+ fname,
+ NULL,
+ 0,
+ line,
+ lnum,
+ (int)(p_regmatch->startp[0] - line)
+! + 1, // col
+! FALSE, // vis_col
+! NULL, // search pattern
+! 0, // nr
+! 1, // type
+! TRUE // valid
+ ) == FAIL)
+ {
+ got_int = TRUE;
+***************
+*** 6976,6982 ****
+ char_u **fnames;
+ int fi;
+
+! /* Find all "*.txt" and "*.??x" files in the "doc" directory. */
+ add_pathsep(dirname);
+ STRCAT(dirname, "doc/*.\\(txt\\|??x\\)");
+ if (gen_expand_wildcards(1, &dirname, &fcount,
+--- 6892,6898 ----
+ char_u **fnames;
+ int fi;
+
+! // Find all "*.txt" and "*.??x" files in the "doc" directory.
+ add_pathsep(dirname);
+ STRCAT(dirname, "doc/*.\\(txt\\|??x\\)");
+ if (gen_expand_wildcards(1, &dirname, &fcount,
+***************
+*** 6986,6992 ****
+ for (fi = 0; fi < fcount && !got_int; ++fi)
+ {
+ #ifdef FEAT_MULTI_LANG
+! /* Skip files for a different language. */
+ if (lang != NULL
+ && STRNICMP(lang, fnames[fi]
+ + STRLEN(fnames[fi]) - 3, 2) != 0
+--- 6902,6908 ----
+ for (fi = 0; fi < fcount && !got_int; ++fi)
+ {
+ #ifdef FEAT_MULTI_LANG
+! // Skip files for a different language.
+ if (lang != NULL
+ && STRNICMP(lang, fnames[fi]
+ + STRLEN(fnames[fi]) - 3, 2) != 0
+***************
+*** 7020,7034 ****
+ #ifdef FEAT_MBYTE
+ vimconv_T vc;
+
+! /* Help files are in utf-8 or latin1, convert lines when 'encoding'
+! * differs. */
+ vc.vc_type = CONV_NONE;
+ if (!enc_utf8)
+ convert_setup(&vc, (char_u *)"utf-8", p_enc);
+ #endif
+
+
+! /* Go through all the directories in 'runtimepath' */
+ p = p_rtp;
+ while (*p != NUL && !got_int)
+ {
+--- 6936,6950 ----
+ #ifdef FEAT_MBYTE
+ vimconv_T vc;
+
+! // Help files are in utf-8 or latin1, convert lines when 'encoding'
+! // differs.
+ vc.vc_type = CONV_NONE;
+ if (!enc_utf8)
+ convert_setup(&vc, (char_u *)"utf-8", p_enc);
+ #endif
+
+
+! // Go through all the directories in 'runtimepath'
+ p = p_rtp;
+ while (*p != NUL && !got_int)
+ {
+***************
+*** 7124,7134 ****
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+ if (!new_qi && IS_LL_STACK(qi) && qf_find_buf(qi) == NULL)
+! /* autocommands made "qi" invalid */
+ return;
+ }
+
+! /* Jump to first match. */
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, FALSE);
+ else
+--- 7040,7050 ----
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+ if (!new_qi && IS_LL_STACK(qi) && qf_find_buf(qi) == NULL)
+! // autocommands made "qi" invalid
+ return;
+ }
+
+! // Jump to first match.
+ if (!qf_list_empty(qi, qi->qf_curlist))
+ qf_jump(qi, 0, 0, FALSE);
+ else
+*** ../vim-8.1.0460/src/version.c 2018-10-07 20:14:53.091279680 +0200
+--- src/version.c 2018-10-07 20:25:44.858426041 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 461,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+169. You hire a housekeeper for your home page.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0462 b/data/vim/patches/8.1.0462
new file mode 100644
index 000000000..dbf8176c3
--- /dev/null
+++ b/data/vim/patches/8.1.0462
@@ -0,0 +1,115 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0462
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0462
+Problem: When using ConPTY Vim can be a child process.
+Solution: To find a Vim window use both EnumWindows() and
+ EnumChildWindows(). (Nobuhiro Takasaki, closes #3521)
+Files: src/os_mswin.c
+
+
+*** ../vim-8.1.0461/src/os_mswin.c 2018-08-07 22:30:26.674240818 +0200
+--- src/os_mswin.c 2018-10-07 20:32:20.655313848 +0200
+***************
+*** 2324,2329 ****
+--- 2324,2364 ----
+ return TRUE;
+ }
+
++ struct enum_windows_s
++ {
++ WNDENUMPROC lpEnumFunc;
++ LPARAM lParam;
++ };
++
++ static BOOL CALLBACK
++ enum_windows_child(HWND hwnd, LPARAM lParam)
++ {
++ struct enum_windows_s *ew = (struct enum_windows_s *)lParam;
++
++ return (ew->lpEnumFunc)(hwnd, ew->lParam);
++ }
++
++ static BOOL CALLBACK
++ enum_windows_toplevel(HWND hwnd, LPARAM lParam)
++ {
++ struct enum_windows_s *ew = (struct enum_windows_s *)lParam;
++
++ if ((ew->lpEnumFunc)(hwnd, ew->lParam) == FALSE)
++ return FALSE;
++ return EnumChildWindows(hwnd, enum_windows_child, lParam);
++ }
++
++ /* Enumerate all windows including children. */
++ static BOOL
++ enum_windows(WNDENUMPROC lpEnumFunc, LPARAM lParam)
++ {
++ struct enum_windows_s ew;
++
++ ew.lpEnumFunc = lpEnumFunc;
++ ew.lParam = lParam;
++ return EnumWindows(enum_windows_toplevel, (LPARAM)&ew);
++ }
++
+ static HWND
+ findServer(char_u *name)
+ {
+***************
+*** 2332,2338 ****
+ id.name = name;
+ id.hwnd = 0;
+
+! EnumWindows(enumWindowsGetServer, (LPARAM)(&id));
+
+ return id.hwnd;
+ }
+--- 2367,2373 ----
+ id.name = name;
+ id.hwnd = 0;
+
+! enum_windows(enumWindowsGetServer, (LPARAM)(&id));
+
+ return id.hwnd;
+ }
+***************
+*** 2395,2401 ****
+
+ ga_init2(&ga, 1, 100);
+
+! EnumWindows(enumWindowsGetNames, (LPARAM)(&ga));
+ ga_append(&ga, NUL);
+
+ return ga.ga_data;
+--- 2430,2436 ----
+
+ ga_init2(&ga, 1, 100);
+
+! enum_windows(enumWindowsGetNames, (LPARAM)(&ga));
+ ga_append(&ga, NUL);
+
+ return ga.ga_data;
+*** ../vim-8.1.0461/src/version.c 2018-10-07 20:26:15.834185143 +0200
+--- src/version.c 2018-10-07 20:34:15.754398574 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 462,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+170. You introduce your wife as "my_lady@home.wife" and refer to your
+ children as "forked processes."
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0463 b/data/vim/patches/8.1.0463
new file mode 100644
index 000000000..f29b6f050
--- /dev/null
+++ b/data/vim/patches/8.1.0463
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0463
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0463
+Problem: "simalt ~x" in .vimrc blocks swap file prompt.
+Solution: Flush buffers before prompting. (Yasuhiro Matsumoto,
+ closes #3518, closes #2192)
+Files: src/memline.c
+
+
+*** ../vim-8.1.0462/src/memline.c 2018-09-30 21:43:17.195693290 +0200
+--- src/memline.c 2018-10-07 20:43:37.409061819 +0200
+***************
+*** 4506,4524 ****
+ #endif
+ {
+ #ifdef FEAT_GUI
+! /* If we are supposed to start the GUI but it wasn't
+! * completely started yet, start it now. This makes
+! * the messages displayed in the Vim window when
+! * loading a session from the .gvimrc file. */
+ if (gui.starting && !gui.in_use)
+ gui_start();
+ #endif
+! /* Show info about the existing swap file. */
+ attention_message(buf, fname);
+
+! /* We don't want a 'q' typed at the more-prompt
+! * interrupt loading a file. */
+ got_int = FALSE;
+ }
+
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+--- 4506,4528 ----
+ #endif
+ {
+ #ifdef FEAT_GUI
+! // If we are supposed to start the GUI but it wasn't
+! // completely started yet, start it now. This makes
+! // the messages displayed in the Vim window when
+! // loading a session from the .gvimrc file.
+ if (gui.starting && !gui.in_use)
+ gui_start();
+ #endif
+! // Show info about the existing swap file.
+ attention_message(buf, fname);
+
+! // We don't want a 'q' typed at the more-prompt
+! // interrupt loading a file.
+ got_int = FALSE;
++
++ // If vimrc has "simalt ~x" we don't want it to
++ // interfere with the prompt here.
++ flush_buffers(TRUE);
+ }
+
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+*** ../vim-8.1.0462/src/version.c 2018-10-07 20:35:08.853975271 +0200
+--- src/version.c 2018-10-07 20:45:08.083893253 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 463,
+ /**/
+
+--
+ Very funny, Scotty. Now beam down my clothes.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0464 b/data/vim/patches/8.1.0464
new file mode 100644
index 000000000..4a922e8f4
--- /dev/null
+++ b/data/vim/patches/8.1.0464
@@ -0,0 +1,94 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0464
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0464
+Problem: MS-Windows: job_info() has cmd without backslashes. (Daniel
+ Hahler)
+Solution: Use rem_backslash(). (closes #3517, closes #3404)
+Files: src/misc2.c, src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0463/src/misc2.c 2018-09-30 21:43:17.195693290 +0200
+--- src/misc2.c 2018-10-07 21:31:14.560595004 +0200
+***************
+*** 6458,6471 ****
+ while (*p != NUL && (inquote || (*p != ' ' && *p != TAB)))
+ {
+ if (p[0] == '"')
+! /* quotes surrounding an argument and are dropped */
+ inquote = !inquote;
+ else
+ {
+! if (p[0] == '\\' && p[1] != NUL)
+ {
+! /* First pass: skip over "\ " and "\"".
+! * Second pass: Remove the backslash. */
+ ++p;
+ }
+ if (i == 1)
+--- 6458,6471 ----
+ while (*p != NUL && (inquote || (*p != ' ' && *p != TAB)))
+ {
+ if (p[0] == '"')
+! // quotes surrounding an argument and are dropped
+ inquote = !inquote;
+ else
+ {
+! if (rem_backslash(p))
+ {
+! // First pass: skip over "\ " and "\"".
+! // Second pass: Remove the backslash.
+ ++p;
+ }
+ if (i == 1)
+*** ../vim-8.1.0463/src/testdir/test_channel.vim 2018-09-06 16:27:20.664831945 +0200
+--- src/testdir/test_channel.vim 2018-10-07 21:34:54.394554136 +0200
+***************
+*** 1721,1726 ****
+--- 1721,1742 ----
+ call WaitForAssert({-> assert_equal(1, g:linecount)})
+ endfunc
+
++ func Test_job_start_windows()
++ if !has('job') || !has('win32')
++ return
++ endif
++
++ " Check that backslash in $COMSPEC is handled properly.
++ let g:echostr = ''
++ let cmd = $COMSPEC . ' /c echo 123'
++ let job = job_start(cmd, {'callback': {ch,msg -> execute(":let g:echostr .= msg")}})
++ let info = job_info(job)
++ call assert_equal([$COMSPEC, '/c', 'echo', '123'], info.cmd)
++
++ call WaitForAssert({-> assert_equal("123", g:echostr)})
++ unlet g:echostr
++ endfunc
++
+ func Test_env()
+ if !has('job')
+ return
+*** ../vim-8.1.0463/src/version.c 2018-10-07 20:48:33.941433087 +0200
+--- src/version.c 2018-10-07 21:35:44.446090534 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 464,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+172. You join listservers just for the extra e-mail.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0465 b/data/vim/patches/8.1.0465
new file mode 100644
index 000000000..1f97a2c26
--- /dev/null
+++ b/data/vim/patches/8.1.0465
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0465
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0465 (after 8.1.0452)
+Problem: Client-server test fails.
+Solution: Change logic in EnumWindows().
+Files: src/os_mswin.c
+
+
+*** ../vim-8.1.0464/src/os_mswin.c 2018-10-07 20:35:08.853975271 +0200
+--- src/os_mswin.c 2018-10-07 22:44:57.088965618 +0200
+***************
+*** 2343,2350 ****
+ {
+ struct enum_windows_s *ew = (struct enum_windows_s *)lParam;
+
+! if ((ew->lpEnumFunc)(hwnd, ew->lParam) == FALSE)
+! return FALSE;
+ return EnumChildWindows(hwnd, enum_windows_child, lParam);
+ }
+
+--- 2343,2350 ----
+ {
+ struct enum_windows_s *ew = (struct enum_windows_s *)lParam;
+
+! if ((ew->lpEnumFunc)(hwnd, ew->lParam))
+! return TRUE;
+ return EnumChildWindows(hwnd, enum_windows_child, lParam);
+ }
+
+*** ../vim-8.1.0464/src/version.c 2018-10-07 21:36:07.389878130 +0200
+--- src/version.c 2018-10-07 22:46:35.565465599 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 465,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+173. You keep tracking down the email addresses of all your friends
+ (even childhood friends).
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0466 b/data/vim/patches/8.1.0466
new file mode 100644
index 000000000..414d1073e
--- /dev/null
+++ b/data/vim/patches/8.1.0466
@@ -0,0 +1,264 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0466
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0466 (after 8.1.0463)
+Problem: Autocmd test fails.
+Solution: Do call inchar() when flushing typeahead.
+Files: src/vim.h, src/getchar.c, src/proto/getchar.pro, src/memline.c,
+ src/message.c, src/misc1.c
+
+
+*** ../vim-8.1.0465/src/vim.h 2018-09-18 22:29:59.888041388 +0200
+--- src/vim.h 2018-10-07 23:01:47.537604844 +0200
+***************
+*** 2108,2113 ****
+--- 2108,2120 ----
+ PASTE_ONE_CHAR /* return first character */
+ } paste_mode_T;
+
++ // Argument for flush_buffers().
++ typedef enum {
++ FLUSH_MINIMAL,
++ FLUSH_TYPEAHEAD, // flush current typebuf contents
++ FLUSH_INPUT // flush typebuf and inchar() input
++ } flush_buffers_T;
++
+ #include "ex_cmds.h" /* Ex command defines */
+ #include "spell.h" /* spell checking stuff */
+
+*** ../vim-8.1.0465/src/getchar.c 2018-09-30 21:43:17.187693348 +0200
+--- src/getchar.c 2018-10-07 23:05:48.079859873 +0200
+***************
+*** 438,444 ****
+ * flush all typeahead characters (used when interrupted by a CTRL-C).
+ */
+ void
+! flush_buffers(int flush_typeahead)
+ {
+ init_typebuf();
+
+--- 438,444 ----
+ * flush all typeahead characters (used when interrupted by a CTRL-C).
+ */
+ void
+! flush_buffers(flush_buffers_T flush_typeahead)
+ {
+ init_typebuf();
+
+***************
+*** 446,460 ****
+ while (read_readbuffers(TRUE) != NUL)
+ ;
+
+! if (flush_typeahead) /* remove all typeahead */
+ {
+! /*
+! * We have to get all characters, because we may delete the first part
+! * of an escape sequence.
+! * In an xterm we get one char at a time and we have to get them all.
+! */
+! while (inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 10L) != 0)
+! ;
+ typebuf.tb_off = MAXMAPLEN;
+ typebuf.tb_len = 0;
+ #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+--- 446,466 ----
+ while (read_readbuffers(TRUE) != NUL)
+ ;
+
+! if (flush_typeahead == FLUSH_MINIMAL)
+ {
+! // remove mapped characters at the start only
+! typebuf.tb_off += typebuf.tb_maplen;
+! typebuf.tb_len -= typebuf.tb_maplen;
+! }
+! else
+! {
+! // remove typeahead
+! if (flush_typeahead == FLUSH_INPUT)
+! // We have to get all characters, because we may delete the first
+! // part of an escape sequence. In an xterm we get one char at a
+! // time and we have to get them all.
+! while (inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 10L) != 0)
+! ;
+ typebuf.tb_off = MAXMAPLEN;
+ typebuf.tb_len = 0;
+ #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+***************
+*** 463,473 ****
+ typebuf_was_filled = FALSE;
+ #endif
+ }
+- else /* remove mapped characters at the start only */
+- {
+- typebuf.tb_off += typebuf.tb_maplen;
+- typebuf.tb_len -= typebuf.tb_maplen;
+- }
+ typebuf.tb_maplen = 0;
+ typebuf.tb_silent = 0;
+ cmd_silent = FALSE;
+--- 469,474 ----
+***************
+*** 1858,1863 ****
+--- 1859,1865 ----
+ * Check if a character is available, such that vgetc() will not block.
+ * If the next character is a special character or multi-byte, the returned
+ * character is not valid!.
++ * Returns NUL if no character is available.
+ */
+ int
+ vpeekc(void)
+***************
+*** 1956,1962 ****
+ * KeyTyped is set to TRUE in the case the user typed the key.
+ * KeyStuffed is TRUE if the character comes from the stuff buffer.
+ * if "advance" is FALSE (vpeekc()):
+! * just look whether there is a character available.
+ *
+ * When "no_mapping" is zero, checks for mappings in the current mode.
+ * Only returns one byte (of a multi-byte character).
+--- 1958,1965 ----
+ * KeyTyped is set to TRUE in the case the user typed the key.
+ * KeyStuffed is TRUE if the character comes from the stuff buffer.
+ * if "advance" is FALSE (vpeekc()):
+! * Just look whether there is a character available.
+! * Return NUL if not.
+ *
+ * When "no_mapping" is zero, checks for mappings in the current mode.
+ * Only returns one byte (of a multi-byte character).
+***************
+*** 2084,2090 ****
+ c = ESC;
+ else
+ c = Ctrl_C;
+! flush_buffers(TRUE); /* flush all typeahead */
+
+ if (advance)
+ {
+--- 2087,2093 ----
+ c = ESC;
+ else
+ c = Ctrl_C;
+! flush_buffers(FLUSH_INPUT); // flush all typeahead
+
+ if (advance)
+ {
+***************
+*** 2510,2516 ****
+ redrawcmdline();
+ else
+ setcursor();
+! flush_buffers(FALSE);
+ mapdepth = 0; /* for next one */
+ c = -1;
+ break;
+--- 2513,2519 ----
+ redrawcmdline();
+ else
+ setcursor();
+! flush_buffers(FLUSH_MINIMAL);
+ mapdepth = 0; /* for next one */
+ c = -1;
+ break;
+*** ../vim-8.1.0465/src/proto/getchar.pro 2018-05-17 13:52:36.000000000 +0200
+--- src/proto/getchar.pro 2018-10-07 23:07:15.159189769 +0200
+***************
+*** 5,11 ****
+ int stuff_empty(void);
+ int readbuf1_empty(void);
+ void typeahead_noflush(int c);
+! void flush_buffers(int flush_typeahead);
+ void ResetRedobuff(void);
+ void CancelRedo(void);
+ void saveRedobuff(save_redo_T *save_redo);
+--- 5,11 ----
+ int stuff_empty(void);
+ int readbuf1_empty(void);
+ void typeahead_noflush(int c);
+! void flush_buffers(flush_buffers_T flush_typeahead);
+ void ResetRedobuff(void);
+ void CancelRedo(void);
+ void saveRedobuff(save_redo_T *save_redo);
+*** ../vim-8.1.0465/src/memline.c 2018-10-07 20:48:33.941433087 +0200
+--- src/memline.c 2018-10-07 23:06:02.015753778 +0200
+***************
+*** 4522,4528 ****
+
+ // If vimrc has "simalt ~x" we don't want it to
+ // interfere with the prompt here.
+! flush_buffers(TRUE);
+ }
+
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+--- 4522,4528 ----
+
+ // If vimrc has "simalt ~x" we don't want it to
+ // interfere with the prompt here.
+! flush_buffers(FLUSH_TYPEAHEAD);
+ }
+
+ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+*** ../vim-8.1.0465/src/message.c 2018-09-30 21:43:17.195693290 +0200
+--- src/message.c 2018-10-07 23:06:29.651542067 +0200
+***************
+*** 688,695 ****
+ if (p_eb)
+ beep_flush(); /* also includes flush_buffers() */
+ else
+! flush_buffers(FALSE); /* flush internal buffers */
+! did_emsg = TRUE; /* flag for DoOneCmd() */
+ #ifdef FEAT_EVAL
+ did_uncaught_emsg = TRUE;
+ #endif
+--- 688,695 ----
+ if (p_eb)
+ beep_flush(); /* also includes flush_buffers() */
+ else
+! flush_buffers(FLUSH_MINIMAL); // flush internal buffers
+! did_emsg = TRUE; // flag for DoOneCmd()
+ #ifdef FEAT_EVAL
+ did_uncaught_emsg = TRUE;
+ #endif
+*** ../vim-8.1.0465/src/misc1.c 2018-09-30 21:43:17.195693290 +0200
+--- src/misc1.c 2018-10-07 23:07:05.159267560 +0200
+***************
+*** 3825,3831 ****
+ {
+ if (emsg_silent == 0)
+ {
+! flush_buffers(FALSE);
+ vim_beep(BO_ERROR);
+ }
+ }
+--- 3825,3831 ----
+ {
+ if (emsg_silent == 0)
+ {
+! flush_buffers(FLUSH_MINIMAL);
+ vim_beep(BO_ERROR);
+ }
+ }
+*** ../vim-8.1.0465/src/version.c 2018-10-07 22:47:03.633199859 +0200
+--- src/version.c 2018-10-07 23:04:59.372226904 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 466,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+174. You know what a listserv is.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0467 b/data/vim/patches/8.1.0467
new file mode 100644
index 000000000..f8de9c1f7
--- /dev/null
+++ b/data/vim/patches/8.1.0467
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0467
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0467 (after 8.1.0063)
+Problem: Cannot build with Mac OS X 10.5.
+Solution: Change #ifdef into #if. (Akshay Hegde, closes #3022)
+Files: src/os_macosx.m
+
+
+*** ../vim-8.1.0466/src/os_macosx.m 2018-06-17 15:01:00.580427088 +0200
+--- src/os_macosx.m 2018-10-08 20:04:24.931842964 +0200
+***************
+*** 63,69 ****
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
+! #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
+ NSPasteboardTypeString, nil];
+ #else
+--- 63,69 ----
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
+! #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
+ NSPasteboardTypeString, nil];
+ #else
+***************
+*** 99,105 ****
+ {
+ /* Use NSPasteboardTypeString. The motion type is detected automatically.
+ */
+! #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+ NSMutableString *mstring =
+ [[pb stringForType:NSPasteboardTypeString] mutableCopy];
+ #else
+--- 99,105 ----
+ {
+ /* Use NSPasteboardTypeString. The motion type is detected automatically.
+ */
+! #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+ NSMutableString *mstring =
+ [[pb stringForType:NSPasteboardTypeString] mutableCopy];
+ #else
+***************
+*** 188,194 ****
+
+ /* See clip_mch_request_selection() for info on pasteboard types. */
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
+! #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
+ NSPasteboardTypeString, nil];
+ #else
+--- 188,194 ----
+
+ /* See clip_mch_request_selection() for info on pasteboard types. */
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
+! #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+ NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
+ NSPasteboardTypeString, nil];
+ #else
+***************
+*** 201,207 ****
+ NSArray *plist = [NSArray arrayWithObjects:motion, string, nil];
+ [pb setPropertyList:plist forType:VimPboardType];
+
+! #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+ [pb setString:string forType:NSPasteboardTypeString];
+ #else
+ [pb setString:string forType:NSStringPboardType];
+--- 201,207 ----
+ NSArray *plist = [NSArray arrayWithObjects:motion, string, nil];
+ [pb setPropertyList:plist forType:VimPboardType];
+
+! #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+ [pb setString:string forType:NSPasteboardTypeString];
+ #else
+ [pb setString:string forType:NSStringPboardType];
+*** ../vim-8.1.0466/src/version.c 2018-10-07 23:16:33.138616197 +0200
+--- src/version.c 2018-10-08 20:06:28.090514727 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 467,
+ /**/
+
+--
+If Microsoft would build a car...
+... the oil, water temperature, and alternator warning lights would
+all be replaced by a single "General Protection Fault" warning light.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0468 b/data/vim/patches/8.1.0468
new file mode 100644
index 000000000..2da169a3d
--- /dev/null
+++ b/data/vim/patches/8.1.0468
@@ -0,0 +1,121 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0468
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0468
+Problem: MS-Windows: Filter command with pipe character fails. (Johannes
+ Riecken)
+Solution: Find the pipe character outside of quotes. (Yasuhiro Matsumoto,
+ closes #1743, closes #3523)
+Files: src/ex_cmds.c, src/testdir/test_filter_cmd.vim
+
+
+*** ../vim-8.1.0467/src/ex_cmds.c 2018-09-30 21:43:17.183693376 +0200
+--- src/ex_cmds.c 2018-10-09 21:46:24.968689863 +0200
+***************
+*** 1676,1681 ****
+--- 1676,1701 ----
+ apply_autocmds(EVENT_SHELLCMDPOST, NULL, NULL, FALSE, curbuf);
+ }
+
++ #if !defined(UNIX)
++ static char_u *
++ find_pipe(char_u *cmd)
++ {
++ char_u *p;
++ int inquote = FALSE;
++
++ for (p = cmd; *p != NUL; ++p)
++ {
++ if (!inquote && *p == '|')
++ return p;
++ if (*p == '"')
++ inquote = !inquote;
++ else if (rem_backslash(p))
++ ++p;
++ }
++ return NULL;
++ }
++ #endif
++
+ /*
+ * Create a shell command from a command string, input redirection file and
+ * output redirection file.
+***************
+*** 1746,1752 ****
+ */
+ if (*p_shq == NUL)
+ {
+! p = vim_strchr(buf, '|');
+ if (p != NULL)
+ *p = NUL;
+ }
+--- 1766,1772 ----
+ */
+ if (*p_shq == NUL)
+ {
+! p = find_pipe(buf);
+ if (p != NULL)
+ *p = NUL;
+ }
+***************
+*** 1754,1760 ****
+ STRCAT(buf, itmp);
+ if (*p_shq == NUL)
+ {
+! p = vim_strchr(cmd, '|');
+ if (p != NULL)
+ {
+ STRCAT(buf, " "); /* insert a space before the '|' for DOS */
+--- 1774,1780 ----
+ STRCAT(buf, itmp);
+ if (*p_shq == NUL)
+ {
+! p = find_pipe(cmd);
+ if (p != NULL)
+ {
+ STRCAT(buf, " "); /* insert a space before the '|' for DOS */
+*** ../vim-8.1.0467/src/testdir/test_filter_cmd.vim 2017-01-07 20:31:37.000000000 +0100
+--- src/testdir/test_filter_cmd.vim 2018-10-09 21:39:56.774210323 +0200
+***************
+*** 74,76 ****
+--- 74,89 ----
+ call assert_equal('filter /pat/ print', s:complete_filter_cmd('filter /pat/ pri'))
+ call assert_equal('filter #pat# print', s:complete_filter_cmd('filter #pat# pri'))
+ endfunc
++
++ func Test_filter_cmd_with_filter()
++ new
++ set shelltemp
++ %!echo "a|b"
++ let out = getline(1)
++ bw!
++ if has('win32')
++ let out = trim(out, '" ')
++ endif
++ call assert_equal('a|b', out)
++ set shelltemp&
++ endfunction
+*** ../vim-8.1.0467/src/version.c 2018-10-08 20:07:35.601823010 +0200
+--- src/version.c 2018-10-09 21:42:46.361698405 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 468,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+176. You lie, even to user-friends, about how long you were online yesterday.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0469 b/data/vim/patches/8.1.0469
new file mode 100644
index 000000000..71be8c173
--- /dev/null
+++ b/data/vim/patches/8.1.0469
@@ -0,0 +1,712 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0469
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0469
+Problem: Too often indexing in qf_lists[].
+Solution: Use a qf_list_T pointer. (Yegappan Lakshmanan)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0468/src/quickfix.c 2018-10-07 20:26:15.834185143 +0200
+--- src/quickfix.c 2018-10-11 17:37:51.185959011 +0200
+***************
+*** 1729,1735 ****
+ if (!adding)
+ {
+ // Error when creating a new list. Free the new list
+! qf_free(&qi->qf_lists[qi->qf_curlist]);
+ qi->qf_listcount--;
+ if (qi->qf_curlist > 0)
+ --qi->qf_curlist;
+--- 1729,1735 ----
+ if (!adding)
+ {
+ // Error when creating a new list. Free the new list
+! qf_free(qfl);
+ qi->qf_listcount--;
+ if (qi->qf_curlist > 0)
+ --qi->qf_curlist;
+***************
+*** 1812,1817 ****
+--- 1812,1818 ----
+ qf_new_list(qf_info_T *qi, char_u *qf_title)
+ {
+ int i;
++ qf_list_T *qfl;
+
+ // If the current entry is not the last entry, delete entries beyond
+ // the current entry. This makes it possible to browse in a tree-like
+***************
+*** 1830,1838 ****
+ }
+ else
+ qi->qf_curlist = qi->qf_listcount++;
+! vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
+! qf_store_title(&qi->qf_lists[qi->qf_curlist], qf_title);
+! qi->qf_lists[qi->qf_curlist].qf_id = ++last_qf_id;
+ }
+
+ /*
+--- 1831,1840 ----
+ }
+ else
+ qi->qf_curlist = qi->qf_listcount++;
+! qfl = &qi->qf_lists[qi->qf_curlist];
+! vim_memset(qfl, 0, (size_t)(sizeof(qf_list_T)));
+! qf_store_title(qfl, qf_title);
+! qfl->qf_id = ++last_qf_id;
+ }
+
+ /*
+***************
+*** 2149,2154 ****
+--- 2151,2157 ----
+ static int
+ qf_get_fnum(qf_info_T *qi, int qf_idx, char_u *directory, char_u *fname)
+ {
++ qf_list_T *qfl = &qi->qf_lists[qf_idx];
+ char_u *ptr = NULL;
+ buf_T *buf;
+ char_u *bufname;
+***************
+*** 2174,2180 ****
+ if (mch_getperm(ptr) < 0)
+ {
+ vim_free(ptr);
+! directory = qf_guess_filepath(&qi->qf_lists[qf_idx], fname);
+ if (directory)
+ ptr = concat_fnames(directory, fname, TRUE);
+ else
+--- 2177,2183 ----
+ if (mch_getperm(ptr) < 0)
+ {
+ vim_free(ptr);
+! directory = qf_guess_filepath(qfl, fname);
+ if (directory)
+ ptr = concat_fnames(directory, fname, TRUE);
+ else
+***************
+*** 3757,3762 ****
+--- 3760,3766 ----
+ ex_cwindow(exarg_T *eap)
+ {
+ qf_info_T *qi = &ql_info;
++ qf_list_T *qfl;
+ win_T *win;
+
+ if (is_loclist_cmd(eap->cmdidx))
+***************
+*** 3766,3771 ****
+--- 3770,3777 ----
+ return;
+ }
+
++ qfl = &qi->qf_lists[qi->qf_curlist];
++
+ // Look for an existing quickfix window.
+ win = qf_find_win(qi);
+
+***************
+*** 3773,3779 ****
+ // close the window. If a quickfix window is not open, then open
+ // it if we have errors; otherwise, leave it closed.
+ if (qf_stack_empty(qi)
+! || qi->qf_lists[qi->qf_curlist].qf_nonevalid
+ || qf_list_empty(qi, qi->qf_curlist))
+ {
+ if (win != NULL)
+--- 3779,3785 ----
+ // close the window. If a quickfix window is not open, then open
+ // it if we have errors; otherwise, leave it closed.
+ if (qf_stack_empty(qi)
+! || qfl->qf_nonevalid
+ || qf_list_empty(qi, qi->qf_curlist))
+ {
+ if (win != NULL)
+***************
+*** 3930,3935 ****
+--- 3936,3942 ----
+ ex_copen(exarg_T *eap)
+ {
+ qf_info_T *qi = &ql_info;
++ qf_list_T *qfl;
+ int height;
+ int status = FAIL;
+
+***************
+*** 3961,3972 ****
+ if (qf_open_new_cwindow(qi, height) == FAIL)
+ return;
+
+! qf_set_title_var(&qi->qf_lists[qi->qf_curlist]);
+
+ // Fill the buffer with the quickfix list.
+ qf_fill_buffer(qi, curbuf, NULL);
+
+! curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
+ curwin->w_cursor.col = 0;
+ check_cursor();
+ update_topline(); // scroll to show the line
+--- 3968,3980 ----
+ if (qf_open_new_cwindow(qi, height) == FAIL)
+ return;
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+! qf_set_title_var(qfl);
+
+ // Fill the buffer with the quickfix list.
+ qf_fill_buffer(qi, curbuf, NULL);
+
+! curwin->w_cursor.lnum = qfl->qf_index;
+ curwin->w_cursor.col = 0;
+ check_cursor();
+ update_topline(); // scroll to show the line
+***************
+*** 4282,4295 ****
+ // Check if there is anything to display
+ if (!qf_stack_empty(qi))
+ {
+! char_u dirname[MAXPATHL];
+
+ *dirname = NUL;
+
+ // Add one line for each error
+ if (old_last == NULL)
+ {
+! qfp = qi->qf_lists[qi->qf_curlist].qf_start;
+ lnum = 0;
+ }
+ else
+--- 4290,4304 ----
+ // Check if there is anything to display
+ if (!qf_stack_empty(qi))
+ {
+! qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+! char_u dirname[MAXPATHL];
+
+ *dirname = NUL;
+
+ // Add one line for each error
+ if (old_last == NULL)
+ {
+! qfp = qfl->qf_start;
+ lnum = 0;
+ }
+ else
+***************
+*** 4297,4303 ****
+ qfp = old_last->qf_next;
+ lnum = buf->b_ml.ml_line_count;
+ }
+! while (lnum < qi->qf_lists[qi->qf_curlist].qf_count)
+ {
+ if (qf_buf_add_line(buf, lnum, qfp, dirname) == FAIL)
+ break;
+--- 4306,4312 ----
+ qfp = old_last->qf_next;
+ lnum = buf->b_ml.ml_line_count;
+ }
+! while (lnum < qfl->qf_count)
+ {
+ if (qf_buf_add_line(buf, lnum, qfp, dirname) == FAIL)
+ break;
+***************
+*** 4345,4353 ****
+ * For every change made to the quickfix list, update the changed tick.
+ */
+ static void
+! qf_list_changed(qf_info_T *qi, int qf_idx)
+ {
+! qi->qf_lists[qf_idx].qf_changedtick++;
+ }
+
+ /*
+--- 4354,4362 ----
+ * For every change made to the quickfix list, update the changed tick.
+ */
+ static void
+! qf_list_changed(qf_list_T *qfl)
+ {
+! qfl->qf_changedtick++;
+ }
+
+ /*
+***************
+*** 4595,4601 ****
+ goto cleanup;
+ }
+ if (res >= 0)
+! qf_list_changed(qi, qi->qf_curlist);
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+--- 4604,4610 ----
+ goto cleanup;
+ }
+ if (res >= 0)
+! qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+***************
+*** 4620,4625 ****
+--- 4629,4635 ----
+ qf_get_size(exarg_T *eap)
+ {
+ qf_info_T *qi = &ql_info;
++ qf_list_T *qfl;
+ qfline_T *qfp;
+ int i, sz = 0;
+ int prev_fnum = 0;
+***************
+*** 4632,4639 ****
+ return 0;
+ }
+
+! for (i = 0, qfp = qi->qf_lists[qi->qf_curlist].qf_start;
+! i < qi->qf_lists[qi->qf_curlist].qf_count && qfp != NULL;
+ ++i, qfp = qfp->qf_next)
+ {
+ if (qfp->qf_valid)
+--- 4642,4649 ----
+ return 0;
+ }
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+! for (i = 0, qfp = qfl->qf_start; i < qfl->qf_count && qfp != NULL;
+ ++i, qfp = qfp->qf_next)
+ {
+ if (qfp->qf_valid)
+***************
+*** 4935,4941 ****
+ return;
+ }
+ if (res >= 0)
+! qf_list_changed(qi, qi->qf_curlist);
+ save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, NULL, FALSE, curbuf);
+--- 4945,4951 ----
+ return;
+ }
+ if (res >= 0)
+! qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+ save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+ if (au_name != NULL)
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, NULL, FALSE, curbuf);
+***************
+*** 5204,5209 ****
+--- 5214,5220 ----
+ char_u *p;
+ int fi;
+ qf_info_T *qi = &ql_info;
++ qf_list_T *qfl;
+ int_u save_qfid;
+ win_T *wp = NULL;
+ buf_T *buf;
+***************
+*** 5410,5419 ****
+
+ FreeWild(fcount, fnames);
+
+! qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE;
+! qi->qf_lists[qi->qf_curlist].qf_ptr = qi->qf_lists[qi->qf_curlist].qf_start;
+! qi->qf_lists[qi->qf_curlist].qf_index = 1;
+! qf_list_changed(qi, qi->qf_curlist);
+
+ qf_update_buffer(qi, NULL);
+
+--- 5421,5431 ----
+
+ FreeWild(fcount, fnames);
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+! qfl->qf_nonevalid = FALSE;
+! qfl->qf_ptr = qfl->qf_start;
+! qfl->qf_index = 1;
+! qf_list_changed(qfl);
+
+ qf_update_buffer(qi, NULL);
+
+***************
+*** 5915,5921 ****
+ status = dict_add_number(retdict, "size", 0);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+ status = dict_add_number(retdict, "changedtick", 0);
+! if ((status == OK) && (qi != &ql_info) && (flags & QF_GETLIST_FILEWINID))
+ status = dict_add_number(retdict, "filewinid", 0);
+
+ return status;
+--- 5927,5933 ----
+ status = dict_add_number(retdict, "size", 0);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+ status = dict_add_number(retdict, "changedtick", 0);
+! if ((status == OK) && IS_LL_STACK(qi) && (flags & QF_GETLIST_FILEWINID))
+ status = dict_add_number(retdict, "filewinid", 0);
+
+ return status;
+***************
+*** 5925,5933 ****
+ * Return the quickfix list title as 'title' in retdict
+ */
+ static int
+! qf_getprop_title(qf_info_T *qi, int qf_idx, dict_T *retdict)
+ {
+! return dict_add_string(retdict, "title", qi->qf_lists[qf_idx].qf_title);
+ }
+
+ /*
+--- 5937,5945 ----
+ * Return the quickfix list title as 'title' in retdict
+ */
+ static int
+! qf_getprop_title(qf_list_T *qfl, dict_T *retdict)
+ {
+! return dict_add_string(retdict, "title", qfl->qf_title);
+ }
+
+ /*
+***************
+*** 5973,5989 ****
+ * Return the quickfix list context (if any) as 'context' in retdict.
+ */
+ static int
+! qf_getprop_ctx(qf_info_T *qi, int qf_idx, dict_T *retdict)
+ {
+ int status;
+ dictitem_T *di;
+
+! if (qi->qf_lists[qf_idx].qf_ctx != NULL)
+ {
+ di = dictitem_alloc((char_u *)"context");
+ if (di != NULL)
+ {
+! copy_tv(qi->qf_lists[qf_idx].qf_ctx, &di->di_tv);
+ status = dict_add(retdict, di);
+ if (status == FAIL)
+ dictitem_free(di);
+--- 5985,6001 ----
+ * Return the quickfix list context (if any) as 'context' in retdict.
+ */
+ static int
+! qf_getprop_ctx(qf_list_T *qfl, dict_T *retdict)
+ {
+ int status;
+ dictitem_T *di;
+
+! if (qfl->qf_ctx != NULL)
+ {
+ di = dictitem_alloc((char_u *)"context");
+ if (di != NULL)
+ {
+! copy_tv(qfl->qf_ctx, &di->di_tv);
+ status = dict_add(retdict, di);
+ if (status == FAIL)
+ dictitem_free(di);
+***************
+*** 5998,6013 ****
+ }
+
+ /*
+! * Return the quickfix list index as 'idx' in retdict
+ */
+ static int
+ qf_getprop_idx(qf_info_T *qi, int qf_idx, dict_T *retdict)
+ {
+! int idx = qi->qf_lists[qf_idx].qf_index;
+ if (qf_list_empty(qi, qf_idx))
+! // For empty lists, qf_index is set to 1
+! idx = 0;
+! return dict_add_number(retdict, "idx", idx);
+ }
+
+ /*
+--- 6010,6025 ----
+ }
+
+ /*
+! * Return the current quickfix list index as 'idx' in retdict
+ */
+ static int
+ qf_getprop_idx(qf_info_T *qi, int qf_idx, dict_T *retdict)
+ {
+! int curidx = qi->qf_lists[qf_idx].qf_index;
+ if (qf_list_empty(qi, qf_idx))
+! // For empty lists, current index is set to 0
+! curidx = 0;
+! return dict_add_number(retdict, "idx", curidx);
+ }
+
+ /*
+***************
+*** 6021,6027 ****
+ qf_info_T *qi = &ql_info;
+ qf_list_T *qfl;
+ int status = OK;
+! int qf_idx;
+ dictitem_T *di;
+ int flags = QF_GETLIST_NONE;
+
+--- 6033,6039 ----
+ qf_info_T *qi = &ql_info;
+ qf_list_T *qfl;
+ int status = OK;
+! int qf_idx = INVALID_QFIDX;
+ dictitem_T *di;
+ int flags = QF_GETLIST_NONE;
+
+***************
+*** 6043,6049 ****
+ qfl = &qi->qf_lists[qf_idx];
+
+ if (flags & QF_GETLIST_TITLE)
+! status = qf_getprop_title(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_NR))
+ status = dict_add_number(retdict, "nr", qf_idx + 1);
+ if ((status == OK) && (flags & QF_GETLIST_WINID))
+--- 6055,6061 ----
+ qfl = &qi->qf_lists[qf_idx];
+
+ if (flags & QF_GETLIST_TITLE)
+! status = qf_getprop_title(qfl, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_NR))
+ status = dict_add_number(retdict, "nr", qf_idx + 1);
+ if ((status == OK) && (flags & QF_GETLIST_WINID))
+***************
+*** 6051,6057 ****
+ if ((status == OK) && (flags & QF_GETLIST_ITEMS))
+ status = qf_getprop_items(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_CONTEXT))
+! status = qf_getprop_ctx(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_ID))
+ status = dict_add_number(retdict, "id", qfl->qf_id);
+ if ((status == OK) && (flags & QF_GETLIST_IDX))
+--- 6063,6069 ----
+ if ((status == OK) && (flags & QF_GETLIST_ITEMS))
+ status = qf_getprop_items(qi, qf_idx, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_CONTEXT))
+! status = qf_getprop_ctx(qfl, retdict);
+ if ((status == OK) && (flags & QF_GETLIST_ID))
+ status = dict_add_number(retdict, "id", qfl->qf_id);
+ if ((status == OK) && (flags & QF_GETLIST_IDX))
+***************
+*** 6277,6288 ****
+ static int
+ qf_setprop_title(qf_info_T *qi, int qf_idx, dict_T *what, dictitem_T *di)
+ {
+ if (di->di_tv.v_type != VAR_STRING)
+ return FAIL;
+
+! vim_free(qi->qf_lists[qf_idx].qf_title);
+! qi->qf_lists[qf_idx].qf_title =
+! get_dict_string(what, (char_u *)"title", TRUE);
+ if (qf_idx == qi->qf_curlist)
+ qf_update_win_titlevar(qi);
+
+--- 6289,6301 ----
+ static int
+ qf_setprop_title(qf_info_T *qi, int qf_idx, dict_T *what, dictitem_T *di)
+ {
++ qf_list_T *qfl = &qi->qf_lists[qf_idx];
++
+ if (di->di_tv.v_type != VAR_STRING)
+ return FAIL;
+
+! vim_free(qfl->qf_title);
+! qfl->qf_title = get_dict_string(what, (char_u *)"title", TRUE);
+ if (qf_idx == qi->qf_curlist)
+ qf_update_win_titlevar(qi);
+
+***************
+*** 6375,6380 ****
+--- 6388,6394 ----
+ int retval = FAIL;
+ int qf_idx;
+ int newlist = FALSE;
++ qf_list_T *qfl;
+
+ if (action == ' ' || qf_stack_empty(qi))
+ newlist = TRUE;
+***************
+*** 6390,6395 ****
+--- 6404,6410 ----
+ qf_idx = qi->qf_curlist;
+ }
+
++ qfl = &qi->qf_lists[qf_idx];
+ if ((di = dict_find(what, (char_u *)"title", -1)) != NULL)
+ retval = qf_setprop_title(qi, qf_idx, what, di);
+ if ((di = dict_find(what, (char_u *)"items", -1)) != NULL)
+***************
+*** 6397,6413 ****
+ if ((di = dict_find(what, (char_u *)"lines", -1)) != NULL)
+ retval = qf_setprop_items_from_lines(qi, qf_idx, what, di, action);
+ if ((di = dict_find(what, (char_u *)"context", -1)) != NULL)
+! retval = qf_setprop_context(&qi->qf_lists[qf_idx], di);
+
+ if (retval == OK)
+! qf_list_changed(qi, qf_idx);
+
+ return retval;
+ }
+
+ /*
+! * Find the non-location list window with the specified location list in the
+! * current tabpage.
+ */
+ static win_T *
+ find_win_with_ll(qf_info_T *qi)
+--- 6412,6428 ----
+ if ((di = dict_find(what, (char_u *)"lines", -1)) != NULL)
+ retval = qf_setprop_items_from_lines(qi, qf_idx, what, di, action);
+ if ((di = dict_find(what, (char_u *)"context", -1)) != NULL)
+! retval = qf_setprop_context(qfl, di);
+
+ if (retval == OK)
+! qf_list_changed(qfl);
+
+ return retval;
+ }
+
+ /*
+! * Find the non-location list window with the specified location list stack in
+! * the current tabpage.
+ */
+ static win_T *
+ find_win_with_ll(qf_info_T *qi)
+***************
+*** 6508,6514 ****
+ {
+ retval = qf_add_entries(qi, qi->qf_curlist, list, title, action);
+ if (retval == OK)
+! qf_list_changed(qi, qi->qf_curlist);
+ }
+
+ return retval;
+--- 6523,6529 ----
+ {
+ retval = qf_add_entries(qi, qi->qf_curlist, list, title, action);
+ if (retval == OK)
+! qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+ }
+
+ return retval;
+***************
+*** 6654,6660 ****
+ eap->line1, eap->line2,
+ qf_title, NULL);
+ if (res >= 0)
+! qf_list_changed(qi, qi->qf_curlist);
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+--- 6669,6675 ----
+ eap->line1, eap->line2,
+ qf_title, NULL);
+ if (res >= 0)
+! qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+***************
+*** 6737,6743 ****
+ (linenr_T)0, (linenr_T)0,
+ qf_cmdtitle(*eap->cmdlinep), NULL);
+ if (res >= 0)
+! qf_list_changed(qi, qi->qf_curlist);
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+--- 6752,6758 ----
+ (linenr_T)0, (linenr_T)0,
+ qf_cmdtitle(*eap->cmdlinep), NULL);
+ if (res >= 0)
+! qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+
+ // Remember the current quickfix list identifier, so that we can
+ // check for autocommands changing the current quickfix list.
+***************
+*** 7013,7018 ****
+--- 7028,7035 ----
+ regmatch.rm_ic = FALSE;
+ if (regmatch.regprog != NULL)
+ {
++ qf_list_T *qfl;
++
+ // create a new quickfix list
+ qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep));
+
+***************
+*** 7020,7029 ****
+
+ vim_regfree(regmatch.regprog);
+
+! qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE;
+! qi->qf_lists[qi->qf_curlist].qf_ptr =
+! qi->qf_lists[qi->qf_curlist].qf_start;
+! qi->qf_lists[qi->qf_curlist].qf_index = 1;
+ }
+
+ if (p_cpo == empty_option)
+--- 7037,7048 ----
+
+ vim_regfree(regmatch.regprog);
+
+! qfl = &qi->qf_lists[qi->qf_curlist];
+! qfl->qf_nonevalid = FALSE;
+! qfl->qf_ptr = qfl->qf_start;
+! qfl->qf_index = 1;
+! qf_list_changed(qfl);
+! qf_update_buffer(qi, NULL);
+ }
+
+ if (p_cpo == empty_option)
+***************
+*** 7032,7040 ****
+ // Darn, some plugin changed the value.
+ free_string_option(save_cpo);
+
+- qf_list_changed(qi, qi->qf_curlist);
+- qf_update_buffer(qi, NULL);
+-
+ if (au_name != NULL)
+ {
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+--- 7051,7056 ----
+*** ../vim-8.1.0468/src/testdir/test_quickfix.vim 2018-09-02 15:18:38.910627833 +0200
+--- src/testdir/test_quickfix.vim 2018-10-11 17:37:31.930172891 +0200
+***************
+*** 558,563 ****
+--- 558,565 ----
+
+ " Search for non existing help string
+ call assert_fails('Xhelpgrep a1b2c3', 'E480:')
++ " Invalid regular expression
++ call assert_fails('Xhelpgrep \@<!', 'E480:')
+ endfunc
+
+ func Test_helpgrep()
+*** ../vim-8.1.0468/src/version.c 2018-10-09 21:49:30.447622031 +0200
+--- src/version.c 2018-10-11 17:38:14.761699178 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 469,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+188. You purchase a laptop so you can surf while sitting on the can.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0470 b/data/vim/patches/8.1.0470
new file mode 100644
index 000000000..d9b7e6305
--- /dev/null
+++ b/data/vim/patches/8.1.0470
@@ -0,0 +1,384 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0470
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0470
+Problem: Pointer ownership around fname_expand() is unclear.
+Solution: Allow b_ffname and b_sfname to point to the same allocated memory,
+ only free one. Update comments.
+Files: src/buffer.c, src/structs.h, src/fileio.c, src/ex_cmds.c
+
+
+*** ../vim-8.1.0469/src/buffer.c 2018-09-30 21:43:17.175693433 +0200
+--- src/buffer.c 2018-10-11 19:00:11.004662173 +0200
+***************
+*** 663,670 ****
+ workshop_file_closed_lineno((char *)buf->b_ffname,
+ (int)buf->b_last_cursor.lnum);
+ #endif
+! vim_free(buf->b_ffname);
+! vim_free(buf->b_sfname);
+ if (buf->b_prev == NULL)
+ firstbuf = buf->b_next;
+ else
+--- 663,673 ----
+ workshop_file_closed_lineno((char *)buf->b_ffname,
+ (int)buf->b_last_cursor.lnum);
+ #endif
+! if (buf->b_sfname != buf->b_ffname)
+! VIM_CLEAR(buf->b_sfname);
+! else
+! buf->b_sfname = NULL;
+! VIM_CLEAR(buf->b_ffname);
+ if (buf->b_prev == NULL)
+ firstbuf = buf->b_next;
+ else
+***************
+*** 1877,1887 ****
+ */
+ buf_T *
+ buflist_new(
+! char_u *ffname, /* full path of fname or relative */
+! char_u *sfname, /* short fname or NULL */
+! linenr_T lnum, /* preferred cursor line */
+! int flags) /* BLN_ defines */
+ {
+ buf_T *buf;
+ #ifdef UNIX
+ stat_T st;
+--- 1880,1892 ----
+ */
+ buf_T *
+ buflist_new(
+! char_u *ffname_arg, // full path of fname or relative
+! char_u *sfname_arg, // short fname or NULL
+! linenr_T lnum, // preferred cursor line
+! int flags) // BLN_ defines
+ {
++ char_u *ffname = ffname_arg;
++ char_u *sfname = sfname_arg;
+ buf_T *buf;
+ #ifdef UNIX
+ stat_T st;
+***************
+*** 1890,1896 ****
+ if (top_file_num == 1)
+ hash_init(&buf_hashtab);
+
+! fname_expand(curbuf, &ffname, &sfname); /* will allocate ffname */
+
+ /*
+ * If file name already exists in the list, update the entry.
+--- 1895,1901 ----
+ if (top_file_num == 1)
+ hash_init(&buf_hashtab);
+
+! fname_expand(curbuf, &ffname, &sfname); // will allocate ffname
+
+ /*
+ * If file name already exists in the list, update the entry.
+***************
+*** 1997,2004 ****
+ if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL))
+ || buf->b_wininfo == NULL)
+ {
+ VIM_CLEAR(buf->b_ffname);
+- VIM_CLEAR(buf->b_sfname);
+ if (buf != curbuf)
+ free_buffer(buf);
+ return NULL;
+--- 2002,2012 ----
+ if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL))
+ || buf->b_wininfo == NULL)
+ {
++ if (buf->b_sfname != buf->b_ffname)
++ VIM_CLEAR(buf->b_sfname);
++ else
++ buf->b_sfname = NULL;
+ VIM_CLEAR(buf->b_ffname);
+ if (buf != curbuf)
+ free_buffer(buf);
+ return NULL;
+***************
+*** 3103,3109 ****
+ }
+
+ /*
+! * Set the file name for "buf"' to 'ffname', short file name to 'sfname'.
+ * The file name with the full path is also remembered, for when :cd is used.
+ * Returns FAIL for failure (file name already in use by other buffer)
+ * OK otherwise.
+--- 3111,3118 ----
+ }
+
+ /*
+! * Set the file name for "buf"' to "ffname_arg", short file name to
+! * "sfname_arg".
+ * The file name with the full path is also remembered, for when :cd is used.
+ * Returns FAIL for failure (file name already in use by other buffer)
+ * OK otherwise.
+***************
+*** 3111,3120 ****
+ int
+ setfname(
+ buf_T *buf,
+! char_u *ffname,
+! char_u *sfname,
+ int message) /* give message when buffer already exists */
+ {
+ buf_T *obuf = NULL;
+ #ifdef UNIX
+ stat_T st;
+--- 3120,3131 ----
+ int
+ setfname(
+ buf_T *buf,
+! char_u *ffname_arg,
+! char_u *sfname_arg,
+ int message) /* give message when buffer already exists */
+ {
++ char_u *ffname = ffname_arg;
++ char_u *sfname = sfname_arg;
+ buf_T *obuf = NULL;
+ #ifdef UNIX
+ stat_T st;
+***************
+*** 3123,3130 ****
+ if (ffname == NULL || *ffname == NUL)
+ {
+ /* Removing the name. */
+ VIM_CLEAR(buf->b_ffname);
+- VIM_CLEAR(buf->b_sfname);
+ #ifdef UNIX
+ st.st_dev = (dev_T)-1;
+ #endif
+--- 3134,3144 ----
+ if (ffname == NULL || *ffname == NUL)
+ {
+ /* Removing the name. */
++ if (buf->b_sfname != buf->b_ffname)
++ VIM_CLEAR(buf->b_sfname);
++ else
++ buf->b_sfname = NULL;
+ VIM_CLEAR(buf->b_ffname);
+ #ifdef UNIX
+ st.st_dev = (dev_T)-1;
+ #endif
+***************
+*** 3175,3182 ****
+ # endif
+ fname_case(sfname, 0); /* set correct case for short file name */
+ #endif
+ vim_free(buf->b_ffname);
+- vim_free(buf->b_sfname);
+ buf->b_ffname = ffname;
+ buf->b_sfname = sfname;
+ }
+--- 3189,3197 ----
+ # endif
+ fname_case(sfname, 0); /* set correct case for short file name */
+ #endif
++ if (buf->b_sfname != buf->b_ffname)
++ vim_free(buf->b_sfname);
+ vim_free(buf->b_ffname);
+ buf->b_ffname = ffname;
+ buf->b_sfname = sfname;
+ }
+***************
+*** 3210,3216 ****
+ buf = buflist_findnr(fnum);
+ if (buf != NULL)
+ {
+! vim_free(buf->b_sfname);
+ vim_free(buf->b_ffname);
+ buf->b_ffname = vim_strsave(name);
+ buf->b_sfname = NULL;
+--- 3225,3232 ----
+ buf = buflist_findnr(fnum);
+ if (buf != NULL)
+ {
+! if (buf->b_sfname != buf->b_ffname)
+! vim_free(buf->b_sfname);
+ vim_free(buf->b_ffname);
+ buf->b_ffname = vim_strsave(name);
+ buf->b_sfname = NULL;
+***************
+*** 4820,4827 ****
+ }
+
+ /*
+! * Make "ffname" a full file name, set "sfname" to "ffname" if not NULL.
+! * "ffname" becomes a pointer to allocated memory (or NULL).
+ */
+ void
+ fname_expand(
+--- 4836,4847 ----
+ }
+
+ /*
+! * Make "*ffname" a full file name, set "*sfname" to "*ffname" if not NULL.
+! * "*ffname" becomes a pointer to allocated memory (or NULL).
+! * When resolving a link both "*sfname" and "*ffname" will point to the same
+! * allocated memory.
+! * The "*ffname" and "*sfname" pointer values on call will not be freed.
+! * Note that the resulting "*ffname" pointer should be considered not allocaed.
+ */
+ void
+ fname_expand(
+***************
+*** 4829,4846 ****
+ char_u **ffname,
+ char_u **sfname)
+ {
+! if (*ffname == NULL) /* if no file name given, nothing to do */
+ return;
+! if (*sfname == NULL) /* if no short file name given, use ffname */
+ *sfname = *ffname;
+! *ffname = fix_fname(*ffname); /* expand to full path */
+
+ #ifdef FEAT_SHORTCUT
+ if (!buf->b_p_bin)
+ {
+ char_u *rfname;
+
+! /* If the file name is a shortcut file, use the file it links to. */
+ rfname = mch_resolve_shortcut(*ffname);
+ if (rfname != NULL)
+ {
+--- 4849,4866 ----
+ char_u **ffname,
+ char_u **sfname)
+ {
+! if (*ffname == NULL) // no file name given, nothing to do
+ return;
+! if (*sfname == NULL) // no short file name given, use ffname
+ *sfname = *ffname;
+! *ffname = fix_fname(*ffname); // expand to full path
+
+ #ifdef FEAT_SHORTCUT
+ if (!buf->b_p_bin)
+ {
+ char_u *rfname;
+
+! // If the file name is a shortcut file, use the file it links to.
+ rfname = mch_resolve_shortcut(*ffname);
+ if (rfname != NULL)
+ {
+*** ../vim-8.1.0469/src/structs.h 2018-10-02 18:25:41.420867587 +0200
+--- src/structs.h 2018-10-11 17:45:36.197140877 +0200
+***************
+*** 1972,1980 ****
+ * b_fname is the same as b_sfname, unless ":cd" has been done,
+ * then it is the same as b_ffname (NULL for no name).
+ */
+! char_u *b_ffname; /* full path file name */
+! char_u *b_sfname; /* short file name */
+! char_u *b_fname; /* current file name */
+
+ #ifdef UNIX
+ int b_dev_valid; /* TRUE when b_dev has a valid number */
+--- 1972,1982 ----
+ * b_fname is the same as b_sfname, unless ":cd" has been done,
+ * then it is the same as b_ffname (NULL for no name).
+ */
+! char_u *b_ffname; // full path file name, allocated
+! char_u *b_sfname; // short file name, allocated, may be equal to
+! // b_ffname
+! char_u *b_fname; // current file name, points to b_ffname or
+! // b_sfname
+
+ #ifdef UNIX
+ int b_dev_valid; /* TRUE when b_dev has a valid number */
+*** ../vim-8.1.0469/src/fileio.c 2018-09-30 21:43:17.187693348 +0200
+--- src/fileio.c 2018-10-11 18:50:41.084975167 +0200
+***************
+*** 6187,6193 ****
+ || buf->b_sfname == NULL
+ || mch_isFullName(buf->b_sfname)))
+ {
+! VIM_CLEAR(buf->b_sfname);
+ p = shorten_fname(buf->b_ffname, dirname);
+ if (p != NULL)
+ {
+--- 6187,6194 ----
+ || buf->b_sfname == NULL
+ || mch_isFullName(buf->b_sfname)))
+ {
+! if (buf->b_sfname != buf->b_ffname)
+! VIM_CLEAR(buf->b_sfname);
+ p = shorten_fname(buf->b_ffname, dirname);
+ if (p != NULL)
+ {
+*** ../vim-8.1.0469/src/ex_cmds.c 2018-10-09 21:49:30.447622031 +0200
+--- src/ex_cmds.c 2018-10-11 19:01:12.524192986 +0200
+***************
+*** 3648,3655 ****
+ }
+
+ /*
+! * Try to abandon current file and edit a new or existing file.
+! * "fnum" is the number of the file, if zero use ffname/sfname.
+ * "lnum" is the line number for the cursor in the new file (if non-zero).
+ *
+ * Return:
+--- 3648,3655 ----
+ }
+
+ /*
+! * Try to abandon the current file and edit a new or existing file.
+! * "fnum" is the number of the file, if zero use "ffname_arg"/"sfname_arg".
+ * "lnum" is the line number for the cursor in the new file (if non-zero).
+ *
+ * Return:
+***************
+*** 3661,3672 ****
+ int
+ getfile(
+ int fnum,
+! char_u *ffname,
+! char_u *sfname,
+ int setpm,
+ linenr_T lnum,
+ int forceit)
+ {
+ int other;
+ int retval;
+ char_u *free_me = NULL;
+--- 3661,3674 ----
+ int
+ getfile(
+ int fnum,
+! char_u *ffname_arg,
+! char_u *sfname_arg,
+ int setpm,
+ linenr_T lnum,
+ int forceit)
+ {
++ char_u *ffname = ffname_arg;
++ char_u *sfname = sfname_arg;
+ int other;
+ int retval;
+ char_u *free_me = NULL;
+*** ../vim-8.1.0469/src/version.c 2018-10-11 17:39:09.173107491 +0200
+--- src/version.c 2018-10-11 18:57:27.585905972 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 470,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+189. You put your e-mail address in the upper left-hand corner of envelopes.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0471 b/data/vim/patches/8.1.0471
new file mode 100644
index 000000000..a0d8192cf
--- /dev/null
+++ b/data/vim/patches/8.1.0471
@@ -0,0 +1,105 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0471
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0471
+Problem: Some tests are flaky or fail on some systems.
+Solution: Increase waiting time for port number. Use "cmd /c" to execute
+ "echo" on win32. (Ken Takata, closes #3534)
+Files: src/testdir/shared.vim, src/testdir/test_channel.vim
+
+
+*** ../vim-8.1.0470/src/testdir/shared.vim 2018-05-05 15:42:51.000000000 +0200
+--- src/testdir/shared.vim 2018-10-12 22:09:33.568424581 +0200
+***************
+*** 49,55 ****
+ " Read the port number from the Xportnr file.
+ func GetPort()
+ let l = []
+! for i in range(200)
+ try
+ let l = readfile("Xportnr")
+ catch
+--- 49,56 ----
+ " Read the port number from the Xportnr file.
+ func GetPort()
+ let l = []
+! " with 200 it sometimes failed
+! for i in range(400)
+ try
+ let l = readfile("Xportnr")
+ catch
+***************
+*** 274,279 ****
+--- 275,284 ----
+ let cmd = GetVimCommand()
+ let cmd = substitute(cmd, '-u NONE', '--clean', '')
+ let cmd = substitute(cmd, '--not-a-term', '', '')
++
++ " Optionally run Vim under valgrind
++ " let cmd = 'valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind ' . cmd
++
+ return cmd
+ endfunc
+
+*** ../vim-8.1.0470/src/testdir/test_channel.vim 2018-10-07 21:36:07.389878130 +0200
+--- src/testdir/test_channel.vim 2018-10-12 22:12:33.938703284 +0200
+***************
+*** 1340,1346 ****
+ let self.ret['exit_cb'] = job_status(a:job)
+ endfunc
+
+! let g:job = job_start('echo', {
+ \ 'close_cb': g:retdict.close_cb,
+ \ 'exit_cb': g:retdict.exit_cb,
+ \ })
+--- 1340,1346 ----
+ let self.ret['exit_cb'] = job_status(a:job)
+ endfunc
+
+! let g:job = job_start(has('win32') ? 'cmd /c echo:' : 'echo', {
+ \ 'close_cb': g:retdict.close_cb,
+ \ 'exit_cb': g:retdict.exit_cb,
+ \ })
+***************
+*** 1369,1375 ****
+ new
+ let g:wipe_buf = bufnr('')
+
+! let job = job_start(['true'], {'exit_cb': 'ExitCbWipe'})
+ let timer = timer_start(300, {-> feedkeys("\<Esc>", 'nt')}, {'repeat': 5})
+ call feedkeys(repeat('g', 1000) . 'o', 'ntx!')
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
+--- 1369,1376 ----
+ new
+ let g:wipe_buf = bufnr('')
+
+! let job = job_start(has('win32') ? 'cmd /c echo:' : ['true'],
+! \ {'exit_cb': 'ExitCbWipe'})
+ let timer = timer_start(300, {-> feedkeys("\<Esc>", 'nt')}, {'repeat': 5})
+ call feedkeys(repeat('g', 1000) . 'o', 'ntx!')
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
+*** ../vim-8.1.0470/src/version.c 2018-10-11 19:27:43.920066119 +0200
+--- src/version.c 2018-10-12 22:14:13.397766385 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 471,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+191. You rate eating establishments not by the quality of the food,
+ but by the availability of electrical outlets for your PowerBook.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0472 b/data/vim/patches/8.1.0472
new file mode 100644
index 000000000..e3baaa7a8
--- /dev/null
+++ b/data/vim/patches/8.1.0472
@@ -0,0 +1,298 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0472
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0472
+Problem: Dosinst command has a few flaws.
+Solution: Register DisplayIcon, DisplayVersion and Publisher for the
+ uninstaller. (closes #3485) Don't set 'diffexpr' if internal diff
+ is supported. Allow for using Vi compatible from the command line.
+ Remove needless sleeps. Add comments in the generated _vimrc.
+ (Ken Takata, closes #3525)
+Files: src/dosinst.c
+
+
+*** ../vim-8.1.0471/src/dosinst.c 2018-08-18 19:04:32.458231905 +0200
+--- src/dosinst.c 2018-10-13 17:23:40.545425239 +0200
+***************
+*** 18,23 ****
+--- 18,24 ----
+ */
+ #define DOSINST
+ #include "dosinst.h"
++ #include <io.h>
+
+ #define GVIMEXT64_PATH "GvimExt64\\gvimext.dll"
+ #define GVIMEXT32_PATH "GvimExt32\\gvimext.dll"
+***************
+*** 63,68 ****
+--- 64,70 ----
+ enum
+ {
+ compat_vi = 1,
++ compat_vim,
+ compat_some_enhancements,
+ compat_all_enhancements
+ };
+***************
+*** 70,75 ****
+--- 72,78 ----
+ {
+ "\nChoose the default way to run Vim:",
+ "Vi compatible",
++ "Vim default",
+ "with some Vim enhancements",
+ "with syntax highlighting and other features switched on",
+ };
+***************
+*** 567,573 ****
+ sleep(1); /* wait for uninstaller to start up */
+ num_windows = 0;
+ EnumWindows(window_cb, 0);
+- sleep(1); /* wait for windows to be counted */
+ if (num_windows == 0)
+ {
+ /* Did not find the uninstaller, ask user to press
+--- 570,575 ----
+***************
+*** 583,591 ****
+ {
+ printf(".");
+ fflush(stdout);
+ num_windows = 0;
+ EnumWindows(window_cb, 0);
+- sleep(1); /* wait for windows to be counted */
+ } while (num_windows > 0);
+ }
+ printf("\nDone!\n");
+--- 585,593 ----
+ {
+ printf(".");
+ fflush(stdout);
++ sleep(1); /* wait for the uninstaller to finish */
+ num_windows = 0;
+ EnumWindows(window_cb, 0);
+ } while (num_windows > 0);
+ }
+ printf("\nDone!\n");
+***************
+*** 1159,1170 ****
+--- 1161,1181 ----
+ switch (compat_choice)
+ {
+ case compat_vi:
++ fprintf(fd, "\" Vi compatible\n");
+ fprintf(fd, "set compatible\n");
+ break;
++ case compat_vim:
++ fprintf(fd, "\" Vim's default behavior\n");
++ fprintf(fd, "if &compatible\n");
++ fprintf(fd, " set nocompatible\n");
++ fprintf(fd, "endif\n");
++ break;
+ case compat_some_enhancements:
++ fprintf(fd, "\" Vim with some enhancements\n");
+ fprintf(fd, "source $VIMRUNTIME/defaults.vim\n");
+ break;
+ case compat_all_enhancements:
++ fprintf(fd, "\" Vim with all enhancements\n");
+ fprintf(fd, "source $VIMRUNTIME/vimrc_example.vim\n");
+ break;
+ }
+***************
+*** 1173,1187 ****
+--- 1184,1204 ----
+ case remap_no:
+ break;
+ case remap_win:
++ fprintf(fd, "\n");
++ fprintf(fd, "\" Remap a few keys for Windows behavior\n");
+ fprintf(fd, "source $VIMRUNTIME/mswin.vim\n");
+ break;
+ }
+ switch (mouse_choice)
+ {
+ case mouse_xterm:
++ fprintf(fd, "\n");
++ fprintf(fd, "\" Mouse behavior (the Unix way)\n");
+ fprintf(fd, "behave xterm\n");
+ break;
+ case mouse_mswin:
++ fprintf(fd, "\n");
++ fprintf(fd, "\" Mouse behavior (the Windows way)\n");
+ fprintf(fd, "behave mswin\n");
+ break;
+ case mouse_default:
+***************
+*** 1192,1198 ****
+ /* Use the diff.exe that comes with the self-extracting gvim.exe. */
+ fclose(tfd);
+ fprintf(fd, "\n");
+! fprintf(fd, "set diffexpr=MyDiff()\n");
+ fprintf(fd, "function MyDiff()\n");
+ fprintf(fd, " let opt = '-a --binary '\n");
+ fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif\n");
+--- 1209,1219 ----
+ /* Use the diff.exe that comes with the self-extracting gvim.exe. */
+ fclose(tfd);
+ fprintf(fd, "\n");
+! fprintf(fd, "\" Use the internal diff if available.\n");
+! fprintf(fd, "\" Otherwise use the special 'diffexpr' for Windows.\n");
+! fprintf(fd, "if &diffopt !~# 'internal'\n");
+! fprintf(fd, " set diffexpr=MyDiff()\n");
+! fprintf(fd, "endif\n");
+ fprintf(fd, "function MyDiff()\n");
+ fprintf(fd, " let opt = '-a --binary '\n");
+ fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif\n");
+***************
+*** 1491,1497 ****
+ HKEY hRootKey,
+ const char *appname,
+ const char *display_name,
+! const char *uninstall_string)
+ {
+ LONG lRet = reg_create_key_and_value(hRootKey, appname,
+ "DisplayName", display_name, KEY_WOW64_64KEY);
+--- 1512,1521 ----
+ HKEY hRootKey,
+ const char *appname,
+ const char *display_name,
+! const char *uninstall_string,
+! const char *display_icon,
+! const char *display_version,
+! const char *publisher)
+ {
+ LONG lRet = reg_create_key_and_value(hRootKey, appname,
+ "DisplayName", display_name, KEY_WOW64_64KEY);
+***************
+*** 1499,1504 ****
+--- 1523,1537 ----
+ if (ERROR_SUCCESS == lRet)
+ lRet = reg_create_key_and_value(hRootKey, appname,
+ "UninstallString", uninstall_string, KEY_WOW64_64KEY);
++ if (ERROR_SUCCESS == lRet)
++ lRet = reg_create_key_and_value(hRootKey, appname,
++ "DisplayIcon", display_icon, KEY_WOW64_64KEY);
++ if (ERROR_SUCCESS == lRet)
++ lRet = reg_create_key_and_value(hRootKey, appname,
++ "DisplayVersion", display_version, KEY_WOW64_64KEY);
++ if (ERROR_SUCCESS == lRet)
++ lRet = reg_create_key_and_value(hRootKey, appname,
++ "Publisher", publisher, KEY_WOW64_64KEY);
+ return lRet;
+ }
+
+***************
+*** 1519,1524 ****
+--- 1552,1558 ----
+ char vim_exe_path[BUFSIZE];
+ char display_name[BUFSIZE];
+ char uninstall_string[BUFSIZE];
++ char icon_string[BUFSIZE];
+ int i;
+ int loop_count = is_64bit_os() ? 2 : 1;
+ DWORD flag;
+***************
+*** 1583,1593 ****
+ else
+ sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir);
+
+ lRet = register_uninstall(
+ HKEY_LOCAL_MACHINE,
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT,
+ display_name,
+! uninstall_string);
+ if (ERROR_SUCCESS != lRet)
+ return FAIL;
+
+--- 1617,1632 ----
+ else
+ sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir);
+
++ sprintf(icon_string, "%s\\gvim.exe,0", installdir);
++
+ lRet = register_uninstall(
+ HKEY_LOCAL_MACHINE,
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT,
+ display_name,
+! uninstall_string,
+! icon_string,
+! VIM_VERSION_SHORT,
+! "Bram Moolenaar et al.");
+ if (ERROR_SUCCESS != lRet)
+ return FAIL;
+
+***************
+*** 2219,2224 ****
+--- 2258,2265 ----
+ printf(" Remap keys when creating a default _vimrc file.\n");
+ printf("-vimrc-behave [unix|mswin|default]\n");
+ printf(" Set mouse behavior when creating a default _vimrc file.\n");
++ printf("-vimrc-compat [vi|vim|defaults|all]\n");
++ printf(" Set Vi compatibility when creating a default _vimrc file.\n");
+ printf("-install-popup\n");
+ printf(" Install the Edit-with-Vim context menu entry\n");
+ printf("-install-openwith\n");
+***************
+*** 2296,2301 ****
+--- 2337,2356 ----
+ else if (strcmp(argv[i], "default") == 0)
+ mouse_choice = mouse_default;
+ }
++ else if (strcmp(argv[i], "-vimrc-compat") == 0)
++ {
++ if (i + 1 == argc)
++ break;
++ i++;
++ if (strcmp(argv[i], "vi") == 0)
++ compat_choice = compat_vi;
++ else if (strcmp(argv[i], "vim") == 0)
++ compat_choice = compat_vim;
++ else if (strcmp(argv[i], "defaults") == 0)
++ compat_choice = compat_some_enhancements;
++ else if (strcmp(argv[i], "all") == 0)
++ compat_choice = compat_all_enhancements;
++ }
+ else if (strcmp(argv[i], "-install-popup") == 0)
+ {
+ init_popup_choice();
+***************
+*** 2546,2552 ****
+
+ /* When nothing found exit quietly. If something found wait for
+ * a little while, so that the user can read the messages. */
+! if (i)
+ sleep(3);
+ exit(0);
+ }
+--- 2601,2607 ----
+
+ /* When nothing found exit quietly. If something found wait for
+ * a little while, so that the user can read the messages. */
+! if (i && _isatty(1))
+ sleep(3);
+ exit(0);
+ }
+*** ../vim-8.1.0471/src/version.c 2018-10-12 22:15:06.597268116 +0200
+--- src/version.c 2018-10-13 17:25:17.988761109 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 472,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+194. Your business cards contain your e-mail and home page address.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0473 b/data/vim/patches/8.1.0473
new file mode 100644
index 000000000..3ba786e69
--- /dev/null
+++ b/data/vim/patches/8.1.0473
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0473
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0473
+Problem: User doesn't notice file does not exist when swap file does.
+Solution: Add a note that the file cannot be found. Make the "still
+ running" notice stand out.
+Files: src/memline.c
+
+
+*** ../vim-8.1.0472/src/memline.c 2018-10-07 23:16:33.134616234 +0200
+--- src/memline.c 2018-10-13 18:44:34.660709137 +0200
+***************
+*** 2177,2183 ****
+ /* EMX kill() not working correctly, it seems */
+ if (kill((pid_t)char_to_long(b0.b0_pid), 0) == 0)
+ {
+! MSG_PUTS(_(" (still running)"));
+ # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+ process_still_running = TRUE;
+ # endif
+--- 2177,2183 ----
+ /* EMX kill() not working correctly, it seems */
+ if (kill((pid_t)char_to_long(b0.b0_pid), 0) == 0)
+ {
+! MSG_PUTS(_(" (STILL RUNNING)"));
+ # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+ process_still_running = TRUE;
+ # endif
+***************
+*** 4089,4095 ****
+ MSG_PUTS(_("While opening file \""));
+ msg_outtrans(buf->b_fname);
+ MSG_PUTS("\"\n");
+! if (mch_stat((char *)buf->b_fname, &st) != -1)
+ {
+ MSG_PUTS(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+--- 4089,4099 ----
+ MSG_PUTS(_("While opening file \""));
+ msg_outtrans(buf->b_fname);
+ MSG_PUTS("\"\n");
+! if (mch_stat((char *)buf->b_fname, &st) == -1)
+! {
+! MSG_PUTS(_(" CANNOT BE FOUND"));
+! }
+! else
+ {
+ MSG_PUTS(_(" dated: "));
+ x = st.st_mtime; /* Manx C can't do &st.st_mtime */
+*** ../vim-8.1.0472/src/version.c 2018-10-13 17:25:24.116718283 +0200
+--- src/version.c 2018-10-13 18:46:16.675965454 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 473,
+ /**/
+
+--
+% cat /usr/include/sys/errno.h
+#define EPERM 1 /* Operation not permitted */
+#define ENOENT 2 /* No such file or directory */
+#define ESRCH 3 /* No such process */
+[...]
+#define EMACS 666 /* Too many macros */
+%
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0474 b/data/vim/patches/8.1.0474
new file mode 100644
index 000000000..3d1a1c771
--- /dev/null
+++ b/data/vim/patches/8.1.0474
@@ -0,0 +1,151 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0474
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0474
+Problem: Directory where if_perl.c is written is inconsistent.
+Solution: use auto/if_perl.c for MS-Windows. (Ken Takata, closes #3540)
+Files: src/Make_bc5.mak, src/Make_cyg_ming.mak, src/Make_mvc.mak
+
+
+*** ../vim-8.1.0473/src/Make_bc5.mak 2016-07-19 13:50:35.000000000 +0200
+--- src/Make_bc5.mak 2018-10-14 16:23:03.997769550 +0200
+***************
+*** 820,825 ****
+--- 820,827 ----
+ !endif
+ !ifdef PERL
+ -@del perl.lib
++ -@del if_perl.c
++ -@del auto\if_perl.c
+ !endif
+ !ifdef PYTHON
+ -@del python.lib
+***************
+*** 948,959 ****
+ $(OBJDIR)\if_lua.obj: if_lua.c lua.lib
+ $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
+
+! $(OBJDIR)\if_perl.obj: if_perl.c perl.lib
+! $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_perl.c
+
+! if_perl.c: if_perl.xs typemap
+ $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
+! $(PERL)\lib\ExtUtils\typemap if_perl.xs > $@
+
+ $(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
+ $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
+--- 950,961 ----
+ $(OBJDIR)\if_lua.obj: if_lua.c lua.lib
+ $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_lua.c
+
+! $(OBJDIR)\if_perl.obj: auto/if_perl.c perl.lib
+! $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc auto/if_perl.c
+
+! auto/if_perl.c: if_perl.xs typemap
+ $(PERL)\bin\perl.exe $(PERL)\lib\ExtUtils\xsubpp -prototypes -typemap \
+! $(PERL)\lib\ExtUtils\typemap if_perl.xs -output $@
+
+ $(OBJDIR)\if_python.obj: if_python.c if_py_both.h python.lib
+ $(CC) -I$(PYTHON)\include $(CCARG) $(CC1) $(CC2)$@ -pc if_python.c
+*** ../vim-8.1.0473/src/Make_cyg_ming.mak 2018-09-21 14:43:06.795306782 +0200
+--- src/Make_cyg_ming.mak 2018-10-14 16:23:03.997769550 +0200
+***************
+*** 985,990 ****
+--- 985,991 ----
+ -$(DEL) pathdef.c
+ ifdef PERL
+ -$(DEL) if_perl.c
++ -$(DEL) auto$(DIRSLASH)if_perl.c
+ endif
+ ifdef MZSCHEME
+ -$(DEL) mzscheme_base.c
+***************
+*** 1043,1052 ****
+ $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) if_ole.h
+ $(CC) $(CFLAGS) $(CXXFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
+
+! if_perl.c: if_perl.xs typemap
+ $(XSUBPP) -prototypes -typemap \
+ $(PERLTYPEMAP) if_perl.xs -output $@
+
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+ ifeq (16, $(RUBY))
+ $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
+--- 1044,1057 ----
+ $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) if_ole.h
+ $(CC) $(CFLAGS) $(CXXFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
+
+! auto/if_perl.c: if_perl.xs typemap
+ $(XSUBPP) -prototypes -typemap \
+ $(PERLTYPEMAP) if_perl.xs -output $@
+
++ $(OUTDIR)/if_perl.o: auto/if_perl.c $(INCL)
++ $(CC) -c $(CFLAGS) auto/if_perl.c -o $(OUTDIR)/if_perl.o
++
++
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+ ifeq (16, $(RUBY))
+ $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
+*** ../vim-8.1.0473/src/Make_mvc.mak 2018-09-21 14:31:48.037839069 +0200
+--- src/Make_mvc.mak 2018-10-14 16:23:03.997769550 +0200
+***************
+*** 1286,1291 ****
+--- 1286,1292 ----
+ - if exist install.exe del install.exe
+ - if exist uninstal.exe del uninstal.exe
+ - if exist if_perl.c del if_perl.c
++ - if exist auto\if_perl.c del auto\if_perl.c
+ - if exist dimm.h del dimm.h
+ - if exist dimm_i.c del dimm_i.c
+ - if exist dimm.tlb del dimm.tlb
+***************
+*** 1424,1435 ****
+ $(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL)
+ $(CC) $(CFLAGS_OUTDIR) $(LUA_INC) if_lua.c
+
+! if_perl.c : if_perl.xs typemap
+ $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
+! -typemap typemap if_perl.xs -output if_perl.c
+
+! $(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
+! $(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perl.c
+
+ $(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
+ $(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perlsfio.c
+--- 1425,1436 ----
+ $(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL)
+ $(CC) $(CFLAGS_OUTDIR) $(LUA_INC) if_lua.c
+
+! auto/if_perl.c : if_perl.xs typemap
+ $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
+! -typemap typemap if_perl.xs -output $@
+
+! $(OUTDIR)/if_perl.obj: $(OUTDIR) auto/if_perl.c $(INCL)
+! $(CC) $(CFLAGS_OUTDIR) $(PERL_INC) auto/if_perl.c
+
+ $(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
+ $(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perlsfio.c
+*** ../vim-8.1.0473/src/version.c 2018-10-13 19:06:23.502240830 +0200
+--- src/version.c 2018-10-14 16:24:32.400902684 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 474,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+196. Your computer costs more than your car.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0475 b/data/vim/patches/8.1.0475
new file mode 100644
index 000000000..eb47e9c28
--- /dev/null
+++ b/data/vim/patches/8.1.0475
@@ -0,0 +1,544 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0475
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0475
+Problem: Memory not freed on exit when quit in autocmd.
+Solution: Remember funccal stack when executing autocmd.
+Files: src/structs.h, src/userfunc.c, src/proto/userfunc.pro,
+ src/fileio.c, src/eval.c, src/ex_cmds2.c, src/main.c
+
+
+*** ../vim-8.1.0474/src/structs.h 2018-10-11 19:27:43.916066156 +0200
+--- src/structs.h 2018-10-14 21:24:09.968948702 +0200
+***************
+*** 1354,1360 ****
+ int uf_cleared; /* func_clear() was already called */
+ garray_T uf_args; /* arguments */
+ garray_T uf_lines; /* function lines */
+! #ifdef FEAT_PROFILE
+ int uf_profiling; /* TRUE when func is being profiled */
+ int uf_prof_initialized;
+ /* profiling the function as a whole */
+--- 1354,1360 ----
+ int uf_cleared; /* func_clear() was already called */
+ garray_T uf_args; /* arguments */
+ garray_T uf_lines; /* function lines */
+! # ifdef FEAT_PROFILE
+ int uf_profiling; /* TRUE when func is being profiled */
+ int uf_prof_initialized;
+ /* profiling the function as a whole */
+***************
+*** 1371,1377 ****
+ proftime_T uf_tml_wait; /* start wait time for current line */
+ int uf_tml_idx; /* index of line being timed; -1 if none */
+ int uf_tml_execed; /* line being timed was executed */
+! #endif
+ sctx_T uf_script_ctx; /* SCTX where function was defined,
+ used for s: variables */
+ int uf_refcount; /* reference count, see func_name_refcount() */
+--- 1371,1377 ----
+ proftime_T uf_tml_wait; /* start wait time for current line */
+ int uf_tml_idx; /* index of line being timed; -1 if none */
+ int uf_tml_execed; /* line being timed was executed */
+! # endif
+ sctx_T uf_script_ctx; /* SCTX where function was defined,
+ used for s: variables */
+ int uf_refcount; /* reference count, see func_name_refcount() */
+***************
+*** 1429,1434 ****
+--- 1429,1440 ----
+ dictitem_T *fd_di; /* Dictionary item used */
+ } funcdict_T;
+
++ typedef struct funccal_entry funccal_entry_T;
++ struct funccal_entry {
++ void *top_funccal;
++ funccal_entry_T *next;
++ };
++
+ #else
+ /* dummy typedefs for function prototypes */
+ typedef struct
+*** ../vim-8.1.0474/src/userfunc.c 2018-09-10 22:03:36.486401101 +0200
+--- src/userfunc.c 2018-10-14 21:29:00.174642990 +0200
+***************
+*** 1175,1180 ****
+--- 1175,1207 ----
+ return isdigit(*name) || *name == '<';
+ }
+
++ static funccal_entry_T *funccal_stack = NULL;
++
++ /*
++ * Save the current function call pointer, and set it to NULL.
++ * Used when executing autocommands and for ":source".
++ */
++ void
++ save_funccal(funccal_entry_T *entry)
++ {
++ entry->top_funccal = current_funccal;
++ entry->next = funccal_stack;
++ funccal_stack = entry;
++ current_funccal = NULL;
++ }
++
++ void
++ restore_funccal(void)
++ {
++ if (funccal_stack == NULL)
++ IEMSG("INTERNAL: restore_funccal()");
++ else
++ {
++ current_funccal = funccal_stack->top_funccal;
++ funccal_stack = funccal_stack->next;
++ }
++ }
++
+ #if defined(EXITFREE) || defined(PROTO)
+ void
+ free_all_functions(void)
+***************
+*** 1185,1195 ****
+ long_u todo = 1;
+ long_u used;
+
+! /* Clean up the call stack. */
+ while (current_funccal != NULL)
+ {
+ clear_tv(current_funccal->rettv);
+ cleanup_function_call(current_funccal);
+ }
+
+ /* First clear what the functions contain. Since this may lower the
+--- 1212,1224 ----
+ long_u todo = 1;
+ long_u used;
+
+! /* Clean up the current_funccal chain and the funccal stack. */
+ while (current_funccal != NULL)
+ {
+ clear_tv(current_funccal->rettv);
+ cleanup_function_call(current_funccal);
++ if (current_funccal == NULL && funccal_stack != NULL)
++ restore_funccal();
+ }
+
+ /* First clear what the functions contain. Since this may lower the
+***************
+*** 3578,3604 ****
+ return current_funccal->returned;
+ }
+
+- /*
+- * Save the current function call pointer, and set it to NULL.
+- * Used when executing autocommands and for ":source".
+- */
+- void *
+- save_funccal(void)
+- {
+- funccall_T *fc = current_funccal;
+-
+- current_funccal = NULL;
+- return (void *)fc;
+- }
+-
+- void
+- restore_funccal(void *vfc)
+- {
+- funccall_T *fc = (funccall_T *)vfc;
+-
+- current_funccal = fc;
+- }
+-
+ int
+ free_unref_funccal(int copyID, int testing)
+ {
+--- 3607,3612 ----
+***************
+*** 3702,3726 ****
+ }
+
+ /*
+- * Clear the current_funccal and return the old value.
+- * Caller is expected to invoke restore_current_funccal().
+- */
+- void *
+- clear_current_funccal()
+- {
+- funccall_T *f = current_funccal;
+-
+- current_funccal = NULL;
+- return f;
+- }
+-
+- void
+- restore_current_funccal(void *f)
+- {
+- current_funccal = f;
+- }
+-
+- /*
+ * List function variables, if there is a function.
+ */
+ void
+--- 3710,3715 ----
+*** ../vim-8.1.0474/src/proto/userfunc.pro 2018-05-17 13:52:55.000000000 +0200
+--- src/proto/userfunc.pro 2018-10-14 21:23:16.693367431 +0200
+***************
+*** 39,53 ****
+ int *func_dbg_tick(void *cookie);
+ int func_level(void *cookie);
+ int current_func_returned(void);
+! void *save_funccal(void);
+! void restore_funccal(void *vfc);
+ int free_unref_funccal(int copyID, int testing);
+ hashtab_T *get_funccal_local_ht(void);
+ dictitem_T *get_funccal_local_var(void);
+ hashtab_T *get_funccal_args_ht(void);
+ dictitem_T *get_funccal_args_var(void);
+- void *clear_current_funccal(void);
+- void restore_current_funccal(void *f);
+ void list_func_vars(int *first);
+ dict_T *get_current_funccal_dict(hashtab_T *ht);
+ hashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht);
+--- 39,51 ----
+ int *func_dbg_tick(void *cookie);
+ int func_level(void *cookie);
+ int current_func_returned(void);
+! void save_funccal(funccal_entry_T *entry);
+! void restore_funccal(void);
+ int free_unref_funccal(int copyID, int testing);
+ hashtab_T *get_funccal_local_ht(void);
+ dictitem_T *get_funccal_local_var(void);
+ hashtab_T *get_funccal_args_ht(void);
+ dictitem_T *get_funccal_args_var(void);
+ void list_func_vars(int *first);
+ dict_T *get_current_funccal_dict(hashtab_T *ht);
+ hashitem_T *find_hi_in_scoped_ht(char_u *name, hashtab_T **pht);
+*** ../vim-8.1.0474/src/fileio.c 2018-10-11 19:27:43.916066156 +0200
+--- src/fileio.c 2018-10-14 21:23:46.449133772 +0200
+***************
+*** 9400,9406 ****
+ AutoPat *ap;
+ #ifdef FEAT_EVAL
+ sctx_T save_current_sctx;
+! void *save_funccalp;
+ char_u *save_cmdarg;
+ long save_cmdbang;
+ #endif
+--- 9400,9406 ----
+ AutoPat *ap;
+ #ifdef FEAT_EVAL
+ sctx_T save_current_sctx;
+! funccal_entry_T funccal_entry;
+ char_u *save_cmdarg;
+ long save_cmdbang;
+ #endif
+***************
+*** 9615,9622 ****
+ prof_child_enter(&wait_time); /* doesn't count for the caller itself */
+ # endif
+
+! /* Don't use local function variables, if called from a function */
+! save_funccalp = save_funccal();
+ #endif
+
+ /*
+--- 9615,9622 ----
+ prof_child_enter(&wait_time); /* doesn't count for the caller itself */
+ # endif
+
+! // Don't use local function variables, if called from a function.
+! save_funccal(&funccal_entry);
+ #endif
+
+ /*
+***************
+*** 9713,9719 ****
+ autocmd_match = save_autocmd_match;
+ #ifdef FEAT_EVAL
+ current_sctx = save_current_sctx;
+! restore_funccal(save_funccalp);
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+ prof_child_exit(&wait_time);
+--- 9713,9719 ----
+ autocmd_match = save_autocmd_match;
+ #ifdef FEAT_EVAL
+ current_sctx = save_current_sctx;
+! restore_funccal();
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+ prof_child_exit(&wait_time);
+*** ../vim-8.1.0474/src/eval.c 2018-10-07 20:14:53.091279680 +0200
+--- src/eval.c 2018-10-14 21:24:20.000869665 +0200
+***************
+*** 859,867 ****
+ int use_sandbox)
+ {
+ char_u *retval;
+! void *save_funccalp;
+
+! save_funccalp = save_funccal();
+ if (use_sandbox)
+ ++sandbox;
+ ++textlock;
+--- 859,867 ----
+ int use_sandbox)
+ {
+ char_u *retval;
+! funccal_entry_T funccal_entry;
+
+! save_funccal(&funccal_entry);
+ if (use_sandbox)
+ ++sandbox;
+ ++textlock;
+***************
+*** 869,875 ****
+ if (use_sandbox)
+ --sandbox;
+ --textlock;
+! restore_funccal(save_funccalp);
+ return retval;
+ }
+
+--- 869,875 ----
+ if (use_sandbox)
+ --sandbox;
+ --textlock;
+! restore_funccal();
+ return retval;
+ }
+
+***************
+*** 8532,8538 ****
+ char_u *tab;
+ int type = VAR_NUMBER;
+ typval_T tv;
+! void *save_funccal;
+
+ if (!writing && (find_viminfo_parameter('!') != NULL))
+ {
+--- 8532,8538 ----
+ char_u *tab;
+ int type = VAR_NUMBER;
+ typval_T tv;
+! funccal_entry_T funccal_entry;
+
+ if (!writing && (find_viminfo_parameter('!') != NULL))
+ {
+***************
+*** 8581,8589 ****
+ }
+
+ /* when in a function use global variables */
+! save_funccal = clear_current_funccal();
+ set_var(virp->vir_line + 1, &tv, FALSE);
+! restore_current_funccal(save_funccal);
+
+ if (tv.v_type == VAR_STRING)
+ vim_free(tv.vval.v_string);
+--- 8581,8589 ----
+ }
+
+ /* when in a function use global variables */
+! save_funccal(&funccal_entry);
+ set_var(virp->vir_line + 1, &tv, FALSE);
+! restore_funccal();
+
+ if (tv.v_type == VAR_STRING)
+ vim_free(tv.vval.v_string);
+*** ../vim-8.1.0474/src/ex_cmds2.c 2018-09-30 21:43:17.183693376 +0200
+--- src/ex_cmds2.c 2018-10-14 21:25:18.216409935 +0200
+***************
+*** 4344,4350 ****
+ #ifdef FEAT_EVAL
+ sctx_T save_current_sctx;
+ static scid_T last_current_SID = 0;
+! void *save_funccalp;
+ int save_debug_break_level = debug_break_level;
+ scriptitem_T *si = NULL;
+ # ifdef UNIX
+--- 4344,4350 ----
+ #ifdef FEAT_EVAL
+ sctx_T save_current_sctx;
+ static scid_T last_current_SID = 0;
+! funccal_entry_T funccalp_entry;
+ int save_debug_break_level = debug_break_level;
+ scriptitem_T *si = NULL;
+ # ifdef UNIX
+***************
+*** 4506,4512 ****
+
+ /* Don't use local function variables, if called from a function.
+ * Also starts profiling timer for nested script. */
+! save_funccalp = save_funccal();
+
+ /*
+ * Check if this script was sourced before to finds its SID.
+--- 4506,4512 ----
+
+ /* Don't use local function variables, if called from a function.
+ * Also starts profiling timer for nested script. */
+! save_funccal(&funccalp_entry);
+
+ /*
+ * Check if this script was sourced before to finds its SID.
+***************
+*** 4665,4671 ****
+ #ifdef FEAT_EVAL
+ almosttheend:
+ current_sctx = save_current_sctx;
+! restore_funccal(save_funccalp);
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+ prof_child_exit(&wait_start); /* leaving a child now */
+--- 4665,4671 ----
+ #ifdef FEAT_EVAL
+ almosttheend:
+ current_sctx = save_current_sctx;
+! restore_funccal();
+ # ifdef FEAT_PROFILE
+ if (do_profiling == PROF_YES)
+ prof_child_exit(&wait_start); /* leaving a child now */
+*** ../vim-8.1.0474/src/main.c 2018-09-30 21:43:17.195693290 +0200
+--- src/main.c 2018-10-14 21:26:18.723930303 +0200
+***************
+*** 1717,1723 ****
+ }
+
+ /*
+! * Check for: [r][e][g][vi|vim|view][diff][ex[im]]
+ * If the executable name starts with "r" we disable shell commands.
+ * If the next character is "e" we run in Easy mode.
+ * If the next character is "g" we run the GUI version.
+--- 1717,1723 ----
+ }
+
+ /*
+! * Check for: [r][e][g][vi|vim|view][diff][ex[im]] (sort of)
+ * If the executable name starts with "r" we disable shell commands.
+ * If the next character is "e" we run in Easy mode.
+ * If the next character is "g" we run the GUI version.
+***************
+*** 1788,1794 ****
+ else if (STRNICMP(initstr, "vim", 3) == 0)
+ initstr += 3;
+
+! /* Catch "[r][g]vimdiff" and "[r][g]viewdiff". */
+ if (STRICMP(initstr, "diff") == 0)
+ {
+ #ifdef FEAT_DIFF
+--- 1788,1794 ----
+ else if (STRNICMP(initstr, "vim", 3) == 0)
+ initstr += 3;
+
+! // Catch "[r][g]vimdiff" and "[r][g]viewdiff".
+ if (STRICMP(initstr, "diff") == 0)
+ {
+ #ifdef FEAT_DIFF
+***************
+*** 1800,1812 ****
+ #endif
+ }
+
+ if (STRNICMP(initstr, "ex", 2) == 0)
+ {
+ if (STRNICMP(initstr + 2, "im", 2) == 0)
+ exmode_active = EXMODE_VIM;
+ else
+ exmode_active = EXMODE_NORMAL;
+! change_compatible(TRUE); /* set 'compatible' */
+ }
+ }
+
+--- 1800,1814 ----
+ #endif
+ }
+
++ // Checking for "ex" here may catch some weir names, such as "vimex" or
++ // "viewex", we assume the user knows that.
+ if (STRNICMP(initstr, "ex", 2) == 0)
+ {
+ if (STRNICMP(initstr + 2, "im", 2) == 0)
+ exmode_active = EXMODE_VIM;
+ else
+ exmode_active = EXMODE_NORMAL;
+! change_compatible(TRUE); // set 'compatible'
+ }
+ }
+
+***************
+*** 4188,4199 ****
+ char_u *res;
+ int save_dbl = debug_break_level;
+ int save_ro = redir_off;
+! void *fc = NULL;
+
+ /* Evaluate the expression at the toplevel, don't use variables local to
+ * the calling function. Except when in debug mode. */
+ if (!debug_mode)
+! fc = clear_current_funccal();
+
+ /* Disable debugging, otherwise Vim hangs, waiting for "cont" to be
+ * typed. */
+--- 4190,4205 ----
+ char_u *res;
+ int save_dbl = debug_break_level;
+ int save_ro = redir_off;
+! funccal_entry_T funccal_entry;
+! int did_save_funccal = FALSE;
+
+ /* Evaluate the expression at the toplevel, don't use variables local to
+ * the calling function. Except when in debug mode. */
+ if (!debug_mode)
+! {
+! save_funccal(&funccal_entry);
+! did_save_funccal = TRUE;
+! }
+
+ /* Disable debugging, otherwise Vim hangs, waiting for "cont" to be
+ * typed. */
+***************
+*** 4210,4217 ****
+ --emsg_silent;
+ if (emsg_silent < 0)
+ emsg_silent = 0;
+! if (fc != NULL)
+! restore_current_funccal(fc);
+
+ /* A client can tell us to redraw, but not to display the cursor, so do
+ * that here. */
+--- 4216,4223 ----
+ --emsg_silent;
+ if (emsg_silent < 0)
+ emsg_silent = 0;
+! if (did_save_funccal)
+! restore_funccal();
+
+ /* A client can tell us to redraw, but not to display the cursor, so do
+ * that here. */
+*** ../vim-8.1.0474/src/version.c 2018-10-14 16:25:04.904583951 +0200
+--- src/version.c 2018-10-14 21:37:36.574478570 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 475,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+201. When somebody asks you where you are, you tell them in which chat room.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0476 b/data/vim/patches/8.1.0476
new file mode 100644
index 000000000..8387759a3
--- /dev/null
+++ b/data/vim/patches/8.1.0476
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0476
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0476
+Problem: Memory leaks in test_escaped_glob.
+Solution: Avoid failure when running the shell, use the sandbox.
+Files: src/testdir/test_escaped_glob.vim
+
+
+*** ../vim-8.1.0475/src/testdir/test_escaped_glob.vim 2017-12-07 22:05:10.000000000 +0100
+--- src/testdir/test_escaped_glob.vim 2018-10-14 22:02:01.544686099 +0200
+***************
+*** 2,9 ****
+ " characters.
+
+ function SetUp()
+- " make sure glob() doesn't use the shell
+- set shell=doesnotexist
+ " consistent sorting of file names
+ set nofileignorecase
+ endfunction
+--- 2,7 ----
+***************
+*** 14,32 ****
+ " filenames. Disable the test on non-Unix systems for now.
+ return
+ endif
+! call assert_equal("", glob('Xxx\{'))
+! call assert_equal("", glob('Xxx\$'))
+ w! Xxx{
+ w! Xxx\$
+! call assert_equal("Xxx{", glob('Xxx\{'))
+! call assert_equal("Xxx$", glob('Xxx\$'))
+ call delete('Xxx{')
+ call delete('Xxx$')
+ endfunction
+
+ function Test_globpath()
+! call assert_equal("sautest/autoload/globone.vim\nsautest/autoload/globtwo.vim",
+ \ globpath('sautest/autoload', 'glob*.vim'))
+! call assert_equal(['sautest/autoload/globone.vim', 'sautest/autoload/globtwo.vim'],
+ \ globpath('sautest/autoload', 'glob*.vim', 0, 1))
+ endfunction
+--- 12,33 ----
+ " filenames. Disable the test on non-Unix systems for now.
+ return
+ endif
+!
+! " Execute these commands in the sandbox, so that using the shell fails.
+! " Setting 'shell' to an invalid name causes a memory leak.
+! sandbox call assert_equal("", glob('Xxx\{'))
+! sandbox call assert_equal("", glob('Xxx\$'))
+ w! Xxx{
+ w! Xxx\$
+! sandbox call assert_equal("Xxx{", glob('Xxx\{'))
+! sandbox call assert_equal("Xxx$", glob('Xxx\$'))
+ call delete('Xxx{')
+ call delete('Xxx$')
+ endfunction
+
+ function Test_globpath()
+! sandbox call assert_equal("sautest/autoload/globone.vim\nsautest/autoload/globtwo.vim",
+ \ globpath('sautest/autoload', 'glob*.vim'))
+! sandbox call assert_equal(['sautest/autoload/globone.vim', 'sautest/autoload/globtwo.vim'],
+ \ globpath('sautest/autoload', 'glob*.vim', 0, 1))
+ endfunction
+*** ../vim-8.1.0475/src/version.c 2018-10-14 21:40:57.356848425 +0200
+--- src/version.c 2018-10-14 22:03:06.948104382 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 476,
+ /**/
+
+--
+panic("Foooooooood fight!");
+ -- In the kernel source aha1542.c, after detecting a bad segment list
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0477 b/data/vim/patches/8.1.0477
new file mode 100644
index 000000000..007dab042
--- /dev/null
+++ b/data/vim/patches/8.1.0477
@@ -0,0 +1,47 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0477
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0477 (after 8.1.0475)
+Problem: Tiny build fails.
+Solution: Add a dummy declaration for funccal_entry_T.
+Files: src/structs.h
+
+
+*** ../vim-8.1.0476/src/structs.h 2018-10-14 21:40:57.352848455 +0200
+--- src/structs.h 2018-10-14 22:36:20.990582112 +0200
+***************
+*** 1445,1450 ****
+--- 1445,1454 ----
+ {
+ int dummy;
+ } funcdict_T;
++ typedef struct
++ {
++ int dummy;
++ } funccal_entry_T;
+ #endif
+
+ struct partial_S
+*** ../vim-8.1.0476/src/version.c 2018-10-14 22:03:52.699698553 +0200
+--- src/version.c 2018-10-14 22:37:15.774104455 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 477,
+ /**/
+
+--
+$ echo pizza > /dev/oven
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0478 b/data/vim/patches/8.1.0478
new file mode 100644
index 000000000..d0fb7f56b
--- /dev/null
+++ b/data/vim/patches/8.1.0478
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0478
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0478
+Problem: Cannot build with perl using MinGW.
+Solution: Add -I. (Ken Takata, Cesar Romani)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0477/src/Make_cyg_ming.mak 2018-10-14 16:25:04.904583951 +0200
+--- src/Make_cyg_ming.mak 2018-10-15 20:08:10.194056013 +0200
+***************
+*** 1049,1055 ****
+ $(PERLTYPEMAP) if_perl.xs -output $@
+
+ $(OUTDIR)/if_perl.o: auto/if_perl.c $(INCL)
+! $(CC) -c $(CFLAGS) auto/if_perl.c -o $(OUTDIR)/if_perl.o
+
+
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+--- 1049,1055 ----
+ $(PERLTYPEMAP) if_perl.xs -output $@
+
+ $(OUTDIR)/if_perl.o: auto/if_perl.c $(INCL)
+! $(CC) -c $(CFLAGS) -I. auto/if_perl.c -o $(OUTDIR)/if_perl.o
+
+
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+*** ../vim-8.1.0477/src/version.c 2018-10-14 22:38:06.161665231 +0200
+--- src/version.c 2018-10-15 20:10:39.696916053 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 478,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+205. You're constantly yelling at your spouse, family, roommate, whatever,
+ for using the phone for stupid things...like talking.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0479 b/data/vim/patches/8.1.0479
new file mode 100644
index 000000000..84cfe5f20
--- /dev/null
+++ b/data/vim/patches/8.1.0479
@@ -0,0 +1,188 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0479
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0479
+Problem: Failure when setting 'varsofttabstop' to end in a comma. (Ralf
+ Schandl)
+Solution: Reject value with trailing command. Add test for invalid values
+ (closes #3544)
+Files: src/testdir/test_vartabs.vim, src/option.c
+
+
+*** ../vim-8.1.0478/src/testdir/test_vartabs.vim 2018-06-28 22:22:56.233315600 +0200
+--- src/testdir/test_vartabs.vim 2018-10-15 22:50:55.841034425 +0200
+***************
+*** 5,15 ****
+ endif
+
+ source view_util.vim
+! function! s:compare_lines(expect, actual)
+ call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
+! endfunction
+
+! func! Test_vartabs()
+ new
+ %d
+
+--- 5,15 ----
+ endif
+
+ source view_util.vim
+! func s:compare_lines(expect, actual)
+ call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
+! endfunc
+
+! func Test_vartabs()
+ new
+ %d
+
+***************
+*** 261,267 ****
+ bwipeout!
+ endfunc
+
+! func! Test_vartabs_linebreak()
+ if winwidth(0) < 40
+ return
+ endif
+--- 261,267 ----
+ bwipeout!
+ endfunc
+
+! func Test_vartabs_linebreak()
+ if winwidth(0) < 40
+ return
+ endif
+***************
+*** 296,298 ****
+--- 296,309 ----
+ bw!
+ set nolist listchars&vim
+ endfunc
++
++ func Test_vartabs_failures()
++ call assert_fails('set vts=8,')
++ call assert_fails('set vsts=8,')
++ call assert_fails('set vts=8,,8')
++ call assert_fails('set vsts=8,,8')
++ call assert_fails('set vts=8,,8,')
++ call assert_fails('set vsts=8,,8,')
++ call assert_fails('set vts=,8')
++ call assert_fails('set vsts=,8')
++ endfunc
+*** ../vim-8.1.0478/src/option.c 2018-10-02 14:45:07.023652468 +0200
+--- src/option.c 2018-10-15 22:49:58.049552333 +0200
+***************
+*** 12786,12802 ****
+ int t;
+ char_u *cp;
+
+! if ((!var[0] || (var[0] == '0' && !var[1])))
+ {
+ *array = NULL;
+ return TRUE;
+ }
+
+! for (cp = var; *cp; ++cp)
+ {
+! if (cp == var || *(cp - 1) == ',')
+ {
+ char_u *end;
+ if (strtol((char *)cp, (char **)&end, 10) <= 0)
+ {
+ if (cp != end)
+--- 12786,12803 ----
+ int t;
+ char_u *cp;
+
+! if (var[0] == NUL || (var[0] == '0' && var[1] == NUL))
+ {
+ *array = NULL;
+ return TRUE;
+ }
+
+! for (cp = var; *cp != NUL; ++cp)
+ {
+! if (cp == var || cp[-1] == ',')
+ {
+ char_u *end;
++
+ if (strtol((char *)cp, (char **)&end, 10) <= 0)
+ {
+ if (cp != end)
+***************
+*** 12809,12815 ****
+
+ if (VIM_ISDIGIT(*cp))
+ continue;
+! if (*cp == ',' && cp > var && *(cp - 1) != ',')
+ {
+ ++valcount;
+ continue;
+--- 12810,12816 ----
+
+ if (VIM_ISDIGIT(*cp))
+ continue;
+! if (cp[0] == ',' && cp > var && cp[-1] != ',' && cp[1] != NUL)
+ {
+ ++valcount;
+ continue;
+***************
+*** 12818,12833 ****
+ return FALSE;
+ }
+
+! *array = (int *) alloc((unsigned) ((valcount + 1) * sizeof(int)));
+ (*array)[0] = valcount;
+
+ t = 1;
+! for (cp = var; *cp;)
+ {
+ (*array)[t++] = atoi((char *)cp);
+! while (*cp && *cp != ',')
+ ++cp;
+! if (*cp)
+ ++cp;
+ }
+
+--- 12819,12834 ----
+ return FALSE;
+ }
+
+! *array = (int *)alloc((unsigned) ((valcount + 1) * sizeof(int)));
+ (*array)[0] = valcount;
+
+ t = 1;
+! for (cp = var; *cp != NUL;)
+ {
+ (*array)[t++] = atoi((char *)cp);
+! while (*cp != NUL && *cp != ',')
+ ++cp;
+! if (*cp != NUL)
+ ++cp;
+ }
+
+*** ../vim-8.1.0478/src/version.c 2018-10-15 20:11:14.472652214 +0200
+--- src/version.c 2018-10-15 22:51:35.136682428 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 479,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+214. Your MCI "Circle of Friends" are all Hayes-compatible.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0480 b/data/vim/patches/8.1.0480
new file mode 100644
index 000000000..cd8355dae
--- /dev/null
+++ b/data/vim/patches/8.1.0480
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0480
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0480
+Problem: MinGW build file uses different -I flags than MVC.
+Solution: Add -I to $CFLAGS. (Ken Takata)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0479/src/Make_cyg_ming.mak 2018-10-15 20:11:14.472652214 +0200
+--- src/Make_cyg_ming.mak 2018-10-16 21:10:48.489079439 +0200
+***************
+*** 501,507 ****
+ #>>>>> end of choices
+ ###########################################################################
+
+! CFLAGS = -Iproto $(DEFINES) -pipe -march=$(ARCH) -Wall
+ CXXFLAGS = -std=gnu++11
+ WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
+ EXTRA_LIBS =
+--- 501,507 ----
+ #>>>>> end of choices
+ ###########################################################################
+
+! CFLAGS = -I. -Iproto $(DEFINES) -pipe -march=$(ARCH) -Wall
+ CXXFLAGS = -std=gnu++11
+ WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
+ EXTRA_LIBS =
+***************
+*** 1049,1055 ****
+ $(PERLTYPEMAP) if_perl.xs -output $@
+
+ $(OUTDIR)/if_perl.o: auto/if_perl.c $(INCL)
+! $(CC) -c $(CFLAGS) -I. auto/if_perl.c -o $(OUTDIR)/if_perl.o
+
+
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+--- 1049,1055 ----
+ $(PERLTYPEMAP) if_perl.xs -output $@
+
+ $(OUTDIR)/if_perl.o: auto/if_perl.c $(INCL)
+! $(CC) -c $(CFLAGS) auto/if_perl.c -o $(OUTDIR)/if_perl.o
+
+
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+*** ../vim-8.1.0479/src/version.c 2018-10-15 22:51:46.744578471 +0200
+--- src/version.c 2018-10-16 21:12:00.908430685 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 480,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+218. Your spouse hands you a gift wrapped magnet with your PC's name
+ on it and you accuse him or her of genocide.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0481 b/data/vim/patches/8.1.0481
new file mode 100644
index 000000000..682c01928
--- /dev/null
+++ b/data/vim/patches/8.1.0481
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0481
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0481
+Problem: When "Terminal" highlight is reverted cursor doesn't show.
+Solution: Get the colors of the "Terminal" group. (closes #3546)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0480/src/terminal.c 2018-09-09 19:56:03.434838223 +0200
+--- src/terminal.c 2018-10-16 22:05:15.814900004 +0200
+***************
+*** 1953,1958 ****
+--- 1953,1960 ----
+ {
+ term_T *term = in_terminal_loop;
+ static cursorentry_T entry;
++ int id;
++ guicolor_T term_fg, term_bg;
+
+ vim_memset(&entry, 0, sizeof(entry));
+ entry.shape = entry.mshape =
+***************
+*** 1966,1974 ****
+ entry.blinkon = 400;
+ entry.blinkoff = 250;
+ }
+! *fg = gui.back_pixel;
+ if (term->tl_cursor_color == NULL)
+! *bg = gui.norm_pixel;
+ else
+ *bg = color_name2handle(term->tl_cursor_color);
+ entry.name = "n";
+--- 1968,1991 ----
+ entry.blinkon = 400;
+ entry.blinkoff = 250;
+ }
+!
+! /* The "Terminal" highlight group overrules the defaults. */
+! id = syn_name2id((char_u *)"Terminal");
+! if (id != 0)
+! {
+! syn_id2colors(id, &term_fg, &term_bg);
+! *fg = term_bg;
+! }
+! else
+! *fg = gui.back_pixel;
+!
+ if (term->tl_cursor_color == NULL)
+! {
+! if (id != 0)
+! *bg = term_fg;
+! else
+! *bg = gui.norm_pixel;
+! }
+ else
+ *bg = color_name2handle(term->tl_cursor_color);
+ entry.name = "n";
+*** ../vim-8.1.0480/src/version.c 2018-10-16 21:13:10.411812362 +0200
+--- src/version.c 2018-10-16 22:07:53.913539102 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 481,
+ /**/
+
+--
+Your fault: core dumped
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0482 b/data/vim/patches/8.1.0482
new file mode 100644
index 000000000..1ad8f0d89
--- /dev/null
+++ b/data/vim/patches/8.1.0482
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0482
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0482
+Problem: MinGW "make clean" deletes all .exe files.
+Solution: Only delete .exe files that it builds. (Ken Takata)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0481/src/Make_cyg_ming.mak 2018-10-16 21:13:10.411812362 +0200
+--- src/Make_cyg_ming.mak 2018-10-17 22:09:45.125246398 +0200
+***************
+*** 972,978 ****
+ $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
+
+ tags: notags
+! $(CTAGS) *.c *.cpp *.h if_perl.xs
+
+ notags:
+ -$(DEL) tags
+--- 972,982 ----
+ $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
+
+ tags: notags
+! $(CTAGS) *.c *.cpp *.h
+! ifdef PERL
+! $(CTAGS) --append=yes auto$(DIRSLASH)if_perl.c
+! endif
+!
+
+ notags:
+ -$(DEL) tags
+***************
+*** 981,987 ****
+ -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
+ -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
+ -rmdir $(OUTDIR)
+! -$(DEL) *.exe
+ -$(DEL) pathdef.c
+ ifdef PERL
+ -$(DEL) if_perl.c
+--- 985,991 ----
+ -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
+ -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
+ -rmdir $(OUTDIR)
+! -$(DEL) $(TARGET) vimrun.exe install.exe uninstal.exe
+ -$(DEL) pathdef.c
+ ifdef PERL
+ -$(DEL) if_perl.c
+*** ../vim-8.1.0481/src/version.c 2018-10-16 22:12:56.090984061 +0200
+--- src/version.c 2018-10-17 22:10:39.552719823 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 482,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+228. You spend Saturday night making the counter on your home page
+ pass that 2000 mark.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0483 b/data/vim/patches/8.1.0483
new file mode 100644
index 000000000..70b40c58a
--- /dev/null
+++ b/data/vim/patches/8.1.0483
@@ -0,0 +1,87 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0483
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0483
+Problem: MinGW does not build tee.exe.
+Solution: Add build instructions. (Yasuhiro Matsumoto, closes #3548)
+Files: src/Make_cyg_ming.mak, src/tee/Makefile
+
+
+*** ../vim-8.1.0482/src/Make_cyg_ming.mak 2018-10-17 22:12:10.627845134 +0200
+--- src/Make_cyg_ming.mak 2018-10-17 22:43:01.705335899 +0200
+***************
+*** 943,949 ****
+ LFLAGS += -Wl,-Map=$(TARGET).map
+ endif
+
+! all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
+
+ vimrun.exe: vimrun.c
+ $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
+--- 943,949 ----
+ LFLAGS += -Wl,-Map=$(TARGET).map
+ endif
+
+! all: $(TARGET) vimrun.exe xxd/xxd.exe tee/tee.exe install.exe uninstal.exe GvimExt/gvimext.dll
+
+ vimrun.exe: vimrun.c
+ $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
+***************
+*** 968,973 ****
+--- 968,976 ----
+ xxd/xxd.exe: xxd/xxd.c
+ $(MAKE) -C xxd -f Make_ming.mak CC='$(CC)'
+
++ tee/tee.exe: tee/tee.c
++ $(MAKE) -C tee CC='$(CC)'
++
+ GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
+ $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
+
+***************
+*** 996,1001 ****
+--- 999,1005 ----
+ endif
+ $(MAKE) -C GvimExt -f Make_ming.mak clean
+ $(MAKE) -C xxd -f Make_ming.mak clean
++ $(MAKE) -C tee clean
+
+ ###########################################################################
+ INCL = vim.h alloc.h arabic.h ascii.h ex_cmds.h farsi.h feature.h globals.h \
+*** ../vim-8.1.0482/src/tee/Makefile 2010-05-15 13:04:08.000000000 +0200
+--- src/tee/Makefile 2018-10-17 22:43:52.592811771 +0200
+***************
+*** 1,4 ****
+! # A very (if not the most) simplistic Makefile for OS/2
+
+ CC=gcc
+ CFLAGS=-O2 -fno-strength-reduce
+--- 1,4 ----
+! # A very (if not the most) simplistic Makefile for MS-Windows and OS/2
+
+ CC=gcc
+ CFLAGS=-O2 -fno-strength-reduce
+*** ../vim-8.1.0482/src/version.c 2018-10-17 22:12:10.627845134 +0200
+--- src/version.c 2018-10-17 22:44:59.276129663 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 483,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+229. You spend so much time thinking what to add on this list.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0484 b/data/vim/patches/8.1.0484
new file mode 100644
index 000000000..52dd57b2d
--- /dev/null
+++ b/data/vim/patches/8.1.0484
@@ -0,0 +1,213 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0484
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0484
+Problem: Some file types are not recognized.
+Solution: Update the file type detection.
+Files: runtime/filetype.vim, src/testdir/test_filetype.vim
+
+
+*** ../vim-8.1.0483/runtime/filetype.vim 2018-05-04 20:36:26.000000000 +0200
+--- runtime/filetype.vim 2018-10-11 16:27:56.551008731 +0200
+***************
+*** 586,592 ****
+ au BufNewFile,BufRead *.mas,*.master setf master
+
+ " Forth
+! au BufNewFile,BufRead *.fs,*.ft setf forth
+
+ " Reva Forth
+ au BufNewFile,BufRead *.frt setf reva
+--- 586,592 ----
+ au BufNewFile,BufRead *.mas,*.master setf master
+
+ " Forth
+! au BufNewFile,BufRead *.fs,*.ft,*.fth setf forth
+
+ " Reva Forth
+ au BufNewFile,BufRead *.frt setf reva
+***************
+*** 1263,1271 ****
+ " Pyrex
+ au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
+
+! " Python, Python Shell Startup Files
+ " Quixote (Python-based web framework)
+! au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python
+
+ " Radiance
+ au BufNewFile,BufRead *.rad,*.mat setf radiance
+--- 1263,1271 ----
+ " Pyrex
+ au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
+
+! " Python, Python Shell Startup and Python Stub Files
+ " Quixote (Python-based web framework)
+! au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python
+
+ " Radiance
+ au BufNewFile,BufRead *.rad,*.mat setf radiance
+***************
+*** 1414,1421 ****
+ " sed
+ au BufNewFile,BufRead *.sed setf sed
+
+! " Sieve (RFC 3028)
+! au BufNewFile,BufRead *.siv setf sieve
+
+ " Sendmail
+ au BufNewFile,BufRead sendmail.cf setf sm
+--- 1414,1421 ----
+ " sed
+ au BufNewFile,BufRead *.sed setf sed
+
+! " Sieve (RFC 3028, 5228)
+! au BufNewFile,BufRead *.siv,*.sieve setf sieve
+
+ " Sendmail
+ au BufNewFile,BufRead sendmail.cf setf sm
+***************
+*** 1462,1468 ****
+
+ " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
+ " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
+! au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
+ au BufNewFile,BufRead .kshrc*,*.ksh call dist#ft#SetFileTypeSH("ksh")
+ au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
+
+--- 1462,1468 ----
+
+ " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
+ " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
+! au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
+ au BufNewFile,BufRead .kshrc*,*.ksh call dist#ft#SetFileTypeSH("ksh")
+ au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
+
+***************
+*** 1766,1771 ****
+--- 1766,1774 ----
+ " Webmacro
+ au BufNewFile,BufRead *.wm setf webmacro
+
++ " WebAssembly
++ au BufNewFile,BufRead *.wast,*.wat setf wast
++
+ " Wget config
+ au BufNewFile,BufRead .wgetrc,wgetrc setf wget
+
+***************
+*** 1862,1867 ****
+--- 1865,1873 ----
+ " ATI graphics driver configuration
+ au BufNewFile,BufRead fglrxrc setf xml
+
++ " Web Services Description Language (WSDL)
++ au BufNewFile,BufRead *.wsdl setf xml
++
+ " XLIFF (XML Localisation Interchange File Format) is also XML
+ au BufNewFile,BufRead *.xlf setf xml
+ au BufNewFile,BufRead *.xliff setf xml
+*** ../vim-8.1.0483/src/testdir/test_filetype.vim 2018-02-03 22:32:17.000000000 +0100
+--- src/testdir/test_filetype.vim 2018-10-19 16:26:23.556527490 +0200
+***************
+*** 162,168 ****
+ \ 'fetchmail': ['.fetchmailrc'],
+ \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
+ \ 'focexec': ['file.fex', 'file.focexec'],
+! \ 'forth': ['file.fs', 'file.ft'],
+ \ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
+ \ 'framescript': ['file.fsl'],
+ \ 'freebasic': ['file.fb', 'file.bi'],
+--- 162,168 ----
+ \ 'fetchmail': ['.fetchmailrc'],
+ \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
+ \ 'focexec': ['file.fex', 'file.focexec'],
+! \ 'forth': ['file.fs', 'file.ft', 'file.fth'],
+ \ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
+ \ 'framescript': ['file.fsl'],
+ \ 'freebasic': ['file.fb', 'file.bi'],
+***************
+*** 350,356 ****
+ \ 'protocols': ['/etc/protocols'],
+ \ 'psf': ['file.psf'],
+ \ 'pyrex': ['file.pyx', 'file.pxd'],
+! \ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl'],
+ \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg'],
+ \ 'radiance': ['file.rad', 'file.mat'],
+ \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
+--- 350,356 ----
+ \ 'protocols': ['/etc/protocols'],
+ \ 'psf': ['file.psf'],
+ \ 'pyrex': ['file.pyx', 'file.pxd'],
+! \ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi'],
+ \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg'],
+ \ 'radiance': ['file.rad', 'file.mat'],
+ \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
+***************
+*** 389,395 ****
+ \ 'services': ['/etc/services'],
+ \ 'setserial': ['/etc/serial.conf'],
+ \ 'sh': ['/etc/udev/cdsymlinks.conf'],
+! \ 'sieve': ['file.siv'],
+ \ 'simula': ['file.sim'],
+ \ 'sinda': ['file.sin', 'file.s85'],
+ \ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'],
+--- 389,395 ----
+ \ 'services': ['/etc/services'],
+ \ 'setserial': ['/etc/serial.conf'],
+ \ 'sh': ['/etc/udev/cdsymlinks.conf'],
+! \ 'sieve': ['file.siv', 'file.sieve'],
+ \ 'simula': ['file.sim'],
+ \ 'sinda': ['file.sin', 'file.s85'],
+ \ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'],
+***************
+*** 474,479 ****
+--- 474,480 ----
+ \ 'voscm': ['file.cm'],
+ \ 'vrml': ['file.wrl'],
+ \ 'vroom': ['file.vroom'],
++ \ 'wast': ['file.wast', 'file.wat'],
+ \ 'webmacro': ['file.wm'],
+ \ 'wget': ['.wgetrc', 'wgetrc'],
+ \ 'winbatch': ['file.wbt'],
+***************
+*** 484,490 ****
+ \ 'xhtml': ['file.xhtml', 'file.xht'],
+ \ 'xinetd': ['/etc/xinetd.conf'],
+ \ 'xmath': ['file.msc', 'file.msf'],
+! \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ts', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul'],
+ \ 'xmodmap': ['anyXmodmap'],
+ \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
+ \ 'xpm2': ['file.xpm2'],
+--- 485,491 ----
+ \ 'xhtml': ['file.xhtml', 'file.xht'],
+ \ 'xinetd': ['/etc/xinetd.conf'],
+ \ 'xmath': ['file.msc', 'file.msf'],
+! \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ts', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl'],
+ \ 'xmodmap': ['anyXmodmap'],
+ \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
+ \ 'xpm2': ['file.xpm2'],
+*** ../vim-8.1.0483/src/version.c 2018-10-17 22:45:51.167602173 +0200
+--- src/version.c 2018-10-19 16:23:53.577643291 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 484,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+240. You think Webster's Dictionary is a directory of WEB sites.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0485 b/data/vim/patches/8.1.0485
new file mode 100644
index 000000000..73837dfcc
--- /dev/null
+++ b/data/vim/patches/8.1.0485
@@ -0,0 +1,86 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0485
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0485
+Problem: term_start() does not check if directory is accessible.
+Solution: Add mch_access() call. (Jason Franklin)
+Files: src/channel.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0484/src/channel.c 2018-09-13 15:33:39.601712271 +0200
+--- src/channel.c 2018-10-19 16:52:39.981396959 +0200
+***************
+*** 4916,4922 ****
+ if (!(supported2 & JO2_CWD))
+ break;
+ opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf);
+! if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd))
+ {
+ EMSG2(_(e_invargval), "cwd");
+ return FAIL;
+--- 4916,4923 ----
+ if (!(supported2 & JO2_CWD))
+ break;
+ opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf);
+! if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)
+! || mch_access((char *)opt->jo_cwd, X_OK) != 0)
+ {
+ EMSG2(_(e_invargval), "cwd");
+ return FAIL;
+*** ../vim-8.1.0484/src/testdir/test_terminal.vim 2018-08-07 16:33:15.255728441 +0200
+--- src/testdir/test_terminal.vim 2018-10-19 16:52:03.413741075 +0200
+***************
+*** 478,483 ****
+--- 478,505 ----
+ call delete('Xdir', 'rf')
+ endfunc
+
++ func Test_terminal_cwd_failure()
++ " Case 1: Provided directory is not actually a directory. Attempt to make
++ " the file executable as well.
++ call writefile([], 'Xfile')
++ call setfperm('Xfile', 'rwx------')
++ call assert_fails("call term_start(&shell, {'cwd': 'Xfile'})", 'E475:')
++ call delete('Xfile')
++
++ " Case 2: Directory does not exist.
++ call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
++
++ " Case 3: Directory exists but is not accessible.
++ call mkdir('Xdir', '', '0600')
++ " return early if the directory permissions could not be set properly
++ if getfperm('Xdir')[2] == 'x'
++ call delete('Xdir', 'rf')
++ return
++ endif
++ call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
++ call delete('Xdir', 'rf')
++ endfunc
++
+ func Test_terminal_servername()
+ if !has('clientserver')
+ return
+*** ../vim-8.1.0484/src/version.c 2018-10-19 16:26:39.964404727 +0200
+--- src/version.c 2018-10-19 16:50:33.270601082 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 485,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+241. You try to look for Net Search even when you're in File Manager.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0486 b/data/vim/patches/8.1.0486
new file mode 100644
index 000000000..1da067e7b
--- /dev/null
+++ b/data/vim/patches/8.1.0486
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0486
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0486 (after 8.1.0485)
+Problem: Can't build in MS-Windows.
+Solution: Put mch_access() call inside #ifdef
+Files: src/channel.c
+
+
+*** ../vim-8.1.0485/src/channel.c 2018-10-19 16:53:36.732867808 +0200
+--- src/channel.c 2018-10-19 17:34:14.806125758 +0200
+***************
+*** 4917,4923 ****
+ break;
+ opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf);
+ if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)
+! || mch_access((char *)opt->jo_cwd, X_OK) != 0)
+ {
+ EMSG2(_(e_invargval), "cwd");
+ return FAIL;
+--- 4917,4926 ----
+ break;
+ opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf);
+ if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)
+! #ifndef WIN32 // Win32 directories don't have the concept of "executable"
+! || mch_access((char *)opt->jo_cwd, X_OK) != 0
+! #endif
+! )
+ {
+ EMSG2(_(e_invargval), "cwd");
+ return FAIL;
+*** ../vim-8.1.0485/src/version.c 2018-10-19 16:53:36.732867808 +0200
+--- src/version.c 2018-10-19 17:35:28.221467810 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 486,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+242. You turn down a better-paying job because it doesn't come with
+ a free e-mail account.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0487 b/data/vim/patches/8.1.0487
new file mode 100644
index 000000000..e373db8b0
--- /dev/null
+++ b/data/vim/patches/8.1.0487
@@ -0,0 +1,1207 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.04
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0487
+Problem: No menus specifically for the terminal window.
+Solution: Add :tlmenu. (Yee Cheng Chin, closes #3439) Add a menu test.
+Files: runtime/delmenu.vim, runtime/doc/autocmd.txt, runtime/doc/gui.txt,
+ runtime/doc/index.txt, runtime/doc/terminal.txt,
+ runtime/doc/usr_42.txt, runtime/menu.vim, src/ex_cmdidxs.h,
+ src/ex_cmds.h, src/ex_docmd.c, src/menu.c, src/proto/menu.pro,
+ src/popupmnu.c, src/structs.h, src/testdir/test_menu.vim
+
+
+*** ../vim-8.1.0486/runtime/delmenu.vim 2010-05-15 13:03:31.000000000 +0200
+--- runtime/delmenu.vim 2018-10-19 18:35:52.654453150 +0200
+***************
+*** 5,10 ****
+--- 5,11 ----
+ " Last Change: 2001 May 27
+
+ aunmenu *
++ tlunmenu *
+
+ silent! unlet did_install_default_menus
+ silent! unlet did_install_syntax_menu
+*** ../vim-8.1.0486/runtime/doc/autocmd.txt 2018-09-16 15:47:45.629425398 +0200
+--- runtime/doc/autocmd.txt 2018-10-19 18:35:52.654453150 +0200
+***************
+*** 831,843 ****
+ right mouse button). Useful for adjusting the
+ menu for what is under the cursor or mouse
+ pointer.
+! The pattern is matched against a single
+! character representing the mode:
+ n Normal
+ v Visual
+ o Operator-pending
+ i Insert
+ c Command line
+ *OptionSet*
+ OptionSet After setting an option. The pattern is
+ matched against the long option name.
+--- 835,848 ----
+ right mouse button). Useful for adjusting the
+ menu for what is under the cursor or mouse
+ pointer.
+! The pattern is matched against one or two
+! characters representing the mode:
+ n Normal
+ v Visual
+ o Operator-pending
+ i Insert
+ c Command line
++ tl Terminal
+ *OptionSet*
+ OptionSet After setting an option. The pattern is
+ matched against the long option name.
+*** ../vim-8.1.0486/runtime/doc/gui.txt 2018-05-17 13:41:40.000000000 +0200
+--- runtime/doc/gui.txt 2018-10-19 19:21:48.080078320 +0200
+***************
+*** 547,561 ****
+
+ 5.2 Creating New Menus *creating-menus*
+
+! *:me* *:menu* *:noreme* *:noremenu*
+! *:am* *:amenu* *:an* *:anoremenu*
+! *:nme* *:nmenu* *:nnoreme* *:nnoremenu*
+! *:ome* *:omenu* *:onoreme* *:onoremenu*
+! *:vme* *:vmenu* *:vnoreme* *:vnoremenu*
+! *:xme* *:xmenu* *:xnoreme* *:xnoremenu*
+! *:sme* *:smenu* *:snoreme* *:snoremenu*
+! *:ime* *:imenu* *:inoreme* *:inoremenu*
+! *:cme* *:cmenu* *:cnoreme* *:cnoremenu*
+ *E330* *E327* *E331* *E336* *E333*
+ *E328* *E329* *E337* *E792*
+ To create a new menu item, use the ":menu" commands. They are mostly like
+--- 547,562 ----
+
+ 5.2 Creating New Menus *creating-menus*
+
+! *:me* *:menu* *:noreme* *:noremenu*
+! *:am* *:amenu* *:an* *:anoremenu*
+! *:nme* *:nmenu* *:nnoreme* *:nnoremenu*
+! *:ome* *:omenu* *:onoreme* *:onoremenu*
+! *:vme* *:vmenu* *:vnoreme* *:vnoremenu*
+! *:xme* *:xmenu* *:xnoreme* *:xnoremenu*
+! *:sme* *:smenu* *:snoreme* *:snoremenu*
+! *:ime* *:imenu* *:inoreme* *:inoremenu*
+! *:cme* *:cmenu* *:cnoreme* *:cnoremenu*
+! *:tlm* *:tlmenu* *:tln* *:tlnoremenu*
+ *E330* *E327* *E331* *E336* *E333*
+ *E328* *E329* *E337* *E792*
+ To create a new menu item, use the ":menu" commands. They are mostly like
+***************
+*** 571,576 ****
+--- 572,581 ----
+ "Big Changes", which is a sub-menu containing the item "Delete All Spaces",
+ which when selected, performs the operation.
+
++ To create a menu for terminal mode, use |:tlmenu| instead of |:tmenu| unlike
++ key mapping (|:tmap|). This is because |:tmenu| is already used for defining
++ tooltips for menus. See |terminal-typing|.
++
+ Special characters in a menu name:
+
+ & The next character is the shortcut key. Make sure each
+***************
+*** 589,597 ****
+ this menu can be used. The second part is shown as "Open :e". The ":e"
+ is right aligned, and the "O" is underlined, to indicate it is the shortcut.
+
+! The ":amenu" command can be used to define menu entries for all modes at once.
+! To make the command work correctly, a character is automatically inserted for
+! some modes:
+ mode inserted appended ~
+ Normal nothing nothing
+ Visual <C-C> <C-\><C-G>
+--- 594,602 ----
+ this menu can be used. The second part is shown as "Open :e". The ":e"
+ is right aligned, and the "O" is underlined, to indicate it is the shortcut.
+
+! The ":amenu" command can be used to define menu entries for all modes at once,
+! except for Terminal mode. To make the command work correctly, a character is
+! automatically inserted for some modes:
+ mode inserted appended ~
+ Normal nothing nothing
+ Visual <C-C> <C-\><C-G>
+***************
+*** 865,870 ****
+--- 870,885 ----
+ insert-mode menu Eg: >
+ :emenu File.Exit
+
++ :[range]em[enu] {mode} {menu} Like above, but execute the menu for {mode}:
++ 'n': |:nmenu| Normal mode
++ 'v': |:vmenu| Visual mode
++ 's': |:smenu| Select mode
++ 'o': |:omenu| Operator-pending mode
++ 't': |:tlmenu| Terminal mode
++ 'i': |:imenu| Insert mode
++ 'c': |:cmenu| Cmdline mode
++
++
+ If the console-mode vim has been compiled with WANT_MENU defined, you can
+ use :emenu to access useful menu items you may have got used to from GUI
+ mode. See 'wildmenu' for an option that works well with this. See
+***************
+*** 885,890 ****
+--- 900,906 ----
+ *:sunme* *:sunmenu*
+ *:iunme* *:iunmenu*
+ *:cunme* *:cunmenu*
++ *:tlu* *:tlunmenu*
+ To delete a menu item or a whole submenu, use the unmenu commands, which are
+ analogous to the unmap commands. Eg: >
+ :unmenu! Edit.Paste
+***************
+*** 951,956 ****
+--- 967,974 ----
+ :tu[nmenu] {menupath} Remove a tip for a menu or tool.
+ {only in X11 and Win32 GUI}
+
++ Note: To create menus for terminal mode, use |:tlmenu| instead.
++
+ When a tip is defined for a menu item, it appears in the command-line area
+ when the mouse is over that item, much like a standard Windows menu hint in
+ the status bar. (Except when Vim is in Command-line mode, when of course
+***************
+*** 999,1005 ****
+ pointer instead of the cursor.
+ In the terminal this is the last known
+ position, which is usually at the last click
+! or release (mouse movement is irrelevalt).
+
+ Example: >
+ :popup File
+--- 1017,1023 ----
+ pointer instead of the cursor.
+ In the terminal this is the last known
+ position, which is usually at the last click
+! or release (mouse movement is irrelevant).
+
+ Example: >
+ :popup File
+***************
+*** 1075,1078 ****
+ For the Win32 GUI the external commands are executed in a separate window.
+ See |gui-shell-win32|.
+
+! vim:tw=78:sw=4:ts=8:ft=help:norl:
+--- 1093,1096 ----
+ For the Win32 GUI the external commands are executed in a separate window.
+ See |gui-shell-win32|.
+
+! vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0486/runtime/doc/index.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/index.txt 2018-10-19 18:35:52.654453150 +0200
+***************
+*** 1583,1588 ****
+--- 1583,1591 ----
+ |:tjump| :tj[ump] like ":tselect", but jump directly when there
+ is only one match
+ |:tlast| :tl[ast] jump to last matching tag
++ |:tlmenu| :tlm[enu] add menu for Terminal-Job mode
++ |:tlnoremenu| :tln[oremenu] like ":noremenu" but for Terminal-Job mode
++ |:tlunmenu| :tlu[nmenu] remove menu for Terminal-Job mode
+ |:tmapclear| :tmapc[lear] remove all mappings for Terminal-Job mode
+ |:tmap| :tma[p] like ":map" but for Terminal-Job mode
+ |:tmenu| :tm[enu] define menu tooltip
+***************
+*** 1657,1660 ****
+ |:~| :~ repeat last ":substitute"
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 1660,1663 ----
+ |:~| :~ repeat last ":substitute"
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0486/runtime/doc/terminal.txt 2018-06-19 16:59:31.333713053 +0200
+--- runtime/doc/terminal.txt 2018-10-19 18:35:52.658453120 +0200
+***************
+*** 114,119 ****
+--- 114,122 ----
+ tnoremap <Esc> <C-W>N
+ set notimeout ttimeout timeoutlen=100
+
++ You can also create menus similar to terminal mode mappings, but you have to
++ use |:tlmenu| instead of |:tmenu|.
++
+ < *options-in-terminal*
+ After opening the terminal window and setting 'buftype' to "terminal" the
+ TerminalOpen autocommand event is triggered. This makes it possible to set
+***************
+*** 228,233 ****
+--- 231,240 ----
+
+ If you want to use more options use the |term_start()|
+ function.
++ If you want to split the window vertically, use: >
++ :vertical terminal
++ < Or short: >
++ :vert ter
+
+ When the buffer associated with the terminal is forcibly unloaded or wiped out
+ the job is killed, similar to calling `job_stop(job, "kill")` .
+***************
+*** 523,531 ****
+
+ Functions ~
+
+! term_sendkeys() send keystrokes to a terminal (not subject to tmap)
+! term_wait() wait for screen to be updated
+! term_scrape() inspect terminal screen
+
+
+ ==============================================================================
+--- 530,538 ----
+
+ Functions ~
+
+! |term_sendkeys()| send keystrokes to a terminal (not subject to tmap)
+! |term_wait()| wait for screen to be updated
+! |term_scrape()| inspect terminal screen
+
+
+ ==============================================================================
+***************
+*** 552,558 ****
+ characters. This makes sure the dump is always this size. The function
+ RunVimInTerminal() takes care of this. Pass it the arguments for the Vim
+ command.
+! - Send any commands to Vim using term_sendkeys(). For example: >
+ call term_sendkeys(buf, ":echo &lines &columns\<CR>")
+ - Check that the screen is now in the expected state, using
+ VerifyScreenDump(). This expects the reference screen dump to be in the
+--- 559,565 ----
+ characters. This makes sure the dump is always this size. The function
+ RunVimInTerminal() takes care of this. Pass it the arguments for the Vim
+ command.
+! - Send any commands to Vim using |term_sendkeys()|. For example: >
+ call term_sendkeys(buf, ":echo &lines &columns\<CR>")
+ - Check that the screen is now in the expected state, using
+ VerifyScreenDump(). This expects the reference screen dump to be in the
+***************
+*** 580,592 ****
+ *terminal-screendump*
+
+ To create the screen dump, run Vim (or any other program) in a terminal and
+! make it show the desired state. Then use the term_dumpwrite() function to
+ create a screen dump file. For example: >
+ :call term_dumpwrite(77, "mysyntax.dump")
+
+ Here "77" is the buffer number of the terminal. Use `:ls!` to see it.
+
+! You can view the screen dump with term_dumpload(): >
+ :call term_dumpload("mysyntax.dump")
+
+ To verify that Vim still shows exactly the same screen, run Vim again with
+--- 587,599 ----
+ *terminal-screendump*
+
+ To create the screen dump, run Vim (or any other program) in a terminal and
+! make it show the desired state. Then use the |term_dumpwrite()| function to
+ create a screen dump file. For example: >
+ :call term_dumpwrite(77, "mysyntax.dump")
+
+ Here "77" is the buffer number of the terminal. Use `:ls!` to see it.
+
+! You can view the screen dump with |term_dumpload()|: >
+ :call term_dumpload("mysyntax.dump")
+
+ To verify that Vim still shows exactly the same screen, run Vim again with
+***************
+*** 594,600 ****
+ again, using a different file name: >
+ :call term_dumpwrite(88, "test.dump")
+
+! To assert that the files are exactly the same use assert_equalfile(): >
+ call assert_equalfile("mysyntax.dump", "test.dump")
+
+ If there are differences then v:errors will contain the error message.
+--- 601,607 ----
+ again, using a different file name: >
+ :call term_dumpwrite(88, "test.dump")
+
+! To assert that the files are exactly the same use |assert_equalfile()|: >
+ call assert_equalfile("mysyntax.dump", "test.dump")
+
+ If there are differences then v:errors will contain the error message.
+***************
+*** 603,610 ****
+ Comparing screen dumps ~
+ *terminal-diffscreendump*
+
+! assert_equalfile() does not make it easy to see what is different.
+! To spot the problem use term_dumpdiff(): >
+ call term_dumpdiff("mysyntax.dump", "test.dump")
+
+ This will open a window consisting of three parts:
+--- 610,617 ----
+ Comparing screen dumps ~
+ *terminal-diffscreendump*
+
+! |assert_equalfile()| does not make it easy to see what is different.
+! To spot the problem use |term_dumpdiff()|: >
+ call term_dumpdiff("mysyntax.dump", "test.dump")
+
+ This will open a window consisting of three parts:
+***************
+*** 613,619 ****
+ 3. The contents of the second dump
+
+ You can usually see what differs in the second part. Use the 'ruler' to
+! relate it to the position in the first or second dump.
+
+ Alternatively, press "s" to swap the first and second dump. Do this several
+ times so that you can spot the difference in the context of the text.
+--- 620,637 ----
+ 3. The contents of the second dump
+
+ You can usually see what differs in the second part. Use the 'ruler' to
+! relate it to the position in the first or second dump. Letters indicate the
+! kind of difference:
+! X different character
+! > cursor in first but not in second
+! < cursor in second but not in first
+! w character width differs (single vs double width)
+! f foreground color differs
+! b background color differs
+! a attribute differs (bold, underline, reverse, etc.)
+! ? character missing in both
+! + character missing in first
+! - character missing in second
+
+ Alternatively, press "s" to swap the first and second dump. Do this several
+ times so that you can spot the difference in the context of the text.
+***************
+*** 635,641 ****
+ Load the plugin with this command: >
+ packadd termdebug
+ < *:Termdebug*
+! To start debugging use `:Termdebug` or `:TermdebugCommand`` followed by the
+ command name, for example: >
+ :Termdebug vim
+
+--- 653,659 ----
+ Load the plugin with this command: >
+ packadd termdebug
+ < *:Termdebug*
+! To start debugging use `:Termdebug` or `:TermdebugCommand` followed by the
+ command name, for example: >
+ :Termdebug vim
+
+***************
+*** 900,906 ****
+ To change the width of the Vim window when debugging starts, and use a
+ vertical split: >
+ let g:termdebug_wide = 163
+! This will set &columns to 163 when :Termdebug is used. The value is restored
+ when quitting the debugger.
+ If g:termdebug_wide is set and &columns is already larger than
+ g:termdebug_wide then a vertical split will be used without changing &columns.
+--- 918,924 ----
+ To change the width of the Vim window when debugging starts, and use a
+ vertical split: >
+ let g:termdebug_wide = 163
+! This will set &columns to 163 when `:Termdebug` is used. The value is restored
+ when quitting the debugger.
+ If g:termdebug_wide is set and &columns is already larger than
+ g:termdebug_wide then a vertical split will be used without changing &columns.
+***************
+*** 909,912 ****
+
+
+
+! vim:tw=78:ts=8:ft=help:norl:
+--- 927,930 ----
+
+
+
+! vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0486/runtime/doc/usr_42.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/usr_42.txt 2018-10-19 18:35:52.658453120 +0200
+***************
+*** 150,156 ****
+ :menu! Insert and Command-line mode
+ :imenu Insert mode
+ :cmenu Command-line mode
+! :amenu All modes
+
+ To avoid that the commands of a menu item are being mapped, use the command
+ ":noremenu", ":nnoremenu", ":anoremenu", etc.
+--- 150,157 ----
+ :menu! Insert and Command-line mode
+ :imenu Insert mode
+ :cmenu Command-line mode
+! :tlmenu Terminal mode
+! :amenu All modes (except for Terminal mode)
+
+ To avoid that the commands of a menu item are being mapped, use the command
+ ":noremenu", ":nnoremenu", ":anoremenu", etc.
+***************
+*** 362,365 ****
+
+ Next chapter: |usr_43.txt| Using filetypes
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
+--- 363,366 ----
+
+ Next chapter: |usr_43.txt| Using filetypes
+
+! Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0486/runtime/menu.vim 2018-07-23 05:09:05.593235641 +0200
+--- runtime/menu.vim 2018-10-19 22:31:52.955188961 +0200
+***************
+*** 160,165 ****
+--- 160,168 ----
+ cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y>
+ nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP
+ cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+
++ if exists(':tlmenu')
++ tlnoremenu &Edit.&Paste<Tab>"+gP <C-W>"+
++ endif
+ exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['v']
+ exe 'inoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['i']
+ nnoremenu 20.370 &Edit.Put\ &Before<Tab>[p [p
+***************
+*** 356,361 ****
+--- 359,366 ----
+ let s:did_setup_color_schemes = 1
+
+ let n = globpath(&runtimepath, "colors/*.vim", 1, 1)
++ let n += globpath(&runtimepath, "pack/*/start/*/colors/*.vim", 1, 1)
++ let n += globpath(&runtimepath, "pack/*/opt/*/colors/*.vim", 1, 1)
+
+ " Ignore case for VMS and windows, sort on name
+ let names = sort(map(n, 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)
+*** ../vim-8.1.0486/src/ex_cmdidxs.h 2017-09-18 22:06:03.000000000 +0200
+--- src/ex_cmdidxs.h 2018-10-19 18:35:52.658453120 +0200
+***************
+*** 25,36 ****
+ /* r */ 351,
+ /* s */ 370,
+ /* t */ 437,
+! /* u */ 477,
+! /* v */ 488,
+! /* w */ 506,
+! /* x */ 521,
+! /* y */ 530,
+! /* z */ 531
+ };
+
+ /*
+--- 25,36 ----
+ /* r */ 351,
+ /* s */ 370,
+ /* t */ 437,
+! /* u */ 480,
+! /* v */ 491,
+! /* w */ 509,
+! /* x */ 524,
+! /* y */ 533,
+! /* z */ 534
+ };
+
+ /*
+***************
+*** 60,66 ****
+ /* q */ { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ /* r */ { 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 18, 0, 0, 0, 0 },
+ /* s */ { 2, 6, 15, 0, 18, 22, 0, 24, 25, 0, 0, 28, 30, 34, 38, 40, 0, 48, 0, 49, 0, 61, 62, 0, 63, 0 },
+! /* t */ { 2, 0, 19, 0, 22, 24, 0, 25, 0, 26, 0, 27, 28, 31, 33, 34, 0, 35, 37, 0, 38, 0, 0, 0, 0, 0 },
+ /* u */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ /* v */ { 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 9, 12, 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0 },
+ /* w */ { 2, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 8, 0, 9, 10, 0, 12, 0, 13, 14, 0, 0, 0, 0 },
+--- 60,66 ----
+ /* q */ { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ /* r */ { 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 18, 0, 0, 0, 0 },
+ /* s */ { 2, 6, 15, 0, 18, 22, 0, 24, 25, 0, 0, 28, 30, 34, 38, 40, 0, 48, 0, 49, 0, 61, 62, 0, 63, 0 },
+! /* t */ { 2, 0, 19, 0, 22, 24, 0, 25, 0, 26, 0, 27, 31, 34, 36, 37, 0, 38, 40, 0, 41, 0, 0, 0, 0, 0 },
+ /* u */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ /* v */ { 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 9, 12, 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0 },
+ /* w */ { 2, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 8, 0, 9, 10, 0, 12, 0, 13, 14, 0, 0, 0, 0 },
+***************
+*** 69,72 ****
+ /* z */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ };
+
+! static const int command_count = 544;
+--- 69,72 ----
+ /* z */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ };
+
+! static const int command_count = 547;
+*** ../vim-8.1.0486/src/ex_cmds.h 2018-08-14 13:38:12.744559267 +0200
+--- src/ex_cmds.h 2018-10-19 18:35:52.658453120 +0200
+***************
+*** 20,28 ****
+ * 1. Add an entry in the table below. Keep it sorted on the shortest
+ * version of the command name that works. If it doesn't start with a
+ * lower case letter, add it at the end.
+! * 2. Add a "case: CMD_xxx" in the big switch in ex_docmd.c.
+! * 3. Add an entry in the index for Ex commands at ":help ex-cmd-index".
+! * 4. Add documentation in ../doc/xxx.txt. Add a tag for both the short and
+ * long name of the command.
+ */
+
+--- 20,29 ----
+ * 1. Add an entry in the table below. Keep it sorted on the shortest
+ * version of the command name that works. If it doesn't start with a
+ * lower case letter, add it at the end.
+! * 2. Run "make cmdidxs" to re-generate ex_cmdidxs.h.
+! * 3. Add a "case: CMD_xxx" in the big switch in ex_docmd.c.
+! * 4. Add an entry in the index for Ex commands at ":help ex-cmd-index".
+! * 5. Add documentation in ../doc/xxx.txt. Add a tag for both the short and
+ * long name of the command.
+ */
+
+***************
+*** 176,182 ****
+ BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_behave, "behave", ex_behave,
+! NEEDARG|WORD1|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_belowright, "belowright", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+--- 177,183 ----
+ BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
+ ADDR_BUFFERS),
+ EX(CMD_behave, "behave", ex_behave,
+! BANG|NEEDARG|WORD1|TRLBAR|CMDWIN,
+ ADDR_LINES),
+ EX(CMD_belowright, "belowright", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM,
+***************
+*** 1498,1503 ****
+--- 1499,1513 ----
+ EX(CMD_tlast, "tlast", ex_tag,
+ BANG|TRLBAR,
+ ADDR_LINES),
++ EX(CMD_tlmenu, "tlmenu", ex_menu,
++ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
++ ADDR_LINES),
++ EX(CMD_tlnoremenu, "tlnoremenu", ex_menu,
++ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
++ ADDR_LINES),
++ EX(CMD_tlunmenu, "tlunmenu", ex_menu,
++ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
++ ADDR_LINES),
+ EX(CMD_tmenu, "tmenu", ex_menu,
+ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
+ ADDR_LINES),
+*** ../vim-8.1.0486/src/ex_docmd.c 2018-10-02 16:23:55.323037143 +0200
+--- src/ex_docmd.c 2018-10-19 18:35:52.658453120 +0200
+***************
+*** 4283,4288 ****
+--- 4283,4289 ----
+ case CMD_omenu: case CMD_onoremenu: case CMD_ounmenu:
+ case CMD_imenu: case CMD_inoremenu: case CMD_iunmenu:
+ case CMD_cmenu: case CMD_cnoremenu: case CMD_cunmenu:
++ case CMD_tlmenu: case CMD_tlnoremenu: case CMD_tlunmenu:
+ case CMD_tmenu: case CMD_tunmenu:
+ case CMD_popup: case CMD_tearoff: case CMD_emenu:
+ return set_context_in_menu_cmd(xp, cmd, arg, forceit);
+*** ../vim-8.1.0486/src/menu.c 2018-09-10 21:04:09.872392623 +0200
+--- src/menu.c 2018-10-19 19:18:38.677792759 +0200
+***************
+*** 58,64 ****
+ static char_u *menu_translate_tab_and_shift(char_u *arg_start);
+
+ /* The character for each menu mode */
+! static char_u menu_mode_chars[] = {'n', 'v', 's', 'o', 'i', 'c', 't'};
+
+ static char_u e_notsubmenu[] = N_("E327: Part of menu-item path is not sub-menu");
+ static char_u e_othermode[] = N_("E328: Menu only exists in another mode");
+--- 58,64 ----
+ static char_u *menu_translate_tab_and_shift(char_u *arg_start);
+
+ /* The character for each menu mode */
+! static char *menu_mode_chars[] = {"n", "v", "s", "o", "i", "c", "tl", "t"};
+
+ static char_u e_notsubmenu[] = N_("E327: Part of menu-item path is not sub-menu");
+ static char_u e_othermode[] = N_("E328: Menu only exists in another mode");
+***************
+*** 1196,1202 ****
+ return;
+ for (i = 0; i < depth + 2; i++)
+ MSG_PUTS(" ");
+! msg_putchar(menu_mode_chars[bit]);
+ if (menu->noremap[bit] == REMAP_NONE)
+ msg_putchar('*');
+ else if (menu->noremap[bit] == REMAP_SCRIPT)
+--- 1196,1202 ----
+ return;
+ for (i = 0; i < depth + 2; i++)
+ MSG_PUTS(" ");
+! msg_puts((char_u*)menu_mode_chars[bit]);
+ if (menu->noremap[bit] == REMAP_NONE)
+ msg_putchar('*');
+ else if (menu->noremap[bit] == REMAP_SCRIPT)
+***************
+*** 1645,1650 ****
+--- 1645,1656 ----
+ modes = MENU_INSERT_MODE;
+ break;
+ case 't':
++ if (*cmd == 'l') /* tlmenu, tlunmenu, tlnoremenu */
++ {
++ modes = MENU_TERMINAL_MODE;
++ ++cmd;
++ break;
++ }
+ modes = MENU_TIP_MODE; /* tmenu */
+ break;
+ case 'c': /* cmenu */
+***************
+*** 1687,1698 ****
+ {
+ char_u *p;
+ int len = (int)STRLEN(name);
+
+! p = vim_strnsave(name, len + 1);
+ if (p != NULL)
+ {
+! mch_memmove(p + 6, p + 5, (size_t)(len - 4));
+! p[5] = menu_mode_chars[idx];
+ }
+ return p;
+ }
+--- 1693,1710 ----
+ {
+ char_u *p;
+ int len = (int)STRLEN(name);
++ char *mode_chars = menu_mode_chars[idx];
++ int mode_chars_len = (int)strlen(mode_chars);
++ int i;
+
+! p = vim_strnsave(name, len + mode_chars_len);
+ if (p != NULL)
+ {
+! mch_memmove(p + 5 + mode_chars_len, p + 5, (size_t)(len - 4));
+! for (i = 0; i < mode_chars_len; ++i)
+! {
+! p[5 + i] = menu_mode_chars[idx][i];
+! }
+ }
+ return p;
+ }
+***************
+*** 1712,1717 ****
+--- 1724,1733 ----
+ idx = MENU_INDEX_INSERT;
+ else if (state & CMDLINE)
+ idx = MENU_INDEX_CMDLINE;
++ #ifdef FEAT_TERMINAL
++ else if (term_use_loop())
++ idx = MENU_INDEX_TERMINAL;
++ #endif
+ else if (VIsual_active)
+ {
+ if (VIsual_select)
+***************
+*** 1872,1877 ****
+--- 1888,1899 ----
+ static int
+ get_menu_mode(void)
+ {
++ #ifdef FEAT_TERMINAL
++ if (term_use_loop())
++ {
++ return MENU_INDEX_TERMINAL;
++ }
++ #endif
+ if (VIsual_active)
+ {
+ if (VIsual_select)
+***************
+*** 1910,1932 ****
+ show_popupmenu(void)
+ {
+ vimmenu_T *menu;
+! int mode;
+
+! mode = get_menu_mode();
+! if (mode == MENU_INDEX_INVALID)
+ return;
+! mode = menu_mode_chars[mode];
+
+! {
+! char_u ename[2];
+!
+! ename[0] = mode;
+! ename[1] = NUL;
+! apply_autocmds(EVENT_MENUPOPUP, ename, NULL, FALSE, curbuf);
+! }
+
+ for (menu = root_menu; menu != NULL; menu = menu->next)
+! if (STRNCMP("PopUp", menu->name, 5) == 0 && menu->name[5] == mode)
+ break;
+
+ /* Only show a popup when it is defined and has entries */
+--- 1932,1951 ----
+ show_popupmenu(void)
+ {
+ vimmenu_T *menu;
+! int menu_mode;
+! char* mode;
+! int mode_len;
+
+! menu_mode = get_menu_mode();
+! if (menu_mode == MENU_INDEX_INVALID)
+ return;
+! mode = menu_mode_chars[menu_mode];
+! mode_len = (int)strlen(mode);
+
+! apply_autocmds(EVENT_MENUPOPUP, (char_u*)mode, NULL, FALSE, curbuf);
+
+ for (menu = root_menu; menu != NULL; menu = menu->next)
+! if (STRNCMP("PopUp", menu->name, 5) == 0 && STRNCMP(menu->name + 5, mode, mode_len) == 0)
+ break;
+
+ /* Only show a popup when it is defined and has entries */
+***************
+*** 2249,2330 ****
+ /*
+ * Execute "menu". Use by ":emenu" and the window toolbar.
+ * "eap" is NULL for the window toolbar.
+ */
+ void
+! execute_menu(exarg_T *eap, vimmenu_T *menu)
+ {
+! char_u *mode;
+! int idx = -1;
+
+! /* Use the Insert mode entry when returning to Insert mode. */
+! if (restart_edit
+ #ifdef FEAT_EVAL
+! && !current_sctx.sc_sid
+ #endif
+! )
+! {
+! mode = (char_u *)"Insert";
+! idx = MENU_INDEX_INSERT;
+! }
+! else if (VIsual_active)
+! {
+! mode = (char_u *)"Visual";
+! idx = MENU_INDEX_VISUAL;
+! }
+! else if (eap != NULL && eap->addr_count)
+! {
+! pos_T tpos;
+!
+! mode = (char_u *)"Visual";
+! idx = MENU_INDEX_VISUAL;
+!
+! /* GEDDES: This is not perfect - but it is a
+! * quick way of detecting whether we are doing this from a
+! * selection - see if the range matches up with the visual
+! * select start and end. */
+! if ((curbuf->b_visual.vi_start.lnum == eap->line1)
+! && (curbuf->b_visual.vi_end.lnum) == eap->line2)
+! {
+! /* Set it up for visual mode - equivalent to gv. */
+! VIsual_mode = curbuf->b_visual.vi_mode;
+! tpos = curbuf->b_visual.vi_end;
+! curwin->w_cursor = curbuf->b_visual.vi_start;
+! curwin->w_curswant = curbuf->b_visual.vi_curswant;
+ }
+! else
+ {
+! /* Set it up for line-wise visual mode */
+! VIsual_mode = 'V';
+! curwin->w_cursor.lnum = eap->line1;
+! curwin->w_cursor.col = 1;
+! tpos.lnum = eap->line2;
+! tpos.col = MAXCOL;
+! #ifdef FEAT_VIRTUALEDIT
+! tpos.coladd = 0;
+ #endif
+ }
+
+! /* Activate visual mode */
+! VIsual_active = TRUE;
+! VIsual_reselect = TRUE;
+! check_cursor();
+! VIsual = curwin->w_cursor;
+! curwin->w_cursor = tpos;
+
+! check_cursor();
+
+! /* Adjust the cursor to make sure it is in the correct pos
+! * for exclusive mode */
+! if (*p_sel == 'e' && gchar_cursor() != NUL)
+! ++curwin->w_cursor.col;
+ }
+
+ /* For the WinBar menu always use the Normal mode menu. */
+ if (idx == -1 || eap == NULL)
+- {
+- mode = (char_u *)"Normal";
+ idx = MENU_INDEX_NORMAL;
+- }
+
+ if (idx != MENU_INDEX_INVALID && menu->strings[idx] != NULL)
+ {
+--- 2268,2353 ----
+ /*
+ * Execute "menu". Use by ":emenu" and the window toolbar.
+ * "eap" is NULL for the window toolbar.
++ * "mode_idx" specifies a MENU_INDEX_ value, use -1 to depend on the current
++ * state.
+ */
+ void
+! execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx)
+ {
+! int idx = mode_idx;
+
+! if (idx < 0)
+! {
+! /* Use the Insert mode entry when returning to Insert mode. */
+! if (restart_edit
+ #ifdef FEAT_EVAL
+! && !current_sctx.sc_sid
+ #endif
+! )
+! {
+! idx = MENU_INDEX_INSERT;
+ }
+! #ifdef FEAT_TERMINAL
+! else if (term_use_loop())
+ {
+! idx = MENU_INDEX_TERMINAL;
+! }
+ #endif
++ else if (VIsual_active)
++ {
++ idx = MENU_INDEX_VISUAL;
+ }
++ else if (eap != NULL && eap->addr_count)
++ {
++ pos_T tpos;
+
+! idx = MENU_INDEX_VISUAL;
+
+! /* GEDDES: This is not perfect - but it is a
+! * quick way of detecting whether we are doing this from a
+! * selection - see if the range matches up with the visual
+! * select start and end. */
+! if ((curbuf->b_visual.vi_start.lnum == eap->line1)
+! && (curbuf->b_visual.vi_end.lnum) == eap->line2)
+! {
+! /* Set it up for visual mode - equivalent to gv. */
+! VIsual_mode = curbuf->b_visual.vi_mode;
+! tpos = curbuf->b_visual.vi_end;
+! curwin->w_cursor = curbuf->b_visual.vi_start;
+! curwin->w_curswant = curbuf->b_visual.vi_curswant;
+! }
+! else
+! {
+! /* Set it up for line-wise visual mode */
+! VIsual_mode = 'V';
+! curwin->w_cursor.lnum = eap->line1;
+! curwin->w_cursor.col = 1;
+! tpos.lnum = eap->line2;
+! tpos.col = MAXCOL;
+! #ifdef FEAT_VIRTUALEDIT
+! tpos.coladd = 0;
+! #endif
+! }
+
+! /* Activate visual mode */
+! VIsual_active = TRUE;
+! VIsual_reselect = TRUE;
+! check_cursor();
+! VIsual = curwin->w_cursor;
+! curwin->w_cursor = tpos;
+!
+! check_cursor();
+!
+! /* Adjust the cursor to make sure it is in the correct pos
+! * for exclusive mode */
+! if (*p_sel == 'e' && gchar_cursor() != NUL)
+! ++curwin->w_cursor.col;
+! }
+ }
+
+ /* For the WinBar menu always use the Normal mode menu. */
+ if (idx == -1 || eap == NULL)
+ idx = MENU_INDEX_NORMAL;
+
+ if (idx != MENU_INDEX_INVALID && menu->strings[idx] != NULL)
+ {
+***************
+*** 2351,2357 ****
+--- 2374,2408 ----
+ TRUE, menu->silent[idx]);
+ }
+ else if (eap != NULL)
++ {
++ char_u *mode;
++
++ switch (idx)
++ {
++ case MENU_INDEX_VISUAL:
++ mode = (char_u *)"Visual";
++ break;
++ case MENU_INDEX_SELECT:
++ mode = (char_u *)"Select";
++ break;
++ case MENU_INDEX_OP_PENDING:
++ mode = (char_u *)"Op-pending";
++ break;
++ case MENU_INDEX_TERMINAL:
++ mode = (char_u *)"Terminal";
++ break;
++ case MENU_INDEX_INSERT:
++ mode = (char_u *)"Insert";
++ break;
++ case MENU_INDEX_CMDLINE:
++ mode = (char_u *)"Cmdline";
++ break;
++ // case MENU_INDEX_TIP: cannot happen
++ default:
++ mode = (char_u *)"Normal";
++ }
+ EMSG2(_("E335: Menu not defined for %s mode"), mode);
++ }
+ }
+
+ /*
+***************
+*** 2364,2372 ****
+ vimmenu_T *menu;
+ char_u *name;
+ char_u *saved_name;
+ char_u *p;
+
+! saved_name = vim_strsave(eap->arg);
+ if (saved_name == NULL)
+ return;
+
+--- 2415,2443 ----
+ vimmenu_T *menu;
+ char_u *name;
+ char_u *saved_name;
++ char_u *arg = eap->arg;
+ char_u *p;
++ int gave_emsg = FALSE;
++ int mode_idx = -1;
++
++ if (arg[0] && VIM_ISWHITE(arg[1]))
++ {
++ switch (arg[0])
++ {
++ case 'n': mode_idx = MENU_INDEX_NORMAL; break;
++ case 'v': mode_idx = MENU_INDEX_VISUAL; break;
++ case 's': mode_idx = MENU_INDEX_SELECT; break;
++ case 'o': mode_idx = MENU_INDEX_OP_PENDING; break;
++ case 't': mode_idx = MENU_INDEX_TERMINAL; break;
++ case 'i': mode_idx = MENU_INDEX_INSERT; break;
++ case 'c': mode_idx = MENU_INDEX_CMDLINE; break;
++ default: EMSG2(_(e_invarg2), arg);
++ return;
++ }
++ arg = skipwhite(arg + 2);
++ }
+
+! saved_name = vim_strsave(arg);
+ if (saved_name == NULL)
+ return;
+
+***************
+*** 2384,2389 ****
+--- 2455,2461 ----
+ if (*p == NUL && menu->children != NULL)
+ {
+ EMSG(_("E333: Menu path must lead to a menu item"));
++ gave_emsg = TRUE;
+ menu = NULL;
+ }
+ else if (*p != NUL && menu->children == NULL)
+***************
+*** 2403,2414 ****
+ vim_free(saved_name);
+ if (menu == NULL)
+ {
+! EMSG2(_("E334: Menu not found: %s"), eap->arg);
+ return;
+ }
+
+! /* Found the menu, so execute. */
+! execute_menu(eap, menu);
+ }
+
+ /*
+--- 2475,2487 ----
+ vim_free(saved_name);
+ if (menu == NULL)
+ {
+! if (!gave_emsg)
+! EMSG2(_("E334: Menu not found: %s"), arg);
+ return;
+ }
+
+! // Found the menu, so execute.
+! execute_menu(eap, menu, mode_idx);
+ }
+
+ /*
+***************
+*** 2445,2451 ****
+ check_cursor();
+ }
+
+! execute_menu(NULL, item->wb_menu);
+
+ if (save_curwin != NULL)
+ {
+--- 2518,2524 ----
+ check_cursor();
+ }
+
+! execute_menu(NULL, item->wb_menu, -1);
+
+ if (save_curwin != NULL)
+ {
+*** ../vim-8.1.0486/src/proto/menu.pro 2018-05-17 13:52:44.000000000 +0200
+--- src/proto/menu.pro 2018-10-19 19:18:21.773946949 +0200
+***************
+*** 19,25 ****
+ void gui_update_menus(int modes);
+ int gui_is_menu_shortcut(int key);
+ void gui_mch_toggle_tearoffs(int enable);
+! void execute_menu(exarg_T *eap, vimmenu_T *menu);
+ void ex_emenu(exarg_T *eap);
+ void winbar_click(win_T *wp, int col);
+ vimmenu_T *gui_find_menu(char_u *path_name);
+--- 19,25 ----
+ void gui_update_menus(int modes);
+ int gui_is_menu_shortcut(int key);
+ void gui_mch_toggle_tearoffs(int enable);
+! void execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx);
+ void ex_emenu(exarg_T *eap);
+ void winbar_click(win_T *wp, int col);
+ vimmenu_T *gui_find_menu(char_u *path_name);
+*** ../vim-8.1.0486/src/popupmnu.c 2018-09-09 15:27:54.808344790 +0200
+--- src/popupmnu.c 2018-10-19 19:06:36.212711840 +0200
+***************
+*** 1176,1182 ****
+ if ((mp->modes & mp->enabled & mode) && idx++ == pum_selected)
+ {
+ vim_memset(&ea, 0, sizeof(ea));
+! execute_menu(&ea, mp);
+ break;
+ }
+ }
+--- 1176,1182 ----
+ if ((mp->modes & mp->enabled & mode) && idx++ == pum_selected)
+ {
+ vim_memset(&ea, 0, sizeof(ea));
+! execute_menu(&ea, mp, -1);
+ break;
+ }
+ }
+*** ../vim-8.1.0486/src/structs.h 2018-10-14 22:38:06.161665231 +0200
+--- src/structs.h 2018-10-19 18:35:52.662453090 +0200
+***************
+*** 3101,3108 ****
+ #define MENU_INDEX_OP_PENDING 3
+ #define MENU_INDEX_INSERT 4
+ #define MENU_INDEX_CMDLINE 5
+! #define MENU_INDEX_TIP 6
+! #define MENU_MODES 7
+
+ /* Menu modes */
+ #define MENU_NORMAL_MODE (1 << MENU_INDEX_NORMAL)
+--- 3101,3109 ----
+ #define MENU_INDEX_OP_PENDING 3
+ #define MENU_INDEX_INSERT 4
+ #define MENU_INDEX_CMDLINE 5
+! #define MENU_INDEX_TERMINAL 6
+! #define MENU_INDEX_TIP 7
+! #define MENU_MODES 8
+
+ /* Menu modes */
+ #define MENU_NORMAL_MODE (1 << MENU_INDEX_NORMAL)
+***************
+*** 3111,3116 ****
+--- 3112,3118 ----
+ #define MENU_OP_PENDING_MODE (1 << MENU_INDEX_OP_PENDING)
+ #define MENU_INSERT_MODE (1 << MENU_INDEX_INSERT)
+ #define MENU_CMDLINE_MODE (1 << MENU_INDEX_CMDLINE)
++ #define MENU_TERMINAL_MODE (1 << MENU_INDEX_TERMINAL)
+ #define MENU_TIP_MODE (1 << MENU_INDEX_TIP)
+ #define MENU_ALL_MODES ((1 << MENU_INDEX_TIP) - 1)
+ /*note MENU_INDEX_TIP is not a 'real' mode*/
+*** ../vim-8.1.0486/src/testdir/test_menu.vim 2017-03-18 20:09:29.000000000 +0100
+--- src/testdir/test_menu.vim 2018-10-19 22:19:19.563500587 +0200
+***************
+*** 30,32 ****
+--- 30,66 ----
+
+ source $VIMRUNTIME/delmenu.vim
+ endfunc
++
++ func Test_menu_commands()
++ nmenu 2 Test.FooBar :let g:did_menu = 'normal'<CR>
++ vmenu 2 Test.FooBar :let g:did_menu = 'visual'<CR>
++ smenu 2 Test.FooBar :let g:did_menu = 'select'<CR>
++ omenu 2 Test.FooBar :let g:did_menu = 'op-pending'<CR>
++ tlmenu 2 Test.FooBar :let g:did_menu = 'terminal'<CR>
++ imenu 2 Test.FooBar :let g:did_menu = 'insert'<CR>
++ cmenu 2 Test.FooBar :let g:did_menu = 'cmdline'<CR>
++ emenu n Test.FooBar
++ call assert_equal('normal', g:did_menu)
++ emenu v Test.FooBar
++ call assert_equal('visual', g:did_menu)
++ emenu s Test.FooBar
++ call assert_equal('select', g:did_menu)
++ emenu o Test.FooBar
++ call assert_equal('op-pending', g:did_menu)
++ emenu t Test.FooBar
++ call assert_equal('terminal', g:did_menu)
++ emenu i Test.FooBar
++ call assert_equal('insert', g:did_menu)
++ emenu c Test.FooBar
++ call assert_equal('cmdline', g:did_menu)
++
++ aunmenu Test.FooBar
++ tlunmenu Test.FooBar
++ call assert_fails('emenu n Test.FooBar', 'E334:')
++
++ nmenu 2 Test.FooBar.Child :let g:did_menu = 'foobar'<CR>
++ call assert_fails('emenu n Test.FooBar', 'E333:')
++ nunmenu Test.FooBar.Child
++
++ unlet g:did_menu
++ endfun
+*** ../vim-8.1.0486/src/version.c 2018-10-19 17:35:58.081200733 +0200
+--- src/version.c 2018-10-19 18:36:44.394062760 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 487,
+ /**/
+
+--
+"Women marry men hoping they will change. Men marry women hoping
+they will not. So each is inevitably disappointed."
+ - Einstein
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0488 b/data/vim/patches/8.1.0488
new file mode 100644
index 000000000..712c2a7fe
--- /dev/null
+++ b/data/vim/patches/8.1.0488
@@ -0,0 +1,662 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0488
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0488
+Problem: Using freed memory in quickfix code. (Dominique Pelle)
+Solution: Add the quickfix_busy() flag to postpone deleting quickfix lists
+ until it is safe. (Yegappan Lakshmanan, closes #3538)
+Files: src/quickfix.c, src/proto/quickfix.pro, src/misc2.c,
+ src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0487/src/quickfix.c 2018-10-11 17:39:09.169107531 +0200
+--- src/quickfix.c 2018-10-20 20:53:18.999667086 +0200
+***************
+*** 130,135 ****
+--- 130,148 ----
+ int conthere; // %> used
+ };
+
++ // List of location lists to be deleted.
++ // Used to delay the deletion of locations lists by autocmds.
++ typedef struct qf_delq_S
++ {
++ struct qf_delq_S *next;
++ qf_info_T *qi;
++ } qf_delq_T;
++ static qf_delq_T *qf_delq_head = NULL;
++
++ // Counter to prevent autocmds from freeing up location lists when they are
++ // still being used.
++ static int quickfix_busy = 0;
++
+ static efm_T *fmt_start = NULL; // cached across qf_parse_line() calls
+
+ static void qf_new_list(qf_info_T *qi, char_u *qf_title);
+***************
+*** 1838,1843 ****
+--- 1851,1873 ----
+ }
+
+ /*
++ * Queue location list stack delete request.
++ */
++ static void
++ locstack_queue_delreq(qf_info_T *qi)
++ {
++ qf_delq_T *q;
++
++ q = (qf_delq_T *)alloc((unsigned)sizeof(qf_delq_T));
++ if (q != NULL)
++ {
++ q->qi = qi;
++ q->next = qf_delq_head;
++ qf_delq_head = q;
++ }
++ }
++
++ /*
+ * Free a location list stack
+ */
+ static void
+***************
+*** 1854,1863 ****
+ qi->qf_refcount--;
+ if (qi->qf_refcount < 1)
+ {
+! // No references to this location list
+! for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+! vim_free(qi);
+ }
+ }
+
+--- 1884,1900 ----
+ qi->qf_refcount--;
+ if (qi->qf_refcount < 1)
+ {
+! // No references to this location list.
+! // If the location list is still in use, then queue the delete request
+! // to be processed later.
+! if (quickfix_busy > 0)
+! locstack_queue_delreq(qi);
+! else
+! {
+! for (i = 0; i < qi->qf_listcount; ++i)
+! qf_free(&qi->qf_lists[i]);
+! vim_free(qi);
+! }
+ }
+ }
+
+***************
+*** 1883,1888 ****
+--- 1920,1979 ----
+ }
+
+ /*
++ * Delay freeing of location list stacks when the quickfix code is running.
++ * Used to avoid problems with autocmds freeing location list stacks when the
++ * quickfix code is still referencing the stack.
++ * Must always call decr_quickfix_busy() exactly once after this.
++ */
++ static void
++ incr_quickfix_busy(void)
++ {
++ quickfix_busy++;
++ }
++
++ /*
++ * Safe to free location list stacks. Process any delayed delete requests.
++ */
++ static void
++ decr_quickfix_busy(void)
++ {
++ if (--quickfix_busy == 0)
++ {
++ // No longer referencing the location lists. Process all the pending
++ // delete requests.
++ while (qf_delq_head != NULL)
++ {
++ qf_delq_T *q = qf_delq_head;
++
++ qf_delq_head = q->next;
++ ll_free_all(&q->qi);
++ vim_free(q);
++ }
++ }
++ #ifdef ABORT_ON_INTERNAL_ERROR
++ if (quickfix_busy < 0)
++ {
++ EMSG("quickfix_busy has become negative");
++ abort();
++ }
++ #endif
++ }
++
++ #if defined(EXITFREE) || defined(PROTO)
++ void
++ check_quickfix_busy(void)
++ {
++ if (quickfix_busy != 0)
++ {
++ EMSGN("quickfix_busy not zero on exit: %ld", (long)quickfix_busy);
++ # ifdef ABORT_ON_INTERNAL_ERROR
++ abort();
++ # endif
++ }
++ }
++ #endif
++
++ /*
+ * Add an entry to the end of the list of errors.
+ * Returns OK or FAIL.
+ */
+***************
+*** 2387,2393 ****
+ * Returns TRUE if a quickfix/location list with the given identifier exists.
+ */
+ static int
+! qflist_valid (win_T *wp, int_u qf_id)
+ {
+ qf_info_T *qi = &ql_info;
+ int i;
+--- 2478,2484 ----
+ * Returns TRUE if a quickfix/location list with the given identifier exists.
+ */
+ static int
+! qflist_valid(win_T *wp, int_u qf_id)
+ {
+ qf_info_T *qi = &ql_info;
+ int i;
+***************
+*** 3939,3944 ****
+--- 4030,4036 ----
+ qf_list_T *qfl;
+ int height;
+ int status = FAIL;
++ int lnum;
+
+ if (is_loclist_cmd(eap->cmdidx))
+ {
+***************
+*** 3950,3955 ****
+--- 4042,4049 ----
+ }
+ }
+
++ incr_quickfix_busy();
++
+ if (eap->addr_count != 0)
+ height = eap->line2;
+ else
+***************
+*** 3966,3980 ****
+ cmdmod.split & WSP_VERT);
+ if (status == FAIL)
+ if (qf_open_new_cwindow(qi, height) == FAIL)
+ return;
+
+ qfl = &qi->qf_lists[qi->qf_curlist];
+ qf_set_title_var(qfl);
+
+ // Fill the buffer with the quickfix list.
+ qf_fill_buffer(qi, curbuf, NULL);
+
+! curwin->w_cursor.lnum = qfl->qf_index;
+ curwin->w_cursor.col = 0;
+ check_cursor();
+ update_topline(); // scroll to show the line
+--- 4060,4082 ----
+ cmdmod.split & WSP_VERT);
+ if (status == FAIL)
+ if (qf_open_new_cwindow(qi, height) == FAIL)
++ {
++ decr_quickfix_busy();
+ return;
++ }
+
+ qfl = &qi->qf_lists[qi->qf_curlist];
+ qf_set_title_var(qfl);
++ // Save the current index here, as updating the quickfix buffer may free
++ // the quickfix list
++ lnum = qfl->qf_index;
+
+ // Fill the buffer with the quickfix list.
+ qf_fill_buffer(qi, curbuf, NULL);
+
+! decr_quickfix_busy();
+!
+! curwin->w_cursor.lnum = lnum;
+ curwin->w_cursor.col = 0;
+ check_cursor();
+ update_topline(); // scroll to show the line
+***************
+*** 4592,4597 ****
+--- 4694,4701 ----
+ (void)char_avail();
+ #endif
+
++ incr_quickfix_busy();
++
+ res = qf_init(wp, fname, (eap->cmdidx != CMD_make
+ && eap->cmdidx != CMD_lmake) ? p_gefm : p_efm,
+ (eap->cmdidx != CMD_grepadd
+***************
+*** 4617,4622 ****
+--- 4721,4727 ----
+ qf_jump_first(qi, save_qfid, FALSE);
+
+ cleanup:
++ decr_quickfix_busy();
+ mch_remove(fname);
+ vim_free(fname);
+ vim_free(cmd);
+***************
+*** 4927,4932 ****
+--- 5032,5039 ----
+ if (is_loclist_cmd(eap->cmdidx))
+ wp = curwin;
+
++ incr_quickfix_busy();
++
+ // This function is used by the :cfile, :cgetfile and :caddfile
+ // commands.
+ // :cfile always creates a new quickfix list and jumps to the
+***************
+*** 4942,4948 ****
+--- 5049,5058 ----
+ {
+ qi = GET_LOC_LIST(wp);
+ if (qi == NULL)
++ {
++ decr_quickfix_busy();
+ return;
++ }
+ }
+ if (res >= 0)
+ qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+***************
+*** 4956,4961 ****
+--- 5066,5073 ----
+ && qflist_valid(wp, save_qfid))
+ // display the first error
+ qf_jump_first(qi, save_qfid, eap->forceit);
++
++ decr_quickfix_busy();
+ }
+
+ /*
+***************
+*** 5304,5309 ****
+--- 5416,5423 ----
+ // ":lcd %:p:h" changes the meaning of short path names.
+ mch_dirname(dirname_start, MAXPATHL);
+
++ incr_quickfix_busy();
++
+ // Remember the current quickfix list identifier, so that we can check for
+ // autocommands changing the current quickfix list.
+ save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+***************
+*** 5339,5344 ****
+--- 5453,5459 ----
+ if (!vgr_qflist_valid(wp, qi, save_qfid, qf_cmdtitle(*eap->cmdlinep)))
+ {
+ FreeWild(fcount, fnames);
++ decr_quickfix_busy();
+ goto theend;
+ }
+ save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
+***************
+*** 5434,5444 ****
+ curbuf->b_fname, TRUE, curbuf);
+ // The QuickFixCmdPost autocmd may free the quickfix list. Check the list
+ // is still valid.
+! if (!qflist_valid(wp, save_qfid))
+! goto theend;
+!
+! if (qf_restore_list(qi, save_qfid) == FAIL)
+ goto theend;
+
+ // Jump to first match.
+ if (!qf_list_empty(qi, qi->qf_curlist))
+--- 5549,5560 ----
+ curbuf->b_fname, TRUE, curbuf);
+ // The QuickFixCmdPost autocmd may free the quickfix list. Check the list
+ // is still valid.
+! if (!qflist_valid(wp, save_qfid)
+! || qf_restore_list(qi, save_qfid) == FAIL)
+! {
+! decr_quickfix_busy();
+ goto theend;
++ }
+
+ // Jump to first match.
+ if (!qf_list_empty(qi, qi->qf_curlist))
+***************
+*** 5450,5455 ****
+--- 5566,5573 ----
+ else
+ EMSG2(_(e_nomatch2), s);
+
++ decr_quickfix_busy();
++
+ // If we loaded a dummy buffer into the current window, the autocommands
+ // may have messed up things, need to redraw and recompute folds.
+ if (redraw_for_dummy)
+***************
+*** 6516,6523 ****
+ {
+ // Free the entire quickfix or location list stack
+ qf_free_stack(wp, qi);
+ }
+! else if (what != NULL)
+ retval = qf_set_properties(qi, what, action, title);
+ else
+ {
+--- 6634,6645 ----
+ {
+ // Free the entire quickfix or location list stack
+ qf_free_stack(wp, qi);
++ return OK;
+ }
+!
+! incr_quickfix_busy();
+!
+! if (what != NULL)
+ retval = qf_set_properties(qi, what, action, title);
+ else
+ {
+***************
+*** 6526,6531 ****
+--- 6648,6655 ----
+ qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+ }
+
++ decr_quickfix_busy();
++
+ return retval;
+ }
+
+***************
+*** 6663,6673 ****
+--- 6787,6804 ----
+ qf_title = IObuff;
+ }
+
++ incr_quickfix_busy();
++
+ res = qf_init_ext(qi, qi->qf_curlist, NULL, buf, NULL, p_efm,
+ (eap->cmdidx != CMD_caddbuffer
+ && eap->cmdidx != CMD_laddbuffer),
+ eap->line1, eap->line2,
+ qf_title, NULL);
++ if (qf_stack_empty(qi))
++ {
++ decr_quickfix_busy();
++ return;
++ }
+ if (res >= 0)
+ qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+
+***************
+*** 6692,6697 ****
+--- 6823,6830 ----
+ && qflist_valid(wp, save_qfid))
+ // display the first error
+ qf_jump_first(qi, save_qfid, eap->forceit);
++
++ decr_quickfix_busy();
+ }
+ }
+ }
+***************
+*** 6746,6756 ****
+--- 6879,6895 ----
+ if ((tv->v_type == VAR_STRING && tv->vval.v_string != NULL)
+ || (tv->v_type == VAR_LIST && tv->vval.v_list != NULL))
+ {
++ incr_quickfix_busy();
+ res = qf_init_ext(qi, qi->qf_curlist, NULL, NULL, tv, p_efm,
+ (eap->cmdidx != CMD_caddexpr
+ && eap->cmdidx != CMD_laddexpr),
+ (linenr_T)0, (linenr_T)0,
+ qf_cmdtitle(*eap->cmdlinep), NULL);
++ if (qf_stack_empty(qi))
++ {
++ decr_quickfix_busy();
++ goto cleanup;
++ }
+ if (res >= 0)
+ qf_list_changed(&qi->qf_lists[qi->qf_curlist]);
+
+***************
+*** 6768,6776 ****
+--- 6907,6917 ----
+ && qflist_valid(wp, save_qfid))
+ // display the first error
+ qf_jump_first(qi, save_qfid, eap->forceit);
++ decr_quickfix_busy();
+ }
+ else
+ EMSG(_("E777: String or List expected"));
++ cleanup:
+ free_tv(tv);
+ }
+ }
+***************
+*** 6958,6964 ****
+ convert_setup(&vc, (char_u *)"utf-8", p_enc);
+ #endif
+
+-
+ // Go through all the directories in 'runtimepath'
+ p = p_rtp;
+ while (*p != NUL && !got_int)
+--- 7099,7104 ----
+***************
+*** 7020,7025 ****
+--- 7160,7167 ----
+ return;
+ }
+
++ incr_quickfix_busy();
++
+ #ifdef FEAT_MULTI_LANG
+ // Check for a specified language
+ lang = check_help_lang(eap->arg);
+***************
+*** 7056,7063 ****
+--- 7198,7208 ----
+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+ curbuf->b_fname, TRUE, curbuf);
+ if (!new_qi && IS_LL_STACK(qi) && qf_find_buf(qi) == NULL)
++ {
+ // autocommands made "qi" invalid
++ decr_quickfix_busy();
+ return;
++ }
+ }
+
+ // Jump to first match.
+***************
+*** 7066,7071 ****
+--- 7211,7218 ----
+ else
+ EMSG2(_(e_nomatch2), eap->arg);
+
++ decr_quickfix_busy();
++
+ if (eap->cmdidx == CMD_lhelpgrep)
+ {
+ // If the help window is not opened or if it already points to the
+*** ../vim-8.1.0487/src/proto/quickfix.pro 2018-09-25 22:08:10.933806882 +0200
+--- src/proto/quickfix.pro 2018-10-20 20:36:34.383299437 +0200
+***************
+*** 1,6 ****
+--- 1,7 ----
+ /* quickfix.c */
+ int qf_init(win_T *wp, char_u *efile, char_u *errorformat, int newlist, char_u *qf_title, char_u *enc);
+ void qf_free_all(win_T *wp);
++ void check_quickfix_busy(void);
+ void copy_loclist_stack(win_T *from, win_T *to);
+ void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
+ void qf_list(exarg_T *eap);
+*** ../vim-8.1.0487/src/misc2.c 2018-10-07 21:36:07.389878130 +0200
+--- src/misc2.c 2018-10-20 20:41:53.263021777 +0200
+***************
+*** 1231,1248 ****
+ buf = firstbuf;
+ }
+
+! #ifdef FEAT_ARABIC
+ free_cmdline_buf();
+! #endif
+
+ /* Clear registers. */
+ clear_registers();
+ ResetRedobuff();
+ ResetRedobuff();
+
+! #if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
+ vim_free(serverDelayedStartName);
+! #endif
+
+ /* highlight info */
+ free_highlight();
+--- 1231,1248 ----
+ buf = firstbuf;
+ }
+
+! # ifdef FEAT_ARABIC
+ free_cmdline_buf();
+! # endif
+
+ /* Clear registers. */
+ clear_registers();
+ ResetRedobuff();
+ ResetRedobuff();
+
+! # if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
+ vim_free(serverDelayedStartName);
+! # endif
+
+ /* highlight info */
+ free_highlight();
+***************
+*** 1265,1273 ****
+ # ifdef FEAT_JOB_CHANNEL
+ channel_free_all();
+ # endif
+! #ifdef FEAT_TIMERS
+ timer_free_all();
+! #endif
+ # ifdef FEAT_EVAL
+ /* must be after channel_free_all() with unrefs partials */
+ eval_clear();
+--- 1265,1273 ----
+ # ifdef FEAT_JOB_CHANNEL
+ channel_free_all();
+ # endif
+! # ifdef FEAT_TIMERS
+ timer_free_all();
+! # endif
+ # ifdef FEAT_EVAL
+ /* must be after channel_free_all() with unrefs partials */
+ eval_clear();
+***************
+*** 1282,1297 ****
+ /* screenlines (can't display anything now!) */
+ free_screenlines();
+
+! #if defined(USE_XSMP)
+ xsmp_close();
+! #endif
+! #ifdef FEAT_GUI_GTK
+ gui_mch_free_all();
+! #endif
+ clear_hl_tables();
+
+ vim_free(IObuff);
+ vim_free(NameBuff);
+ }
+ #endif
+
+--- 1282,1300 ----
+ /* screenlines (can't display anything now!) */
+ free_screenlines();
+
+! # if defined(USE_XSMP)
+ xsmp_close();
+! # endif
+! # ifdef FEAT_GUI_GTK
+ gui_mch_free_all();
+! # endif
+ clear_hl_tables();
+
+ vim_free(IObuff);
+ vim_free(NameBuff);
++ # ifdef FEAT_QUICKFIX
++ check_quickfix_busy();
++ # endif
+ }
+ #endif
+
+*** ../vim-8.1.0487/src/testdir/test_quickfix.vim 2018-10-11 17:39:09.173107491 +0200
+--- src/testdir/test_quickfix.vim 2018-10-20 20:25:50.775968747 +0200
+***************
+*** 3220,3226 ****
+--- 3220,3247 ----
+ augroup QF_Test
+ au!
+ augroup END
++
+ enew | only
++ augroup QF_Test
++ au!
++ au BufNew * call setloclist(0, [], 'f')
++ augroup END
++ lexpr 'x:1:x'
++ augroup QF_Test
++ au!
++ augroup END
++
++ enew | only
++ lexpr ''
++ lopen
++ augroup QF_Test
++ au!
++ au FileType * call setloclist(0, [], 'f')
++ augroup END
++ lexpr ''
++ augroup QF_Test
++ au!
++ augroup END
+ endfunc
+
+ " The following test used to crash Vim
+*** ../vim-8.1.0487/src/version.c 2018-10-19 22:35:04.889189955 +0200
+--- src/version.c 2018-10-20 20:27:51.427127219 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 488,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+243. You unsuccessfully try to download a pizza from www.dominos.com.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0489 b/data/vim/patches/8.1.0489
new file mode 100644
index 000000000..2f53bb9bd
--- /dev/null
+++ b/data/vim/patches/8.1.0489
@@ -0,0 +1,198 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0489
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0489
+Problem: Crash when autocmd clears vimpgrep location list.
+Solution: Return from qf_jump_edit_buffer() early. (Yegappan Lakshmanan)
+Files: src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0488/src/quickfix.c 2018-10-20 20:53:58.143284832 +0200
+--- src/quickfix.c 2018-10-21 18:43:52.324236213 +0200
+***************
+*** 2985,2990 ****
+--- 2985,2992 ----
+ {
+ qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
+ int retval = OK;
++ int old_qf_curlist = qi->qf_curlist;
++ int save_qfid = qfl->qf_id;
+
+ if (qf_ptr->qf_type == 1)
+ {
+***************
+*** 2993,3038 ****
+ if (!can_abandon(curbuf, forceit))
+ {
+ no_write_message();
+! retval = FAIL;
+ }
+! else
+! retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1,
+! ECMD_HIDE + ECMD_SET_HELP,
+! oldwin == curwin ? curwin : NULL);
+ }
+ else
+- {
+- int old_qf_curlist = qi->qf_curlist;
+- int save_qfid = qfl->qf_id;
+-
+ retval = buflist_getfile(qf_ptr->qf_fnum,
+ (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+
+! if (IS_LL_STACK(qi))
+! {
+! // Location list. Check whether the associated window is still
+! // present and the list is still valid.
+! if (!win_valid_any_tab(oldwin))
+! {
+! EMSG(_("E924: Current window was closed"));
+! *opened_window = FALSE;
+! return NOTDONE;
+! }
+! else if (!qflist_valid(oldwin, save_qfid))
+! {
+! EMSG(_(e_loc_list_changed));
+! return NOTDONE;
+! }
+! }
+! else if (old_qf_curlist != qi->qf_curlist
+! || !is_qf_entry_present(qfl, qf_ptr))
+! {
+! if (IS_QF_STACK(qi))
+! EMSG(_("E925: Current quickfix was changed"));
+! else
+! EMSG(_(e_loc_list_changed));
+! return NOTDONE;
+! }
+ }
+
+ return retval;
+--- 2995,3034 ----
+ if (!can_abandon(curbuf, forceit))
+ {
+ no_write_message();
+! return FAIL;
+ }
+!
+! retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1,
+! ECMD_HIDE + ECMD_SET_HELP,
+! oldwin == curwin ? curwin : NULL);
+ }
+ else
+ retval = buflist_getfile(qf_ptr->qf_fnum,
+ (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
+
+! // If a location list, check whether the associated window is still
+! // present.
+! if (IS_LL_STACK(qi) && !win_valid_any_tab(oldwin))
+! {
+! EMSG(_("E924: Current window was closed"));
+! *opened_window = FALSE;
+! return NOTDONE;
+! }
+!
+! if (IS_QF_STACK(qi) && !qflist_valid(NULL, save_qfid))
+! {
+! EMSG(_("E925: Current quickfix was changed"));
+! return NOTDONE;
+! }
+!
+! if (old_qf_curlist != qi->qf_curlist
+! || !is_qf_entry_present(qfl, qf_ptr))
+! {
+! if (IS_QF_STACK(qi))
+! EMSG(_("E925: Current quickfix was changed"));
+! else
+! EMSG(_(e_loc_list_changed));
+! return NOTDONE;
+ }
+
+ return retval;
+*** ../vim-8.1.0488/src/testdir/test_quickfix.vim 2018-10-20 20:53:58.147284793 +0200
+--- src/testdir/test_quickfix.vim 2018-10-21 18:32:08.845255919 +0200
+***************
+*** 3255,3260 ****
+--- 3255,3271 ----
+ augroup QF_Test
+ au!
+ augroup END
++
++ new | only
++ augroup QF_Test
++ au!
++ au BufEnter * call setloclist(0, [], 'r')
++ augroup END
++ call assert_fails('lvimgrep Test_lvimgrep_crash *', 'E926:')
++ augroup QF_Test
++ au!
++ augroup END
++
+ enew | only
+ endfunc
+
+***************
+*** 3337,3342 ****
+--- 3348,3384 ----
+ call assert_equal('help', &filetype)
+ call assert_equal(1, getloclist(0, {'nr' : '$'}).nr)
+ au! QuickFixCmdPost
++
++ new | only
++ augroup QF_Test
++ au!
++ au BufEnter * call setqflist([], 'f')
++ augroup END
++ call assert_fails('helpgrep quickfix', 'E925:')
++ augroup QF_Test
++ au! BufEnter
++ augroup END
++
++ new | only
++ augroup QF_Test
++ au!
++ au BufEnter * call setqflist([], 'r')
++ augroup END
++ call assert_fails('helpgrep quickfix', 'E925:')
++ augroup QF_Test
++ au! BufEnter
++ augroup END
++
++ new | only
++ augroup QF_Test
++ au!
++ au BufEnter * call setloclist(0, [], 'r')
++ augroup END
++ call assert_fails('lhelpgrep quickfix', 'E926:')
++ augroup QF_Test
++ au! BufEnter
++ augroup END
++
+ new | only
+ endfunc
+
+*** ../vim-8.1.0488/src/version.c 2018-10-20 20:53:58.147284793 +0200
+--- src/version.c 2018-10-21 18:39:57.093915160 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 489,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+247. You use www.switchboard.com instead of dialing 411 and 555-12-12
+ for directory assistance.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0490 b/data/vim/patches/8.1.0490
new file mode 100644
index 000000000..01fe10304
--- /dev/null
+++ b/data/vim/patches/8.1.0490
@@ -0,0 +1,117 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0490
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0490
+Problem: MS-Windows: doesn't handle missing glibwinpthread-1.dll.
+Solution: Adjust Cygwin/MinGW build file. (Ken Takata, closes #2827)
+Files: src/Make_cyg_ming.mak
+
+
+*** ../vim-8.1.0489/src/Make_cyg_ming.mak 2018-10-17 22:45:51.167602173 +0200
+--- src/Make_cyg_ming.mak 2018-10-21 22:40:35.035596360 +0200
+***************
+*** 121,126 ****
+--- 121,129 ----
+ ifndef STATIC_WINPTHREAD
+ STATIC_WINPTHREAD=$(STATIC_STDCPLUS)
+ endif
++ # If you use TDM-GCC(-64), change HAS_GCC_EH to "no".
++ # This is used when STATIC_STDCPLUS=yes.
++ HAS_GCC_EH=yes
+
+ # If the user doesn't want gettext, undefine it.
+ ifeq (no, $(GETTEXT))
+***************
+*** 928,941 ****
+ endif
+
+ ifeq (yes, $(USE_STDCPLUS))
+ ifeq (yes, $(STATIC_STDCPLUS))
+! LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+! else
+! LIB += -lstdc++
+ endif
+ endif
+
+ ifeq (yes, $(STATIC_WINPTHREAD))
+ LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
+ endif
+
+--- 931,948 ----
+ endif
+
+ ifeq (yes, $(USE_STDCPLUS))
++ LINK = $(CXX)
+ ifeq (yes, $(STATIC_STDCPLUS))
+! LIB += -static-libstdc++ -static-libgcc
+ endif
++ else
++ LINK = $(CC)
+ endif
+
+ ifeq (yes, $(STATIC_WINPTHREAD))
++ ifeq (yes, $(HAS_GCC_EH))
++ LIB += -lgcc_eh
++ endif
+ LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
+ endif
+
+***************
+*** 955,961 ****
+ $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
+
+ $(TARGET): $(OUTDIR) $(OBJ)
+! $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
+
+ upx: exes
+ upx gvim.exe
+--- 962,968 ----
+ $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
+
+ $(TARGET): $(OUTDIR) $(OBJ)
+! $(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
+
+ upx: exes
+ upx gvim.exe
+***************
+*** 1142,1148 ****
+ @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
+ @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
+ @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
+! @echo 'char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)";' >> pathdef.c
+ @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
+ @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
+ else
+--- 1149,1155 ----
+ @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
+ @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
+ @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
+! @echo 'char_u *all_lflags = (char_u *)"$(LINK) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)";' >> pathdef.c
+ @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
+ @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
+ else
+*** ../vim-8.1.0489/src/version.c 2018-10-21 18:47:39.622613657 +0200
+--- src/version.c 2018-10-21 22:44:54.837994997 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 490,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+250. You've given up the search for the "perfect woman" and instead,
+ sit in front of the PC until you're just too tired to care.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0491 b/data/vim/patches/8.1.0491
new file mode 100644
index 000000000..d3de21cf7
--- /dev/null
+++ b/data/vim/patches/8.1.0491
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0491
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0491
+Problem: If a terminal dump has CR it is considered corrupt.
+Solution: Ignore CR characters. (Nobuhiro Takasaki, closes #3558)
+Files: src/terminal.c
+
+
+*** ../vim-8.1.0490/src/terminal.c 2018-10-16 22:12:56.090984061 +0200
+--- src/terminal.c 2018-10-23 21:38:40.168050973 +0200
+***************
+*** 4094,4100 ****
+ {
+ if (c == EOF)
+ break;
+! if (c == '\n')
+ {
+ /* End of a line: append it to the buffer. */
+ if (ga_text.ga_data == NULL)
+--- 4094,4105 ----
+ {
+ if (c == EOF)
+ break;
+! if (c == '\r')
+! {
+! // DOS line endings? Ignore.
+! c = fgetc(fd);
+! }
+! else if (c == '\n')
+ {
+ /* End of a line: append it to the buffer. */
+ if (ga_text.ga_data == NULL)
+*** ../vim-8.1.0490/src/version.c 2018-10-21 22:45:39.117688669 +0200
+--- src/version.c 2018-10-23 21:39:47.391445765 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 491,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+266. You hear most of your jokes via e-mail instead of in person.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0492 b/data/vim/patches/8.1.0492
new file mode 100644
index 000000000..8a04c6e1f
--- /dev/null
+++ b/data/vim/patches/8.1.0492
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0492
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0492
+Problem: "Edit with existing Vim" list can get long.
+Solution: Move the list to a submenu. (Ken Takata, closes #3561)
+Files: src/GvimExt/gvimext.cpp
+
+
+*** ../vim-8.1.0491/src/GvimExt/gvimext.cpp 2017-10-14 17:17:35.000000000 +0200
+--- src/GvimExt/gvimext.cpp 2018-10-25 11:21:12.394638116 +0200
+***************
+*** 708,718 ****
+--- 708,733 ----
+ m_edit_existing_off = 1;
+ }
+
++ HMENU hSubMenu = NULL;
++ if (m_cntOfHWnd > 1)
++ {
++ hSubMenu = CreatePopupMenu();
++ mii.fMask |= MIIM_SUBMENU;
++ mii.wID = idCmd;
++ mii.dwTypeData = _("Edit with existing Vim");
++ mii.cch = lstrlen(mii.dwTypeData);
++ mii.hSubMenu = hSubMenu;
++ InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
++ mii.fMask = mii.fMask & ~MIIM_SUBMENU;
++ mii.hSubMenu = NULL;
++ }
+ // Now display all the vim instances
+ for (int i = 0; i < m_cntOfHWnd; i++)
+ {
+ char title[BUFSIZE];
+ char temp[BUFSIZE];
++ int index;
++ HMENU hmenu;
+
+ // Obtain window title, continue if can not
+ if (GetWindowText(m_hWnd[i], title, BUFSIZE - 1) == 0)
+***************
+*** 726,740 ****
+ *pos = 0;
+ }
+ // Now concatenate
+! strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1);
+! temp[BUFSIZE - 1] = '\0';
+ strncat(temp, title, BUFSIZE - 1 - strlen(temp));
+ temp[BUFSIZE - 1] = '\0';
+
+ mii.wID = idCmd++;
+ mii.dwTypeData = temp;
+ mii.cch = lstrlen(mii.dwTypeData);
+! InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
+ }
+ // InsertMenu(hMenu, indexMenu++, MF_SEPARATOR|MF_BYPOSITION, 0, NULL);
+
+--- 741,770 ----
+ *pos = 0;
+ }
+ // Now concatenate
+! if (m_cntOfHWnd > 1)
+! temp[0] = '\0';
+! else
+! {
+! strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1);
+! temp[BUFSIZE - 1] = '\0';
+! }
+ strncat(temp, title, BUFSIZE - 1 - strlen(temp));
+ temp[BUFSIZE - 1] = '\0';
+
+ mii.wID = idCmd++;
+ mii.dwTypeData = temp;
+ mii.cch = lstrlen(mii.dwTypeData);
+! if (m_cntOfHWnd > 1)
+! {
+! hmenu = hSubMenu;
+! index = i;
+! }
+! else
+! {
+! hmenu = hMenu;
+! index = indexMenu++;
+! }
+! InsertMenuItem(hmenu, index, TRUE, &mii);
+ }
+ // InsertMenu(hMenu, indexMenu++, MF_SEPARATOR|MF_BYPOSITION, 0, NULL);
+
+*** ../vim-8.1.0491/src/version.c 2018-10-23 21:42:55.449760330 +0200
+--- src/version.c 2018-10-25 11:22:20.317530744 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 492,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+270. You are subscribed to a mailing list for every piece of software
+ you use.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0493 b/data/vim/patches/8.1.0493
new file mode 100644
index 000000000..42ad34581
--- /dev/null
+++ b/data/vim/patches/8.1.0493
@@ -0,0 +1,497 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0493
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0493
+Problem: argv() and argc() only work on the current argument list.
+Solution: Add a window ID argument. (Yegappan Lakshmanan, closes #832)
+Files: runtime/doc/eval.txt, src/evalfunc.c, src/testdir/test_arglist.vim,
+ src/eval.c, src/proto/eval.pro
+
+
+*** ../vim-8.1.0492/runtime/doc/eval.txt 2018-09-16 18:46:36.189127529 +0200
+--- runtime/doc/eval.txt 2018-10-25 12:06:17.061437332 +0200
+***************
+*** 2015,2027 ****
+ acos({expr}) Float arc cosine of {expr}
+ add({list}, {item}) List append {item} to |List| {list}
+ and({expr}, {expr}) Number bitwise AND
+! append({lnum}, {string}) Number append {string} below line {lnum}
+! append({lnum}, {list}) Number append lines {list} below line {lnum}
+! argc() Number number of files in the argument list
+ argidx() Number current index in the argument list
+ arglistid([{winnr} [, {tabnr}]]) Number argument list id
+! argv({nr}) String {nr} entry of the argument list
+! argv() List the argument list
+ assert_beeps({cmd}) Number assert {cmd} causes a beep
+ assert_equal({exp}, {act} [, {msg}])
+ Number assert {exp} is equal to {act}
+--- 2022,2036 ----
+ acos({expr}) Float arc cosine of {expr}
+ add({list}, {item}) List append {item} to |List| {list}
+ and({expr}, {expr}) Number bitwise AND
+! append({lnum}, {text}) Number append {text} below line {lnum}
+! appendbufline({expr}, {lnum}, {text})
+! Number append {text} below line {lnum}
+! in buffer {expr}
+! argc( [{winid}]) Number number of files in the argument list
+ argidx() Number current index in the argument list
+ arglistid([{winnr} [, {tabnr}]]) Number argument list id
+! argv({nr} [, {winid}]) String {nr} entry of the argument list
+! argv([-1, {winid}]) List the argument list
+ assert_beeps({cmd}) Number assert {cmd} causes a beep
+ assert_equal({exp}, {act} [, {msg}])
+ Number assert {exp} is equal to {act}
+***************
+*** 2587,2594 ****
+ :let failed = appendbufline(13, 0, "# THE START")
+ <
+ *argc()*
+! argc() The result is the number of files in the argument list of the
+! current window. See |arglist|.
+
+ *argidx()*
+ argidx() The result is the current index in the argument list. 0 is
+--- 2596,2610 ----
+ :let failed = appendbufline(13, 0, "# THE START")
+ <
+ *argc()*
+! argc([{winid}])
+! The result is the number of files in the argument list. See
+! |arglist|.
+! If {winid} is not supplied, the argument list of the current
+! window is used.
+! If {winid} is -1, the global argument list is used.
+! Otherwise {winid} specifies the window of which the argument
+! list is used: either the window number or the window ID.
+! Returns -1 if the {winid} argument is invalid.
+
+ *argidx()*
+ argidx() The result is the current index in the argument list. 0 is
+***************
+*** 2599,2605 ****
+ Return the argument list ID. This is a number which
+ identifies the argument list being used. Zero is used for the
+ global argument list. See |arglist|.
+! Return -1 if the arguments are invalid.
+
+ Without arguments use the current window.
+ With {winnr} only use this window in the current tab page.
+--- 2615,2621 ----
+ Return the argument list ID. This is a number which
+ identifies the argument list being used. Zero is used for the
+ global argument list. See |arglist|.
+! Returns -1 if the arguments are invalid.
+
+ Without arguments use the current window.
+ With {winnr} only use this window in the current tab page.
+***************
+*** 2608,2624 ****
+ {winnr} can be the window number or the |window-ID|.
+
+ *argv()*
+! argv([{nr}]) The result is the {nr}th file in the argument list of the
+! current window. See |arglist|. "argv(0)" is the first one.
+! Example: >
+ :let i = 0
+ :while i < argc()
+ : let f = escape(fnameescape(argv(i)), '.')
+ : exe 'amenu Arg.' . f . ' :e ' . f . '<CR>'
+ : let i = i + 1
+ :endwhile
+! < Without the {nr} argument a |List| with the whole |arglist| is
+! returned.
+
+ assert_beeps({cmd}) *assert_beeps()*
+ Run {cmd} and add an error message to |v:errors| if it does
+--- 2624,2642 ----
+ {winnr} can be the window number or the |window-ID|.
+
+ *argv()*
+! argv([{nr} [, {winid}])
+! The result is the {nr}th file in the argument list. See
+! |arglist|. "argv(0)" is the first one. Example: >
+ :let i = 0
+ :while i < argc()
+ : let f = escape(fnameescape(argv(i)), '.')
+ : exe 'amenu Arg.' . f . ' :e ' . f . '<CR>'
+ : let i = i + 1
+ :endwhile
+! < Without the {nr} argument, or when {nr} is -1, a |List| with
+! the whole |arglist| is returned.
+!
+! The {winid} argument specifies the window ID, see |argc()|.
+
+ assert_beeps({cmd}) *assert_beeps()*
+ Run {cmd} and add an error message to |v:errors| if it does
+*** ../vim-8.1.0492/src/evalfunc.c 2018-10-07 20:14:53.091279680 +0200
+--- src/evalfunc.c 2018-10-25 12:26:27.274700783 +0200
+***************
+*** 501,510 ****
+ {"and", 2, 2, f_and},
+ {"append", 2, 2, f_append},
+ {"appendbufline", 3, 3, f_appendbufline},
+! {"argc", 0, 0, f_argc},
+ {"argidx", 0, 0, f_argidx},
+ {"arglistid", 0, 2, f_arglistid},
+! {"argv", 0, 1, f_argv},
+ #ifdef FEAT_FLOAT
+ {"asin", 1, 1, f_asin}, /* WJMc */
+ #endif
+--- 501,510 ----
+ {"and", 2, 2, f_and},
+ {"append", 2, 2, f_append},
+ {"appendbufline", 3, 3, f_appendbufline},
+! {"argc", 0, 1, f_argc},
+ {"argidx", 0, 0, f_argidx},
+ {"arglistid", 0, 2, f_arglistid},
+! {"argv", 0, 2, f_argv},
+ #ifdef FEAT_FLOAT
+ {"asin", 1, 1, f_asin}, /* WJMc */
+ #endif
+***************
+*** 1407,1418 ****
+ }
+
+ /*
+! * "argc()" function
+ */
+ static void
+! f_argc(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+! rettv->vval.v_number = ARGCOUNT;
+ }
+
+ /*
+--- 1407,1435 ----
+ }
+
+ /*
+! * "argc([window id])" function
+ */
+ static void
+! f_argc(typval_T *argvars, typval_T *rettv)
+ {
+! win_T *wp;
+!
+! if (argvars[0].v_type == VAR_UNKNOWN)
+! // use the current window
+! rettv->vval.v_number = ARGCOUNT;
+! else if (argvars[0].v_type == VAR_NUMBER
+! && get_tv_number(&argvars[0]) == -1)
+! // use the global argument list
+! rettv->vval.v_number = GARGCOUNT;
+! else
+! {
+! // use the argument list of the specified window
+! wp = find_win_by_nr_or_id(&argvars[0]);
+! if (wp != NULL)
+! rettv->vval.v_number = WARGCOUNT(wp);
+! else
+! rettv->vval.v_number = -1;
+! }
+ }
+
+ /*
+***************
+*** 1439,1464 ****
+ }
+
+ /*
+ * "argv(nr)" function
+ */
+ static void
+ f_argv(typval_T *argvars, typval_T *rettv)
+ {
+ int idx;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! idx = (int)get_tv_number_chk(&argvars[0], NULL);
+! if (idx >= 0 && idx < ARGCOUNT)
+! rettv->vval.v_string = vim_strsave(alist_name(&ARGLIST[idx]));
+ else
+! rettv->vval.v_string = NULL;
+ rettv->v_type = VAR_STRING;
+ }
+! else if (rettv_list_alloc(rettv) == OK)
+! for (idx = 0; idx < ARGCOUNT; ++idx)
+! list_append_string(rettv->vval.v_list,
+! alist_name(&ARGLIST[idx]), -1);
+ }
+
+ /*
+--- 1456,1519 ----
+ }
+
+ /*
++ * Get the argument list for a given window
++ */
++ static void
++ get_arglist_as_rettv(aentry_T *arglist, int argcount, typval_T *rettv)
++ {
++ int idx;
++
++ if (rettv_list_alloc(rettv) == OK && arglist != NULL)
++ for (idx = 0; idx < argcount; ++idx)
++ list_append_string(rettv->vval.v_list,
++ alist_name(&arglist[idx]), -1);
++ }
++
++ /*
+ * "argv(nr)" function
+ */
+ static void
+ f_argv(typval_T *argvars, typval_T *rettv)
+ {
+ int idx;
++ aentry_T *arglist = NULL;
++ int argcount = -1;
+
+ if (argvars[0].v_type != VAR_UNKNOWN)
+ {
+! if (argvars[1].v_type == VAR_UNKNOWN)
+! {
+! arglist = ARGLIST;
+! argcount = ARGCOUNT;
+! }
+! else if (argvars[1].v_type == VAR_NUMBER
+! && get_tv_number(&argvars[1]) == -1)
+! {
+! arglist = GARGLIST;
+! argcount = GARGCOUNT;
+! }
+ else
+! {
+! win_T *wp = find_win_by_nr_or_id(&argvars[1]);
+!
+! if (wp != NULL)
+! {
+! /* Use the argument list of the specified window */
+! arglist = WARGLIST(wp);
+! argcount = WARGCOUNT(wp);
+! }
+! }
+!
+ rettv->v_type = VAR_STRING;
++ rettv->vval.v_string = NULL;
++ idx = get_tv_number_chk(&argvars[0], NULL);
++ if (arglist != NULL && idx >= 0 && idx < argcount)
++ rettv->vval.v_string = vim_strsave(alist_name(&arglist[idx]));
++ else if (idx == -1)
++ get_arglist_as_rettv(arglist, argcount, rettv);
+ }
+! else
+! get_arglist_as_rettv(ARGLIST, ARGCOUNT, rettv);
+ }
+
+ /*
+***************
+*** 5358,5364 ****
+ rettv->vval.v_number = FALSE;
+ }
+
+-
+ /*
+ * "getcurpos()" function
+ */
+--- 5413,5418 ----
+***************
+*** 6982,6988 ****
+ rettv->vval.v_number = selected;
+ }
+
+-
+ static garray_T ga_userinput = {0, 0, sizeof(tasave_T), 4, NULL};
+
+ /*
+--- 7036,7041 ----
+***************
+*** 12397,12403 ****
+ modec = 't';
+ }
+
+-
+ switch (TOLOWER_ASC(what[0]))
+ {
+ case 'b':
+--- 12450,12455 ----
+***************
+*** 12808,12814 ****
+ }
+ }
+
+-
+ /*
+ * "tabpagenr()" function
+ */
+--- 12860,12865 ----
+***************
+*** 12900,12906 ****
+ rettv->vval.v_number = nr;
+ }
+
+-
+ /*
+ * "tagfiles()" function
+ */
+--- 12951,12956 ----
+***************
+*** 14092,14096 ****
+ ^ get_tv_number_chk(&argvars[1], NULL);
+ }
+
+-
+ #endif /* FEAT_EVAL */
+--- 14142,14145 ----
+*** ../vim-8.1.0492/src/testdir/test_arglist.vim 2018-09-24 21:32:07.321727079 +0200
+--- src/testdir/test_arglist.vim 2018-10-25 12:17:36.075085230 +0200
+***************
+*** 278,290 ****
+ call assert_equal(0, arglistid())
+ endfunc
+
+! " Test for argv()
+ func Test_argv()
+ call Reset_arglist()
+ call assert_equal([], argv())
+ call assert_equal("", argv(2))
+ argadd a b c d
+ call assert_equal('c', argv(2))
+ endfunc
+
+ " Test for the :argedit command
+--- 278,330 ----
+ call assert_equal(0, arglistid())
+ endfunc
+
+! " Tests for argv() and argc()
+ func Test_argv()
+ call Reset_arglist()
+ call assert_equal([], argv())
+ call assert_equal("", argv(2))
++ call assert_equal(0, argc())
+ argadd a b c d
++ call assert_equal(4, argc())
+ call assert_equal('c', argv(2))
++
++ let w1_id = win_getid()
++ split
++ let w2_id = win_getid()
++ arglocal
++ args e f g
++ tabnew
++ let w3_id = win_getid()
++ split
++ let w4_id = win_getid()
++ argglobal
++ tabfirst
++ call assert_equal(4, argc(w1_id))
++ call assert_equal('b', argv(1, w1_id))
++ call assert_equal(['a', 'b', 'c', 'd'], argv(-1, w1_id))
++
++ call assert_equal(3, argc(w2_id))
++ call assert_equal('f', argv(1, w2_id))
++ call assert_equal(['e', 'f', 'g'], argv(-1, w2_id))
++
++ call assert_equal(3, argc(w3_id))
++ call assert_equal('e', argv(0, w3_id))
++ call assert_equal(['e', 'f', 'g'], argv(-1, w3_id))
++
++ call assert_equal(4, argc(w4_id))
++ call assert_equal('c', argv(2, w4_id))
++ call assert_equal(['a', 'b', 'c', 'd'], argv(-1, w4_id))
++
++ call assert_equal(4, argc(-1))
++ call assert_equal(3, argc())
++ call assert_equal('d', argv(3, -1))
++ call assert_equal(['a', 'b', 'c', 'd'], argv(-1, -1))
++ tabonly | only | enew!
++ " Negative test cases
++ call assert_equal(-1, argc(100))
++ call assert_equal('', argv(1, 100))
++ call assert_equal([], argv(-1, 100))
++ call assert_equal('', argv(10, -1))
+ endfunc
+
+ " Test for the :argedit command
+*** ../vim-8.1.0492/src/eval.c 2018-10-14 21:40:57.356848425 +0200
+--- src/eval.c 2018-10-25 12:24:39.027292633 +0200
+***************
+*** 8193,8201 ****
+ tabpage_T *tp) /* NULL for current tab page */
+ {
+ win_T *wp;
+! int nr;
+!
+! nr = (int)get_tv_number_chk(vp, NULL);
+
+ if (nr < 0)
+ return NULL;
+--- 8193,8199 ----
+ tabpage_T *tp) /* NULL for current tab page */
+ {
+ win_T *wp;
+! int nr = (int)get_tv_number_chk(vp, NULL);
+
+ if (nr < 0)
+ return NULL;
+***************
+*** 8218,8223 ****
+--- 8216,8235 ----
+ }
+
+ /*
++ * Find a window: When using a Window ID in any tab page, when using a number
++ * in the current tab page.
++ */
++ win_T *
++ find_win_by_nr_or_id(typval_T *vp)
++ {
++ int nr = (int)get_tv_number_chk(vp, NULL);
++
++ if (nr >= LOWEST_WIN_ID)
++ return win_id2wp(vp);
++ return find_win_by_nr(vp, NULL);
++ }
++
++ /*
+ * Find window specified by "wvp" in tabpage "tvp".
+ */
+ win_T *
+*** ../vim-8.1.0492/src/proto/eval.pro 2018-09-10 21:04:09.872392623 +0200
+--- src/proto/eval.pro 2018-10-25 12:25:05.335058574 +0200
+***************
+*** 111,116 ****
+--- 111,117 ----
+ void ex_echohl(exarg_T *eap);
+ void ex_execute(exarg_T *eap);
+ win_T *find_win_by_nr(typval_T *vp, tabpage_T *tp);
++ win_T *find_win_by_nr_or_id(typval_T *vp);
+ win_T *find_tabwin(typval_T *wvp, typval_T *tvp);
+ void getwinvar(typval_T *argvars, typval_T *rettv, int off);
+ void setwinvar(typval_T *argvars, typval_T *rettv, int off);
+*** ../vim-8.1.0492/src/version.c 2018-10-25 11:25:50.166512213 +0200
+--- src/version.c 2018-10-25 11:54:38.673119950 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 493,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+271. You collect hilarious signatures from all 250 mailing lists you
+ are subscribed to.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0494 b/data/vim/patches/8.1.0494
new file mode 100644
index 000000000..40adee35f
--- /dev/null
+++ b/data/vim/patches/8.1.0494
@@ -0,0 +1,154 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0494
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0494
+Problem: Functions do not check for a window ID in other tabs.
+Solution: Also find the window ID in other than the current tab.
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0493/src/evalfunc.c 2018-10-25 12:30:52.270659874 +0200
+--- src/evalfunc.c 2018-10-25 12:37:49.997123096 +0200
+***************
+*** 5291,5297 ****
+ #ifdef FEAT_QUICKFIX
+ win_T *wp;
+
+! wp = find_win_by_nr(&argvars[0], NULL);
+ get_qf_loc_list(FALSE, wp, &argvars[1], rettv);
+ #endif
+ }
+--- 5291,5297 ----
+ #ifdef FEAT_QUICKFIX
+ win_T *wp;
+
+! wp = find_win_by_nr_or_id(&argvars[0]);
+ get_qf_loc_list(FALSE, wp, &argvars[1], rettv);
+ #endif
+ }
+***************
+*** 5796,5802 ****
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+
+! wp = find_win_by_nr(&argvars[0], NULL);
+ list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_winrow + 1);
+ list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_wincol + 1);
+ }
+--- 5796,5802 ----
+ if (rettv_list_alloc(rettv) == FAIL)
+ return;
+
+! wp = find_win_by_nr_or_id(&argvars[0]);
+ list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_winrow + 1);
+ list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_wincol + 1);
+ }
+***************
+*** 8028,8034 ****
+
+ if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL)
+ {
+! *win = find_win_by_nr(&di->di_tv, NULL);
+ if (*win == NULL)
+ {
+ EMSG(_("E957: Invalid window number"));
+--- 8028,8034 ----
+
+ if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL)
+ {
+! *win = find_win_by_nr_or_id(&di->di_tv);
+ if (*win == NULL)
+ {
+ EMSG(_("E957: Invalid window number"));
+***************
+*** 10785,10791 ****
+
+ rettv->vval.v_number = -1;
+
+! win = find_win_by_nr(&argvars[0], NULL);
+ if (win != NULL)
+ set_qf_ll_list(win, &argvars[1], &argvars[2], &argvars[3], rettv);
+ }
+--- 10785,10791 ----
+
+ rettv->vval.v_number = -1;
+
+! win = find_win_by_nr_or_id(&argvars[0]);
+ if (win != NULL)
+ set_qf_ll_list(win, &argvars[1], &argvars[2], &argvars[3], rettv);
+ }
+***************
+*** 13843,13849 ****
+ {
+ win_T *wp;
+
+! wp = find_win_by_nr(&argvars[0], NULL);
+ if (wp == NULL)
+ rettv->vval.v_number = -1;
+ else
+--- 13843,13849 ----
+ {
+ win_T *wp;
+
+! wp = find_win_by_nr_or_id(&argvars[0]);
+ if (wp == NULL)
+ rettv->vval.v_number = -1;
+ else
+***************
+*** 13868,13874 ****
+ {
+ win_T *wp;
+
+! wp = find_win_by_nr(&argvars[0], NULL);
+ if (wp == NULL)
+ rettv->vval.v_number = -1;
+ else
+--- 13868,13874 ----
+ {
+ win_T *wp;
+
+! wp = find_win_by_nr_or_id(&argvars[0]);
+ if (wp == NULL)
+ rettv->vval.v_number = -1;
+ else
+***************
+*** 14035,14041 ****
+ {
+ win_T *wp;
+
+! wp = find_win_by_nr(&argvars[0], NULL);
+ if (wp == NULL)
+ rettv->vval.v_number = -1;
+ else
+--- 14035,14041 ----
+ {
+ win_T *wp;
+
+! wp = find_win_by_nr_or_id(&argvars[0]);
+ if (wp == NULL)
+ rettv->vval.v_number = -1;
+ else
+*** ../vim-8.1.0493/src/version.c 2018-10-25 12:30:52.274659868 +0200
+--- src/version.c 2018-10-25 12:38:27.696929844 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 494,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+10E. You start counting in hex.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0495 b/data/vim/patches/8.1.0495
new file mode 100644
index 000000000..8770fbe97
--- /dev/null
+++ b/data/vim/patches/8.1.0495
@@ -0,0 +1,230 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0495
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0495
+Problem: :filter only supports some commands.
+Solution: Add :filter support for more commands. (Marcin Szamotulski,
+ closes #2856)
+Files: runtime/doc/various.txt, src/eval.c, src/mark.c, src/option.c,
+ src/syntax.c, src/testdir/test_filter_cmd.vim, src/userfunc.c
+
+
+*** ../vim-8.1.0494/runtime/doc/various.txt 2018-07-29 16:09:14.628945654 +0200
+--- runtime/doc/various.txt 2018-10-25 13:27:43.431646937 +0200
+***************
+*** 565,571 ****
+ The pattern is matched against the relevant part of
+ the output, not necessarily the whole line. Only some
+ commands support filtering, try it out to check if it
+! works.
+
+ Only normal messages are filtered, error messages are
+ not.
+--- 565,582 ----
+ The pattern is matched against the relevant part of
+ the output, not necessarily the whole line. Only some
+ commands support filtering, try it out to check if it
+! works. Some of the commands that support filtering:
+! |:#| - filter whole line
+! |:command| - filter by command name
+! |:files| - filter by file name
+! |:highlight| - filter by highlight group
+! |:jumps| - filter by file name
+! |:let| - filter by variable name
+! |:list| - filter whole line
+! |:llist| - filter by file name or module name
+! |:oldfiles| - filter by file name
+! |:clist| - filter by file name or module name
+! |:set| - filter by variable name
+
+ Only normal messages are filtered, error messages are
+ not.
+*** ../vim-8.1.0494/src/eval.c 2018-10-25 12:30:52.274659868 +0200
+--- src/eval.c 2018-10-25 13:26:29.104208433 +0200
+***************
+*** 1425,1430 ****
+--- 1425,1431 ----
+ hashitem_T *hi;
+ dictitem_T *di;
+ int todo;
++ char_u buf[IOSIZE];
+
+ todo = (int)ht->ht_used;
+ for (hi = ht->ht_array; todo > 0 && !got_int; ++hi)
+***************
+*** 1433,1438 ****
+--- 1434,1446 ----
+ {
+ --todo;
+ di = HI2DI(hi);
++
++ // apply :filter /pat/ to variable name
++ vim_strncpy((char_u *) buf, prefix, IOSIZE - 1);
++ vim_strcat((char_u *) buf, di->di_key, IOSIZE);
++ if (message_filtered(buf))
++ continue;
++
+ if (empty || di->di_tv.v_type != VAR_STRING
+ || di->di_tv.vval.v_string != NULL)
+ list_one_var(di, prefix, first);
+*** ../vim-8.1.0494/src/mark.c 2018-07-08 17:57:30.571289935 +0200
+--- src/mark.c 2018-10-25 13:26:29.104208433 +0200
+***************
+*** 901,907 ****
+ if (curwin->w_jumplist[i].fmark.mark.lnum != 0)
+ {
+ name = fm_getname(&curwin->w_jumplist[i].fmark, 16);
+! if (name == NULL) /* file name not available */
+ continue;
+
+ msg_putchar('\n');
+--- 901,909 ----
+ if (curwin->w_jumplist[i].fmark.mark.lnum != 0)
+ {
+ name = fm_getname(&curwin->w_jumplist[i].fmark, 16);
+!
+! // apply :filter /pat/ or file name not available
+! if (name == NULL || message_filtered(name))
+ continue;
+
+ msg_putchar('\n');
+*** ../vim-8.1.0494/src/option.c 2018-10-15 22:51:46.744578471 +0200
+--- src/option.c 2018-10-25 13:26:29.108208403 +0200
+***************
+*** 10083,10088 ****
+--- 10083,10092 ----
+ item_count = 0;
+ for (p = &options[0]; p->fullname != NULL; p++)
+ {
++ // apply :filter /pat/
++ if (message_filtered((char_u *) p->fullname))
++ continue;
++
+ varp = NULL;
+ isterm = istermoption(p);
+ if (opt_flags != 0)
+*** ../vim-8.1.0494/src/syntax.c 2018-09-30 21:43:17.207693209 +0200
+--- src/syntax.c 2018-10-25 13:30:08.094554329 +0200
+***************
+*** 352,358 ****
+
+ /*
+ * A state stack is an array of integers or stateitem_T, stored in a
+! * garray_T. A state stack is invalid if it's itemsize entry is zero.
+ */
+ #define INVALID_STATE(ssp) ((ssp)->ga_itemsize == 0)
+ #define VALID_STATE(ssp) ((ssp)->ga_itemsize != 0)
+--- 352,358 ----
+
+ /*
+ * A state stack is an array of integers or stateitem_T, stored in a
+! * garray_T. A state stack is invalid if its itemsize entry is zero.
+ */
+ #define INVALID_STATE(ssp) ((ssp)->ga_itemsize == 0)
+ #define VALID_STATE(ssp) ((ssp)->ga_itemsize != 0)
+***************
+*** 9189,9195 ****
+ struct hl_group *sgp;
+ int didh = FALSE;
+
+! sgp = &HL_TABLE()[id - 1]; /* index is ID minus one */
+
+ didh = highlight_list_arg(id, didh, LIST_ATTR,
+ sgp->sg_term, NULL, "term");
+--- 9189,9198 ----
+ struct hl_group *sgp;
+ int didh = FALSE;
+
+! sgp = &HL_TABLE()[id - 1]; // index is ID minus one
+!
+! if (message_filtered(sgp->sg_name))
+! return;
+
+ didh = highlight_list_arg(id, didh, LIST_ATTR,
+ sgp->sg_term, NULL, "term");
+*** ../vim-8.1.0494/src/testdir/test_filter_cmd.vim 2018-10-09 21:49:30.447622031 +0200
+--- src/testdir/test_filter_cmd.vim 2018-10-25 13:29:23.066894384 +0200
+***************
+*** 87,89 ****
+--- 87,129 ----
+ call assert_equal('a|b', out)
+ set shelltemp&
+ endfunction
++
++ func Test_filter_commands()
++ let g:test_filter_a = 1
++ let b:test_filter_b = 2
++ let test_filter_c = 3
++
++ " Test filtering :let command
++ let res = split(execute("filter /^test_filter/ let"), "\n")
++ call assert_equal(["test_filter_a #1"], res)
++
++ let res = split(execute("filter /\\v^(b:)?test_filter/ let"), "\n")
++ call assert_equal(["test_filter_a #1", "b:test_filter_b #2"], res)
++
++ unlet g:test_filter_a
++ unlet b:test_filter_b
++ unlet test_filter_c
++
++ " Test filtering :set command
++ let res = join(split(execute("filter /^help/ set"), "\n")[1:], " ")
++ call assert_match('^\s*helplang=\w*$', res)
++
++ " Test filtering :llist command
++ call setloclist(0, [{"filename": "/path/vim.c"}, {"filename": "/path/vim.h"}, {"module": "Main.Test"}])
++ let res = split(execute("filter /\\.c$/ llist"), "\n")
++ call assert_equal([" 1 /path/vim.c: "], res)
++
++ let res = split(execute("filter /\\.Test$/ llist"), "\n")
++ call assert_equal([" 3 Main.Test: "], res)
++
++ " Test filtering :jump command
++ e file.c
++ e file.h
++ e file.hs
++ let res = split(execute("filter /\.c$/ jumps"), "\n")[1:]
++ call assert_equal([" 2 1 0 file.c", ">"], res)
++
++ bwipe file.c
++ bwipe file.h
++ bwipe file.hs
++ endfunc
+*** ../vim-8.1.0494/src/userfunc.c 2018-10-14 21:40:57.352848455 +0200
+--- src/userfunc.c 2018-10-25 13:26:29.108208403 +0200
+***************
+*** 1882,1887 ****
+--- 1882,1889 ----
+ {
+ --todo;
+ fp = HI2UF(hi);
++ if (message_filtered(fp->uf_name))
++ continue;
+ if (!func_name_refcount(fp->uf_name))
+ list_func_head(fp, FALSE);
+ }
+*** ../vim-8.1.0494/src/version.c 2018-10-25 13:11:13.111143297 +0200
+--- src/version.c 2018-10-25 13:27:11.279889812 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 495,
+ /**/
+
+--
+ARTHUR: This new learning amazes me, Sir Bedevere. Explain again how sheep's
+ bladders may be employed to prevent earthquakes.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0496 b/data/vim/patches/8.1.0496
new file mode 100644
index 000000000..3ae265688
--- /dev/null
+++ b/data/vim/patches/8.1.0496
@@ -0,0 +1,413 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0496
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0496
+Problem: No tests for indent files.
+Solution: Add a mechanism for running indent file tests. Add a first test
+ for Vim indenting.
+Files: runtime/indent/Makefile, runtime/indent/testdir/runtest.vim,
+ runtime/indent/testdir/cleantest.vim, runtime/indent/README.txt,
+ runtime/indent/testdir/README.txt, runtime/indent/testdir/vim.in,
+ runtime/indent/testdir/vim.ok, Filelist
+
+
+*** ../vim-8.1.0495/runtime/indent/Makefile 2018-10-25 16:50:51.432794651 +0200
+--- runtime/indent/Makefile 2018-10-25 15:09:00.266824902 +0200
+***************
+*** 0 ****
+--- 1,13 ----
++ # Portable Makefile for running indent tests.
++
++ VIM = vim
++
++ # Run the tests that didn't run yet or failed previously.
++ # If a test succeeds a testdir/*.out file will be written.
++ # If a test fails a testdir/*.fail file will be written.
++ test:
++ $(VIM) --not-a-term -u testdir/runtest.vim
++
++
++ clean:
++ $(VIM) --not-a-term -u testdir/cleantest.vim
+*** ../vim-8.1.0495/runtime/indent/testdir/runtest.vim 1970-01-01 01:00:00.000000000 +0100
+--- runtime/indent/testdir/runtest.vim 2018-10-25 16:46:35.694821475 +0200
+***************
+*** 0 ****
+--- 1,117 ----
++ " Runs all the indent tests for which there is no .out file
++
++ set nocp
++ filetype indent on
++ set nowrapscan
++
++ au! SwapExists * call HandleSwapExists()
++ func HandleSwapExists()
++ " Ignore finding a swap file for the test input and output, the user might be
++ " editing them and that's OK.
++ if expand('<afile>') =~ '.*\.\(in\|out\|fail\|ok\)'
++ let v:swapchoice = 'e'
++ endif
++ endfunc
++
++ for fname in glob('testdir/*.in', 1, 1)
++ let root = substitute(fname, '\.in', '', '')
++
++ " Execute the test if the .out file does not exist of when the .in file is
++ " newer.
++ let in_time = getftime(fname)
++ let out_time = getftime(root . '.out')
++ if out_time < 0 || in_time > out_time
++ call delete(root . '.fail')
++ call delete(root . '.out')
++
++ set sw& ts& filetype=
++ exe 'split ' . fname
++
++ let did_some = 0
++ let failed = 0
++ let end = 1
++ while 1
++ " Indent all the lines between "START_INDENT" and "END_INDENT"
++ exe end
++ let start = search('\<START_INDENT\>')
++ let end = search('\<END_INDENT\>')
++ if start <= 0 || end <= 0 || end <= start
++ if did_some == 0
++ call append(0, 'ERROR: START_INDENT and/or END_INDENT not found')
++ let failed = 1
++ endif
++ break
++ else
++ let did_some = 1
++
++ " Execute all commands marked with INDENT_EXE and find any pattern.
++ let lnum = start
++ let pattern = ''
++ let at = ''
++ while 1
++ exe lnum + 1
++ let lnum_exe = search('\<INDENT_EXE\>')
++ exe lnum + 1
++ let indent_at = search('\<INDENT_\(AT\|NEXT\|PREV\)\>')
++ if lnum_exe > 0 && lnum_exe < end && (indent_at <= 0 || lnum_exe < indent_at)
++ exe substitute(getline(lnum_exe), '.*INDENT_EXE', '', '')
++ let lnum = lnum_exe
++ let start = lnum
++ elseif indent_at > 0 && indent_at < end
++ if pattern != ''
++ call append(indent_at, 'ERROR: duplicate pattern')
++ let failed = 1
++ break
++ endif
++ let text = getline(indent_at)
++ let pattern = substitute(text, '.*INDENT_\S*\s*', '', '')
++ let at = substitute(text, '.*INDENT_\(\S*\).*', '\1', '')
++ let lnum = indent_at
++ let start = lnum
++ else
++ break
++ endif
++ endwhile
++
++ exe start + 1
++ if pattern == ''
++ exe 'normal =' . (end - 1) . 'G'
++ else
++ let lnum = search(pattern)
++ if lnum <= 0
++ call append(indent_at, 'ERROR: pattern not found: ' . pattern)
++ let failed = 1
++ break
++ endif
++ if at == 'AT'
++ exe lnum
++ elseif at == 'NEXT'
++ exe lnum + 1
++ else
++ exe lnum - 1
++ endif
++ normal ==
++ endif
++ endif
++ endwhile
++
++ if !failed
++ " Check the resulting text equals the .ok file.
++ if getline(1, '$') != readfile(root . '.ok')
++ let failed = 1
++ endif
++ endif
++
++ if failed
++ exe 'write ' . root . '.fail'
++ echoerr 'Test ' . fname . ' FAILED!'
++ sleep 2
++ else
++ exe 'write ' . root . '.out'
++ endif
++
++ quit! " close the indented file
++ endif
++ endfor
++
++ qall!
+*** ../vim-8.1.0495/runtime/indent/testdir/cleantest.vim 1970-01-01 01:00:00.000000000 +0100
+--- runtime/indent/testdir/cleantest.vim 2018-10-25 14:30:08.074821926 +0200
+***************
+*** 0 ****
+--- 1,6 ----
++ " Deletes all the test output files: *.fail and *.out
++ for fname in glob('testdir/*.out', 1, 1) + glob('testdir/*.fail', 1, 1)
++ call delete(fname)
++ endfor
++
++ quit
+*** ../vim-8.1.0495/runtime/indent/README.txt 2010-05-15 13:03:29.000000000 +0200
+--- runtime/indent/README.txt 2018-10-25 16:42:14.648927510 +0200
+***************
+*** 43,45 ****
+--- 43,47 ----
+ The user may have several options set unlike you, try to write the file such
+ that it works with any option settings. Also be aware of certain features not
+ being compiled in.
++
++ To test the indent file, see testdir/README.txt.
+*** ../vim-8.1.0495/runtime/indent/testdir/README.txt 1970-01-01 01:00:00.000000000 +0100
+--- runtime/indent/testdir/README.txt 2018-10-25 16:43:55.332109491 +0200
+***************
+*** 0 ****
+--- 1,92 ----
++ TESTING INDENT SCRIPTS
++
++ We'll use FILETYPE for the filetype name here.
++
++
++ FORMAT OF THE FILETYPE.IN FILE
++
++ First of all, create a FILETYPE.in file. It should contain:
++
++ - A modeline setting the 'filetype' and any other option values.
++ This must work like a comment for FILETYPE. E.g. for vim:
++ " vim: set ft=vim sw=4 :
++
++ - At least one block of lines to indent, prefixed with START_INDENT and
++ followed by END_INDENT. These lines must also look like a comment for your
++ FILETYPE. You would normally leave out all indent, so that the effect of
++ the indent command results in adding indent. Example:
++
++ " START_INDENT
++ func Some()
++ let x = 1
++ endfunc
++ " END_INDENT
++
++ - Optionally, a line with INDENT_EXE, followed by a Vim command. This will be
++ executed before indenting the lines. Example:
++
++ " START_INDENT
++ " INDENT_EXE let g:vim_indent_cont = 6
++ let cmd =
++ \ 'some '
++ \ 'string'
++ " END_INDENT
++
++ Note that the command is not undone, you may need to reverse the effect for
++ the next block of lines.
++
++ - Alternatively to indenting all the lines between START_INDENT and
++ END_INDENT, use a INDENT_AT line, which specifies a pattern to find the line
++ to indent. Example:
++
++ " START_INDENT
++ " INDENT_AT this-line
++ func Some()
++ let f = x " this-line
++ endfunc
++ " END_INDENT
++
++ Alternatively you can use INDENT_NEXT to indent the line below the matching
++ pattern:
++
++ " START_INDENT
++ " INDENT_NEXT next-line
++ func Some()
++ " next-line
++ let f = x
++ endfunc
++ " END_INDENT
++
++ Or use INDENT_PREV to indent the line above the matching pattern:
++
++ " START_INDENT
++ " INDENT_PREV prev-line
++ func Some()
++ let f = x
++ " prev-line
++ endfunc
++ " END_INDENT
++
++ It's best to keep the whole file valid for FILETYPE, so that syntax
++ highlighting works normally, and any indenting that depends on the syntax
++ highlighting also works.
++
++
++ RUNNING THE TEST
++
++ Before running the test, create a FILETYPE.ok file. You can leave it empty at
++ first.
++
++ Now run "make test". After Vim has done the indenting you will see a
++ FILETYPE.fail file. This contains the actual result of indenting, and it's
++ different from the FILETYPE.ok file.
++
++ Check the contents of the FILETYPE.fail file. If it is perfectly OK, then
++ rename it to overwrite the FILETYPE.ok file. If you now run "make test" again,
++ the test will pass and create a FILETYPE.out file, which is identical to the
++ FILETYPE.ok file.
++
++ If you try to run "make test" again you will notice that nothing happens,
++ because the FILETYPE.out file already exists. Delete it, or do "make clean",
++ so that the text runs again. If you edit the FILETYPE.in file, so that it's
++ newer than the FILETYPE.out file, the test will also run.
+*** ../vim-8.1.0495/runtime/indent/testdir/vim.in 1970-01-01 01:00:00.000000000 +0100
+--- runtime/indent/testdir/vim.in 2018-10-25 16:47:11.262537836 +0200
+***************
+*** 0 ****
+--- 1,46 ----
++ " vim: set ft=vim sw=4 :
++
++ " START_INDENT
++
++ func Some()
++ let x = 1
++ endfunc
++
++ let cmd =
++ \ 'some '
++ \ 'string'
++
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_EXE let g:vim_indent_cont = 6
++
++ let cmd =
++ \ 'some '
++ \ 'string'
++
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_EXE unlet g:vim_indent_cont
++ " INDENT_AT this-line
++ func Some()
++ let f = x " this-line
++ endfunc
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_NEXT next-line
++ func Some()
++ " next-line
++ let f = x
++ endfunc
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_PREV prev-line
++ func Some()
++ let f = x
++ " prev-line
++ endfunc
++ " END_INDENT
+*** ../vim-8.1.0495/runtime/indent/testdir/vim.ok 1970-01-01 01:00:00.000000000 +0100
+--- runtime/indent/testdir/vim.ok 2018-10-25 16:45:29.103354381 +0200
+***************
+*** 0 ****
+--- 1,46 ----
++ " vim: set ft=vim sw=4 :
++
++ " START_INDENT
++
++ func Some()
++ let x = 1
++ endfunc
++
++ let cmd =
++ \ 'some '
++ \ 'string'
++
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_EXE let g:vim_indent_cont = 6
++
++ let cmd =
++ \ 'some '
++ \ 'string'
++
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_EXE unlet g:vim_indent_cont
++ " INDENT_AT this-line
++ func Some()
++ let f = x " this-line
++ endfunc
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_NEXT next-line
++ func Some()
++ " next-line
++ let f = x
++ endfunc
++ " END_INDENT
++
++ " START_INDENT
++ " INDENT_PREV prev-line
++ func Some()
++ let f = x
++ " prev-line
++ endfunc
++ " END_INDENT
+*** ../vim-8.1.0495/Filelist 2018-09-19 22:00:26.150988737 +0200
+--- Filelist 2018-10-25 15:16:32.851409638 +0200
+***************
+*** 691,696 ****
+--- 691,701 ----
+ runtime/compiler/README.txt \
+ runtime/indent/*.vim \
+ runtime/indent/README.txt \
++ runtime/indent/Makefile \
++ runtime/indent/testdir/README.txt \
++ runtime/indent/testdir/*.vim \
++ runtime/indent/testdir/*.in \
++ runtime/indent/testdir/*.ok \
+ runtime/ftplugin/*.vim \
+ runtime/ftplugin/logtalk.dict \
+ runtime/ftplugin/README.txt \
+*** ../vim-8.1.0495/src/version.c 2018-10-25 13:31:33.833906872 +0200
+--- src/version.c 2018-10-25 16:50:35.800917806 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 496,
+ /**/
+
+--
+God made the integers; all else is the work of Man.
+ -- Kronecker
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0497 b/data/vim/patches/8.1.0497
new file mode 100644
index 000000000..f66c45d18
--- /dev/null
+++ b/data/vim/patches/8.1.0497
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0497
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0497
+Problem: :%diffput changes order of lines. (Markus Braun)
+Solution: Do adjust marks when using internal diff.
+Files: src/diff.c, src/testdir/test_diffmode.vim
+
+
+*** ../vim-8.1.0496/src/diff.c 2018-10-07 17:46:37.699826982 +0200
+--- src/diff.c 2018-10-25 17:47:12.981125946 +0200
+***************
+*** 298,306 ****
+ // Will update diffs before redrawing. Set _invalid to update the
+ // diffs themselves, set _update to also update folds properly just
+ // before redrawing.
+ tp->tp_diff_invalid = TRUE;
+ tp->tp_diff_update = TRUE;
+- return;
+ }
+
+ if (line2 == MAXLNUM)
+--- 298,306 ----
+ // Will update diffs before redrawing. Set _invalid to update the
+ // diffs themselves, set _update to also update folds properly just
+ // before redrawing.
++ // Do update marks here, it is needed for :%diffput.
+ tp->tp_diff_invalid = TRUE;
+ tp->tp_diff_update = TRUE;
+ }
+
+ if (line2 == MAXLNUM)
+***************
+*** 2850,2856 ****
+ if (diff_need_update)
+ ex_diffupdate(NULL);
+
+! // Check that the cursor is on a valid character and update it's
+ // position. When there were filler lines the topline has become
+ // invalid.
+ check_cursor();
+--- 2850,2856 ----
+ if (diff_need_update)
+ ex_diffupdate(NULL);
+
+! // Check that the cursor is on a valid character and update its
+ // position. When there were filler lines the topline has become
+ // invalid.
+ check_cursor();
+*** ../vim-8.1.0496/src/testdir/test_diffmode.vim 2018-10-07 17:46:37.699826982 +0200
+--- src/testdir/test_diffmode.vim 2018-10-25 17:46:52.781302610 +0200
+***************
+*** 221,226 ****
+--- 221,246 ----
+ %bwipe!
+ endfunc
+
++ " Test putting two changes from one buffer to another
++ func Test_diffput_two()
++ new a
++ let win_a = win_getid()
++ call setline(1, range(1, 10))
++ diffthis
++ new b
++ let win_b = win_getid()
++ call setline(1, range(1, 10))
++ 8del
++ 5del
++ diffthis
++ call win_gotoid(win_a)
++ %diffput
++ call win_gotoid(win_b)
++ call assert_equal(map(range(1, 10), 'string(v:val)'), getline(1, '$'))
++ bwipe! a
++ bwipe! b
++ endfunc
++
+ func Test_dp_do_buffer()
+ e! one
+ let bn1=bufnr('%')
+*** ../vim-8.1.0496/src/version.c 2018-10-25 16:52:46.839887739 +0200
+--- src/version.c 2018-10-25 17:44:41.714462680 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 497,
+ /**/
+
+--
+This sentence is not sure that it exists, but if it does, it will
+certainly consider the possibility that other sentences exist.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0498 b/data/vim/patches/8.1.0498
new file mode 100644
index 000000000..00c2f2abf
--- /dev/null
+++ b/data/vim/patches/8.1.0498
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0498
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0498
+Problem: /etc/gitconfig not recognized at a gitconfig file.
+Solution: Add pattern to filetype detection. (closes #3568)
+Files: runtime/filetype.vim, src/testdir/test_filetype.vim
+
+
+*** ../vim-8.1.0497/runtime/filetype.vim 2018-10-19 16:26:39.964404727 +0200
+--- runtime/filetype.vim 2018-10-27 14:26:14.136268087 +0200
+***************
+*** 613,624 ****
+ au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
+
+ " Git
+! au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
+! au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
+! au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
+! au BufNewFile,BufRead */.config/git/config setf gitconfig
+ if !empty($XDG_CONFIG_HOME)
+! au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
+ endif
+ au BufNewFile,BufRead git-rebase-todo setf gitrebase
+ au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
+--- 613,624 ----
+ au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
+
+ " Git
+! au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
+! au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
+! au BufNewFile,BufRead */.config/git/config setf gitconfig
+! au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
+ if !empty($XDG_CONFIG_HOME)
+! au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
+ endif
+ au BufNewFile,BufRead git-rebase-todo setf gitrebase
+ au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
+*** ../vim-8.1.0497/src/testdir/test_filetype.vim 2018-10-19 16:26:39.964404727 +0200
+--- src/testdir/test_filetype.vim 2018-10-27 14:23:20.673594496 +0200
+***************
+*** 171,177 ****
+ \ 'gdmo': ['file.mo', 'file.gdmo'],
+ \ 'gedcom': ['file.ged', 'lltxxxxx.txt'],
+ \ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
+! \ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config'],
+ \ 'gitolite': ['gitolite.conf'],
+ \ 'gitrebase': ['git-rebase-todo'],
+ \ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
+--- 171,177 ----
+ \ 'gdmo': ['file.mo', 'file.gdmo'],
+ \ 'gedcom': ['file.ged', 'lltxxxxx.txt'],
+ \ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
+! \ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig'],
+ \ 'gitolite': ['gitolite.conf'],
+ \ 'gitrebase': ['git-rebase-todo'],
+ \ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
+*** ../vim-8.1.0497/src/version.c 2018-10-25 17:52:20.386489835 +0200
+--- src/version.c 2018-10-27 14:24:46.564935840 +0200
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 498,
+ /**/
+
+--
+"Time flies like an arrow". So I put an arrow on my desk, now
+awaiting one of these time flies showing up.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0499 b/data/vim/patches/8.1.0499
new file mode 100644
index 000000000..4c7ee4692
--- /dev/null
+++ b/data/vim/patches/8.1.0499
@@ -0,0 +1,149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0499
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0499
+Problem: :2vimgrep causes an ml_get error
+Solution: Pass tomatch pointer instead of value. (Yegappan Lakshmanan)
+Files: src/ex_getln.c, src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0498/src/ex_getln.c 2018-09-30 21:43:17.187693348 +0200
+--- src/ex_getln.c 2018-10-28 14:27:29.009350706 +0100
+***************
+*** 483,488 ****
+--- 483,494 ----
+ if (search_first_line == 0)
+ // start at the original cursor position
+ curwin->w_cursor = is_state->search_start;
++ else if (search_first_line > curbuf->b_ml.ml_line_count)
++ {
++ // start after the last line
++ curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
++ curwin->w_cursor.col = MAXCOL;
++ }
+ else
+ {
+ // start at the first line in the range
+*** ../vim-8.1.0498/src/quickfix.c 2018-10-21 18:47:39.622613657 +0200
+--- src/quickfix.c 2018-10-28 14:22:29.387620432 +0100
+***************
+*** 5217,5223 ****
+ char_u *fname,
+ buf_T *buf,
+ regmmatch_T *regmatch,
+! long tomatch,
+ int duplicate_name,
+ int flags)
+ {
+--- 5217,5223 ----
+ char_u *fname,
+ buf_T *buf,
+ regmmatch_T *regmatch,
+! long *tomatch,
+ int duplicate_name,
+ int flags)
+ {
+***************
+*** 5225,5231 ****
+ long lnum;
+ colnr_T col;
+
+! for (lnum = 1; lnum <= buf->b_ml.ml_line_count && tomatch > 0; ++lnum)
+ {
+ col = 0;
+ while (vim_regexec_multi(regmatch, curwin, buf, lnum,
+--- 5225,5231 ----
+ long lnum;
+ colnr_T col;
+
+! for (lnum = 1; lnum <= buf->b_ml.ml_line_count && *tomatch > 0; ++lnum)
+ {
+ col = 0;
+ while (vim_regexec_multi(regmatch, curwin, buf, lnum,
+***************
+*** 5255,5261 ****
+ break;
+ }
+ found_match = TRUE;
+! if (--tomatch == 0)
+ break;
+ if ((flags & VGR_GLOBAL) == 0
+ || regmatch->endpos[0].lnum > 0)
+--- 5255,5261 ----
+ break;
+ }
+ found_match = TRUE;
+! if (--*tomatch == 0)
+ break;
+ if ((flags & VGR_GLOBAL) == 0
+ || regmatch->endpos[0].lnum > 0)
+***************
+*** 5464,5470 ****
+ // Try for a match in all lines of the buffer.
+ // For ":1vimgrep" look for first match only.
+ found_match = vgr_match_buflines(qi, fname, buf, &regmatch,
+! tomatch, duplicate_name, flags);
+
+ if (using_dummy)
+ {
+--- 5464,5470 ----
+ // Try for a match in all lines of the buffer.
+ // For ":1vimgrep" look for first match only.
+ found_match = vgr_match_buflines(qi, fname, buf, &regmatch,
+! &tomatch, duplicate_name, flags);
+
+ if (using_dummy)
+ {
+*** ../vim-8.1.0498/src/testdir/test_quickfix.vim 2018-10-21 18:47:39.622613657 +0200
+--- src/testdir/test_quickfix.vim 2018-10-28 14:20:59.812305616 +0100
+***************
+*** 2364,2369 ****
+--- 2364,2384 ----
+ call XvimgrepTests('l')
+ endfunc
+
++ " Test for incsearch highlighting of the :vimgrep pattern
++ " This test used to cause "E315: ml_get: invalid lnum" errors.
++ func Test_vimgrep_incsearch()
++ enew
++ set incsearch
++ call test_override("char_avail", 1)
++
++ call feedkeys(":2vimgrep assert test_quickfix.vim test_cdo.vim\<CR>", "ntx")
++ let l = getqflist()
++ call assert_equal(2, len(l))
++
++ call test_override("ALL", 0)
++ set noincsearch
++ endfunc
++
+ func XfreeTests(cchar)
+ call s:setup_commands(a:cchar)
+
+*** ../vim-8.1.0498/src/version.c 2018-10-27 14:27:17.539786667 +0200
+--- src/version.c 2018-10-28 14:22:20.871685414 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 499,
+ /**/
+
+--
+ Bravely bold Sir Robin, rode forth from Camelot,
+ He was not afraid to die, Oh Brave Sir Robin,
+ He was not at all afraid to be killed in nasty ways
+ Brave, brave, brave, brave Sir Robin.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0500 b/data/vim/patches/8.1.0500
new file mode 100644
index 000000000..2fb231da9
--- /dev/null
+++ b/data/vim/patches/8.1.0500
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0500
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0500
+Problem: Cleaning up in src/tee may not always work.
+Solution: Use "rm" when appropriate. (Michael Soyka, closes #3571)
+Files: src/tee/Makefile
+
+
+*** ../vim-8.1.0499/src/tee/Makefile 2018-10-17 22:45:51.167602173 +0200
+--- src/tee/Makefile 2018-10-28 15:39:22.597604713 +0100
+***************
+*** 3,8 ****
+--- 3,14 ----
+ CC=gcc
+ CFLAGS=-O2 -fno-strength-reduce
+
++ ifneq (sh.exe, $(SHELL))
++ DEL = rm
++ else
++ DEL = del
++ endif
++
+ tee.exe: tee.o
+ $(CC) $(CFLAGS) -s -o $@ $<
+
+***************
+*** 10,15 ****
+ $(CC) $(CFLAGS) -c $<
+
+ clean:
+! - del tee.o
+! - del tee.exe
+
+--- 16,21 ----
+ $(CC) $(CFLAGS) -c $<
+
+ clean:
+! - $(DEL) tee.o
+! - $(DEL) tee.exe
+
+*** ../vim-8.1.0499/src/version.c 2018-10-28 14:36:04.222247691 +0100
+--- src/version.c 2018-10-28 15:42:12.040813500 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 500,
+ /**/
+
+--
+The software said it requires Windows 95 or better, so I installed Linux.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0501 b/data/vim/patches/8.1.0501
new file mode 100644
index 000000000..9dbbded49
--- /dev/null
+++ b/data/vim/patches/8.1.0501
@@ -0,0 +1,54 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0501
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0501
+Problem: Cppcheck warns for using array index before bounds check.
+Solution: Swap the conditions. (Dominique Pelle)
+Files: src/memline.c
+
+
+*** ../vim-8.1.0500/src/memline.c 2018-10-13 19:06:23.502240830 +0200
+--- src/memline.c 2018-10-30 22:09:37.994123602 +0100
+***************
+*** 5029,5036 ****
+ curline += buf->b_ml.ml_chunksize[curix].mlcs_numlines;
+ }
+ }
+! else if (line >= curline + buf->b_ml.ml_chunksize[curix].mlcs_numlines
+! && curix < buf->b_ml.ml_usedchunks - 1)
+ {
+ /* Adjust cached curix & curline */
+ curline += buf->b_ml.ml_chunksize[curix].mlcs_numlines;
+--- 5029,5036 ----
+ curline += buf->b_ml.ml_chunksize[curix].mlcs_numlines;
+ }
+ }
+! else if (curix < buf->b_ml.ml_usedchunks - 1
+! && line >= curline + buf->b_ml.ml_chunksize[curix].mlcs_numlines)
+ {
+ /* Adjust cached curix & curline */
+ curline += buf->b_ml.ml_chunksize[curix].mlcs_numlines;
+*** ../vim-8.1.0500/src/version.c 2018-10-28 15:43:54.248419267 +0100
+--- src/version.c 2018-10-30 22:10:34.545673410 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 501,
+ /**/
+
+--
+Facepalm reply #9: "Speed up, you can drive 80 here" "Why, the cars behind us
+are also driving 60"
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0502 b/data/vim/patches/8.1.0502
new file mode 100644
index 000000000..916bae4b4
--- /dev/null
+++ b/data/vim/patches/8.1.0502
@@ -0,0 +1,111 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0502
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0502
+Problem: Internal diff fails when diffing a context diff. (Hirohito Higashi)
+Solution: Only use callback calls with one line. (closes #3581)
+Files: src/diff.c, src/testdir/dumps/Test_diff_of_diff_01.dump
+
+
+*** ../vim-8.1.0501/src/diff.c 2018-10-25 17:52:20.386489835 +0200
+--- src/diff.c 2018-10-31 22:50:08.320453518 +0100
+***************
+*** 3206,3226 ****
+ xdiff_out(void *priv, mmbuffer_t *mb, int nbuf)
+ {
+ diffout_T *dout = (diffout_T *)priv;
+- int i;
+ char_u *p;
+
+! for (i = 0; i < nbuf; i++)
+! {
+! // We are only interested in the header lines, skip text lines.
+! if (STRNCMP(mb[i].ptr, "@@ ", 3) != 0)
+! continue;
+! if (ga_grow(&dout->dout_ga, 1) == FAIL)
+! return -1;
+! p = vim_strnsave((char_u *)mb[i].ptr, mb[i].size);
+! if (p == NULL)
+! return -1;
+! ((char_u **)dout->dout_ga.ga_data)[dout->dout_ga.ga_len++] = p;
+! }
+ return 0;
+ }
+
+--- 3206,3228 ----
+ xdiff_out(void *priv, mmbuffer_t *mb, int nbuf)
+ {
+ diffout_T *dout = (diffout_T *)priv;
+ char_u *p;
+
+! // The header line always comes by itself, text lines in at least two
+! // parts. We drop the text part.
+! if (nbuf > 1)
+! return 0;
+!
+! // sanity check
+! if (STRNCMP(mb[0].ptr, "@@ ", 3) != 0)
+! return 0;
+!
+! if (ga_grow(&dout->dout_ga, 1) == FAIL)
+! return -1;
+! p = vim_strnsave((char_u *)mb[0].ptr, mb[0].size);
+! if (p == NULL)
+! return -1;
+! ((char_u **)dout->dout_ga.ga_data)[dout->dout_ga.ga_len++] = p;
+ return 0;
+ }
+
+*** ../vim-8.1.0501/src/testdir/dumps/Test_diff_of_diff_01.dump 2018-10-31 22:56:45.057204778 +0100
+--- src/testdir/dumps/Test_diff_of_diff_01.dump 2018-10-31 22:50:13.168413846 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32||+1&&| +0#0000e05#a8a8a8255@1>a+0#0000000#ffffff0@1| @32
++ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0@1| @32||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0@1| @32
++ | +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|@+0#0000000#5fd7ff255@1| |-|3|,|2| |+|5|,|7| |@@1| @19
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255@1| @32
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|e+0#0000000#5fd7ff255@1| @32
++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|f+0#0000000#5fd7ff255@1| @32
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
++ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
++ | +0&&@74
+*** ../vim-8.1.0501/src/version.c 2018-10-30 22:15:51.591158966 +0100
+--- src/version.c 2018-10-31 22:52:09.667460292 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 502,
+ /**/
+
+--
+DINGO: You must spank her well and after you have spanked her you
+ may deal with her as you like and then ... spank me.
+AMAZING: And spank me!
+STUNNER: And me.
+LOVELY: And me.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0503 b/data/vim/patches/8.1.0503
new file mode 100644
index 000000000..e87e6d32b
--- /dev/null
+++ b/data/vim/patches/8.1.0503
@@ -0,0 +1,61 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0503
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0503
+Problem: Missing change to diff test. (Hirohito Higashi)
+Solution: Add the missing test function.
+Files: src/testdir/test_diffmode.vim
+
+
+*** ../vim-8.1.0502/src/testdir/test_diffmode.vim 2018-10-25 17:52:20.386489835 +0200
+--- src/testdir/test_diffmode.vim 2018-10-31 22:47:48.081600686 +0100
+***************
+*** 885,887 ****
+--- 885,907 ----
+ call StopVimInTerminal(buf)
+ call delete('Xtest_diff_cursorline')
+ endfunc
++
++ func Test_diff_of_diff()
++ if !CanRunVimInTerminal()
++ return
++ endif
++
++ call writefile([
++ \ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])',
++ \ 'vnew',
++ \ 'call setline(1, ["aa","bb","cc"])',
++ \ 'windo diffthis',
++ \ ], 'Xtest_diff_diff')
++ let buf = RunVimInTerminal('-S Xtest_diff_diff', {})
++
++ call VerifyScreenDump(buf, 'Test_diff_of_diff_01', {})
++
++ " clean up
++ call StopVimInTerminal(buf)
++ call delete('Xtest_diff_diff')
++ endfunc
+*** ../vim-8.1.0502/src/version.c 2018-10-31 22:57:07.913017514 +0100
+--- src/version.c 2018-11-01 21:13:52.394235270 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 503,
+ /**/
+
+--
+"My particular problem is with registry entries, which seem to just
+accumulate like plastic coffee cups..." -- Paul Moore
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0504 b/data/vim/patches/8.1.0504
new file mode 100644
index 000000000..452ba1fa4
--- /dev/null
+++ b/data/vim/patches/8.1.0504
@@ -0,0 +1,112 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0504
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0504
+Problem: When CTRL-C is mapped it triggers InsertLeave.
+Solution: Make CTRL-C behave the same way when typed or used in a mapping.
+Files: src/edit.c, src/testdir/test_edit.vim
+
+
+*** ../vim-8.1.0503/src/edit.c 2018-09-30 21:43:17.179693404 +0200
+--- src/edit.c 2018-11-02 11:58:53.235548305 +0100
+***************
+*** 1048,1054 ****
+
+ if (ins_esc(&count, cmdchar, nomove))
+ {
+! if (cmdchar != 'r' && cmdchar != 'v')
+ ins_apply_autocmds(EVENT_INSERTLEAVE);
+ did_cursorhold = FALSE;
+ return (c == Ctrl_O);
+--- 1048,1057 ----
+
+ if (ins_esc(&count, cmdchar, nomove))
+ {
+! // When CTRL-C was typed got_int will be set, with the result
+! // that the autocommands won't be executed. When mapped got_int
+! // is not set, but let's keep the behavior the same.
+! if (cmdchar != 'r' && cmdchar != 'v' && c != Ctrl_C)
+ ins_apply_autocmds(EVENT_INSERTLEAVE);
+ did_cursorhold = FALSE;
+ return (c == Ctrl_O);
+***************
+*** 2408,2414 ****
+ int
+ vim_is_ctrl_x_key(int c)
+ {
+! /* Always allow ^R - let it's results then be checked */
+ if (c == Ctrl_R)
+ return TRUE;
+
+--- 2411,2417 ----
+ int
+ vim_is_ctrl_x_key(int c)
+ {
+! // Always allow ^R - let its results then be checked
+ if (c == Ctrl_R)
+ return TRUE;
+
+*** ../vim-8.1.0503/src/testdir/test_edit.vim 2018-07-28 17:07:48.608154066 +0200
+--- src/testdir/test_edit.vim 2018-11-02 11:50:34.466489066 +0100
+***************
+*** 1409,1411 ****
+--- 1409,1441 ----
+ bwipe XAltFile
+ call delete('XAltFile')
+ endfunc
++
++ func Test_leave_insert_autocmd()
++ new
++ au InsertLeave * let g:did_au = 1
++ let g:did_au = 0
++ call feedkeys("afoo\<Esc>", 'tx')
++ call assert_equal(1, g:did_au)
++ call assert_equal('foo', getline(1))
++
++ let g:did_au = 0
++ call feedkeys("Sbar\<C-C>", 'tx')
++ call assert_equal(0, g:did_au)
++ call assert_equal('bar', getline(1))
++
++ inoremap x xx<Esc>
++ let g:did_au = 0
++ call feedkeys("Saax", 'tx')
++ call assert_equal(1, g:did_au)
++ call assert_equal('aaxx', getline(1))
++
++ inoremap x xx<C-C>
++ let g:did_au = 0
++ call feedkeys("Sbbx", 'tx')
++ call assert_equal(0, g:did_au)
++ call assert_equal('bbxx', getline(1))
++
++ bwipe!
++ au! InsertLeave
++ iunmap x
++ endfunc
+*** ../vim-8.1.0503/src/version.c 2018-11-01 21:14:50.541818034 +0100
+--- src/version.c 2018-11-02 11:51:43.970086497 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 504,
+ /**/
+
+--
+ARTHUR: Who are you?
+TALL KNIGHT: We are the Knights Who Say "Ni"!
+BEDEVERE: No! Not the Knights Who Say "Ni"!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0505 b/data/vim/patches/8.1.0505
new file mode 100644
index 000000000..7a727227e
--- /dev/null
+++ b/data/vim/patches/8.1.0505
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0505
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0505
+Problem: Filter command test may fail if helplang is not set.
+Solution: Set 'helplang' for the test. (James McCoy, closes #3591)
+Files: src/testdir/test_filter_cmd.vim
+
+
+*** ../vim-8.1.0504/src/testdir/test_filter_cmd.vim 2018-10-25 13:31:33.833906872 +0200
+--- src/testdir/test_filter_cmd.vim 2018-11-03 18:56:58.515794558 +0100
+***************
+*** 105,112 ****
+--- 105,115 ----
+ unlet test_filter_c
+
+ " Test filtering :set command
++ let helplang=&helplang
++ set helplang=en
+ let res = join(split(execute("filter /^help/ set"), "\n")[1:], " ")
+ call assert_match('^\s*helplang=\w*$', res)
++ let &helplang=helplang
+
+ " Test filtering :llist command
+ call setloclist(0, [{"filename": "/path/vim.c"}, {"filename": "/path/vim.h"}, {"module": "Main.Test"}])
+*** ../vim-8.1.0504/src/version.c 2018-11-02 11:59:11.555438565 +0100
+--- src/version.c 2018-11-03 18:59:04.366949054 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 505,
+ /**/
+
+--
+Luxury. We used to have to get out of the lake at three o'clock in the
+morning, clean the lake, eat a handful of hot gravel, go to work at the
+mill every day for tuppence a month, come home, and Dad would beat us
+around the head and neck with a broken bottle, if we were LUCKY!
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0506 b/data/vim/patches/8.1.0506
new file mode 100644
index 000000000..59ffe65cb
--- /dev/null
+++ b/data/vim/patches/8.1.0506
@@ -0,0 +1,58 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0506
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0506
+Problem: Modeline test fails when run by root.
+Solution: Set 'modeline' for the test. (James McCoy, closes #3592)
+Files: src/testdir/test_modeline.vim
+
+
+*** ../vim-8.1.0505/src/testdir/test_modeline.vim 2018-07-24 04:51:15.698271642 +0200
+--- src/testdir/test_modeline.vim 2018-11-03 19:05:48.120034025 +0100
+***************
+*** 1,9 ****
+ " Tests for parsing the modeline.
+
+ func Test_modeline_invalid()
+! " This was reading before allocated memory.
+ call writefile(['vi:0', 'nothing'], 'Xmodeline')
+ call assert_fails('split Xmodeline', 'E518:')
+ bwipe!
+ call delete('Xmodeline')
+ endfunc
+--- 1,12 ----
+ " Tests for parsing the modeline.
+
+ func Test_modeline_invalid()
+! " This was reading allocated memory in the past.
+ call writefile(['vi:0', 'nothing'], 'Xmodeline')
++ let modeline = &modeline
++ set modeline
+ call assert_fails('split Xmodeline', 'E518:')
++ let &modeline = modeline
+ bwipe!
+ call delete('Xmodeline')
+ endfunc
+*** ../vim-8.1.0505/src/version.c 2018-11-03 18:59:49.690644045 +0100
+--- src/version.c 2018-11-03 19:02:17.793624465 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 506,
+ /**/
+
+--
+Not too long ago, cut and paste was done with scissors and glue...
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0507 b/data/vim/patches/8.1.0507
new file mode 100644
index 000000000..9e7a6a157
--- /dev/null
+++ b/data/vim/patches/8.1.0507
@@ -0,0 +1,102 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0507
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0507
+Problem: .raml files not properly detected.
+Solution: Recognize .raml as raml instead of yaml. (closes #3594)
+Files: runtime/filetype.vim, src/testdir/test_filetype.vim
+
+
+*** ../vim-8.1.0506/runtime/filetype.vim 2018-10-27 14:27:17.535786698 +0200
+--- runtime/filetype.vim 2018-11-03 19:45:12.980445332 +0100
+***************
+*** 1129,1135 ****
+ " PDF
+ au BufNewFile,BufRead *.pdf setf pdf
+
+! " PCMK - HAE - crm configure edit
+ au BufNewFile,BufRead *.pcmk setf pcmk
+
+ " Perl
+--- 1129,1135 ----
+ " PDF
+ au BufNewFile,BufRead *.pdf setf pdf
+
+! " PCMK - HAE - crm configure edit
+ au BufNewFile,BufRead *.pcmk setf pcmk
+
+ " Perl
+***************
+*** 1893,1900 ****
+ " Yacc or racc
+ au BufNewFile,BufRead *.y call dist#ft#FTy()
+
+! " Yaml or Raml
+! au BufNewFile,BufRead *.yaml,*.yml,*.raml setf yaml
+
+ " yum conf (close enough to dosini)
+ au BufNewFile,BufRead */etc/yum.conf setf dosini
+--- 1893,1903 ----
+ " Yacc or racc
+ au BufNewFile,BufRead *.y call dist#ft#FTy()
+
+! " Yaml
+! au BufNewFile,BufRead *.yaml,*.yml setf yaml
+!
+! " Raml
+! au BufNewFile,BufRead *.raml setf raml
+
+ " yum conf (close enough to dosini)
+ au BufNewFile,BufRead */etc/yum.conf setf dosini
+***************
+*** 2107,2113 ****
+ au BufNewFile,BufRead *.text,README setf text
+
+ " Help files match *.txt but should have a last line that is a modeline.
+! au BufNewFile,BufRead *.txt
+ \ if getline('$') !~ 'vim:.*ft=help'
+ \| setf text
+ \| endif
+--- 2110,2116 ----
+ au BufNewFile,BufRead *.text,README setf text
+
+ " Help files match *.txt but should have a last line that is a modeline.
+! au BufNewFile,BufRead *.txt
+ \ if getline('$') !~ 'vim:.*ft=help'
+ \| setf text
+ \| endif
+*** ../vim-8.1.0506/src/testdir/test_filetype.vim 2018-10-27 14:27:17.539786667 +0200
+--- src/testdir/test_filetype.vim 2018-11-03 19:45:43.716269306 +0100
+***************
+*** 495,500 ****
+--- 495,501 ----
+ \ 'xslt': ['file.xsl', 'file.xslt'],
+ \ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
+ \ 'yaml': ['file.yaml', 'file.yml'],
++ \ 'raml': ['file.raml'],
+ \ 'z8a': ['file.z8a'],
+ \ 'zimbu': ['file.zu'],
+ \ 'zimbutempl': ['file.zut'],
+*** ../vim-8.1.0506/src/version.c 2018-11-03 19:06:20.211795974 +0100
+--- src/version.c 2018-11-03 19:46:31.539992781 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 507,
+ /**/
+
+--
+Not too long ago, a program was something you watched on TV...
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0508 b/data/vim/patches/8.1.0508
new file mode 100644
index 000000000..7c01ad83c
--- /dev/null
+++ b/data/vim/patches/8.1.0508
@@ -0,0 +1,85 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0508
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0508
+Problem: Suspend test fails when run by root.
+Solution: Accept both '$' and '#' for the prompt. (James McCoy, closes #3590)
+Files: src/testdir/test_suspend.vim
+
+
+*** ../vim-8.1.0507/src/testdir/test_suspend.vim 2018-09-22 21:36:38.158098521 +0200
+--- src/testdir/test_suspend.vim 2018-11-03 21:07:00.828850570 +0100
+***************
+*** 9,15 ****
+
+ let buf = term_start('/bin/sh')
+ " Wait for shell prompt.
+! call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
+
+ call term_sendkeys(buf, v:progpath
+ \ . " --clean -X"
+--- 9,15 ----
+
+ let buf = term_start('/bin/sh')
+ " Wait for shell prompt.
+! call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
+
+ call term_sendkeys(buf, v:progpath
+ \ . " --clean -X"
+***************
+*** 26,32 ****
+ \ "\<C-Z>"]
+ " Suspend and wait for shell prompt.
+ call term_sendkeys(buf, suspend_cmd)
+! call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
+
+ " Without 'autowrite', buffer should not be written.
+ call assert_equal(0, filereadable('Xfoo'))
+--- 26,32 ----
+ \ "\<C-Z>"]
+ " Suspend and wait for shell prompt.
+ call term_sendkeys(buf, suspend_cmd)
+! call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
+
+ " Without 'autowrite', buffer should not be written.
+ call assert_equal(0, filereadable('Xfoo'))
+***************
+*** 40,46 ****
+ call assert_equal(0, filereadable('Xfoo'))
+ call term_sendkeys(buf, ":suspend\<CR>")
+ " Wait for shell prompt.
+! call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
+ call assert_equal(['foo'], readfile('Xfoo'))
+ call term_sendkeys(buf, "fg\<CR>")
+ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
+--- 40,46 ----
+ call assert_equal(0, filereadable('Xfoo'))
+ call term_sendkeys(buf, ":suspend\<CR>")
+ " Wait for shell prompt.
+! call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
+ call assert_equal(['foo'], readfile('Xfoo'))
+ call term_sendkeys(buf, "fg\<CR>")
+ call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
+*** ../vim-8.1.0507/src/version.c 2018-11-03 19:52:11.333956689 +0100
+--- src/version.c 2018-11-03 21:08:12.980369622 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 508,
+ /**/
+
+--
+Not too long ago, compress was something you did to garbage...
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0509 b/data/vim/patches/8.1.0509
new file mode 100644
index 000000000..ef2ec4484
--- /dev/null
+++ b/data/vim/patches/8.1.0509
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0509
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0509
+Problem: Checking cwd not accessible fails for root. (James McCoy)
+Solution: Skip this part of the test for root. (closes #3595)
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0508/src/testdir/test_terminal.vim 2018-10-19 16:53:36.732867808 +0200
+--- src/testdir/test_terminal.vim 2018-11-03 21:44:10.294516580 +0100
+***************
+*** 490,503 ****
+ call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
+
+ " Case 3: Directory exists but is not accessible.
+! call mkdir('Xdir', '', '0600')
+! " return early if the directory permissions could not be set properly
+! if getfperm('Xdir')[2] == 'x'
+! call delete('Xdir', 'rf')
+! return
+ endif
+- call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
+- call delete('Xdir', 'rf')
+ endfunc
+
+ func Test_terminal_servername()
+--- 490,506 ----
+ call assert_fails("call term_start(&shell, {'cwd': 'Xdir'})", 'E475:')
+
+ " Case 3: Directory exists but is not accessible.
+! " Skip this for root, it will be accessible anyway.
+! if $USER != 'root'
+! call mkdir('XdirNoAccess', '', '0600')
+! " return early if the directory permissions could not be set properly
+! if getfperm('XdirNoAccess')[2] == 'x'
+! call delete('XdirNoAccess', 'rf')
+! return
+! endif
+! call assert_fails("call term_start(&shell, {'cwd': 'XdirNoAccess'})", 'E475:')
+! call delete('XdirNoAccess', 'rf')
+ endif
+ endfunc
+
+ func Test_terminal_servername()
+*** ../vim-8.1.0508/src/version.c 2018-11-03 21:09:11.707978893 +0100
+--- src/version.c 2018-11-03 21:45:58.169817825 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 509,
+ /**/
+
+--
+Why doesn't Tarzan have a beard?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0510 b/data/vim/patches/8.1.0510
new file mode 100644
index 000000000..0f7276d98
--- /dev/null
+++ b/data/vim/patches/8.1.0510
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0510
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0510
+Problem: Filter test fails when $LANG is C.UTF-8.
+Solution: Set 'helplang' to "en" for any C language. (Christian Brabandt,
+ closes #3577)
+Files: src/option.c
+
+
+*** ../vim-8.1.0509/src/option.c 2018-10-25 13:31:33.829906902 +0200
+--- src/option.c 2018-11-04 14:34:39.233665491 +0100
+***************
+*** 4256,4267 ****
+ p_hlg = empty_option;
+ else
+ {
+! /* zh_CN becomes "cn", zh_TW becomes "tw". */
+ if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5)
+ {
+ p_hlg[0] = TOLOWER_ASC(p_hlg[3]);
+ p_hlg[1] = TOLOWER_ASC(p_hlg[4]);
+ }
+ p_hlg[2] = NUL;
+ }
+ options[idx].flags |= P_ALLOCED;
+--- 4256,4273 ----
+ p_hlg = empty_option;
+ else
+ {
+! // zh_CN becomes "cn", zh_TW becomes "tw"
+ if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5)
+ {
+ p_hlg[0] = TOLOWER_ASC(p_hlg[3]);
+ p_hlg[1] = TOLOWER_ASC(p_hlg[4]);
+ }
++ // any C like setting, such as C.UTF-8, becomes "en"
++ else if (STRLEN(p_hlg) >= 1 && *p_hlg == 'C')
++ {
++ p_hlg[0] = 'e';
++ p_hlg[1] = 'n';
++ }
+ p_hlg[2] = NUL;
+ }
+ options[idx].flags |= P_ALLOCED;
+*** ../vim-8.1.0509/src/version.c 2018-11-03 21:47:10.949346136 +0100
+--- src/version.c 2018-11-04 14:40:33.523200579 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 510,
+ /**/
+
+--
+FATHER: Did you kill all those guards?
+LAUNCELOT: Yes ... I'm very sorry ...
+FATHER: They cost fifty pounds each!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0511 b/data/vim/patches/8.1.0511
new file mode 100644
index 000000000..52ee8ab7a
--- /dev/null
+++ b/data/vim/patches/8.1.0511
@@ -0,0 +1,77 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0511
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0511
+Problem: ml_get error when calling a function with a range.
+Solution: Don't position the cursor after the last line.
+Files: src/userfunc.c, src/testdir/test_functions.vim
+
+
+*** ../vim-8.1.0510/src/userfunc.c 2018-10-25 13:31:33.833906872 +0200
+--- src/userfunc.c 2018-11-04 23:38:59.813826045 +0100
+***************
+*** 3149,3154 ****
+--- 3149,3161 ----
+ {
+ if (!eap->skip && eap->addr_count > 0)
+ {
++ if (lnum > curbuf->b_ml.ml_line_count)
++ {
++ // If the function deleted lines or switched to another buffer
++ // the line number may become invalid.
++ EMSG(_(e_invrange));
++ break;
++ }
+ curwin->w_cursor.lnum = lnum;
+ curwin->w_cursor.col = 0;
+ #ifdef FEAT_VIRTUALEDIT
+*** ../vim-8.1.0510/src/testdir/test_functions.vim 2018-10-07 18:43:02.524682045 +0200
+--- src/testdir/test_functions.vim 2018-11-04 23:33:21.703374164 +0100
+***************
+*** 1119,1121 ****
+--- 1119,1140 ----
+ call assert_fails('call Fsandbox()', 'E48:')
+ delfunc Fsandbox
+ endfunc
++
++ func EditAnotherFile()
++ let word = expand('<cword>')
++ edit Xfuncrange2
++ endfunc
++
++ func Test_func_range_with_edit()
++ " Define a function that edits another buffer, then call it with a range that
++ " is invalid in that buffer.
++ call writefile(['just one line'], 'Xfuncrange2')
++ new
++ call setline(1, range(10))
++ write Xfuncrange1
++ call assert_fails('5,8call EditAnotherFile()', 'E16:')
++
++ call delete('Xfuncrange1')
++ call delete('Xfuncrange2')
++ bwipe!
++ endfunc
+*** ../vim-8.1.0510/src/version.c 2018-11-04 14:40:42.347139567 +0100
+--- src/version.c 2018-11-04 23:36:30.146573147 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 511,
+ /**/
+
+--
+Proverb: A nightingale that forgets the lyrics is a hummingbird.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0512 b/data/vim/patches/8.1.0512
new file mode 100644
index 000000000..a101a0bba
--- /dev/null
+++ b/data/vim/patches/8.1.0512
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0512
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0512
+Problem: 'helplang' default is inconsistent for C and C.UTF-8.
+Solution: Don't accept a value unless it starts with two letters.
+Files: src/ex_cmds2.c
+
+
+*** ../vim-8.1.0511/src/ex_cmds2.c 2018-10-14 21:40:57.356848425 +0200
+--- src/ex_cmds2.c 2018-11-05 20:19:07.922777334 +0100
+***************
+*** 5359,5364 ****
+--- 5359,5374 ----
+
+ #if defined(FEAT_MULTI_LANG) || defined(PROTO)
+ /*
++ * Return TRUE when "lang" starts with a valid language name.
++ * Rejects NULL, empty string, "C", "C.UTF-8" and others.
++ */
++ static int
++ is_valid_mess_lang(char_u *lang)
++ {
++ return lang != NULL && ASCII_ISALPHA(lang[0]) && ASCII_ISALPHA(lang[1]);
++ }
++
++ /*
+ * Obtain the current messages language. Used to set the default for
+ * 'helplang'. May return NULL or an empty string.
+ */
+***************
+*** 5379,5395 ****
+ # endif
+ # else
+ p = mch_getenv((char_u *)"LC_ALL");
+! if (p == NULL || *p == NUL)
+ {
+ p = mch_getenv((char_u *)"LC_MESSAGES");
+! if (p == NULL || *p == NUL)
+ p = mch_getenv((char_u *)"LANG");
+ }
+ # endif
+ # ifdef WIN32
+ p = gettext_lang(p);
+ # endif
+! return p;
+ }
+ #endif
+
+--- 5389,5405 ----
+ # endif
+ # else
+ p = mch_getenv((char_u *)"LC_ALL");
+! if (!is_valid_mess_lang(p))
+ {
+ p = mch_getenv((char_u *)"LC_MESSAGES");
+! if (!is_valid_mess_lang(p))
+ p = mch_getenv((char_u *)"LANG");
+ }
+ # endif
+ # ifdef WIN32
+ p = gettext_lang(p);
+ # endif
+! return is_valid_mess_lang(p) ? p : NULL;
+ }
+ #endif
+
+*** ../vim-8.1.0511/src/version.c 2018-11-04 23:39:33.953644902 +0100
+--- src/version.c 2018-11-05 20:24:20.654263866 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 512,
+ /**/
+
+--
+Nothing is impossible for the man who doesn't have to do it.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0513 b/data/vim/patches/8.1.0513
new file mode 100644
index 000000000..e62c3aaf4
--- /dev/null
+++ b/data/vim/patches/8.1.0513
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0513
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0513
+Problem: No error for set diffopt+=algorithm:.
+Solution: Check for missing argument. (Hirohito Higashi, closes #3598)
+Files: src/diff.c, src/testdir/gen_opt_test.vim
+
+
+*** ../vim-8.1.0512/src/diff.c 2018-10-31 22:57:07.913017514 +0100
+--- src/diff.c 2018-11-05 21:17:35.763867796 +0100
+***************
+*** 2266,2271 ****
+--- 2266,2273 ----
+ p += 9;
+ diff_algorithm_new = XDF_HISTOGRAM_DIFF;
+ }
++ else
++ return FAIL;
+ }
+
+ if (*p != ',' && *p != NUL)
+*** ../vim-8.1.0512/src/testdir/gen_opt_test.vim 2018-06-23 19:22:45.614486258 +0200
+--- src/testdir/gen_opt_test.vim 2018-11-05 21:21:07.012543853 +0100
+***************
+*** 81,87 ****
+ \ 'cryptmethod': [['', 'zip'], ['xxx']],
+ \ 'cscopequickfix': [['', 's-', 's-,c+,e0'], ['xxx', 's,g,d']],
+ \ 'debug': [['', 'msg', 'msg', 'beep'], ['xxx']],
+! \ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx']],
+ \ 'display': [['', 'lastline', 'lastline,uhex'], ['xxx']],
+ \ 'eadirection': [['', 'both', 'ver'], ['xxx', 'ver,hor']],
+ \ 'encoding': [['latin1'], ['xxx', '']],
+--- 81,87 ----
+ \ 'cryptmethod': [['', 'zip'], ['xxx']],
+ \ 'cscopequickfix': [['', 's-', 's-,c+,e0'], ['xxx', 's,g,d']],
+ \ 'debug': [['', 'msg', 'msg', 'beep'], ['xxx']],
+! \ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx', 'algorithm:xxx', 'algorithm:']],
+ \ 'display': [['', 'lastline', 'lastline,uhex'], ['xxx']],
+ \ 'eadirection': [['', 'both', 'ver'], ['xxx', 'ver,hor']],
+ \ 'encoding': [['latin1'], ['xxx', '']],
+*** ../vim-8.1.0512/src/version.c 2018-11-05 20:25:48.804089622 +0100
+--- src/version.c 2018-11-05 21:19:58.913419770 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 513,
+ /**/
+
+--
+This is the polymorph virus! Follow these instructions carefully:
+1. Send this message to everybody you know.
+2. Format your harddisk.
+Thank you for your cooperation in spreading the most powerful virus ever!
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0514 b/data/vim/patches/8.1.0514
new file mode 100644
index 000000000..497516db9
--- /dev/null
+++ b/data/vim/patches/8.1.0514
@@ -0,0 +1,1123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0514
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0514
+Problem: CTRL-W ^ does not work when alternate buffer has no name.
+Solution: Use another method to split and edit the alternate buffer. (Jason
+ Franklin)
+Files: src/testdir/test_normal.vim, src/testdir/test_window_cmd.vim,
+ src/normal.c, src/window.c, runtime/doc/windows.txt
+
+
+*** ../vim-8.1.0513/src/testdir/test_normal.vim 2018-09-03 22:08:05.676736128 +0200
+--- src/testdir/test_normal.vim 2018-11-10 15:55:36.238319451 +0100
+***************
+*** 1,11 ****
+ " Test for various Normal mode commands
+
+! func! Setup_NewWindow()
+ 10new
+ call setline(1, range(1,100))
+ endfunc
+
+! func! MyFormatExpr()
+ " Adds '->$' at lines having numbers followed by trailing whitespace
+ for ln in range(v:lnum, v:lnum+v:count-1)
+ let line = getline(ln)
+--- 1,11 ----
+ " Test for various Normal mode commands
+
+! func Setup_NewWindow()
+ 10new
+ call setline(1, range(1,100))
+ endfunc
+
+! func MyFormatExpr()
+ " Adds '->$' at lines having numbers followed by trailing whitespace
+ for ln in range(v:lnum, v:lnum+v:count-1)
+ let line = getline(ln)
+***************
+*** 15,21 ****
+ endfor
+ endfunc
+
+! func! CountSpaces(type, ...)
+ " for testing operatorfunc
+ " will count the number of spaces
+ " and return the result in g:a
+--- 15,21 ----
+ endfor
+ endfunc
+
+! func CountSpaces(type, ...)
+ " for testing operatorfunc
+ " will count the number of spaces
+ " and return the result in g:a
+***************
+*** 35,41 ****
+ let @@ = reg_save
+ endfunc
+
+! func! OpfuncDummy(type, ...)
+ " for testing operatorfunc
+ let g:opt=&linebreak
+
+--- 35,41 ----
+ let @@ = reg_save
+ endfunc
+
+! func OpfuncDummy(type, ...)
+ " for testing operatorfunc
+ let g:opt=&linebreak
+
+***************
+*** 78,84 ****
+ bw!
+ endfunc
+
+! func! Test_normal01_keymodel()
+ call Setup_NewWindow()
+ " Test 1: depending on 'keymodel' <s-down> does something different
+ 50
+--- 78,84 ----
+ bw!
+ endfunc
+
+! func Test_normal01_keymodel()
+ call Setup_NewWindow()
+ " Test 1: depending on 'keymodel' <s-down> does something different
+ 50
+***************
+*** 112,118 ****
+ bw!
+ endfunc
+
+! func! Test_normal02_selectmode()
+ " some basic select mode tests
+ call Setup_NewWindow()
+ 50
+--- 112,118 ----
+ bw!
+ endfunc
+
+! func Test_normal02_selectmode()
+ " some basic select mode tests
+ call Setup_NewWindow()
+ 50
+***************
+*** 126,132 ****
+ bw!
+ endfunc
+
+! func! Test_normal02_selectmode2()
+ " some basic select mode tests
+ call Setup_NewWindow()
+ 50
+--- 126,132 ----
+ bw!
+ endfunc
+
+! func Test_normal02_selectmode2()
+ " some basic select mode tests
+ call Setup_NewWindow()
+ 50
+***************
+*** 136,142 ****
+ bw!
+ endfunc
+
+! func! Test_normal03_join()
+ " basic join test
+ call Setup_NewWindow()
+ 50
+--- 136,142 ----
+ bw!
+ endfunc
+
+! func Test_normal03_join()
+ " basic join test
+ call Setup_NewWindow()
+ 50
+***************
+*** 156,162 ****
+ bw!
+ endfunc
+
+! func! Test_normal04_filter()
+ " basic filter test
+ " only test on non windows platform
+ if has('win32')
+--- 156,162 ----
+ bw!
+ endfunc
+
+! func Test_normal04_filter()
+ " basic filter test
+ " only test on non windows platform
+ if has('win32')
+***************
+*** 182,188 ****
+ bw!
+ endfunc
+
+! func! Test_normal05_formatexpr()
+ " basic formatexpr test
+ call Setup_NewWindow()
+ %d_
+--- 182,188 ----
+ bw!
+ endfunc
+
+! func Test_normal05_formatexpr()
+ " basic formatexpr test
+ call Setup_NewWindow()
+ %d_
+***************
+*** 219,225 ****
+ set formatexpr=
+ endfunc
+
+! func! Test_normal06_formatprg()
+ " basic test for formatprg
+ " only test on non windows platform
+ if has('win32')
+--- 219,225 ----
+ set formatexpr=
+ endfunc
+
+! func Test_normal06_formatprg()
+ " basic test for formatprg
+ " only test on non windows platform
+ if has('win32')
+***************
+*** 253,259 ****
+ call delete('Xsed_format.sh')
+ endfunc
+
+! func! Test_normal07_internalfmt()
+ " basic test for internal formmatter to textwidth of 12
+ let list=range(1,11)
+ call map(list, 'v:val." "')
+--- 253,259 ----
+ call delete('Xsed_format.sh')
+ endfunc
+
+! func Test_normal07_internalfmt()
+ " basic test for internal formmatter to textwidth of 12
+ let list=range(1,11)
+ call map(list, 'v:val." "')
+***************
+*** 267,273 ****
+ bw!
+ endfunc
+
+! func! Test_normal08_fold()
+ " basic tests for foldopen/folddelete
+ if !has("folding")
+ return
+--- 267,273 ----
+ bw!
+ endfunc
+
+! func Test_normal08_fold()
+ " basic tests for foldopen/folddelete
+ if !has("folding")
+ return
+***************
+*** 326,332 ****
+ bw!
+ endfunc
+
+! func! Test_normal09_operatorfunc()
+ " Test operatorfunc
+ call Setup_NewWindow()
+ " Add some spaces for counting
+--- 326,332 ----
+ bw!
+ endfunc
+
+! func Test_normal09_operatorfunc()
+ " Test operatorfunc
+ call Setup_NewWindow()
+ " Add some spaces for counting
+***************
+*** 356,362 ****
+ bw!
+ endfunc
+
+! func! Test_normal09a_operatorfunc()
+ " Test operatorfunc
+ call Setup_NewWindow()
+ " Add some spaces for counting
+--- 356,362 ----
+ bw!
+ endfunc
+
+! func Test_normal09a_operatorfunc()
+ " Test operatorfunc
+ call Setup_NewWindow()
+ " Add some spaces for counting
+***************
+*** 382,388 ****
+ unlet! g:opt
+ endfunc
+
+! func! Test_normal10_expand()
+ " Test for expand()
+ 10new
+ call setline(1, ['1', 'ifooar,,cbar'])
+--- 382,388 ----
+ unlet! g:opt
+ endfunc
+
+! func Test_normal10_expand()
+ " Test for expand()
+ 10new
+ call setline(1, ['1', 'ifooar,,cbar'])
+***************
+*** 417,423 ****
+ bw!
+ endfunc
+
+! func! Test_normal11_showcmd()
+ " test for 'showcmd'
+ 10new
+ exe "norm! ofoobar\<esc>"
+--- 417,423 ----
+ bw!
+ endfunc
+
+! func Test_normal11_showcmd()
+ " test for 'showcmd'
+ 10new
+ exe "norm! ofoobar\<esc>"
+***************
+*** 432,438 ****
+ bw!
+ endfunc
+
+! func! Test_normal12_nv_error()
+ " Test for nv_error
+ 10new
+ call setline(1, range(1,5))
+--- 432,438 ----
+ bw!
+ endfunc
+
+! func Test_normal12_nv_error()
+ " Test for nv_error
+ 10new
+ call setline(1, range(1,5))
+***************
+*** 442,448 ****
+ bw!
+ endfunc
+
+! func! Test_normal13_help()
+ " Test for F1
+ call assert_equal(1, winnr())
+ call feedkeys("\<f1>", 'txi')
+--- 442,448 ----
+ bw!
+ endfunc
+
+! func Test_normal13_help()
+ " Test for F1
+ call assert_equal(1, winnr())
+ call feedkeys("\<f1>", 'txi')
+***************
+*** 451,457 ****
+ bw!
+ endfunc
+
+! func! Test_normal14_page()
+ " basic test for Ctrl-F and Ctrl-B
+ call Setup_NewWindow()
+ exe "norm! \<c-f>"
+--- 451,457 ----
+ bw!
+ endfunc
+
+! func Test_normal14_page()
+ " basic test for Ctrl-F and Ctrl-B
+ call Setup_NewWindow()
+ exe "norm! \<c-f>"
+***************
+*** 485,491 ****
+ bw!
+ endfunc
+
+! func! Test_normal14_page_eol()
+ 10new
+ norm oxxxxxxx
+ exe "norm 2\<c-f>"
+--- 485,491 ----
+ bw!
+ endfunc
+
+! func Test_normal14_page_eol()
+ 10new
+ norm oxxxxxxx
+ exe "norm 2\<c-f>"
+***************
+*** 494,500 ****
+ bw!
+ endfunc
+
+! func! Test_normal15_z_scroll_vert()
+ " basic test for z commands that scroll the window
+ call Setup_NewWindow()
+ 100
+--- 494,500 ----
+ bw!
+ endfunc
+
+! func Test_normal15_z_scroll_vert()
+ " basic test for z commands that scroll the window
+ call Setup_NewWindow()
+ 100
+***************
+*** 583,589 ****
+ bw!
+ endfunc
+
+! func! Test_normal16_z_scroll_hor()
+ " basic test for z commands that scroll the window
+ 10new
+ 15vsp
+--- 583,589 ----
+ bw!
+ endfunc
+
+! func Test_normal16_z_scroll_hor()
+ " basic test for z commands that scroll the window
+ 10new
+ 15vsp
+***************
+*** 649,655 ****
+ bw!
+ endfunc
+
+! func! Test_normal17_z_scroll_hor2()
+ " basic test for z commands that scroll the window
+ " using 'sidescrolloff' setting
+ 10new
+--- 649,655 ----
+ bw!
+ endfunc
+
+! func Test_normal17_z_scroll_hor2()
+ " basic test for z commands that scroll the window
+ " using 'sidescrolloff' setting
+ 10new
+***************
+*** 716,722 ****
+ bw!
+ endfunc
+
+! func! Test_normal18_z_fold()
+ " basic tests for foldopen/folddelete
+ if !has("folding")
+ return
+--- 716,722 ----
+ bw!
+ endfunc
+
+! func Test_normal18_z_fold()
+ " basic tests for foldopen/folddelete
+ if !has("folding")
+ return
+***************
+*** 1087,1093 ****
+ bw!
+ endfunc
+
+! func! Test_normal19_z_spell()
+ if !has("spell") || !has('syntax')
+ return
+ endif
+--- 1087,1093 ----
+ bw!
+ endfunc
+
+! func Test_normal19_z_spell()
+ if !has("spell") || !has('syntax')
+ return
+ endif
+***************
+*** 1241,1247 ****
+ bw!
+ endfunc
+
+! func! Test_normal20_exmode()
+ if !has("unix")
+ " Reading from redirected file doesn't work on MS-Windows
+ return
+--- 1241,1247 ----
+ bw!
+ endfunc
+
+! func Test_normal20_exmode()
+ if !has("unix")
+ " Reading from redirected file doesn't work on MS-Windows
+ return
+***************
+*** 1259,1282 ****
+ bw!
+ endfunc
+
+! func! Test_normal21_nv_hat()
+! set hidden
+! new
+! " to many buffers opened already, will not work
+! "call assert_fails(":b#", 'E23')
+! "call assert_equal('', @#)
+! e Xfoobar
+! e Xfile2
+! call feedkeys("\<c-^>", 't')
+! call assert_equal("Xfile2", fnamemodify(bufname('%'), ':t'))
+! call feedkeys("f\<c-^>", 't')
+! call assert_equal("Xfile2", fnamemodify(bufname('%'), ':t'))
+! " clean up
+! set nohidden
+! bw!
+ endfunc
+
+! func! Test_normal22_zet()
+ " Test for ZZ
+ " let shell = &shell
+ " let &shell = 'sh'
+--- 1259,1296 ----
+ bw!
+ endfunc
+
+! func Test_normal21_nv_hat()
+!
+! " Edit a fresh file and wipe the buffer list so that there is no alternate
+! " file present. Next, check for the expected command failures.
+! edit Xfoo | %bw
+! call assert_fails(':buffer #', 'E86')
+! call assert_fails(':execute "normal! \<C-^>"', 'E23')
+!
+! " Test for the expected behavior when switching between two named buffers.
+! edit Xfoo | edit Xbar
+! call feedkeys("\<C-^>", 'tx')
+! call assert_equal('Xfoo', fnamemodify(bufname('%'), ':t'))
+! call feedkeys("\<C-^>", 'tx')
+! call assert_equal('Xbar', fnamemodify(bufname('%'), ':t'))
+!
+! " Test for the expected behavior when only one buffer is named.
+! enew | let l:nr = bufnr('%')
+! call feedkeys("\<C-^>", 'tx')
+! call assert_equal('Xbar', fnamemodify(bufname('%'), ':t'))
+! call feedkeys("\<C-^>", 'tx')
+! call assert_equal('', bufname('%'))
+! call assert_equal(l:nr, bufnr('%'))
+!
+! " Test that no action is taken by "<C-^>" when an operator is pending.
+! edit Xfoo
+! call feedkeys("ci\<C-^>", 'tx')
+! call assert_equal('Xfoo', fnamemodify(bufname('%'), ':t'))
+!
+! %bw!
+ endfunc
+
+! func Test_normal22_zet()
+ " Test for ZZ
+ " let shell = &shell
+ " let &shell = 'sh'
+***************
+*** 1298,1304 ****
+ " let &shell = shell
+ endfunc
+
+! func! Test_normal23_K()
+ " Test for K command
+ new
+ call append(0, ['version8.txt', 'man', 'aa%bb', 'cc|dd'])
+--- 1312,1318 ----
+ " let &shell = shell
+ endfunc
+
+! func Test_normal23_K()
+ " Test for K command
+ new
+ call append(0, ['version8.txt', 'man', 'aa%bb', 'cc|dd'])
+***************
+*** 1353,1359 ****
+ bw!
+ endfunc
+
+! func! Test_normal24_rot13()
+ " This test uses multi byte characters
+ if !has("multi_byte")
+ return
+--- 1367,1373 ----
+ bw!
+ endfunc
+
+! func Test_normal24_rot13()
+ " This test uses multi byte characters
+ if !has("multi_byte")
+ return
+***************
+*** 1371,1377 ****
+ bw!
+ endfunc
+
+! func! Test_normal25_tag()
+ " Testing for CTRL-] g CTRL-] g]
+ " CTRL-W g] CTRL-W CTRL-] CTRL-W g CTRL-]
+ h
+--- 1385,1391 ----
+ bw!
+ endfunc
+
+! func Test_normal25_tag()
+ " Testing for CTRL-] g CTRL-] g]
+ " CTRL-W g] CTRL-W CTRL-] CTRL-W g CTRL-]
+ h
+***************
+*** 1438,1444 ****
+ helpclose
+ endfunc
+
+! func! Test_normal26_put()
+ " Test for ]p ]P [p and [P
+ new
+ call append(0, ['while read LINE', 'do', ' ((count++))', ' if [ $? -ne 0 ]; then', " echo 'Error writing file'", ' fi', 'done'])
+--- 1452,1458 ----
+ helpclose
+ endfunc
+
+! func Test_normal26_put()
+ " Test for ]p ]P [p and [P
+ new
+ call append(0, ['while read LINE', 'do', ' ((count++))', ' if [ $? -ne 0 ]; then', " echo 'Error writing file'", ' fi', 'done'])
+***************
+*** 1457,1463 ****
+ bw!
+ endfunc
+
+! func! Test_normal27_bracket()
+ " Test for [' [` ]' ]`
+ call Setup_NewWindow()
+ 1,21s/.\+/ & b/
+--- 1471,1477 ----
+ bw!
+ endfunc
+
+! func Test_normal27_bracket()
+ " Test for [' [` ]' ]`
+ call Setup_NewWindow()
+ 1,21s/.\+/ & b/
+***************
+*** 1508,1514 ****
+ bw!
+ endfunc
+
+! func! Test_normal28_parenthesis()
+ " basic testing for ( and )
+ new
+ call append(0, ['This is a test. With some sentences!', '', 'Even with a question? And one more. And no sentence here'])
+--- 1522,1528 ----
+ bw!
+ endfunc
+
+! func Test_normal28_parenthesis()
+ " basic testing for ( and )
+ new
+ call append(0, ['This is a test. With some sentences!', '', 'Even with a question? And one more. And no sentence here'])
+***************
+*** 1705,1711 ****
+ bw!
+ endfunc
+
+! func! Test_normal32_g_cmd1()
+ " Test for g*, g#
+ new
+ call append(0, ['abc.x_foo', 'x_foobar.abc'])
+--- 1719,1725 ----
+ bw!
+ endfunc
+
+! func Test_normal32_g_cmd1()
+ " Test for g*, g#
+ new
+ call append(0, ['abc.x_foo', 'x_foobar.abc'])
+***************
+*** 1836,1842 ****
+ bw!
+ endfunc
+
+! func! Test_g_ctrl_g()
+ new
+
+ let a = execute(":norm! g\<c-g>")
+--- 1850,1856 ----
+ bw!
+ endfunc
+
+! func Test_g_ctrl_g()
+ new
+
+ let a = execute(":norm! g\<c-g>")
+***************
+*** 2134,2140 ****
+ bw!
+ endfunc
+
+! func! Test_normal42_halfpage()
+ " basic test for Ctrl-D and Ctrl-U
+ call Setup_NewWindow()
+ call assert_equal(5, &scroll)
+--- 2148,2154 ----
+ bw!
+ endfunc
+
+! func Test_normal42_halfpage()
+ " basic test for Ctrl-D and Ctrl-U
+ call Setup_NewWindow()
+ call assert_equal(5, &scroll)
+***************
+*** 2202,2208 ****
+ bw!
+ endfunc
+
+! func! Test_normal44_textobjects2()
+ " basic testing for is and as text objects
+ new
+ call append(0, ['This is a test. With some sentences!', '', 'Even with a question? And one more. And no sentence here'])
+--- 2216,2222 ----
+ bw!
+ endfunc
+
+! func Test_normal44_textobjects2()
+ " basic testing for is and as text objects
+ new
+ call append(0, ['This is a test. With some sentences!', '', 'Even with a question? And one more. And no sentence here'])
+***************
+*** 2257,2263 ****
+ bw!
+ endfunc
+
+! func! Test_normal45_drop()
+ if !has('dnd')
+ " The ~ register does not exist
+ call assert_beeps('norm! "~')
+--- 2271,2277 ----
+ bw!
+ endfunc
+
+! func Test_normal45_drop()
+ if !has('dnd')
+ " The ~ register does not exist
+ call assert_beeps('norm! "~')
+***************
+*** 2275,2281 ****
+ bw!
+ endfunc
+
+! func! Test_normal46_ignore()
+ " This test uses multi byte characters
+ if !has("multi_byte")
+ return
+--- 2289,2295 ----
+ bw!
+ endfunc
+
+! func Test_normal46_ignore()
+ " This test uses multi byte characters
+ if !has("multi_byte")
+ return
+***************
+*** 2299,2305 ****
+ bw!
+ endfunc
+
+! func! Test_normal47_visual_buf_wipe()
+ " This was causing a crash or ml_get error.
+ enew!
+ call setline(1,'xxx')
+--- 2313,2319 ----
+ bw!
+ endfunc
+
+! func Test_normal47_visual_buf_wipe()
+ " This was causing a crash or ml_get error.
+ enew!
+ call setline(1,'xxx')
+***************
+*** 2313,2319 ****
+ set nomodified
+ endfunc
+
+! func! Test_normal47_autocmd()
+ " disabled, does not seem to be possible currently
+ throw "Skipped: not possible to test cursorhold autocmd while waiting for input in normal_cmd"
+ new
+--- 2327,2333 ----
+ set nomodified
+ endfunc
+
+! func Test_normal47_autocmd()
+ " disabled, does not seem to be possible currently
+ throw "Skipped: not possible to test cursorhold autocmd while waiting for input in normal_cmd"
+ new
+***************
+*** 2331,2344 ****
+ bw!
+ endfunc
+
+! func! Test_normal48_wincmd()
+ new
+ exe "norm! \<c-w>c"
+ call assert_equal(1, winnr('$'))
+ call assert_fails(":norm! \<c-w>c", "E444")
+ endfunc
+
+! func! Test_normal49_counts()
+ new
+ call setline(1, 'one two three four five six seven eight nine ten')
+ 1
+--- 2345,2358 ----
+ bw!
+ endfunc
+
+! func Test_normal48_wincmd()
+ new
+ exe "norm! \<c-w>c"
+ call assert_equal(1, winnr('$'))
+ call assert_fails(":norm! \<c-w>c", "E444")
+ endfunc
+
+! func Test_normal49_counts()
+ new
+ call setline(1, 'one two three four five six seven eight nine ten')
+ 1
+***************
+*** 2347,2353 ****
+ bw!
+ endfunc
+
+! func! Test_normal50_commandline()
+ if !has("timers") || !has("cmdline_hist")
+ return
+ endif
+--- 2361,2367 ----
+ bw!
+ endfunc
+
+! func Test_normal50_commandline()
+ if !has("timers") || !has("cmdline_hist")
+ return
+ endif
+***************
+*** 2378,2384 ****
+ bw!
+ endfunc
+
+! func! Test_normal51_FileChangedRO()
+ if !has("autocmd")
+ return
+ endif
+--- 2392,2398 ----
+ bw!
+ endfunc
+
+! func Test_normal51_FileChangedRO()
+ if !has("autocmd")
+ return
+ endif
+***************
+*** 2398,2404 ****
+ call delete("Xreadonly.log")
+ endfunc
+
+! func! Test_normal52_rl()
+ if !has("rightleft")
+ return
+ endif
+--- 2412,2418 ----
+ call delete("Xreadonly.log")
+ endfunc
+
+! func Test_normal52_rl()
+ if !has("rightleft")
+ return
+ endif
+***************
+*** 2431,2437 ****
+ bw!
+ endfunc
+
+! func! Test_normal53_digraph()
+ if !has('digraphs')
+ return
+ endif
+--- 2445,2451 ----
+ bw!
+ endfunc
+
+! func Test_normal53_digraph()
+ if !has('digraphs')
+ return
+ endif
+***************
+*** 2532,2534 ****
+--- 2546,2571 ----
+ %bwipe!
+ let &ul = save_ul
+ endfunc
++
++ func Test_nv_hat_count()
++ %bwipeout!
++ let l:nr = bufnr('%') + 1
++ call assert_fails(':execute "normal! ' . l:nr . '\<C-^>"', 'E92')
++
++ edit Xfoo
++ let l:foo_nr = bufnr('Xfoo')
++
++ edit Xbar
++ let l:bar_nr = bufnr('Xbar')
++
++ " Make sure we are not just using the alternate file.
++ edit Xbaz
++
++ call feedkeys(l:foo_nr . "\<C-^>", 'tx')
++ call assert_equal('Xfoo', fnamemodify(bufname('%'), ':t'))
++
++ call feedkeys(l:bar_nr . "\<C-^>", 'tx')
++ call assert_equal('Xbar', fnamemodify(bufname('%'), ':t'))
++
++ %bwipeout!
++ endfunc
+*** ../vim-8.1.0513/src/testdir/test_window_cmd.vim 2018-05-10 18:19:36.000000000 +0200
+--- src/testdir/test_window_cmd.vim 2018-11-10 15:47:05.614643165 +0100
+***************
+*** 103,117 ****
+ bw
+ endfunc
+
+ func Test_window_split_edit_alternate()
+- e Xa
+- e Xb
+
+ wincmd ^
+! call assert_equal('Xa', bufname(winbufnr(1)))
+! call assert_equal('Xb', bufname(winbufnr(2)))
+
+! bw Xa Xb
+ endfunc
+
+ func Test_window_preview()
+--- 103,167 ----
+ bw
+ endfunc
+
++ " Test the ":wincmd ^" and "<C-W>^" commands.
+ func Test_window_split_edit_alternate()
+
++ " Test for failure when the alternate buffer/file no longer exists.
++ edit Xfoo | %bw
++ call assert_fails(':wincmd ^', 'E23')
++
++ " Test for the expected behavior when we have two named buffers.
++ edit Xfoo | edit Xbar
+ wincmd ^
+! call assert_equal('Xfoo', bufname(winbufnr(1)))
+! call assert_equal('Xbar', bufname(winbufnr(2)))
+! only
+!
+! " Test for the expected behavior when the alternate buffer is not named.
+! enew | let l:nr1 = bufnr('%')
+! edit Xfoo | let l:nr2 = bufnr('%')
+! wincmd ^
+! call assert_equal(l:nr1, winbufnr(1))
+! call assert_equal(l:nr2, winbufnr(2))
+! only
+!
+! " Test the Normal mode command.
+! call feedkeys("\<C-W>\<C-^>", 'tx')
+! call assert_equal(l:nr2, winbufnr(1))
+! call assert_equal(l:nr1, winbufnr(2))
+!
+! %bw!
+! endfunc
+!
+! " Test the ":[count]wincmd ^" and "[count]<C-W>^" commands.
+! func Test_window_split_edit_bufnr()
+!
+! %bwipeout
+! let l:nr = bufnr('%') + 1
+! call assert_fails(':execute "normal! ' . l:nr . '\<C-W>\<C-^>"', 'E92')
+! call assert_fails(':' . l:nr . 'wincmd ^', 'E16')
+! call assert_fails(':0wincmd ^', 'E16')
+!
+! edit Xfoo | edit Xbar | edit Xbaz
+! let l:foo_nr = bufnr('Xfoo')
+! let l:bar_nr = bufnr('Xbar')
+! let l:baz_nr = bufnr('Xbaz')
+!
+! call feedkeys(l:foo_nr . "\<C-W>\<C-^>", 'tx')
+! call assert_equal('Xfoo', bufname(winbufnr(1)))
+! call assert_equal('Xbaz', bufname(winbufnr(2)))
+! only
+!
+! call feedkeys(l:bar_nr . "\<C-W>\<C-^>", 'tx')
+! call assert_equal('Xbar', bufname(winbufnr(1)))
+! call assert_equal('Xfoo', bufname(winbufnr(2)))
+! only
+!
+! execute l:baz_nr . 'wincmd ^'
+! call assert_equal('Xbaz', bufname(winbufnr(1)))
+! call assert_equal('Xbar', bufname(winbufnr(2)))
+
+! %bw!
+ endfunc
+
+ func Test_window_preview()
+***************
+*** 322,328 ****
+ set equalalways
+ vsplit
+ windo split
+! split
+ wincmd J
+ " now we have a frame top-left with two windows, a frame top-right with two
+ " windows and a frame at the bottom, full-width.
+--- 372,378 ----
+ set equalalways
+ vsplit
+ windo split
+! split
+ wincmd J
+ " now we have a frame top-left with two windows, a frame top-right with two
+ " windows and a frame at the bottom, full-width.
+*** ../vim-8.1.0513/src/normal.c 2018-09-30 21:43:17.199693265 +0200
+--- src/normal.c 2018-11-10 15:47:05.610643198 +0100
+***************
+*** 5496,5502 ****
+ }
+
+ /*
+! * CTRL-^ command, short for ":e #"
+ */
+ static void
+ nv_hat(cmdarg_T *cap)
+--- 5496,5503 ----
+ }
+
+ /*
+! * CTRL-^ command, short for ":e #". Works even when the alternate buffer is
+! * not named.
+ */
+ static void
+ nv_hat(cmdarg_T *cap)
+*** ../vim-8.1.0513/src/window.c 2018-09-30 21:43:17.207693209 +0200
+--- src/window.c 2018-11-10 15:53:58.843143892 +0100
+***************
+*** 151,158 ****
+ case '^':
+ CHECK_CMDWIN;
+ reset_VIsual_and_resel(); /* stop Visual mode */
+! cmd_with_count("split #", cbuf, sizeof(cbuf), Prenum);
+! do_cmdline_cmd(cbuf);
+ break;
+
+ /* open new window */
+--- 151,171 ----
+ case '^':
+ CHECK_CMDWIN;
+ reset_VIsual_and_resel(); /* stop Visual mode */
+!
+! if (buflist_findnr(Prenum == 0
+! ? curwin->w_alt_fnum : Prenum) == NULL)
+! {
+! if (Prenum == 0)
+! EMSG(_(e_noalt));
+! else
+! EMSGN(_("E92: Buffer %ld not found"), Prenum);
+! break;
+! }
+!
+! if (!curbuf_locked() && win_split(0, 0) == OK)
+! (void)buflist_getfile(
+! Prenum == 0 ? curwin->w_alt_fnum : Prenum,
+! (linenr_T)0, GETF_ALT, FALSE);
+ break;
+
+ /* open new window */
+*** ../vim-8.1.0513/runtime/doc/windows.txt 2018-05-17 13:42:04.000000000 +0200
+--- runtime/doc/windows.txt 2018-11-10 15:47:05.614643165 +0100
+***************
+*** 81,86 ****
+--- 81,90 ----
+ functions can be used to convert between the window/tab number and the
+ identifier. There is also the window number, which may change whenever
+ windows are opened or closed, see |winnr()|.
++ The window number is only valid in one specific tab. The window ID is valid
++ across tabs. For most functions that take a window ID or a window number, the
++ window number only applies to the current tab, while the window ID can refer
++ to a window in any tab.
+
+ Each buffer has a unique number and the number will not change within a Vim
+ session. The |bufnr()| and |bufname()| functions can be used to convert
+***************
+*** 218,231 ****
+ |:find|. Doesn't split if {file} is not found.
+
+ CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^*
+! CTRL-W ^ Does ":split #", split window in two and edit alternate file.
+! When a count is given, it becomes ":split #N", split window
+! and edit buffer N.
+
+ *CTRL-W_:*
+! CTRL-W : Does the same as typing |:| : edit a command line. Useful in a
+ terminal window, where all Vim commands must be preceded with
+! CTRL-W or 'termkey'.
+
+ Note that the 'splitbelow' and 'splitright' options influence where a new
+ window will appear.
+--- 222,237 ----
+ |:find|. Doesn't split if {file} is not found.
+
+ CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^*
+! CTRL-W ^ Split the current window in two and edit the alternate file.
+! When a count N is given, split the current window and edit
+! buffer N. Similar to ":sp #" and ":sp #N", but it allows the
+! other buffer to be unnamed. This command matches the behavior
+! of |CTRL-^|, except that it splits a window first.
+
+ *CTRL-W_:*
+! CTRL-W : Does the same as typing |:| - enter a command line. Useful in a
+ terminal window, where all Vim commands must be preceded with
+! CTRL-W or 'termwinkey'.
+
+ Note that the 'splitbelow' and 'splitright' options influence where a new
+ window will appear.
+*** ../vim-8.1.0513/src/version.c 2018-11-05 21:21:29.800286334 +0100
+--- src/version.c 2018-11-10 15:49:12.537568074 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 514,
+ /**/
+
+--
+The question is: What do you do with your life?
+The wrong answer is: Become the richest guy in the graveyard.
+ (billionaire and Oracle founder Larry Ellison)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0515 b/data/vim/patches/8.1.0515
new file mode 100644
index 000000000..89d85ffac
--- /dev/null
+++ b/data/vim/patches/8.1.0515
@@ -0,0 +1,265 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0515
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0515
+Problem: Reloading a script gives errors for existing functions.
+Solution: Allow redefining a function once when reloading a script.
+Files: src/testdir/test_functions.vim, src/userfunc.c, src/structs.h,
+ src/globals.h, src/buffer.c, src/ex_cmds2.c, src/main.c,
+ src/option.c, runtime/doc/eval.txt
+
+
+*** ../vim-8.1.0514/src/testdir/test_functions.vim 2018-11-04 23:39:33.953644902 +0100
+--- src/testdir/test_functions.vim 2018-11-10 16:54:47.043813092 +0100
+***************
+*** 1138,1140 ****
+--- 1138,1167 ----
+ call delete('Xfuncrange2')
+ bwipe!
+ endfunc
++
++ func Test_func_exists_on_reload()
++ call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 'Xfuncexists')
++ call assert_equal(0, exists('*ExistingFunction'))
++ source Xfuncexists
++ call assert_equal(1, exists('*ExistingFunction'))
++ " Redefining a function when reloading a script is OK.
++ source Xfuncexists
++ call assert_equal(1, exists('*ExistingFunction'))
++
++ " But redefining in another script is not OK.
++ call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 'Xfuncexists2')
++ call assert_fails('source Xfuncexists2', 'E122:')
++
++ delfunc ExistingFunction
++ call assert_equal(0, exists('*ExistingFunction'))
++ call writefile([
++ \ 'func ExistingFunction()', 'echo "yes"', 'endfunc',
++ \ 'func ExistingFunction()', 'echo "no"', 'endfunc',
++ \ ], 'Xfuncexists')
++ call assert_fails('source Xfuncexists', 'E122:')
++ call assert_equal(1, exists('*ExistingFunction'))
++
++ call delete('Xfuncexists2')
++ call delete('Xfuncexists')
++ delfunc ExistingFunction
++ endfunc
+*** ../vim-8.1.0514/src/userfunc.c 2018-11-04 23:39:33.953644902 +0100
+--- src/userfunc.c 2018-11-10 16:48:35.046279419 +0100
+***************
+*** 2330,2343 ****
+ fp = find_func(name);
+ if (fp != NULL)
+ {
+! if (!eap->forceit)
+ {
+ emsg_funcname(e_funcexts, name);
+ goto erret;
+ }
+ if (fp->uf_calls > 0)
+ {
+! emsg_funcname(N_("E127: Cannot redefine function %s: It is in use"),
+ name);
+ goto erret;
+ }
+--- 2330,2348 ----
+ fp = find_func(name);
+ if (fp != NULL)
+ {
+! // Function can be replaced with "function!" and when sourcing the
+! // same script again, but only once.
+! if (!eap->forceit
+! && (fp->uf_script_ctx.sc_sid != current_sctx.sc_sid
+! || fp->uf_script_ctx.sc_seq == current_sctx.sc_seq))
+ {
+ emsg_funcname(e_funcexts, name);
+ goto erret;
+ }
+ if (fp->uf_calls > 0)
+ {
+! emsg_funcname(
+! N_("E127: Cannot redefine function %s: It is in use"),
+ name);
+ goto erret;
+ }
+*** ../vim-8.1.0514/src/structs.h 2018-10-19 22:35:04.889189955 +0200
+--- src/structs.h 2018-11-10 16:33:16.847566578 +0100
+***************
+*** 84,89 ****
+--- 84,90 ----
+ */
+ typedef struct {
+ scid_T sc_sid; // script ID
++ int sc_seq; // sourcing sequence number
+ linenr_T sc_lnum; // line number
+ } sctx_T;
+
+*** ../vim-8.1.0514/src/globals.h 2018-09-13 15:33:39.609712174 +0200
+--- src/globals.h 2018-11-10 16:33:30.455464981 +0100
+***************
+*** 326,332 ****
+ EXTERN int garbage_collect_at_exit INIT(= FALSE);
+
+ // Script CTX being sourced or was sourced to define the current function.
+! EXTERN sctx_T current_sctx INIT(= {0 COMMA 0});
+ #endif
+
+ EXTERN int did_source_packages INIT(= FALSE);
+--- 326,332 ----
+ EXTERN int garbage_collect_at_exit INIT(= FALSE);
+
+ // Script CTX being sourced or was sourced to define the current function.
+! EXTERN sctx_T current_sctx INIT(= {0 COMMA 0 COMMA 0});
+ #endif
+
+ EXTERN int did_source_packages INIT(= FALSE);
+*** ../vim-8.1.0514/src/buffer.c 2018-10-11 19:27:43.916066156 +0200
+--- src/buffer.c 2018-11-10 16:34:17.031116881 +0100
+***************
+*** 5519,5524 ****
+--- 5519,5525 ----
+ #ifdef FEAT_EVAL
+ save_current_sctx = current_sctx;
+ current_sctx.sc_sid = SID_MODELINE;
++ current_sctx.sc_seq = 0;
+ current_sctx.sc_lnum = 0;
+ #endif
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+*** ../vim-8.1.0514/src/ex_cmds2.c 2018-11-05 20:25:48.804089622 +0100
+--- src/ex_cmds2.c 2018-11-10 16:39:27.217457068 +0100
+***************
+*** 4344,4349 ****
+--- 4344,4350 ----
+ #ifdef FEAT_EVAL
+ sctx_T save_current_sctx;
+ static scid_T last_current_SID = 0;
++ static int last_current_SID_seq = 0;
+ funccal_entry_T funccalp_entry;
+ int save_debug_break_level = debug_break_level;
+ scriptitem_T *si = NULL;
+***************
+*** 4508,4518 ****
+ * Also starts profiling timer for nested script. */
+ save_funccal(&funccalp_entry);
+
+! /*
+! * Check if this script was sourced before to finds its SID.
+! * If it's new, generate a new SID.
+! */
+ save_current_sctx = current_sctx;
+ current_sctx.sc_lnum = 0;
+ # ifdef UNIX
+ stat_ok = (mch_stat((char *)fname_exp, &st) >= 0);
+--- 4509,4519 ----
+ * Also starts profiling timer for nested script. */
+ save_funccal(&funccalp_entry);
+
+! // Check if this script was sourced before to finds its SID.
+! // If it's new, generate a new SID.
+! // Always use a new sequence number.
+ save_current_sctx = current_sctx;
++ current_sctx.sc_seq = ++last_current_SID_seq;
+ current_sctx.sc_lnum = 0;
+ # ifdef UNIX
+ stat_ok = (mch_stat((char *)fname_exp, &st) >= 0);
+*** ../vim-8.1.0514/src/main.c 2018-10-14 21:40:57.356848425 +0200
+--- src/main.c 2018-11-10 16:42:21.260538735 +0100
+***************
+*** 2953,2958 ****
+--- 2953,2959 ----
+ sourcing_name = (char_u *)"command line";
+ #ifdef FEAT_EVAL
+ current_sctx.sc_sid = SID_CARG;
++ current_sctx.sc_seq = 0;
+ #endif
+ for (i = 0; i < parmp->n_commands; ++i)
+ {
+***************
+*** 3183,3188 ****
+--- 3184,3190 ----
+ #ifdef FEAT_EVAL
+ save_current_sctx = current_sctx;
+ current_sctx.sc_sid = SID_ENV;
++ current_sctx.sc_seq = 0;
+ current_sctx.sc_lnum = 0;
+ #endif
+ do_cmdline_cmd(initstr);
+*** ../vim-8.1.0514/src/option.c 2018-11-04 14:40:42.347139567 +0100
+--- src/option.c 2018-11-10 16:48:26.810332143 +0100
+***************
+*** 415,421 ****
+ char_u *def_val[2]; // default values for variable (vi and vim)
+ #ifdef FEAT_EVAL
+ sctx_T script_ctx; // script context where the option was last set
+! # define SCTX_INIT , {0, 0}
+ #else
+ # define SCTX_INIT
+ #endif
+--- 415,421 ----
+ char_u *def_val[2]; // default values for variable (vi and vim)
+ #ifdef FEAT_EVAL
+ sctx_T script_ctx; // script context where the option was last set
+! # define SCTX_INIT , {0, 0, 0}
+ #else
+ # define SCTX_INIT
+ #endif
+***************
+*** 5959,5964 ****
+--- 5959,5965 ----
+ else
+ {
+ script_ctx.sc_sid = set_sid;
++ script_ctx.sc_seq = 0;
+ script_ctx.sc_lnum = 0;
+ }
+ set_option_sctx_idx(idx, opt_flags, script_ctx);
+*** ../vim-8.1.0514/runtime/doc/eval.txt 2018-10-25 12:30:52.270659874 +0200
+--- runtime/doc/eval.txt 2018-11-10 16:52:02.836919520 +0100
+***************
+*** 9658,9666 ****
+ deleted if there are no more references to it.
+ *E127* *E122*
+ When a function by this name already exists and [!] is
+! not used an error message is given. When [!] is used,
+! an existing function is silently replaced. Unless it
+! is currently being executed, that is an error.
+ NOTE: Use ! wisely. If used without care it can cause
+ an existing function to be replaced unexpectedly,
+ which is hard to debug.
+--- 9673,9685 ----
+ deleted if there are no more references to it.
+ *E127* *E122*
+ When a function by this name already exists and [!] is
+! not used an error message is given. There is one
+! exception: When sourcing a script again, a function
+! that was previously defined in that script will be
+! silently replaced.
+! When [!] is used, an existing function is silently
+! replaced. Unless it is currently being executed, that
+! is an error.
+ NOTE: Use ! wisely. If used without care it can cause
+ an existing function to be replaced unexpectedly,
+ which is hard to debug.
+*** ../vim-8.1.0514/src/version.c 2018-11-10 16:01:23.335381858 +0100
+--- src/version.c 2018-11-10 16:26:16.190674882 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 515,
+ /**/
+
+--
+Witches prefer brooms: vacuum-cleaners need extension cords!
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0516 b/data/vim/patches/8.1.0516
new file mode 100644
index 000000000..7e4375b15
--- /dev/null
+++ b/data/vim/patches/8.1.0516
@@ -0,0 +1,165 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0516
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0516
+Problem: :move command marks buffer modified when nothing changed.
+Solution: Do not set 'modified'. Add a test. (Jason Franklin)
+Files: src/Make_all.mak, src/testdir/test_alot.vim,
+ src/testdir/test_move.vim, src/ex_cmds.c
+
+
+*** ../vim-8.1.0515/src/Make_all.mak 2018-09-22 21:36:38.158098521 +0200
+--- src/Make_all.mak 2018-11-10 18:43:06.098433191 +0100
+***************
+*** 123,128 ****
+--- 123,129 ----
+ test_mksession \
+ test_mksession_utf8 \
+ test_modeline \
++ test_move \
+ test_nested_function \
+ test_netbeans \
+ test_normal \
+*** ../vim-8.1.0515/src/testdir/test_alot.vim 2018-09-22 21:36:38.158098521 +0200
+--- src/testdir/test_alot.vim 2018-11-10 18:43:06.098433191 +0100
+***************
+*** 41,46 ****
+--- 41,47 ----
+ source test_menu.vim
+ source test_messages.vim
+ source test_modeline.vim
++ source test_move.vim
+ source test_partial.vim
+ source test_popup.vim
+ source test_put.vim
+*** ../vim-8.1.0515/src/testdir/test_move.vim 2018-11-10 18:54:25.084727968 +0100
+--- src/testdir/test_move.vim 2018-11-10 18:44:27.557751773 +0100
+***************
+*** 0 ****
+--- 1,40 ----
++ " Test the ":move" command.
++
++ func Test_move()
++ enew!
++ call append(0, ['line 1', 'line 2', 'line 3'])
++ g /^$/ delete _
++ set nomodified
++
++ move .
++ call assert_equal(['line 1', 'line 2', 'line 3'], getline(1, 3))
++ call assert_false(&modified)
++
++ 1,2move 0
++ call assert_equal(['line 1', 'line 2', 'line 3'], getline(1, 3))
++ call assert_false(&modified)
++
++ 1,3move 3
++ call assert_equal(['line 1', 'line 2', 'line 3'], getline(1, 3))
++ call assert_false(&modified)
++
++ 1move 2
++ call assert_equal(['line 2', 'line 1', 'line 3'], getline(1, 3))
++ call assert_true(&modified)
++ set nomodified
++
++ 3move 0
++ call assert_equal(['line 3', 'line 2', 'line 1'], getline(1, 3))
++ call assert_true(&modified)
++ set nomodified
++
++ 2,3move 0
++ call assert_equal(['line 2', 'line 1', 'line 3'], getline(1, 3))
++ call assert_true(&modified)
++ set nomodified
++
++ call assert_fails('1,2move 1', 'E134')
++ call assert_fails('2,3move 2', 'E134')
++
++ %bwipeout!
++ endfunc
+*** ../vim-8.1.0515/src/ex_cmds.c 2018-10-11 19:27:43.920066119 +0200
+--- src/ex_cmds.c 2018-11-10 18:47:22.728288132 +0100
+***************
+*** 899,907 ****
+ {
+ char_u *str;
+ linenr_T l;
+! linenr_T extra; /* Num lines added before line1 */
+! linenr_T num_lines; /* Num lines moved */
+! linenr_T last_line; /* Last line in file after adding new text */
+ #ifdef FEAT_FOLDING
+ win_T *win;
+ tabpage_T *tp;
+--- 899,907 ----
+ {
+ char_u *str;
+ linenr_T l;
+! linenr_T extra; // Num lines added before line1
+! linenr_T num_lines; // Num lines moved
+! linenr_T last_line; // Last line in file after adding new text
+ #ifdef FEAT_FOLDING
+ win_T *win;
+ tabpage_T *tp;
+***************
+*** 909,918 ****
+
+ if (dest >= line1 && dest < line2)
+ {
+! EMSG(_("E134: Move lines into themselves"));
+ return FAIL;
+ }
+
+ num_lines = line2 - line1 + 1;
+
+ /*
+--- 909,932 ----
+
+ if (dest >= line1 && dest < line2)
+ {
+! EMSG(_("E134: Cannot move a range of lines into itself"));
+ return FAIL;
+ }
+
++ // Do nothing if we are not actually moving any lines. This will prevent
++ // the 'modified' flag from being set without cause.
++ if (dest == line1 - 1 || dest == line2)
++ {
++ // Move the cursor as if lines were moved (see below) to be backwards
++ // compatible.
++ if (dest >= line1)
++ curwin->w_cursor.lnum = dest;
++ else
++ curwin->w_cursor.lnum = dest + (line2 - line1) + 1;
++
++ return OK;
++ }
++
+ num_lines = line2 - line1 + 1;
+
+ /*
+*** ../vim-8.1.0515/src/version.c 2018-11-10 17:33:23.091518784 +0100
+--- src/version.c 2018-11-10 18:53:56.184980615 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 516,
+ /**/
+
+--
+There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
+Linux, etc, and those who know COBOL. It gets very difficult for me at
+parties, not knowing which group to socialise with :-)
+ Sitaram Chamarty
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0517 b/data/vim/patches/8.1.0517
new file mode 100644
index 000000000..5c5549d3f
--- /dev/null
+++ b/data/vim/patches/8.1.0517
@@ -0,0 +1,64 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0517
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0517
+Problem: Test_window_split_edit_alternate() fails on AppVeyor.
+Solution: Disable the failing part for now.
+Files: src/testdir/test_window_cmd.vim
+
+
+*** ../vim-8.1.0516/src/testdir/test_window_cmd.vim 2018-11-10 16:01:23.331381891 +0100
+--- src/testdir/test_window_cmd.vim 2018-11-10 20:26:30.734372854 +0100
+***************
+*** 125,134 ****
+ call assert_equal(l:nr2, winbufnr(2))
+ only
+
+! " Test the Normal mode command.
+! call feedkeys("\<C-W>\<C-^>", 'tx')
+! call assert_equal(l:nr2, winbufnr(1))
+! call assert_equal(l:nr1, winbufnr(2))
+
+ %bw!
+ endfunc
+--- 125,137 ----
+ call assert_equal(l:nr2, winbufnr(2))
+ only
+
+! " FIXME: this currently fails on AppVeyor, but passes locally
+! if !has('win32')
+! " Test the Normal mode command.
+! call feedkeys("\<C-W>\<C-^>", 'tx')
+! call assert_equal(l:nr2, winbufnr(1))
+! call assert_equal(l:nr1, winbufnr(2))
+! endif
+
+ %bw!
+ endfunc
+*** ../vim-8.1.0516/src/version.c 2018-11-10 18:54:40.660592045 +0100
+--- src/version.c 2018-11-10 19:24:44.341315450 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 517,
+ /**/
+
+--
+ARTHUR: I am your king!
+WOMAN: Well, I didn't vote for you.
+ARTHUR: You don't vote for kings.
+WOMAN: Well, 'ow did you become king then?
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0518 b/data/vim/patches/8.1.0518
new file mode 100644
index 000000000..8e0a18005
--- /dev/null
+++ b/data/vim/patches/8.1.0518
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0518
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0518
+Problem: Test_window_split_edit_bufnr() fails on AppVeyor.
+Solution: Disable the failing part for now.
+Files: src/testdir/test_window_cmd.vim
+
+
+*** ../vim-8.1.0517/src/testdir/test_window_cmd.vim 2018-11-10 20:28:16.185404665 +0100
+--- src/testdir/test_window_cmd.vim 2018-11-10 20:45:34.851482803 +0100
+***************
+*** 150,168 ****
+ let l:bar_nr = bufnr('Xbar')
+ let l:baz_nr = bufnr('Xbaz')
+
+! call feedkeys(l:foo_nr . "\<C-W>\<C-^>", 'tx')
+! call assert_equal('Xfoo', bufname(winbufnr(1)))
+! call assert_equal('Xbaz', bufname(winbufnr(2)))
+! only
+
+! call feedkeys(l:bar_nr . "\<C-W>\<C-^>", 'tx')
+! call assert_equal('Xbar', bufname(winbufnr(1)))
+! call assert_equal('Xfoo', bufname(winbufnr(2)))
+! only
+
+! execute l:baz_nr . 'wincmd ^'
+! call assert_equal('Xbaz', bufname(winbufnr(1)))
+! call assert_equal('Xbar', bufname(winbufnr(2)))
+
+ %bw!
+ endfunc
+--- 150,171 ----
+ let l:bar_nr = bufnr('Xbar')
+ let l:baz_nr = bufnr('Xbaz')
+
+! " FIXME: this currently fails on AppVeyor, but passes locally
+! if !has('win32')
+! call feedkeys(l:foo_nr . "\<C-W>\<C-^>", 'tx')
+! call assert_equal('Xfoo', bufname(winbufnr(1)))
+! call assert_equal('Xbaz', bufname(winbufnr(2)))
+! only
+
+! call feedkeys(l:bar_nr . "\<C-W>\<C-^>", 'tx')
+! call assert_equal('Xbar', bufname(winbufnr(1)))
+! call assert_equal('Xfoo', bufname(winbufnr(2)))
+! only
+
+! execute l:baz_nr . 'wincmd ^'
+! call assert_equal('Xbaz', bufname(winbufnr(1)))
+! call assert_equal('Xbar', bufname(winbufnr(2)))
+! endif
+
+ %bw!
+ endfunc
+*** ../vim-8.1.0517/src/version.c 2018-11-10 20:28:16.185404665 +0100
+--- src/version.c 2018-11-10 20:46:50.738761407 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 518,
+ /**/
+
+--
+WOMAN: Well, 'ow did you become king then?
+ARTHUR: The Lady of the Lake, [angels sing] her arm clad in the purest
+ shimmering samite, held aloft Excalibur from the bosom of the water
+ signifying by Divine Providence that I, Arthur, was to carry
+ Excalibur. [singing stops] That is why I am your king!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0519 b/data/vim/patches/8.1.0519
new file mode 100644
index 000000000..4ccbba9e1
--- /dev/null
+++ b/data/vim/patches/8.1.0519
@@ -0,0 +1,768 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0519
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0519
+Problem: Cannot save and restore the tag stack.
+Solution: Add gettagstack() and settagstack(). (Yegappan Lakshmanan,
+ closes #3604)
+Files: runtime/doc/eval.txt, runtime/doc/tagsrch.txt,
+ runtime/doc/usr_41.txt, src/alloc.h, src/dict.c, src/evalfunc.c,
+ src/list.c, src/misc2.c, src/proto/dict.pro, src/proto/list.pro,
+ src/proto/misc2.pro, src/proto/tag.pro, src/tag.c,
+ src/testdir/test_tagjump.vim
+
+
+*** ../vim-8.1.0518/runtime/doc/eval.txt 2018-11-10 17:33:23.091518784 +0100
+--- runtime/doc/eval.txt 2018-11-11 15:16:01.878631709 +0100
+***************
+*** 2198,2203 ****
+--- 2206,2212 ----
+ any variable {varname} in tab {nr} or {def}
+ gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
+ any {name} in {winnr} in tab page {tabnr}
++ gettagstack([{nr}]) Dict get the tag stack of window {nr}
+ getwininfo([{winid}]) List list of info about each window
+ getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
+ getwinposx() Number X coord in pixels of the Vim window
+***************
+*** 2371,2376 ****
+--- 2379,2386 ----
+ settabwinvar({tabnr}, {winnr}, {varname}, {val})
+ none set {varname} in window {winnr} in tab
+ page {tabnr} to {val}
++ settagstack({nr}, {dict} [, {action}])
++ Number modify tag stack using {dict}
+ setwinvar({nr}, {varname}, {val}) none set {varname} in window {nr} to {val}
+ sha256({string}) String SHA256 checksum of {string}
+ shellescape({string} [, {special}])
+***************
+*** 4959,4964 ****
+--- 4971,5007 ----
+ :let list_is_on = gettabwinvar(1, 2, '&list')
+ :echo "myvar = " . gettabwinvar(3, 1, 'myvar')
+ <
++ To obtain all window-local variables use: >
++ gettabwinvar({tabnr}, {winnr}, '&')
++
++ gettagstack([{nr}]) *gettagstack()*
++ The result is a Dict, which is the tag stack of window {nr}.
++ {nr} can be the window number or the |window-ID|.
++ When {nr} is not specified, the current window is used.
++ When window {nr} doesn't exist, an empty Dict is returned.
++
++ The returned dictionary contains the following entries:
++ curidx Current index in the stack. When at
++ top of the stack, set to (length + 1).
++ Index of bottom of the stack is 1.
++ items List of items in the stack. Each item
++ is a dictionary containing the
++ entries described below.
++ length Number of entries in the stack.
++
++ Each item in the stack is a dictionary with the following
++ entries:
++ bufnr buffer number of the current jump
++ from cursor position before the tag jump.
++ See |getpos()| for the format of the
++ returned list.
++ matchnr current matching tag number. Used when
++ multiple matching tags are found for a
++ name.
++ tagname name of the tag
++
++ See |tagstack| for more information about the tag stack.
++
+ getwininfo([{winid}]) *getwininfo()*
+ Returns information about windows as a List with Dictionaries.
+
+***************
+*** 7522,7527 ****
+--- 7566,7602 ----
+ :call settabwinvar(3, 2, "myvar", "foobar")
+ < This function is not available in the |sandbox|.
+
++ settagstack({nr}, {dict} [, {action}]) *settagstack()*
++ Modify the tag stack of the window {nr} using {dict}.
++ {nr} can be the window number or the |window-ID|.
++
++ For a list of supported items in {dict}, refer to
++ |gettagstack()|
++ *E962*
++ If {action} is not present or is set to 'r', then the tag
++ stack is replaced. If {action} is set to 'a', then new entries
++ from {dict} are pushed onto the tag stack.
++
++ Returns zero for success, -1 for failure.
++
++ Examples:
++ Set current index of the tag stack to 4: >
++ call settagstack(1005, {'curidx' : 4})
++
++ < Empty the tag stack of window 3: >
++ call settagstack(3, {'items' : []})
++
++ < Push a new item onto the tag stack: >
++ let pos = [bufnr('myfile.txt'), 10, 1, 0]
++ let newtag = [{'tagname' : 'mytag', 'from' : pos}]
++ call settagstack(2, {'items' : newtag}, 'a')
++
++ < Save and restore the tag stack: >
++ let stack = gettagstack(1003)
++ " do something else
++ call settagstack(1003, stack)
++ unlet stack
++ <
+ setwinvar({nr}, {varname}, {val}) *setwinvar()*
+ Like |settabwinvar()| for the current tab page.
+ Examples: >
+*** ../vim-8.1.0518/runtime/doc/tagsrch.txt 2018-05-17 13:42:03.000000000 +0200
+--- runtime/doc/tagsrch.txt 2018-11-10 19:23:26.025972138 +0100
+***************
+*** 179,184 ****
+--- 179,187 ----
+ 1 1 main 1 harddisk2:text/vim/test
+ 2 1 FuncB 59 harddisk2:text/vim/src/main.c
+
++ The gettagstack() function returns the tag stack of a specified window. The
++ settagstack() function modifies the tag stack of a window.
++
+ *E73*
+ When you try to use the tag stack while it doesn't contain anything you will
+ get an error message.
+*** ../vim-8.1.0518/runtime/doc/usr_41.txt 2018-05-22 20:35:13.550009275 +0200
+--- runtime/doc/usr_41.txt 2018-11-10 19:23:26.025972138 +0100
+***************
+*** 809,814 ****
+--- 809,815 ----
+ getwininfo() get a list with window information
+ getchangelist() get a list of change list entries
+ getjumplist() get a list of jump list entries
++ swapinfo() information about a swap file
+
+ Command line: *command-line-functions*
+ getcmdline() get the current command line
+***************
+*** 1027,1032 ****
+--- 1028,1035 ----
+
+ taglist() get list of matching tags
+ tagfiles() get a list of tags files
++ gettagstack() get the tag stack
++ settagstack() modify the tag stack
+
+ luaeval() evaluate Lua expression
+ mzeval() evaluate |MzScheme| expression
+*** ../vim-8.1.0518/src/alloc.h 2018-05-01 14:44:41.000000000 +0200
+--- src/alloc.h 2018-11-10 19:23:26.025972138 +0100
+***************
+*** 18,22 ****
+--- 18,25 ----
+ aid_qf_module,
+ aid_qf_errmsg,
+ aid_qf_pattern,
++ aid_tagstack_items,
++ aid_tagstack_from,
++ aid_tagstack_details,
+ aid_last
+ } alloc_id_T;
+*** ../vim-8.1.0518/src/dict.c 2018-07-08 17:18:58.416462371 +0200
+--- src/dict.c 2018-11-10 19:23:26.025972138 +0100
+***************
+*** 47,52 ****
+--- 47,65 ----
+ return d;
+ }
+
++ /*
++ * dict_alloc() with an ID for alloc_fail().
++ */
++ dict_T *
++ dict_alloc_id(alloc_id_T id UNUSED)
++ {
++ #ifdef FEAT_EVAL
++ if (alloc_fail_id == id && alloc_does_fail((long_u)sizeof(list_T)))
++ return NULL;
++ #endif
++ return (dict_alloc());
++ }
++
+ dict_T *
+ dict_alloc_lock(int lock)
+ {
+*** ../vim-8.1.0518/src/evalfunc.c 2018-10-25 13:11:13.111143297 +0200
+--- src/evalfunc.c 2018-11-10 19:23:26.029972104 +0100
+***************
+*** 201,206 ****
+--- 201,207 ----
+ static void f_gettabinfo(typval_T *argvars, typval_T *rettv);
+ static void f_gettabvar(typval_T *argvars, typval_T *rettv);
+ static void f_gettabwinvar(typval_T *argvars, typval_T *rettv);
++ static void f_gettagstack(typval_T *argvars, typval_T *rettv);
+ static void f_getwininfo(typval_T *argvars, typval_T *rettv);
+ static void f_getwinpos(typval_T *argvars, typval_T *rettv);
+ static void f_getwinposx(typval_T *argvars, typval_T *rettv);
+***************
+*** 361,366 ****
+--- 362,368 ----
+ static void f_setreg(typval_T *argvars, typval_T *rettv);
+ static void f_settabvar(typval_T *argvars, typval_T *rettv);
+ static void f_settabwinvar(typval_T *argvars, typval_T *rettv);
++ static void f_settagstack(typval_T *argvars, typval_T *rettv);
+ static void f_setwinvar(typval_T *argvars, typval_T *rettv);
+ #ifdef FEAT_CRYPT
+ static void f_sha256(typval_T *argvars, typval_T *rettv);
+***************
+*** 666,671 ****
+--- 668,674 ----
+ {"gettabinfo", 0, 1, f_gettabinfo},
+ {"gettabvar", 2, 3, f_gettabvar},
+ {"gettabwinvar", 3, 4, f_gettabwinvar},
++ {"gettagstack", 0, 1, f_gettagstack},
+ {"getwininfo", 0, 1, f_getwininfo},
+ {"getwinpos", 0, 1, f_getwinpos},
+ {"getwinposx", 0, 0, f_getwinposx},
+***************
+*** 828,833 ****
+--- 831,837 ----
+ {"setreg", 2, 3, f_setreg},
+ {"settabvar", 3, 3, f_settabvar},
+ {"settabwinvar", 4, 4, f_settabwinvar},
++ {"settagstack", 2, 3, f_settagstack},
+ {"setwinvar", 3, 3, f_setwinvar},
+ #ifdef FEAT_CRYPT
+ {"sha256", 1, 1, f_sha256},
+***************
+*** 5657,5662 ****
+--- 5661,5687 ----
+ }
+
+ /*
++ * "gettagstack()" function
++ */
++ static void
++ f_gettagstack(typval_T *argvars, typval_T *rettv)
++ {
++ win_T *wp = curwin; // default is current window
++
++ if (rettv_dict_alloc(rettv) != OK)
++ return;
++
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ {
++ wp = find_win_by_nr_or_id(&argvars[0]);
++ if (wp == NULL)
++ return;
++ }
++
++ get_tagstack(wp, rettv->vval.v_dict);
++ }
++
++ /*
+ * Returns information about a window as a dictionary.
+ */
+ static dict_T *
+***************
+*** 11119,11124 ****
+--- 11144,11205 ----
+ }
+
+ /*
++ * "settagstack()" function
++ */
++ static void
++ f_settagstack(typval_T *argvars, typval_T *rettv)
++ {
++ static char *e_invact2 = N_("E962: Invalid action: '%s'");
++ win_T *wp;
++ dict_T *d;
++ int action = 'r';
++
++ rettv->vval.v_number = -1;
++
++ // first argument: window number or id
++ wp = find_win_by_nr_or_id(&argvars[0]);
++ if (wp == NULL)
++ return;
++
++ // second argument: dict with items to set in the tag stack
++ if (argvars[1].v_type != VAR_DICT)
++ {
++ EMSG(_(e_dictreq));
++ return;
++ }
++ d = argvars[1].vval.v_dict;
++ if (d == NULL)
++ return;
++
++ // third argument: action - 'a' for append and 'r' for replace.
++ // default is to replace the stack.
++ if (argvars[2].v_type == VAR_UNKNOWN)
++ action = 'r';
++ else if (argvars[2].v_type == VAR_STRING)
++ {
++ char_u *actstr;
++ actstr = get_tv_string_chk(&argvars[2]);
++ if (actstr == NULL)
++ return;
++ if ((*actstr == 'r' || *actstr == 'a') && actstr[1] == NUL)
++ action = *actstr;
++ else
++ {
++ EMSG2(_(e_invact2), actstr);
++ return;
++ }
++ }
++ else
++ {
++ EMSG(_(e_stringreq));
++ return;
++ }
++
++ if (set_tagstack(wp, d, action) == OK)
++ rettv->vval.v_number = 0;
++ }
++
++ /*
+ * "setwinvar()" function
+ */
+ static void
+*** ../vim-8.1.0518/src/list.c 2018-07-25 19:49:41.895812670 +0200
+--- src/list.c 2018-11-10 19:23:26.029972104 +0100
+***************
+*** 86,91 ****
+--- 86,104 ----
+ }
+
+ /*
++ * list_alloc() with an ID for alloc_fail().
++ */
++ list_T *
++ list_alloc_id(alloc_id_T id UNUSED)
++ {
++ #ifdef FEAT_EVAL
++ if (alloc_fail_id == id && alloc_does_fail((long_u)sizeof(list_T)))
++ return NULL;
++ #endif
++ return (list_alloc());
++ }
++
++ /*
+ * Allocate an empty list for a return value, with reference count set.
+ * Returns OK or FAIL.
+ */
+*** ../vim-8.1.0518/src/misc2.c 2018-10-20 20:53:58.147284793 +0200
+--- src/misc2.c 2018-11-10 19:23:26.029972104 +0100
+***************
+*** 835,841 ****
+ #endif /* MEM_PROFILE */
+
+ #ifdef FEAT_EVAL
+! static int
+ alloc_does_fail(long_u size)
+ {
+ if (alloc_fail_countdown == 0)
+--- 835,841 ----
+ #endif /* MEM_PROFILE */
+
+ #ifdef FEAT_EVAL
+! int
+ alloc_does_fail(long_u size)
+ {
+ if (alloc_fail_countdown == 0)
+*** ../vim-8.1.0518/src/proto/dict.pro 2018-07-08 16:50:33.107216836 +0200
+--- src/proto/dict.pro 2018-11-10 19:23:26.029972104 +0100
+***************
+*** 1,5 ****
+--- 1,6 ----
+ /* dict.c */
+ dict_T *dict_alloc(void);
++ dict_T *dict_alloc_id(alloc_id_T id);
+ dict_T *dict_alloc_lock(int lock);
+ int rettv_dict_alloc(typval_T *rettv);
+ void rettv_dict_set(typval_T *rettv, dict_T *d);
+*** ../vim-8.1.0518/src/proto/list.pro 2018-05-17 13:52:42.000000000 +0200
+--- src/proto/list.pro 2018-11-10 19:23:26.029972104 +0100
+***************
+*** 3,8 ****
+--- 3,9 ----
+ void list_rem_watch(list_T *l, listwatch_T *lwrem);
+ void list_fix_watch(list_T *l, listitem_T *item);
+ list_T *list_alloc(void);
++ list_T *list_alloc_id(alloc_id_T id);
+ int rettv_list_alloc(typval_T *rettv);
+ void rettv_list_set(typval_T *rettv, list_T *l);
+ void list_unref(list_T *l);
+*** ../vim-8.1.0518/src/proto/misc2.pro 2018-05-17 13:52:46.000000000 +0200
+--- src/proto/misc2.pro 2018-11-10 19:23:26.029972104 +0100
+***************
+*** 21,26 ****
+--- 21,27 ----
+ int leftcol_changed(void);
+ void vim_mem_profile_dump(void);
+ char_u *alloc(unsigned size);
++ int alloc_does_fail(long_u size);
+ char_u *alloc_id(unsigned size, alloc_id_T id);
+ char_u *alloc_clear(unsigned size);
+ char_u *alloc_check(unsigned size);
+*** ../vim-8.1.0518/src/proto/tag.pro 2018-05-17 13:52:52.000000000 +0200
+--- src/proto/tag.pro 2018-11-10 19:23:26.029972104 +0100
+***************
+*** 9,12 ****
+--- 9,14 ----
+ void simplify_filename(char_u *filename);
+ int expand_tags(int tagnames, char_u *pat, int *num_file, char_u ***file);
+ int get_tags(list_T *list, char_u *pat, char_u *buf_fname);
++ void get_tagstack(win_T *wp, dict_T *retdict);
++ int set_tagstack(win_T *wp, dict_T *d, int action);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0518/src/tag.c 2018-09-30 21:43:17.207693209 +0200
+--- src/tag.c 2018-11-11 15:03:52.375828252 +0100
+***************
+*** 4016,4019 ****
+--- 4016,4219 ----
+ }
+ return ret;
+ }
++
++ /*
++ * Return information about 'tag' in dict 'retdict'.
++ */
++ static void
++ get_tag_details(taggy_T *tag, dict_T *retdict)
++ {
++ list_T *pos;
++ fmark_T *fmark;
++
++ dict_add_string(retdict, "tagname", tag->tagname);
++ dict_add_number(retdict, "matchnr", tag->cur_match + 1);
++ dict_add_number(retdict, "bufnr", tag->cur_fnum);
++
++ if ((pos = list_alloc_id(aid_tagstack_from)) == NULL)
++ return;
++ dict_add_list(retdict, "from", pos);
++
++ fmark = &tag->fmark;
++ list_append_number(pos,
++ (varnumber_T)(fmark->fnum != -1 ? fmark->fnum : 0));
++ list_append_number(pos, (varnumber_T)fmark->mark.lnum);
++ list_append_number(pos, (varnumber_T)(fmark->mark.col == MAXCOL ?
++ MAXCOL : fmark->mark.col + 1));
++ list_append_number(pos, (varnumber_T)fmark->mark.coladd);
++ }
++
++ /*
++ * Return the tag stack entries of the specified window 'wp' in dictionary
++ * 'retdict'.
++ */
++ void
++ get_tagstack(win_T *wp, dict_T *retdict)
++ {
++ list_T *l;
++ int i;
++ dict_T *d;
++
++ dict_add_number(retdict, "length", wp->w_tagstacklen);
++ dict_add_number(retdict, "curidx", wp->w_tagstackidx + 1);
++ l = list_alloc_id(aid_tagstack_items);
++ if (l == NULL)
++ return;
++ dict_add_list(retdict, "items", l);
++
++ for (i = 0; i < wp->w_tagstacklen; i++)
++ {
++ if ((d = dict_alloc_id(aid_tagstack_details)) == NULL)
++ return;
++ list_append_dict(l, d);
++
++ get_tag_details(&wp->w_tagstack[i], d);
++ }
++ }
++
++ /*
++ * Free all the entries in the tag stack of the specified window
++ */
++ static void
++ tagstack_clear(win_T *wp)
++ {
++ int i;
++
++ // Free the current tag stack
++ for (i = 0; i < wp->w_tagstacklen; ++i)
++ vim_free(wp->w_tagstack[i].tagname);
++ wp->w_tagstacklen = 0;
++ wp->w_tagstackidx = 0;
++ }
++
++ /*
++ * Remove the oldest entry from the tag stack and shift the rest of
++ * the entires to free up the top of the stack.
++ */
++ static void
++ tagstack_shift(win_T *wp)
++ {
++ taggy_T *tagstack = wp->w_tagstack;
++ int i;
++
++ vim_free(tagstack[0].tagname);
++ for (i = 1; i < wp->w_tagstacklen; ++i)
++ tagstack[i - 1] = tagstack[i];
++ wp->w_tagstacklen--;
++ }
++
++ /*
++ * Push a new item to the tag stack
++ */
++ static void
++ tagstack_push_item(
++ win_T *wp,
++ char_u *tagname,
++ int cur_fnum,
++ int cur_match,
++ pos_T mark,
++ int fnum)
++ {
++ taggy_T *tagstack = wp->w_tagstack;
++ int idx = wp->w_tagstacklen; // top of the stack
++
++ // if the tagstack is full: remove the oldest entry
++ if (idx >= TAGSTACKSIZE)
++ {
++ tagstack_shift(wp);
++ idx = TAGSTACKSIZE - 1;
++ }
++
++ wp->w_tagstacklen++;
++ tagstack[idx].tagname = tagname;
++ tagstack[idx].cur_fnum = cur_fnum;
++ tagstack[idx].cur_match = cur_match;
++ if (tagstack[idx].cur_match < 0)
++ tagstack[idx].cur_match = 0;
++ tagstack[idx].fmark.mark = mark;
++ tagstack[idx].fmark.fnum = fnum;
++ }
++
++ /*
++ * Add a list of items to the tag stack in the specified window
++ */
++ static void
++ tagstack_push_items(win_T *wp, list_T *l)
++ {
++ listitem_T *li;
++ dictitem_T *di;
++ dict_T *itemdict;
++ char_u *tagname;
++ pos_T mark;
++ int fnum;
++
++ // Add one entry at a time to the tag stack
++ for (li = l->lv_first; li != NULL; li = li->li_next)
++ {
++ if (li->li_tv.v_type != VAR_DICT || li->li_tv.vval.v_dict == NULL)
++ continue; // Skip non-dict items
++ itemdict = li->li_tv.vval.v_dict;
++
++ // parse 'from' for the cursor position before the tag jump
++ if ((di = dict_find(itemdict, (char_u *)"from", -1)) == NULL)
++ continue;
++ if (list2fpos(&di->di_tv, &mark, &fnum, NULL) != OK)
++ continue;
++ if ((tagname =
++ get_dict_string(itemdict, (char_u *)"tagname", TRUE)) == NULL)
++ continue;
++
++ if (mark.col > 0)
++ mark.col--;
++ tagstack_push_item(wp, tagname,
++ (int)get_dict_number(itemdict, (char_u *)"bufnr"),
++ (int)get_dict_number(itemdict, (char_u *)"matchnr") - 1,
++ mark, fnum);
++ }
++ }
++
++ /*
++ * Set the current index in the tag stack. Valid values are between 0
++ * and the stack length (inclusive).
++ */
++ static void
++ tagstack_set_curidx(win_T *wp, int curidx)
++ {
++ wp->w_tagstackidx = curidx;
++ if (wp->w_tagstackidx < 0) // sanity check
++ wp->w_tagstackidx = 0;
++ if (wp->w_tagstackidx > wp->w_tagstacklen)
++ wp->w_tagstackidx = wp->w_tagstacklen;
++ }
++
++ /*
++ * Set the tag stack entries of the specified window.
++ * 'action' is set to either 'a' for append or 'r' for replace.
++ */
++ int
++ set_tagstack(win_T *wp, dict_T *d, int action)
++ {
++ dictitem_T *di;
++ list_T *l;
++
++ if ((di = dict_find(d, (char_u *)"items", -1)) != NULL)
++ {
++ if (di->di_tv.v_type != VAR_LIST)
++ {
++ EMSG(_(e_listreq));
++ return FAIL;
++ }
++ l = di->di_tv.vval.v_list;
++
++ if (action == 'r')
++ tagstack_clear(wp);
++
++ tagstack_push_items(wp, l);
++ }
++
++ if ((di = dict_find(d, (char_u *)"curidx", -1)) != NULL)
++ tagstack_set_curidx(wp, (int)get_tv_number(&di->di_tv) - 1);
++
++ return OK;
++ }
+ #endif
+*** ../vim-8.1.0518/src/testdir/test_tagjump.vim 2018-02-09 18:30:21.000000000 +0100
+--- src/testdir/test_tagjump.vim 2018-11-11 15:09:11.153557467 +0100
+***************
+*** 257,260 ****
+--- 257,369 ----
+ bwipe!
+ endfunc
+
++ " Test for getting and modifying the tag stack
++ func Test_getsettagstack()
++ call writefile(['line1', 'line2', 'line3'], 'Xfile1')
++ call writefile(['line1', 'line2', 'line3'], 'Xfile2')
++ call writefile(['line1', 'line2', 'line3'], 'Xfile3')
++
++ enew | only
++ call settagstack(1, {'items' : []})
++ call assert_equal(0, gettagstack(1).length)
++ call assert_equal([], gettagstack(1).items)
++ " Error cases
++ call assert_equal({}, gettagstack(100))
++ call assert_equal(-1, settagstack(100, {'items' : []}))
++ call assert_fails('call settagstack(1, [1, 10])', 'E715')
++ call assert_fails("call settagstack(1, {'items' : 10})", 'E714')
++ call assert_fails("call settagstack(1, {'items' : []}, 10)", 'E928')
++ call assert_fails("call settagstack(1, {'items' : []}, 'b')", 'E962')
++
++ set tags=Xtags
++ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
++ \ "one\tXfile1\t1",
++ \ "three\tXfile3\t3",
++ \ "two\tXfile2\t2"],
++ \ 'Xtags')
++
++ let stk = []
++ call add(stk, {'bufnr' : bufnr('%'), 'tagname' : 'one',
++ \ 'from' : [bufnr('%'), line('.'), col('.'), 0], 'matchnr' : 1})
++ tag one
++ call add(stk, {'bufnr' : bufnr('%'), 'tagname' : 'two',
++ \ 'from' : [bufnr('%'), line('.'), col('.'), 0], 'matchnr' : 1})
++ tag two
++ call add(stk, {'bufnr' : bufnr('%'), 'tagname' : 'three',
++ \ 'from' : [bufnr('%'), line('.'), col('.'), 0], 'matchnr' : 1})
++ tag three
++ call assert_equal(3, gettagstack(1).length)
++ call assert_equal(stk, gettagstack(1).items)
++ " Check for default - current window
++ call assert_equal(3, gettagstack().length)
++ call assert_equal(stk, gettagstack().items)
++
++ " Try to set current index to invalid values
++ call settagstack(1, {'curidx' : -1})
++ call assert_equal(1, gettagstack().curidx)
++ call settagstack(1, {'curidx' : 50})
++ call assert_equal(4, gettagstack().curidx)
++
++ " Try pushing invalid items onto the stack
++ call settagstack(1, {'items' : []})
++ call settagstack(1, {'items' : ["plate"]}, 'a')
++ call assert_equal(0, gettagstack().length)
++ call assert_equal([], gettagstack().items)
++ call settagstack(1, {'items' : [{"tagname" : "abc"}]}, 'a')
++ call assert_equal(0, gettagstack().length)
++ call assert_equal([], gettagstack().items)
++ call settagstack(1, {'items' : [{"from" : 100}]}, 'a')
++ call assert_equal(0, gettagstack().length)
++ call assert_equal([], gettagstack().items)
++ call settagstack(1, {'items' : [{"from" : [2, 1, 0, 0]}]}, 'a')
++ call assert_equal(0, gettagstack().length)
++ call assert_equal([], gettagstack().items)
++
++ " Push one item at a time to the stack
++ call settagstack(1, {'items' : []})
++ call settagstack(1, {'items' : [stk[0]]}, 'a')
++ call settagstack(1, {'items' : [stk[1]]}, 'a')
++ call settagstack(1, {'items' : [stk[2]]}, 'a')
++ call settagstack(1, {'curidx' : 4})
++ call assert_equal({'length' : 3, 'curidx' : 4, 'items' : stk},
++ \ gettagstack(1))
++
++ " Try pushing items onto a full stack
++ for i in range(7)
++ call settagstack(1, {'items' : stk}, 'a')
++ endfor
++ call assert_equal(20, gettagstack().length)
++ call settagstack(1,
++ \ {'items' : [{'tagname' : 'abc', 'from' : [1, 10, 1, 0]}]}, 'a')
++ call assert_equal('abc', gettagstack().items[19].tagname)
++
++ " Tag with multiple matches
++ call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
++ \ "two\tXfile1\t1",
++ \ "two\tXfile2\t3",
++ \ "two\tXfile3\t2"],
++ \ 'Xtags')
++ call settagstack(1, {'items' : []})
++ tag two
++ tnext
++ tnext
++ call assert_equal(1, gettagstack().length)
++ call assert_equal(3, gettagstack().items[0].matchnr)
++
++ " Memory allocation failures
++ call test_alloc_fail(GetAllocId('tagstack_items'), 0, 0)
++ call assert_fails('call gettagstack()', 'E342:')
++ call test_alloc_fail(GetAllocId('tagstack_from'), 0, 0)
++ call assert_fails('call gettagstack()', 'E342:')
++ call test_alloc_fail(GetAllocId('tagstack_details'), 0, 0)
++ call assert_fails('call gettagstack()', 'E342:')
++
++ call settagstack(1, {'items' : []})
++ call delete('Xfile1')
++ call delete('Xfile2')
++ call delete('Xfile3')
++ call delete('Xtags')
++ set tags&
++ endfunc
++
+ " vim: shiftwidth=2 sts=2 expandtab
+*** ../vim-8.1.0518/src/version.c 2018-11-10 20:47:43.394262832 +0100
+--- src/version.c 2018-11-11 15:18:47.861449349 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 519,
+ /**/
+
+--
+Q: How does a UNIX Guru pick up a girl?
+A: look; grep; which; eval; nice; uname; talk; date;
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0520 b/data/vim/patches/8.1.0520
new file mode 100644
index 000000000..7640610f8
--- /dev/null
+++ b/data/vim/patches/8.1.0520
@@ -0,0 +1,50 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0520
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0520
+Problem: Screen diff test sometimes fails.
+Solution: Add to list of flaky tests.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0519/src/testdir/runtest.vim 2018-10-07 15:42:04.279309175 +0200
+--- src/testdir/runtest.vim 2018-11-11 18:45:38.800483945 +0100
+***************
+*** 279,284 ****
+--- 279,285 ----
+ \ 'Test_collapse_buffers()',
+ \ 'Test_communicate()',
+ \ 'Test_cwd()',
++ \ 'Test_diff_screen()',
+ \ 'Test_exit_callback_interval()',
+ \ 'Test_nb_basic()',
+ \ 'Test_oneshot()',
+*** ../vim-8.1.0519/src/version.c 2018-11-11 15:20:32.436704418 +0100
+--- src/version.c 2018-11-11 18:48:12.159297738 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 520,
+ /**/
+
+--
+ARTHUR: Be quiet!
+DENNIS: Well you can't expect to wield supreme executive power just 'cause
+ some watery tart threw a sword at you!
+ARTHUR: Shut up!
+DENNIS: I mean, if I went around sayin' I was an empereror just because some
+ moistened bint had lobbed a scimitar at me they'd put me away!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0521 b/data/vim/patches/8.1.0521
new file mode 100644
index 000000000..24830fe9b
--- /dev/null
+++ b/data/vim/patches/8.1.0521
@@ -0,0 +1,51 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0521
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0521
+Problem: Cannot build with +eval but without +quickfix.
+Solution: Remove #ifdef for e_stringreq. (John Marriott)
+Files: src/evalfunc.c
+
+
+*** ../vim-8.1.0520/src/evalfunc.c 2018-11-11 15:20:32.432704446 +0100
+--- src/evalfunc.c 2018-11-11 21:21:27.762608082 +0100
+***************
+*** 29,37 ****
+ #endif
+
+ static char *e_listarg = N_("E686: Argument of %s must be a List");
+- #ifdef FEAT_QUICKFIX
+ static char *e_stringreq = N_("E928: String required");
+- #endif
+
+ #ifdef FEAT_FLOAT
+ static void f_abs(typval_T *argvars, typval_T *rettv);
+--- 29,35 ----
+*** ../vim-8.1.0520/src/version.c 2018-11-11 18:51:39.293611339 +0100
+--- src/version.c 2018-11-11 21:22:16.630249881 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 521,
+ /**/
+
+--
+ARTHUR: Shut up! Will you shut up!
+DENNIS: Ah, now we see the violence inherent in the system.
+ARTHUR: Shut up!
+DENNIS: Oh! Come and see the violence inherent in the system!
+ HELP! HELP! I'm being repressed!
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0522 b/data/vim/patches/8.1.0522
new file mode 100644
index 000000000..fb65c6733
--- /dev/null
+++ b/data/vim/patches/8.1.0522
@@ -0,0 +1,82 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0522
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0522
+Problem: :terminal does not show trailing empty lines.
+Solution: Add empty lines. (Hirohito Higashi, closes #3605)
+Files: src/terminal.c, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0521/src/terminal.c 2018-10-23 21:42:55.449760330 +0200
+--- src/terminal.c 2018-11-11 21:52:13.823591882 +0100
+***************
+*** 1592,1597 ****
+--- 1592,1606 ----
+ }
+ }
+
++ // Add trailing empty lines.
++ for (pos.row = term->tl_scrollback.ga_len;
++ pos.row < term->tl_scrollback_scrolled + term->tl_cursor_pos.row;
++ ++pos.row)
++ {
++ if (add_empty_scrollback(term, &fill_attr, 0) == OK)
++ add_scrollback_line_to_buffer(term, (char_u *)"", 0);
++ }
++
+ term->tl_dirty_snapshot = FALSE;
+ #ifdef FEAT_TIMERS
+ term->tl_timer_set = FALSE;
+*** ../vim-8.1.0521/src/testdir/test_terminal.vim 2018-11-03 21:47:10.949346136 +0100
+--- src/testdir/test_terminal.vim 2018-11-11 21:47:20.154059795 +0100
+***************
+*** 1658,1660 ****
+--- 1658,1682 ----
+ call WaitForAssert({-> assert_false(bufexists(bnr))})
+ call assert_equal(1, winnr('$'))
+ endfunc
++
++ func Test_terminal_does_not_truncate_last_newlines()
++ let cmd = has('win32') ? 'type' : 'cat'
++ let contents = [
++ \ [ 'One', '', 'X' ],
++ \ [ 'Two', '', '' ],
++ \ [ 'Three' ] + repeat([''], 30)
++ \ ]
++
++ for c in contents
++ call writefile(c, 'Xfile')
++ exec 'term' cmd 'Xfile'
++ let bnr = bufnr('$')
++ call assert_equal('terminal', getbufvar(bnr, '&buftype'))
++ call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))})
++ sleep 50m
++ call assert_equal(c, getline(1, line('$')))
++ quit
++ endfor
++
++ call delete('Xfile')
++ endfunc
+*** ../vim-8.1.0521/src/version.c 2018-11-11 21:22:53.649977524 +0100
+--- src/version.c 2018-11-11 22:17:05.407532879 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 522,
+ /**/
+
+--
+Seen on the back of a biker's vest: If you can read this, my wife fell off.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0523 b/data/vim/patches/8.1.0523
new file mode 100644
index 000000000..2c5ffa648
--- /dev/null
+++ b/data/vim/patches/8.1.0523
@@ -0,0 +1,403 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0523
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0523
+Problem: Opening window from quickfix leaves empty buffer behind.
+Solution: Add qf_jump_newwin(). (Yegappan Lakshmanan, closes #2574)
+Files: src/proto/quickfix.pro, src/quickfix.c,
+ src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0522/src/proto/quickfix.pro 2018-10-20 20:53:58.143284832 +0200
+--- src/proto/quickfix.pro 2018-11-11 22:45:31.145846186 +0100
+***************
+*** 4,9 ****
+--- 4,10 ----
+ void check_quickfix_busy(void);
+ void copy_loclist_stack(win_T *from, win_T *to);
+ void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
++ void qf_jump_newwin(qf_info_T *qi, int dir, int errornr, int forceit, int newwin);
+ void qf_list(exarg_T *eap);
+ void qf_age(exarg_T *eap);
+ void qf_history(exarg_T *eap);
+*** ../vim-8.1.0522/src/quickfix.c 2018-10-28 14:36:04.222247691 +0100
+--- src/quickfix.c 2018-11-11 22:46:08.525548009 +0100
+***************
+*** 2699,2713 ****
+ }
+
+ /*
+! * Find a help window or open one.
+ */
+ static int
+! jump_to_help_window(qf_info_T *qi, int *opened_window)
+ {
+ win_T *wp;
+ int flags;
+
+! if (cmdmod.tab != 0)
+ wp = NULL;
+ else
+ wp = qf_find_help_win();
+--- 2699,2714 ----
+ }
+
+ /*
+! * Find a help window or open one. If 'newwin' is TRUE, then open a new help
+! * window.
+ */
+ static int
+! jump_to_help_window(qf_info_T *qi, int newwin, int *opened_window)
+ {
+ win_T *wp;
+ int flags;
+
+! if (cmdmod.tab != 0 || newwin)
+ wp = NULL;
+ else
+ wp = qf_find_help_win();
+***************
+*** 2721,2728 ****
+ if (cmdmod.split == 0 && curwin->w_width != Columns
+ && curwin->w_width < 80)
+ flags |= WSP_TOP;
+! if (IS_LL_STACK(qi))
+! flags |= WSP_NEWLOC; // don't copy the location list
+
+ if (win_split(0, flags) == FAIL)
+ return FAIL;
+--- 2722,2731 ----
+ if (cmdmod.split == 0 && curwin->w_width != Columns
+ && curwin->w_width < 80)
+ flags |= WSP_TOP;
+! // If the user asks to open a new window, then copy the location list.
+! // Otherwise, don't copy the location list.
+! if (IS_LL_STACK(qi) && !newwin)
+! flags |= WSP_NEWLOC;
+
+ if (win_split(0, flags) == FAIL)
+ return FAIL;
+***************
+*** 2732,2740 ****
+ if (curwin->w_height < p_hh)
+ win_setheight((int)p_hh);
+
+! if (IS_LL_STACK(qi)) // not a quickfix list
+ {
+- // The new window should use the supplied location list
+ curwin->w_llist = qi;
+ qi->qf_refcount++;
+ }
+--- 2735,2745 ----
+ if (curwin->w_height < p_hh)
+ win_setheight((int)p_hh);
+
+! // When using location list, the new window should use the supplied
+! // location list. If the user asks to open a new window, then the new
+! // window will get a copy of the location list.
+! if (IS_LL_STACK(qi) && !newwin)
+ {
+ curwin->w_llist = qi;
+ qi->qf_refcount++;
+ }
+***************
+*** 2915,2934 ****
+ /*
+ * Find a suitable window for opening a file (qf_fnum) from the
+ * quickfix/location list and jump to it. If the file is already opened in a
+! * window, jump to it. Otherwise open a new window to display the file. This is
+! * called from either a quickfix or a location list window.
+ */
+ static int
+! qf_jump_to_usable_window(int qf_fnum, int *opened_window)
+ {
+ win_T *usable_win_ptr = NULL;
+ int usable_win;
+! qf_info_T *ll_ref;
+ win_T *win;
+
+ usable_win = 0;
+
+! ll_ref = curwin->w_llist_ref;
+ if (ll_ref != NULL)
+ {
+ // Find a non-quickfix window with this location list
+--- 2920,2945 ----
+ /*
+ * Find a suitable window for opening a file (qf_fnum) from the
+ * quickfix/location list and jump to it. If the file is already opened in a
+! * window, jump to it. Otherwise open a new window to display the file. If
+! * 'newwin' is TRUE, then always open a new window. This is called from either
+! * a quickfix or a location list window.
+ */
+ static int
+! qf_jump_to_usable_window(int qf_fnum, int newwin, int *opened_window)
+ {
+ win_T *usable_win_ptr = NULL;
+ int usable_win;
+! qf_info_T *ll_ref = NULL;
+ win_T *win;
+
+ usable_win = 0;
+
+! // If opening a new window, then don't use the location list referred by
+! // the current window. Otherwise two windows will refer to the same
+! // location list.
+! if (!newwin)
+! ll_ref = curwin->w_llist_ref;
+!
+ if (ll_ref != NULL)
+ {
+ // Find a non-quickfix window with this location list
+***************
+*** 2952,2958 ****
+
+ // If there is only one window and it is the quickfix window, create a
+ // new one above the quickfix window.
+! if ((ONE_WINDOW && bt_quickfix(curbuf)) || !usable_win)
+ {
+ if (qf_open_new_file_win(ll_ref) != OK)
+ return FAIL;
+--- 2963,2969 ----
+
+ // If there is only one window and it is the quickfix window, create a
+ // new one above the quickfix window.
+! if ((ONE_WINDOW && bt_quickfix(curbuf)) || !usable_win || newwin)
+ {
+ if (qf_open_new_file_win(ll_ref) != OK)
+ return FAIL;
+***************
+*** 3146,3162 ****
+
+ /*
+ * Find a usable window for opening a file from the quickfix/location list. If
+! * a window is not found then open a new window.
+ * Returns OK if successfully jumped or opened a window. Returns FAIL if not
+ * able to jump/open a window. Returns NOTDONE if a file is not associated
+ * with the entry.
+ */
+ static int
+! qf_jump_open_window(qf_info_T *qi, qfline_T *qf_ptr, int *opened_window)
+ {
+ // For ":helpgrep" find a help window or open one.
+ if (qf_ptr->qf_type == 1 && (!bt_help(curwin->w_buffer) || cmdmod.tab != 0))
+! if (jump_to_help_window(qi, opened_window) == FAIL)
+ return FAIL;
+
+ // If currently in the quickfix window, find another window to show the
+--- 3157,3178 ----
+
+ /*
+ * Find a usable window for opening a file from the quickfix/location list. If
+! * a window is not found then open a new window. If 'newwin' is TRUE, then open
+! * a new window.
+ * Returns OK if successfully jumped or opened a window. Returns FAIL if not
+ * able to jump/open a window. Returns NOTDONE if a file is not associated
+ * with the entry.
+ */
+ static int
+! qf_jump_open_window(
+! qf_info_T *qi,
+! qfline_T *qf_ptr,
+! int newwin,
+! int *opened_window)
+ {
+ // For ":helpgrep" find a help window or open one.
+ if (qf_ptr->qf_type == 1 && (!bt_help(curwin->w_buffer) || cmdmod.tab != 0))
+! if (jump_to_help_window(qi, newwin, opened_window) == FAIL)
+ return FAIL;
+
+ // If currently in the quickfix window, find another window to show the
+***************
+*** 3168,3174 ****
+ if (qf_ptr->qf_fnum == 0)
+ return NOTDONE;
+
+! if (qf_jump_to_usable_window(qf_ptr->qf_fnum, opened_window) == FAIL)
+ return FAIL;
+ }
+
+--- 3184,3191 ----
+ if (qf_ptr->qf_fnum == 0)
+ return NOTDONE;
+
+! if (qf_jump_to_usable_window(qf_ptr->qf_fnum, newwin,
+! opened_window) == FAIL)
+ return FAIL;
+ }
+
+***************
+*** 3229,3241 ****
+ }
+
+ /*
+! * jump to a quickfix line
+! * if dir == FORWARD go "errornr" valid entries forward
+! * if dir == BACKWARD go "errornr" valid entries backward
+! * if dir == FORWARD_FILE go "errornr" valid entries files backward
+! * if dir == BACKWARD_FILE go "errornr" valid entries files backward
+ * else if "errornr" is zero, redisplay the same line
+! * else go to entry "errornr"
+ */
+ void
+ qf_jump(qf_info_T *qi,
+--- 3246,3258 ----
+ }
+
+ /*
+! * Jump to a quickfix line.
+! * If dir == FORWARD go "errornr" valid entries forward.
+! * If dir == BACKWARD go "errornr" valid entries backward.
+! * If dir == FORWARD_FILE go "errornr" valid entries files backward.
+! * If dir == BACKWARD_FILE go "errornr" valid entries files backward
+ * else if "errornr" is zero, redisplay the same line
+! * else go to entry "errornr".
+ */
+ void
+ qf_jump(qf_info_T *qi,
+***************
+*** 3243,3248 ****
+--- 3260,3279 ----
+ int errornr,
+ int forceit)
+ {
++ qf_jump_newwin(qi, dir, errornr, forceit, FALSE);
++ }
++
++ /*
++ * As qf_info().
++ * If 'newwin' is TRUE, then open the file in a new window.
++ */
++ void
++ qf_jump_newwin(qf_info_T *qi,
++ int dir,
++ int errornr,
++ int forceit,
++ int newwin)
++ {
+ qf_list_T *qfl;
+ qfline_T *qf_ptr;
+ qfline_T *old_qf_ptr;
+***************
+*** 3288,3294 ****
+ // window
+ print_message = FALSE;
+
+! retval = qf_jump_open_window(qi, qf_ptr, &opened_window);
+ if (retval == FAIL)
+ goto failed;
+ if (retval == NOTDONE)
+--- 3319,3325 ----
+ // window
+ print_message = FALSE;
+
+! retval = qf_jump_open_window(qi, qf_ptr, newwin, &opened_window);
+ if (retval == FAIL)
+ goto failed;
+ if (retval == NOTDONE)
+***************
+*** 3824,3836 ****
+
+ if (split)
+ {
+! char_u cmd[32];
+!
+! vim_snprintf((char *)cmd, sizeof(cmd), "split +%ld%s",
+! (long)curwin->w_cursor.lnum,
+! IS_LL_WINDOW(curwin) ? "ll" : "cc");
+! if (do_cmdline_cmd(cmd) == OK)
+! do_cmdline_cmd((char_u *) "clearjumps");
+ return;
+ }
+
+--- 3855,3863 ----
+
+ if (split)
+ {
+! // Open the selected entry in a new window
+! qf_jump_newwin(qi, 0, (long)curwin->w_cursor.lnum, FALSE, TRUE);
+! do_cmdline_cmd((char_u *) "clearjumps");
+ return;
+ }
+
+*** ../vim-8.1.0522/src/testdir/test_quickfix.vim 2018-10-28 14:36:04.222247691 +0100
+--- src/testdir/test_quickfix.vim 2018-11-11 22:46:08.525548009 +0100
+***************
+*** 3718,3720 ****
+--- 3718,3766 ----
+ call assert_equal(getcurpos()[4], virtcol('.'))
+ cclose | helpclose
+ endfunc
++
++ " Test for opening a file from the quickfix window using CTRL-W <Enter>
++ " doesn't leave an empty buffer around.
++ func Test_splitview()
++ call s:create_test_file('Xtestfile1')
++ call s:create_test_file('Xtestfile2')
++ new | only
++ let last_bufnr = bufnr('Test_sv_1', 1)
++ let l = ['Xtestfile1:2:Line2', 'Xtestfile2:4:Line4']
++ cgetexpr l
++ copen
++ let numbufs = len(getbufinfo())
++ exe "normal \<C-W>\<CR>"
++ copen
++ exe "normal j\<C-W>\<CR>"
++ " Make sure new empty buffers are not created
++ call assert_equal(numbufs, len(getbufinfo()))
++ " Creating a new buffer should use the next available buffer number
++ call assert_equal(last_bufnr + 4, bufnr("Test_sv_2", 1))
++ bwipe Test_sv_1
++ bwipe Test_sv_2
++ new | only
++
++ " When split opening files from location list window, make sure that two
++ " windows doesn't refer to the same location list
++ lgetexpr l
++ let locid = getloclist(0, {'id' : 0}).id
++ lopen
++ exe "normal \<C-W>\<CR>"
++ call assert_notequal(locid, getloclist(0, {'id' : 0}).id)
++ call assert_equal(0, getloclist(0, {'winid' : 0}).winid)
++ new | only
++
++ " When split opening files from a helpgrep location list window, a new help
++ " window should be opend with a copy of the location list.
++ lhelpgrep window
++ let locid = getloclist(0, {'id' : 0}).id
++ lwindow
++ exe "normal j\<C-W>\<CR>"
++ call assert_notequal(locid, getloclist(0, {'id' : 0}).id)
++ call assert_equal(0, getloclist(0, {'winid' : 0}).winid)
++ new | only
++
++ call delete('Xtestfile1')
++ call delete('Xtestfile2')
++ endfunc
+*** ../vim-8.1.0522/src/version.c 2018-11-11 22:18:17.214948188 +0100
+--- src/version.c 2018-11-11 22:49:25.382976159 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 523,
+ /**/
+
+--
+ARTHUR: Bloody peasant!
+DENNIS: Oh, what a give away. Did you hear that, did you hear that, eh?
+ That's what I'm on about -- did you see him repressing me, you saw it
+ didn't you?
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0524 b/data/vim/patches/8.1.0524
new file mode 100644
index 000000000..fe9ee5258
--- /dev/null
+++ b/data/vim/patches/8.1.0524
@@ -0,0 +1,63 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0524
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0524 (after 8.1.0522)
+Problem: Terminal test fails on Windows.
+Solution: Skip Test_terminal_does_not_truncate_last_newlines() for now.
+Files: src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0523/src/testdir/test_terminal.vim 2018-11-11 22:18:17.214948188 +0100
+--- src/testdir/test_terminal.vim 2018-11-11 23:13:11.944813440 +0100
+***************
+*** 1660,1666 ****
+ endfunc
+
+ func Test_terminal_does_not_truncate_last_newlines()
+! let cmd = has('win32') ? 'type' : 'cat'
+ let contents = [
+ \ [ 'One', '', 'X' ],
+ \ [ 'Two', '', '' ],
+--- 1660,1671 ----
+ endfunc
+
+ func Test_terminal_does_not_truncate_last_newlines()
+! " FIXME: currently doens't work for Windows
+! if has('win32')
+! return
+! endif
+!
+! let cmd = 'cat'
+ let contents = [
+ \ [ 'One', '', 'X' ],
+ \ [ 'Two', '', '' ],
+*** ../vim-8.1.0523/src/version.c 2018-11-11 22:50:20.810297803 +0100
+--- src/version.c 2018-11-11 23:14:17.976227493 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 524,
+ /**/
+
+--
+ARTHUR: You fight with the strength of many men, Sir knight.
+ I am Arthur, King of the Britons. [pause]
+ I seek the finest and the bravest knights in the land to join me
+ in my Court of Camelot. [pause]
+ You have proved yourself worthy; will you join me? [pause]
+ You make me sad. So be it. Come, Patsy.
+BLACK KNIGHT: None shall pass.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0525 b/data/vim/patches/8.1.0525
new file mode 100644
index 000000000..ddfdf1982
--- /dev/null
+++ b/data/vim/patches/8.1.0525
@@ -0,0 +1,122 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0525
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0525 (after 8.1.0524)
+Problem: Terminal test skips part on Windows.
+Solution: Fix Test_terminal_does_not_truncate_last_newlines(). (Hirohito
+ Higashi, closes #3606)
+Files: src/Make_mvc.mak, src/testdir/test_terminal.vim
+
+
+*** ../vim-8.1.0524/src/Make_mvc.mak 2018-10-14 16:25:04.904583951 +0200
+--- src/Make_mvc.mak 2018-11-12 21:38:15.892341805 +0100
+***************
+*** 1269,1275 ****
+
+
+ tags: notags
+! $(CTAGS) *.c *.cpp *.h if_perl.xs
+
+ notags:
+ - if exist tags del tags
+--- 1269,1276 ----
+
+
+ tags: notags
+! $(CTAGS) *.c *.cpp *.h
+! if exist auto\if_perl.c $(CTAGS) --append=yes auto\if_perl.c
+
+ notags:
+ - if exist tags del tags
+***************
+*** 1323,1329 ****
+ $(MAKE) /NOLOGO -f Make_dos.mak nolog
+ $(MAKE) /NOLOGO -f Make_dos.mak $@.res
+ $(MAKE) /NOLOGO -f Make_dos.mak report
+! cat messages
+ cd ..
+
+ ###########################################################################
+--- 1324,1330 ----
+ $(MAKE) /NOLOGO -f Make_dos.mak nolog
+ $(MAKE) /NOLOGO -f Make_dos.mak $@.res
+ $(MAKE) /NOLOGO -f Make_dos.mak report
+! type messages
+ cd ..
+
+ ###########################################################################
+*** ../vim-8.1.0524/src/testdir/test_terminal.vim 2018-11-11 23:14:51.315932322 +0100
+--- src/testdir/test_terminal.vim 2018-11-12 21:41:03.074839648 +0100
+***************
+*** 1660,1671 ****
+ endfunc
+
+ func Test_terminal_does_not_truncate_last_newlines()
+- " FIXME: currently doens't work for Windows
+- if has('win32')
+- return
+- endif
+-
+- let cmd = 'cat'
+ let contents = [
+ \ [ 'One', '', 'X' ],
+ \ [ 'Two', '', '' ],
+--- 1660,1665 ----
+***************
+*** 1674,1684 ****
+
+ for c in contents
+ call writefile(c, 'Xfile')
+! exec 'term' cmd 'Xfile'
+ let bnr = bufnr('$')
+ call assert_equal('terminal', getbufvar(bnr, '&buftype'))
+ call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))})
+! sleep 50m
+ call assert_equal(c, getline(1, line('$')))
+ quit
+ endfor
+--- 1668,1682 ----
+
+ for c in contents
+ call writefile(c, 'Xfile')
+! if has('win32')
+! term cmd /c type Xfile
+! else
+! term cat Xfile
+! endif
+ let bnr = bufnr('$')
+ call assert_equal('terminal', getbufvar(bnr, '&buftype'))
+ call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))})
+! sleep 100m
+ call assert_equal(c, getline(1, line('$')))
+ quit
+ endfor
+*** ../vim-8.1.0524/src/version.c 2018-11-11 23:14:51.315932322 +0100
+--- src/version.c 2018-11-12 21:42:01.334323241 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 525,
+ /**/
+
+--
+BLACK KNIGHT: I move for no man.
+ARTHUR: So be it!
+ [hah] [parry thrust]
+ [ARTHUR chops the BLACK KNIGHT's left arm off]
+ARTHUR: Now stand aside, worthy adversary.
+BLACK KNIGHT: 'Tis but a scratch.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0526 b/data/vim/patches/8.1.0526
new file mode 100644
index 000000000..470391882
--- /dev/null
+++ b/data/vim/patches/8.1.0526
@@ -0,0 +1,57 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0526
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0526
+Problem: Running out of signal stack in RealWaitForChar. (Vladimir Marek)
+Solution: Make the fd_set variables static.
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0525/src/os_unix.c 2018-09-30 21:43:17.203693237 +0200
+--- src/os_unix.c 2018-11-12 21:44:50.744848498 +0100
+***************
+*** 6194,6200 ****
+
+ struct timeval tv;
+ struct timeval *tvp;
+! fd_set rfds, wfds, efds;
+ int maxfd;
+ long towait = msec;
+
+--- 6194,6202 ----
+
+ struct timeval tv;
+ struct timeval *tvp;
+! // These are static because they can take 8 Kbyte each and cause the
+! // signal stack to run out with -O3.
+! static fd_set rfds, wfds, efds;
+ int maxfd;
+ long towait = msec;
+
+*** ../vim-8.1.0525/src/version.c 2018-11-12 21:42:20.678152930 +0100
+--- src/version.c 2018-11-12 21:43:28.949556003 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 526,
+ /**/
+
+--
+ARTHUR: A scratch? Your arm's off!
+BLACK KNIGHT: No, it isn't.
+ARTHUR: Well, what's that then?
+BLACK KNIGHT: I've had worse.
+ The Quest for the Holy Grail (Monty Python)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0527 b/data/vim/patches/8.1.0527
new file mode 100644
index 000000000..60d3e0e74
--- /dev/null
+++ b/data/vim/patches/8.1.0527
@@ -0,0 +1,62 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0527
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0527
+Problem: Using 'shiftwidth' from wrong buffer for folding.
+Solution: Use "buf" instead of "curbuf". (Christian Brabandt)
+Files: src/fold.c
+
+
+*** ../vim-8.1.0526/src/fold.c 2017-09-16 19:50:08.000000000 +0200
+--- src/fold.c 2018-11-14 21:40:01.495215394 +0100
+***************
+*** 155,160 ****
+--- 155,161 ----
+ int low_level = 0;
+
+ checkupdate(win);
++
+ /*
+ * Return quickly when there is no folding at all in this window.
+ */
+***************
+*** 3219,3225 ****
+ flp->lvl = -1;
+ }
+ else
+! flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(curbuf);
+ if (flp->lvl > flp->wp->w_p_fdn)
+ {
+ flp->lvl = flp->wp->w_p_fdn;
+--- 3220,3226 ----
+ flp->lvl = -1;
+ }
+ else
+! flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(buf);
+ if (flp->lvl > flp->wp->w_p_fdn)
+ {
+ flp->lvl = flp->wp->w_p_fdn;
+*** ../vim-8.1.0526/src/version.c 2018-11-12 21:45:04.596729428 +0100
+--- src/version.c 2018-11-14 21:45:09.316748673 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 527,
+ /**/
+
+--
+If your life is a hard drive,
+Christ can be your backup.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0528 b/data/vim/patches/8.1.0528
new file mode 100644
index 000000000..bdccfaca0
--- /dev/null
+++ b/data/vim/patches/8.1.0528
@@ -0,0 +1,797 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0528
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0528
+Problem: Various typos in comments.
+Solution: Fix the typos.
+Files: src/fileio.c, src/gui.c, src/macros.h, src/screen.c, src/search.c,
+ src/spell.c, src/spellfile.c, src/vim.h, src/testdir/README.txt,
+ src/INSTALL, src/gui_athena.c, src/gui_gtk.c,
+ src/gui_gtk_x11.c, src/gui_motif.c, src/gui_xmebw.c,
+ src/if_tcl.c, src/os_amiga.c, src/gui_w32.c, src/os_win32.c,
+ src/gui_mac.c, src/os_vms_fix.com
+
+
+*** ../vim-8.1.0527/src/fileio.c 2018-10-14 21:40:57.352848455 +0200
+--- src/fileio.c 2018-10-23 21:33:23.638928974 +0200
+***************
+*** 8086,8092 ****
+
+ /*
+ * Add an autocmd group name.
+! * Return it's ID. Returns AUGROUP_ERROR (< 0) for error.
+ */
+ static int
+ au_new_group(char_u *name)
+--- 8086,8092 ----
+
+ /*
+ * Add an autocmd group name.
+! * Return its ID. Returns AUGROUP_ERROR (< 0) for error.
+ */
+ static int
+ au_new_group(char_u *name)
+***************
+*** 8153,8159 ****
+
+ /*
+ * Find the ID of an autocmd group name.
+! * Return it's ID. Returns AUGROUP_ERROR (< 0) for error.
+ */
+ static int
+ au_find_group(char_u *name)
+--- 8153,8159 ----
+
+ /*
+ * Find the ID of an autocmd group name.
+! * Return its ID. Returns AUGROUP_ERROR (< 0) for error.
+ */
+ static int
+ au_find_group(char_u *name)
+*** ../vim-8.1.0527/src/gui.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 5501,5507 ****
+ p = NULL;
+
+ /* Handle the drop, :edit or :split to get to the file. This also
+! * frees fnames[]. Skip this if there is only one item it's a
+ * directory and Shift is held down. */
+ if (count == 1 && (modifiers & MOUSE_SHIFT) != 0
+ && mch_isdir(fnames[0]))
+--- 5501,5507 ----
+ p = NULL;
+
+ /* Handle the drop, :edit or :split to get to the file. This also
+! * frees fnames[]. Skip this if there is only one item, it's a
+ * directory and Shift is held down. */
+ if (count == 1 && (modifiers & MOUSE_SHIFT) != 0
+ && mch_isdir(fnames[0]))
+*** ../vim-8.1.0527/src/macros.h 2018-07-29 16:09:14.644945560 +0200
+--- src/macros.h 2018-10-23 21:33:23.646928902 +0200
+***************
+*** 192,198 ****
+ # define mch_access(n, p) access((n), (p))
+ # endif
+ # define mch_fstat(n, p) fstat((n), (p))
+! # ifdef MSWIN /* has it's own mch_stat() function */
+ # define mch_stat(n, p) vim_stat((n), (p))
+ # else
+ # ifdef STAT_IGNORES_SLASH
+--- 192,198 ----
+ # define mch_access(n, p) access((n), (p))
+ # endif
+ # define mch_fstat(n, p) fstat((n), (p))
+! # ifdef MSWIN /* has its own mch_stat() function */
+ # define mch_stat(n, p) vim_stat((n), (p))
+ # else
+ # ifdef STAT_IGNORES_SLASH
+*** ../vim-8.1.0527/src/screen.c 2018-10-02 21:48:30.641640211 +0200
+--- src/screen.c 2018-10-23 21:33:23.646928902 +0200
+***************
+*** 6223,6229 ****
+ * first highlighted character. The stop-highlighting code must
+ * be written with the cursor just after the last highlighted
+ * character.
+! * Overwriting a character doesn't remove it's highlighting. Need
+ * to clear the rest of the line, and force redrawing it
+ * completely.
+ */
+--- 6223,6229 ----
+ * first highlighted character. The stop-highlighting code must
+ * be written with the cursor just after the last highlighted
+ * character.
+! * Overwriting a character doesn't remove its highlighting. Need
+ * to clear the rest of the line, and force redrawing it
+ * completely.
+ */
+*** ../vim-8.1.0527/src/search.c 2018-09-30 21:43:17.203693237 +0200
+--- src/search.c 2018-10-23 21:33:23.646928902 +0200
+***************
+*** 357,365 ****
+ * Save and restore the search pattern for incremental highlight search
+ * feature.
+ *
+! * It's similar but differnt from save_search_patterns() and
+ * restore_search_patterns(), because the search pattern must be restored when
+! * cannceling incremental searching even if it's called inside user functions.
+ */
+ void
+ save_last_search_pattern(void)
+--- 357,365 ----
+ * Save and restore the search pattern for incremental highlight search
+ * feature.
+ *
+! * It's similar to but different from save_search_patterns() and
+ * restore_search_patterns(), because the search pattern must be restored when
+! * canceling incremental searching even if it's called inside user functions.
+ */
+ void
+ save_last_search_pattern(void)
+***************
+*** 2869,2875 ****
+ }
+ #endif
+
+! /* POSIX has it's own ideas of what a paragraph boundary is and it
+ * doesn't match historical Vi: It also stops at a "{" in the
+ * first column and at an empty line. */
+ if (!first && did_skip && (startPS(curr, what, both)
+--- 2869,2875 ----
+ }
+ #endif
+
+! /* POSIX has its own ideas of what a paragraph boundary is and it
+ * doesn't match historical Vi: It also stops at a "{" in the
+ * first column and at an empty line. */
+ if (!first && did_skip && (startPS(curr, what, both)
+*** ../vim-8.1.0527/src/spell.c 2018-09-30 21:43:17.203693237 +0200
+--- src/spell.c 2018-10-23 21:33:23.646928902 +0200
+***************
+*** 2686,2692 ****
+
+ /*
+ * Find the region "region[2]" in "rp" (points to "sl_regions").
+! * Each region is simply stored as the two characters of it's name.
+ * Returns the index if found (first is 0), REGION_ALL if not found.
+ */
+ static int
+--- 2686,2692 ----
+
+ /*
+ * Find the region "region[2]" in "rp" (points to "sl_regions").
+! * Each region is simply stored as the two characters of its name.
+ * Returns the index if found (first is 0), REGION_ALL if not found.
+ */
+ static int
+*** ../vim-8.1.0527/src/spellfile.c 2018-09-30 21:43:17.203693237 +0200
+--- src/spellfile.c 2018-10-23 21:33:23.650928864 +0200
+***************
+*** 3784,3790 ****
+ if (get_affitem(affile->af_flagtype, &p) != 0)
+ {
+ /* A flag is a postponed prefix flag if it appears in "af_pref"
+! * and it's ID is not zero. */
+ vim_strncpy(key, prevp, p - prevp);
+ hi = hash_find(&affile->af_pref, key);
+ if (!HASHITEM_EMPTY(hi))
+--- 3784,3790 ----
+ if (get_affitem(affile->af_flagtype, &p) != 0)
+ {
+ /* A flag is a postponed prefix flag if it appears in "af_pref"
+! * and its ID is not zero. */
+ vim_strncpy(key, prevp, p - prevp);
+ hi = hash_find(&affile->af_pref, key);
+ if (!HASHITEM_EMPTY(hi))
+*** ../vim-8.1.0527/src/vim.h 2018-10-07 23:16:33.134616234 +0200
+--- src/vim.h 2018-10-23 20:29:03.588597981 +0200
+***************
+*** 1270,1276 ****
+ EVENT_BUFWRITECMD, // write buffer using command
+ EVENT_BUFWRITEPOST, // after writing a buffer
+ EVENT_BUFWRITEPRE, // before writing a buffer
+! EVENT_CMDLINECHANGED, // command line was modified*/
+ EVENT_CMDLINEENTER, // after entering the command line
+ EVENT_CMDLINELEAVE, // before leaving the command line
+ EVENT_CMDUNDEFINED, // command undefined
+--- 1270,1276 ----
+ EVENT_BUFWRITECMD, // write buffer using command
+ EVENT_BUFWRITEPOST, // after writing a buffer
+ EVENT_BUFWRITEPRE, // before writing a buffer
+! EVENT_CMDLINECHANGED, // command line was modified
+ EVENT_CMDLINEENTER, // after entering the command line
+ EVENT_CMDLINELEAVE, // before leaving the command line
+ EVENT_CMDUNDEFINED, // command undefined
+*** ../vim-8.1.0527/src/testdir/README.txt 2018-09-09 15:56:03.143904759 +0200
+--- src/testdir/README.txt 2018-09-16 14:26:14.690949666 +0200
+***************
+*** 54,60 ****
+
+ TO ADD A SCREEN DUMP TEST:
+
+! Mostly the same as writing a new style test. Additonally, see help on
+ "terminal-dumptest". Put the reference dump in "dumps/Test_func_name.dump".
+
+
+--- 54,60 ----
+
+ TO ADD A SCREEN DUMP TEST:
+
+! Mostly the same as writing a new style test. Additionally, see help on
+ "terminal-dumptest". Put the reference dump in "dumps/Test_func_name.dump".
+
+
+*** ../vim-8.1.0527/src/INSTALL 2016-11-12 20:11:25.000000000 +0100
+--- src/INSTALL 2018-09-08 15:56:45.698920295 +0200
+***************
+*** 11,20 ****
+
+ See INSTALLami.txt for Amiga
+ See INSTALLmac.txt for Macintosh
+! See INSTALLpc.txt for PC (Windows 95/98/NT/XP/Vista/7/8/10)
+ See INSTALLvms.txt for VMS
+ See INSTALLx.txt for cross-compiling on Unix
+! See ../README_390.txt for OS/390 Unix
+ See ../runtime/doc/os_beos.txt for BeBox
+
+
+--- 11,20 ----
+
+ See INSTALLami.txt for Amiga
+ See INSTALLmac.txt for Macintosh
+! See INSTALLpc.txt for PC (Windows XP/Vista/7/8/10)
+ See INSTALLvms.txt for VMS
+ See INSTALLx.txt for cross-compiling on Unix
+! See ../READMEdir/README_390.txt for z/OS and OS/390 Unix
+ See ../runtime/doc/os_beos.txt for BeBox
+
+
+*** ../vim-8.1.0527/src/gui_athena.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_athena.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 900,906 ****
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XtNfontSet, gui.menu_fontset, NULL);
+! /* We should force the widget to recalculate it's
+ * geometry now. */
+ XtManageChild(id);
+ }
+--- 900,906 ----
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XtNfontSet, gui.menu_fontset, NULL);
+! /* We should force the widget to recalculate its
+ * geometry now. */
+ XtManageChild(id);
+ }
+***************
+*** 929,935 ****
+ if (has_submenu(id))
+ XtVaSetValues(id, XtNrightBitmap, pullerBitmap, NULL);
+
+! /* Force the widget to recalculate it's geometry now. */
+ if (managed)
+ XtManageChild(id);
+ }
+--- 929,935 ----
+ if (has_submenu(id))
+ XtVaSetValues(id, XtNrightBitmap, pullerBitmap, NULL);
+
+! /* Force the widget to recalculate its geometry now. */
+ if (managed)
+ XtManageChild(id);
+ }
+***************
+*** 989,995 ****
+ }
+ }
+ /* Now, to simulate the window being resized. Only, this
+! * will resize the window to it's current state.
+ *
+ * There has to be a better way, but I do not see one at this time.
+ * (David Harrison)
+--- 989,995 ----
+ }
+ }
+ /* Now, to simulate the window being resized. Only, this
+! * will resize the window to its current state.
+ *
+ * There has to be a better way, but I do not see one at this time.
+ * (David Harrison)
+***************
+*** 1071,1077 ****
+ }
+
+ # ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change it's colors */
+ if (mp->tip != NULL)
+ {
+ Arg args[2];
+--- 1071,1077 ----
+ }
+
+ # ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change its colors */
+ if (mp->tip != NULL)
+ {
+ Arg args[2];
+***************
+*** 1089,1095 ****
+ {
+ gui_athena_menu_font(mp->id);
+ #ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change it's font */
+ /* Assume XtNinternational == True (in createBalloonEvalWindow)
+ */
+ if (mp->tip != NULL)
+--- 1089,1095 ----
+ {
+ gui_athena_menu_font(mp->id);
+ #ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change its font */
+ /* Assume XtNinternational == True (in createBalloonEvalWindow)
+ */
+ if (mp->tip != NULL)
+***************
+*** 1552,1558 ****
+ * This is a hack to stop the Athena simpleMenuWidget from getting a
+ * BadValue error when a menu's last child is destroyed. We check to
+ * see if this is the last child and if so, don't delete it. The parent
+! * will be deleted soon anyway, and it will delete it's children like
+ * all good widgets do.
+ */
+ /* NOTE: The cause of the BadValue X Protocol Error is because when the
+--- 1552,1558 ----
+ * This is a hack to stop the Athena simpleMenuWidget from getting a
+ * BadValue error when a menu's last child is destroyed. We check to
+ * see if this is the last child and if so, don't delete it. The parent
+! * will be deleted soon anyway, and it will delete its children like
+ * all good widgets do.
+ */
+ /* NOTE: The cause of the BadValue X Protocol Error is because when the
+*** ../vim-8.1.0527/src/gui_gtk.c 2018-09-18 22:29:59.888041388 +0200
+--- src/gui_gtk.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 925,931 ****
+ g_object_ref(menu->id);
+
+ /* Workaround for a spurious gtk warning in Ubuntu: "Trying to remove
+! * a child that doesn't believe we're it's parent."
+ * Remove widget from gui.menubar before destroying it. */
+ if (menu->id != NULL && gui.menubar != NULL
+ && gtk_widget_get_parent(menu->id) == gui.menubar)
+--- 925,931 ----
+ g_object_ref(menu->id);
+
+ /* Workaround for a spurious gtk warning in Ubuntu: "Trying to remove
+! * a child that doesn't believe we're its parent."
+ * Remove widget from gui.menubar before destroying it. */
+ if (menu->id != NULL && gui.menubar != NULL
+ && gtk_widget_get_parent(menu->id) == gui.menubar)
+*** ../vim-8.1.0527/src/gui_gtk_x11.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_gtk_x11.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 4284,4290 ****
+ * hints (and thus the required size from -geom), but that after that we
+ * put the hints back to normal (the actual minimum size) so we may
+ * subsequently be resized smaller. GtkSocket (the parent end) uses the
+! * plug's window 'min hints to set *it's* minimum size, but that's also the
+ * only way we have of making ourselves bigger (by set lines/columns).
+ * Thus set hints at start-up to ensure correct init. size, then a
+ * second after the final attempt to reset the real minimum hints (done by
+--- 4284,4290 ----
+ * hints (and thus the required size from -geom), but that after that we
+ * put the hints back to normal (the actual minimum size) so we may
+ * subsequently be resized smaller. GtkSocket (the parent end) uses the
+! * plug's window 'min hints to set *its* minimum size, but that's also the
+ * only way we have of making ourselves bigger (by set lines/columns).
+ * Thus set hints at start-up to ensure correct init. size, then a
+ * second after the final attempt to reset the real minimum hints (done by
+*** ../vim-8.1.0527/src/gui_motif.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_motif.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 1114,1120 ****
+ XtManageChild(id);
+
+ /*
+! * Now find the menu item that is the furthest down, and get it's position.
+ */
+ maxy = 0;
+ for (mp = root_menu; mp != NULL; mp = mp->next)
+--- 1114,1120 ----
+ XtManageChild(id);
+
+ /*
+! * Now find the menu item that is the furthest down, and get its position.
+ */
+ maxy = 0;
+ for (mp = root_menu; mp != NULL; mp = mp->next)
+***************
+*** 1550,1556 ****
+ XtSetValues(mp->id, args, n);
+ }
+ # ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change it's font */
+ if (mp->tip != NULL)
+ {
+ Arg args[2];
+--- 1550,1556 ----
+ XtSetValues(mp->id, args, n);
+ }
+ # ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change its font */
+ if (mp->tip != NULL)
+ {
+ Arg args[2];
+***************
+*** 1568,1574 ****
+ {
+ gui_motif_menu_fontlist(mp->id);
+ #ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change it's font */
+ if (mp->tip != NULL)
+ {
+ Arg args[1];
+--- 1568,1574 ----
+ {
+ gui_motif_menu_fontlist(mp->id);
+ #ifdef FEAT_BEVAL_GUI
+! /* If we have a tooltip, then we need to change its font */
+ if (mp->tip != NULL)
+ {
+ Arg args[1];
+***************
+*** 2089,2095 ****
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate it's
+ * geometry now. */
+ XtManageChild(id);
+ }
+--- 2089,2095 ----
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate its
+ * geometry now. */
+ XtManageChild(id);
+ }
+***************
+*** 2108,2114 ****
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate it's
+ * geometry now. */
+ XtManageChild(id);
+ }
+--- 2108,2114 ----
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate its
+ * geometry now. */
+ XtManageChild(id);
+ }
+***************
+*** 3407,3413 ****
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate it's
+ * geometry now. */
+ XtManageChild(id);
+ }
+--- 3407,3413 ----
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate its
+ * geometry now. */
+ XtManageChild(id);
+ }
+***************
+*** 3428,3434 ****
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate it's
+ * geometry now. */
+ XtManageChild(id);
+ }
+--- 3428,3434 ----
+ {
+ XtUnmanageChild(id);
+ XtVaSetValues(id, XmNfontList, fl, NULL);
+! /* We should force the widget to recalculate its
+ * geometry now. */
+ XtManageChild(id);
+ }
+*** ../vim-8.1.0527/src/gui_xmebw.c 2016-08-29 22:42:20.000000000 +0200
+--- src/gui_xmebw.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 50,56 ****
+ * implementation. Also missing in Motif 1.2 and earlier.
+ *
+ * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the
+! * pixmap will not appear in it's caches properly. We cache the interesting
+ * values in XmEnhancedButtonPart instead ourself.
+ */
+ #if defined(LESSTIF_VERSION) || (XmVersion <= 1002)
+--- 50,56 ----
+ * implementation. Also missing in Motif 1.2 and earlier.
+ *
+ * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the
+! * pixmap will not appear in its caches properly. We cache the interesting
+ * values in XmEnhancedButtonPart instead ourself.
+ */
+ #if defined(LESSTIF_VERSION) || (XmVersion <= 1002)
+*** ../vim-8.1.0527/src/if_tcl.c 2018-07-25 22:02:32.235966277 +0200
+--- src/if_tcl.c 2018-10-23 21:33:23.646928902 +0200
+***************
+*** 113,119 ****
+
+ /*
+ * List of Tcl interpreters who reference a vim window or buffer.
+! * Each buffer and window has it's own list in the w_tcl_ref or b_tcl_ref
+ * struct member. We need this because Tcl can create sub-interpreters with
+ * the "interp" command, and each interpreter can reference all windows and
+ * buffers.
+--- 113,119 ----
+
+ /*
+ * List of Tcl interpreters who reference a vim window or buffer.
+! * Each buffer and window has its own list in the w_tcl_ref or b_tcl_ref
+ * struct member. We need this because Tcl can create sub-interpreters with
+ * the "interp" command, and each interpreter can reference all windows and
+ * buffers.
+*** ../vim-8.1.0527/src/os_amiga.c 2018-08-07 22:30:26.670240840 +0200
+--- src/os_amiga.c 2018-10-23 21:33:23.646928902 +0200
+***************
+*** 941,947 ****
+ * getch() will return immediately rather than wait for a return. You
+ * lose editing features though.
+ *
+! * Cooked: This function returns the designate file pointer to it's normal,
+ * wait for a <CR> mode. This is exactly like raw() except that
+ * it sends a 0 to the console to make it back into a CON: from a RAW:
+ */
+--- 941,947 ----
+ * getch() will return immediately rather than wait for a return. You
+ * lose editing features though.
+ *
+! * Cooked: This function returns the designate file pointer to its normal,
+ * wait for a <CR> mode. This is exactly like raw() except that
+ * it sends a 0 to the console to make it back into a CON: from a RAW:
+ */
+***************
+*** 1387,1393 ****
+ got_int = TRUE;
+ }
+
+! /* this routine causes manx to use this Chk_Abort() rather than it's own */
+ /* otherwise it resets our ^C when doing any I/O (even when Enable_Abort */
+ /* is zero). Since we want to check for our own ^C's */
+
+--- 1387,1393 ----
+ got_int = TRUE;
+ }
+
+! /* this routine causes manx to use this Chk_Abort() rather than its own */
+ /* otherwise it resets our ^C when doing any I/O (even when Enable_Abort */
+ /* is zero). Since we want to check for our own ^C's */
+
+*** ../vim-8.1.0527/src/gui_w32.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_w32.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 5658,5664 ****
+ HMONITOR mon;
+ MONITORINFO moninfo;
+
+! /* work out which monitor the window is on, and get *it's* work area */
+ mon = MonitorFromWindow(s_hwnd, MONITOR_DEFAULTTOPRIMARY);
+ if (mon != NULL)
+ {
+--- 5658,5664 ----
+ HMONITOR mon;
+ MONITORINFO moninfo;
+
+! /* work out which monitor the window is on, and get *its* work area */
+ mon = MonitorFromWindow(s_hwnd, MONITOR_DEFAULTTOPRIMARY);
+ if (mon != NULL)
+ {
+*** ../vim-8.1.0527/src/os_win32.c 2018-10-07 15:49:50.819989002 +0200
+--- src/os_win32.c 2018-10-16 21:14:09.815286843 +0200
+***************
+*** 5035,5043 ****
+ {
+ /* Use a terminal window to run the command in. */
+ x = mch_call_shell_terminal(cmd, options);
+! #ifdef FEAT_TITLE
+ resettitle();
+! #endif
+ return x;
+ }
+ #endif
+--- 5035,5043 ----
+ {
+ /* Use a terminal window to run the command in. */
+ x = mch_call_shell_terminal(cmd, options);
+! # ifdef FEAT_TITLE
+ resettitle();
+! # endif
+ return x;
+ }
+ #endif
+***************
+*** 7341,7347 ****
+ */
+
+ /* These magic numbers are from the MS header files */
+! #define MIN_STACK_WINNT 2
+
+ /*
+ * This function does the same thing as _resetstkoflw(), which is only
+--- 7341,7347 ----
+ */
+
+ /* These magic numbers are from the MS header files */
+! # define MIN_STACK_WINNT 2
+
+ /*
+ * This function does the same thing as _resetstkoflw(), which is only
+***************
+*** 7586,7592 ****
+ {
+ int literal = used_file_literal;
+
+! #ifdef FEAT_DIFF
+ /* When using diff mode may need to concatenate file name to
+ * directory name. Just like it's done in main(). */
+ if (used_file_diff_mode && mch_isdir(str) && GARGCOUNT > 0
+--- 7586,7592 ----
+ {
+ int literal = used_file_literal;
+
+! # ifdef FEAT_DIFF
+ /* When using diff mode may need to concatenate file name to
+ * directory name. Just like it's done in main(). */
+ if (used_file_diff_mode && mch_isdir(str) && GARGCOUNT > 0
+***************
+*** 7601,7607 ****
+ str = r;
+ }
+ }
+! #endif
+ /* Re-use the old buffer by renaming it. When not using literal
+ * names it's done by alist_expand() below. */
+ if (used_file_literal)
+--- 7601,7607 ----
+ str = r;
+ }
+ }
+! # endif
+ /* Re-use the old buffer by renaming it. When not using literal
+ * names it's done by alist_expand() below. */
+ if (used_file_literal)
+***************
+*** 7679,7687 ****
+ #endif
+ {
+ _putenv((char *)envbuf);
+! # ifdef libintl_putenv
+ libintl_putenv((char *)envbuf);
+! # endif
+ /* Unlike Un*x systems, we can free the string for _putenv(). */
+ vim_free(envbuf);
+ }
+--- 7679,7687 ----
+ #endif
+ {
+ _putenv((char *)envbuf);
+! #ifdef libintl_putenv
+ libintl_putenv((char *)envbuf);
+! #endif
+ /* Unlike Un*x systems, we can free the string for _putenv(). */
+ vim_free(envbuf);
+ }
+***************
+*** 7742,7748 ****
+ fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg);
+ default_console_color_bg = bg;
+ default_console_color_fg = fg;
+! #endif
+
+ set_console_color_rgb();
+ }
+--- 7742,7748 ----
+ fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg);
+ default_console_color_bg = bg;
+ default_console_color_fg = fg;
+! # endif
+
+ set_console_color_rgb();
+ }
+*** ../vim-8.1.0527/src/gui_mac.c 2018-09-30 21:43:17.191693320 +0200
+--- src/gui_mac.c 2018-10-23 21:33:23.642928936 +0200
+***************
+*** 2278,2284 ****
+ if (p_mh)
+ ObscureCursor();
+
+! /* Get the key code and it's ASCII representation */
+ key_sym = ((theEvent->message & keyCodeMask) >> 8);
+ key_char = theEvent->message & charCodeMask;
+ num = 1;
+--- 2278,2284 ----
+ if (p_mh)
+ ObscureCursor();
+
+! /* Get the key code and its ASCII representation */
+ key_sym = ((theEvent->message & keyCodeMask) >> 8);
+ key_char = theEvent->message & charCodeMask;
+ num = 1;
+***************
+*** 2597,2603 ****
+ bail:
+ /*
+ * when we fail give any additional callback handler a chance to perform
+! * it's actions
+ */
+ return CallNextEventHandler(nextHandler, theEvent);
+ }
+--- 2597,2603 ----
+ bail:
+ /*
+ * when we fail give any additional callback handler a chance to perform
+! * its actions
+ */
+ return CallNextEventHandler(nextHandler, theEvent);
+ }
+*** ../vim-8.1.0527/src/os_vms_fix.com 2010-05-15 13:04:11.000000000 +0200
+--- src/os_vms_fix.com 2018-10-23 21:33:23.646928902 +0200
+***************
+*** 15,21 ****
+ $! remember when DCL didn't have them, and I wanted this to be as
+ $! portable as possible, so... If you want to structure it nicer for
+ $! your own use, please feel free to do so. However, please only
+! $! distribute it in it's original form.
+ $!
+ $! I wrote it in DCL for portability and ease of use - a C version
+ $! would definitely run faster, but then I'd have to deal with compiler
+--- 15,21 ----
+ $! remember when DCL didn't have them, and I wanted this to be as
+ $! portable as possible, so... If you want to structure it nicer for
+ $! your own use, please feel free to do so. However, please only
+! $! distribute it in its original form.
+ $!
+ $! I wrote it in DCL for portability and ease of use - a C version
+ $! would definitely run faster, but then I'd have to deal with compiler
+*** ../vim-8.1.0527/src/version.c 2018-11-14 21:45:28.996589969 +0100
+--- src/version.c 2018-11-16 16:19:14.749927495 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 528,
+ /**/
+
+--
+ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery,
+ my friend and I will ... we will say "Ni!"
+CRONE: Do your worst!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0529 b/data/vim/patches/8.1.0529
new file mode 100644
index 000000000..cebe3f82e
--- /dev/null
+++ b/data/vim/patches/8.1.0529
@@ -0,0 +1,113 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0529
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0529
+Problem: Flaky test sometimes fails in different ways.
+Solution: When the second run gives a different error, try running the test
+ again, up to five times.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0528/src/testdir/runtest.vim 2018-11-11 18:51:39.289611371 +0100
+--- src/testdir/runtest.vim 2018-11-16 16:50:36.895763420 +0100
+***************
+*** 314,341 ****
+ for s:test in sort(s:tests)
+ " Silence, please!
+ set belloff=all
+
+ call RunTheTest(s:test)
+
+ if len(v:errors) > 0 && index(s:flaky, s:test) >= 0
+! call add(s:messages, 'Found errors in ' . s:test . ':')
+! call extend(s:messages, v:errors)
+! call add(s:messages, 'Flaky test failed, running it again')
+! let first_run = v:errors
+!
+! " Flakiness is often caused by the system being very busy. Sleep a couple
+! " of seconds to have a higher chance of succeeding the second time.
+! sleep 2
+!
+! let v:errors = []
+! call RunTheTest(s:test)
+! if len(v:errors) > 0
+! let second_run = v:errors
+! let v:errors = ['First run:']
+! call extend(v:errors, first_run)
+! call add(v:errors, 'Second run:')
+! call extend(v:errors, second_run)
+! endif
+ endif
+
+ call AfterTheTest()
+--- 314,360 ----
+ for s:test in sort(s:tests)
+ " Silence, please!
+ set belloff=all
++ let prev_error = ''
++ let total_errors = []
++ let run_nr = 1
+
+ call RunTheTest(s:test)
+
++ " Repeat a flaky test. Give up when:
++ " - it fails again with the same message
++ " - it fails five times (with a different mesage)
+ if len(v:errors) > 0 && index(s:flaky, s:test) >= 0
+! while 1
+! call add(s:messages, 'Found errors in ' . s:test . ':')
+! call extend(s:messages, v:errors)
+!
+! call add(total_errors, 'Run ' . run_nr . ':')
+! call extend(total_errors, v:errors)
+!
+! if run_nr == 5 || prev_error == v:errors[0]
+! call add(total_errors, 'Flaky test failed too often, giving up')
+! let v:errors = total_errors
+! break
+! endif
+!
+! call add(s:messages, 'Flaky test failed, running it again')
+!
+! " Flakiness is often caused by the system being very busy. Sleep a
+! " couple of seconds to have a higher chance of succeeding the second
+! " time.
+! sleep 2
+!
+! let prev_error = v:errors[0]
+! let v:errors = []
+! let run_nr += 1
+!
+! call RunTheTest(s:test)
+!
+! if len(v:errors) == 0
+! " Test passed on rerun.
+! break
+! endif
+! endwhile
+ endif
+
+ call AfterTheTest()
+*** ../vim-8.1.0528/src/version.c 2018-11-16 16:21:01.645310017 +0100
+--- src/version.c 2018-11-16 16:51:26.583470837 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 529,
+ /**/
+
+--
+Life is a gift, living is an art. (Bram Moolenaar)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0530 b/data/vim/patches/8.1.0530
new file mode 100644
index 000000000..49ac8b7a7
--- /dev/null
+++ b/data/vim/patches/8.1.0530
@@ -0,0 +1,104 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0530
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0530
+Problem: Channel and terminal tests that start a server can be flaky.
+Solution: Add all channel and terminal tests that start a server to the list
+ of flaky tests.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0529/src/testdir/runtest.vim 2018-11-16 16:52:12.539199990 +0100
+--- src/testdir/runtest.vim 2018-11-16 17:43:20.536678864 +0100
+***************
+*** 274,288 ****
+--- 274,296 ----
+
+ " Names of flaky tests.
+ let s:flaky = [
++ \ 'Test_call()',
++ \ 'Test_channel_handler()',
+ \ 'Test_client_server()',
+ \ 'Test_close_and_exit_cb()',
++ \ 'Test_close_callback()',
++ \ 'Test_close_handle()',
++ \ 'Test_close_lambda()',
++ \ 'Test_close_partial()',
+ \ 'Test_collapse_buffers()',
+ \ 'Test_communicate()',
+ \ 'Test_cwd()',
+ \ 'Test_diff_screen()',
++ \ 'Test_exit_callback()',
+ \ 'Test_exit_callback_interval()',
+ \ 'Test_nb_basic()',
+ \ 'Test_oneshot()',
++ \ 'Test_open_delay()',
+ \ 'Test_out_cb()',
+ \ 'Test_paused()',
+ \ 'Test_pipe_through_sort_all()',
+***************
+*** 290,302 ****
+--- 298,332 ----
+ \ 'Test_popup_and_window_resize()',
+ \ 'Test_quoteplus()',
+ \ 'Test_quotestar()',
++ \ 'Test_raw_one_time_callback()',
+ \ 'Test_reltime()',
+ \ 'Test_repeat_three()',
++ \ 'Test_server_crash()',
++ \ 'Test_terminal_ansicolors_default()',
++ \ 'Test_terminal_ansicolors_func()',
++ \ 'Test_terminal_ansicolors_global()',
+ \ 'Test_terminal_composing_unicode()',
++ \ 'Test_terminal_env()',
++ \ 'Test_terminal_hide_buffer()',
++ \ 'Test_terminal_make_change()',
+ \ 'Test_terminal_noblock()',
+ \ 'Test_terminal_redir_file()',
++ \ 'Test_terminal_response_to_control_sequence()',
++ \ 'Test_terminal_scrollback()',
++ \ 'Test_terminal_split_quit()',
++ \ 'Test_terminal_termwinkey()',
++ \ 'Test_terminal_termwinsize_mininmum()',
++ \ 'Test_terminal_termwinsize_option_fixed()',
++ \ 'Test_terminal_termwinsize_option_zero()',
+ \ 'Test_terminal_tmap()',
++ \ 'Test_terminal_wall()',
++ \ 'Test_terminal_wipe_buffer()',
++ \ 'Test_terminal_wqall()',
++ \ 'Test_two_channels()',
++ \ 'Test_unlet_handle()',
+ \ 'Test_with_partial_callback()',
++ \ 'Test_zero_reply()',
++ \ 'Test_zz1_terminal_in_gui()',
+ \ ]
+
+ " Locate Test_ functions and execute them.
+*** ../vim-8.1.0529/src/version.c 2018-11-16 16:52:12.539199990 +0100
+--- src/version.c 2018-11-16 17:35:42.435433293 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 530,
+ /**/
+
+--
+Q: What do you call a fish without an eye?
+A: fsh!
+Q: What do you call a deer with no eyes?
+A: no eye deer.
+Q: What do you call a deer with no eyes and no legs?
+A: still no eye deer.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0531 b/data/vim/patches/8.1.0531
new file mode 100644
index 000000000..497904900
--- /dev/null
+++ b/data/vim/patches/8.1.0531
@@ -0,0 +1,83 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0531
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0531
+Problem: Flaky tests often fail with a common error message.
+Solution: Add a pattern to match an error message indicating a flaky test.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0530/src/testdir/runtest.vim 2018-11-16 17:44:45.188170522 +0100
+--- src/testdir/runtest.vim 2018-11-16 18:20:21.285567865 +0100
+***************
+*** 273,279 ****
+ endif
+
+ " Names of flaky tests.
+! let s:flaky = [
+ \ 'Test_call()',
+ \ 'Test_channel_handler()',
+ \ 'Test_client_server()',
+--- 273,279 ----
+ endif
+
+ " Names of flaky tests.
+! let s:flaky_tests = [
+ \ 'Test_call()',
+ \ 'Test_channel_handler()',
+ \ 'Test_client_server()',
+***************
+*** 329,334 ****
+--- 329,337 ----
+ \ 'Test_zz1_terminal_in_gui()',
+ \ ]
+
++ " Pattern indicating a common flaky test failure.
++ let s:flaky_errors_re = 'StopVimInTerminal'
++
+ " Locate Test_ functions and execute them.
+ redir @q
+ silent function /^Test_
+***************
+*** 353,359 ****
+ " Repeat a flaky test. Give up when:
+ " - it fails again with the same message
+ " - it fails five times (with a different mesage)
+! if len(v:errors) > 0 && index(s:flaky, s:test) >= 0
+ while 1
+ call add(s:messages, 'Found errors in ' . s:test . ':')
+ call extend(s:messages, v:errors)
+--- 356,364 ----
+ " Repeat a flaky test. Give up when:
+ " - it fails again with the same message
+ " - it fails five times (with a different mesage)
+! if len(v:errors) > 0
+! \ && (index(s:flaky_tests, s:test) >= 0
+! \ || v:errors[0] =~ s:flaky_errors_re)
+ while 1
+ call add(s:messages, 'Found errors in ' . s:test . ':')
+ call extend(s:messages, v:errors)
+*** ../vim-8.1.0530/src/version.c 2018-11-16 17:44:45.188170522 +0100
+--- src/version.c 2018-11-16 18:21:32.493085548 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 531,
+ /**/
+
+--
+Q: What's orange and sounds like a parrot?
+A: A carrot
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0532 b/data/vim/patches/8.1.0532
new file mode 100644
index 000000000..1357fb1e3
--- /dev/null
+++ b/data/vim/patches/8.1.0532
@@ -0,0 +1,381 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0532
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0532
+Problem: Cannot distinguish between quickfix and location list.
+Solution: Add an explicit type variable. (Yegappan Lakshmanan)
+Files: src/quickfix.c
+
+
+*** ../vim-8.1.0531/src/quickfix.c 2018-11-11 22:50:20.810297803 +0100
+--- src/quickfix.c 2018-11-16 18:44:56.584395369 +0100
+***************
+*** 50,55 ****
+--- 50,65 ----
+ #define INVALID_QFIDX (-1)
+
+ /*
++ * Quickfix list type.
++ */
++ typedef enum
++ {
++ QFLT_QUICKFIX, // Quickfix list - global list
++ QFLT_LOCATION, // Location list - per window list
++ QFLT_INTERNAL // Internal - Temporary list used by getqflist()/getloclist()
++ } qfltype_T;
++
++ /*
+ * Quickfix/Location list definition
+ * Contains a list of entries (qfline_T). qf_start points to the first entry
+ * and qf_last points to the last entry. qf_count contains the list size.
+***************
+*** 61,66 ****
+--- 71,77 ----
+ typedef struct qf_list_S
+ {
+ int_u qf_id; // Unique identifier for this list
++ qfltype_T qfl_type;
+ qfline_T *qf_start; // pointer to the first error
+ qfline_T *qf_last; // pointer to the last error
+ qfline_T *qf_ptr; // pointer to the current error
+***************
+*** 95,100 ****
+--- 106,112 ----
+ int qf_listcount; // current number of lists
+ int qf_curlist; // current error list
+ qf_list_T qf_lists[LISTCOUNT];
++ qfltype_T qfl_type; // type of list
+ };
+
+ static qf_info_T ql_info; // global quickfix list
+***************
+*** 170,177 ****
+ #define IS_LL_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL)
+
+ // Quickfix and location list stack check helper macros
+! #define IS_QF_STACK(qi) (qi == &ql_info)
+! #define IS_LL_STACK(qi) (qi != &ql_info)
+
+ /*
+ * Return location list for window 'wp'
+--- 182,191 ----
+ #define IS_LL_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL)
+
+ // Quickfix and location list stack check helper macros
+! #define IS_QF_STACK(qi) (qi->qfl_type == QFLT_QUICKFIX)
+! #define IS_LL_STACK(qi) (qi->qfl_type == QFLT_LOCATION)
+! #define IS_QF_LIST(qfl) (qfl->qfl_type == QFLT_QUICKFIX)
+! #define IS_LL_LIST(qfl) (qfl->qfl_type == QFLT_LOCATION)
+
+ /*
+ * Return location list for window 'wp'
+***************
+*** 1847,1852 ****
+--- 1861,1867 ----
+ qfl = &qi->qf_lists[qi->qf_curlist];
+ vim_memset(qfl, 0, (size_t)(sizeof(qf_list_T)));
+ qf_store_title(qfl, qf_title);
++ qfl->qfl_type = qi->qfl_type;
+ qfl->qf_id = ++last_qf_id;
+ }
+
+***************
+*** 2007,2013 ****
+ qfp->qf_fnum = bufnum;
+ if (buf != NULL)
+ buf->b_has_qf_entry |=
+! IS_QF_STACK(qi) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ }
+ else
+ qfp->qf_fnum = qf_get_fnum(qi, qf_idx, dir, fname);
+--- 2022,2028 ----
+ qfp->qf_fnum = bufnum;
+ if (buf != NULL)
+ buf->b_has_qf_entry |=
+! IS_QF_LIST(qfl) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ }
+ else
+ qfp->qf_fnum = qf_get_fnum(qi, qf_idx, dir, fname);
+***************
+*** 2069,2084 ****
+ }
+
+ /*
+! * Allocate a new location list stack
+ */
+ static qf_info_T *
+! ll_new_list(void)
+ {
+ qf_info_T *qi;
+
+ qi = (qf_info_T *)alloc_clear((unsigned)sizeof(qf_info_T));
+ if (qi != NULL)
+ qi->qf_refcount++;
+ return qi;
+ }
+
+--- 2084,2102 ----
+ }
+
+ /*
+! * Allocate a new quickfix/location list stack
+ */
+ static qf_info_T *
+! qf_alloc_stack(qfltype_T qfltype)
+ {
+ qf_info_T *qi;
+
+ qi = (qf_info_T *)alloc_clear((unsigned)sizeof(qf_info_T));
+ if (qi != NULL)
++ {
+ qi->qf_refcount++;
++ qi->qfl_type = qfltype;
++ }
+ return qi;
+ }
+
+***************
+*** 2098,2104 ****
+ ll_free_all(&wp->w_llist_ref);
+
+ if (wp->w_llist == NULL)
+! wp->w_llist = ll_new_list(); // new location list
+ return wp->w_llist;
+ }
+
+--- 2116,2122 ----
+ ll_free_all(&wp->w_llist_ref);
+
+ if (wp->w_llist == NULL)
+! wp->w_llist = qf_alloc_stack(QFLT_LOCATION); // new location list
+ return wp->w_llist;
+ }
+
+***************
+*** 2153,2158 ****
+--- 2171,2177 ----
+ copy_loclist(qf_list_T *from_qfl, qf_list_T *to_qfl, qf_info_T *to_qi)
+ {
+ // Some of the fields are populated by qf_add_entry()
++ to_qfl->qfl_type = from_qfl->qfl_type;
+ to_qfl->qf_nonevalid = from_qfl->qf_nonevalid;
+ to_qfl->qf_count = 0;
+ to_qfl->qf_index = 0;
+***************
+*** 2214,2220 ****
+ return;
+
+ // allocate a new location list
+! if ((to->w_llist = ll_new_list()) == NULL)
+ return;
+
+ to->w_llist->qf_listcount = qi->qf_listcount;
+--- 2233,2239 ----
+ return;
+
+ // allocate a new location list
+! if ((to->w_llist = qf_alloc_stack(QFLT_LOCATION)) == NULL)
+ return;
+
+ to->w_llist->qf_listcount = qi->qf_listcount;
+***************
+*** 2300,2306 ****
+ return 0;
+
+ buf->b_has_qf_entry =
+! IS_QF_STACK(qi) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ return buf->b_fnum;
+ }
+
+--- 2319,2325 ----
+ return 0;
+
+ buf->b_has_qf_entry =
+! IS_QF_LIST(qfl) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY;
+ return buf->b_fnum;
+ }
+
+***************
+*** 2995,3000 ****
+--- 3014,3020 ----
+ int *opened_window)
+ {
+ qf_list_T *qfl = &qi->qf_lists[qi->qf_curlist];
++ qfltype_T qfl_type = qfl->qfl_type;
+ int retval = OK;
+ int old_qf_curlist = qi->qf_curlist;
+ int save_qfid = qfl->qf_id;
+***************
+*** 3019,3032 ****
+
+ // If a location list, check whether the associated window is still
+ // present.
+! if (IS_LL_STACK(qi) && !win_valid_any_tab(oldwin))
+ {
+ EMSG(_("E924: Current window was closed"));
+ *opened_window = FALSE;
+ return NOTDONE;
+ }
+
+! if (IS_QF_STACK(qi) && !qflist_valid(NULL, save_qfid))
+ {
+ EMSG(_("E925: Current quickfix was changed"));
+ return NOTDONE;
+--- 3039,3052 ----
+
+ // If a location list, check whether the associated window is still
+ // present.
+! if (qfl_type == QFLT_LOCATION && !win_valid_any_tab(oldwin))
+ {
+ EMSG(_("E924: Current window was closed"));
+ *opened_window = FALSE;
+ return NOTDONE;
+ }
+
+! if (qfl_type == QFLT_QUICKFIX && !qflist_valid(NULL, save_qfid))
+ {
+ EMSG(_("E925: Current quickfix was changed"));
+ return NOTDONE;
+***************
+*** 3035,3041 ****
+ if (old_qf_curlist != qi->qf_curlist
+ || !is_qf_entry_present(qfl, qf_ptr))
+ {
+! if (IS_QF_STACK(qi))
+ EMSG(_("E925: Current quickfix was changed"));
+ else
+ EMSG(_(e_loc_list_changed));
+--- 3055,3061 ----
+ if (old_qf_curlist != qi->qf_curlist
+ || !is_qf_entry_present(qfl, qf_ptr))
+ {
+! if (qfl_type == QFLT_QUICKFIX)
+ EMSG(_("E925: Current quickfix was changed"));
+ else
+ EMSG(_(e_loc_list_changed));
+***************
+*** 5896,5902 ****
+ if (l == NULL)
+ return FAIL;
+
+! qi = ll_new_list();
+ if (qi != NULL)
+ {
+ if (qf_init_ext(qi, 0, NULL, NULL, &di->di_tv, errorformat,
+--- 5916,5922 ----
+ if (l == NULL)
+ return FAIL;
+
+! qi = qf_alloc_stack(QFLT_INTERNAL);
+ if (qi != NULL)
+ {
+ if (qf_init_ext(qi, 0, NULL, NULL, &di->di_tv, errorformat,
+***************
+*** 6040,6046 ****
+ * Return default values for quickfix list properties in retdict.
+ */
+ static int
+! qf_getprop_defaults(qf_info_T *qi, int flags, dict_T *retdict)
+ {
+ int status = OK;
+
+--- 6060,6066 ----
+ * Return default values for quickfix list properties in retdict.
+ */
+ static int
+! qf_getprop_defaults(qf_info_T *qi, int flags, int locstack, dict_T *retdict)
+ {
+ int status = OK;
+
+***************
+*** 6068,6074 ****
+ status = dict_add_number(retdict, "size", 0);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+ status = dict_add_number(retdict, "changedtick", 0);
+! if ((status == OK) && IS_LL_STACK(qi) && (flags & QF_GETLIST_FILEWINID))
+ status = dict_add_number(retdict, "filewinid", 0);
+
+ return status;
+--- 6088,6094 ----
+ status = dict_add_number(retdict, "size", 0);
+ if ((status == OK) && (flags & QF_GETLIST_TICK))
+ status = dict_add_number(retdict, "changedtick", 0);
+! if ((status == OK) && locstack && (flags & QF_GETLIST_FILEWINID))
+ status = dict_add_number(retdict, "filewinid", 0);
+
+ return status;
+***************
+*** 6191,6197 ****
+
+ // List is not present or is empty
+ if (qf_stack_empty(qi) || qf_idx == INVALID_QFIDX)
+! return qf_getprop_defaults(qi, flags, retdict);
+
+ qfl = &qi->qf_lists[qf_idx];
+
+--- 6211,6217 ----
+
+ // List is not present or is empty
+ if (qf_stack_empty(qi) || qf_idx == INVALID_QFIDX)
+! return qf_getprop_defaults(qi, flags, wp != NULL, retdict);
+
+ qfl = &qi->qf_lists[qf_idx];
+
+***************
+*** 6616,6622 ****
+ {
+ // If the location list window is open, then create a new empty
+ // location list
+! qf_info_T *new_ll = ll_new_list();
+
+ // first free the list reference in the location list window
+ ll_free_all(&orig_wp->w_llist_ref);
+--- 6636,6642 ----
+ {
+ // If the location list window is open, then create a new empty
+ // location list
+! qf_info_T *new_ll = qf_alloc_stack(QFLT_LOCATION);
+
+ // first free the list reference in the location list window
+ ll_free_all(&orig_wp->w_llist_ref);
+***************
+*** 6964,6970 ****
+ if (qi == NULL)
+ {
+ // Allocate a new location list for help text matches
+! if ((qi = ll_new_list()) == NULL)
+ return NULL;
+ *new_ll = TRUE;
+ }
+--- 6984,6990 ----
+ if (qi == NULL)
+ {
+ // Allocate a new location list for help text matches
+! if ((qi = qf_alloc_stack(QFLT_LOCATION)) == NULL)
+ return NULL;
+ *new_ll = TRUE;
+ }
+*** ../vim-8.1.0531/src/version.c 2018-11-16 18:22:42.336615956 +0100
+--- src/version.c 2018-11-16 18:41:03.385706240 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 532,
+ /**/
+
+--
+Time flies like an arrow.
+Fruit flies like a banana.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0533 b/data/vim/patches/8.1.0533
new file mode 100644
index 000000000..245468351
--- /dev/null
+++ b/data/vim/patches/8.1.0533
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0533
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0533
+Problem: Screendump tests can be flaky.
+Solution: Add VerifyScreenDump to the pattern of flaky tests.
+Files: src/testdir/runtest.vim
+
+
+*** ../vim-8.1.0532/src/testdir/runtest.vim 2018-11-16 18:22:42.336615956 +0100
+--- src/testdir/runtest.vim 2018-11-16 18:48:32.643133486 +0100
+***************
+*** 330,336 ****
+ \ ]
+
+ " Pattern indicating a common flaky test failure.
+! let s:flaky_errors_re = 'StopVimInTerminal'
+
+ " Locate Test_ functions and execute them.
+ redir @q
+--- 330,336 ----
+ \ ]
+
+ " Pattern indicating a common flaky test failure.
+! let s:flaky_errors_re = 'StopVimInTerminal\|VerifyScreenDump'
+
+ " Locate Test_ functions and execute them.
+ redir @q
+*** ../vim-8.1.0532/src/version.c 2018-11-16 18:45:57.864041240 +0100
+--- src/version.c 2018-11-16 18:49:30.498790078 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 533,
+ /**/
+
+--
+When I look deep into your eyes, I see JPEG artifacts.
+I can tell by the pixels that we're wrong for each other. (xkcd)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0534 b/data/vim/patches/8.1.0534
new file mode 100644
index 000000000..9071561d6
--- /dev/null
+++ b/data/vim/patches/8.1.0534
@@ -0,0 +1,379 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0534
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0534
+Problem: MS-Windows installer uses different $HOME than Vim.
+Solution: Use the Vim logic also in the MS-Windows installer. (Ken Takata,
+ closes #3564)
+Files: src/dosinst.c, src/misc1.c
+
+
+*** ../vim-8.1.0533/src/dosinst.c 2018-10-13 17:25:24.112718312 +0200
+--- src/dosinst.c 2018-11-16 19:39:24.551085683 +0100
+***************
+*** 115,128 ****
+ vimfiles_dir_vim,
+ vimfiles_dir_home
+ };
+! static char *(vimfiles_dir_choices[]) =
+ {
+ "\nCreate plugin directories:",
+ "No",
+ "In the VIM directory",
+ "In your HOME directory",
+ };
+- static int vimfiles_dir_choice;
+
+ /* non-zero when selected to install the popup menu entry. */
+ static int install_popup = 0;
+--- 115,127 ----
+ vimfiles_dir_vim,
+ vimfiles_dir_home
+ };
+! static char *(vimfiles_dir_choices[]) =
+ {
+ "\nCreate plugin directories:",
+ "No",
+ "In the VIM directory",
+ "In your HOME directory",
+ };
+
+ /* non-zero when selected to install the popup menu entry. */
+ static int install_popup = 0;
+***************
+*** 741,747 ****
+ choices[choice_count].installfunc = NULL;
+ choices[choice_count].active = 0;
+ choices[choice_count].changefunc = NULL;
+! choices[choice_count].installfunc = NULL;
+ ++choice_count;
+ }
+
+--- 740,747 ----
+ choices[choice_count].installfunc = NULL;
+ choices[choice_count].active = 0;
+ choices[choice_count].changefunc = NULL;
+! choices[choice_count].text = NULL;
+! choices[choice_count].arg = 0;
+ ++choice_count;
+ }
+
+***************
+*** 2089,2094 ****
+--- 2089,2096 ----
+ static void
+ set_directories_text(int idx)
+ {
++ int vimfiles_dir_choice = choices[idx].arg;
++
+ if (vimfiles_dir_choice == (int)vimfiles_dir_none)
+ alloc_text(idx, "Do NOT create plugin directories%s", "");
+ else
+***************
+*** 2097,2102 ****
+--- 2099,2189 ----
+ }
+
+ /*
++ * To get the "real" home directory:
++ * - get value of $HOME
++ * - if not found, get value of $HOMEDRIVE$HOMEPATH
++ * - if not found, get value of $USERPROFILE
++ *
++ * This code is based on init_homedir() in misc1.c, keep in sync!
++ */
++ static char *homedir = NULL;
++
++ void
++ init_homedir(void)
++ {
++ char *var;
++ char buf[MAX_PATH];
++
++ if (homedir != NULL)
++ {
++ free(homedir);
++ homedir = NULL;
++ }
++
++ var = getenv("HOME");
++
++ /*
++ * Typically, $HOME is not defined on Windows, unless the user has
++ * specifically defined it for Vim's sake. However, on Windows NT
++ * platforms, $HOMEDRIVE and $HOMEPATH are automatically defined for
++ * each user. Try constructing $HOME from these.
++ */
++ if (var == NULL || *var == NUL)
++ {
++ char *homedrive, *homepath;
++
++ homedrive = getenv("HOMEDRIVE");
++ homepath = getenv("HOMEPATH");
++ if (homepath == NULL || *homepath == NUL)
++ homepath = "\\";
++ if (homedrive != NULL
++ && strlen(homedrive) + strlen(homepath) < MAX_PATH)
++ {
++ sprintf(buf, "%s%s", homedrive, homepath);
++ if (buf[0] != NUL)
++ var = buf;
++ }
++ }
++
++ if (var == NULL)
++ var = getenv("USERPROFILE");
++
++ /*
++ * Weird but true: $HOME may contain an indirect reference to another
++ * variable, esp. "%USERPROFILE%". Happens when $USERPROFILE isn't set
++ * when $HOME is being set.
++ */
++ if (var != NULL && *var == '%')
++ {
++ char *p;
++ char *exp;
++
++ p = strchr(var + 1, '%');
++ if (p != NULL)
++ {
++ strncpy(buf, var + 1, p - (var + 1));
++ buf[p - (var + 1)] = NUL;
++ exp = getenv(buf);
++ if (exp != NULL && *exp != NUL
++ && strlen(exp) + strlen(p) < MAX_PATH)
++ {
++ _snprintf(buf, MAX_PATH, "%s%s", exp, p + 1);
++ buf[MAX_PATH - 1] = NUL;
++ var = buf;
++ }
++ }
++ }
++
++ if (var != NULL && *var == NUL) // empty is same as not set
++ var = NULL;
++
++ if (var == NULL)
++ homedir = NULL;
++ else
++ homedir = _strdup(var);
++ }
++
++ /*
+ * Change the directory that the vim plugin directories will be created in:
+ * $HOME, $VIM or nowhere.
+ */
+***************
+*** 2106,2114 ****
+ int choice_count = TABLE_SIZE(vimfiles_dir_choices);
+
+ /* Don't offer the $HOME choice if $HOME isn't set. */
+! if (getenv("HOME") == NULL)
+ --choice_count;
+! vimfiles_dir_choice = get_choice(vimfiles_dir_choices, choice_count);
+ set_directories_text(idx);
+ }
+
+--- 2193,2201 ----
+ int choice_count = TABLE_SIZE(vimfiles_dir_choices);
+
+ /* Don't offer the $HOME choice if $HOME isn't set. */
+! if (homedir == NULL)
+ --choice_count;
+! choices[idx].arg = get_choice(vimfiles_dir_choices, choice_count);
+ set_directories_text(idx);
+ }
+
+***************
+*** 2120,2125 ****
+--- 2207,2213 ----
+ install_vimfilesdir(int idx)
+ {
+ int i;
++ int vimfiles_dir_choice = choices[idx].arg;
+ char *p;
+ char vimdir_path[BUFSIZE];
+ char vimfiles_path[BUFSIZE];
+***************
+*** 2144,2151 ****
+ }
+ case vimfiles_dir_home:
+ {
+! /* Find the $HOME directory. Its existence was already checked. */
+! p = getenv("HOME");
+ if (p == NULL)
+ {
+ printf("Internal error: $HOME is NULL\n");
+--- 2232,2239 ----
+ }
+ case vimfiles_dir_home:
+ {
+! // Find the $HOME directory. Its existence was already checked.
+! p = homedir;
+ if (p == NULL)
+ {
+ printf("Internal error: $HOME is NULL\n");
+***************
+*** 2156,2162 ****
+ }
+ case vimfiles_dir_none:
+ {
+! /* Do not create vim plugin directory */
+ return;
+ }
+ }
+--- 2244,2250 ----
+ }
+ case vimfiles_dir_none:
+ {
+! // Do not create vim plugin directory.
+ return;
+ }
+ }
+***************
+*** 2185,2198 ****
+ struct stat st;
+ char tmp_dirname[BUFSIZE];
+ char *p;
+
+ choices[choice_count].text = alloc(150);
+ choices[choice_count].changefunc = change_directories_choice;
+ choices[choice_count].installfunc = install_vimfilesdir;
+ choices[choice_count].active = 1;
+
+! /* Check if the "compiler" directory already exists. That's a good
+! * indication that the plugin directories were already created. */
+ if (getenv("HOME") != NULL)
+ {
+ vimfiles_dir_choice = (int)vimfiles_dir_home;
+--- 2273,2287 ----
+ struct stat st;
+ char tmp_dirname[BUFSIZE];
+ char *p;
++ int vimfiles_dir_choice;
+
+ choices[choice_count].text = alloc(150);
+ choices[choice_count].changefunc = change_directories_choice;
+ choices[choice_count].installfunc = install_vimfilesdir;
+ choices[choice_count].active = 1;
+
+! // Check if the "compiler" directory already exists. That's a good
+! // indication that the plugin directories were already created.
+ if (getenv("HOME") != NULL)
+ {
+ vimfiles_dir_choice = (int)vimfiles_dir_home;
+***************
+*** 2204,2210 ****
+ {
+ vimfiles_dir_choice = (int)vimfiles_dir_vim;
+ p = getenv("VIM");
+! if (p == NULL) /* No $VIM in path, use the install dir */
+ dir_remove_last(installdir, tmp_dirname);
+ else
+ strcpy(tmp_dirname, p);
+--- 2293,2299 ----
+ {
+ vimfiles_dir_choice = (int)vimfiles_dir_vim;
+ p = getenv("VIM");
+! if (p == NULL) // No $VIM in path, use the install dir.
+ dir_remove_last(installdir, tmp_dirname);
+ else
+ strcpy(tmp_dirname, p);
+***************
+*** 2213,2218 ****
+--- 2302,2308 ----
+ vimfiles_dir_choice = (int)vimfiles_dir_none;
+ }
+
++ choices[choice_count].arg = vimfiles_dir_choice;
+ set_directories_text(choice_count);
+ ++choice_count;
+ }
+***************
+*** 2369,2374 ****
+--- 2459,2466 ----
+ }
+ else if (strcmp(argv[i], "-create-directories") == 0)
+ {
++ int vimfiles_dir_choice;
++
+ init_directories_choice();
+ if (argv[i + 1][0] != '-')
+ {
+***************
+*** 2377,2384 ****
+ vimfiles_dir_choice = (int)vimfiles_dir_vim;
+ else if (strcmp(argv[i], "home") == 0)
+ {
+! if (getenv("HOME") == NULL) /* No $HOME in environment */
+! vimfiles_dir_choice = (int)vimfiles_dir_vim;
+ else
+ vimfiles_dir_choice = (int)vimfiles_dir_home;
+ }
+--- 2469,2476 ----
+ vimfiles_dir_choice = (int)vimfiles_dir_vim;
+ else if (strcmp(argv[i], "home") == 0)
+ {
+! if (homedir == NULL) // No $HOME in environment
+! vimfiles_dir_choice = (int)vimfiles_dir_none;
+ else
+ vimfiles_dir_choice = (int)vimfiles_dir_home;
+ }
+***************
+*** 2391,2396 ****
+--- 2483,2489 ----
+ }
+ else /* No choice specified, default to vim directory */
+ vimfiles_dir_choice = (int)vimfiles_dir_vim;
++ choices[choice_count - 1].arg = vimfiles_dir_choice;
+ }
+ else if (strcmp(argv[i], "-register-OLE") == 0)
+ {
+***************
+*** 2589,2594 ****
+--- 2682,2688 ----
+
+ /* Initialize this program. */
+ do_inits(argv);
++ init_homedir();
+
+ if (argc > 1 && strcmp(argv[1], "-uninstall-check") == 0)
+ {
+*** ../vim-8.1.0533/src/misc1.c 2018-10-07 23:16:33.138616197 +0200
+--- src/misc1.c 2018-11-16 19:37:57.095655169 +0100
+***************
+*** 3905,3910 ****
+--- 3905,3912 ----
+ * - do mch_dirname() to get the real name of that directory.
+ * This also works with mounts and links.
+ * Don't do this for MS-DOS, it will change the "current dir" for a drive.
++ * For Windows:
++ * This code is duplicated in init_homedir() in dosinst.c. Keep in sync!
+ */
+ static char_u *homedir = NULL;
+
+*** ../vim-8.1.0533/src/version.c 2018-11-16 18:50:13.346534543 +0100
+--- src/version.c 2018-11-16 19:33:13.893507996 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 534,
+ /**/
+
+--
+Two cows are standing together in a field. One asks the other:
+"So what do you think about this Mad Cow Disease?"
+The other replies: "That doesn't concern me. I'm a helicopter."
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0535 b/data/vim/patches/8.1.0535
new file mode 100644
index 000000000..02192da41
--- /dev/null
+++ b/data/vim/patches/8.1.0535
@@ -0,0 +1,97 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0535
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0535
+Problem: Increment/decrement might get interrupted by updating folds.
+Solution: Disable fold updating for a moment. (Christian Brabandt,
+ closes #3599)
+Files: src/ops.c
+
+
+*** ../vim-8.1.0534/src/ops.c 2018-09-30 21:43:17.199693265 +0200
+--- src/ops.c 2018-11-16 20:30:45.414309325 +0100
+***************
+*** 5549,5560 ****
+--- 5549,5575 ----
+ int change_cnt = 0;
+ linenr_T amount = Prenum1;
+
++ // do_addsub() might trigger re-evaluation of 'foldexpr' halfway, when the
++ // buffer is not completly updated yet. Postpone updating folds until before
++ // the call to changed_lines().
++ #ifdef FEAT_FOLDING
++ disable_fold_update++;
++ #endif
++
+ if (!VIsual_active)
+ {
+ pos = curwin->w_cursor;
+ if (u_save_cursor() == FAIL)
++ {
++ #ifdef FEAT_FOLDING
++ disable_fold_update--;
++ #endif
+ return;
++ }
+ change_cnt = do_addsub(oap->op_type, &pos, 0, amount);
++ #ifdef FEAT_FOLDING
++ disable_fold_update--;
++ #endif
+ if (change_cnt)
+ changed_lines(pos.lnum, 0, pos.lnum + 1, 0L);
+ }
+***************
+*** 5566,5572 ****
+--- 5581,5592 ----
+
+ if (u_save((linenr_T)(oap->start.lnum - 1),
+ (linenr_T)(oap->end.lnum + 1)) == FAIL)
++ {
++ #ifdef FEAT_FOLDING
++ disable_fold_update--;
++ #endif
+ return;
++ }
+
+ pos = oap->start;
+ for (; pos.lnum <= oap->end.lnum; ++pos.lnum)
+***************
+*** 5624,5629 ****
+--- 5644,5653 ----
+ if (g_cmd && one_change)
+ amount += Prenum1;
+ }
++
++ #ifdef FEAT_FOLDING
++ disable_fold_update--;
++ #endif
+ if (change_cnt)
+ changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
+
+*** ../vim-8.1.0534/src/version.c 2018-11-16 19:39:47.350937378 +0100
+--- src/version.c 2018-11-16 20:54:05.109734642 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 535,
+ /**/
+
+--
+ARTHUR: Ni!
+BEDEVERE: Nu!
+ARTHUR: No. Ni! More like this. "Ni"!
+BEDEVERE: Ni, ni, ni!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0536 b/data/vim/patches/8.1.0536
new file mode 100644
index 000000000..556919f0e
--- /dev/null
+++ b/data/vim/patches/8.1.0536
@@ -0,0 +1,103 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0536
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0536
+Problem: File time test fails when using NFS.
+Solution: Use three file times instead of localtim(). (James McCoy,
+ closes #3618)
+Files: src/testdir/test_stat.vim
+
+
+*** ../vim-8.1.0535/src/testdir/test_stat.vim 2018-08-22 20:16:11.985125882 +0200
+--- src/testdir/test_stat.vim 2018-11-18 12:19:41.877543229 +0100
+***************
+*** 1,31 ****
+ " Tests for stat functions and checktime
+
+ func CheckFileTime(doSleep)
+! let fname = 'Xtest.tmp'
+ let result = 0
+
+! let ts = localtime()
+! if a:doSleep
+! sleep 1
+! endif
+ let fl = ['Hello World!']
+! call writefile(fl, fname)
+! let tf = getftime(fname)
+! if a:doSleep
+! sleep 1
+! endif
+! let te = localtime()
+
+! let time_correct = (ts <= tf && tf <= te)
+ if a:doSleep || time_correct
+! call assert_true(time_correct)
+! call assert_equal(strlen(fl[0] . "\n"), getfsize(fname))
+! call assert_equal('file', getftype(fname))
+! call assert_equal('rw-', getfperm(fname)[0:2])
+ let result = 1
+ endif
+
+! call delete(fname)
+ return result
+ endfunc
+
+--- 1,33 ----
+ " Tests for stat functions and checktime
+
+ func CheckFileTime(doSleep)
+! let fnames = ['Xtest1.tmp', 'Xtest2.tmp', 'Xtest3.tmp']
+! let times = []
+ let result = 0
+
+! " Use three files istead of localtim(), with a network filesystem the file
+! " times may differ at bit
+ let fl = ['Hello World!']
+! for fname in fnames
+! call writefile(fl, fname)
+! call add(times, getftime(fname))
+! if a:doSleep
+! sleep 1
+! endif
+! endfor
+
+! let time_correct = (times[0] <= times[1] && times[1] <= times[2])
+ if a:doSleep || time_correct
+! call assert_true(time_correct, printf('Expected %s <= %s <= %s', times[0], times[1], times[2]))
+! call assert_equal(strlen(fl[0] . "\n"), getfsize(fnames[0]))
+! call assert_equal('file', getftype(fnames[0]))
+! call assert_equal('rw-', getfperm(fnames[0])[0:2])
+ let result = 1
+ endif
+
+! for fname in fnames
+! call delete(fname)
+! endfor
+ return result
+ endfunc
+
+*** ../vim-8.1.0535/src/version.c 2018-11-16 20:54:27.053554626 +0100
+--- src/version.c 2018-11-18 12:23:05.864278755 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 536,
+ /**/
+
+--
+Vi beats Emacs to death, and then again!
+ http://linuxtoday.com/stories/5764.html
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0537 b/data/vim/patches/8.1.0537
new file mode 100644
index 000000000..e9065657c
--- /dev/null
+++ b/data/vim/patches/8.1.0537
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0537
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0537
+Problem: ui_breakcheck() may be called recursively, which doesn't work.
+Solution: When called recursively, just return. (James McCoy, closes #3617)
+Files: src/ui.c
+
+
+*** ../vim-8.1.0536/src/ui.c 2018-09-30 21:43:17.207693209 +0200
+--- src/ui.c 2018-11-20 02:35:02.966727048 +0100
+***************
+*** 403,411 ****
+ void
+ ui_breakcheck_force(int force)
+ {
+! int save_updating_screen = updating_screen;
+
+! /* We do not want gui_resize_shell() to redraw the screen here. */
+ ++updating_screen;
+
+ #ifdef FEAT_GUI
+--- 403,419 ----
+ void
+ ui_breakcheck_force(int force)
+ {
+! static int recursive = FALSE;
+! int save_updating_screen = updating_screen;
+
+! // We could be called recursively if stderr is redirected, calling
+! // fill_input_buf() calls settmode() when stdin isn't a tty. settmode()
+! // calls vgetorpeek() which calls ui_breakcheck() again.
+! if (recursive)
+! return;
+! recursive = TRUE;
+!
+! // We do not want gui_resize_shell() to redraw the screen here.
+ ++updating_screen;
+
+ #ifdef FEAT_GUI
+***************
+*** 419,424 ****
+--- 427,434 ----
+ updating_screen = TRUE;
+ else
+ reset_updating_screen(FALSE);
++
++ recursive = FALSE;
+ }
+
+ /*****************************************************************************
+*** ../vim-8.1.0536/src/version.c 2018-11-18 12:25:04.219533634 +0100
+--- src/version.c 2018-11-20 02:30:47.832599259 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 537,
+ /**/
+
+--
+Why isn't there mouse-flavored cat food?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0538 b/data/vim/patches/8.1.0538
new file mode 100644
index 000000000..7f662c1a4
--- /dev/null
+++ b/data/vim/patches/8.1.0538
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.05
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0538
+Problem: Evaluating a modeline might invoke using a shell command. (Paul
+ Huber)
+Solution: Set the sandbox flag when setting options from a modeline.
+Files: src/buffer.c
+
+
+*** ../vim-8.1.0537/src/buffer.c 2018-11-10 17:33:23.087518814 +0100
+--- src/buffer.c 2018-11-20 03:50:28.257857273 +0100
+***************
+*** 5522,5528 ****
+--- 5522,5533 ----
+ current_sctx.sc_seq = 0;
+ current_sctx.sc_lnum = 0;
+ #endif
++ // Make sure no risky things are executed as a side effect.
++ ++sandbox;
++
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
++
++ --sandbox;
+ #ifdef FEAT_EVAL
+ current_sctx = save_current_sctx;
+ #endif
+*** ../vim-8.1.0537/src/version.c 2018-11-20 02:42:37.111373664 +0100
+--- src/version.c 2018-11-20 04:24:18.067361364 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 538,
+ /**/
+
+--
+ARTHUR: Go on, Bors, chop its head off.
+BORS: Right. Silly little bleeder. One rabbit stew coming up.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0539 b/data/vim/patches/8.1.0539
new file mode 100644
index 000000000..801ff717c
--- /dev/null
+++ b/data/vim/patches/8.1.0539
@@ -0,0 +1,114 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0539
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0539
+Problem: Cannot build without the sandbox.
+Solution: Set the secure option instead of using the sandbox. Also restrict
+ the characters from 'spelllang' that are used for LANG.vim.
+ (suggested by Yasuhiro Matsumoto)
+Files: runtime/doc/options.txt, src/buffer.c, src/option.c
+
+
+*** ../vim-8.1.0538/runtime/doc/options.txt 2018-09-10 21:15:34.637000672 +0200
+--- runtime/doc/options.txt 2018-11-20 13:01:10.046464576 +0100
+***************
+*** 7298,7304 ****
+
+ After this option has been set successfully, Vim will source the files
+ "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
+! up to the first comma, dot or underscore.
+ Also see |set-spc-auto|.
+
+
+--- 7339,7345 ----
+
+ After this option has been set successfully, Vim will source the files
+ "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
+! up to the first character that is not an ASCII letter and not a dash.
+ Also see |set-spc-auto|.
+
+
+*** ../vim-8.1.0538/src/buffer.c 2018-11-20 04:25:14.882952236 +0100
+--- src/buffer.c 2018-11-20 12:52:53.914128541 +0100
+***************
+*** 5523,5533 ****
+ current_sctx.sc_lnum = 0;
+ #endif
+ // Make sure no risky things are executed as a side effect.
+! ++sandbox;
+
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+
+! --sandbox;
+ #ifdef FEAT_EVAL
+ current_sctx = save_current_sctx;
+ #endif
+--- 5523,5533 ----
+ current_sctx.sc_lnum = 0;
+ #endif
+ // Make sure no risky things are executed as a side effect.
+! ++secure;
+
+ retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+
+! --secure;
+ #ifdef FEAT_EVAL
+ current_sctx = save_current_sctx;
+ #endif
+*** ../vim-8.1.0538/src/option.c 2018-11-10 17:33:23.091518784 +0100
+--- src/option.c 2018-11-20 13:06:15.300199192 +0100
+***************
+*** 7758,7767 ****
+ * '.encoding'.
+ */
+ for (p = q; *p != NUL; ++p)
+! if (vim_strchr((char_u *)"_.,", *p) != NULL)
+ break;
+! vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
+! source_runtime(fname, DIP_ALL);
+ }
+ #endif
+ }
+--- 7759,7771 ----
+ * '.encoding'.
+ */
+ for (p = q; *p != NUL; ++p)
+! if (!ASCII_ISALPHA(*p) && *p != '-')
+ break;
+! if (p > q)
+! {
+! vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
+! source_runtime(fname, DIP_ALL);
+! }
+ }
+ #endif
+ }
+*** ../vim-8.1.0538/src/version.c 2018-11-20 04:25:14.882952236 +0100
+--- src/version.c 2018-11-20 13:02:21.057938065 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 539,
+ /**/
+
+--
+ARTHUR: Charge!
+ [They all charge with swords drawn towards the RABBIT. A tremendous twenty
+ second fight with Peckinpahish shots and borrowing heavily also on the
+ Kung Fu and karate-type films ensues, in which some four KNIGHTS are
+ comprehensively killed.]
+ARTHUR: Run away! Run away!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0540 b/data/vim/patches/8.1.0540
new file mode 100644
index 000000000..ac3fe2331
--- /dev/null
+++ b/data/vim/patches/8.1.0540
@@ -0,0 +1,134 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0540
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0540
+Problem: May evaluate insecure value when appending to option.
+Solution: Set the secure flag when changing an option that was previously
+ set insecurely. Also allow numbers for the characters from
+ 'spelllang' that are used for LANG.vim. (closes #3623)
+Files: src/option.c
+
+
+*** ../vim-8.1.0539/src/option.c 2018-11-20 13:32:30.276983764 +0100
+--- src/option.c 2018-11-20 14:16:31.077302001 +0100
+***************
+*** 4705,4710 ****
+--- 4706,4713 ----
+ }
+ else
+ {
++ int value_is_replaced = !prepending && !adding && !removing;
++
+ if (flags & P_BOOL) /* boolean */
+ {
+ if (nextchar == '=' || nextchar == ':')
+***************
+*** 5209,5220 ****
+ }
+ #endif
+
+! /* Handle side effects, and set the global value for
+! * ":set" on local options. Note: when setting 'syntax'
+! * or 'filetype' autocommands may be triggered that can
+! * cause havoc. */
+! errmsg = did_set_string_option(opt_idx, (char_u **)varp,
+! new_value_alloced, oldval, errbuf, opt_flags);
+
+ #if defined(FEAT_EVAL)
+ if (errmsg == NULL)
+--- 5212,5247 ----
+ }
+ #endif
+
+! {
+! long_u *p = insecure_flag(opt_idx, opt_flags);
+! int did_inc_secure = FALSE;
+!
+! // When an option is set in the sandbox, from a
+! // modeline or in secure mode, then deal with side
+! // effects in secure mode. Also when the value was
+! // set with the P_INSECURE flag and is not
+! // completely replaced.
+! if (secure
+! #ifdef HAVE_SANDBOX
+! || sandbox != 0
+! #endif
+! || (opt_flags & OPT_MODELINE)
+! || (!value_is_replaced && (*p & P_INSECURE)))
+! {
+! did_inc_secure = TRUE;
+! ++secure;
+! }
+!
+! // Handle side effects, and set the global value for
+! // ":set" on local options. Note: when setting 'syntax'
+! // or 'filetype' autocommands may be triggered that can
+! // cause havoc.
+! errmsg = did_set_string_option(opt_idx, (char_u **)varp,
+! new_value_alloced, oldval, errbuf, opt_flags);
+!
+! if (did_inc_secure)
+! --secure;
+! }
+
+ #if defined(FEAT_EVAL)
+ if (errmsg == NULL)
+***************
+*** 5254,5261 ****
+ }
+
+ if (opt_idx >= 0)
+! did_set_option(opt_idx, opt_flags,
+! !prepending && !adding && !removing);
+ }
+
+ skip:
+--- 5281,5287 ----
+ }
+
+ if (opt_idx >= 0)
+! did_set_option(opt_idx, opt_flags, value_is_replaced);
+ }
+
+ skip:
+***************
+*** 7758,7764 ****
+ * '.encoding'.
+ */
+ for (p = q; *p != NUL; ++p)
+! if (!ASCII_ISALPHA(*p) && *p != '-')
+ break;
+ if (p > q)
+ {
+--- 7784,7790 ----
+ * '.encoding'.
+ */
+ for (p = q; *p != NUL; ++p)
+! if (!ASCII_ISALNUM(*p) && *p != '-')
+ break;
+ if (p > q)
+ {
+*** ../vim-8.1.0539/src/version.c 2018-11-20 13:32:30.276983764 +0100
+--- src/version.c 2018-11-20 14:21:13.067051824 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 540,
+ /**/
+
+--
+A hamburger walks into a bar, and the bartender says: "I'm sorry,
+but we don't serve food here."
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0541 b/data/vim/patches/8.1.0541
new file mode 100644
index 000000000..4e119484e
--- /dev/null
+++ b/data/vim/patches/8.1.0541
@@ -0,0 +1,66 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0541
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0541
+Problem: Help message in dosinst.c is outdated.
+Solution: Update the comment. (Ken Takata, closes #3626)
+Files: src/dosinst.c
+
+
+*** ../vim-8.1.0540/src/dosinst.c 2018-11-16 19:39:47.346937404 +0100
+--- src/dosinst.c 2018-11-21 13:54:33.089924563 +0100
+***************
+*** 2535,2547 ****
+ "------------\n"
+ "(this choice is only available when creating a _vimrc file)\n"
+ "1. Vim can run in Vi-compatible mode. Many nice Vim features are then\n"
+! " disabled. In the not-Vi-compatible mode Vim is still mostly Vi\n"
+! " compatible, but adds nice features like multi-level undo. Only\n"
+! " choose Vi-compatible if you really need full Vi compatibility.\n"
+! "2. Running Vim with some enhancements is useful when you want some of\n"
+ " the nice Vim features, but have a slow computer and want to keep it\n"
+ " really fast.\n"
+! "3. Syntax highlighting shows many files in color. Not only does this look\n"
+ " nice, it also makes it easier to spot errors and you can work faster.\n"
+ " The other features include editing compressed files.\n"
+ ,
+--- 2535,2548 ----
+ "------------\n"
+ "(this choice is only available when creating a _vimrc file)\n"
+ "1. Vim can run in Vi-compatible mode. Many nice Vim features are then\n"
+! " disabled. Only choose Vi-compatible if you really need full Vi\n"
+! " compatibility.\n"
+! "2. Vim runs in not-Vi-compatible mode. Vim is still mostly Vi compatible,\n"
+! " but adds nice features like multi-level undo.\n"
+! "3. Running Vim with some enhancements is useful when you want some of\n"
+ " the nice Vim features, but have a slow computer and want to keep it\n"
+ " really fast.\n"
+! "4. Syntax highlighting shows many files in color. Not only does this look\n"
+ " nice, it also makes it easier to spot errors and you can work faster.\n"
+ " The other features include editing compressed files.\n"
+ ,
+*** ../vim-8.1.0540/src/version.c 2018-11-20 14:25:43.480880171 +0100
+--- src/version.c 2018-11-21 13:58:01.944305890 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 541,
+ /**/
+
+--
+An indication you must be a manager:
+You can explain to somebody the difference between "re-engineering",
+"down-sizing", "right-sizing", and "firing people's asses".
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0542 b/data/vim/patches/8.1.0542
new file mode 100644
index 000000000..761fd1b22
--- /dev/null
+++ b/data/vim/patches/8.1.0542
@@ -0,0 +1,423 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0542
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0542
+Problem: shiftwidth() does not take 'vartabstop' into account.
+Solution: Use the cursor position or a position explicitly passed.
+ Also make >> and << work better with 'vartabstop'. (Christian
+ Brabandt)
+Files: runtime/doc/change.txt, runtime/doc/eval.txt, src/edit.c,
+ src/evalfunc.c, src/normal.c, src/ops.c, src/option.c,
+ src/proto/edit.pro, src/proto/option.pro,
+ src/testdir/test_vartabs.vim
+
+*** ../vim-8.1.0541/runtime/doc/change.txt 2018-07-29 16:09:14.628945654 +0200
+--- runtime/doc/change.txt 2018-11-22 02:13:49.924044656 +0100
+***************
+*** 476,481 ****
+--- 476,485 ----
+ *<*
+ <{motion} Shift {motion} lines one 'shiftwidth' leftwards.
+
++ If the 'vartabstop' feature is enabled, and the
++ 'shiftwidth' option is set to zero, the amount of
++ indent is calculated at the first non-blank character
++ in the line.
+ *<<*
+ << Shift [count] lines one 'shiftwidth' leftwards.
+
+***************
+*** 487,492 ****
+--- 491,500 ----
+ *>*
+ >{motion} Shift {motion} lines one 'shiftwidth' rightwards.
+
++ If the 'vartabstop' feature is enabled, and the
++ 'shiftwidth' option is set to zero, the amount of
++ indent is calculated at the first non-blank character
++ in the line.
+ *>>*
+ >> Shift [count] lines one 'shiftwidth' rightwards.
+
+***************
+*** 708,713 ****
+--- 716,722 ----
+ search pattern.
+ {not in Vi: highlighting of the match, other responses than 'y' or 'n'}
+
++ *:s_e*
+ [e] When the search pattern fails, do not issue an error message and, in
+ particular, continue in maps as if no error occurred. This is most
+ useful to prevent the "No match" error from breaking a mapping. Vim
+***************
+*** 719,724 ****
+--- 728,734 ----
+ Interrupted
+ {not in Vi}
+
++ *:s_g*
+ [g] Replace all occurrences in the line. Without this argument,
+ replacement occurs only for the first occurrence in each line. If
+ the 'edcompatible' option is on, Vim remembers this flag and toggles
+*** ../vim-8.1.0541/runtime/doc/eval.txt 2018-11-11 15:20:32.432704446 +0100
+--- runtime/doc/eval.txt 2018-11-22 02:20:01.809633383 +0100
+***************
+*** 2379,2385 ****
+ shellescape({string} [, {special}])
+ String escape {string} for use as shell
+ command argument
+! shiftwidth() Number effective value of 'shiftwidth'
+ simplify({filename}) String simplify filename as much as possible
+ sin({expr}) Float sine of {expr}
+ sinh({expr}) Float hyperbolic sine of {expr}
+--- 2385,2391 ----
+ shellescape({string} [, {special}])
+ String escape {string} for use as shell
+ command argument
+! shiftwidth([{col}]) Number effective value of 'shiftwidth'
+ simplify({filename}) String simplify filename as much as possible
+ sin({expr}) Float sine of {expr}
+ sinh({expr}) Float hyperbolic sine of {expr}
+***************
+*** 7629,7639 ****
+ < See also |::S|.
+
+
+! shiftwidth() *shiftwidth()*
+ Returns the effective value of 'shiftwidth'. This is the
+ 'shiftwidth' value unless it is zero, in which case it is the
+ 'tabstop' value. This function was introduced with patch
+! 7.3.694 in 2012, everybody should have it by now.
+
+
+ simplify({filename}) *simplify()*
+--- 7638,7654 ----
+ < See also |::S|.
+
+
+! shiftwidth([{col}]) *shiftwidth()*
+ Returns the effective value of 'shiftwidth'. This is the
+ 'shiftwidth' value unless it is zero, in which case it is the
+ 'tabstop' value. This function was introduced with patch
+! 7.3.694 in 2012, everybody should have it by now (however it
+! did not allow for the optional {col} argument until 8.1.542).
+!
+! When there is one argument {col} this is used as column number
+! for which to return the 'shiftwidth' value. This matters for the
+! 'vartabstop' feature. If the 'vartabstop' setting is enabled and
+! no {col} argument is given, column 1 will be assumed.
+
+
+ simplify({filename}) *simplify()*
+*** ../vim-8.1.0541/src/edit.c 2018-11-02 11:59:11.555438565 +0100
+--- src/edit.c 2018-11-22 02:21:29.857045389 +0100
+***************
+*** 262,268 ****
+ #ifdef FEAT_SMARTINDENT
+ static void ins_try_si(int c);
+ #endif
+- static colnr_T get_nolist_virtcol(void);
+ #if defined(FEAT_EVAL)
+ static char_u *do_insert_char_pre(int c);
+ #endif
+--- 262,267 ----
+***************
+*** 10681,10689 ****
+ * Get the value that w_virtcol would have when 'list' is off.
+ * Unless 'cpo' contains the 'L' flag.
+ */
+! static colnr_T
+ get_nolist_virtcol(void)
+ {
+ if (curwin->w_p_list && vim_strchr(p_cpo, CPO_LISTWM) == NULL)
+ return getvcol_nolist(&curwin->w_cursor);
+ validate_virtcol();
+--- 10680,10693 ----
+ * Get the value that w_virtcol would have when 'list' is off.
+ * Unless 'cpo' contains the 'L' flag.
+ */
+! colnr_T
+ get_nolist_virtcol(void)
+ {
++ // check validity of cursor in current buffer
++ if (curwin->w_buffer == NULL
++ || curwin->w_buffer->b_ml.ml_mfp == NULL
++ || curwin->w_cursor.lnum > curwin->w_buffer->b_ml.ml_line_count)
++ return 0;
+ if (curwin->w_p_list && vim_strchr(p_cpo, CPO_LISTWM) == NULL)
+ return getvcol_nolist(&curwin->w_cursor);
+ validate_virtcol();
+*** ../vim-8.1.0541/src/evalfunc.c 2018-11-11 21:22:53.649977524 +0100
+--- src/evalfunc.c 2018-11-22 02:23:21.876290935 +0100
+***************
+*** 835,841 ****
+ {"sha256", 1, 1, f_sha256},
+ #endif
+ {"shellescape", 1, 2, f_shellescape},
+! {"shiftwidth", 0, 0, f_shiftwidth},
+ {"simplify", 1, 1, f_simplify},
+ #ifdef FEAT_FLOAT
+ {"sin", 1, 1, f_sin},
+--- 835,841 ----
+ {"sha256", 1, 1, f_sha256},
+ #endif
+ {"shellescape", 1, 2, f_shellescape},
+! {"shiftwidth", 0, 1, f_shiftwidth},
+ {"simplify", 1, 1, f_simplify},
+ #ifdef FEAT_FLOAT
+ {"sin", 1, 1, f_sin},
+***************
+*** 11241,11246 ****
+--- 11241,11261 ----
+ static void
+ f_shiftwidth(typval_T *argvars UNUSED, typval_T *rettv)
+ {
++ rettv->vval.v_number = 0;
++
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ {
++ long col;
++
++ col = (long)get_tv_number_chk(argvars, NULL);
++ if (col < 0)
++ return; // type error; errmsg already given
++ #ifdef FEAT_VARTABS
++ rettv->vval.v_number = get_sw_value_col(curbuf, col);
++ return;
++ #endif
++ }
++
+ rettv->vval.v_number = get_sw_value(curbuf);
+ }
+
+*** ../vim-8.1.0541/src/normal.c 2018-11-10 16:01:23.331381891 +0100
+--- src/normal.c 2018-11-22 02:24:26.215854890 +0100
+***************
+*** 8143,8148 ****
+--- 8143,8149 ----
+ do
+ i = gchar_cursor();
+ while (VIM_ISWHITE(i) && oneright() == OK);
++ curwin->w_valid &= ~VALID_WCOL;
+ }
+ curwin->w_set_curswant = TRUE;
+ break;
+*** ../vim-8.1.0541/src/ops.c 2018-11-16 20:54:27.053554626 +0100
+--- src/ops.c 2018-11-22 02:51:34.899814809 +0100
+***************
+*** 334,340 ****
+ {
+ int count;
+ int i, j;
+! int p_sw = (int)get_sw_value(curbuf);
+
+ count = get_indent(); /* get current indent */
+
+--- 334,340 ----
+ {
+ int count;
+ int i, j;
+! int p_sw = (int)get_sw_value_indent(curbuf);
+
+ count = get_indent(); /* get current indent */
+
+***************
+*** 386,392 ****
+ int total;
+ char_u *newp, *oldp;
+ int oldcol = curwin->w_cursor.col;
+! int p_sw = (int)get_sw_value(curbuf);
+ #ifdef FEAT_VARTABS
+ int *p_vts = curbuf->b_p_vts_array;
+ #endif
+--- 386,392 ----
+ int total;
+ char_u *newp, *oldp;
+ int oldcol = curwin->w_cursor.col;
+! int p_sw = (int)get_sw_value_indent(curbuf);
+ #ifdef FEAT_VARTABS
+ int *p_vts = curbuf->b_p_vts_array;
+ #endif
+*** ../vim-8.1.0541/src/option.c 2018-11-20 14:25:43.480880171 +0100
+--- src/option.c 2018-11-22 02:52:47.875239563 +0100
+***************
+*** 13113,13119 ****
+ long
+ get_sw_value(buf_T *buf)
+ {
+! return buf->b_p_sw ? buf->b_p_sw : buf->b_p_ts;
+ }
+
+ /*
+--- 13113,13160 ----
+ long
+ get_sw_value(buf_T *buf)
+ {
+! return get_sw_value_col(buf, 0);
+! }
+!
+! /*
+! * Idem, using the first non-black in the current line.
+! */
+! long
+! get_sw_value_indent(buf_T *buf)
+! {
+! pos_T pos = curwin->w_cursor;
+!
+! pos.col = getwhitecols_curline();
+! return get_sw_value_pos(buf, &pos);
+! }
+!
+! /*
+! * Idem, using "pos".
+! */
+! long
+! get_sw_value_pos(buf_T *buf, pos_T *pos)
+! {
+! pos_T save_cursor = curwin->w_cursor;
+! long sw_value;
+!
+! curwin->w_cursor = *pos;
+! sw_value = get_sw_value_col(buf, get_nolist_virtcol());
+! curwin->w_cursor = save_cursor;
+! return sw_value;
+! }
+!
+! /*
+! * Idem, using virtual column "col".
+! */
+! long
+! get_sw_value_col(buf_T *buf, colnr_T col UNUSED)
+! {
+! return buf->b_p_sw ? buf->b_p_sw :
+! #ifdef FEAT_VARTABS
+! tabstop_at(col, buf->b_p_ts, buf->b_p_vts_array);
+! #else
+! buf->b_p_ts;
+! #endif
+ }
+
+ /*
+*** ../vim-8.1.0541/src/proto/edit.pro 2018-06-03 14:42:17.848505102 +0200
+--- src/proto/edit.pro 2018-11-22 02:27:22.574651476 +0100
+***************
+*** 46,49 ****
+--- 46,50 ----
+ void ins_scroll(void);
+ void ins_horscroll(void);
+ int ins_copychar(linenr_T lnum);
++ colnr_T get_nolist_virtcol(void);
+ /* vim: set ft=c : */
+*** ../vim-8.1.0541/src/proto/option.pro 2018-10-02 14:45:07.023652468 +0200
+--- src/proto/option.pro 2018-11-22 02:51:41.159765202 +0100
+***************
+*** 72,77 ****
+--- 72,80 ----
+ int tabstop_count(int *ts);
+ int tabstop_first(int *ts);
+ long get_sw_value(buf_T *buf);
++ long get_sw_value_indent(buf_T *buf);
++ long get_sw_value_pos(buf_T *buf, pos_T *pos);
++ long get_sw_value_col(buf_T *buf, colnr_T col);
+ long get_sts_value(void);
+ void find_mps_values(int *initc, int *findc, int *backwards, int switchit);
+ unsigned int get_bkc_value(buf_T *buf);
+*** ../vim-8.1.0541/src/testdir/test_vartabs.vim 2018-10-15 22:51:46.744578471 +0200
+--- src/testdir/test_vartabs.vim 2018-11-22 02:54:38.198381540 +0100
+***************
+*** 297,302 ****
+--- 297,367 ----
+ set nolist listchars&vim
+ endfunc
+
++ func Test_vartabs_shiftwidth()
++ "return
++ if winwidth(0) < 40
++ return
++ endif
++ new
++ 40vnew
++ %d
++ " setl varsofttabstop=10,20,30,40
++ setl shiftwidth=0 vartabstop=10,20,30,40
++ call setline(1, "x")
++
++ " Check without any change.
++ let expect = ['x ']
++ let lines = ScreenLines(1, winwidth(0))
++ call s:compare_lines(expect, lines)
++ " Test 1:
++ " shiftwidth depends on the indent, first check with cursor at the end of the
++ " line (which is the same as the start of the line, since there is only one
++ " character).
++ norm! $>>
++ let expect1 = [' x ']
++ let lines = ScreenLines(1, winwidth(0))
++ call s:compare_lines(expect1, lines)
++ call assert_equal(10, shiftwidth())
++ call assert_equal(10, shiftwidth(1))
++ call assert_equal(20, shiftwidth(virtcol('.')))
++ norm! $>>
++ let expect2 = [' x ', '~ ']
++ let lines = ScreenLines([1, 2], winwidth(0))
++ call s:compare_lines(expect2, lines)
++ call assert_equal(20, shiftwidth(virtcol('.')-2))
++ call assert_equal(30, shiftwidth(virtcol('.')))
++ norm! $>>
++ let expect3 = [' ', ' x ', '~ ']
++ let lines = ScreenLines([1, 3], winwidth(0))
++ call s:compare_lines(expect3, lines)
++ call assert_equal(30, shiftwidth(virtcol('.')-2))
++ call assert_equal(40, shiftwidth(virtcol('.')))
++ norm! $>>
++ let expect4 = [' ', ' ', ' x ']
++ let lines = ScreenLines([1, 3], winwidth(0))
++ call assert_equal(40, shiftwidth(virtcol('.')))
++ call s:compare_lines(expect4, lines)
++
++ " Test 2: Put the cursor at the first column, result should be the same
++ call setline(1, "x")
++ norm! 0>>
++ let lines = ScreenLines(1, winwidth(0))
++ call s:compare_lines(expect1, lines)
++ norm! 0>>
++ let lines = ScreenLines([1, 2], winwidth(0))
++ call s:compare_lines(expect2, lines)
++ norm! 0>>
++ let lines = ScreenLines([1, 3], winwidth(0))
++ call s:compare_lines(expect3, lines)
++ norm! 0>>
++ let lines = ScreenLines([1, 3], winwidth(0))
++ call s:compare_lines(expect4, lines)
++
++ " cleanup
++ bw!
++ bw!
++ endfunc
++
+ func Test_vartabs_failures()
+ call assert_fails('set vts=8,')
+ call assert_fails('set vsts=8,')
+*** ../vim-8.1.0541/src/version.c 2018-11-21 13:58:27.092110956 +0100
+--- src/version.c 2018-11-22 02:19:24.593880355 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 542,
+ /**/
+
+--
+I wonder, do vegetarians eat fruit bats?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0543 b/data/vim/patches/8.1.0543
new file mode 100644
index 000000000..e4785a519
--- /dev/null
+++ b/data/vim/patches/8.1.0543
@@ -0,0 +1,68 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0543
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0543
+Problem: Coverity warns for leaking memory and using wrong struct.
+Solution: Free pointer when allocation fails. Change "boff" to "loff".
+ (closes #3634)
+Files: src/ex_getln.c, src/move.c
+
+
+*** ../vim-8.1.0542/src/ex_getln.c 2018-10-28 14:36:04.218247711 +0100
+--- src/ex_getln.c 2018-11-24 14:10:40.600261324 +0100
+***************
+*** 1378,1383 ****
+--- 1378,1384 ----
+ redrawcmd();
+ goto cmdline_changed;
+ }
++ vim_free(p);
+ }
+ }
+ beep_flush();
+*** ../vim-8.1.0542/src/move.c 2018-10-02 18:25:41.424867560 +0200
+--- src/move.c 2018-11-24 14:21:29.499284569 +0100
+***************
+*** 1961,1967 ****
+ scrolled += loff.height;
+ if (loff.lnum == curwin->w_botline
+ #ifdef FEAT_DIFF
+! && boff.fill == 0
+ #endif
+ )
+ scrolled -= curwin->w_empty_rows;
+--- 1961,1967 ----
+ scrolled += loff.height;
+ if (loff.lnum == curwin->w_botline
+ #ifdef FEAT_DIFF
+! && loff.fill == 0
+ #endif
+ )
+ scrolled -= curwin->w_empty_rows;
+*** ../vim-8.1.0542/src/version.c 2018-11-22 03:07:30.948596188 +0100
+--- src/version.c 2018-11-24 14:10:50.996181285 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 543,
+ /**/
+
+--
+ [Another hideous roar.]
+BEDEVERE: That's it!
+ARTHUR: What?
+BEDEVERE: It's The Legendary Black Beast of Aaaaarrrrrrggghhh!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0544 b/data/vim/patches/8.1.0544
new file mode 100644
index 000000000..1a77171b7
--- /dev/null
+++ b/data/vim/patches/8.1.0544
@@ -0,0 +1,432 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0544
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0544 (after 8.1.0540)
+Problem: Setting 'filetype' in a modeline causes an error (Hirohito
+ Higashi).
+Solution: Don't add the P_INSECURE flag when setting 'filetype' from a
+ modeline. Also for 'syntax'.
+Files: src/option.c, src/testdir/test_modeline.vim
+
+
+*** ../vim-8.1.0543/src/option.c 2018-11-22 03:07:30.948596188 +0100
+--- src/option.c 2018-11-25 02:06:48.284746758 +0100
+***************
+*** 3284,3290 ****
+ static void set_options_default(int opt_flags);
+ static void set_string_default_esc(char *name, char_u *val, int escape);
+ static char_u *term_bg_default(void);
+! static void did_set_option(int opt_idx, int opt_flags, int new_value);
+ static char_u *option_expand(int opt_idx, char_u *val);
+ static void didset_options(void);
+ static void didset_options2(void);
+--- 3284,3290 ----
+ static void set_options_default(int opt_flags);
+ static void set_string_default_esc(char *name, char_u *val, int escape);
+ static char_u *term_bg_default(void);
+! static void did_set_option(int opt_idx, int opt_flags, int new_value, int value_checked);
+ static char_u *option_expand(int opt_idx, char_u *val);
+ static void didset_options(void);
+ static void didset_options2(void);
+***************
+*** 3295,3301 ****
+ # define insecure_flag(opt_idx, opt_flags) (&options[opt_idx].flags)
+ #endif
+ static void set_string_option_global(int opt_idx, char_u **varp);
+! static char_u *did_set_string_option(int opt_idx, char_u **varp, int new_value_alloced, char_u *oldval, char_u *errbuf, int opt_flags);
+ static char_u *set_chars_option(char_u **varp);
+ #ifdef FEAT_CLIPBOARD
+ static char_u *check_clipboard_option(void);
+--- 3295,3301 ----
+ # define insecure_flag(opt_idx, opt_flags) (&options[opt_idx].flags)
+ #endif
+ static void set_string_option_global(int opt_idx, char_u **varp);
+! static char_u *did_set_string_option(int opt_idx, char_u **varp, int new_value_alloced, char_u *oldval, char_u *errbuf, int opt_flags, int *value_checked);
+ static char_u *set_chars_option(char_u **varp);
+ #ifdef FEAT_CLIPBOARD
+ static char_u *check_clipboard_option(void);
+***************
+*** 4706,4711 ****
+--- 4706,4712 ----
+ else
+ {
+ int value_is_replaced = !prepending && !adding && !removing;
++ int value_checked = FALSE;
+
+ if (flags & P_BOOL) /* boolean */
+ {
+***************
+*** 5236,5242 ****
+ // or 'filetype' autocommands may be triggered that can
+ // cause havoc.
+ errmsg = did_set_string_option(opt_idx, (char_u **)varp,
+! new_value_alloced, oldval, errbuf, opt_flags);
+
+ if (did_inc_secure)
+ --secure;
+--- 5237,5244 ----
+ // or 'filetype' autocommands may be triggered that can
+ // cause havoc.
+ errmsg = did_set_string_option(opt_idx, (char_u **)varp,
+! new_value_alloced, oldval, errbuf,
+! opt_flags, &value_checked);
+
+ if (did_inc_secure)
+ --secure;
+***************
+*** 5280,5286 ****
+ }
+
+ if (opt_idx >= 0)
+! did_set_option(opt_idx, opt_flags, value_is_replaced);
+ }
+
+ skip:
+--- 5282,5289 ----
+ }
+
+ if (opt_idx >= 0)
+! did_set_option(
+! opt_idx, opt_flags, value_is_replaced, value_checked);
+ }
+
+ skip:
+***************
+*** 5348,5355 ****
+ static void
+ did_set_option(
+ int opt_idx,
+! int opt_flags, /* possibly with OPT_MODELINE */
+! int new_value) /* value was replaced completely */
+ {
+ long_u *p;
+
+--- 5351,5360 ----
+ static void
+ did_set_option(
+ int opt_idx,
+! int opt_flags, // possibly with OPT_MODELINE
+! int new_value, // value was replaced completely
+! int value_checked) // value was checked to be safe, no need to set the
+! // P_INSECURE flag.
+ {
+ long_u *p;
+
+***************
+*** 5359,5369 ****
+ * set the P_INSECURE flag. Otherwise, if a new value is stored reset the
+ * flag. */
+ p = insecure_flag(opt_idx, opt_flags);
+! if (secure
+ #ifdef HAVE_SANDBOX
+ || sandbox != 0
+ #endif
+! || (opt_flags & OPT_MODELINE))
+ *p = *p | P_INSECURE;
+ else if (new_value)
+ *p = *p & ~P_INSECURE;
+--- 5364,5374 ----
+ * set the P_INSECURE flag. Otherwise, if a new value is stored reset the
+ * flag. */
+ p = insecure_flag(opt_idx, opt_flags);
+! if (!value_checked && (secure
+ #ifdef HAVE_SANDBOX
+ || sandbox != 0
+ #endif
+! || (opt_flags & OPT_MODELINE)))
+ *p = *p | P_INSECURE;
+ else if (new_value)
+ *p = *p & ~P_INSECURE;
+***************
+*** 6036,6041 ****
+--- 6041,6047 ----
+ char_u *saved_newval = NULL;
+ #endif
+ char_u *r = NULL;
++ int value_checked = FALSE;
+
+ if (options[opt_idx].var == NULL) /* don't set hidden option */
+ return NULL;
+***************
+*** 6063,6070 ****
+ }
+ #endif
+ if ((r = did_set_string_option(opt_idx, varp, TRUE, oldval, NULL,
+! opt_flags)) == NULL)
+! did_set_option(opt_idx, opt_flags, TRUE);
+
+ #if defined(FEAT_EVAL)
+ /* call autocommand after handling side effects */
+--- 6069,6076 ----
+ }
+ #endif
+ if ((r = did_set_string_option(opt_idx, varp, TRUE, oldval, NULL,
+! opt_flags, &value_checked)) == NULL)
+! did_set_option(opt_idx, opt_flags, TRUE, value_checked);
+
+ #if defined(FEAT_EVAL)
+ /* call autocommand after handling side effects */
+***************
+*** 6099,6110 ****
+ */
+ static char_u *
+ did_set_string_option(
+! int opt_idx, /* index in options[] table */
+! char_u **varp, /* pointer to the option variable */
+! int new_value_alloced, /* new value was allocated */
+! char_u *oldval, /* previous value of the option */
+! char_u *errbuf, /* buffer for errors, or NULL */
+! int opt_flags) /* OPT_LOCAL and/or OPT_GLOBAL */
+ {
+ char_u *errmsg = NULL;
+ char_u *s, *p;
+--- 6105,6118 ----
+ */
+ static char_u *
+ did_set_string_option(
+! int opt_idx, // index in options[] table
+! char_u **varp, // pointer to the option variable
+! int new_value_alloced, // new value was allocated
+! char_u *oldval, // previous value of the option
+! char_u *errbuf, // buffer for errors, or NULL
+! int opt_flags, // OPT_LOCAL and/or OPT_GLOBAL
+! int *value_checked) // value was checked to be save, no
+! // need to set P_INSECURE
+ {
+ char_u *errmsg = NULL;
+ char_u *s, *p;
+***************
+*** 6134,6143 ****
+ errmsg = e_secure;
+ }
+
+! /* Check for a "normal" directory or file name in some options. Disallow a
+! * path separator (slash and/or backslash), wildcards and characters that
+! * are often illegal in a file name. Be more permissive if "secure" is off.
+! */
+ else if (((options[opt_idx].flags & P_NFNAME)
+ && vim_strpbrk(*varp, (char_u *)(secure
+ ? "/\\*?[|;&<>\r\n" : "/\\*?[<>\r\n")) != NULL)
+--- 6142,6150 ----
+ errmsg = e_secure;
+ }
+
+! // Check for a "normal" directory or file name in some options. Disallow a
+! // path separator (slash and/or backslash), wildcards and characters that
+! // are often illegal in a file name. Be more permissive if "secure" is off.
+ else if (((options[opt_idx].flags & P_NFNAME)
+ && vim_strpbrk(*varp, (char_u *)(secure
+ ? "/\\*?[|;&<>\r\n" : "/\\*?[<>\r\n")) != NULL)
+***************
+*** 6524,6532 ****
+ if (!valid_filetype(*varp))
+ errmsg = e_invarg;
+ else
+! /* load or unload key mapping tables */
+ errmsg = keymap_init();
+
+ if (errmsg == NULL)
+ {
+ if (*curbuf->b_p_keymap != NUL)
+--- 6531,6553 ----
+ if (!valid_filetype(*varp))
+ errmsg = e_invarg;
+ else
+! {
+! int secure_save = secure;
+!
+! // Reset the secure flag, since the value of 'keymap' has
+! // been checked to be safe.
+! secure = 0;
+!
+! // load or unload key mapping tables
+ errmsg = keymap_init();
+
++ secure = secure_save;
++
++ // Since we check the value, there is no need to set P_INSECURE,
++ // even when the value comes from a modeline.
++ *value_checked = TRUE;
++ }
++
+ if (errmsg == NULL)
+ {
+ if (*curbuf->b_p_keymap != NUL)
+***************
+*** 7523,7529 ****
+--- 7544,7556 ----
+ if (!valid_filetype(*varp))
+ errmsg = e_invarg;
+ else
++ {
+ value_changed = STRCMP(oldval, *varp) != 0;
++
++ // Since we check the value, there is no need to set P_INSECURE,
++ // even when the value comes from a modeline.
++ *value_checked = TRUE;
++ }
+ }
+
+ #ifdef FEAT_SYN_HL
+***************
+*** 7532,7538 ****
+--- 7559,7571 ----
+ if (!valid_filetype(*varp))
+ errmsg = e_invarg;
+ else
++ {
+ value_changed = STRCMP(oldval, *varp) != 0;
++
++ // Since we check the value, there is no need to set P_INSECURE,
++ // even when the value comes from a modeline.
++ *value_checked = TRUE;
++ }
+ }
+ #endif
+
+***************
+*** 7752,7758 ****
+ * already set to this value. */
+ if (!(opt_flags & OPT_MODELINE) || value_changed)
+ {
+! static int ft_recursive = 0;
+
+ ++ft_recursive;
+ did_filetype = TRUE;
+--- 7785,7796 ----
+ * already set to this value. */
+ if (!(opt_flags & OPT_MODELINE) || value_changed)
+ {
+! static int ft_recursive = 0;
+! int secure_save = secure;
+!
+! // Reset the secure flag, since the value of 'filetype' has
+! // been checked to be safe.
+! secure = 0;
+
+ ++ft_recursive;
+ did_filetype = TRUE;
+***************
+*** 7764,7769 ****
+--- 7802,7809 ----
+ /* Just in case the old "curbuf" is now invalid. */
+ if (varp != &(curbuf->b_p_ft))
+ varp = NULL;
++
++ secure = secure_save;
+ }
+ }
+ #ifdef FEAT_SPELL
+*** ../vim-8.1.0543/src/testdir/test_modeline.vim 2018-11-03 19:06:20.211795974 +0100
+--- src/testdir/test_modeline.vim 2018-11-25 02:14:42.281361870 +0100
+***************
+*** 6,12 ****
+--- 6,88 ----
+ let modeline = &modeline
+ set modeline
+ call assert_fails('split Xmodeline', 'E518:')
++
+ let &modeline = modeline
+ bwipe!
+ call delete('Xmodeline')
+ endfunc
++
++ func Test_modeline_filetype()
++ call writefile(['vim: set ft=c :', 'nothing'], 'Xmodeline_filetype')
++ let modeline = &modeline
++ set modeline
++ filetype plugin on
++ split Xmodeline_filetype
++ call assert_equal("c", &filetype)
++ call assert_equal(1, b:did_ftplugin)
++ call assert_equal("ccomplete#Complete", &ofu)
++
++ bwipe!
++ call delete('Xmodeline_filetype')
++ let &modeline = modeline
++ filetype plugin off
++ endfunc
++
++ func Test_modeline_syntax()
++ call writefile(['vim: set syn=c :', 'nothing'], 'Xmodeline_syntax')
++ let modeline = &modeline
++ set modeline
++ syntax enable
++ split Xmodeline_syntax
++ call assert_equal("c", &syntax)
++ call assert_equal("c", b:current_syntax)
++
++ bwipe!
++ call delete('Xmodeline_syntax')
++ let &modeline = modeline
++ syntax off
++ endfunc
++
++ func Test_modeline_keymap()
++ call writefile(['vim: set keymap=greek :', 'nothing'], 'Xmodeline_keymap')
++ let modeline = &modeline
++ set modeline
++ split Xmodeline_keymap
++ call assert_equal("greek", &keymap)
++ call assert_match('greek\|grk', b:keymap_name)
++
++ bwipe!
++ call delete('Xmodeline_keymap')
++ let &modeline = modeline
++ set keymap= iminsert=0 imsearch=-1
++ endfunc
++
++ func s:modeline_fails(what, text)
++ let fname = "Xmodeline_fails_" . a:what
++ call writefile(['vim: set ' . a:text . ' :', 'nothing'], fname)
++ let modeline = &modeline
++ set modeline
++ filetype plugin on
++ syntax enable
++ call assert_fails('split ' . fname, 'E474:')
++ call assert_equal("", &filetype)
++ call assert_equal("", &syntax)
++
++ bwipe!
++ call delete(fname)
++ let &modeline = modeline
++ filetype plugin off
++ syntax off
++ endfunc
++
++ func Test_modeline_filetype_fails()
++ call s:modeline_fails('filetype', 'ft=evil$CMD')
++ endfunc
++
++ func Test_modeline_syntax_fails()
++ call s:modeline_fails('syntax', 'syn=evil$CMD')
++ endfunc
++
++ func Test_modeline_keymap_fails()
++ call s:modeline_fails('keymap', 'keymap=evil$CMD')
++ endfunc
+*** ../vim-8.1.0543/src/version.c 2018-11-24 14:27:36.988474753 +0100
+--- src/version.c 2018-11-25 02:17:53.463996557 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 544,
+ /**/
+
+--
+To the optimist, the glass is half full.
+To the pessimist, the glass is half empty.
+To the engineer, the glass is twice as big as it needs to be.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0545 b/data/vim/patches/8.1.0545
new file mode 100644
index 000000000..5ebd8bc26
--- /dev/null
+++ b/data/vim/patches/8.1.0545
@@ -0,0 +1,71 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0545
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0545
+Problem: When executing indent tests user preferences interfere.
+Solution: Add "--clean".
+Files: runtime/indent/Makefile, runtime/indent/testdir/runtest.vim
+
+
+*** ../vim-8.1.0544/runtime/indent/Makefile 2018-10-25 16:52:46.839887739 +0200
+--- runtime/indent/Makefile 2018-11-20 02:17:41.810321876 +0100
+***************
+*** 6,13 ****
+ # If a test succeeds a testdir/*.out file will be written.
+ # If a test fails a testdir/*.fail file will be written.
+ test:
+! $(VIM) --not-a-term -u testdir/runtest.vim
+
+
+ clean:
+! $(VIM) --not-a-term -u testdir/cleantest.vim
+--- 6,13 ----
+ # If a test succeeds a testdir/*.out file will be written.
+ # If a test fails a testdir/*.fail file will be written.
+ test:
+! $(VIM) --clean --not-a-term -u testdir/runtest.vim
+
+
+ clean:
+! $(VIM) --clean --not-a-term -u testdir/cleantest.vim
+*** ../vim-8.1.0544/runtime/indent/testdir/runtest.vim 2018-10-25 16:52:46.839887739 +0200
+--- runtime/indent/testdir/runtest.vim 2018-11-22 03:38:03.875097200 +0100
+***************
+*** 1,4 ****
+! " Runs all the indent tests for which there is no .out file
+
+ set nocp
+ filetype indent on
+--- 1,6 ----
+! " Runs all the indent tests for which there is no .out file.
+! "
+! " Current directory must be runtime/indent.
+
+ set nocp
+ filetype indent on
+*** ../vim-8.1.0544/src/version.c 2018-11-25 02:18:24.815772654 +0100
+--- src/version.c 2018-11-25 04:02:11.214968532 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 545,
+ /**/
+
+--
+ROBIN: (warily) And if you get a question wrong?
+ARTHUR: You are cast into the Gorge of Eternal Peril.
+ROBIN: Oh ... wacho!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0546 b/data/vim/patches/8.1.0546
new file mode 100644
index 000000000..1054134ed
--- /dev/null
+++ b/data/vim/patches/8.1.0546
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0546
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0546
+Problem: Modeline test with keymap fails.
+Solution: Check that the keymap feature is available.
+Files: src/testdir/test_modeline.vim
+
+
+*** ../vim-8.1.0545/src/testdir/test_modeline.vim 2018-11-25 02:18:24.815772654 +0100
+--- src/testdir/test_modeline.vim 2018-11-25 04:18:53.256071424 +0100
+***************
+*** 44,49 ****
+--- 44,52 ----
+ endfunc
+
+ func Test_modeline_keymap()
++ if !has('keymap')
++ return
++ endif
+ call writefile(['vim: set keymap=greek :', 'nothing'], 'Xmodeline_keymap')
+ let modeline = &modeline
+ set modeline
+*** ../vim-8.1.0545/src/version.c 2018-11-25 04:03:04.262574403 +0100
+--- src/version.c 2018-11-25 04:24:54.857700649 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 546,
+ /**/
+
+--
+Sorry, no fortune today.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0547 b/data/vim/patches/8.1.0547
new file mode 100644
index 000000000..651a2d69c
--- /dev/null
+++ b/data/vim/patches/8.1.0547
@@ -0,0 +1,46 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0547
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0547
+Problem: Modeline test with keymap still fails.
+Solution: Check that the keymap feature is available for the failure assert.
+Files: src/testdir/test_modeline.vim
+
+
+*** ../vim-8.1.0546/src/testdir/test_modeline.vim 2018-11-25 04:25:50.901321246 +0100
+--- src/testdir/test_modeline.vim 2018-11-25 05:03:15.917380300 +0100
+***************
+*** 87,91 ****
+--- 87,94 ----
+ endfunc
+
+ func Test_modeline_keymap_fails()
++ if !has('keymap')
++ return
++ endif
+ call s:modeline_fails('keymap', 'keymap=evil$CMD')
+ endfunc
+*** ../vim-8.1.0546/src/version.c 2018-11-25 04:25:50.901321246 +0100
+--- src/version.c 2018-11-25 05:04:50.292702524 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 547,
+ /**/
+
+--
+Permission is granted to read this message out aloud on Kings Cross Road,
+London, under the condition that the orator is properly dressed.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0548 b/data/vim/patches/8.1.0548
new file mode 100644
index 000000000..905c7b713
--- /dev/null
+++ b/data/vim/patches/8.1.0548
@@ -0,0 +1,53 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0548
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0548
+Problem: Crash when job callback unloads a buffer. (James McCoy)
+Solution: Don't round up the wait time to 10 msec in ui_inchar().
+Files: src/ui.c
+
+
+*** ../vim-8.1.0547/src/ui.c 2018-11-20 02:42:37.111373664 +0100
+--- src/ui.c 2018-11-26 20:50:54.398315964 +0100
+***************
+*** 154,161 ****
+ static int count = 0;
+
+ # ifndef NO_CONSOLE
+! retval = mch_inchar(buf, maxlen, (wtime >= 0 && wtime < 10)
+! ? 10L : wtime, tb_change_cnt);
+ if (retval > 0 || typebuf_changed(tb_change_cnt) || wtime >= 0)
+ goto theend;
+ # endif
+--- 154,160 ----
+ static int count = 0;
+
+ # ifndef NO_CONSOLE
+! retval = mch_inchar(buf, maxlen, wtime, tb_change_cnt);
+ if (retval > 0 || typebuf_changed(tb_change_cnt) || wtime >= 0)
+ goto theend;
+ # endif
+*** ../vim-8.1.0547/src/version.c 2018-11-25 05:06:34.947950996 +0100
+--- src/version.c 2018-11-26 21:18:49.601434988 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 548,
+ /**/
+
+--
+Men may not be seen publicly in any kind of strapless gown.
+ [real standing law in Florida, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0549 b/data/vim/patches/8.1.0549
new file mode 100644
index 000000000..88d5a5694
--- /dev/null
+++ b/data/vim/patches/8.1.0549
@@ -0,0 +1,111 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0549
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0549
+Problem: Netbeans test depends on README.txt contents.
+Solution: Use a generated file instead.
+Files: src/testdir/test_netbeans.vim, src/testdir/test_netbeans.py
+
+
+*** ../vim-8.1.0548/src/testdir/test_netbeans.vim 2017-11-02 17:59:12.000000000 +0100
+--- src/testdir/test_netbeans.vim 2018-11-26 21:14:37.366788783 +0100
+***************
+*** 20,32 ****
+ func Nb_basic(port)
+ call delete("Xnetbeans")
+ call writefile([], "Xnetbeans")
+ exe 'nbstart :localhost:' . a:port . ':bunny'
+ call assert_true(has("netbeans_enabled"))
+
+ call WaitFor('len(readfile("Xnetbeans")) > 2')
+! split +$ README.txt
+
+! " Opening README.txt will result in a setDot command
+ call WaitFor('len(readfile("Xnetbeans")) > 4')
+ call WaitFor('getcurpos()[1] == 3')
+ let pos = getcurpos()
+--- 20,33 ----
+ func Nb_basic(port)
+ call delete("Xnetbeans")
+ call writefile([], "Xnetbeans")
++ call writefile(repeat(['abcdefghijklmnopqrstuvwxyz'], 5), "XREADME.txt")
+ exe 'nbstart :localhost:' . a:port . ':bunny'
+ call assert_true(has("netbeans_enabled"))
+
+ call WaitFor('len(readfile("Xnetbeans")) > 2')
+! split +$ XREADME.txt
+
+! " Opening XREADME.txt will result in a setDot command
+ call WaitFor('len(readfile("Xnetbeans")) > 4')
+ call WaitFor('getcurpos()[1] == 3')
+ let pos = getcurpos()
+***************
+*** 41,51 ****
+ call assert_equal('AUTH bunny', lines[0])
+ call assert_equal('0:version=0 "2.5"', lines[1])
+ call assert_equal('0:startupDone=0', lines[2])
+! call assert_equal('0:fileOpened=0 "README.txt" T F', substitute(lines[3], '".*/', '"', ''))
+
+ call assert_equal('0:disconnect=1', lines[6])
+
+ call delete("Xnetbeans")
+ endfunc
+
+ func Test_nb_basic()
+--- 42,53 ----
+ call assert_equal('AUTH bunny', lines[0])
+ call assert_equal('0:version=0 "2.5"', lines[1])
+ call assert_equal('0:startupDone=0', lines[2])
+! call assert_equal('0:fileOpened=0 "XREADME.txt" T F', substitute(lines[3], '".*/', '"', ''))
+
+ call assert_equal('0:disconnect=1', lines[6])
+
+ call delete("Xnetbeans")
++ call delete("XREADME.txt")
+ endfunc
+
+ func Test_nb_basic()
+*** ../vim-8.1.0548/src/testdir/test_netbeans.py 2016-09-14 22:22:03.000000000 +0200
+--- src/testdir/test_netbeans.py 2018-11-26 21:12:12.531537664 +0100
+***************
+*** 42,48 ****
+ myfile.write(received)
+
+ response = ''
+! if received.find('README.txt') > 0:
+ name = received.split('"')[1]
+ response = '5:putBufferNumber!33 "' + name + '"\n'
+ response += '5:setDot!1 3/19\n'
+--- 42,48 ----
+ myfile.write(received)
+
+ response = ''
+! if received.find('XREADME.txt') > 0:
+ name = received.split('"')[1]
+ response = '5:putBufferNumber!33 "' + name + '"\n'
+ response += '5:setDot!1 3/19\n'
+*** ../vim-8.1.0548/src/version.c 2018-11-26 21:19:08.045334122 +0100
+--- src/version.c 2018-11-26 21:20:25.064910721 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 549,
+ /**/
+
+--
+The Law, in its majestic equality, forbids the rich, as well as the
+poor, to sleep under the bridges, to beg in the streets, and to steal
+bread. -- Anatole France
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0550 b/data/vim/patches/8.1.0550
new file mode 100644
index 000000000..013224b5e
--- /dev/null
+++ b/data/vim/patches/8.1.0550
@@ -0,0 +1,123 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.05
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0550
+Problem: Expression evaluation may repeat an error message. (Jason
+ Franklin)
+Solution: Increment did_emsg and check for the value when giving an error
+ for the echo command.
+Files: src/message.c, src/eval.c, src/testdir/test108.ok
+
+
+*** ../vim-8.1.0549/src/message.c 2018-10-07 23:16:33.138616197 +0200
+--- src/message.c 2018-11-28 20:30:19.215302673 +0100
+***************
+*** 636,642 ****
+ if (cause_errthrow(s, severe, &ignore) == TRUE)
+ {
+ if (!ignore)
+! did_emsg = TRUE;
+ return TRUE;
+ }
+
+--- 636,642 ----
+ if (cause_errthrow(s, severe, &ignore) == TRUE)
+ {
+ if (!ignore)
+! ++did_emsg;
+ return TRUE;
+ }
+
+***************
+*** 689,695 ****
+ beep_flush(); /* also includes flush_buffers() */
+ else
+ flush_buffers(FLUSH_MINIMAL); // flush internal buffers
+! did_emsg = TRUE; // flag for DoOneCmd()
+ #ifdef FEAT_EVAL
+ did_uncaught_emsg = TRUE;
+ #endif
+--- 689,695 ----
+ beep_flush(); /* also includes flush_buffers() */
+ else
+ flush_buffers(FLUSH_MINIMAL); // flush internal buffers
+! ++did_emsg; // flag for DoOneCmd()
+ #ifdef FEAT_EVAL
+ did_uncaught_emsg = TRUE;
+ #endif
+*** ../vim-8.1.0549/src/eval.c 2018-10-25 13:31:33.829906902 +0200
+--- src/eval.c 2018-11-28 20:30:54.619090027 +0100
+***************
+*** 7999,8004 ****
+--- 7999,8005 ----
+ int needclr = TRUE;
+ int atstart = TRUE;
+ char_u numbuf[NUMBUFLEN];
++ int did_emsg_before = did_emsg;
+
+ if (eap->skip)
+ ++emsg_skip;
+***************
+*** 8016,8022 ****
+ * has been cancelled due to an aborting error, an interrupt, or an
+ * exception.
+ */
+! if (!aborting())
+ EMSG2(_(e_invexpr2), p);
+ need_clr_eos = FALSE;
+ break;
+--- 8017,8023 ----
+ * has been cancelled due to an aborting error, an interrupt, or an
+ * exception.
+ */
+! if (!aborting() && did_emsg == did_emsg_before)
+ EMSG2(_(e_invexpr2), p);
+ need_clr_eos = FALSE;
+ break;
+*** ../vim-8.1.0549/src/testdir/test108.ok 2016-01-16 15:35:46.000000000 +0100
+--- src/testdir/test108.ok 2018-11-28 20:37:22.504719732 +0100
+***************
+*** 28,34 ****
+ Error detected while processing function Foo[2]..Bar[2]..Bazz:
+ line 3:
+ E121: Undefined variable: var3
+- E15: Invalid expression: var3
+ here var3 is defined with "another var":
+ another var
+
+--- 28,33 ----
+***************
+*** 36,42 ****
+ Error detected while processing function Foo[2]..Bar:
+ line 3:
+ E121: Undefined variable: var2
+- E15: Invalid expression: var2
+ here var2 is defined with 10:
+ 10
+
+--- 35,40 ----
+*** ../vim-8.1.0549/src/version.c 2018-11-26 21:22:03.128367125 +0100
+--- src/version.c 2018-11-28 20:38:15.024394567 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 550,
+ /**/
+
+--
+A programmer's wife asks him: "Please run to the store and pick up a loaf of
+bread. If they have eggs, get a dozen". The programmer comes home with 12
+loafs of bread.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0551 b/data/vim/patches/8.1.0551
new file mode 100644
index 000000000..de81ef018
--- /dev/null
+++ b/data/vim/patches/8.1.0551
@@ -0,0 +1,72 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0551
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0551 (after 8.1.0550)
+Problem: Expression evaluation may repeat an error message. (Jason
+ Franklin)
+Solution: Check for the value of did_emsg when giving an error
+ for the :execute command.
+Files: src/eval.c
+
+
+*** ../vim-8.1.0550/src/eval.c 2018-11-28 20:38:34.564273386 +0100
+--- src/eval.c 2018-11-28 21:10:16.516158217 +0100
+***************
+*** 8115,8121 ****
+ char_u *p;
+ garray_T ga;
+ int len;
+! int save_did_emsg;
+
+ ga_init2(&ga, 1, 80);
+
+--- 8115,8121 ----
+ char_u *p;
+ garray_T ga;
+ int len;
+! int save_did_emsg = did_emsg;
+
+ ga_init2(&ga, 1, 80);
+
+***************
+*** 8131,8137 ****
+ * has been cancelled due to an aborting error, an interrupt, or an
+ * exception.
+ */
+! if (!aborting())
+ EMSG2(_(e_invexpr2), p);
+ ret = FAIL;
+ break;
+--- 8131,8137 ----
+ * has been cancelled due to an aborting error, an interrupt, or an
+ * exception.
+ */
+! if (!aborting() && did_emsg == save_did_emsg)
+ EMSG2(_(e_invexpr2), p);
+ ret = FAIL;
+ break;
+*** ../vim-8.1.0550/src/version.c 2018-11-28 20:38:34.564273386 +0100
+--- src/version.c 2018-11-28 21:11:41.047618911 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 551,
+ /**/
+
+--
+A parent can be arrested if his child cannot hold back a burp during a church
+service.
+ [real standing law in Nebraska, United States of America]
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0552 b/data/vim/patches/8.1.0552
new file mode 100644
index 000000000..6e27ee01a
--- /dev/null
+++ b/data/vim/patches/8.1.0552
@@ -0,0 +1,120 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0552
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0552
+Problem: Saved last search pattern may not be restored.
+Solution: Call restore_last_search_pattern(). Add a check for balancing
+ saving and restoring the last search pattern.
+Files: src/ex_getln.c, src/search.c
+
+
+*** ../vim-8.1.0551/src/ex_getln.c 2018-11-24 14:27:36.988474753 +0100
+--- src/ex_getln.c 2018-11-30 21:43:13.477019050 +0100
+***************
+*** 462,467 ****
+--- 462,468 ----
+ int use_last_pat;
+
+ // Parsing range may already set the last search pattern.
++ // NOTE: must call restore_last_search_pattern() before returning!
+ save_last_search_pattern();
+
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+***************
+*** 633,638 ****
+--- 634,640 ----
+ int save;
+
+ // Parsing range may already set the last search pattern.
++ // NOTE: must call restore_last_search_pattern() before returning!
+ save_last_search_pattern();
+
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+***************
+*** 735,740 ****
+--- 737,743 ----
+ int skiplen, patlen;
+
+ // Parsing range may already set the last search pattern.
++ // NOTE: must call restore_last_search_pattern() before returning!
+ save_last_search_pattern();
+
+ if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
+***************
+*** 742,747 ****
+--- 745,751 ----
+ restore_last_search_pattern();
+ return FAIL;
+ }
++ restore_last_search_pattern();
+
+ // Add a character from under the cursor for 'incsearch'.
+ if (is_state->did_incsearch)
+*** ../vim-8.1.0551/src/search.c 2018-11-16 16:21:01.633310065 +0100
+--- src/search.c 2018-11-30 21:46:33.771924536 +0100
+***************
+*** 96,101 ****
+--- 96,102 ----
+ /* copy of spats[RE_SEARCH], for keeping the search patterns while incremental
+ * searching */
+ static struct spat saved_last_search_spat;
++ static int did_save_last_search_spat = 0;
+ static int saved_last_idx = 0;
+ static int saved_no_hlsearch = 0;
+ # endif
+***************
+*** 364,369 ****
+--- 365,375 ----
+ void
+ save_last_search_pattern(void)
+ {
++ if (did_save_last_search_spat != 0)
++ IEMSG("did_save_last_search_spat is not zero");
++ else
++ ++did_save_last_search_spat;
++
+ saved_last_search_spat = spats[RE_SEARCH];
+ if (spats[RE_SEARCH].pat != NULL)
+ saved_last_search_spat.pat = vim_strsave(spats[RE_SEARCH].pat);
+***************
+*** 374,381 ****
+--- 380,395 ----
+ void
+ restore_last_search_pattern(void)
+ {
++ if (did_save_last_search_spat != 1)
++ {
++ IEMSG("did_save_last_search_spat is not one");
++ return;
++ }
++ --did_save_last_search_spat;
++
+ vim_free(spats[RE_SEARCH].pat);
+ spats[RE_SEARCH] = saved_last_search_spat;
++ saved_last_search_spat.pat = NULL;
+ # if defined(FEAT_EVAL)
+ set_vv_searchforward();
+ # endif
+*** ../vim-8.1.0551/src/version.c 2018-11-28 21:20:34.096221686 +0100
+--- src/version.c 2018-11-30 21:47:47.412181458 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 552,
+ /**/
+
+--
+SIGIRO -- irony detected (iron core dumped)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0553 b/data/vim/patches/8.1.0553
new file mode 100644
index 000000000..3957a8df1
--- /dev/null
+++ b/data/vim/patches/8.1.0553
@@ -0,0 +1,197 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0553
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0553
+Problem: It is not easy to edit a script that was sourced.
+Solution: Add a count to ":scriptnames", so that ":script 40" edits the
+ script with script ID 40.
+Files: src/ex_cmds.h, src/ex_cmds2.c, src/testdir/test_scriptnames.vim,
+ src/Make_all.mak, src/testdir/Make_all.mak, runtime/doc/repeat.txt
+
+
+*** ../vim-8.1.0552/src/ex_cmds.h 2018-10-19 22:35:04.885189994 +0200
+--- src/ex_cmds.h 2018-11-30 22:16:01.339155261 +0100
+***************
+*** 62,76 ****
+ #define FILE1 (FILES | NOSPC) /* 1 file allowed, defaults to current file */
+
+ /* values for cmd_addr_type */
+! #define ADDR_LINES 0
+! #define ADDR_WINDOWS 1
+! #define ADDR_ARGUMENTS 2
+! #define ADDR_LOADED_BUFFERS 3
+! #define ADDR_BUFFERS 4
+! #define ADDR_TABS 5
+! #define ADDR_TABS_RELATIVE 6 /* Tab page that only relative */
+! #define ADDR_QUICKFIX 7
+! #define ADDR_OTHER 99
+
+ #ifndef DO_DECLARE_EXCMD
+ typedef struct exarg exarg_T;
+--- 62,76 ----
+ #define FILE1 (FILES | NOSPC) /* 1 file allowed, defaults to current file */
+
+ /* values for cmd_addr_type */
+! #define ADDR_LINES 0 // buffer line numbers
+! #define ADDR_WINDOWS 1 // window number
+! #define ADDR_ARGUMENTS 2 // argument number
+! #define ADDR_LOADED_BUFFERS 3 // buffer number of loaded buffer
+! #define ADDR_BUFFERS 4 // buffer number
+! #define ADDR_TABS 5 // tab page number
+! #define ADDR_TABS_RELATIVE 6 // Tab page that only relative
+! #define ADDR_QUICKFIX 7 // quickfix list entry number
+! #define ADDR_OTHER 99 // something else
+
+ #ifndef DO_DECLARE_EXCMD
+ typedef struct exarg exarg_T;
+***************
+*** 1260,1267 ****
+ EDITCMD|TRLBAR,
+ ADDR_LINES),
+ EX(CMD_scriptnames, "scriptnames", ex_scriptnames,
+! TRLBAR|CMDWIN,
+! ADDR_LINES),
+ EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
+ WORD1|TRLBAR|CMDWIN,
+ ADDR_LINES),
+--- 1260,1267 ----
+ EDITCMD|TRLBAR,
+ ADDR_LINES),
+ EX(CMD_scriptnames, "scriptnames", ex_scriptnames,
+! BANG|RANGE|NOTADR|COUNT|TRLBAR|CMDWIN,
+! ADDR_OTHER),
+ EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
+ WORD1|TRLBAR|CMDWIN,
+ ADDR_LINES),
+*** ../vim-8.1.0552/src/ex_cmds2.c 2018-11-10 17:33:23.087518814 +0100
+--- src/ex_cmds2.c 2018-11-30 22:21:44.041191333 +0100
+***************
+*** 4690,4699 ****
+ * ":scriptnames"
+ */
+ void
+! ex_scriptnames(exarg_T *eap UNUSED)
+ {
+ int i;
+
+ for (i = 1; i <= script_items.ga_len && !got_int; ++i)
+ if (SCRIPT_ITEM(i).sn_name != NULL)
+ {
+--- 4690,4712 ----
+ * ":scriptnames"
+ */
+ void
+! ex_scriptnames(exarg_T *eap)
+ {
+ int i;
+
++ if (eap->addr_count > 0)
++ {
++ // :script {scriptId}: edit the script
++ if (eap->line2 < 1 || eap->line2 > script_items.ga_len)
++ EMSG(_(e_invarg));
++ else
++ {
++ eap->arg = SCRIPT_ITEM(eap->line2).sn_name;
++ do_exedit(eap, NULL);
++ }
++ return;
++ }
++
+ for (i = 1; i <= script_items.ga_len && !got_int; ++i)
+ if (SCRIPT_ITEM(i).sn_name != NULL)
+ {
+*** ../vim-8.1.0552/src/testdir/test_scriptnames.vim 2018-11-30 22:36:54.859349269 +0100
+--- src/testdir/test_scriptnames.vim 2018-11-30 22:39:33.306420278 +0100
+***************
+*** 0 ****
+--- 1,26 ----
++ " Test for :scriptnames
++
++ func Test_scriptnames()
++ call writefile(['let did_load_script = 123'], 'Xscripting')
++ source Xscripting
++ call assert_equal(123, g:did_load_script)
++
++ let scripts = split(execute('scriptnames'), "\n")
++ let last = scripts[-1]
++ call assert_match('\<Xscripting\>', last)
++ let lastnr = substitute(last, '\D*\(\d\+\):.*', '\1', '')
++ exe 'script ' . lastnr
++ call assert_equal('Xscripting', expand('%:t'))
++
++ call assert_fails('script ' . (lastnr + 1), 'E474:')
++ call assert_fails('script 0', 'E939:')
++
++ new
++ call setline(1, 'nothing')
++ call assert_fails('script ' . lastnr, 'E37:')
++ exe 'script! ' . lastnr
++ call assert_equal('Xscripting', expand('%:t'))
++
++ bwipe
++ call delete('Xscripting')
++ endfunc
+*** ../vim-8.1.0552/src/Make_all.mak 2018-11-10 18:54:40.656592081 +0100
+--- src/Make_all.mak 2018-11-30 22:30:44.813583693 +0100
+***************
+*** 153,158 ****
+--- 153,159 ----
+ test_reltime \
+ test_retab \
+ test_ruby \
++ test_scriptnames \
+ test_scroll_opt \
+ test_scrollbind \
+ test_search \
+*** ../vim-8.1.0552/src/testdir/Make_all.mak 2018-06-30 21:50:16.852674935 +0200
+--- src/testdir/Make_all.mak 2018-11-30 22:31:08.813435000 +0100
+***************
+*** 158,163 ****
+--- 158,164 ----
+ test_registers.res \
+ test_retab.res \
+ test_ruby.res \
++ test_scriptnames.res \
+ test_scrollbind.res \
+ test_search.res \
+ test_shortpathname.res \
+*** ../vim-8.1.0552/runtime/doc/repeat.txt 2018-09-11 22:36:48.129548374 +0200
+--- runtime/doc/repeat.txt 2018-11-30 22:33:59.476394395 +0100
+***************
+*** 334,339 ****
+--- 334,342 ----
+ {not in Vi} {not available when compiled without the
+ |+eval| feature}
+
++ :scr[iptnames][!] {scriptId} *:script*
++ Edit script {scriptId}. Suggested name is ":script".
++
+ *:fini* *:finish* *E168*
+ :fini[sh] Stop sourcing a script. Can only be used in a Vim
+ script file. This is a quick way to skip the rest of
+*** ../vim-8.1.0552/src/version.c 2018-11-30 21:57:50.723861874 +0100
+--- src/version.c 2018-11-30 22:33:29.900572835 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 553,
+ /**/
+
+--
+ Another bucket of what can only be described as human ordure hits ARTHUR.
+ARTHUR: ... Right! (to the KNIGHTS) That settles it!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0554 b/data/vim/patches/8.1.0554
new file mode 100644
index 000000000..07b5ba9da
--- /dev/null
+++ b/data/vim/patches/8.1.0554
@@ -0,0 +1,127 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0554
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0554
+Problem: Popup menu overlaps with preview window.
+Solution: Adjust the height computation. (Hirohito Higashi, closes #3414)
+Files: src/popupmnu.c, src/testdir/test_popup.vim,
+ src/testdir/dumps/Test_popup_and_previewwindow_01.dump
+
+
+*** ../vim-8.1.0553/src/popupmnu.c 2018-10-19 22:35:04.889189955 +0200
+--- src/popupmnu.c 2018-12-01 11:58:36.983112412 +0100
+***************
+*** 196,215 ****
+ return;
+
+ #if defined(FEAT_QUICKFIX)
+! // If there is a preview window at the above avoid drawing over it.
+! // Do keep at least 10 entries.
+! if (pvwin != NULL && pum_row < above_row && pum_height > 10)
+ {
+! if (pum_win_row - above_row < 10)
+! {
+! pum_row = pum_win_row - 10;
+! pum_height = 10;
+! }
+! else
+! {
+! pum_row = above_row;
+! pum_height = pum_win_row - above_row;
+! }
+ }
+ #endif
+
+--- 196,206 ----
+ return;
+
+ #if defined(FEAT_QUICKFIX)
+! // If there is a preview window above avoid drawing over it.
+! if (pvwin != NULL && pum_row < above_row && pum_height > above_row)
+ {
+! pum_row = above_row;
+! pum_height = pum_win_row - above_row;
+ }
+ #endif
+
+*** ../vim-8.1.0553/src/testdir/test_popup.vim 2018-06-12 15:22:39.640579965 +0200
+--- src/testdir/test_popup.vim 2018-12-01 11:43:49.168791298 +0100
+***************
+*** 701,706 ****
+--- 701,728 ----
+ bw!
+ endfunc
+
++ func Test_popup_and_previewwindow_dump()
++ if !CanRunVimInTerminal()
++ return
++ endif
++ call writefile([
++ \ 'set previewheight=9',
++ \ 'silent! pedit',
++ \ 'call setline(1, map(repeat(["ab"], 10), "v:val. v:key"))',
++ \ 'exec "norm! G\<C-E>\<C-E>"',
++ \ ], 'Xscript')
++ let buf = RunVimInTerminal('-S Xscript', {})
++
++ " Test that popup and previewwindow do not overlap.
++ call term_sendkeys(buf, "o\<C-X>\<C-N>")
++ sleep 100m
++ call VerifyScreenDump(buf, 'Test_popup_and_previewwindow_01', {})
++
++ call term_sendkeys(buf, "\<Esc>u")
++ call StopVimInTerminal(buf)
++ call delete('Xscript')
++ endfunc
++
+ func Test_balloon_split()
+ if !exists('*balloon_split')
+ return
+*** ../vim-8.1.0553/src/testdir/dumps/Test_popup_and_previewwindow_01.dump 2018-12-01 11:57:54.775382023 +0100
+--- src/testdir/dumps/Test_popup_and_previewwindow_01.dump 2018-12-01 11:47:11.227496667 +0100
+***************
+*** 0 ****
+--- 1,20 ----
++ |a+0&#ffffff0|b|0| @71
++ |a|b|1| @71
++ |a|b|2| @71
++ |a|b|3| @71
++ |a|b|4| @71
++ |a|b|5| @71
++ |a|b|6| @71
++ |a|b|7| @71
++ |a|b|8| @71
++ |a+0#0000001#e0e0e08|b|0| @11| +0#0000000#0000001|e+1&#ffffff0|w|]|[|+|]| @34|1|,|1| @11|T|o|p
++ |a+0#0000001#ffd7ff255|b|1| @11| +0#0000000#0000001| +0&#ffffff0@58
++ |a+0#0000001#ffd7ff255|b|2| @11| +0#0000000#0000001| +0&#ffffff0@58
++ |a+0#0000001#ffd7ff255|b|3| @11| +0#0000000#0000001| +0&#ffffff0@58
++ |a+0#0000001#ffd7ff255|b|4| @11| +0#0000000#a8a8a8255| +0&#ffffff0@58
++ |a+0#0000001#ffd7ff255|b|5| @11| +0#0000000#a8a8a8255| +0&#ffffff0@58
++ |a+0#0000001#ffd7ff255|b|6| @11| +0#0000000#a8a8a8255| +0&#ffffff0@58
++ |a|b|0> @71
++ |~+0#4040ff13&| @73
++ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|0|,|1| @10|B|o|t
++ |-+2&&@1| |K|e|y|w|o|r|d| |L|o|c|a|l| |c|o|m|p|l|e|t|i|o|n| |(|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |1|0| +0#0000000&@26
+*** ../vim-8.1.0553/src/version.c 2018-11-30 22:40:09.098211991 +0100
+--- src/version.c 2018-12-01 11:50:07.094371234 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 554,
+ /**/
+
+--
+Why is "abbreviation" such a long word?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0555 b/data/vim/patches/8.1.0555
new file mode 100644
index 000000000..c6cfaf99a
--- /dev/null
+++ b/data/vim/patches/8.1.0555
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0555
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0555
+Problem: Crash when last search pat is set but not last substitute pat.
+Solution: Do not mix up last search pattern and last subtitute pattern.
+ (closes #3647)
+Files: src/search.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0554/src/search.c 2018-11-30 21:57:50.723861874 +0100
+--- src/search.c 2018-12-01 13:09:58.124716701 +0100
+***************
+*** 1385,1391 ****
+ char_u *trunc;
+
+ if (*searchstr == NUL)
+! p = spats[last_idx].pat;
+ else
+ p = searchstr;
+ msgbuf = alloc((unsigned)(STRLEN(p) + 40));
+--- 1385,1391 ----
+ char_u *trunc;
+
+ if (*searchstr == NUL)
+! p = spats[0].pat;
+ else
+ p = searchstr;
+ msgbuf = alloc((unsigned)(STRLEN(p) + 40));
+*** ../vim-8.1.0554/src/testdir/test_search.vim 2018-09-16 17:07:40.125853848 +0200
+--- src/testdir/test_search.vim 2018-12-01 13:11:24.096343712 +0100
+***************
+*** 1142,1144 ****
+--- 1142,1156 ----
+ /\%'(
+ /
+ endfunc
++
++ " Test that there is no crash when there is a last search pattern but no last
++ " substitute pattern.
++ func Test_no_last_substitute_pat()
++ " Use viminfo to set the last search pattern to a string and make the last
++ " substitute pattern the most recent used and make it empty (NULL).
++ call writefile(['~MSle0/bar', '~MSle0~&'], 'Xviminfo')
++ rviminfo! Xviminfo
++ call assert_fails('normal n', 'E35:')
++
++ call delete('Xviminfo')
++ endfunc
+*** ../vim-8.1.0554/src/version.c 2018-12-01 11:58:44.415064948 +0100
+--- src/version.c 2018-12-01 13:11:33.232302706 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 555,
+ /**/
+
+--
+"I love deadlines. I especially like the whooshing sound they
+make as they go flying by."
+ -- Douglas Adams
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0556 b/data/vim/patches/8.1.0556
new file mode 100644
index 000000000..15684094e
--- /dev/null
+++ b/data/vim/patches/8.1.0556
@@ -0,0 +1,130 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0556
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0556
+Problem: Saving/restoring search patterns share saved last_idx.
+Solution: Use a separate saved last_idx for saving search patterns for
+ functions and incremental search.
+Files: src/search.c
+
+
+*** ../vim-8.1.0555/src/search.c 2018-12-01 13:14:40.883412219 +0100
+--- src/search.c 2018-12-01 21:01:43.478639117 +0100
+***************
+*** 93,104 ****
+ /* copy of spats[], for keeping the search patterns while executing autocmds */
+ static struct spat saved_spats[2];
+ # ifdef FEAT_SEARCH_EXTRA
+! /* copy of spats[RE_SEARCH], for keeping the search patterns while incremental
+! * searching */
+! static struct spat saved_last_search_spat;
+! static int did_save_last_search_spat = 0;
+! static int saved_last_idx = 0;
+! static int saved_no_hlsearch = 0;
+ # endif
+
+ static char_u *mr_pattern = NULL; /* pattern used by search_regcomp() */
+--- 93,100 ----
+ /* copy of spats[], for keeping the search patterns while executing autocmds */
+ static struct spat saved_spats[2];
+ # ifdef FEAT_SEARCH_EXTRA
+! static int saved_spats_last_idx = 0;
+! static int saved_spats_no_hlsearch = 0;
+ # endif
+
+ static char_u *mr_pattern = NULL; /* pattern used by search_regcomp() */
+***************
+*** 310,317 ****
+ if (spats[1].pat != NULL)
+ saved_spats[1].pat = vim_strsave(spats[1].pat);
+ #ifdef FEAT_SEARCH_EXTRA
+! saved_last_idx = last_idx;
+! saved_no_hlsearch = no_hlsearch;
+ #endif
+ }
+ }
+--- 306,313 ----
+ if (spats[1].pat != NULL)
+ saved_spats[1].pat = vim_strsave(spats[1].pat);
+ #ifdef FEAT_SEARCH_EXTRA
+! saved_spats_last_idx = last_idx;
+! saved_spats_no_hlsearch = no_hlsearch;
+ #endif
+ }
+ }
+***************
+*** 329,336 ****
+ vim_free(spats[1].pat);
+ spats[1] = saved_spats[1];
+ #ifdef FEAT_SEARCH_EXTRA
+! last_idx = saved_last_idx;
+! set_no_hlsearch(saved_no_hlsearch);
+ #endif
+ }
+ }
+--- 325,332 ----
+ vim_free(spats[1].pat);
+ spats[1] = saved_spats[1];
+ #ifdef FEAT_SEARCH_EXTRA
+! last_idx = saved_spats_last_idx;
+! set_no_hlsearch(saved_spats_no_hlsearch);
+ #endif
+ }
+ }
+***************
+*** 354,359 ****
+--- 350,362 ----
+ #endif
+
+ #ifdef FEAT_SEARCH_EXTRA
++ // copy of spats[RE_SEARCH], for keeping the search patterns while incremental
++ // searching
++ static struct spat saved_last_search_spat;
++ static int did_save_last_search_spat = 0;
++ static int saved_last_idx = 0;
++ static int saved_no_hlsearch = 0;
++
+ /*
+ * Save and restore the search pattern for incremental highlight search
+ * feature.
+***************
+*** 575,581 ****
+ saved_spats[idx].pat = NULL;
+ else
+ saved_spats[idx].pat = vim_strsave(spats[idx].pat);
+! saved_last_idx = last_idx;
+ }
+ # ifdef FEAT_SEARCH_EXTRA
+ /* If 'hlsearch' set and search pat changed: need redraw. */
+--- 578,584 ----
+ saved_spats[idx].pat = NULL;
+ else
+ saved_spats[idx].pat = vim_strsave(spats[idx].pat);
+! saved_spats_last_idx = last_idx;
+ }
+ # ifdef FEAT_SEARCH_EXTRA
+ /* If 'hlsearch' set and search pat changed: need redraw. */
+*** ../vim-8.1.0555/src/version.c 2018-12-01 13:14:40.883412219 +0100
+--- src/version.c 2018-12-01 21:06:48.136433537 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 556,
+ /**/
+
+--
+Corn oil comes from corn and olive oil comes from olives, so where
+does baby oil come from?
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0557 b/data/vim/patches/8.1.0557
new file mode 100644
index 000000000..8f181c470
--- /dev/null
+++ b/data/vim/patches/8.1.0557
@@ -0,0 +1,528 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0557
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0557
+Problem: Termdebug: gdb may use X.Y for breakpoint number.
+Solution: Handle X.Y breakpoint numbers. (Yasuhiro Matsumoto, close #3641)
+Files: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+
+
+*** ../vim-8.1.0556/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim 2018-07-19 04:13:30.332453051 +0200
+--- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim 2018-12-02 13:31:34.977457347 +0100
+***************
+*** 73,78 ****
+--- 73,85 ----
+ let s:break_id = 13 " breakpoint number is added to this
+ let s:stopped = 1
+
++ " Take a breakpoint number as used by GDB and turn it into an integer.
++ " The breakpoint may contain a dot: 123.4
++ func s:Breakpoint2SignNumber(nr)
++ let t = split(a:nr, '\.')
++ return t[0] * 1000 + (len(t) == 2 ? t[1] : 0)
++ endfunction
++
+ func s:Highlight(init, old, new)
+ let default = a:init ? 'default ' : ''
+ if a:new ==# 'light' && a:old !=# 'light'
+***************
+*** 138,146 ****
+ func s:StartDebug_term(dict)
+ " Open a terminal window without a job, to run the debugged program in.
+ let s:ptybuf = term_start('NONE', {
+! \ 'term_name': 'debugged program',
+! \ 'vertical': s:vertical,
+! \ })
+ if s:ptybuf == 0
+ echoerr 'Failed to open the program terminal window'
+ return
+--- 145,153 ----
+ func s:StartDebug_term(dict)
+ " Open a terminal window without a job, to run the debugged program in.
+ let s:ptybuf = term_start('NONE', {
+! \ 'term_name': 'debugged program',
+! \ 'vertical': s:vertical,
+! \ })
+ if s:ptybuf == 0
+ echoerr 'Failed to open the program terminal window'
+ return
+***************
+*** 155,164 ****
+
+ " Create a hidden terminal window to communicate with gdb
+ let s:commbuf = term_start('NONE', {
+! \ 'term_name': 'gdb communication',
+! \ 'out_cb': function('s:CommOutput'),
+! \ 'hidden': 1,
+! \ })
+ if s:commbuf == 0
+ echoerr 'Failed to open the communication terminal window'
+ exe 'bwipe! ' . s:ptybuf
+--- 162,171 ----
+
+ " Create a hidden terminal window to communicate with gdb
+ let s:commbuf = term_start('NONE', {
+! \ 'term_name': 'gdb communication',
+! \ 'out_cb': function('s:CommOutput'),
+! \ 'hidden': 1,
+! \ })
+ if s:commbuf == 0
+ echoerr 'Failed to open the communication terminal window'
+ exe 'bwipe! ' . s:ptybuf
+***************
+*** 174,182 ****
+ let cmd = [g:termdebugger, '-quiet', '-tty', pty] + gdb_args
+ call ch_log('executing "' . join(cmd) . '"')
+ let s:gdbbuf = term_start(cmd, {
+! \ 'exit_cb': function('s:EndTermDebug'),
+! \ 'term_finish': 'close',
+! \ })
+ if s:gdbbuf == 0
+ echoerr 'Failed to open the gdb terminal window'
+ exe 'bwipe! ' . s:ptybuf
+--- 181,189 ----
+ let cmd = [g:termdebugger, '-quiet', '-tty', pty] + gdb_args
+ call ch_log('executing "' . join(cmd) . '"')
+ let s:gdbbuf = term_start(cmd, {
+! \ 'exit_cb': function('s:EndTermDebug'),
+! \ 'term_finish': 'close',
+! \ })
+ if s:gdbbuf == 0
+ echoerr 'Failed to open the gdb terminal window'
+ exe 'bwipe! ' . s:ptybuf
+***************
+*** 200,217 ****
+ let response = ''
+ for lnum in range(1,200)
+ if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi '
+! " response can be in the same line or the next line
+! let response = term_getline(s:gdbbuf, lnum) . term_getline(s:gdbbuf, lnum + 1)
+! if response =~ 'Undefined command'
+! echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
+! exe 'bwipe! ' . s:ptybuf
+! exe 'bwipe! ' . s:commbuf
+! return
+! endif
+! if response =~ 'New UI allocated'
+! " Success!
+! break
+! endif
+ endif
+ endfor
+ if response =~ 'New UI allocated'
+--- 207,224 ----
+ let response = ''
+ for lnum in range(1,200)
+ if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi '
+! " response can be in the same line or the next line
+! let response = term_getline(s:gdbbuf, lnum) . term_getline(s:gdbbuf, lnum + 1)
+! if response =~ 'Undefined command'
+! echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
+! exe 'bwipe! ' . s:ptybuf
+! exe 'bwipe! ' . s:commbuf
+! return
+! endif
+! if response =~ 'New UI allocated'
+! " Success!
+! break
+! endif
+ endif
+ endfor
+ if response =~ 'New UI allocated'
+***************
+*** 268,276 ****
+ call ch_log('executing "' . join(cmd) . '"')
+
+ let s:gdbjob = job_start(cmd, {
+! \ 'exit_cb': function('s:EndPromptDebug'),
+! \ 'out_cb': function('s:GdbOutCallback'),
+! \ })
+ if job_status(s:gdbjob) != "run"
+ echoerr 'Failed to start gdb'
+ exe 'bwipe! ' . s:promptbuf
+--- 275,283 ----
+ call ch_log('executing "' . join(cmd) . '"')
+
+ let s:gdbjob = job_start(cmd, {
+! \ 'exit_cb': function('s:EndPromptDebug'),
+! \ 'out_cb': function('s:GdbOutCallback'),
+! \ })
+ if job_status(s:gdbjob) != "run"
+ echoerr 'Failed to start gdb'
+ exe 'bwipe! ' . s:promptbuf
+***************
+*** 295,302 ****
+ " Unix: Run the debugged program in a terminal window. Open it below the
+ " gdb window.
+ belowright let s:ptybuf = term_start('NONE', {
+! \ 'term_name': 'debugged program',
+! \ })
+ if s:ptybuf == 0
+ echoerr 'Failed to open the program terminal window'
+ call job_stop(s:gdbjob)
+--- 302,309 ----
+ " Unix: Run the debugged program in a terminal window. Open it below the
+ " gdb window.
+ belowright let s:ptybuf = term_start('NONE', {
+! \ 'term_name': 'debugged program',
+! \ })
+ if s:ptybuf == 0
+ echoerr 'Failed to open the program terminal window'
+ call job_stop(s:gdbjob)
+***************
+*** 353,359 ****
+ endif
+ endif
+
+! " Contains breakpoints that have been placed, key is the number.
+ let s:breakpoints = {}
+
+ augroup TermDebug
+--- 360,367 ----
+ endif
+ endif
+
+! " Contains breakpoints that have been placed, key is a string with the GDB
+! " breakpoint number.
+ let s:breakpoints = {}
+
+ augroup TermDebug
+***************
+*** 466,474 ****
+ if a:quotedText[i] == '\'
+ let i += 1
+ if a:quotedText[i] == 'n'
+! " drop \n
+! let i += 1
+! continue
+ endif
+ endif
+ let result .= a:quotedText[i]
+--- 474,482 ----
+ if a:quotedText[i] == '\'
+ let i += 1
+ if a:quotedText[i] == 'n'
+! " drop \n
+! let i += 1
+! continue
+ endif
+ endif
+ let result .= a:quotedText[i]
+***************
+*** 479,484 ****
+--- 487,495 ----
+
+ " Extract the "name" value from a gdb message with fullname="name".
+ func s:GetFullname(msg)
++ if a:msg !~ 'fullname'
++ return ''
++ endif
+ let name = s:DecodeMessage(substitute(a:msg, '.*fullname=', '', ''))
+ if has('win32') && name =~ ':\\\\'
+ " sometimes the name arrives double-escaped
+***************
+*** 549,565 ****
+ endif
+ if msg != ''
+ if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
+! call s:HandleCursor(msg)
+ elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,'
+! call s:HandleNewBreakpoint(msg)
+ elseif msg =~ '^=breakpoint-deleted,'
+! call s:HandleBreakpointDelete(msg)
+ elseif msg =~ '^=thread-group-started'
+! call s:HandleProgramRun(msg)
+ elseif msg =~ '^\^done,value='
+! call s:HandleEvaluate(msg)
+ elseif msg =~ '^\^error,msg='
+! call s:HandleError(msg)
+ endif
+ endif
+ endfor
+--- 560,576 ----
+ endif
+ if msg != ''
+ if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
+! call s:HandleCursor(msg)
+ elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,'
+! call s:HandleNewBreakpoint(msg)
+ elseif msg =~ '^=breakpoint-deleted,'
+! call s:HandleBreakpointDelete(msg)
+ elseif msg =~ '^=thread-group-started'
+! call s:HandleProgramRun(msg)
+ elseif msg =~ '^\^done,value='
+! call s:HandleEvaluate(msg)
+ elseif msg =~ '^\^error,msg='
+! call s:HandleError(msg)
+ endif
+ endif
+ endfor
+***************
+*** 650,661 ****
+ let curwinid = win_getid(winnr())
+ for winid in s:winbar_winids
+ if win_gotoid(winid)
+! aunmenu WinBar.Step
+! aunmenu WinBar.Next
+! aunmenu WinBar.Finish
+! aunmenu WinBar.Cont
+! aunmenu WinBar.Stop
+! aunmenu WinBar.Eval
+ endif
+ endfor
+ call win_gotoid(curwinid)
+--- 661,672 ----
+ let curwinid = win_getid(winnr())
+ for winid in s:winbar_winids
+ if win_gotoid(winid)
+! aunmenu WinBar.Step
+! aunmenu WinBar.Next
+! aunmenu WinBar.Finish
+! aunmenu WinBar.Cont
+! aunmenu WinBar.Stop
+! aunmenu WinBar.Eval
+ endif
+ endfor
+ call win_gotoid(curwinid)
+***************
+*** 673,679 ****
+
+ exe 'sign unplace ' . s:pc_id
+ for key in keys(s:breakpoints)
+! exe 'sign unplace ' . (s:break_id + key)
+ endfor
+ unlet s:breakpoints
+
+--- 684,690 ----
+
+ exe 'sign unplace ' . s:pc_id
+ for key in keys(s:breakpoints)
+! exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
+ endfor
+ unlet s:breakpoints
+
+***************
+*** 700,706 ****
+ endif
+ " Use the fname:lnum format, older gdb can't handle --source.
+ call s:SendCommand('-break-insert '
+! \ . fnameescape(expand('%:p')) . ':' . line('.'))
+ if do_continue
+ call s:SendCommand('-exec-continue')
+ endif
+--- 711,717 ----
+ endif
+ " Use the fname:lnum format, older gdb can't handle --source.
+ call s:SendCommand('-break-insert '
+! \ . fnameescape(expand('%:p')) . ':' . line('.'))
+ if do_continue
+ call s:SendCommand('-exec-continue')
+ endif
+***************
+*** 714,720 ****
+ if val['fname'] == fname && val['lnum'] == lnum
+ call s:SendCommand('-break-delete ' . key)
+ " Assume this always wors, the reply is simply "^done".
+! exe 'sign unplace ' . (s:break_id + key)
+ unlet s:breakpoints[key]
+ break
+ endif
+--- 725,731 ----
+ if val['fname'] == fname && val['lnum'] == lnum
+ call s:SendCommand('-break-delete ' . key)
+ " Assume this always wors, the reply is simply "^done".
+! exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
+ unlet s:breakpoints[key]
+ break
+ endif
+***************
+*** 839,852 ****
+ if lnum =~ '^[0-9]*$'
+ call s:GotoSourcewinOrCreateIt()
+ if expand('%:p') != fnamemodify(fname, ':p')
+! if &modified
+! " TODO: find existing window
+! exe 'split ' . fnameescape(fname)
+! let s:sourcewin = win_getid(winnr())
+! call s:InstallWinbar()
+! else
+! exe 'edit ' . fnameescape(fname)
+! endif
+ endif
+ exe lnum
+ exe 'sign unplace ' . s:pc_id
+--- 850,863 ----
+ if lnum =~ '^[0-9]*$'
+ call s:GotoSourcewinOrCreateIt()
+ if expand('%:p') != fnamemodify(fname, ':p')
+! if &modified
+! " TODO: find existing window
+! exe 'split ' . fnameescape(fname)
+! let s:sourcewin = win_getid(winnr())
+! call s:InstallWinbar()
+! else
+! exe 'edit ' . fnameescape(fname)
+! endif
+ endif
+ exe lnum
+ exe 'sign unplace ' . s:pc_id
+***************
+*** 865,874 ****
+ func s:CreateBreakpoint(nr)
+ if index(s:BreakpointSigns, a:nr) == -1
+ call add(s:BreakpointSigns, a:nr)
+! exe "sign define debugBreakpoint" . a:nr . " text=" . a:nr . " texthl=debugBreakpoint"
+ endif
+ endfunc
+
+ " Handle setting a breakpoint
+ " Will update the sign that shows the breakpoint
+ func s:HandleNewBreakpoint(msg)
+--- 876,889 ----
+ func s:CreateBreakpoint(nr)
+ if index(s:BreakpointSigns, a:nr) == -1
+ call add(s:BreakpointSigns, a:nr)
+! exe "sign define debugBreakpoint" . a:nr . " text=" . substitute(a:nr, '\..*', '', '') . " texthl=debugBreakpoint"
+ endif
+ endfunc
+
++ func s:SplitMsg(s)
++ return split(a:s, '{\%([a-z-]\+=[^,]\+,*\)\+}\zs')
++ endfunction
++
+ " Handle setting a breakpoint
+ " Will update the sign that shows the breakpoint
+ func s:HandleNewBreakpoint(msg)
+***************
+*** 876,925 ****
+ " a watch does not have a file name
+ return
+ endif
+
+! let nr = substitute(a:msg, '.*number="\([0-9]\)*\".*', '\1', '') + 0
+! if nr == 0
+! return
+! endif
+! call s:CreateBreakpoint(nr)
+!
+! if has_key(s:breakpoints, nr)
+! let entry = s:breakpoints[nr]
+! else
+! let entry = {}
+! let s:breakpoints[nr] = entry
+! endif
+
+! let fname = s:GetFullname(a:msg)
+! let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '')
+! let entry['fname'] = fname
+! let entry['lnum'] = lnum
+
+! if bufloaded(fname)
+! call s:PlaceSign(nr, entry)
+! endif
+ endfunc
+
+ func s:PlaceSign(nr, entry)
+! exe 'sign place ' . (s:break_id + a:nr) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . a:nr . ' file=' . a:entry['fname']
+ let a:entry['placed'] = 1
+ endfunc
+
+ " Handle deleting a breakpoint
+ " Will remove the sign that shows the breakpoint
+ func s:HandleBreakpointDelete(msg)
+! let nr = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0
+! if nr == 0
+ return
+ endif
+! if has_key(s:breakpoints, nr)
+ let entry = s:breakpoints[nr]
+ if has_key(entry, 'placed')
+! exe 'sign unplace ' . (s:break_id + nr)
+ unlet entry['placed']
+ endif
+ unlet s:breakpoints[nr]
+! endif
+ endfunc
+
+ " Handle the debugged program starting to run.
+--- 891,947 ----
+ " a watch does not have a file name
+ return
+ endif
++ for msg in s:SplitMsg(a:msg)
++ let fname = s:GetFullname(msg)
++ if empty(fname)
++ continue
++ endif
++ let nr = substitute(msg, '.*number="\([0-9.]*\)\".*', '\1', '')
++ if empty(nr)
++ return
++ endif
++ call s:CreateBreakpoint(nr)
+
+! if has_key(s:breakpoints, nr)
+! let entry = s:breakpoints[nr]
+! else
+! let entry = {}
+! let s:breakpoints[nr] = entry
+! endif
+
+! let lnum = substitute(msg, '.*line="\([^"]*\)".*', '\1', '')
+! let entry['fname'] = fname
+! let entry['lnum'] = lnum
+
+! if bufloaded(fname)
+! call s:PlaceSign(nr, entry)
+! endif
+! endfor
+ endfunc
+
+ func s:PlaceSign(nr, entry)
+! exe 'sign place ' . (s:break_id + s:Breakpoint2SignNumber(a:nr)) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . a:nr . ' file=' . a:entry['fname']
+ let a:entry['placed'] = 1
+ endfunc
+
+ " Handle deleting a breakpoint
+ " Will remove the sign that shows the breakpoint
+ func s:HandleBreakpointDelete(msg)
+! let key = substitute(a:msg, '.*id="\([0-9.]*\)\".*', '\1', '')
+! if empty(key)
+ return
+ endif
+! for [nr, entry] in items(s:breakpoints)
+! if stridx(nr, key) != 0
+! continue
+! endif
+ let entry = s:breakpoints[nr]
+ if has_key(entry, 'placed')
+! exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(nr))
+ unlet entry['placed']
+ endif
+ unlet s:breakpoints[nr]
+! endfor
+ endfunc
+
+ " Handle the debugged program starting to run.
+*** ../vim-8.1.0556/src/version.c 2018-12-01 21:08:18.019648483 +0100
+--- src/version.c 2018-12-02 13:43:56.101322941 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 557,
+ /**/
+
+--
+FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0558 b/data/vim/patches/8.1.0558
new file mode 100644
index 000000000..8c1e25889
--- /dev/null
+++ b/data/vim/patches/8.1.0558
@@ -0,0 +1,161 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0558
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0558
+Problem: Some MS-Windows instructions are outdated.
+Solution: Update the uninstall instructions and the NSIS README. (Ken
+ Takata, closes #3614) Also update remark about diff.exe.
+Files: nsis/README.txt, uninstal.txt
+
+
+*** ../vim-8.1.0557/nsis/README.txt 2017-10-14 18:47:04.000000000 +0200
+--- nsis/README.txt 2018-12-02 13:55:06.381485588 +0100
+***************
+*** 15,20 ****
+--- 15,21 ----
+ vimrun.exe,
+ install.exe,
+ uninstal.exe,
++ tee/tee.exe,
+ xxd/xxd.exe,
+
+ Then execute tools/rename.bat to rename the executables. (mv command is
+***************
+*** 29,42 ****
+ 4. Go to the VisVim directory and build VisVim.dll (or get it from a binary
+ archive).
+
+! 5. Go to the OleVim directory and build OpenWithVim.exe and SendToVim.exe (or
+! get them from a binary archive).
+!
+! 6. Get a "diff.exe" program and put it in the "../.." directory (above the
+! "vim80" directory, it's the same for all Vim versions).
+ You can find one in previous Vim versions or in this archive:
+ http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
+! Also put winpty32.dll and winpty-agent.exe there.
+
+ 7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
+ to do this on Unix. Make sure the file is in DOS file format!
+--- 30,44 ----
+ 4. Go to the VisVim directory and build VisVim.dll (or get it from a binary
+ archive).
+
+! 5. Get a "diff.exe" program. If you skip this the built-in diff will always
+! be used (which is fine for most users). If you do have your own
+! "diff.exe" put it in the "../.." directory (above the "vim81" directory,
+! it's the same for all Vim versions).
+ You can find one in previous Vim versions or in this archive:
+ http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
+!
+! 6 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim81"
+! directory). This is required for the terminal window.
+
+ 7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
+ to do this on Unix. Make sure the file is in DOS file format!
+*** ../vim-8.1.0557/uninstal.txt 2017-07-19 11:09:11.000000000 +0200
+--- uninstal.txt 2018-12-02 13:50:16.799174823 +0100
+***************
+*** 1,4 ****
+! Uninstalling Vim on Dos and MS-Windows.
+
+ There are three ways to remove Vim:
+
+--- 1,4 ----
+! Uninstalling Vim on MS-Windows.
+
+ There are three ways to remove Vim:
+
+***************
+*** 27,38 ****
+
+ Here are guidelines for removing Vim by hand:
+
+! 1. Remove the "Edit with Vim" popup menu entry, if it exists. This will only
+! be on MS-Windows 95/98/NT. This is done by running the uninstal.exe
+! program. It removes the registry entries for the "Edit with Vim" popup
+! menu entry. You only need to run uninstal.exe when you have installed the
+! menu entry. You can also run uninstal.exe from the Control panel with the
+! Add/Remove programs application.
+ Note that uninstal.exe offers you the option to uninstal other items. You
+ can skip this.
+
+--- 27,37 ----
+
+ Here are guidelines for removing Vim by hand:
+
+! 1. Remove the "Edit with Vim" popup menu entry, if it exists. This is done by
+! running the uninstal.exe program. It removes the registry entries for the
+! "Edit with Vim" popup menu entry. You only need to run uninstal.exe when
+! you have installed the menu entry. You can also run uninstal.exe from the
+! Control panel with the Add/Remove programs application.
+ Note that uninstal.exe offers you the option to uninstal other items. You
+ can skip this.
+
+***************
+*** 55,62 ****
+ skip the next step.
+
+ 5. Delete the distributed files. If you followed the directions, these will
+! be located in a directory like "C:\vim\vim80". If the $VIM environment
+! variable is set, the directory will be $VIM\vim80. Delete the "vim80"
+ directory and all that is in it. Warning: If you changed any of the
+ distributed files, or added some of your own files, you might want to save
+ these first. But normally you would not have changed or added files here.
+--- 54,61 ----
+ skip the next step.
+
+ 5. Delete the distributed files. If you followed the directions, these will
+! be located in a directory like "C:\vim\vim81". If the $VIM environment
+! variable is set, the directory will be $VIM\vim81. Delete the "vim81"
+ directory and all that is in it. Warning: If you changed any of the
+ distributed files, or added some of your own files, you might want to save
+ these first. But normally you would not have changed or added files here.
+***************
+*** 66,75 ****
+ another version of Vim. $VIMRUNTIME is mostly not set. Check if $PATH
+ contains the path of the vim directory. Note that $PATH may be set in
+ several places, you will have to find the right one, and only delete the
+! Vim path from it. You can most likely find the lines that set $PATH, $VIM
+! and/or $VIMRUNTIME in C:\autoexec.bat. Under Windows NT you might need to
+! use the "System Properties" editor to change the environment variables, if
+! they are not in the C:\autoexec.bat file. You can start it by selecting
+ Start/Settings/Control Panel and then "System".
+
+ 7. If you added a Vim entry in the start menu, delete it.
+--- 65,72 ----
+ another version of Vim. $VIMRUNTIME is mostly not set. Check if $PATH
+ contains the path of the vim directory. Note that $PATH may be set in
+ several places, you will have to find the right one, and only delete the
+! Vim path from it. You might need to use the "System Properties" editor to
+! change the environment variables. You can start it by selecting
+ Start/Settings/Control Panel and then "System".
+
+ 7. If you added a Vim entry in the start menu, delete it.
+*** ../vim-8.1.0557/src/version.c 2018-12-02 13:45:47.088708659 +0100
+--- src/version.c 2018-12-02 13:56:41.548924260 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 558,
+ /**/
+
+--
+(letter from Mark to Mike, about the film's probable certificate)
+ I would like to get back to the Censor and agree to lose the shits, take
+ the odd Jesus Christ out and lose Oh fuck off, but to retain 'fart in
+ your general direction', 'castanets of your testicles' and 'oral sex'
+ and ask him for an 'A' rating on that basis.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0559 b/data/vim/patches/8.1.0559
new file mode 100644
index 000000000..52d724e18
--- /dev/null
+++ b/data/vim/patches/8.1.0559
@@ -0,0 +1,115 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0559
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0559
+Problem: Command line completion not sufficiently tested.
+Solution: Add more tests. (Dominique Pelle, closes #3622)
+Files: src/testdir/test_arglist.vim, src/testdir/test_filetype.vim,
+ src/testdir/test_history.vim, src/testdir/test_messages.vim,
+ src/testdir/test_syntax.vim
+
+
+*** ../vim-8.1.0558/src/testdir/test_arglist.vim 2018-10-25 12:30:52.270659874 +0200
+--- src/testdir/test_arglist.vim 2018-12-02 14:33:10.364716504 +0100
+***************
+*** 396,401 ****
+--- 396,413 ----
+ %argd
+ endfunc
+
++ func Test_argdelete_completion()
++ args foo bar
++
++ call feedkeys(":argdelete \<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"argdelete bar foo', @:)
++
++ call feedkeys(":argdelete x \<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"argdelete x bar foo', @:)
++
++ %argd
++ endfunc
++
+ " Tests for the :next, :prev, :first, :last, :rewind commands
+ func Test_argpos()
+ call Reset_arglist()
+*** ../vim-8.1.0558/src/testdir/test_filetype.vim 2018-11-03 19:52:11.333956689 +0100
+--- src/testdir/test_filetype.vim 2018-12-02 14:33:10.364716504 +0100
+***************
+*** 597,599 ****
+--- 597,603 ----
+ filetype off
+ endfunc
+
++ func Test_setfiletype_completion()
++ call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"setfiletype java javacc javascript', @:)
++ endfunc
+*** ../vim-8.1.0558/src/testdir/test_history.vim 2017-01-11 22:38:15.000000000 +0100
+--- src/testdir/test_history.vim 2018-12-02 14:33:10.364716504 +0100
+***************
+*** 104,106 ****
+--- 104,111 ----
+ call assert_equal('a', @/)
+ bwipe!
+ endfunc
++
++ function Test_history_completion()
++ call feedkeys(":history \<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"history / : = > ? @ all cmd debug expr input search', @:)
++ endfunc
+*** ../vim-8.1.0558/src/testdir/test_messages.vim 2018-06-27 20:49:40.567862384 +0200
+--- src/testdir/test_messages.vim 2018-12-02 14:33:10.364716504 +0100
+***************
+*** 59,61 ****
+--- 59,66 ----
+
+ set cmdheight&
+ endfunction
++
++ func Test_message_completion()
++ call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"message clear', @:)
++ endfunc
+*** ../vim-8.1.0558/src/testdir/test_syntax.vim 2018-06-23 14:21:38.467484932 +0200
+--- src/testdir/test_syntax.vim 2018-12-02 14:33:10.364716504 +0100
+***************
+*** 119,124 ****
+--- 119,133 ----
+ bd
+ endfunc
+
++ func Test_syntime_completion()
++ if !has('profile')
++ return
++ endif
++
++ call feedkeys(":syntime \<C-A>\<C-B>\"\<CR>", 'tx')
++ call assert_equal('"syntime clear off on report', @:)
++ endfunc
++
+ func Test_syntax_list()
+ syntax on
+ let a = execute('syntax list')
+*** ../vim-8.1.0558/src/version.c 2018-12-02 13:57:54.844490410 +0100
+--- src/version.c 2018-12-02 14:34:28.156268675 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 559,
+ /**/
+
+--
+A fool must search for a greater fool to find admiration.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0560 b/data/vim/patches/8.1.0560
new file mode 100644
index 000000000..8400253d7
--- /dev/null
+++ b/data/vim/patches/8.1.0560
@@ -0,0 +1,142 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0560
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0560
+Problem: Cannot use address type "other" with with user command.
+Solution: Add "other" to the list. (Daniel Hahler, closes #3655) Also
+ reject "%" for commands with "other". Add some more tests.
+Files: src/ex_docmd.c, src/testdir/test_usercommands.vim
+
+
+*** ../vim-8.1.0559/src/ex_docmd.c 2018-10-19 22:35:04.885189994 +0200
+--- src/ex_docmd.c 2018-12-02 17:58:11.339485922 +0100
+***************
+*** 2998,3003 ****
+--- 2998,3004 ----
+ }
+ break;
+ case ADDR_TABS_RELATIVE:
++ case ADDR_OTHER:
+ *errormsg = (char_u *)_(e_invrange);
+ return FAIL;
+ case ADDR_ARGUMENTS:
+***************
+*** 5940,5945 ****
+--- 5941,5947 ----
+ {ADDR_BUFFERS, "buffers"},
+ {ADDR_WINDOWS, "windows"},
+ {ADDR_QUICKFIX, "quickfix"},
++ {ADDR_OTHER, "other"},
+ {-1, NULL}
+ };
+ #endif
+*** ../vim-8.1.0559/src/testdir/test_usercommands.vim 2017-12-25 13:39:26.000000000 +0100
+--- src/testdir/test_usercommands.vim 2018-12-02 18:17:46.460790379 +0100
+***************
+*** 154,160 ****
+ call assert_equal('"com -nargs=* + 0 1 ?', @:)
+
+ call feedkeys(":com -addr=\<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"com -addr=arguments buffers lines loaded_buffers quickfix tabs windows', @:)
+
+ call feedkeys(":com -complete=co\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"com -complete=color command compiler', @:)
+--- 154,160 ----
+ call assert_equal('"com -nargs=* + 0 1 ?', @:)
+
+ call feedkeys(":com -addr=\<C-A>\<C-B>\"\<CR>", 'tx')
+! call assert_equal('"com -addr=arguments buffers lines loaded_buffers other quickfix tabs windows', @:)
+
+ call feedkeys(":com -complete=co\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"com -complete=color command compiler', @:)
+***************
+*** 218,220 ****
+--- 218,278 ----
+ call assert_equal('"DoExec hi', @:)
+ delcommand DoExec
+ endfunc
++
++ func Test_addr_all()
++ command! -addr=lines DoSomething let g:a1 = <line1> | let g:a2 = <line2>
++ %DoSomething
++ call assert_equal(1, g:a1)
++ call assert_equal(line('$'), g:a2)
++
++ command! -addr=arguments DoSomething let g:a1 = <line1> | let g:a2 = <line2>
++ args one two three
++ %DoSomething
++ call assert_equal(1, g:a1)
++ call assert_equal(3, g:a2)
++
++ command! -addr=buffers DoSomething let g:a1 = <line1> | let g:a2 = <line2>
++ %DoSomething
++ for low in range(1, bufnr('$'))
++ if buflisted(low)
++ break
++ endif
++ endfor
++ call assert_equal(low, g:a1)
++ call assert_equal(bufnr('$'), g:a2)
++
++ command! -addr=loaded_buffers DoSomething let g:a1 = <line1> | let g:a2 = <line2>
++ %DoSomething
++ for low in range(1, bufnr('$'))
++ if bufloaded(low)
++ break
++ endif
++ endfor
++ call assert_equal(low, g:a1)
++ for up in range(bufnr('$'), 1, -1)
++ if bufloaded(up)
++ break
++ endif
++ endfor
++ call assert_equal(up, g:a2)
++
++ command! -addr=windows DoSomething let g:a1 = <line1> | let g:a2 = <line2>
++ new
++ %DoSomething
++ call assert_equal(1, g:a1)
++ call assert_equal(winnr('$'), g:a2)
++ bwipe
++
++ command! -addr=tabs DoSomething let g:a1 = <line1> | let g:a2 = <line2>
++ tabnew
++ %DoSomething
++ call assert_equal(1, g:a1)
++ call assert_equal(len(gettabinfo()), g:a2)
++ bwipe
++
++ command! -addr=other DoSomething echo 'nothing'
++ DoSomething
++ call assert_fails('%DoSomething')
++
++ delcommand DoSomething
++ endfunc
+*** ../vim-8.1.0559/src/version.c 2018-12-02 14:55:04.904731741 +0100
+--- src/version.c 2018-12-02 18:05:03.897134687 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 560,
+ /**/
+
+--
+The Characters and incidents portrayed and the names used are fictitious and
+any similarity to the names, characters, or history of any person is entirely
+accidental and unintentional.
+ Signed RICHARD M. NIXON
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0561 b/data/vim/patches/8.1.0561
new file mode 100644
index 000000000..16986c888
--- /dev/null
+++ b/data/vim/patches/8.1.0561
@@ -0,0 +1,52 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0561
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0561
+Problem: MSCV error format has changed.
+Solution: Make the space between the line number and colon optional.
+Files: src/option.h
+
+
+*** ../vim-8.1.0560/src/option.h 2018-06-23 19:22:45.614486258 +0200
+--- src/option.h 2018-12-03 20:41:34.902380574 +0100
+***************
+*** 19,25 ****
+ # define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m,%f|%l| %m"
+ #else
+ # if defined(WIN3264)
+! # define DFLT_EFM "%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m"
+ # else
+ # if defined(__QNX__)
+ # define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m,%f|%l| %m"
+--- 19,25 ----
+ # define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m,%f|%l| %m"
+ #else
+ # if defined(WIN3264)
+! # define DFLT_EFM "%f(%l) \\=: %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) \\=: %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m"
+ # else
+ # if defined(__QNX__)
+ # define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m,%f|%l| %m"
+*** ../vim-8.1.0560/src/version.c 2018-12-02 18:21:46.035419603 +0100
+--- src/version.c 2018-12-03 20:42:32.598028458 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 561,
+ /**/
+
+--
+System administrators are just like women: You can't live with them and you
+can't live without them.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0562 b/data/vim/patches/8.1.0562
new file mode 100644
index 000000000..af58aac68
--- /dev/null
+++ b/data/vim/patches/8.1.0562
@@ -0,0 +1,172 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0562
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0562
+Problem: Parsing of 'diffopt' is slightly wrong.
+Solution: Fix the parsing and add a test. (Jason Franklin, Christian
+ Brabandt)
+Files: src/diff.c, src/testdir/test_diffmode.vim,
+ src/testdir/dumps/Test_diff_09.dump,
+ src/testdir/dumps/Test_diff_11.dump, src/testdir/screendump.vim
+
+
+*** ../vim-8.1.0561/src/diff.c 2018-11-05 21:21:29.800286334 +0100
+--- src/diff.c 2018-12-04 22:21:18.163764693 +0100
+***************
+*** 2173,2178 ****
+--- 2173,2179 ----
+ int diff_flags_new = 0;
+ int diff_foldcolumn_new = 2;
+ long diff_algorithm_new = 0;
++ long diff_indent_heuristic = 0;
+ tabpage_T *tp;
+
+ p = p_dip;
+***************
+*** 2236,2242 ****
+ else if (STRNCMP(p, "indent-heuristic", 16) == 0)
+ {
+ p += 16;
+! diff_algorithm_new |= XDF_INDENT_HEURISTIC;
+ }
+ else if (STRNCMP(p, "internal", 8) == 0)
+ {
+--- 2237,2243 ----
+ else if (STRNCMP(p, "indent-heuristic", 16) == 0)
+ {
+ p += 16;
+! diff_indent_heuristic = XDF_INDENT_HEURISTIC;
+ }
+ else if (STRNCMP(p, "internal", 8) == 0)
+ {
+***************
+*** 2276,2281 ****
+--- 2277,2284 ----
+ ++p;
+ }
+
++ diff_algorithm_new |= diff_indent_heuristic;
++
+ /* Can't have both "horizontal" and "vertical". */
+ if ((diff_flags_new & DIFF_HORIZONTAL) && (diff_flags_new & DIFF_VERTICAL))
+ return FAIL;
+*** ../vim-8.1.0561/src/testdir/test_diffmode.vim 2018-11-01 21:14:50.541818034 +0100
+--- src/testdir/test_diffmode.vim 2018-12-04 22:21:18.163764693 +0100
+***************
+*** 813,820 ****
+ call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
+ call VerifyScreenDump(buf, 'Test_diff_10', {})
+
+! call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>")
+! call VerifyScreenDump(buf, 'Test_diff_11', {})
+
+ " Test 12: diff the same file
+ call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+--- 813,828 ----
+ call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
+ call VerifyScreenDump(buf, 'Test_diff_10', {})
+
+! " Leave trailing : at commandline!
+! call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>:\<cr>")
+! call VerifyScreenDump(buf, 'Test_diff_11', {}, 'one')
+! " shouldn't matter, if indent-algorithm comes before or after the algorithm
+! call term_sendkeys(buf, ":set diffopt&\<cr>")
+! call term_sendkeys(buf, ":set diffopt+=indent-heuristic,algorithm:patience\<cr>:\<cr>")
+! call VerifyScreenDump(buf, 'Test_diff_11', {}, 'two')
+! call term_sendkeys(buf, ":set diffopt&\<cr>")
+! call term_sendkeys(buf, ":set diffopt+=algorithm:patience,indent-heuristic\<cr>:\<cr>")
+! call VerifyScreenDump(buf, 'Test_diff_11', {}, 'three')
+
+ " Test 12: diff the same file
+ call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
+*** ../vim-8.1.0561/src/testdir/dumps/Test_diff_09.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_09.dump 2018-12-04 22:21:18.163764693 +0100
+***************
+*** 17,20 ****
+ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29
+ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
+ |X+3#0000000#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p
+! |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|p|a|t|i|e|n|c|e| @42
+--- 17,20 ----
+ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29
+ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
+ |X+3#0000000#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p
+! |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|h|i|s|t|o|g|r|a|m| @41
+*** ../vim-8.1.0561/src/testdir/dumps/Test_diff_11.dump 2018-09-10 17:50:32.713306941 +0200
+--- src/testdir/dumps/Test_diff_11.dump 2018-12-04 22:21:18.163764693 +0100
+***************
+*** 17,20 ****
+ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
+ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
+ |X+3#0000000&|f|i|l|e|1| @12|1|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|0|-|1| @9|A|l@1
+! |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|d|e|n|t|-|h|e|u|r|i|s|t|i|c| @44
+--- 17,20 ----
+ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
+ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33
+ |X+3#0000000&|f|i|l|e|1| @12|1|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|0|-|1| @9|A|l@1
+! |:+0&&| @73
+*** ../vim-8.1.0561/src/testdir/screendump.vim 2018-09-09 22:02:21.165859748 +0200
+--- src/testdir/screendump.vim 2018-12-04 22:21:18.163764693 +0100
+***************
+*** 103,108 ****
+--- 103,110 ----
+
+ let i = 0
+ while 1
++ " leave some time for updating the original window
++ sleep 10m
+ call delete(testfile)
+ call term_dumpwrite(a:buf, testfile, a:options)
+ if readfile(reference) == readfile(testfile)
+***************
+*** 113,124 ****
+ " Leave the test file around for inspection.
+ let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")'
+ if a:0 == 1
+! let msg = a:1 . ': ' . msg
+ endif
+ call assert_report(msg)
+ return 1
+ endif
+- sleep 10m
+ let i += 1
+ endwhile
+ return 0
+--- 115,125 ----
+ " Leave the test file around for inspection.
+ let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")'
+ if a:0 == 1
+! let msg = a:1 . ': ' . msg
+ endif
+ call assert_report(msg)
+ return 1
+ endif
+ let i += 1
+ endwhile
+ return 0
+*** ../vim-8.1.0561/src/version.c 2018-12-03 20:49:58.767291066 +0100
+--- src/version.c 2018-12-04 22:24:03.973785303 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 562,
+ /**/
+
+--
+SOLDIER: What? Ridden on a horse?
+ARTHUR: Yes!
+SOLDIER: You're using coconuts!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0563 b/data/vim/patches/8.1.0563
new file mode 100644
index 000000000..3d312a2cd
--- /dev/null
+++ b/data/vim/patches/8.1.0563
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0563
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0563
+Problem: Setting v:errors to a string give confusing error. (Christian
+ Brabandt)
+Solution: Change internal error into normal error message.
+Files: src/eval.c
+
+
+*** ../vim-8.1.0562/src/eval.c 2018-11-28 21:20:34.096221686 +0100
+--- src/eval.c 2018-12-04 22:33:08.228556609 +0100
+***************
+*** 7568,7574 ****
+ return;
+ }
+ else if (v->di_tv.v_type != tv->v_type)
+! internal_error("set_var()");
+ }
+
+ clear_tv(&v->di_tv);
+--- 7568,7574 ----
+ return;
+ }
+ else if (v->di_tv.v_type != tv->v_type)
+! EMSG2(_("E963: setting %s to value with wrong type"), name);
+ }
+
+ clear_tv(&v->di_tv);
+*** ../vim-8.1.0562/src/version.c 2018-12-04 22:24:12.193693584 +0100
+--- src/version.c 2018-12-04 22:34:12.912012871 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 563,
+ /**/
+
+--
+ARTHUR: The swallow may fly south with the sun, or the house martin or the
+ plover seek warmer hot lands in winter, yet these are not strangers to
+ our land.
+SOLDIER: Are you suggesting coconuts migrate?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0564 b/data/vim/patches/8.1.0564
new file mode 100644
index 000000000..3ca11ce7d
--- /dev/null
+++ b/data/vim/patches/8.1.0564
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0564
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0564
+Problem: Setting v:errors to wrong type still possible.
+Solution: Return after giving an error message. (Christian Brabandt)
+Files: src/eval.c, src/testdir/test_eval_stuff.vim
+
+
+*** ../vim-8.1.0563/src/eval.c 2018-12-04 22:37:46.122286870 +0100
+--- src/eval.c 2018-12-05 18:40:45.742666402 +0100
+***************
+*** 7568,7574 ****
+--- 7568,7577 ----
+ return;
+ }
+ else if (v->di_tv.v_type != tv->v_type)
++ {
+ EMSG2(_("E963: setting %s to value with wrong type"), name);
++ return;
++ }
+ }
+
+ clear_tv(&v->di_tv);
+*** ../vim-8.1.0563/src/testdir/test_eval_stuff.vim 2018-09-11 22:36:48.125548396 +0200
+--- src/testdir/test_eval_stuff.vim 2018-12-05 18:40:25.150818783 +0100
+***************
+*** 53,55 ****
+--- 53,65 ----
+ "\ and some more
+ call assert_equal([5, 6], array)
+ endfunc
++
++ func Test_E963()
++ " These commands used to cause an internal error prior to vim 8.1.0563
++ let v_e = v:errors
++ let v_o = v:oldfiles
++ call assert_fails("let v:errors=''", 'E963:')
++ call assert_equal(v_e, v:errors)
++ call assert_fails("let v:oldfiles=''", 'E963:')
++ call assert_equal(v_o, v:oldfiles)
++ endfunc
+*** ../vim-8.1.0563/src/version.c 2018-12-04 22:37:46.122286870 +0100
+--- src/version.c 2018-12-05 18:42:00.882110756 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 564,
+ /**/
+
+
+--
+Clothes make the man. Naked people have little or no influence on society.
+ -- Mark Twain (Samuel Clemens) (1835-1910)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0565 b/data/vim/patches/8.1.0565
new file mode 100644
index 000000000..82f27c432
--- /dev/null
+++ b/data/vim/patches/8.1.0565
@@ -0,0 +1,55 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0565
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0565
+Problem: Asan complains about reading before allocated block.
+Solution: Workaround: Avoid offset from becoming negative.
+Files: src/gui.c
+
+
+*** ../vim-8.1.0564/src/gui.c 2018-11-16 16:21:01.633310065 +0100
+--- src/gui.c 2018-12-05 19:44:07.455956642 +0100
+***************
+*** 2753,2759 ****
+ }
+ else if (enc_utf8)
+ {
+! if (ScreenLines[off + col1] == 0)
+ --col1;
+ # ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+--- 2753,2760 ----
+ }
+ else if (enc_utf8)
+ {
+! // FIXME: how can the first character ever be zero?
+! if (col1 > 0 && ScreenLines[off + col1] == 0)
+ --col1;
+ # ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+*** ../vim-8.1.0564/src/version.c 2018-12-05 18:43:24.489493117 +0100
+--- src/version.c 2018-12-05 19:45:06.855458016 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 565,
+ /**/
+
+--
+SECOND SOLDIER: It could be carried by an African swallow!
+FIRST SOLDIER: Oh yes! An African swallow maybe ... but not a European
+ swallow. that's my point.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0566 b/data/vim/patches/8.1.0566
new file mode 100644
index 000000000..c0ee83315
--- /dev/null
+++ b/data/vim/patches/8.1.0566
@@ -0,0 +1,70 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0566
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0566
+Problem: SGR not enabled for mintty because $TERM is "xterm".
+Solution: Detect mintty by the termresponse. (Ken Takata, closes #3667)
+Files: src/term.c
+
+
+*** ../vim-8.1.0565/src/term.c 2018-10-02 14:45:07.023652468 +0200
+--- src/term.c 2018-12-07 13:06:31.415916214 +0100
+***************
+*** 4698,4703 ****
+--- 4698,4709 ----
+ int need_flush = FALSE;
+ # ifdef FEAT_MOUSE_SGR
+ int is_iterm2 = FALSE;
++ int is_mintty = FALSE;
++
++ // mintty 2.9.5 sends 77;20905;0c.
++ // (77 is ASCII 'M' for mintty.)
++ if (STRNCMP(tp + extra - 3, "77;", 3) == 0)
++ is_mintty = TRUE;
+ # endif
+
+ /* if xterm version >= 141 try to get termcap codes */
+***************
+*** 4751,4758 ****
+ {
+ # ifdef FEAT_MOUSE_SGR
+ /* Xterm version 277 supports SGR. Also support
+! * Terminal.app and iTerm2. */
+! if (version >= 277 || is_iterm2 || is_mac_terminal)
+ set_option_value((char_u *)"ttym", 0L,
+ (char_u *)"sgr", 0);
+ else
+--- 4757,4765 ----
+ {
+ # ifdef FEAT_MOUSE_SGR
+ /* Xterm version 277 supports SGR. Also support
+! * Terminal.app, iTerm2 and mintty. */
+! if (version >= 277 || is_iterm2 || is_mac_terminal
+! || is_mintty)
+ set_option_value((char_u *)"ttym", 0L,
+ (char_u *)"sgr", 0);
+ else
+*** ../vim-8.1.0565/src/version.c 2018-12-05 19:46:03.170987995 +0100
+--- src/version.c 2018-12-07 13:12:38.017734126 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 566,
+ /**/
+
+--
+"The future's already arrived - it's just not evenly distributed yet."
+ -- William Gibson
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0567 b/data/vim/patches/8.1.0567
new file mode 100644
index 000000000..ac5b5f45b
--- /dev/null
+++ b/data/vim/patches/8.1.0567
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0567
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0567 (after 8.1.0565)
+Problem: Error for NUL byte in ScreenLines goes unnoticed.
+Solution: Add an internal error message.
+Files: src/gui.c
+
+
+*** ../vim-8.1.0566/src/gui.c 2018-12-05 19:46:03.170987995 +0100
+--- src/gui.c 2018-12-06 22:04:51.967296617 +0100
+***************
+*** 2753,2761 ****
+ }
+ else if (enc_utf8)
+ {
+! // FIXME: how can the first character ever be zero?
+! if (col1 > 0 && ScreenLines[off + col1] == 0)
+! --col1;
+ # ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+ ++col2;
+--- 2753,2767 ----
+ }
+ else if (enc_utf8)
+ {
+! if (ScreenLines[off + col1] == 0)
+! {
+! if (col1 > 0)
+! --col1;
+! else
+! // FIXME: how can the first character ever be zero?
+! IEMSGN("INTERNAL ERROR: NUL in ScreenLines in row %ld",
+! gui.row);
+! }
+ # ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+ ++col2;
+*** ../vim-8.1.0566/src/version.c 2018-12-07 13:18:16.611655653 +0100
+--- src/version.c 2018-12-07 13:26:28.728584545 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 567,
+ /**/
+
+--
+ARTHUR: Be quiet! I order you to shut up.
+OLD WOMAN: Order, eh -- who does he think he is?
+ARTHUR: I am your king!
+OLD WOMAN: Well, I didn't vote for you.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0568 b/data/vim/patches/8.1.0568
new file mode 100644
index 000000000..f280813ae
--- /dev/null
+++ b/data/vim/patches/8.1.0568
@@ -0,0 +1,65 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0568
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0568 (after 8.1.0567)
+Problem: Error message for NUL byte in ScreenLines breaks Travis CI.
+Solution: Use a normal message for now.
+Files: src/gui.c
+
+
+*** ../vim-8.1.0567/src/gui.c 2018-12-07 13:26:36.332536832 +0100
+--- src/gui.c 2018-12-07 14:07:20.708421838 +0100
+***************
+*** 2758,2766 ****
+ if (col1 > 0)
+ --col1;
+ else
+ // FIXME: how can the first character ever be zero?
+! IEMSGN("INTERNAL ERROR: NUL in ScreenLines in row %ld",
+! gui.row);
+ }
+ # ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+--- 2758,2771 ----
+ if (col1 > 0)
+ --col1;
+ else
++ {
+ // FIXME: how can the first character ever be zero?
+! // Make this IEMSGN when it no longer breaks Travis CI.
+! vim_snprintf((char *)IObuff, IOSIZE,
+! "INTERNAL ERROR: NUL in ScreenLines in row %ld",
+! (long)gui.row);
+! msg(IObuff);
+! }
+ }
+ # ifdef FEAT_GUI_GTK
+ if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
+*** ../vim-8.1.0567/src/version.c 2018-12-07 13:26:36.336536804 +0100
+--- src/version.c 2018-12-07 14:08:40.627805124 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 568,
+ /**/
+
+--
+OLD WOMAN: Well, how did you become king, then?
+ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite,
+ held Excalibur aloft from the bosom of the water to signify by Divine
+ Providence ... that I, Arthur, was to carry Excalibur ... That is
+ why I am your king!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0569 b/data/vim/patches/8.1.0569
new file mode 100644
index 000000000..bb37b182e
--- /dev/null
+++ b/data/vim/patches/8.1.0569
@@ -0,0 +1,98 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0569
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0569
+Problem: Execute() always resets display column to zero. (Sha Liu)
+Solution: Don't reset it to zero, restore the previous value. (closes #3669)
+Files: src/evalfunc.c, src/testdir/test_execute_func.c
+
+
+*** ../vim-8.1.0568/src/evalfunc.c 2018-11-22 03:07:30.944596219 +0100
+--- src/evalfunc.c 2018-12-07 16:34:07.079078592 +0100
+***************
+*** 3262,3267 ****
+--- 3262,3268 ----
+ int save_redir_execute = redir_execute;
+ int save_redir_off = redir_off;
+ garray_T save_ga;
++ int save_msg_col = msg_col;
+
+ rettv->vval.v_string = NULL;
+ rettv->v_type = VAR_STRING;
+***************
+*** 3304,3309 ****
+--- 3305,3311 ----
+ ga_init2(&redir_execute_ga, (int)sizeof(char), 500);
+ redir_execute = TRUE;
+ redir_off = FALSE;
++ msg_col = 0; // prevent leading spaces
+
+ if (cmd != NULL)
+ do_cmdline_cmd(cmd);
+***************
+*** 3336,3344 ****
+ redir_execute_ga = save_ga;
+ redir_off = save_redir_off;
+
+! /* "silent reg" or "silent echo x" leaves msg_col somewhere in the
+! * line. Put it back in the first column. */
+! msg_col = 0;
+ }
+
+ /*
+--- 3338,3346 ----
+ redir_execute_ga = save_ga;
+ redir_off = save_redir_off;
+
+! // "silent reg" or "silent echo x" leaves msg_col somewhere in the line.
+! // Put it back where it was, since nothing should have been written.
+! msg_col = save_msg_col;
+ }
+
+ /*
+*** ../vim-8.1.0568/src/testdir/test_execute_func.vim 2016-07-09 16:44:29.000000000 +0200
+--- src/testdir/test_execute_func.vim 2018-12-07 16:36:51.086039444 +0100
+***************
+*** 49,51 ****
+--- 49,63 ----
+ call assert_equal("", execute([]))
+ call assert_equal("", execute(test_null_list()))
+ endfunc
++
++ func Test_execute_does_not_change_col()
++ echo ''
++ echon 'abcd'
++ let x = execute('silent echo 234343')
++ echon 'xyz'
++ let text = ''
++ for col in range(1, 7)
++ let text .= nr2char(screenchar(&lines, col))
++ endfor
++ call assert_equal('abcdxyz', text)
++ endfunc
+*** ../vim-8.1.0568/src/version.c 2018-12-07 14:10:33.934952419 +0100
+--- src/version.c 2018-12-07 16:37:07.753933691 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 569,
+ /**/
+
+--
+ARTHUR: Now stand aside worthy adversary.
+BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch.
+ARTHUR: A scratch? Your arm's off.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0570 b/data/vim/patches/8.1.0570
new file mode 100644
index 000000000..63cb13caf
--- /dev/null
+++ b/data/vim/patches/8.1.0570
@@ -0,0 +1,126 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0570
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0570
+Problem: 'commentstring' not used when adding fold marker. (Maxim Kim)
+Solution: Only use empty 'comments' middle when leader is empty. (Christian
+ Brabandt, closes #3670)
+Files: src/misc1.c, src/testdir/test_fold.vim
+
+
+*** ../vim-8.1.0569/src/misc1.c 2018-11-16 19:39:47.346937404 +0100
+--- src/misc1.c 2018-12-07 21:00:29.985700550 +0100
+***************
+*** 1993,1998 ****
+--- 1993,1999 ----
+ for (list = curbuf->b_p_com; *list; )
+ {
+ char_u *flags_save = list;
++ int is_only_whitespace = FALSE;
+
+ /*
+ * Get one option part into part_buf[]. Advance list to next one.
+***************
+*** 2018,2025 ****
+ {
+ if (i == 0 || !VIM_ISWHITE(line[i - 1]))
+ continue;
+! while (VIM_ISWHITE(string[0]))
+ ++string;
+ }
+ for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j)
+ /* do nothing */;
+--- 2019,2028 ----
+ {
+ if (i == 0 || !VIM_ISWHITE(line[i - 1]))
+ continue;
+! while (VIM_ISWHITE(*string))
+ ++string;
++ if (*string == NUL)
++ is_only_whitespace = TRUE;
+ }
+ for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j)
+ /* do nothing */;
+***************
+*** 2032,2039 ****
+ */
+ if (vim_strchr(part_buf, COM_BLANK) != NULL
+ && !VIM_ISWHITE(line[i + j]) && line[i + j] != NUL)
+- {
+ continue;
+ }
+
+ /*
+--- 2035,2051 ----
+ */
+ if (vim_strchr(part_buf, COM_BLANK) != NULL
+ && !VIM_ISWHITE(line[i + j]) && line[i + j] != NUL)
+ continue;
++
++ // For a middlepart comment that is only white space, only consider
++ // it to match if everything before the current position in the
++ // line is also whitespace.
++ if (is_only_whitespace && vim_strchr(part_buf, COM_MIDDLE) != NULL)
++ {
++ for (j = 0; VIM_ISWHITE(line[j]) && j <= i; j++)
++ ;
++ if (j < i)
++ continue;
+ }
+
+ /*
+*** ../vim-8.1.0569/src/testdir/test_fold.vim 2018-10-02 21:20:08.688088162 +0200
+--- src/testdir/test_fold.vim 2018-12-07 21:03:08.585295165 +0100
+***************
+*** 695,697 ****
+--- 695,714 ----
+ call StopVimInTerminal(buf)
+ call delete('Xtest_folds_with_rnu')
+ endfunc
++
++ func Test_folds_marker_in_comment2()
++ new
++ call setline(1, ['Lorem ipsum dolor sit', 'Lorem ipsum dolor sit', 'Lorem ipsum dolor sit'])
++ setl fen fdm=marker
++ setl commentstring=<!--%s-->
++ setl comments=s:<!--,m:\ \ \ \ ,e:-->
++ norm! zf2j
++ setl nofen
++ :1y
++ call assert_equal(['Lorem ipsum dolor sit<!--{{{-->'], getreg(0,1,1))
++ :+2y
++ call assert_equal(['Lorem ipsum dolor sit<!--}}}-->'], getreg(0,1,1))
++
++ set foldmethod&
++ bwipe!
++ endfunc
+*** ../vim-8.1.0569/src/version.c 2018-12-07 16:38:20.461472100 +0100
+--- src/version.c 2018-12-07 20:53:51.333542516 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 570,
+ /**/
+
+--
+Any resemblance between the above views and those of my employer, my terminal,
+or the view out my window are purely coincidental. Any resemblance between
+the above and my own views is non-deterministic. The question of the
+existence of views in the absence of anyone to hold them is left as an
+exercise for the reader. The question of the existence of the reader is left
+as an exercise for the second god coefficient. (A discussion of
+non-orthogonal, non-integral polytheism is beyond the scope of this article.)
+ (Ralph Jennings)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0571 b/data/vim/patches/8.1.0571
new file mode 100644
index 000000000..bdf8e5b02
--- /dev/null
+++ b/data/vim/patches/8.1.0571
@@ -0,0 +1,125 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0571
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0571 (after 8.1.0569)
+Problem: Non-silent execute() resets display column to zero.
+Solution: Keep the display column as-is.
+Files: src/evalfunc.c, src/testdir/test_execute_func.vim
+
+
+*** ../vim-8.1.0570/src/evalfunc.c 2018-12-07 16:38:20.461472100 +0100
+--- src/evalfunc.c 2018-12-08 13:29:07.583916762 +0100
+***************
+*** 3263,3268 ****
+--- 3263,3269 ----
+ int save_redir_off = redir_off;
+ garray_T save_ga;
+ int save_msg_col = msg_col;
++ int echo_output = FALSE;
+
+ rettv->vval.v_string = NULL;
+ rettv->v_type = VAR_STRING;
+***************
+*** 3289,3294 ****
+--- 3290,3297 ----
+
+ if (s == NULL)
+ return;
++ if (*s == NUL)
++ echo_output = TRUE;
+ if (STRNCMP(s, "silent", 6) == 0)
+ ++msg_silent;
+ if (STRCMP(s, "silent!") == 0)
+***************
+*** 3305,3311 ****
+ ga_init2(&redir_execute_ga, (int)sizeof(char), 500);
+ redir_execute = TRUE;
+ redir_off = FALSE;
+! msg_col = 0; // prevent leading spaces
+
+ if (cmd != NULL)
+ do_cmdline_cmd(cmd);
+--- 3308,3315 ----
+ ga_init2(&redir_execute_ga, (int)sizeof(char), 500);
+ redir_execute = TRUE;
+ redir_off = FALSE;
+! if (!echo_output)
+! msg_col = 0; // prevent leading spaces
+
+ if (cmd != NULL)
+ do_cmdline_cmd(cmd);
+***************
+*** 3339,3346 ****
+ redir_off = save_redir_off;
+
+ // "silent reg" or "silent echo x" leaves msg_col somewhere in the line.
+! // Put it back where it was, since nothing should have been written.
+! msg_col = save_msg_col;
+ }
+
+ /*
+--- 3343,3356 ----
+ redir_off = save_redir_off;
+
+ // "silent reg" or "silent echo x" leaves msg_col somewhere in the line.
+! if (echo_output)
+! // When not working silently: put it in column zero. A following
+! // "echon" will overwrite the message, unavoidably.
+! msg_col = 0;
+! else
+! // When working silently: Put it back where it was, since nothing
+! // should have been written.
+! msg_col = save_msg_col;
+ }
+
+ /*
+*** ../vim-8.1.0570/src/testdir/test_execute_func.vim 2018-12-07 16:38:20.461472100 +0100
+--- src/testdir/test_execute_func.vim 2018-12-08 13:31:33.151013537 +0100
+***************
+*** 61,63 ****
+--- 61,80 ----
+ endfor
+ call assert_equal('abcdxyz', text)
+ endfunc
++
++ func Test_execute_not_silent()
++ echo ''
++ echon 'abcd'
++ let x = execute('echon 234', '')
++ echo 'xyz'
++ let text1 = ''
++ for col in range(1, 8)
++ let text1 .= nr2char(screenchar(&lines - 1, col))
++ endfor
++ call assert_equal('abcd234 ', text1)
++ let text2 = ''
++ for col in range(1, 4)
++ let text2 .= nr2char(screenchar(&lines, col))
++ endfor
++ call assert_equal('xyz ', text2)
++ endfunc
+*** ../vim-8.1.0570/src/version.c 2018-12-07 21:08:44.775946983 +0100
+--- src/version.c 2018-12-08 13:32:59.090476830 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 571,
+ /**/
+
+--
+ |
+
+Ceci n'est pas une pipe.
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0572 b/data/vim/patches/8.1.0572
new file mode 100644
index 000000000..0ae3eefe6
--- /dev/null
+++ b/data/vim/patches/8.1.0572
@@ -0,0 +1,79 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0572
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0572
+Problem: Stopping a job does not work properly on OpenBSD.
+Solution: Do not use getpgid() to check the process group of the job
+ processs ID, always pass the negative process ID to kill().
+ (George Koehler, closes #3656)
+Files: src/os_unix.c
+
+
+*** ../vim-8.1.0571/src/os_unix.c 2018-11-12 21:45:04.596729428 +0100
+--- src/os_unix.c 2018-12-08 14:37:24.207684926 +0100
+***************
+*** 5820,5826 ****
+ mch_signal_job(job_T *job, char_u *how)
+ {
+ int sig = -1;
+- pid_t job_pid;
+
+ if (*how == NUL || STRCMP(how, "term") == 0)
+ sig = SIGTERM;
+--- 5820,5825 ----
+***************
+*** 5841,5856 ****
+ else
+ return FAIL;
+
+! /* TODO: have an option to only kill the process, not the group? */
+! job_pid = job->jv_pid;
+! #ifdef HAVE_GETPGID
+! if (job_pid == getpgid(job_pid))
+! job_pid = -job_pid;
+! #endif
+!
+! /* Never kill ourselves! */
+! if (job_pid != 0)
+! kill(job_pid, sig);
+
+ return OK;
+ }
+--- 5840,5852 ----
+ else
+ return FAIL;
+
+! // Never kill ourselves!
+! if (job->jv_pid != 0)
+! {
+! // TODO: have an option to only kill the process, not the group?
+! kill(-job->jv_pid, sig);
+! kill(job->jv_pid, sig);
+! }
+
+ return OK;
+ }
+*** ../vim-8.1.0571/src/version.c 2018-12-08 13:57:38.553692769 +0100
+--- src/version.c 2018-12-08 14:38:11.875404358 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 572,
+ /**/
+
+--
+FIRST VILLAGER: We have found a witch. May we burn her?
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 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 ///
diff --git a/data/vim/patches/8.1.0573 b/data/vim/patches/8.1.0573
new file mode 100644
index 000000000..42f7ec137
--- /dev/null
+++ b/data/vim/patches/8.1.0573
@@ -0,0 +1,254 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0573
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0573
+Problem: Cannot redefine user command without ! in same script
+Solution: Allow redefining user command without ! in same script, like with
+ functions.
+Files: src/ex_docmd.c, src/testdir/test_usercommands.vim,
+ runtime/doc/map.txt
+
+
+*** ../vim-8.1.0572/src/ex_docmd.c 2018-12-02 18:21:46.035419603 +0100
+--- src/ex_docmd.c 2018-12-08 16:01:27.672777222 +0100
+***************
+*** 5869,5877 ****
+
+ if (cmp == 0)
+ {
+! if (!force)
+ {
+! EMSG(_("E174: Command already exists: add ! to replace it"));
+ goto fail;
+ }
+
+--- 5869,5881 ----
+
+ if (cmp == 0)
+ {
+! // Command can be replaced with "command!" and when sourcing the
+! // same script again, but only once.
+! if (!force && (cmd->uc_script_ctx.sc_sid != current_sctx.sc_sid
+! || cmd->uc_script_ctx.sc_seq == current_sctx.sc_seq))
+ {
+! EMSG2(_("E174: Command already exists: add ! to replace it: %s"),
+! name);
+ goto fail;
+ }
+
+*** ../vim-8.1.0572/src/testdir/test_usercommands.vim 2018-12-02 18:21:46.035419603 +0100
+--- src/testdir/test_usercommands.vim 2018-12-08 15:50:37.400773622 +0100
+***************
+*** 90,95 ****
+--- 90,123 ----
+ delcommand Dothat
+ endfunc
+
++ func Test_redefine_on_reload()
++ call writefile(['command ExistingCommand echo "yes"'], 'Xcommandexists')
++ call assert_equal(0, exists(':ExistingCommand'))
++ source Xcommandexists
++ call assert_equal(2, exists(':ExistingCommand'))
++ " Redefining a command when reloading a script is OK.
++ source Xcommandexists
++ call assert_equal(2, exists(':ExistingCommand'))
++
++ " But redefining in another script is not OK.
++ call writefile(['command ExistingCommand echo "yes"'], 'Xcommandexists2')
++ call assert_fails('source Xcommandexists2', 'E174:')
++ call delete('Xcommandexists2')
++
++ " And defining twice in one script is not OK.
++ delcommand ExistingCommand
++ call assert_equal(0, exists(':ExistingCommand'))
++ call writefile([
++ \ 'command ExistingCommand echo "yes"',
++ \ 'command ExistingCommand echo "no"',
++ \ ], 'Xcommandexists')
++ call assert_fails('source Xcommandexists', 'E174:')
++ call assert_equal(2, exists(':ExistingCommand'))
++
++ call delete('Xcommandexists')
++ delcommand ExistingCommand
++ endfunc
++
+ func Test_CmdUndefined()
+ call assert_fails('Doit', 'E492:')
+ au CmdUndefined Doit :command Doit let g:didit = 'yes'
+*** ../vim-8.1.0572/runtime/doc/map.txt 2018-05-17 13:41:41.000000000 +0200
+--- runtime/doc/map.txt 2018-12-08 15:54:00.039525767 +0100
+***************
+*** 1220,1225 ****
+--- 1223,1232 ----
+ attributes (see below) are {attr}. If the command
+ already exists, an error is reported, unless a ! is
+ specified, in which case the command is redefined.
++ There is one exception: When sourcing a script again,
++ a command that was previously defined in that script
++ will be silently replaced.
++
+
+ :delc[ommand] {cmd} *:delc* *:delcommand* *E184*
+ Delete the user-defined command {cmd}.
+***************
+*** 1227,1233 ****
+ :comc[lear] *:comc* *:comclear*
+ Delete all user-defined commands.
+
+! Command attributes
+
+ User-defined commands are treated by Vim just like any other Ex commands. They
+ can have arguments, or have a range specified. Arguments are subject to
+--- 1234,1241 ----
+ :comc[lear] *:comc* *:comclear*
+ Delete all user-defined commands.
+
+!
+! Command attributes ~
+
+ User-defined commands are treated by Vim just like any other Ex commands. They
+ can have arguments, or have a range specified. Arguments are subject to
+***************
+*** 1238,1245 ****
+ handling, completion behavior, range handling, and special cases. The
+ attributes are described below, by category.
+
+- Argument handling *E175* *E176* *:command-nargs*
+
+ By default, a user defined command will take no arguments (and an error is
+ reported if any are supplied). However, it is possible to specify that the
+ command can take arguments, using the -nargs attribute. Valid cases are:
+--- 1246,1254 ----
+ handling, completion behavior, range handling, and special cases. The
+ attributes are described below, by category.
+
+
++ Argument handling ~
++ *E175* *E176* *:command-nargs*
+ By default, a user defined command will take no arguments (and an error is
+ reported if any are supplied). However, it is possible to specify that the
+ command can take arguments, using the -nargs attribute. Valid cases are:
+***************
+*** 1268,1275 ****
+ Executing script2.vim will result in "None" being echoed. Not what you
+ intended! Calling a function may be an alternative.
+
+! Completion behavior *:command-completion* *E179*
+! *E180* *E181* *:command-complete*
+ By default, the arguments of user defined commands do not undergo completion.
+ However, by specifying one or the other of the following attributes, argument
+ completion can be enabled:
+--- 1277,1286 ----
+ Executing script2.vim will result in "None" being echoed. Not what you
+ intended! Calling a function may be an alternative.
+
+!
+! Completion behavior ~
+! *:command-completion* *E179* *E180* *E181*
+! *:command-complete*
+ By default, the arguments of user defined commands do not undergo completion.
+ However, by specifying one or the other of the following attributes, argument
+ completion can be enabled:
+***************
+*** 1314,1322 ****
+ Note: That some completion methods might expand environment variables.
+
+
+! Custom completion *:command-completion-custom*
+! *:command-completion-customlist*
+! *E467* *E468*
+ It is possible to define customized completion schemes via the "custom,{func}"
+ or the "customlist,{func}" completion argument. The {func} part should be a
+ function with the following signature: >
+--- 1325,1333 ----
+ Note: That some completion methods might expand environment variables.
+
+
+! Custom completion ~
+! *:command-completion-custom*
+! *:command-completion-customlist* *E467* *E468*
+ It is possible to define customized completion schemes via the "custom,{func}"
+ or the "customlist,{func}" completion argument. The {func} part should be a
+ function with the following signature: >
+***************
+*** 1361,1368 ****
+ This example does not work for file names with spaces!
+
+
+! Range handling *E177* *E178* *:command-range*
+! *:command-count*
+ By default, user-defined commands do not accept a line number range. However,
+ it is possible to specify that the command does take a range (the -range
+ attribute), or that it takes an arbitrary count value, either in the line
+--- 1372,1379 ----
+ This example does not work for file names with spaces!
+
+
+! Range handling ~
+! *E177* *E178* *:command-range* *:command-count*
+ By default, user-defined commands do not accept a line number range. However,
+ it is possible to specify that the command does take a range (the -range
+ attribute), or that it takes an arbitrary count value, either in the line
+***************
+*** 1396,1403 ****
+ -addr=loaded_buffers Range for loaded buffers
+ -addr=windows Range for windows
+ -addr=tabs Range for tab pages
+
+! Special cases *:command-bang* *:command-bar*
+ *:command-register* *:command-buffer*
+ There are some special cases as well:
+
+--- 1407,1417 ----
+ -addr=loaded_buffers Range for loaded buffers
+ -addr=windows Range for windows
+ -addr=tabs Range for tab pages
++ -addr=other other kind of range
++
+
+! Special cases ~
+! *:command-bang* *:command-bar*
+ *:command-register* *:command-buffer*
+ There are some special cases as well:
+
+***************
+*** 1415,1421 ****
+ Note that these arguments can be abbreviated, but that is a deprecated
+ feature. Use the full name for new scripts.
+
+! Replacement text
+
+ The replacement text for a user defined command is scanned for special escape
+ sequences, using <...> notation. Escape sequences are replaced with values
+--- 1429,1436 ----
+ Note that these arguments can be abbreviated, but that is a deprecated
+ feature. Use the full name for new scripts.
+
+!
+! Replacement text ~
+
+ The replacement text for a user defined command is scanned for special escape
+ sequences, using <...> notation. Escape sequences are replaced with values
+*** ../vim-8.1.0572/src/version.c 2018-12-08 14:39:00.055120155 +0100
+--- src/version.c 2018-12-08 15:41:53.560022228 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 573,
+ /**/
+
+--
+I have read and understood the above. X________________
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0574 b/data/vim/patches/8.1.0574
new file mode 100644
index 000000000..0a42608ec
--- /dev/null
+++ b/data/vim/patches/8.1.0574
@@ -0,0 +1,129 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0574
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0574
+Problem: 'commentstring' not used when adding fold marker in C.
+Solution: Require white space before middle comment part. (mostly by
+ Hirohito Higashi)
+Files: src/misc1.c, src/testdir/test_fold.vim
+
+
+*** ../vim-8.1.0573/src/misc1.c 2018-12-07 21:08:44.775946983 +0100
+--- src/misc1.c 2018-12-09 14:50:25.241083939 +0100
+***************
+*** 1993,1999 ****
+ for (list = curbuf->b_p_com; *list; )
+ {
+ char_u *flags_save = list;
+- int is_only_whitespace = FALSE;
+
+ /*
+ * Get one option part into part_buf[]. Advance list to next one.
+--- 1993,1998 ----
+***************
+*** 2021,2028 ****
+ continue;
+ while (VIM_ISWHITE(*string))
+ ++string;
+- if (*string == NUL)
+- is_only_whitespace = TRUE;
+ }
+ for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j)
+ /* do nothing */;
+--- 2020,2025 ----
+***************
+*** 2037,2047 ****
+ && !VIM_ISWHITE(line[i + j]) && line[i + j] != NUL)
+ continue;
+
+! // For a middlepart comment that is only white space, only consider
+! // it to match if everything before the current position in the
+! // line is also whitespace.
+! if (is_only_whitespace && vim_strchr(part_buf, COM_MIDDLE) != NULL)
+ {
+ for (j = 0; VIM_ISWHITE(line[j]) && j <= i; j++)
+ ;
+ if (j < i)
+--- 2034,2046 ----
+ && !VIM_ISWHITE(line[i + j]) && line[i + j] != NUL)
+ continue;
+
+! if (vim_strchr(part_buf, COM_MIDDLE) != NULL)
+ {
++ // For a middlepart comment, only consider it to match if
++ // everything before the current position in the line is
++ // whitespace. Otherwise we would think we are inside a
++ // comment if the middle part appears somewhere in the middle
++ // of the line. E.g. for C the "*" appears often.
+ for (j = 0; VIM_ISWHITE(line[j]) && j <= i; j++)
+ ;
+ if (j < i)
+*** ../vim-8.1.0573/src/testdir/test_fold.vim 2018-12-07 21:08:44.775946983 +0100
+--- src/testdir/test_fold.vim 2018-12-09 15:00:39.993843356 +0100
+***************
+*** 507,512 ****
+--- 507,541 ----
+ enew!
+ endfunc
+
++ " test create fold markers with C filetype
++ func Test_fold_create_marker_in_C()
++ enew!
++ set fdm=marker fdl=9
++ set filetype=c
++
++ let content = [
++ \ '/*',
++ \ ' * comment',
++ \ ' * ',
++ \ ' *',
++ \ ' */',
++ \ 'int f(int* p) {',
++ \ ' *p = 3;',
++ \ ' return 0;',
++ \ '}'
++ \]
++ for c in range(len(content) - 1)
++ bw!
++ call append(0, content)
++ call cursor(c + 1, 1)
++ norm! zfG
++ call assert_equal(content[c] . (c < 4 ? '{{{' : '/*{{{*/'), getline(c + 1))
++ endfor
++
++ set fdm& fdl&
++ enew!
++ endfunc
++
+ " test folding with indent
+ func Test_fold_indent()
+ enew!
+*** ../vim-8.1.0573/src/version.c 2018-12-08 16:03:18.656085902 +0100
+--- src/version.c 2018-12-09 14:59:36.034199905 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 574,
+ /**/
+
+--
+Scientists decoded the first message from an alien civilization:
+ SIMPLY SEND 6 TIMES 10 TO THE 50 ATOMS OF HYDROGEN TO THE STAR
+SYSTEM AT THE TOP OF THE LIST, CROSS OFF THAT STAR SYSTEM, THEN PUT
+YOUR STAR SYSTEM AT THE BOTTOM OF THE LIST AND SEND IT TO 100 OTHER
+STAR SYSTEMS. WITHIN ONE TENTH GALACTIC ROTATION YOU WILL RECEIVE
+ENOUGH HYDROGREN TO POWER YOUR CIVILIZATION UNTIL ENTROPY REACHES ITS
+MAXIMUM! IT REALLY WORKS!
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0575 b/data/vim/patches/8.1.0575
new file mode 100644
index 000000000..05314da98
--- /dev/null
+++ b/data/vim/patches/8.1.0575
@@ -0,0 +1,346 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0575
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0575
+Problem: Termdebug: clearing multi-breakpoint does not work.
+Solution: Delete all X.Y breakpoints. Keep more information about placed
+ breakpoints. (Ozaki Kiichi, closes #3641)
+Files: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+
+
+*** ../vim-8.1.0574/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim 2018-12-02 13:45:47.088708659 +0100
+--- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim 2018-12-09 15:46:07.909886080 +0100
+***************
+*** 74,83 ****
+ let s:stopped = 1
+
+ " Take a breakpoint number as used by GDB and turn it into an integer.
+! " The breakpoint may contain a dot: 123.4
+! func s:Breakpoint2SignNumber(nr)
+! let t = split(a:nr, '\.')
+! return t[0] * 1000 + (len(t) == 2 ? t[1] : 0)
+ endfunction
+
+ func s:Highlight(init, old, new)
+--- 74,83 ----
+ let s:stopped = 1
+
+ " Take a breakpoint number as used by GDB and turn it into an integer.
+! " The breakpoint may contain a dot: 123.4 -> 123004
+! " The main breakpoint has a zero subid.
+! func s:Breakpoint2SignNumber(id, subid)
+! return s:break_id + a:id * 1000 + a:subid
+ endfunction
+
+ func s:Highlight(init, old, new)
+***************
+*** 362,369 ****
+--- 362,378 ----
+
+ " Contains breakpoints that have been placed, key is a string with the GDB
+ " breakpoint number.
++ " Each entry is a dict, containing the sub-breakpoints. Key is the subid.
++ " For a breakpoint that is just a number the subid is zero.
++ " For a breakpoint "123.4" the id is "123" and subid is "4".
++ " Example, when breakpoint "44", "123", "123.1" and "123.2" exist:
++ " {'44': {'0': entry}, '123': {'0': entry, '1': entry, '2': entry}}
+ let s:breakpoints = {}
+
++ " Contains breakpoints by file/lnum. The key is "fname:lnum".
++ " Each entry is a list of breakpoint IDs at that position.
++ let s:breakpoint_locations = {}
++
+ augroup TermDebug
+ au BufRead * call s:BufRead()
+ au BufUnload * call s:BufUnloaded()
+***************
+*** 683,692 ****
+ endif
+
+ exe 'sign unplace ' . s:pc_id
+! for key in keys(s:breakpoints)
+! exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
+ endfor
+ unlet s:breakpoints
+
+ sign undefine debugPC
+ for val in s:BreakpointSigns
+--- 692,704 ----
+ endif
+
+ exe 'sign unplace ' . s:pc_id
+! for [id, entries] in items(s:breakpoints)
+! for subid in keys(entries)
+! exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
+! endfor
+ endfor
+ unlet s:breakpoints
++ unlet s:breakpoint_locations
+
+ sign undefine debugPC
+ for val in s:BreakpointSigns
+***************
+*** 721,735 ****
+ func s:ClearBreakpoint()
+ let fname = fnameescape(expand('%:p'))
+ let lnum = line('.')
+! for [key, val] in items(s:breakpoints)
+! if val['fname'] == fname && val['lnum'] == lnum
+! call s:SendCommand('-break-delete ' . key)
+! " Assume this always wors, the reply is simply "^done".
+! exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(key))
+! unlet s:breakpoints[key]
+! break
+ endif
+! endfor
+ endfunc
+
+ func s:Run(args)
+--- 733,759 ----
+ func s:ClearBreakpoint()
+ let fname = fnameescape(expand('%:p'))
+ let lnum = line('.')
+! let bploc = printf('%s:%d', fname, lnum)
+! if has_key(s:breakpoint_locations, bploc)
+! let idx = 0
+! for id in s:breakpoint_locations[bploc]
+! if has_key(s:breakpoints, id)
+! " Assume this always works, the reply is simply "^done".
+! call s:SendCommand('-break-delete ' . id)
+! for subid in keys(s:breakpoints[id])
+! exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
+! endfor
+! unlet s:breakpoints[id]
+! unlet s:breakpoint_locations[bploc][idx]
+! break
+! else
+! let idx += 1
+! endif
+! endfor
+! if empty(s:breakpoint_locations[bploc])
+! unlet s:breakpoint_locations[bploc]
+ endif
+! endif
+ endfunc
+
+ func s:Run(args)
+***************
+*** 873,887 ****
+
+ let s:BreakpointSigns = []
+
+! func s:CreateBreakpoint(nr)
+! if index(s:BreakpointSigns, a:nr) == -1
+! call add(s:BreakpointSigns, a:nr)
+! exe "sign define debugBreakpoint" . a:nr . " text=" . substitute(a:nr, '\..*', '', '') . " texthl=debugBreakpoint"
+ endif
+ endfunc
+
+! func s:SplitMsg(s)
+! return split(a:s, '{\%([a-z-]\+=[^,]\+,*\)\+}\zs')
+ endfunction
+
+ " Handle setting a breakpoint
+--- 897,912 ----
+
+ let s:BreakpointSigns = []
+
+! func s:CreateBreakpoint(id, subid)
+! let nr = printf('%d.%d', a:id, a:subid)
+! if index(s:BreakpointSigns, nr) == -1
+! call add(s:BreakpointSigns, nr)
+! exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=debugBreakpoint"
+ endif
+ endfunc
+
+! func! s:SplitMsg(s)
+! return split(a:s, '{.\{-}}\zs')
+ endfunction
+
+ " Handle setting a breakpoint
+***************
+*** 900,947 ****
+ if empty(nr)
+ return
+ endif
+- call s:CreateBreakpoint(nr)
+
+! if has_key(s:breakpoints, nr)
+! let entry = s:breakpoints[nr]
+ else
+ let entry = {}
+! let s:breakpoints[nr] = entry
+ endif
+
+ let lnum = substitute(msg, '.*line="\([^"]*\)".*', '\1', '')
+ let entry['fname'] = fname
+ let entry['lnum'] = lnum
+
+ if bufloaded(fname)
+! call s:PlaceSign(nr, entry)
+ endif
+ endfor
+ endfunc
+
+! func s:PlaceSign(nr, entry)
+! exe 'sign place ' . (s:break_id + s:Breakpoint2SignNumber(a:nr)) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . a:nr . ' file=' . a:entry['fname']
+ let a:entry['placed'] = 1
+ endfunc
+
+ " Handle deleting a breakpoint
+ " Will remove the sign that shows the breakpoint
+ func s:HandleBreakpointDelete(msg)
+! let key = substitute(a:msg, '.*id="\([0-9.]*\)\".*', '\1', '')
+! if empty(key)
+ return
+ endif
+! for [nr, entry] in items(s:breakpoints)
+! if stridx(nr, key) != 0
+! continue
+! endif
+! let entry = s:breakpoints[nr]
+! if has_key(entry, 'placed')
+! exe 'sign unplace ' . (s:break_id + s:Breakpoint2SignNumber(nr))
+! unlet entry['placed']
+! endif
+! unlet s:breakpoints[nr]
+! endfor
+ endfunc
+
+ " Handle the debugged program starting to run.
+--- 925,987 ----
+ if empty(nr)
+ return
+ endif
+
+! " If "nr" is 123 it becomes "123.0" and subid is "0".
+! " If "nr" is 123.4 it becomes "123.4.0" and subid is "4"; "0" is discarded.
+! let [id, subid; _] = map(split(nr . '.0', '\.'), 'v:val + 0')
+! call s:CreateBreakpoint(id, subid)
+!
+! if has_key(s:breakpoints, id)
+! let entries = s:breakpoints[id]
+! else
+! let entries = {}
+! let s:breakpoints[id] = entries
+! endif
+! if has_key(entries, subid)
+! let entry = entries[subid]
+ else
+ let entry = {}
+! let entries[subid] = entry
+ endif
+
+ let lnum = substitute(msg, '.*line="\([^"]*\)".*', '\1', '')
+ let entry['fname'] = fname
+ let entry['lnum'] = lnum
+
++ let bploc = printf('%s:%d', fname, lnum)
++ if !has_key(s:breakpoint_locations, bploc)
++ let s:breakpoint_locations[bploc] = []
++ endif
++ let s:breakpoint_locations[bploc] += [id]
++
+ if bufloaded(fname)
+! call s:PlaceSign(id, subid, entry)
+ endif
+ endfor
+ endfunc
+
+! func s:PlaceSign(id, subid, entry)
+! let nr = printf('%d.%d', a:id, a:subid)
+! exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' file=' . a:entry['fname']
+ let a:entry['placed'] = 1
+ endfunc
+
+ " Handle deleting a breakpoint
+ " Will remove the sign that shows the breakpoint
+ func s:HandleBreakpointDelete(msg)
+! let id = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0
+! if empty(id)
+ return
+ endif
+! if has_key(s:breakpoints, id)
+! for [subid, entry] in items(s:breakpoints[id])
+! if has_key(entry, 'placed')
+! exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
+! unlet entry['placed']
+! endif
+! endfor
+! unlet s:breakpoints[id]
+! endif
+ endfunc
+
+ " Handle the debugged program starting to run.
+***************
+*** 958,977 ****
+ " Handle a BufRead autocommand event: place any signs.
+ func s:BufRead()
+ let fname = expand('<afile>:p')
+! for [nr, entry] in items(s:breakpoints)
+! if entry['fname'] == fname
+! call s:PlaceSign(nr, entry)
+! endif
+ endfor
+ endfunc
+
+ " Handle a BufUnloaded autocommand event: unplace any signs.
+ func s:BufUnloaded()
+ let fname = expand('<afile>:p')
+! for [nr, entry] in items(s:breakpoints)
+! if entry['fname'] == fname
+! let entry['placed'] = 0
+! endif
+ endfor
+ endfunc
+
+--- 998,1021 ----
+ " Handle a BufRead autocommand event: place any signs.
+ func s:BufRead()
+ let fname = expand('<afile>:p')
+! for [id, entries] in items(s:breakpoints)
+! for [subid, entry] in items(entries)
+! if entry['fname'] == fname
+! call s:PlaceSign(id, subid, entry)
+! endif
+! endfor
+ endfor
+ endfunc
+
+ " Handle a BufUnloaded autocommand event: unplace any signs.
+ func s:BufUnloaded()
+ let fname = expand('<afile>:p')
+! for [id, entries] in items(s:breakpoints)
+! for [subid, entry] in items(entries)
+! if entry['fname'] == fname
+! let entry['placed'] = 0
+! endif
+! endfor
+ endfor
+ endfunc
+
+*** ../vim-8.1.0574/src/version.c 2018-12-09 15:00:47.985798600 +0100
+--- src/version.c 2018-12-09 15:51:55.863826210 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 575,
+ /**/
+
+--
+Are leaders born or made? And if they're made, can we return them under
+warranty?
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0576 b/data/vim/patches/8.1.0576
new file mode 100644
index 000000000..2bc62396c
--- /dev/null
+++ b/data/vim/patches/8.1.0576
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0576
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0576
+Problem: Indent script tests pick up installed scripts.
+Solution: Use current runtime indent scripts.
+Files: runtime/indent/Makefile
+
+
+*** ../vim-8.1.0575/runtime/indent/Makefile 2018-11-25 04:03:04.262574403 +0100
+--- runtime/indent/Makefile 2018-12-10 21:09:25.979779327 +0100
+***************
+*** 1,13 ****
+ # Portable Makefile for running indent tests.
+
+ VIM = vim
+
+ # Run the tests that didn't run yet or failed previously.
+ # If a test succeeds a testdir/*.out file will be written.
+ # If a test fails a testdir/*.fail file will be written.
+ test:
+! $(VIM) --clean --not-a-term -u testdir/runtest.vim
+
+
+ clean:
+! $(VIM) --clean --not-a-term -u testdir/cleantest.vim
+--- 1,14 ----
+ # Portable Makefile for running indent tests.
+
+ VIM = vim
++ VIMRUNTIME = ..
+
+ # Run the tests that didn't run yet or failed previously.
+ # If a test succeeds a testdir/*.out file will be written.
+ # If a test fails a testdir/*.fail file will be written.
+ test:
+! VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/runtest.vim
+
+
+ clean:
+! VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/cleantest.vim
+*** ../vim-8.1.0575/src/version.c 2018-12-09 15:52:57.091463593 +0100
+--- src/version.c 2018-12-10 21:36:12.085646506 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 576,
+ /**/
+
+--
+Our job was to build a computer information system for the branch banks. We
+were the perfect people for the job: Dean had seen a computer once, and I had
+heard Dean talk about it.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0577 b/data/vim/patches/8.1.0577
new file mode 100644
index 000000000..ae3e6f13d
--- /dev/null
+++ b/data/vim/patches/8.1.0577
@@ -0,0 +1,153 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0577
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0577
+Problem: Tabpage right-click menu never shows "Close tab".
+Solution: Always create the "Close tab" item but ignore the event if there
+ is only one tab.
+Files: src/gui_gtk_x11.c, src/gui_mac.c, src/gui_motif.c, src/gui.c
+
+
+*** ../vim-8.1.0576/src/gui_gtk_x11.c 2018-11-16 16:21:01.637310049 +0100
+--- src/gui_gtk_x11.c 2018-12-11 20:26:44.539749674 +0100
+***************
+*** 3337,3345 ****
+ GtkWidget *menu;
+
+ menu = gtk_menu_new();
+! if (first_tabpage->tp_next != NULL)
+! add_tabline_menu_item(menu, (char_u *)_("Close tab"),
+! TABLINE_MENU_CLOSE);
+ add_tabline_menu_item(menu, (char_u *)_("New tab"), TABLINE_MENU_NEW);
+ add_tabline_menu_item(menu, (char_u *)_("Open Tab..."), TABLINE_MENU_OPEN);
+
+--- 3337,3343 ----
+ GtkWidget *menu;
+
+ menu = gtk_menu_new();
+! add_tabline_menu_item(menu, (char_u *)_("Close tab"), TABLINE_MENU_CLOSE);
+ add_tabline_menu_item(menu, (char_u *)_("New tab"), TABLINE_MENU_NEW);
+ add_tabline_menu_item(menu, (char_u *)_("Open Tab..."), TABLINE_MENU_OPEN);
+
+*** ../vim-8.1.0576/src/gui_mac.c 2018-11-16 16:21:01.645310017 +0100
+--- src/gui_mac.c 2018-12-11 20:30:12.142418680 +0100
+***************
+*** 6705,6712 ****
+
+ // create tabline popup menu required by vim docs (see :he tabline-menu)
+ CreateNewMenu(kTabContextMenuId, 0, &contextMenu);
+! if (first_tabpage->tp_next != NULL)
+! AppendMenuItemTextWithCFString(contextMenu, CFSTR("Close Tab"), 0,
+ TABLINE_MENU_CLOSE, NULL);
+ AppendMenuItemTextWithCFString(contextMenu, CFSTR("New Tab"), 0,
+ TABLINE_MENU_NEW, NULL);
+--- 6705,6711 ----
+
+ // create tabline popup menu required by vim docs (see :he tabline-menu)
+ CreateNewMenu(kTabContextMenuId, 0, &contextMenu);
+! AppendMenuItemTextWithCFString(contextMenu, CFSTR("Close Tab"), 0,
+ TABLINE_MENU_CLOSE, NULL);
+ AppendMenuItemTextWithCFString(contextMenu, CFSTR("New Tab"), 0,
+ TABLINE_MENU_NEW, NULL);
+*** ../vim-8.1.0576/src/gui_motif.c 2018-11-16 16:21:01.641310033 +0100
+--- src/gui_motif.c 2018-12-11 20:31:07.886061365 +0100
+***************
+*** 514,534 ****
+ XtVaSetValues(scroller, XmNwidth, 0, XmNresizable, False,
+ XmNtraversalOn, False, NULL);
+
+! /* Create the tabline popup menu */
+ tabLine_menu = XmCreatePopupMenu(tabLine, "tabline popup", NULL, 0);
+
+! /* Add the buttons to the menu */
+! if (first_tabpage->tp_next != NULL)
+! {
+! n = 0;
+! XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++;
+! xms = XmStringCreate((char *)"Close tab", STRING_TAG);
+! XtSetArg(args[n], XmNlabelString, xms); n++;
+! button = XmCreatePushButton(tabLine_menu, "Close", args, n);
+! XtAddCallback(button, XmNactivateCallback,
+! (XtCallbackProc)tabline_button_cb, NULL);
+! XmStringFree(xms);
+! }
+
+ n = 0;
+ XtSetArg(args[n], XmNuserData, TABLINE_MENU_NEW); n++;
+--- 514,531 ----
+ XtVaSetValues(scroller, XmNwidth, 0, XmNresizable, False,
+ XmNtraversalOn, False, NULL);
+
+! // Create the tabline popup menu
+ tabLine_menu = XmCreatePopupMenu(tabLine, "tabline popup", NULL, 0);
+
+! // Add the buttons to the tabline popup menu
+! n = 0;
+! XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++;
+! xms = XmStringCreate((char *)"Close tab", STRING_TAG);
+! XtSetArg(args[n], XmNlabelString, xms); n++;
+! button = XmCreatePushButton(tabLine_menu, "Close", args, n);
+! XtAddCallback(button, XmNactivateCallback,
+! (XtCallbackProc)tabline_button_cb, NULL);
+! XmStringFree(xms);
+
+ n = 0;
+ XtSetArg(args[n], XmNuserData, TABLINE_MENU_NEW); n++;
+*** ../vim-8.1.0576/src/gui.c 2018-12-07 14:10:33.930952449 +0100
+--- src/gui.c 2018-12-11 20:27:29.995458213 +0100
+***************
+*** 3865,3874 ****
+ {
+ char_u string[3];
+
+! /* Don't put events in the input queue now. */
+ if (hold_gui_events)
+ return;
+
+ string[0] = CSI;
+ string[1] = KS_TABMENU;
+ string[2] = KE_FILLER;
+--- 3865,3878 ----
+ {
+ char_u string[3];
+
+! // Don't put events in the input queue now.
+ if (hold_gui_events)
+ return;
+
++ // Cannot close the last tabpage.
++ if (event == TABLINE_MENU_CLOSE && first_tabpage->tp_next == NULL)
++ return;
++
+ string[0] = CSI;
+ string[1] = KS_TABMENU;
+ string[2] = KE_FILLER;
+*** ../vim-8.1.0576/src/version.c 2018-12-10 21:36:52.869487030 +0100
+--- src/version.c 2018-12-11 20:38:57.595051427 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 577,
+ /**/
+
+--
+A salesperson says: Translation:
+"backward compatible" Old technology
+"Premium" Overpriced
+"Can't keep it on the shelf" Unavailable
+"Stands alone" Piece of shit
+"Proprietary" Incompatible
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0578 b/data/vim/patches/8.1.0578
new file mode 100644
index 000000000..c28221dee
--- /dev/null
+++ b/data/vim/patches/8.1.0578
@@ -0,0 +1,266 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0578
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0578
+Problem: Cannot disable arabic, rightleft and farsi in configure.
+Solution: Add configur flags. (Diego Fernando Carrión, closes #1867)
+Files: src/configure.ac, src/auto/configure, src/config.h.in,
+ src/feature.h, src/Makefile
+
+
+*** ../vim-8.1.0577/src/configure.ac 2018-09-13 17:23:05.165150925 +0200
+--- src/configure.ac 2018-12-12 20:24:39.847759473 +0100
+***************
+*** 2138,2143 ****
+--- 2138,2182 ----
+ AC_DEFINE(FEAT_MBYTE)
+ fi
+
++ dnl Right-to-Left language support for Vim will be included with big features,
++ dnl unless ENABLE_RIGHTLEFT is undefined.
++ AC_MSG_CHECKING(--disable-rightleft argument)
++ AC_ARG_ENABLE(rightleft,
++ [ --disable-rightleft Do not include Right-to-Left language support.],
++ , [enable_rightleft="yes"])
++ if test "$enable_rightleft" = "yes"; then
++ AC_MSG_RESULT(no)
++ else
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(DISABLE_RIGHTLEFT)
++ fi
++
++ dnl Arabic language support for Vim will be included with big features,
++ dnl unless ENABLE_ARABIC is undefined.
++ AC_MSG_CHECKING(--disable-arabic argument)
++ AC_ARG_ENABLE(arabic,
++ [ --disable-arabic Do not include Arabic language support.],
++ , [enable_arabic="yes"])
++ if test "$enable_arabic" = "yes"; then
++ AC_MSG_RESULT(no)
++ else
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(DISABLE_ARABIC)
++ fi
++
++ dnl Farsi language support for vim will be included with big features,
++ dnl unless ENABLE_FARSI is undefined.
++ AC_MSG_CHECKING(--disable-farsi argument)
++ AC_ARG_ENABLE(farsi,
++ [ --disable-farsi Do not include Farsi language support.],
++ , [enable_farsi="yes"])
++ if test "$enable_farsi" = "yes"; then
++ AC_MSG_RESULT(no)
++ else
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(DISABLE_FARSI)
++ fi
++
+ AC_MSG_CHECKING(--enable-hangulinput argument)
+ AC_ARG_ENABLE(hangulinput,
+ [ --enable-hangulinput Include Hangul input support.], ,
+*** ../vim-8.1.0577/src/auto/configure 2018-09-13 17:23:05.169150892 +0200
+--- src/auto/configure 2018-12-12 20:24:43.739736987 +0100
+***************
+*** 818,823 ****
+--- 818,826 ----
+ enable_terminal
+ enable_autoservername
+ enable_multibyte
++ enable_rightleft
++ enable_arabic
++ enable_farsi
+ enable_hangulinput
+ enable_xim
+ enable_fontset
+***************
+*** 1497,1502 ****
+--- 1500,1508 ----
+ --enable-terminal Enable terminal emulation support.
+ --enable-autoservername Automatically define servername at vim startup.
+ --enable-multibyte Include multibyte editing support.
++ --disable-rightleft Do not include Right-to-Left language support.
++ --disable-arabic Do not include Arabic language support.
++ --disable-farsi Do not include Farsi language support.
+ --enable-hangulinput Include Hangul input support.
+ --enable-xim Include XIM input support.
+ --enable-fontset Include X fontset output support.
+***************
+*** 7954,7959 ****
+--- 7960,8022 ----
+
+ fi
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
++ $as_echo_n "checking --disable-rightleft argument... " >&6; }
++ # Check whether --enable-rightleft was given.
++ if test "${enable_rightleft+set}" = set; then :
++ enableval=$enable_rightleft;
++ else
++ enable_rightleft="yes"
++ fi
++
++ if test "$enable_rightleft" = "yes"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++ $as_echo "no" >&6; }
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++ $as_echo "yes" >&6; }
++ $as_echo "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
++
++ fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
++ $as_echo_n "checking --disable-arabic argument... " >&6; }
++ # Check whether --enable-arabic was given.
++ if test "${enable_arabic+set}" = set; then :
++ enableval=$enable_arabic;
++ else
++ enable_arabic="yes"
++ fi
++
++ if test "$enable_arabic" = "yes"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++ $as_echo "no" >&6; }
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++ $as_echo "yes" >&6; }
++ $as_echo "#define DISABLE_ARABIC 1" >>confdefs.h
++
++ fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-farsi argument" >&5
++ $as_echo_n "checking --disable-farsi argument... " >&6; }
++ # Check whether --enable-farsi was given.
++ if test "${enable_farsi+set}" = set; then :
++ enableval=$enable_farsi;
++ else
++ enable_farsi="yes"
++ fi
++
++ if test "$enable_farsi" = "yes"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++ $as_echo "no" >&6; }
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++ $as_echo "yes" >&6; }
++ $as_echo "#define DISABLE_FARSI 1" >>confdefs.h
++
++ fi
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-hangulinput argument" >&5
+ $as_echo_n "checking --enable-hangulinput argument... " >&6; }
+ # Check whether --enable-hangulinput was given.
+*** ../vim-8.1.0577/src/config.h.in 2018-09-12 20:29:05.475670636 +0200
+--- src/config.h.in 2018-12-12 20:23:45.344072492 +0100
+***************
+*** 390,395 ****
+--- 390,404 ----
+ /* Define if you want to include multibyte support. */
+ #undef FEAT_MBYTE
+
++ /* Define if you don't want to include right-left support. */
++ #undef DISABLE_RIGHTLEFT
++
++ /* Define if you don't want to include Farsi support. */
++ #undef DISABLE_FARSI
++
++ /* Define if you don't want to include Arabic support. */
++ #undef DISABLE_ARABIC
++
+ /* Define if you want to always define a server name at vim startup. */
+ #undef FEAT_AUTOSERVERNAME
+
+*** ../vim-8.1.0577/src/feature.h 2018-08-14 13:38:12.744559267 +0200
+--- src/feature.h 2018-12-12 20:21:57.672679147 +0100
+***************
+*** 263,269 ****
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(EBCDIC)
+ # define FEAT_RIGHTLEFT
+ #endif
+
+--- 263,269 ----
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(DISABLE_RIGHTLEFT) && !defined(EBCDIC)
+ # define FEAT_RIGHTLEFT
+ #endif
+
+***************
+*** 273,279 ****
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(EBCDIC)
+ # define FEAT_FKMAP
+ #endif
+ #ifdef FEAT_FKMAP
+--- 273,279 ----
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(DISABLE_FARSI) && !defined(EBCDIC)
+ # define FEAT_FKMAP
+ #endif
+ #ifdef FEAT_FKMAP
+***************
+*** 288,294 ****
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
+ # define FEAT_ARABIC
+ #endif
+ #ifdef FEAT_ARABIC
+--- 288,294 ----
+ *
+ * Disabled for EBCDIC as it requires multibyte.
+ */
+! #if defined(FEAT_BIG) && !defined(DISABLE_ARABIC) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
+ # define FEAT_ARABIC
+ #endif
+ #ifdef FEAT_ARABIC
+*** ../vim-8.1.0577/src/Makefile 2018-09-21 13:56:21.522830206 +0200
+--- src/Makefile 2018-12-12 20:31:58.225141981 +0100
+***************
+*** 499,504 ****
+--- 499,508 ----
+ # configure tests may fail.
+ #CONF_OPT_MULTIBYTE = --enable-multibyte
+
++ # When building with at least "big" features, right-left, Arabic and Farsi
++ # features are enabled. Use this to disable them.
++ #CONF_OPT_MULTIBYTE = --disable-rightleft --disable-farsi --disable-arabic
++
+ # NLS - National Language Support
+ # Uncomment this when you do not want to support translated messages, even
+ # though configure can find support for it.
+*** ../vim-8.1.0577/src/version.c 2018-12-11 20:39:15.446937049 +0100
+--- src/version.c 2018-12-12 20:15:00.894808786 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 578,
+ /**/
+
+--
+The fastest way to get an engineer to solve a problem is to declare that the
+problem is unsolvable. No engineer can walk away from an unsolvable problem
+until it's solved.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///
diff --git a/data/vim/patches/8.1.0579 b/data/vim/patches/8.1.0579
new file mode 100644
index 000000000..421d0328f
--- /dev/null
+++ b/data/vim/patches/8.1.0579
@@ -0,0 +1,2526 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0580
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0580
+Problem: Cannot attach properties to text.
+Solution: First part of adding text properties.
+Files: Filelist, runtime/doc/Makefile, runtime/doc/eval.txt,
+ runtime/doc/textprop.txt, src/Make_all.mak, src/Make_cyg_ming.mak,
+ src/Make_mvc.mak, src/Makefile, src/buffer.c, src/edit.c,
+ src/evalfunc.c, src/feature.h, src/memline.c, src/misc1.c,
+ src/misc2.c, src/proto.h, src/proto/memline.pro,
+ src/proto/textprop.pro, src/screen.c, src/structs.h,
+ src/testdir/Make_all.mak, src/testdir/test_textprop.vim,
+ src/textprop.c, src/userfunc.c, src/version.c
+
+
+*** ../vim-8.1.0578/Filelist 2018-10-25 16:52:46.839887739 +0200
+--- Filelist 2018-12-13 19:59:08.647713430 +0100
+***************
+*** 91,96 ****
+--- 91,97 ----
+ src/terminal.c \
+ src/term.h \
+ src/termlib.c \
++ src/textprop.c \
+ src/ui.c \
+ src/undo.c \
+ src/userfunc.c \
+***************
+*** 198,203 ****
+--- 199,205 ----
+ src/proto/term.pro \
+ src/proto/terminal.pro \
+ src/proto/termlib.pro \
++ src/proto/textprop.pro \
+ src/proto/ui.pro \
+ src/proto/undo.pro \
+ src/proto/userfunc.pro \
+*** ../vim-8.1.0578/runtime/doc/Makefile 2017-11-24 20:49:13.000000000 +0100
+--- runtime/doc/Makefile 2018-12-13 20:01:21.774863565 +0100
+***************
+*** 102,107 ****
+--- 102,108 ----
+ tagsrch.txt \
+ term.txt \
+ terminal.txt \
++ textprop.txt \
+ tips.txt \
+ todo.txt \
+ uganda.txt \
+***************
+*** 238,243 ****
+--- 239,245 ----
+ tagsrch.html \
+ term.html \
+ terminal.html \
++ textprop.html \
+ tips.html \
+ todo.html \
+ uganda.html \
+*** ../vim-8.1.0578/runtime/doc/eval.txt 2018-11-22 03:07:30.940596247 +0100
+--- runtime/doc/eval.txt 2018-12-13 22:11:02.636894993 +0100
+***************
+*** 2300,2309 ****
+ pow({x}, {y}) Float {x} to the power of {y}
+ prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
+ printf({fmt}, {expr1}...) String format text
+- prompt_addtext({buf}, {expr}) none add text to a prompt buffer
+ prompt_setcallback({buf}, {expr}) none set prompt callback function
+ prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
+ prompt_setprompt({buf}, {text}) none set prompt text
+ pumvisible() Number whether popup menu is visible
+ pyeval({expr}) any evaluate |Python| expression
+ py3eval({expr}) any evaluate |python3| expression
+--- 2314,2338 ----
+ pow({x}, {y}) Float {x} to the power of {y}
+ prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
+ printf({fmt}, {expr1}...) String format text
+ prompt_setcallback({buf}, {expr}) none set prompt callback function
+ prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
+ prompt_setprompt({buf}, {text}) none set prompt text
++ prop_add({lnum}, {col}, {props}) none add a text property
++ prop_clear({lnum} [, {lnum_end} [, {bufnr}]])
++ none remove all text properties
++ prop_find({props} [, {direction}])
++ Dict search for a text property
++ prop_list({lnum} [, {props}) List text properties in {lnum}
++ prop_remove({props} [, {lnum} [, {lnum_end}]])
++ Number remove a text property
++ prop_type_add({name}, {props}) none define a new property type
++ prop_type_change({name}, {props})
++ none change an existing property type
++ prop_type_delete({name} [, {props}])
++ none delete a property type
++ prop_type_get([{name} [, {props}])
++ Dict get property type values
++ prop_type_list([{props}]) List get list of property types
+ pumvisible() Number whether popup menu is visible
+ pyeval({expr}) any evaluate |Python| expression
+ py3eval({expr}) any evaluate |python3| expression
+***************
+*** 6642,6647 ****
+--- 6673,6863 ----
+ The result is only visible if {buf} has 'buftype' set to
+ "prompt". Example: >
+ call prompt_setprompt(bufnr(''), 'command: ')
++ <
++ *prop_add()* *E965*
++ prop_add({lnum}, {col}, {props})
++ Attach a text property at position {lnum}, {col}. Use one for
++ the first column.
++ If {lnum} is invalid an error is given. *E966*
++ If {col} is invalid an error is given. *E964*
++
++ {props} is a dictionary with these fields:
++ "length" - length of text in characters, can only be
++ used for a property that does not
++ continue in another line
++ "end_lnum" - line number for end of text
++ "end_col" - column for end of text; not used when
++ "length" is present
++ "bufnr - buffer to add the property to; when
++ omitted the current buffer is used
++ "id" - user defined ID for the property; when
++ omitted zero is used
++ "type" - name of the text property type
++ All fields except "type" are optional.
++
++ It is an error when both "length" and "end_lnum" or "end_col"
++ are passed. Either use "length" or "end_col" for a property
++ within one line, or use "end_lnum" and "end_col" for a
++ property that spans more than one line.
++ When neither "length" or "end_col" are passed the property
++ will apply to one character.
++
++ "type" will first be looked up in the buffer the property is
++ added to. When not found, the global property types are used.
++ If not found an error is given.
++
++ See |text-properties| for information about text properties.
++
++
++ prop_clear({lnum} [, {lnum_end} [, {props}]]) *prop_clear()*
++ Remove all text properties from line {lnum}.
++ When {lnum_end} is given, remove all text properties from line
++ {lnum} to {lnum_end} (inclusive).
++
++ When {props} contains a "bufnr" item use this buffer,
++ otherwise use the current buffer.
++
++ See |text-properties| for information about text properties.
++
++ *prop_find()*
++ prop_find({props} [, {direction}])
++ NOT IMPLEMENTED YET
++ Search for a text property as specified with {props}:
++ "id" property with this ID
++ "type" property with this type name
++ "bufnr buffer to search in; when present a
++ start position with "lnum" and "col"
++ must be given; when omitted the
++ current buffer is used
++ "lnum" start in this line (when omitted start
++ at the cursor)
++ "col" start at this column (when omitted
++ and "lnum" is given: use column 1,
++ otherwise start at the cursor)
++ "skipstart" do not look for a match at the start
++ position
++
++ {direction} can be "f" for forward and "b" for backward. When
++ omitted forward search is performed.
++
++ If a match is found then a Dict is returned with the entries
++ as with prop_list(), and additionally an "lnum" entry.
++ If no match is found then an empty Dict is returned.
++
++ See |text-properties| for information about text properties.
++
++
++ prop_list({lnum} [, {props}]) *prop_list()*
++ Return a List with all text properties in line {lnum}.
++
++ When {props} contains a "bufnr" item, use this buffer instead
++ of the current buffer.
++
++ The properties are ordered by starting column and priority.
++ Each property is a Dict with these entries:
++ "col" starting column
++ "length" length in bytes
++ "id" property ID
++ "type" name of the property type, omitted if
++ the type was deleted
++ "start" when TRUE property starts in this line
++ "end" when TRUE property ends in this line
++
++ When "start" is zero the property started in a previous line,
++ the current one is a continuation.
++ When "end" is zero the property continues in the next line.
++ The line break after this line is included.
++
++ See |text-properties| for information about text properties.
++
++
++ *prop_remove()* *E968*
++ prop_remove({props} [, {lnum} [, {lnum_end}]])
++ Remove a matching text property from line {lnum}. When
++ {lnum_end} is given, remove matching text properties from line
++ {lnum} to {lnum_end} (inclusive).
++ When {lnum} is omitted remove matching text properties from
++ all lines.
++
++ {props} is a dictionary with these fields:
++ "id" - remove text properties with this ID
++ "type" - remove text properties with this type name
++ "bufnr" - use this buffer instead of the current one
++ "all" - when TRUE remove all matching text
++ properties, not just the first one
++ A property matches when either "id" or "type" matches.
++
++ Returns the number of properties that were removed.
++
++ See |text-properties| for information about text properties.
++
++
++ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
++ Add a text property type {name}. If a property type with this
++ name already exists an error is given.
++ {props} is a dictionary with these optional fields:
++ "bufnr" - define the property only for this
++ buffer; this avoids name collisions and
++ automatically clears the property types
++ when the buffer is deleted.
++ "highlight" - name of highlight group to use
++ "priority" - when a character has multiple text
++ properties the one with the highest
++ priority will be used; negative values
++ can be used, the default priority is
++ zero
++ "start_incl" - when TRUE inserts at the start
++ position will be included in the text
++ property
++ "end_incl" - when TRUE inserts at the end
++ position will be included in the text
++ property
++
++ See |text-properties| for information about text properties.
++
++
++ prop_type_change({name}, {props}) *prop_type_change()*
++ Change properties of an existing text property type. If a
++ property with this name does not exist an error is given.
++ The {props} argument is just like |prop_type_add()|.
++
++ See |text-properties| for information about text properties.
++
++
++ prop_type_delete({name} [, {props}]) *prop_type_delete()*
++ Remove the text property type {name}. When text properties
++ using the type {name} are still in place, they will not have
++ an effect and can no longer be removed by name.
++
++ {props} can contain a "bufnr" item. When it is given, delete
++ a property type from this buffer instead of from the global
++ property types.
++
++ When text property type {name} is not found there is no error.
++
++ See |text-properties| for information about text properties.
++
++
++ prop_type_get([{name} [, {props}]) *prop_type_get()*
++ Returns the properties of property type {name}. This is a
++ dictionary with the same fields as was given to
++ prop_type_add().
++ When the property type {name} does not exist, an empty
++ dictionary is returned.
++
++ {props} can contain a "bufnr" item. When it is given, use
++ this buffer instead of the global property types.
++
++ See |text-properties| for information about text properties.
++
++
++ prop_type_list([{props}]) *prop_type_list()*
++ Returns a list with all property type names.
++
++ {props} can contain a "bufnr" item. When it is given, use
++ this buffer instead of the global property types.
++
++ See |text-properties| for information about text properties.
+
+
+ pumvisible() *pumvisible()*
+*** ../vim-8.1.0578/runtime/doc/textprop.txt 2018-12-13 22:11:43.932591369 +0100
+--- runtime/doc/textprop.txt 2018-12-13 21:59:47.042285684 +0100
+***************
+*** 0 ****
+--- 1,114 ----
++ *textprop.txt* For Vim version 8.1. Last change: 2018 Dec 13
++
++
++ VIM REFERENCE MANUAL by Bram Moolenaar
++
++
++ Displaying text with properties attached. *text-properties*
++
++ THIS IS UNDER DEVELOPMENT - ANYTHING MAY STILL CHANGE *E967*
++
++ What is not working yet:
++ - Adjusting column/length when inserting text
++ - Text properties spanning more than one line
++ - prop_find()
++ - callbacks when text properties are outdated
++
++
++ 1. Introduction |text-prop-intro|
++ 2. Functions |text-prop-functions|
++
++
++ {Vi does not have text properties}
++ {not able to use text properties when the |+textprop| feature was
++ disabled at compile time}
++
++ ==============================================================================
++ 1. Introduction *text-prop-intro*
++
++ Text properties can be attached to text in a buffer. They will move with the
++ text: If lines are deleted or inserted the properties move with the text they
++ are attached to. Also when inserting/deleting text in the line before the
++ text property. And when inserting/deleting text inside the text property, it
++ will increase/decrease in size.
++
++ The main use for text properties is to highlight text. This can be seen as a
++ replacement for syntax highlighting. Instead of defining patterns to match
++ the text, the highlighting is set by a script, possibly using the output of an
++ external parser. This only needs to be done once, not every time when
++ redrawing the screen, thus can be much faster, after the initial cost of
++ attaching the text properties.
++
++ Text properties can also be used for other purposes to identify text. For
++ example, add a text property on a function name, so that a search can be
++ defined to jump to the next/previous function.
++
++ A text property is attached at a specific line and column, and has a specified
++ length. The property can span multiple lines.
++
++ A text property has these fields:
++ "id" a number to be used as desired
++ "type" the name of a property type
++
++
++ Property Types ~
++ *E971*
++ A text property normally has the name of a property type, which defines
++ how to highlight the text. The property type can have these entries:
++ "highlight" name of the highlight group to use
++ "priority" when properties overlap, the one with the highest
++ priority will be used.
++ "start_incl" when TRUE inserts at the start position will be
++ included in the text property
++ "end_incl" when TRUE inserts at the end position will be
++ included in the text property
++
++
++ Example ~
++
++ Suppose line 11 in a buffer has this text (excluding the indent):
++
++ The number 123 is smaller than 4567.
++
++ To highlight the numbers: >
++ call prop_type_add('number', {'highlight': 'Constant'})
++ call prop_add(11, 12, {'length': 3, 'type': 'number})
++ call prop_add(11, 32, {'length': 4, 'type': 'number})
++
++ Setting "start_incl" and "end_incl" is useful when white space surrounds the
++ text, e.g. for a function name. Using false is useful when the text starts
++ and/or ends with a specific character, such as the quote surrounding a string.
++
++ func FuncName(arg) ~
++ ^^^^^^^^ property with start_incl and end_incl set
++
++ var = "text"; ~
++ ^^^^^^ property with start_incl and end_incl not set
++
++ Nevertheless, when text is inserted or deleted the text may need to be parsed
++ and the text properties updated. But this can be done asynchrnously.
++
++ ==============================================================================
++ 2. Functions *text-prop-functions*
++
++ Manipulating text property types:
++
++ prop_type_add({name}, {props}) define a new property type
++ prop_type_change({name}, {props}) change an existing property type
++ prop_type_delete({name} [, {props}]) delete a property type
++ prop_type_get([{name} [, {props}]) get property type values
++ prop_type_list([{props}]) get list of property types
++
++
++ Manipulating text properties:
++
++ prop_add({lnum}, {col}, {props}) add a text property
++ prop_clear({lnum} [, {lnum_end} [, {bufnr}]])
++ remove all text properties
++ prop_find({props} [, {direction}]) search for a text property
++ prop_list({lnum} [, {props}) text properties in {lnum}
++ prop_remove({props} [, {lnum} [, {lnum_end}]])
++ remove a text property
++
++
++ vim:tw=78:ts=8:noet:ft=help:norl:
+*** ../vim-8.1.0578/src/Make_all.mak 2018-11-30 22:40:09.098211991 +0100
+--- src/Make_all.mak 2018-12-13 20:05:00.737457532 +0100
+***************
+*** 186,191 ****
+--- 186,192 ----
+ test_terminal_fail \
+ test_textformat \
+ test_textobjects \
++ test_textprop \
+ test_timers \
+ test_true_false \
+ test_undo \
+*** ../vim-8.1.0578/src/Make_cyg_ming.mak 2018-10-21 22:45:39.117688669 +0200
+--- src/Make_cyg_ming.mak 2018-12-13 20:06:02.481059654 +0100
+***************
+*** 751,756 ****
+--- 751,757 ----
+ $(OUTDIR)/syntax.o \
+ $(OUTDIR)/tag.o \
+ $(OUTDIR)/term.o \
++ $(OUTDIR)/textprop.o \
+ $(OUTDIR)/ui.o \
+ $(OUTDIR)/undo.o \
+ $(OUTDIR)/userfunc.o \
+***************
+*** 1090,1095 ****
+--- 1091,1099 ----
+ $(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS)
+ $(CC) -c $(CFLAGS) terminal.c -o $(OUTDIR)/terminal.o
+
++ $(OUTDIR)/textprop.o: textprop.c $(INCL)
++ $(CC) -c $(CFLAGS) textprop.c -o $(OUTDIR)/textprop.o
++
+
+ CCCTERM = $(CC) -c $(CFLAGS) -Ilibvterm/include -DINLINE="" \
+ -DVSNPRINTF=vim_vsnprintf \
+*** ../vim-8.1.0578/src/Make_mvc.mak 2018-11-12 21:42:20.678152930 +0100
+--- src/Make_mvc.mak 2018-12-13 20:07:31.472486033 +0100
+***************
+*** 754,759 ****
+--- 754,760 ----
+ $(OUTDIR)\syntax.obj \
+ $(OUTDIR)\tag.obj \
+ $(OUTDIR)\term.obj \
++ $(OUTDIR)\textprop.obj \
+ $(OUTDIR)\ui.obj \
+ $(OUTDIR)\undo.obj \
+ $(OUTDIR)\userfunc.obj \
+***************
+*** 1529,1534 ****
+--- 1530,1537 ----
+
+ $(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
+
++ $(OUTDIR)/textprop.obj: $(OUTDIR) textprop.c $(INCL)
++
+ $(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
+
+ $(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
+***************
+*** 1667,1672 ****
+--- 1670,1676 ----
+ proto/syntax.pro \
+ proto/tag.pro \
+ proto/term.pro \
++ proto/textprop.pro \
+ proto/ui.pro \
+ proto/undo.pro \
+ proto/userfunc.pro \
+*** ../vim-8.1.0578/src/Makefile 2018-12-12 20:34:06.072356129 +0100
+--- src/Makefile 2018-12-13 20:08:00.680336028 +0100
+***************
+*** 1577,1584 ****
+ # TAGS_INCL: include files used for make tags
+ # ALL_SRC: source files used for make depend and make lint
+
+- TAGS_INCL = *.h
+-
+ BASIC_SRC = \
+ arabic.c \
+ beval.c \
+--- 1579,1584 ----
+***************
+*** 1636,1641 ****
+--- 1636,1642 ----
+ tag.c \
+ term.c \
+ terminal.c \
++ textprop.c \
+ ui.c \
+ undo.c \
+ userfunc.c \
+***************
+*** 1657,1663 ****
+ $(WORKSHOP_SRC) \
+ $(WSDEBUG_SRC)
+
+! TAGS_SRC = *.c *.cpp if_perl.xs
+
+ EXTRA_SRC = hangulin.c if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \
+ if_python.c if_python3.c if_tcl.c if_ruby.c \
+--- 1658,1665 ----
+ $(WORKSHOP_SRC) \
+ $(WSDEBUG_SRC)
+
+! TAGS_SRC = *.c *.cpp $(PERL_SRC) $(TERM_SRC) $(XDIFF_SRC)
+! TAGS_INCL = *.h $(TERM_DEPS) $(XDIFF_INCL)
+
+ EXTRA_SRC = hangulin.c if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \
+ if_python.c if_python3.c if_tcl.c if_ruby.c \
+***************
+*** 1747,1752 ****
+--- 1749,1755 ----
+ objects/tag.o \
+ objects/term.o \
+ objects/terminal.o \
++ objects/textprop.o \
+ objects/ui.o \
+ objects/undo.o \
+ objects/userfunc.o \
+***************
+*** 1881,1886 ****
+--- 1884,1890 ----
+ term.pro \
+ terminal.pro \
+ termlib.pro \
++ textprop.pro \
+ ui.pro \
+ undo.pro \
+ userfunc.pro \
+***************
+*** 2092,2098 ****
+ # Motif and Athena GUI
+ # You can ignore error messages for missing files.
+ tags TAGS: notags
+! $(TAGPRG) $(TAGS_SRC) $(TAGS_INCL) $(TERM_SRC) $(TERM_DEPS)
+
+ # Make a highlight file for types. Requires Exuberant ctags and awk
+ types: types.vim
+--- 2096,2102 ----
+ # Motif and Athena GUI
+ # You can ignore error messages for missing files.
+ tags TAGS: notags
+! $(TAGPRG) $(TAGS_SRC) $(TAGS_INCL)
+
+ # Make a highlight file for types. Requires Exuberant ctags and awk
+ types: types.vim
+***************
+*** 3211,3216 ****
+--- 3215,3223 ----
+ objects/terminal.o: terminal.c $(TERM_DEPS)
+ $(CCC) -o $@ terminal.c
+
++ objects/textprop.o: textprop.c
++ $(CCC) -o $@ textprop.c
++
+ objects/ui.o: ui.c
+ $(CCC) -o $@ ui.c
+
+***************
+*** 3602,3607 ****
+--- 3609,3618 ----
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+ proto.h globals.h farsi.h arabic.h libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.h
++ objects/textprop.o: textprop.c vim.h protodef.h auto/config.h feature.h os_unix.h \
++ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
++ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
++ proto.h globals.h farsi.h arabic.h
+ objects/ui.o: ui.c vim.h protodef.h auto/config.h feature.h os_unix.h \
+ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
+ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
+*** ../vim-8.1.0578/src/buffer.c 2018-11-20 13:32:30.276983764 +0100
+--- src/buffer.c 2018-12-13 20:09:44.819785821 +0100
+***************
+*** 823,828 ****
+--- 823,831 ----
+ #ifdef FEAT_SYN_HL
+ syntax_clear(&buf->b_s); /* reset syntax info */
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ clear_buf_prop_types(buf);
++ #endif
+ buf->b_flags &= ~BF_READERR; /* a read error is no longer relevant */
+ }
+
+*** ../vim-8.1.0578/src/edit.c 2018-11-22 03:07:30.944596219 +0100
+--- src/edit.c 2018-12-13 20:09:58.939709543 +0100
+***************
+*** 10302,10307 ****
+--- 10302,10310 ----
+ if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG))
+ for (temp = i; --temp >= 0; )
+ replace_join(repl_off);
++ #ifdef FEAT_TEXT_PROP
++ curbuf->b_ml.ml_line_len -= i;
++ #endif
+ }
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+*** ../vim-8.1.0578/src/evalfunc.c 2018-12-08 13:57:38.553692769 +0100
+--- src/evalfunc.c 2018-12-13 22:04:35.855854438 +0100
+***************
+*** 772,777 ****
+--- 772,788 ----
+ {"prompt_setinterrupt", 2, 2, f_prompt_setinterrupt},
+ {"prompt_setprompt", 2, 2, f_prompt_setprompt},
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ {"prop_add", 3, 3, f_prop_add},
++ {"prop_clear", 1, 3, f_prop_clear},
++ {"prop_list", 1, 2, f_prop_list},
++ {"prop_remove", 2, 3, f_prop_remove},
++ {"prop_type_add", 2, 2, f_prop_type_add},
++ {"prop_type_change", 2, 2, f_prop_type_change},
++ {"prop_type_delete", 1, 2, f_prop_type_delete},
++ {"prop_type_get", 1, 2, f_prop_type_get},
++ {"prop_type_list", 0, 1, f_prop_type_list},
++ #endif
+ {"pumvisible", 0, 0, f_pumvisible},
+ #ifdef FEAT_PYTHON3
+ {"py3eval", 1, 1, f_py3eval},
+***************
+*** 6478,6483 ****
+--- 6489,6497 ----
+ #ifdef FEAT_TEXTOBJ
+ "textobjects",
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ "textprop",
++ #endif
+ #ifdef HAVE_TGETENT
+ "tgetent",
+ #endif
+*** ../vim-8.1.0578/src/ex_getln.c 2018-11-30 21:57:50.719861887 +0100
+--- src/ex_getln.c 2018-12-12 22:31:57.398336802 +0100
+***************
+*** 769,774 ****
+--- 769,789 ----
+ stuffcharReadbuff(*c);
+ *c = '\\';
+ }
++ #ifdef FEAT_MBYTE
++ // add any composing characters
++ if (mb_char2len(*c) != mb_ptr2len(ml_get_cursor()))
++ {
++ int save_c = *c;
++
++ while (mb_char2len(*c) != mb_ptr2len(ml_get_cursor()))
++ {
++ curwin->w_cursor.col += mb_char2len(*c);
++ *c = gchar_cursor();
++ stuffcharReadbuff(*c);
++ }
++ *c = save_c;
++ }
++ #endif
+ return FAIL;
+ }
+ }
+*** ../vim-8.1.0578/src/feature.h 2018-12-12 20:34:06.072356129 +0100
+--- src/feature.h 2018-12-13 20:12:33.566852272 +0100
+***************
+*** 502,507 ****
+--- 502,514 ----
+ #endif
+
+ /*
++ * +textprop Text properties
++ */
++ #if defined(FEAT_EVAL) && defined(FEAT_SYN_HL)
++ # define FEAT_TEXT_PROP
++ #endif
++
++ /*
+ * +spell spell checking
+ *
+ * Disabled for EBCDIC: * Doesn't work (SIGSEGV).
+*** ../vim-8.1.0578/src/memline.c 2018-10-30 22:15:51.591158966 +0100
+--- src/memline.c 2018-12-13 20:17:24.645156343 +0100
+***************
+*** 2487,2493 ****
+ {
+ bhdr_T *hp;
+ DATA_BL *dp;
+- char_u *ptr;
+ static int recursive = 0;
+
+ if (lnum > buf->b_ml.ml_line_count) /* invalid line number */
+--- 2487,2492 ----
+***************
+*** 2518,2523 ****
+--- 2517,2526 ----
+ */
+ if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
+ {
++ unsigned start, end;
++ colnr_T len;
++ int idx;
++
+ ml_flush_line(buf);
+
+ /*
+***************
+*** 2540,2547 ****
+
+ dp = (DATA_BL *)(hp->bh_data);
+
+! ptr = (char_u *)dp + ((dp->db_index[lnum - buf->b_ml.ml_locked_low]) & DB_INDEX_MASK);
+! buf->b_ml.ml_line_ptr = ptr;
+ buf->b_ml.ml_line_lnum = lnum;
+ buf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
+ }
+--- 2543,2560 ----
+
+ dp = (DATA_BL *)(hp->bh_data);
+
+! idx = lnum - buf->b_ml.ml_locked_low;
+! start = ((dp->db_index[idx]) & DB_INDEX_MASK);
+! // The text ends where the previous line starts. The first line ends
+! // at the end of the block.
+! if (idx == 0)
+! end = dp->db_txt_end;
+! else
+! end = ((dp->db_index[idx - 1]) & DB_INDEX_MASK);
+! len = end - start;
+!
+! buf->b_ml.ml_line_ptr = (char_u *)dp + start;
+! buf->b_ml.ml_line_len = len;
+ buf->b_ml.ml_line_lnum = lnum;
+ buf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
+ }
+***************
+*** 2614,2633 ****
+ static int
+ ml_append_int(
+ buf_T *buf,
+! linenr_T lnum, /* append after this line (can be 0) */
+! char_u *line, /* text of the new line */
+! colnr_T len, /* length of line, including NUL, or 0 */
+! int newfile, /* flag, see above */
+! int mark) /* mark the new line */
+ {
+ int i;
+! int line_count; /* number of indexes in current block */
+ int offset;
+ int from, to;
+! int space_needed; /* space needed for new line */
+ int page_size;
+ int page_count;
+! int db_idx; /* index for lnum in data block */
+ bhdr_T *hp;
+ memfile_T *mfp;
+ DATA_BL *dp;
+--- 2627,2647 ----
+ static int
+ ml_append_int(
+ buf_T *buf,
+! linenr_T lnum, // append after this line (can be 0)
+! char_u *line, // text of the new line
+! colnr_T len_arg, // length of line, including NUL, or 0
+! int newfile, // flag, see above
+! int mark) // mark the new line
+ {
++ colnr_T len = len_arg; // length of line, including NUL, or 0
+ int i;
+! int line_count; // number of indexes in current block
+ int offset;
+ int from, to;
+! int space_needed; // space needed for new line
+ int page_size;
+ int page_count;
+! int db_idx; // index for lnum in data block
+ bhdr_T *hp;
+ memfile_T *mfp;
+ DATA_BL *dp;
+***************
+*** 2642,2649 ****
+ lowest_marked = lnum + 1;
+
+ if (len == 0)
+! len = (colnr_T)STRLEN(line) + 1; /* space needed for the text */
+! space_needed = len + INDEX_SIZE; /* space needed for text + index */
+
+ mfp = buf->b_ml.ml_mfp;
+ page_size = mfp->mf_page_size;
+--- 2656,2663 ----
+ lowest_marked = lnum + 1;
+
+ if (len == 0)
+! len = (colnr_T)STRLEN(line) + 1; // space needed for the text
+! space_needed = len + INDEX_SIZE; // space needed for text + index
+
+ mfp = buf->b_ml.ml_mfp;
+ page_size = mfp->mf_page_size;
+***************
+*** 2728,2734 ****
+ dp->db_index[i + 1] = dp->db_index[i] - len;
+ dp->db_index[db_idx + 1] = offset - len;
+ }
+! else /* add line at the end */
+ dp->db_index[db_idx + 1] = dp->db_txt_start;
+
+ /*
+--- 2742,2749 ----
+ dp->db_index[i + 1] = dp->db_index[i] - len;
+ dp->db_index[db_idx + 1] = offset - len;
+ }
+! else
+! // add line at the end (which is the start of the text)
+ dp->db_index[db_idx + 1] = dp->db_txt_start;
+
+ /*
+***************
+*** 3128,3133 ****
+--- 3143,3161 ----
+ int
+ ml_replace(linenr_T lnum, char_u *line, int copy)
+ {
++ colnr_T len = -1;
++
++ if (line != NULL)
++ len = STRLEN(line);
++ return ml_replace_len(lnum, line, len, copy);
++ }
++
++ int
++ ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int copy)
++ {
++ char_u *line = line_arg;
++ colnr_T len = len_arg;
++
+ if (line == NULL) /* just checking... */
+ return FAIL;
+
+***************
+*** 3135,3141 ****
+ if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL, 0) == FAIL)
+ return FAIL;
+
+! if (copy && (line = vim_strsave(line)) == NULL) /* allocate memory */
+ return FAIL;
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+--- 3163,3169 ----
+ if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL, 0) == FAIL)
+ return FAIL;
+
+! if (copy && (line = vim_strnsave(line, len)) == NULL) /* allocate memory */
+ return FAIL;
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+***************
+*** 3144,3154 ****
+ netbeans_inserted(curbuf, lnum, 0, line, (int)STRLEN(line));
+ }
+ #endif
+! if (curbuf->b_ml.ml_line_lnum != lnum) /* other line buffered */
+! ml_flush_line(curbuf); /* flush it */
+! else if (curbuf->b_ml.ml_flags & ML_LINE_DIRTY) /* same line allocated */
+ vim_free(curbuf->b_ml.ml_line_ptr); /* free it */
+ curbuf->b_ml.ml_line_ptr = line;
+ curbuf->b_ml.ml_line_lnum = lnum;
+ curbuf->b_ml.ml_flags = (curbuf->b_ml.ml_flags | ML_LINE_DIRTY) & ~ML_EMPTY;
+
+--- 3172,3219 ----
+ netbeans_inserted(curbuf, lnum, 0, line, (int)STRLEN(line));
+ }
+ #endif
+! if (curbuf->b_ml.ml_line_lnum != lnum)
+! {
+! // another line is buffered, flush it
+! ml_flush_line(curbuf);
+!
+! #ifdef FEAT_TEXT_PROP
+! curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
+! if (has_any_text_properties(curbuf))
+! // Need to fetch the old line to copy over any text properties.
+! ml_get_buf(curbuf, lnum, TRUE);
+! #endif
+! }
+!
+! #ifdef FEAT_TEXT_PROP
+! if (has_any_text_properties(curbuf))
+! {
+! size_t oldtextlen = STRLEN(curbuf->b_ml.ml_line_ptr) + 1;
+!
+! if (oldtextlen < (size_t)curbuf->b_ml.ml_line_len)
+! {
+! char_u *newline;
+! size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
+!
+! // Need to copy over text properties, stored after the text.
+! newline = alloc(len + 1 + textproplen);
+! if (newline != NULL)
+! {
+! mch_memmove(newline, line, len + 1);
+! mch_memmove(newline + len + 1, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen);
+! vim_free(line);
+! line = newline;
+! len += textproplen;
+! }
+! }
+! }
+! #endif
+!
+! if (curbuf->b_ml.ml_flags & ML_LINE_DIRTY) /* same line allocated */
+ vim_free(curbuf->b_ml.ml_line_ptr); /* free it */
++
+ curbuf->b_ml.ml_line_ptr = line;
++ curbuf->b_ml.ml_line_len = len + 1;
+ curbuf->b_ml.ml_line_lnum = lnum;
+ curbuf->b_ml.ml_flags = (curbuf->b_ml.ml_flags | ML_LINE_DIRTY) & ~ML_EMPTY;
+
+***************
+*** 3490,3496 ****
+ old_len = dp->db_txt_end - start;
+ else /* text of previous line follows */
+ old_len = (dp->db_index[idx - 1] & DB_INDEX_MASK) - start;
+! new_len = (colnr_T)STRLEN(new_line) + 1;
+ extra = new_len - old_len; /* negative if lines gets smaller */
+
+ /*
+--- 3555,3561 ----
+ old_len = dp->db_txt_end - start;
+ else /* text of previous line follows */
+ old_len = (dp->db_index[idx - 1] & DB_INDEX_MASK) - start;
+! new_len = buf->b_ml.ml_line_len;
+ extra = new_len - old_len; /* negative if lines gets smaller */
+
+ /*
+***************
+*** 5009,5016 ****
+ */
+ buf->b_ml.ml_usedchunks = 1;
+ buf->b_ml.ml_chunksize[0].mlcs_numlines = 1;
+! buf->b_ml.ml_chunksize[0].mlcs_totalsize =
+! (long)STRLEN(buf->b_ml.ml_line_ptr) + 1;
+ return;
+ }
+
+--- 5074,5080 ----
+ */
+ buf->b_ml.ml_usedchunks = 1;
+ buf->b_ml.ml_chunksize[0].mlcs_numlines = 1;
+! buf->b_ml.ml_chunksize[0].mlcs_totalsize = (long)buf->b_ml.ml_line_len;
+ return;
+ }
+
+*** ../vim-8.1.0578/src/misc1.c 2018-12-09 15:00:47.985798600 +0100
+--- src/misc1.c 2018-12-13 20:18:19.228829748 +0100
+***************
+*** 2631,2639 ****
+ {
+ char_u *oldp, *newp;
+ colnr_T oldlen;
+ linenr_T lnum = curwin->w_cursor.lnum;
+ colnr_T col = curwin->w_cursor.col;
+! int was_alloced;
+ long movelen;
+ int fixpos = fixpos_arg;
+
+--- 2631,2640 ----
+ {
+ char_u *oldp, *newp;
+ colnr_T oldlen;
++ colnr_T newlen;
+ linenr_T lnum = curwin->w_cursor.lnum;
+ colnr_T col = curwin->w_cursor.col;
+! int alloc_newp;
+ long movelen;
+ int fixpos = fixpos_arg;
+
+***************
+*** 2710,2715 ****
+--- 2711,2717 ----
+ count = oldlen - col;
+ movelen = 1;
+ }
++ newlen = oldlen - count;
+
+ /*
+ * If the old line has been allocated the deletion can be done in the
+***************
+*** 2720,2743 ****
+ */
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+! was_alloced = FALSE;
+ else
+ #endif
+! was_alloced = ml_line_alloced(); /* check if oldp was allocated */
+! if (was_alloced)
+! newp = oldp; /* use same allocated memory */
+ else
+! { /* need to allocate a new line */
+! newp = alloc((unsigned)(oldlen + 1 - count));
+ if (newp == NULL)
+ return FAIL;
+ mch_memmove(newp, oldp, (size_t)col);
+ }
+ mch_memmove(newp + col, oldp + col + count, (size_t)movelen);
+! if (!was_alloced)
+ ml_replace(lnum, newp, FALSE);
+
+! /* mark the buffer as changed and prepare for displaying */
+ changed_bytes(lnum, curwin->w_cursor.col);
+
+ return OK;
+--- 2722,2755 ----
+ */
+ #ifdef FEAT_NETBEANS_INTG
+ if (netbeans_active())
+! alloc_newp = TRUE;
+ else
+ #endif
+! alloc_newp = !ml_line_alloced(); // check if oldp was allocated
+! if (!alloc_newp)
+! newp = oldp; // use same allocated memory
+ else
+! { // need to allocate a new line
+! newp = alloc((unsigned)(newlen + 1));
+ if (newp == NULL)
+ return FAIL;
+ mch_memmove(newp, oldp, (size_t)col);
+ }
+ mch_memmove(newp + col, oldp + col + count, (size_t)movelen);
+! if (alloc_newp)
+ ml_replace(lnum, newp, FALSE);
++ #ifdef FEAT_TEXT_PROP
++ else
++ {
++ // Also move any following text properties.
++ if (oldlen + 1 < curbuf->b_ml.ml_line_len)
++ mch_memmove(newp + newlen + 1, oldp + oldlen + 1,
++ (size_t)curbuf->b_ml.ml_line_len - oldlen - 1);
++ curbuf->b_ml.ml_line_len -= count;
++ }
++ #endif
+
+! // mark the buffer as changed and prepare for displaying
+ changed_bytes(lnum, curwin->w_cursor.col);
+
+ return OK;
+*** ../vim-8.1.0578/src/misc2.c 2018-11-11 15:20:32.436704418 +0100
+--- src/misc2.c 2018-12-13 20:19:36.988360977 +0100
+***************
+*** 1191,1196 ****
+--- 1191,1199 ----
+ # ifdef FEAT_CMDHIST
+ init_history();
+ # endif
++ #ifdef FEAT_TEXT_PROP
++ clear_global_prop_types();
++ #endif
+
+ #ifdef FEAT_QUICKFIX
+ {
+*** ../vim-8.1.0578/src/proto.h 2018-07-01 16:43:59.850736541 +0200
+--- src/proto.h 2018-12-13 20:19:51.208274841 +0100
+***************
+*** 183,188 ****
+--- 183,191 ----
+ # if defined(HAVE_TGETENT) && (defined(AMIGA) || defined(VMS))
+ # include "termlib.pro"
+ # endif
++ # ifdef FEAT_TEXT_PROP
++ # include "textprop.pro"
++ # endif
+ # include "ui.pro"
+ # include "undo.pro"
+ # include "userfunc.pro"
+*** ../vim-8.1.0578/src/proto/memline.pro 2018-08-21 20:28:49.888006612 +0200
+--- src/proto/memline.pro 2018-12-13 20:20:02.860204177 +0100
+***************
+*** 24,29 ****
+--- 24,30 ----
+ int ml_append(linenr_T lnum, char_u *line, colnr_T len, int newfile);
+ int ml_append_buf(buf_T *buf, linenr_T lnum, char_u *line, colnr_T len, int newfile);
+ int ml_replace(linenr_T lnum, char_u *line, int copy);
++ int ml_replace_len(linenr_T lnum, char_u *line_arg, colnr_T len_arg, int copy);
+ int ml_delete(linenr_T lnum, int message);
+ void ml_setmarked(linenr_T lnum);
+ linenr_T ml_firstmarked(void);
+*** ../vim-8.1.0578/src/proto/textprop.pro 2018-12-13 22:11:44.012590783 +0100
+--- src/proto/textprop.pro 2018-12-13 20:25:39.330136512 +0100
+***************
+*** 0 ****
+--- 1,17 ----
++ /* textprop.c */
++ void f_prop_add(typval_T *argvars, typval_T *rettv);
++ int has_any_text_properties(buf_T *buf);
++ int get_text_props(buf_T *buf, linenr_T lnum, char_u **props, int will_change);
++ proptype_T *text_prop_type_by_id(buf_T *buf, int id);
++ void f_prop_clear(typval_T *argvars, typval_T *rettv);
++ void f_prop_list(typval_T *argvars, typval_T *rettv);
++ void f_prop_remove(typval_T *argvars, typval_T *rettv);
++ void prop_type_set(typval_T *argvars, int add);
++ void f_prop_type_add(typval_T *argvars, typval_T *rettv);
++ void f_prop_type_change(typval_T *argvars, typval_T *rettv);
++ void f_prop_type_delete(typval_T *argvars, typval_T *rettv);
++ void f_prop_type_get(typval_T *argvars, typval_T *rettv);
++ void f_prop_type_list(typval_T *argvars, typval_T *rettv);
++ void clear_global_prop_types(void);
++ void clear_buf_prop_types(buf_T *buf);
++ /* vim: set ft=c : */
+*** ../vim-8.1.0578/src/screen.c 2018-11-16 16:21:01.633310065 +0100
+--- src/screen.c 2018-12-13 20:20:43.287958416 +0100
+***************
+*** 3128,3133 ****
+--- 3128,3142 ----
+ int draw_color_col = FALSE; /* highlight colorcolumn */
+ int *color_cols = NULL; /* pointer to according columns array */
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ int text_prop_count;
++ int text_prop_next = 0; // next text property to use
++ textprop_T *text_props = NULL;
++ int *text_prop_idxs = NULL;
++ int text_props_active = 0;
++ proptype_T *text_prop_type = NULL;
++ int text_prop_attr = 0;
++ #endif
+ #ifdef FEAT_SPELL
+ int has_spell = FALSE; /* this buffer has spell checking */
+ # define SPWORDLEN 150
+***************
+*** 3144,3150 ****
+ static linenr_T capcol_lnum = 0; /* line number where "cap_col" used */
+ int cur_checked_col = 0; /* checked column for current line */
+ #endif
+! int extra_check = 0; // has syntax or linebreak
+ #ifdef FEAT_MBYTE
+ int multi_attr = 0; /* attributes desired by multibyte */
+ int mb_l = 1; /* multi-byte byte length */
+--- 3153,3159 ----
+ static linenr_T capcol_lnum = 0; /* line number where "cap_col" used */
+ int cur_checked_col = 0; /* checked column for current line */
+ #endif
+! int extra_check = 0; // has extra highlighting
+ #ifdef FEAT_MBYTE
+ int multi_attr = 0; /* attributes desired by multibyte */
+ int mb_l = 1; /* multi-byte byte length */
+***************
+*** 3784,3789 ****
+--- 3793,3822 ----
+ }
+ #endif
+
++ #ifdef FEAT_TEXT_PROP
++ {
++ char_u *prop_start;
++
++ text_prop_count = get_text_props(wp->w_buffer, lnum,
++ &prop_start, FALSE);
++ if (text_prop_count > 0)
++ {
++ // Make a copy of the properties, so that they are properly
++ // aligned.
++ text_props = (textprop_T *)alloc(
++ text_prop_count * sizeof(textprop_T));
++ if (text_props != NULL)
++ mch_memmove(text_props, prop_start,
++ text_prop_count * sizeof(textprop_T));
++
++ // Allocate an array for the indexes.
++ text_prop_idxs = (int *)alloc(text_prop_count * sizeof(int));
++ area_highlighting = TRUE;
++ extra_check = TRUE;
++ }
++ }
++ #endif
++
+ off = (unsigned)(current_ScreenLine - ScreenLines);
+ col = 0;
+ #ifdef FEAT_RIGHTLEFT
+***************
+*** 4283,4288 ****
+--- 4316,4326 ----
+ else
+ {
+ attr_pri = FALSE;
++ #ifdef FEAT_TEXT_PROP
++ if (text_prop_type != NULL)
++ char_attr = text_prop_attr;
++ else
++ #endif
+ #ifdef FEAT_SYN_HL
+ if (has_syntax)
+ char_attr = syntax_attr;
+***************
+*** 4663,4668 ****
+--- 4701,4766 ----
+ }
+ #endif
+
++ #ifdef FEAT_TEXT_PROP
++ if (text_props != NULL)
++ {
++ int pi;
++
++ // Check if any active property ends.
++ for (pi = 0; pi < text_props_active; ++pi)
++ {
++ int tpi = text_prop_idxs[pi];
++
++ if (col >= text_props[tpi].tp_col - 1
++ + text_props[tpi].tp_len)
++ {
++ if (pi + 1 < text_props_active)
++ mch_memmove(text_prop_idxs + pi,
++ text_prop_idxs + pi + 1,
++ sizeof(int)
++ * (text_props_active - (pi + 1)));
++ --text_props_active;
++ --pi;
++ }
++ }
++
++ // Add any text property that starts in this column.
++ while (text_prop_next < text_prop_count
++ && col >= text_props[text_prop_next].tp_col - 1)
++ text_prop_idxs[text_props_active++] = text_prop_next++;
++
++ text_prop_type = NULL;
++ if (text_props_active > 0)
++ {
++ int max_priority = INT_MIN;
++ int max_col = 0;
++
++ // Get the property type with the highest priority
++ // and/or starting last.
++ for (pi = 0; pi < text_props_active; ++pi)
++ {
++ int tpi = text_prop_idxs[pi];
++ proptype_T *pt;
++
++ pt = text_prop_type_by_id(
++ curwin->w_buffer, text_props[tpi].tp_type);
++ if (pt != NULL
++ && (pt->pt_priority > max_priority
++ || (pt->pt_priority == max_priority
++ && text_props[tpi].tp_col >= max_col)))
++ {
++ text_prop_type = pt;
++ max_priority = pt->pt_priority;
++ max_col = text_props[tpi].tp_col;
++ }
++ }
++ if (text_prop_type != NULL)
++ text_prop_attr =
++ syn_id2attr(text_prop_type->pt_hl_id);
++ }
++ }
++ #endif
++
+ #ifdef FEAT_SPELL
+ /* Check spelling (unless at the end of the line).
+ * Only do this when there is no syntax highlighting, the
+***************
+*** 6025,6030 ****
+--- 6123,6132 ----
+ cap_col = 0;
+ }
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ vim_free(text_props);
++ vim_free(text_prop_idxs);
++ #endif
+
+ vim_free(p_extra_free);
+ return row;
+*** ../vim-8.1.0578/src/structs.h 2018-11-10 17:33:23.087518814 +0100
+--- src/structs.h 2018-12-13 20:21:41.959600249 +0100
+***************
+*** 684,689 ****
+--- 684,690 ----
+
+ linenr_T ml_line_lnum; /* line number of cached line, 0 if not valid */
+ char_u *ml_line_ptr; /* pointer to cached line */
++ colnr_T ml_line_len; /* length of the cached line, including NUL */
+
+ bhdr_T *ml_locked; /* block used by last ml_get */
+ linenr_T ml_locked_low; /* first line in ml_locked */
+***************
+*** 696,701 ****
+--- 697,737 ----
+ #endif
+ } memline_T;
+
++
++ /*
++ * Structure defining text properties. These stick with the text.
++ * When stored in memline they are after the text, ml_line_len is larger than
++ * STRLEN(ml_line_ptr) + 1.
++ */
++ typedef struct textprop_S
++ {
++ colnr_T tp_col; // start column
++ colnr_T tp_len; // length in bytes
++ int tp_id; // identifier
++ int tp_type; // property type
++ int tp_flags; // TP_FLAG_ values
++ } textprop_T;
++
++ #define TP_FLAG_CONT_NEXT 1 // property continues in next line
++ #define TP_FLAG_CONT_PREV 2 // property was continued from prev line
++
++ /*
++ * Structure defining a property type.
++ */
++ typedef struct proptype_S
++ {
++ int pt_id; // value used for tp_id
++ int pt_type; // number used for tp_type
++ int pt_hl_id; // highlighting
++ int pt_priority; // priority
++ int pt_flags; // PT_FLAG_ values
++ char_u pt_name[1]; // property type name, actually longer
++ } proptype_T;
++
++ #define PT_FLAG_INS_START_INCL 1 // insert at start included in property
++ #define PT_FLAG_INS_END_INCL 2 // insert at end included in property
++
++
+ #if defined(FEAT_SIGNS) || defined(PROTO)
+ typedef struct signlist signlist_T;
+
+***************
+*** 2358,2363 ****
+--- 2394,2402 ----
+ dictitem_T b_bufvar; /* variable for "b:" Dictionary */
+ dict_T *b_vars; /* internal variables, local to buffer */
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ hashtab_T *b_proptypes; /* text property types local to buffer */
++ #endif
+
+ #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
+ char_u *b_p_bexpr; /* 'balloonexpr' local value */
+*** ../vim-8.1.0578/src/testdir/Make_all.mak 2018-11-30 22:40:09.098211991 +0100
+--- src/testdir/Make_all.mak 2018-12-13 20:22:10.699424209 +0100
+***************
+*** 177,182 ****
+--- 177,183 ----
+ test_terminal_fail.res \
+ test_textformat.res \
+ test_textobjects.res \
++ test_textprop.res \
+ test_undo.res \
+ test_user_func.res \
+ test_usercommands.res \
+*** ../vim-8.1.0578/src/testdir/test_textprop.vim 2018-12-13 22:12:34.396222668 +0100
+--- src/testdir/test_textprop.vim 2018-12-13 22:05:57.999204140 +0100
+***************
+*** 0 ****
+--- 1,200 ----
++ " Tests for defining text property types and adding text properties to the
++ " buffer.
++
++ if !has('textprop')
++ finish
++ endif
++
++ func Test_proptype_global()
++ call prop_type_add('comment', {'highlight': 'Directory', 'priority': 123, 'start_incl': 1, 'end_incl': 1})
++ let proptypes = prop_type_list()
++ call assert_equal(1, len(proptypes))
++ call assert_equal('comment', proptypes[0])
++
++ let proptype = prop_type_get('comment')
++ call assert_equal('Directory', proptype['highlight'])
++ call assert_equal(123, proptype['priority'])
++ call assert_equal(1, proptype['start_incl'])
++ call assert_equal(1, proptype['end_incl'])
++
++ call prop_type_delete('comment')
++ call assert_equal(0, len(prop_type_list()))
++
++ call prop_type_add('one', {})
++ call assert_equal(1, len(prop_type_list()))
++ let proptype = prop_type_get('one')
++ call assert_false(has_key(proptype, 'highlight'))
++ call assert_equal(0, proptype['priority'])
++ call assert_equal(0, proptype['start_incl'])
++ call assert_equal(0, proptype['end_incl'])
++
++ call prop_type_add('two', {})
++ call assert_equal(2, len(prop_type_list()))
++ call prop_type_delete('one')
++ call assert_equal(1, len(prop_type_list()))
++ call prop_type_delete('two')
++ call assert_equal(0, len(prop_type_list()))
++ endfunc
++
++ func Test_proptype_buf()
++ let bufnr = bufnr('')
++ call prop_type_add('comment', {'bufnr': bufnr, 'highlight': 'Directory', 'priority': 123, 'start_incl': 1, 'end_incl': 1})
++ let proptypes = prop_type_list({'bufnr': bufnr})
++ call assert_equal(1, len(proptypes))
++ call assert_equal('comment', proptypes[0])
++
++ let proptype = prop_type_get('comment', {'bufnr': bufnr})
++ call assert_equal('Directory', proptype['highlight'])
++ call assert_equal(123, proptype['priority'])
++ call assert_equal(1, proptype['start_incl'])
++ call assert_equal(1, proptype['end_incl'])
++
++ call prop_type_delete('comment', {'bufnr': bufnr})
++ call assert_equal(0, len(prop_type_list({'bufnr': bufnr})))
++
++ call prop_type_add('one', {'bufnr': bufnr})
++ let proptype = prop_type_get('one', {'bufnr': bufnr})
++ call assert_false(has_key(proptype, 'highlight'))
++ call assert_equal(0, proptype['priority'])
++ call assert_equal(0, proptype['start_incl'])
++ call assert_equal(0, proptype['end_incl'])
++
++ call prop_type_add('two', {'bufnr': bufnr})
++ call assert_equal(2, len(prop_type_list({'bufnr': bufnr})))
++ call prop_type_delete('one', {'bufnr': bufnr})
++ call assert_equal(1, len(prop_type_list({'bufnr': bufnr})))
++ call prop_type_delete('two', {'bufnr': bufnr})
++ call assert_equal(0, len(prop_type_list({'bufnr': bufnr})))
++ endfunc
++
++ func AddPropTypes()
++ call prop_type_add('one', {})
++ call prop_type_add('two', {})
++ call prop_type_add('three', {})
++ call prop_type_add('whole', {})
++ endfunc
++
++ func DeletePropTypes()
++ call prop_type_delete('one')
++ call prop_type_delete('two')
++ call prop_type_delete('three')
++ call prop_type_delete('whole')
++ endfunc
++
++ func SetupPropsInFirstLine()
++ call setline(1, 'one two three')
++ call prop_add(1, 1, {'length': 3, 'id': 11, 'type': 'one'})
++ call prop_add(1, 5, {'length': 3, 'id': 12, 'type': 'two'})
++ call prop_add(1, 8, {'length': 5, 'id': 13, 'type': 'three'})
++ call prop_add(1, 1, {'length': 13, 'id': 14, 'type': 'whole'})
++ endfunc
++
++ let s:expected_props = [{'col': 1, 'length': 13, 'id': 14, 'type': 'whole', 'start': 1, 'end': 1},
++ \ {'col': 1, 'length': 3, 'id': 11, 'type': 'one', 'start': 1, 'end': 1},
++ \ {'col': 5, 'length': 3, 'id': 12, 'type': 'two', 'start': 1, 'end': 1},
++ \ {'col': 8, 'length': 5, 'id': 13, 'type': 'three', 'start': 1, 'end': 1},
++ \ ]
++
++ func Test_prop_add()
++ new
++ call AddPropTypes()
++ call SetupPropsInFirstLine()
++ call assert_equal(s:expected_props, prop_list(1))
++ call assert_fails("call prop_add(10, 1, {'length': 1, 'id': 14, 'type': 'whole'})", 'E966:')
++ call assert_fails("call prop_add(1, 22, {'length': 1, 'id': 14, 'type': 'whole'})", 'E964:')
++
++ " Insert a line above, text props must still be there.
++ call append(0, 'empty')
++ call assert_equal(s:expected_props, prop_list(2))
++ " Delete a line above, text props must still be there.
++ 1del
++ call assert_equal(s:expected_props, prop_list(1))
++
++ call DeletePropTypes()
++ bwipe!
++ endfunc
++
++ func Test_prop_remove()
++ new
++ call AddPropTypes()
++ call SetupPropsInFirstLine()
++ let props = deepcopy(s:expected_props)
++ call assert_equal(props, prop_list(1))
++
++ " remove by id
++ call prop_remove({'id': 12}, 1)
++ unlet props[2]
++ call assert_equal(props, prop_list(1))
++
++ " remove by type
++ call prop_remove({'type': 'one'}, 1)
++ unlet props[1]
++ call assert_equal(props, prop_list(1))
++
++ call DeletePropTypes()
++ bwipe!
++ endfunc
++
++ func Test_prop_add_remove_buf()
++ new
++ let bufnr = bufnr('')
++ call AddPropTypes()
++ call setline(1, 'one two three')
++ wincmd w
++ call prop_add(1, 1, {'length': 3, 'id': 11, 'type': 'one', 'bufnr': bufnr})
++ call prop_add(1, 5, {'length': 3, 'id': 12, 'type': 'two', 'bufnr': bufnr})
++ call prop_add(1, 11, {'length': 3, 'id': 13, 'type': 'three', 'bufnr': bufnr})
++
++ let props = [
++ \ {'col': 1, 'length': 3, 'id': 11, 'type': 'one', 'start': 1, 'end': 1},
++ \ {'col': 5, 'length': 3, 'id': 12, 'type': 'two', 'start': 1, 'end': 1},
++ \ {'col': 11, 'length': 3, 'id': 13, 'type': 'three', 'start': 1, 'end': 1},
++ \]
++ call assert_equal(props, prop_list(1, {'bufnr': bufnr}))
++
++ " remove by id
++ call prop_remove({'id': 12, 'bufnr': bufnr}, 1)
++ unlet props[1]
++ call assert_equal(props, prop_list(1, {'bufnr': bufnr}))
++
++ " remove by type
++ call prop_remove({'type': 'one', 'bufnr': bufnr}, 1)
++ unlet props[0]
++ call assert_equal(props, prop_list(1, {'bufnr': bufnr}))
++
++ call DeletePropTypes()
++ wincmd w
++ bwipe!
++ endfunc
++
++
++ func Test_prop_clear()
++ new
++ call AddPropTypes()
++ call SetupPropsInFirstLine()
++ call assert_equal(s:expected_props, prop_list(1))
++
++ call prop_clear(1)
++ call assert_equal([], prop_list(1))
++
++ call DeletePropTypes()
++ bwipe!
++ endfunc
++
++ func Test_prop_clear_buf()
++ new
++ call AddPropTypes()
++ call SetupPropsInFirstLine()
++ let bufnr = bufnr('')
++ wincmd w
++ call assert_equal(s:expected_props, prop_list(1, {'bufnr': bufnr}))
++
++ call prop_clear(1, 1, {'bufnr': bufnr})
++ call assert_equal([], prop_list(1, {'bufnr': bufnr}))
++
++ wincmd w
++ call DeletePropTypes()
++ bwipe!
++ endfunc
++
++ " TODO: screenshot test with highlighting
+*** ../vim-8.1.0578/src/textprop.c 2018-12-13 22:12:34.400222638 +0100
+--- src/textprop.c 2018-12-13 22:08:34.554000272 +0100
+***************
+*** 0 ****
+--- 1,869 ----
++ /* vi:set ts=8 sts=4 sw=4 noet:
++ *
++ * VIM - Vi IMproved by Bram Moolenaar
++ *
++ * Do ":help uganda" in Vim to read copying and usage conditions.
++ * Do ":help credits" in Vim to see a list of people who contributed.
++ * See README.txt for an overview of the Vim source code.
++ */
++
++ /*
++ * Text properties implementation.
++ *
++ * Text properties are attached to the text. They move with the text when
++ * text is inserted/deleted.
++ *
++ * Text properties have a user specified ID number, which can be unique.
++ * Text properties have a type, which can be used to specify highlighting.
++ *
++ * TODO:
++ * - Add an arrray for global_proptypes, to quickly lookup a proptype by ID
++ * - Add an arrray for b_proptypes, to quickly lookup a proptype by ID
++ * - adjust property column when text is inserted/deleted
++ * - support properties that continue over a line break
++ * - add mechanism to keep track of changed lines.
++ */
++
++ #include "vim.h"
++
++ #if defined(FEAT_TEXT_PROP) || defined(PROTO)
++
++ /*
++ * In a hashtable item "hi_key" points to "pt_name" in a proptype_T.
++ * This avoids adding a pointer to the hashtable item.
++ * PT2HIKEY() converts a proptype pointer to a hashitem key pointer.
++ * HIKEY2PT() converts a hashitem key pointer to a proptype pointer.
++ * HI2PT() converts a hashitem pointer to a proptype pointer.
++ */
++ #define PT2HIKEY(p) ((p)->pt_name)
++ #define HIKEY2PT(p) ((proptype_T *)((p) - offsetof(proptype_T, pt_name)))
++ #define HI2PT(hi) HIKEY2PT((hi)->hi_key)
++
++ // The global text property types.
++ static hashtab_T *global_proptypes = NULL;
++
++ // The last used text property type ID.
++ static int proptype_id = 0;
++
++ static char_u e_type_not_exist[] = N_("E971: Property type %s does not exist");
++ static char_u e_invalid_col[] = N_("E964: Invalid column number: %ld");
++
++ /*
++ * Find a property type by name, return the hashitem.
++ * Returns NULL if the item can't be found.
++ */
++ static hashitem_T *
++ find_prop_hi(char_u *name, buf_T *buf)
++ {
++ hashtab_T *ht;
++ hashitem_T *hi;
++
++ if (*name == NUL)
++ return NULL;
++ if (buf == NULL)
++ ht = global_proptypes;
++ else
++ ht = buf->b_proptypes;
++
++ if (ht == NULL)
++ return NULL;
++ hi = hash_find(ht, name);
++ if (HASHITEM_EMPTY(hi))
++ return NULL;
++ return hi;
++ }
++
++ /*
++ * Like find_prop_hi() but return the property type.
++ */
++ static proptype_T *
++ find_prop(char_u *name, buf_T *buf)
++ {
++ hashitem_T *hi = find_prop_hi(name, buf);
++
++ if (hi == NULL)
++ return NULL;
++ return HI2PT(hi);
++ }
++
++ /*
++ * Lookup a property type by name. First in "buf" and when not found in the
++ * global types.
++ * When not found gives an error message and returns NULL.
++ */
++ static proptype_T *
++ lookup_prop_type(char_u *name, buf_T *buf)
++ {
++ proptype_T *type = find_prop(name, buf);
++
++ if (type == NULL)
++ type = find_prop(name, NULL);
++ if (type == NULL)
++ EMSG2(_(e_type_not_exist), name);
++ return type;
++ }
++
++ /*
++ * Get an optional "bufnr" item from the dict in "arg".
++ * When the argument is not used or "bufnr" is not present then "buf" is
++ * unchanged.
++ * If "bufnr" is valid or not present return OK.
++ * When "arg" is not a dict or "bufnr" is invalide return FAIL.
++ */
++ static int
++ get_bufnr_from_arg(typval_T *arg, buf_T **buf)
++ {
++ dictitem_T *di;
++
++ if (arg->v_type != VAR_DICT)
++ {
++ EMSG(_(e_dictreq));
++ return FAIL;
++ }
++ if (arg->vval.v_dict == NULL)
++ return OK; // NULL dict is like an empty dict
++ di = dict_find(arg->vval.v_dict, (char_u *)"bufnr", -1);
++ if (di != NULL)
++ {
++ *buf = get_buf_tv(&di->di_tv, FALSE);
++ if (*buf == NULL)
++ return FAIL;
++ }
++ return OK;
++ }
++
++ /*
++ * prop_add({lnum}, {col}, {props})
++ */
++ void
++ f_prop_add(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ linenr_T lnum;
++ colnr_T col;
++ dict_T *dict;
++ colnr_T length = 1;
++ char_u *type_name;
++ proptype_T *type;
++ buf_T *buf = curbuf;
++ int id = 0;
++ char_u *newtext;
++ int proplen;
++ size_t textlen;
++ char_u *props;
++ char_u *newprops;
++ static textprop_T tmp_prop; // static to get it aligned.
++ int i;
++
++ lnum = get_tv_number(&argvars[0]);
++ col = get_tv_number(&argvars[1]);
++ if (col < 1)
++ {
++ EMSGN(_(e_invalid_col), (long)col);
++ return;
++ }
++ if (argvars[2].v_type != VAR_DICT)
++ {
++ EMSG(_(e_dictreq));
++ return;
++ }
++ dict = argvars[2].vval.v_dict;
++
++ if (dict == NULL || dict_find(dict, (char_u *)"type", -1) == NULL)
++ {
++ EMSG(_("E965: missing property type name"));
++ return;
++ }
++ type_name = get_dict_string(dict, (char_u *)"type", FALSE);
++
++ if (dict_find(dict, (char_u *)"end_lnum", -1) != NULL)
++ {
++ // TODO: handle end_lnum
++ EMSG("Sorry, end_lnum not supported yet");
++ return;
++ }
++
++ if (dict_find(dict, (char_u *)"length", -1) != NULL)
++ length = get_dict_number(dict, (char_u *)"length");
++ else if (dict_find(dict, (char_u *)"end_col", -1) != NULL)
++ {
++ length = get_dict_number(dict, (char_u *)"end_col") - col;
++ if (length <= 0)
++ {
++ EMSG2(_(e_invargval), "end_col");
++ return;
++ }
++ }
++
++ if (dict_find(dict, (char_u *)"id", -1) != NULL)
++ id = get_dict_number(dict, (char_u *)"id");
++
++ if (get_bufnr_from_arg(&argvars[2], &buf) == FAIL)
++ return;
++
++ type = lookup_prop_type(type_name, buf);
++ if (type == NULL)
++ return;
++
++ if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
++ {
++ EMSGN(_("E966: Invalid line number: %ld"), (long)lnum);
++ return;
++ }
++
++ // Fetch the line to get the ml_line_len field updated.
++ proplen = get_text_props(buf, lnum, &props, TRUE);
++
++ if (col >= (colnr_T)STRLEN(buf->b_ml.ml_line_ptr))
++ {
++ EMSGN(_(e_invalid_col), (long)col);
++ return;
++ }
++
++ // Allocate the new line with space for the new proprety.
++ newtext = alloc(buf->b_ml.ml_line_len + sizeof(textprop_T));
++ if (newtext == NULL)
++ return;
++ // Copy the text, including terminating NUL.
++ textlen = buf->b_ml.ml_line_len - proplen * sizeof(textprop_T);
++ mch_memmove(newtext, buf->b_ml.ml_line_ptr, textlen);
++
++ // Find the index where to insert the new property.
++ // Since the text properties are not aligned properly when stored with the
++ // text, we need to copy them as bytes before using it as a struct.
++ for (i = 0; i < proplen; ++i)
++ {
++ mch_memmove(&tmp_prop, props + i * sizeof(proptype_T),
++ sizeof(proptype_T));
++ if (tmp_prop.tp_col >= col)
++ break;
++ }
++ newprops = newtext + textlen;
++ if (i > 0)
++ mch_memmove(newprops, props, sizeof(textprop_T) * i);
++
++ tmp_prop.tp_col = col;
++ tmp_prop.tp_len = length;
++ tmp_prop.tp_id = id;
++ tmp_prop.tp_type = type->pt_id;
++ tmp_prop.tp_flags = 0;
++ mch_memmove(newprops + i * sizeof(textprop_T), &tmp_prop,
++ sizeof(textprop_T));
++
++ if (i < proplen)
++ mch_memmove(newprops + (i + 1) * sizeof(textprop_T),
++ props + i * sizeof(textprop_T),
++ sizeof(textprop_T) * (proplen - i));
++
++ if (buf->b_ml.ml_flags & ML_LINE_DIRTY)
++ vim_free(buf->b_ml.ml_line_ptr);
++ buf->b_ml.ml_line_ptr = newtext;
++ buf->b_ml.ml_line_len += sizeof(textprop_T);
++ buf->b_ml.ml_flags |= ML_LINE_DIRTY;
++
++ redraw_buf_later(buf, NOT_VALID);
++ }
++
++ /*
++ * Return TRUE if any text properties are defined globally or for buffer
++ * 'buf".
++ */
++ int
++ has_any_text_properties(buf_T *buf)
++ {
++ return buf->b_proptypes != NULL || global_proptypes != NULL;
++ }
++
++ /*
++ * Fetch the text properties for line "lnum" in buffer 'buf".
++ * Returns the number of text properties and, when non-zero, a pointer to the
++ * first one in "props" (note that it is not aligned, therefore the char_u
++ * pointer).
++ */
++ int
++ get_text_props(buf_T *buf, linenr_T lnum, char_u **props, int will_change)
++ {
++ char_u *text;
++ size_t textlen;
++ size_t proplen;
++
++ // Be quick when no text property types are defined.
++ if (!has_any_text_properties(buf))
++ return 0;
++
++ // Fetch the line to get the ml_line_len field updated.
++ text = ml_get_buf(buf, lnum, will_change);
++ textlen = STRLEN(text) + 1;
++ proplen = buf->b_ml.ml_line_len - textlen;
++ if (proplen % sizeof(textprop_T) != 0)
++ {
++ IEMSG(_("E967: text property info corrupted"));
++ return 0;
++ }
++ if (proplen > 0)
++ *props = text + textlen;
++ return proplen / sizeof(textprop_T);
++ }
++
++ static proptype_T *
++ find_type_by_id(hashtab_T *ht, int id)
++ {
++ long todo;
++ hashitem_T *hi;
++
++ if (ht == NULL)
++ return NULL;
++
++ // TODO: Make this faster by keeping a list of types sorted on ID and use
++ // a binary search.
++
++ todo = (long)ht->ht_used;
++ for (hi = ht->ht_array; todo > 0; ++hi)
++ {
++ if (!HASHITEM_EMPTY(hi))
++ {
++ proptype_T *prop = HI2PT(hi);
++
++ if (prop->pt_id == id)
++ return prop;
++ --todo;
++ }
++ }
++ return NULL;
++ }
++
++ /*
++ * Find a property type by ID in "buf" or globally.
++ * Returns NULL if not found.
++ */
++ proptype_T *
++ text_prop_type_by_id(buf_T *buf, int id)
++ {
++ proptype_T *type;
++
++ type = find_type_by_id(buf->b_proptypes, id);
++ if (type == NULL)
++ type = find_type_by_id(global_proptypes, id);
++ return type;
++ }
++
++ /*
++ * prop_clear({lnum} [, {lnum_end} [, {bufnr}]])
++ */
++ void
++ f_prop_clear(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ linenr_T start = get_tv_number(&argvars[0]);
++ linenr_T end = start;
++ linenr_T lnum;
++ buf_T *buf = curbuf;
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ end = get_tv_number(&argvars[1]);
++ if (argvars[2].v_type != VAR_UNKNOWN)
++ {
++ if (get_bufnr_from_arg(&argvars[2], &buf) == FAIL)
++ return;
++ }
++ }
++ if (start < 1 || end < 1)
++ {
++ EMSG(_(e_invrange));
++ return;
++ }
++
++ for (lnum = start; lnum <= end; ++lnum)
++ {
++ char_u *text;
++ size_t len;
++
++ if (lnum > buf->b_ml.ml_line_count)
++ break;
++ text = ml_get_buf(buf, lnum, FALSE);
++ len = STRLEN(text) + 1;
++ if ((size_t)buf->b_ml.ml_line_len > len)
++ {
++ if (!(buf->b_ml.ml_flags & ML_LINE_DIRTY))
++ {
++ char_u *newtext = vim_strsave(text);
++
++ // need to allocate the line now
++ if (newtext == NULL)
++ return;
++ buf->b_ml.ml_line_ptr = newtext;
++ buf->b_ml.ml_flags |= ML_LINE_DIRTY;
++ }
++ buf->b_ml.ml_line_len = len;
++ }
++ }
++ redraw_buf_later(buf, NOT_VALID);
++ }
++
++ /*
++ * prop_list({lnum} [, {bufnr}])
++ */
++ void
++ f_prop_list(typval_T *argvars, typval_T *rettv)
++ {
++ linenr_T lnum = get_tv_number(&argvars[0]);
++ buf_T *buf = curbuf;
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL)
++ return;
++ }
++ if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
++ {
++ EMSG(_(e_invrange));
++ return;
++ }
++
++ if (rettv_list_alloc(rettv) == OK)
++ {
++ char_u *text = ml_get_buf(buf, lnum, FALSE);
++ size_t textlen = STRLEN(text) + 1;
++ int count = (buf->b_ml.ml_line_len - textlen)
++ / sizeof(textprop_T);
++ int i;
++ textprop_T prop;
++ proptype_T *pt;
++
++ for (i = 0; i < count; ++i)
++ {
++ dict_T *d = dict_alloc();
++
++ if (d == NULL)
++ break;
++ mch_memmove(&prop, text + textlen + i * sizeof(textprop_T),
++ sizeof(textprop_T));
++ dict_add_number(d, "col", prop.tp_col);
++ dict_add_number(d, "length", prop.tp_len);
++ dict_add_number(d, "id", prop.tp_id);
++ dict_add_number(d, "start", !(prop.tp_flags & TP_FLAG_CONT_PREV));
++ dict_add_number(d, "end", !(prop.tp_flags & TP_FLAG_CONT_NEXT));
++ pt = text_prop_type_by_id(buf, prop.tp_type);
++ if (pt != NULL)
++ dict_add_string(d, "type", pt->pt_name);
++
++ list_append_dict(rettv->vval.v_list, d);
++ }
++ }
++ }
++
++ /*
++ * prop_remove({props} [, {lnum} [, {lnum_end}]])
++ */
++ void
++ f_prop_remove(typval_T *argvars, typval_T *rettv)
++ {
++ linenr_T start = 1;
++ linenr_T end = 0;
++ linenr_T lnum;
++ dict_T *dict;
++ buf_T *buf = curbuf;
++ dictitem_T *di;
++ int do_all = FALSE;
++ int id = -1;
++ int type_id = -1;
++
++ rettv->vval.v_number = 0;
++ if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ start = get_tv_number(&argvars[1]);
++ end = start;
++ if (argvars[2].v_type != VAR_UNKNOWN)
++ end = get_tv_number(&argvars[2]);
++ if (start < 1 || end < 1)
++ {
++ EMSG(_(e_invrange));
++ return;
++ }
++ }
++
++ dict = argvars[0].vval.v_dict;
++ di = dict_find(dict, (char_u *)"bufnr", -1);
++ if (di != NULL)
++ {
++ buf = get_buf_tv(&di->di_tv, FALSE);
++ if (buf == NULL)
++ return;
++ }
++
++ di = dict_find(dict, (char_u*)"all", -1);
++ if (di != NULL)
++ do_all = get_dict_number(dict, (char_u *)"all");
++
++ if (dict_find(dict, (char_u *)"id", -1) != NULL)
++ id = get_dict_number(dict, (char_u *)"id");
++ if (dict_find(dict, (char_u *)"type", -1))
++ {
++ char_u *name = get_dict_string(dict, (char_u *)"type", FALSE);
++ proptype_T *type = lookup_prop_type(name, buf);
++
++ if (type == NULL)
++ return;
++ type_id = type->pt_id;
++ }
++ if (id == -1 && type_id == -1)
++ {
++ EMSG(_("E968: Need at least one of 'id' or 'type'"));
++ return;
++ }
++
++ if (end == 0)
++ end = buf->b_ml.ml_line_count;
++ for (lnum = start; lnum <= end; ++lnum)
++ {
++ char_u *text;
++ size_t len;
++
++ if (lnum > buf->b_ml.ml_line_count)
++ break;
++ text = ml_get_buf(buf, lnum, FALSE);
++ len = STRLEN(text) + 1;
++ if ((size_t)buf->b_ml.ml_line_len > len)
++ {
++ static textprop_T textprop; // static because of alignment
++ unsigned idx;
++
++ for (idx = 0; idx < (buf->b_ml.ml_line_len - len)
++ / sizeof(textprop_T); ++idx)
++ {
++ char_u *cur_prop = buf->b_ml.ml_line_ptr + len
++ + idx * sizeof(textprop_T);
++ size_t taillen;
++
++ mch_memmove(&textprop, cur_prop, sizeof(textprop_T));
++ if (textprop.tp_id == id || textprop.tp_type == type_id)
++ {
++ if (!(buf->b_ml.ml_flags & ML_LINE_DIRTY))
++ {
++ char_u *newptr = alloc(buf->b_ml.ml_line_len);
++
++ // need to allocate the line to be able to change it
++ if (newptr == NULL)
++ return;
++ mch_memmove(newptr, buf->b_ml.ml_line_ptr,
++ buf->b_ml.ml_line_len);
++ buf->b_ml.ml_line_ptr = newptr;
++ curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
++ }
++
++ taillen = buf->b_ml.ml_line_len - len
++ - (idx + 1) * sizeof(textprop_T);
++ if (taillen > 0)
++ mch_memmove(cur_prop, cur_prop + sizeof(textprop_T),
++ taillen);
++ buf->b_ml.ml_line_len -= sizeof(textprop_T);
++ --idx;
++
++ ++rettv->vval.v_number;
++ if (!do_all)
++ break;
++ }
++ }
++ }
++ }
++ redraw_buf_later(buf, NOT_VALID);
++ }
++
++ /*
++ * Common for f_prop_type_add() and f_prop_type_change().
++ */
++ void
++ prop_type_set(typval_T *argvars, int add)
++ {
++ char_u *name;
++ buf_T *buf = NULL;
++ dict_T *dict;
++ dictitem_T *di;
++ proptype_T *prop;
++
++ name = get_tv_string(&argvars[0]);
++ if (*name == NUL)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL)
++ return;
++ dict = argvars[1].vval.v_dict;
++
++ prop = find_prop(name, buf);
++ if (add)
++ {
++ hashtab_T **htp;
++
++ if (prop != NULL)
++ {
++ EMSG2(_("E969: Property type %s already defined"), name);
++ return;
++ }
++ prop = (proptype_T *)alloc_clear(sizeof(proptype_T) + STRLEN(name));
++ if (prop == NULL)
++ return;
++ STRCPY(prop->pt_name, name);
++ prop->pt_id = ++proptype_id;
++ htp = buf == NULL ? &global_proptypes : &buf->b_proptypes;
++ if (*htp == NULL)
++ {
++ *htp = (hashtab_T *)alloc(sizeof(hashtab_T));
++ if (*htp == NULL)
++ return;
++ hash_init(*htp);
++ }
++ hash_add(buf == NULL ? global_proptypes : buf->b_proptypes,
++ PT2HIKEY(prop));
++ }
++ else
++ {
++ if (prop == NULL)
++ {
++ EMSG2(_(e_type_not_exist), name);
++ return;
++ }
++ }
++
++ if (dict != NULL)
++ {
++ di = dict_find(dict, (char_u *)"highlight", -1);
++ if (di != NULL)
++ {
++ char_u *highlight;
++ int hl_id = 0;
++
++ highlight = get_dict_string(dict, (char_u *)"highlight", TRUE);
++ if (highlight != NULL && *highlight != NUL)
++ hl_id = syn_name2id(highlight);
++ if (hl_id <= 0)
++ {
++ EMSG2(_("E970: Unknown highlight group name: '%s'"),
++ highlight == NULL ? (char_u *)"" : highlight);
++ return;
++ }
++ prop->pt_hl_id = hl_id;
++ }
++
++ di = dict_find(dict, (char_u *)"priority", -1);
++ if (di != NULL)
++ prop->pt_priority = get_tv_number(&di->di_tv);
++
++ di = dict_find(dict, (char_u *)"start_incl", -1);
++ if (di != NULL)
++ {
++ if (get_tv_number(&di->di_tv))
++ prop->pt_flags |= PT_FLAG_INS_START_INCL;
++ else
++ prop->pt_flags &= ~PT_FLAG_INS_START_INCL;
++ }
++
++ di = dict_find(dict, (char_u *)"end_incl", -1);
++ if (di != NULL)
++ {
++ if (get_tv_number(&di->di_tv))
++ prop->pt_flags |= PT_FLAG_INS_END_INCL;
++ else
++ prop->pt_flags &= ~PT_FLAG_INS_END_INCL;
++ }
++ }
++ }
++
++ /*
++ * prop_type_add({name}, {props})
++ */
++ void
++ f_prop_type_add(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ prop_type_set(argvars, TRUE);
++ }
++
++ /*
++ * prop_type_change({name}, {props})
++ */
++ void
++ f_prop_type_change(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ prop_type_set(argvars, FALSE);
++ }
++
++ /*
++ * prop_type_delete({name} [, {bufnr}])
++ */
++ void
++ f_prop_type_delete(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ char_u *name;
++ buf_T *buf = NULL;
++ hashitem_T *hi;
++
++ name = get_tv_string(&argvars[0]);
++ if (*name == NUL)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL)
++ return;
++ }
++
++ hi = find_prop_hi(name, buf);
++ if (hi != NULL)
++ {
++ hashtab_T *ht;
++
++ if (buf == NULL)
++ ht = global_proptypes;
++ else
++ ht = buf->b_proptypes;
++ hash_remove(ht, hi);
++ }
++ }
++
++ /*
++ * prop_type_get({name} [, {bufnr}])
++ */
++ void
++ f_prop_type_get(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ char_u *name = get_tv_string(&argvars[0]);
++
++ if (*name == NUL)
++ {
++ EMSG(_(e_invarg));
++ return;
++ }
++ if (rettv_dict_alloc(rettv) == OK)
++ {
++ proptype_T *prop = NULL;
++ buf_T *buf = NULL;
++
++ if (argvars[1].v_type != VAR_UNKNOWN)
++ {
++ if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL)
++ return;
++ }
++
++ prop = find_prop(name, buf);
++ if (prop != NULL)
++ {
++ dict_T *d = rettv->vval.v_dict;
++
++ if (prop->pt_hl_id > 0)
++ dict_add_string(d, "highlight", syn_id2name(prop->pt_hl_id));
++ dict_add_number(d, "priority", prop->pt_priority);
++ dict_add_number(d, "start_incl",
++ (prop->pt_flags & PT_FLAG_INS_START_INCL) ? 1 : 0);
++ dict_add_number(d, "end_incl",
++ (prop->pt_flags & PT_FLAG_INS_END_INCL) ? 1 : 0);
++ if (buf != NULL)
++ dict_add_number(d, "bufnr", buf->b_fnum);
++ }
++ }
++ }
++
++ static void
++ list_types(hashtab_T *ht, list_T *l)
++ {
++ long todo;
++ hashitem_T *hi;
++
++ todo = (long)ht->ht_used;
++ for (hi = ht->ht_array; todo > 0; ++hi)
++ {
++ if (!HASHITEM_EMPTY(hi))
++ {
++ proptype_T *prop = HI2PT(hi);
++
++ list_append_string(l, prop->pt_name, -1);
++ --todo;
++ }
++ }
++ }
++
++ /*
++ * prop_type_list([{bufnr}])
++ */
++ void
++ f_prop_type_list(typval_T *argvars, typval_T *rettv UNUSED)
++ {
++ buf_T *buf = NULL;
++
++ if (rettv_list_alloc(rettv) == OK)
++ {
++ if (argvars[0].v_type != VAR_UNKNOWN)
++ {
++ if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL)
++ return;
++ }
++ if (buf == NULL)
++ {
++ if (global_proptypes != NULL)
++ list_types(global_proptypes, rettv->vval.v_list);
++ }
++ else if (buf->b_proptypes != NULL)
++ list_types(buf->b_proptypes, rettv->vval.v_list);
++ }
++ }
++
++ /*
++ * Free all property types in "ht".
++ */
++ static void
++ clear_ht_prop_types(hashtab_T *ht)
++ {
++ long todo;
++ hashitem_T *hi;
++
++ if (ht == NULL)
++ return;
++
++ todo = (long)ht->ht_used;
++ for (hi = ht->ht_array; todo > 0; ++hi)
++ {
++ if (!HASHITEM_EMPTY(hi))
++ {
++ proptype_T *prop = HI2PT(hi);
++
++ vim_free(prop);
++ --todo;
++ }
++ }
++
++ hash_clear(ht);
++ vim_free(ht);
++ }
++
++ #if defined(EXITFREE) || defined(PROTO)
++ /*
++ * Free all property types for "buf".
++ */
++ void
++ clear_global_prop_types(void)
++ {
++ clear_ht_prop_types(global_proptypes);
++ global_proptypes = NULL;
++ }
++ #endif
++
++ /*
++ * Free all property types for "buf".
++ */
++ void
++ clear_buf_prop_types(buf_T *buf)
++ {
++ clear_ht_prop_types(buf->b_proptypes);
++ buf->b_proptypes = NULL;
++ }
++
++ #endif // FEAT_TEXT_PROP
+*** ../vim-8.1.0578/src/userfunc.c 2018-11-10 17:33:23.087518814 +0100
+--- src/userfunc.c 2018-12-13 20:24:32.174552670 +0100
+***************
+*** 25,31 ****
+
+ /* From user function to hashitem and back. */
+ #define UF2HIKEY(fp) ((fp)->uf_name)
+! #define HIKEY2UF(p) ((ufunc_T *)(p - offsetof(ufunc_T, uf_name)))
+ #define HI2UF(hi) HIKEY2UF((hi)->hi_key)
+
+ #define FUNCARG(fp, j) ((char_u **)(fp->uf_args.ga_data))[j]
+--- 25,31 ----
+
+ /* From user function to hashitem and back. */
+ #define UF2HIKEY(fp) ((fp)->uf_name)
+! #define HIKEY2UF(p) ((ufunc_T *)((p) - offsetof(ufunc_T, uf_name)))
+ #define HI2UF(hi) HIKEY2UF((hi)->hi_key)
+
+ #define FUNCARG(fp, j) ((char_u **)(fp->uf_args.ga_data))[j]
+*** ../vim-8.1.0578/src/version.c 2018-12-12 20:34:06.076356104 +0100
+--- src/version.c 2018-12-13 20:39:19.480983935 +0100
+***************
+*** 653,664 ****
+ # else
+ "-terminfo",
+ # endif
+- #else /* unix always includes termcap support */
+- # ifdef HAVE_TGETENT
+- "+tgetent",
+- # else
+- "-tgetent",
+- # endif
+ #endif
+ #ifdef FEAT_TERMRESPONSE
+ "+termresponse",
+--- 653,658 ----
+***************
+*** 670,675 ****
+--- 664,682 ----
+ #else
+ "-textobjects",
+ #endif
++ #ifdef FEAT_TEXT_PROP
++ "+textprop",
++ #else
++ "-textprop",
++ #endif
++ #if !defined(UNIX)
++ /* unix always includes termcap support */
++ # ifdef HAVE_TGETENT
++ "+tgetent",
++ # else
++ "-tgetent",
++ # endif
++ #endif
+ #ifdef FEAT_TIMERS
+ "+timers",
+ #else
+*** ../vim-8.1.0578/src/version.c 2018-12-12 20:34:06.076356104 +0100
+--- src/version.c 2018-12-13 20:39:19.480983935 +0100
+***************
+*** 794,795 ****
+--- 801,804 ----
+ { /* Add new patch number below this line */
++ /**/
++ 579,
+ /**/
+
+--
+EXPERIENCE - experience is a wonderful thing. It enables you to
+recognise a mistake when you make it again.
+
+ /// 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 ///